From 18c78471e33ab9770ab2a6448749de23e38212c4 Mon Sep 17 00:00:00 2001 From: donnie Date: Sun, 12 Feb 2023 11:10:11 +0800 Subject: [PATCH] fix --- {tim.DB => DB}/db.go | 3 +- {tim.FW => FW}/fw.go | 0 {tim.Map => Map}/table.go | 0 {tim.base64Util => base64Util}/base64.go | 4 +- {tim.client => client}/client.go | 35 +- {tim.client => client}/clientTimImpl.go | 81 +- {tim.cluster => cluster}/cluster.go | 10 +- {tim.cluster => cluster}/clusterProcess.go | 4 +- {tim.cluster => cluster}/redis.go | 3 +- {tim.cluster => cluster}/utils.go | 0 .../clusterClient.go | 29 +- .../clusterRoute.go | 12 +- .../clusterServer.go | 9 +- {tim.common => common}/common.go | 2 +- {tim.conf => conf}/cluster.go | 4 +- {tim.conf => conf}/conf.go | 5 +- {tim.conf => conf}/conf_test.go | 2 +- {tim.connect => connect}/timconn.go | 32 +- {tim.createDao => createDao}/createDao.go | 0 {tim.dao => dao}/tim_config.go | 0 {tim.dao => dao}/tim_domain.go | 0 {tim.dao => dao}/tim_message.go | 0 {tim.dao => dao}/tim_mucmember.go | 0 {tim.dao => dao}/tim_mucmessage.go | 0 {tim.dao => dao}/tim_mucoffline.go | 0 {tim.dao => dao}/tim_mucroom.go | 0 {tim.dao => dao}/tim_offline.go | 0 {tim.dao => dao}/tim_property.go | 0 {tim.dao => dao}/tim_roster.go | 0 {tim.dao => dao}/tim_user.go | 0 {tim.daoService => daoService}/daoservice.go | 37 +- go.mod | 13 + go.sum | 14 + {tim.hbase => hbase}/client_test.go | 3 +- {tim.hbase => hbase}/constants.go | 2 +- hbase/hbase-consts.go | 25 + hbase/hbase.go | 29941 ++++++++++++++++ {tim.hbase => hbase}/hbaseClient.go | 24 +- {tim.hbase => hbase}/hbaseService.go | 21 +- {tim.hbase => hbase}/hbasedao.go | 0 .../hbaseService.go | 26 +- {tim.impl => impl}/err.go | 0 {tim.impl => impl}/impl.go | 92 +- {tim.impl => impl}/service.go | 4 +- log/tim.log | 44 + {tim.mode => mode}/mode.go | 0 {tim.model => model}/model.go | 3 +- protocol/GoUnusedProtection__.go | 6 + protocol/i_tim-remote/i_tim-remote.go | 891 + .../constants.go => protocol/tim-consts.go | 12 +- protocol/tim.go | 14297 ++++++++ protocols/gen-c_glib/i_tim.c | 49 +- protocols/gen-c_glib/i_tim.h | 2 +- protocols/gen-c_glib/tim_types.c | 470 +- protocols/gen-c_glib/tim_types.h | 3 +- protocols/gen-cocoa/tim.h | 1689 - protocols/gen-cocoa/tim.m | 18677 ---------- protocols/gen-cpp/ITim.cpp | 744 +- protocols/gen-cpp/ITim.h | 859 +- protocols/gen-cpp/ITim_server.skeleton.cpp | 12 +- protocols/gen-cpp/tim_constants.cpp | 2 +- protocols/gen-cpp/tim_constants.h | 2 +- protocols/gen-cpp/tim_types.cpp | 306 +- protocols/gen-cpp/tim_types.h | 822 +- protocols/gen-csharp/ITim.cs | 5819 --- protocols/gen-csharp/Tid.cs | 336 - protocols/gen-csharp/TimAckBean.cs | 359 - protocols/gen-csharp/TimArea.cs | 319 - protocols/gen-csharp/TimAuth.cs | 206 - protocols/gen-csharp/TimError.cs | 167 - protocols/gen-csharp/TimHBean.cs | 178 - protocols/gen-csharp/TimIqBean.cs | 373 - protocols/gen-csharp/TimMBean.cs | 641 - protocols/gen-csharp/TimMBeanList.cs | 259 - protocols/gen-csharp/TimMessageIq.cs | 297 - protocols/gen-csharp/TimNode.cs | 167 - protocols/gen-csharp/TimPBean.cs | 523 - protocols/gen-csharp/TimPBeanList.cs | 259 - protocols/gen-csharp/TimPage.cs | 262 - protocols/gen-csharp/TimParam.cs | 397 - protocols/gen-csharp/TimPropertyBean.cs | 203 - protocols/gen-csharp/TimRemoteRoom.cs | 225 - protocols/gen-csharp/TimRemoteUserBean.cs | 225 - protocols/gen-csharp/TimResponseBean.cs | 278 - protocols/gen-csharp/TimRoom.cs | 553 - protocols/gen-csharp/TimRoster.cs | 233 - protocols/gen-csharp/TimSock5Bean.cs | 291 - protocols/gen-csharp/TimSock5Bytes.cs | 237 - protocols/gen-csharp/TimTime.cs | 167 - protocols/gen-csharp/TimUserBean.cs | 572 - protocols/gen-csharp/tim.Constants.cs | 34 - protocols/gen-d/ITim.d | 74 +- protocols/gen-d/tim_constants.d | 16 +- protocols/gen-d/tim_types.d | 14 +- protocols/gen-erl/i_tim_thrift.erl | 7 +- protocols/gen-erl/i_tim_thrift.hrl | 6 + protocols/gen-erl/tim_constants.erl | 10 + protocols/gen-erl/tim_constants.hrl | 2 +- protocols/gen-erl/tim_types.erl | 15 +- protocols/gen-erl/tim_types.hrl | 234 +- .../gen-go/protocol/GoUnusedProtection__.go | 6 + .../protocol/i_tim-remote/i_tim-remote.go | 1710 +- protocols/gen-go/protocol/itim.go | 5753 --- .../protocol/{constants.go => tim-consts.go} | 12 +- protocols/gen-go/protocol/tim.go | 14297 ++++++++ protocols/gen-go/protocol/ttypes.go | 8254 ----- protocols/gen-hs/ITim.hs | 1840 - protocols/gen-hs/ITim_Client.hs | 316 - protocols/gen-hs/ITim_Iface.hs | 67 - protocols/gen-hs/Tim_Consts.hs | 53 - protocols/gen-hs/Tim_Types.hs | 1488 - protocols/gen-html/index.html | 69 + protocols/gen-html/style.css | 184 + protocols/gen-html/tim.html | 466 + protocols/gen-java/com/tim/packet/ITim.java | 5026 ++- protocols/gen-java/com/tim/packet/Tid.java | 289 +- .../gen-java/com/tim/packet/TimAckBean.java | 283 +- .../gen-java/com/tim/packet/TimArea.java | 255 +- .../gen-java/com/tim/packet/TimAuth.java | 180 +- .../gen-java/com/tim/packet/TimError.java | 161 +- .../gen-java/com/tim/packet/TimHBean.java | 173 +- .../gen-java/com/tim/packet/TimIqBean.java | 281 +- .../gen-java/com/tim/packet/TimMBean.java | 427 +- .../gen-java/com/tim/packet/TimMBeanList.java | 239 +- .../gen-java/com/tim/packet/TimMessageIq.java | 264 +- .../gen-java/com/tim/packet/TimNode.java | 162 +- .../gen-java/com/tim/packet/TimPBean.java | 372 +- .../gen-java/com/tim/packet/TimPBeanList.java | 239 +- .../gen-java/com/tim/packet/TimPage.java | 221 +- .../gen-java/com/tim/packet/TimParam.java | 290 +- .../com/tim/packet/TimPropertyBean.java | 180 +- .../com/tim/packet/TimRemoteRoom.java | 196 +- .../com/tim/packet/TimRemoteUserBean.java | 196 +- .../com/tim/packet/TimResponseBean.java | 233 +- .../gen-java/com/tim/packet/TimRoom.java | 363 +- .../gen-java/com/tim/packet/TimRoster.java | 220 +- .../gen-java/com/tim/packet/TimSock5Bean.java | 282 +- .../com/tim/packet/TimSock5Bytes.java | 246 +- .../gen-java/com/tim/packet/TimTime.java | 162 +- .../gen-java/com/tim/packet/TimUserBean.java | 406 +- .../gen-java/com/tim/packet/timConstants.java | 37 +- protocols/gen-js/ITim.js | 1343 +- protocols/gen-js/tim_types.js | 1397 +- protocols/gen-lua/tim_ITim.lua | 327 +- protocols/gen-lua/tim_ttypes.lua | 266 +- protocols/gen-netstd/ITim.cs | 6725 ++++ protocols/gen-netstd/Tid.cs | 464 + protocols/gen-netstd/TimAckBean.cs | 475 + protocols/gen-netstd/TimArea.cs | 421 + protocols/gen-netstd/TimAuth.cs | 284 + protocols/gen-netstd/TimError.cs | 231 + protocols/gen-netstd/TimHBean.cs | 246 + protocols/gen-netstd/TimIqBean.cs | 516 + protocols/gen-netstd/TimMBean.cs | 889 + protocols/gen-netstd/TimMBeanList.cs | 357 + protocols/gen-netstd/TimMessageIq.cs | 383 + protocols/gen-netstd/TimNode.cs | 231 + protocols/gen-netstd/TimPBean.cs | 726 + protocols/gen-netstd/TimPBeanList.cs | 357 + protocols/gen-netstd/TimPage.cs | 352 + protocols/gen-netstd/TimParam.cs | 527 + protocols/gen-netstd/TimPropertyBean.cs | 281 + protocols/gen-netstd/TimRemoteRoom.cs | 301 + protocols/gen-netstd/TimRemoteUserBean.cs | 301 + protocols/gen-netstd/TimResponseBean.cs | 366 + protocols/gen-netstd/TimRoom.cs | 721 + protocols/gen-netstd/TimRoster.cs | 338 + protocols/gen-netstd/TimSock5Bean.cs | 437 + protocols/gen-netstd/TimSock5Bytes.cs | 333 + protocols/gen-netstd/TimTime.cs | 231 + protocols/gen-netstd/TimUserBean.cs | 756 + protocols/gen-netstd/tim.Constants.cs | 45 + protocols/gen-netstd/tim.Extensions.cs | 219 + protocols/gen-perl/Constants.pm | 8 +- protocols/gen-perl/ITim.pm | 683 +- protocols/gen-perl/Types.pm | 797 +- protocols/gen-php/Constant.php | 55 + protocols/gen-php/ITim.php | 3834 -- protocols/gen-php/ITimClient.php | 946 + protocols/gen-php/ITimIf.php | 183 + protocols/gen-php/ITim_timAck_args.php | 97 + protocols/gen-php/ITim_timError_args.php | 97 + protocols/gen-php/ITim_timLogin_args.php | 121 + protocols/gen-php/ITim_timLogout_args.php | 66 + protocols/gen-php/ITim_timMessageIq_args.php | 121 + .../gen-php/ITim_timMessageList_args.php | 97 + .../gen-php/ITim_timMessageResult_args.php | 97 + protocols/gen-php/ITim_timMessage_args.php | 97 + protocols/gen-php/ITim_timPing_args.php | 92 + .../gen-php/ITim_timPresenceList_args.php | 97 + protocols/gen-php/ITim_timPresence_args.php | 97 + protocols/gen-php/ITim_timProperty_args.php | 97 + protocols/gen-php/ITim_timRegist_args.php | 121 + .../gen-php/ITim_timRemoteUserAuth_args.php | 150 + .../gen-php/ITim_timRemoteUserAuth_result.php | 97 + .../gen-php/ITim_timRemoteUserEdit_args.php | 155 + .../gen-php/ITim_timRemoteUserEdit_result.php | 97 + .../gen-php/ITim_timRemoteUserGet_args.php | 126 + .../gen-php/ITim_timRemoteUserGet_result.php | 97 + .../ITim_timResponseMessageIq_args.php | 150 + .../ITim_timResponseMessageIq_result.php | 97 + .../ITim_timResponseMessageList_args.php | 126 + .../ITim_timResponseMessageList_result.php | 97 + .../gen-php/ITim_timResponseMessage_args.php | 126 + .../ITim_timResponseMessage_result.php | 97 + .../ITim_timResponsePresenceList_args.php | 126 + .../ITim_timResponsePresenceList_result.php | 97 + .../gen-php/ITim_timResponsePresence_args.php | 126 + .../ITim_timResponsePresence_result.php | 97 + protocols/gen-php/ITim_timRoser_args.php | 97 + protocols/gen-php/ITim_timStarttls_args.php | 66 + protocols/gen-php/ITim_timStream_args.php | 97 + protocols/gen-php/Tid.php | 272 + protocols/gen-php/TimAckBean.php | 277 + protocols/gen-php/TimArea.php | 246 + protocols/gen-php/TimAuth.php | 146 + protocols/gen-php/TimError.php | 120 + protocols/gen-php/TimHBean.php | 146 + protocols/gen-php/TimIqBean.php | 312 + protocols/gen-php/TimMBean.php | 509 + protocols/gen-php/TimMBeanList.php | 218 + protocols/gen-php/TimMessageIq.php | 243 + protocols/gen-php/TimNode.php | 120 + protocols/gen-php/TimPBean.php | 422 + protocols/gen-php/TimPBeanList.php | 218 + protocols/gen-php/TimPage.php | 198 + protocols/gen-php/TimParam.php | 298 + protocols/gen-php/TimPropertyBean.php | 144 + protocols/gen-php/TimRemoteRoom.php | 182 + protocols/gen-php/TimRemoteUserBean.php | 182 + protocols/gen-php/TimResponseBean.php | 223 + protocols/gen-php/TimRoom.php | 435 + protocols/gen-php/TimRoster.php | 204 + protocols/gen-php/TimSock5Bean.php | 282 + protocols/gen-php/TimSock5Bytes.php | 218 + protocols/gen-php/TimTime.php | 120 + protocols/gen-php/TimUserBean.php | 432 + protocols/gen-php/Types.php | 5909 --- protocols/gen-py/tim/ITim-remote | 355 +- protocols/gen-py/tim/ITim.py | 6567 ++-- protocols/gen-py/tim/constants.py | 9 +- protocols/gen-py/tim/ttypes.py | 6747 ++-- protocols/gen-rb/i_tim.rb | 2 +- protocols/gen-rb/tim_constants.rb | 2 +- protocols/gen-rb/tim_types.rb | 52 +- {tim.route => route}/route.go | 11 +- .../serializer_test.go | 13 +- {tim.service => service}/controller.go | 32 +- {tim.service => service}/httpserver.go | 15 +- {tim.service => service}/info.go | 6 +- {tim.service => service}/service.go | 3 +- {tim.tfClient => tfClient}/tfClient.go | 6 +- tfClient/tfClient_test.go | 31 + {tim.thriftserver => thriftserver}/server.go | 11 +- {tim.ticker => ticker}/ticker.go | 5 +- tim.go | 19 +- tim.hbase/thbaseservice.go | 8964 ----- tim.hbase/ttypes.go | 5133 --- tim.protocol/itim.go | 5753 --- tim.protocol/ttypes.go | 8254 ----- tim.tfClient/tfClient_test.go | 36 - tim.xml | 4 +- {tim.utils => utils}/strutil.go | 0 {tim.utils => utils}/utils.go | 0 {tim.utils => utils}/utils_test.go | 0 265 files changed, 107280 insertions(+), 106779 deletions(-) rename {tim.DB => DB}/db.go (97%) rename {tim.FW => FW}/fw.go (100%) rename {tim.Map => Map}/table.go (100%) rename {tim.base64Util => base64Util}/base64.go (76%) rename {tim.client => client}/client.go (90%) rename {tim.client => client}/clientTimImpl.go (66%) rename {tim.cluster => cluster}/cluster.go (99%) rename {tim.cluster => cluster}/clusterProcess.go (96%) rename {tim.cluster => cluster}/redis.go (99%) rename {tim.cluster => cluster}/utils.go (100%) rename {tim.clusterClient => clusterClient}/clusterClient.go (78%) rename {tim.clusterRoute => clusterRoute}/clusterRoute.go (95%) rename {tim.clusterServer => clusterServer}/clusterServer.go (91%) rename {tim.common => common}/common.go (96%) rename {tim.conf => conf}/cluster.go (94%) rename {tim.conf => conf}/conf.go (96%) rename {tim.conf => conf}/conf_test.go (68%) rename {tim.connect => connect}/timconn.go (92%) rename {tim.createDao => createDao}/createDao.go (100%) rename {tim.dao => dao}/tim_config.go (100%) rename {tim.dao => dao}/tim_domain.go (100%) rename {tim.dao => dao}/tim_message.go (100%) rename {tim.dao => dao}/tim_mucmember.go (100%) rename {tim.dao => dao}/tim_mucmessage.go (100%) rename {tim.dao => dao}/tim_mucoffline.go (100%) rename {tim.dao => dao}/tim_mucroom.go (100%) rename {tim.dao => dao}/tim_offline.go (100%) rename {tim.dao => dao}/tim_property.go (100%) rename {tim.dao => dao}/tim_roster.go (100%) rename {tim.dao => dao}/tim_user.go (100%) rename {tim.daoService => daoService}/daoservice.go (97%) create mode 100644 go.mod create mode 100644 go.sum rename {tim.hbase => hbase}/client_test.go (99%) rename {tim.hbase => hbase}/constants.go (87%) create mode 100644 hbase/hbase-consts.go create mode 100644 hbase/hbase.go rename {tim.hbase => hbase}/hbaseClient.go (89%) rename {tim.hbase => hbase}/hbaseService.go (94%) rename {tim.hbase => hbase}/hbasedao.go (100%) rename {tim.hbaseService => hbaseService}/hbaseService.go (98%) rename {tim.impl => impl}/err.go (100%) rename {tim.impl => impl}/impl.go (80%) rename {tim.impl => impl}/service.go (95%) create mode 100644 log/tim.log rename {tim.mode => mode}/mode.go (100%) rename {tim.model => model}/model.go (93%) create mode 100644 protocol/GoUnusedProtection__.go create mode 100644 protocol/i_tim-remote/i_tim-remote.go rename tim.protocol/constants.go => protocol/tim-consts.go (60%) create mode 100644 protocol/tim.go delete mode 100644 protocols/gen-cocoa/tim.h delete mode 100644 protocols/gen-cocoa/tim.m delete mode 100644 protocols/gen-csharp/ITim.cs delete mode 100644 protocols/gen-csharp/Tid.cs delete mode 100644 protocols/gen-csharp/TimAckBean.cs delete mode 100644 protocols/gen-csharp/TimArea.cs delete mode 100644 protocols/gen-csharp/TimAuth.cs delete mode 100644 protocols/gen-csharp/TimError.cs delete mode 100644 protocols/gen-csharp/TimHBean.cs delete mode 100644 protocols/gen-csharp/TimIqBean.cs delete mode 100644 protocols/gen-csharp/TimMBean.cs delete mode 100644 protocols/gen-csharp/TimMBeanList.cs delete mode 100644 protocols/gen-csharp/TimMessageIq.cs delete mode 100644 protocols/gen-csharp/TimNode.cs delete mode 100644 protocols/gen-csharp/TimPBean.cs delete mode 100644 protocols/gen-csharp/TimPBeanList.cs delete mode 100644 protocols/gen-csharp/TimPage.cs delete mode 100644 protocols/gen-csharp/TimParam.cs delete mode 100644 protocols/gen-csharp/TimPropertyBean.cs delete mode 100644 protocols/gen-csharp/TimRemoteRoom.cs delete mode 100644 protocols/gen-csharp/TimRemoteUserBean.cs delete mode 100644 protocols/gen-csharp/TimResponseBean.cs delete mode 100644 protocols/gen-csharp/TimRoom.cs delete mode 100644 protocols/gen-csharp/TimRoster.cs delete mode 100644 protocols/gen-csharp/TimSock5Bean.cs delete mode 100644 protocols/gen-csharp/TimSock5Bytes.cs delete mode 100644 protocols/gen-csharp/TimTime.cs delete mode 100644 protocols/gen-csharp/TimUserBean.cs delete mode 100644 protocols/gen-csharp/tim.Constants.cs create mode 100644 protocols/gen-erl/tim_constants.erl create mode 100644 protocols/gen-go/protocol/GoUnusedProtection__.go delete mode 100644 protocols/gen-go/protocol/itim.go rename protocols/gen-go/protocol/{constants.go => tim-consts.go} (60%) create mode 100644 protocols/gen-go/protocol/tim.go delete mode 100644 protocols/gen-go/protocol/ttypes.go delete mode 100644 protocols/gen-hs/ITim.hs delete mode 100644 protocols/gen-hs/ITim_Client.hs delete mode 100644 protocols/gen-hs/ITim_Iface.hs delete mode 100644 protocols/gen-hs/Tim_Consts.hs delete mode 100644 protocols/gen-hs/Tim_Types.hs create mode 100644 protocols/gen-html/index.html create mode 100644 protocols/gen-html/style.css create mode 100644 protocols/gen-html/tim.html create mode 100644 protocols/gen-netstd/ITim.cs create mode 100644 protocols/gen-netstd/Tid.cs create mode 100644 protocols/gen-netstd/TimAckBean.cs create mode 100644 protocols/gen-netstd/TimArea.cs create mode 100644 protocols/gen-netstd/TimAuth.cs create mode 100644 protocols/gen-netstd/TimError.cs create mode 100644 protocols/gen-netstd/TimHBean.cs create mode 100644 protocols/gen-netstd/TimIqBean.cs create mode 100644 protocols/gen-netstd/TimMBean.cs create mode 100644 protocols/gen-netstd/TimMBeanList.cs create mode 100644 protocols/gen-netstd/TimMessageIq.cs create mode 100644 protocols/gen-netstd/TimNode.cs create mode 100644 protocols/gen-netstd/TimPBean.cs create mode 100644 protocols/gen-netstd/TimPBeanList.cs create mode 100644 protocols/gen-netstd/TimPage.cs create mode 100644 protocols/gen-netstd/TimParam.cs create mode 100644 protocols/gen-netstd/TimPropertyBean.cs create mode 100644 protocols/gen-netstd/TimRemoteRoom.cs create mode 100644 protocols/gen-netstd/TimRemoteUserBean.cs create mode 100644 protocols/gen-netstd/TimResponseBean.cs create mode 100644 protocols/gen-netstd/TimRoom.cs create mode 100644 protocols/gen-netstd/TimRoster.cs create mode 100644 protocols/gen-netstd/TimSock5Bean.cs create mode 100644 protocols/gen-netstd/TimSock5Bytes.cs create mode 100644 protocols/gen-netstd/TimTime.cs create mode 100644 protocols/gen-netstd/TimUserBean.cs create mode 100644 protocols/gen-netstd/tim.Constants.cs create mode 100644 protocols/gen-netstd/tim.Extensions.cs create mode 100644 protocols/gen-php/Constant.php delete mode 100644 protocols/gen-php/ITim.php create mode 100644 protocols/gen-php/ITimClient.php create mode 100644 protocols/gen-php/ITimIf.php create mode 100644 protocols/gen-php/ITim_timAck_args.php create mode 100644 protocols/gen-php/ITim_timError_args.php create mode 100644 protocols/gen-php/ITim_timLogin_args.php create mode 100644 protocols/gen-php/ITim_timLogout_args.php create mode 100644 protocols/gen-php/ITim_timMessageIq_args.php create mode 100644 protocols/gen-php/ITim_timMessageList_args.php create mode 100644 protocols/gen-php/ITim_timMessageResult_args.php create mode 100644 protocols/gen-php/ITim_timMessage_args.php create mode 100644 protocols/gen-php/ITim_timPing_args.php create mode 100644 protocols/gen-php/ITim_timPresenceList_args.php create mode 100644 protocols/gen-php/ITim_timPresence_args.php create mode 100644 protocols/gen-php/ITim_timProperty_args.php create mode 100644 protocols/gen-php/ITim_timRegist_args.php create mode 100644 protocols/gen-php/ITim_timRemoteUserAuth_args.php create mode 100644 protocols/gen-php/ITim_timRemoteUserAuth_result.php create mode 100644 protocols/gen-php/ITim_timRemoteUserEdit_args.php create mode 100644 protocols/gen-php/ITim_timRemoteUserEdit_result.php create mode 100644 protocols/gen-php/ITim_timRemoteUserGet_args.php create mode 100644 protocols/gen-php/ITim_timRemoteUserGet_result.php create mode 100644 protocols/gen-php/ITim_timResponseMessageIq_args.php create mode 100644 protocols/gen-php/ITim_timResponseMessageIq_result.php create mode 100644 protocols/gen-php/ITim_timResponseMessageList_args.php create mode 100644 protocols/gen-php/ITim_timResponseMessageList_result.php create mode 100644 protocols/gen-php/ITim_timResponseMessage_args.php create mode 100644 protocols/gen-php/ITim_timResponseMessage_result.php create mode 100644 protocols/gen-php/ITim_timResponsePresenceList_args.php create mode 100644 protocols/gen-php/ITim_timResponsePresenceList_result.php create mode 100644 protocols/gen-php/ITim_timResponsePresence_args.php create mode 100644 protocols/gen-php/ITim_timResponsePresence_result.php create mode 100644 protocols/gen-php/ITim_timRoser_args.php create mode 100644 protocols/gen-php/ITim_timStarttls_args.php create mode 100644 protocols/gen-php/ITim_timStream_args.php create mode 100644 protocols/gen-php/Tid.php create mode 100644 protocols/gen-php/TimAckBean.php create mode 100644 protocols/gen-php/TimArea.php create mode 100644 protocols/gen-php/TimAuth.php create mode 100644 protocols/gen-php/TimError.php create mode 100644 protocols/gen-php/TimHBean.php create mode 100644 protocols/gen-php/TimIqBean.php create mode 100644 protocols/gen-php/TimMBean.php create mode 100644 protocols/gen-php/TimMBeanList.php create mode 100644 protocols/gen-php/TimMessageIq.php create mode 100644 protocols/gen-php/TimNode.php create mode 100644 protocols/gen-php/TimPBean.php create mode 100644 protocols/gen-php/TimPBeanList.php create mode 100644 protocols/gen-php/TimPage.php create mode 100644 protocols/gen-php/TimParam.php create mode 100644 protocols/gen-php/TimPropertyBean.php create mode 100644 protocols/gen-php/TimRemoteRoom.php create mode 100644 protocols/gen-php/TimRemoteUserBean.php create mode 100644 protocols/gen-php/TimResponseBean.php create mode 100644 protocols/gen-php/TimRoom.php create mode 100644 protocols/gen-php/TimRoster.php create mode 100644 protocols/gen-php/TimSock5Bean.php create mode 100644 protocols/gen-php/TimSock5Bytes.php create mode 100644 protocols/gen-php/TimTime.php create mode 100644 protocols/gen-php/TimUserBean.php delete mode 100644 protocols/gen-php/Types.php rename {tim.route => route}/route.go (98%) rename {tim.serializer => serializer}/serializer_test.go (56%) rename {tim.service => service}/controller.go (91%) rename {tim.service => service}/httpserver.go (90%) rename {tim.service => service}/info.go (98%) rename {tim.service => service}/service.go (97%) rename {tim.tfClient => tfClient}/tfClient.go (95%) create mode 100644 tfClient/tfClient_test.go rename {tim.thriftserver => thriftserver}/server.go (94%) rename {tim.ticker => ticker}/ticker.go (95%) delete mode 100644 tim.hbase/thbaseservice.go delete mode 100644 tim.hbase/ttypes.go delete mode 100644 tim.protocol/itim.go delete mode 100644 tim.protocol/ttypes.go delete mode 100644 tim.tfClient/tfClient_test.go rename {tim.utils => utils}/strutil.go (100%) rename {tim.utils => utils}/utils.go (100%) rename {tim.utils => utils}/utils_test.go (100%) diff --git a/tim.DB/db.go b/DB/db.go similarity index 97% rename from tim.DB/db.go rename to DB/db.go index 0408121..cfac138 100644 --- a/tim.DB/db.go +++ b/DB/db.go @@ -7,9 +7,10 @@ import ( "database/sql" "os" + . "tim/common" + "github.com/donnie4w/go-logger/logger" _ "github.com/go-sql-driver/mysql" - . "tim.common" ) var Master *sql.DB diff --git a/tim.FW/fw.go b/FW/fw.go similarity index 100% rename from tim.FW/fw.go rename to FW/fw.go diff --git a/tim.Map/table.go b/Map/table.go similarity index 100% rename from tim.Map/table.go rename to Map/table.go diff --git a/tim.base64Util/base64.go b/base64Util/base64.go similarity index 76% rename from tim.base64Util/base64.go rename to base64Util/base64.go index 022a8d4..64d1da8 100644 --- a/tim.base64Util/base64.go +++ b/base64Util/base64.go @@ -7,9 +7,9 @@ import ( "encoding/base64" ) -func Base64Encode(src []byte) string { +func Base64Encode(bs []byte) string { // return []byte(coder.EncodeToString(src)) - return base64.StdEncoding.EncodeToString(src) + return base64.StdEncoding.EncodeToString(bs) } func Base64Decode(src string) ([]byte, error) { diff --git a/tim.client/client.go b/client/client.go similarity index 90% rename from tim.client/client.go rename to client/client.go index 41ca02f..d7d79e3 100644 --- a/tim.client/client.go +++ b/client/client.go @@ -4,6 +4,7 @@ package client import ( + "context" "errors" "fmt" "os" @@ -11,10 +12,11 @@ import ( "sync" "time" - "git.apache.org/thrift.git/lib/go/thrift" + . "tim/protocol" + "tim/route" + + "github.com/apache/thrift/lib/go/thrift" "github.com/donnie4w/go-logger/logger" - . "tim.protocol" - "tim.route" ) type FLOW string @@ -41,6 +43,7 @@ type Connect struct { Client *ITimClient FlowConnect FLOW Super *Cli + ts *thrift.TSocket } func (this *Connect) Close() { @@ -50,9 +53,9 @@ func (this *Connect) Close() { logger.Error(string(debug.Stack())) } }() - if this.Client != nil && this.Client.Transport != nil && this.FlowConnect != CONNECT_STOP { + if this.Client != nil && this.ts != nil && this.FlowConnect != CONNECT_STOP { this.FlowConnect = CONNECT_STOP - this.Client.Transport.Close() + this.ts.Close() } } @@ -200,7 +203,7 @@ func (this *Cli) SendMBean(mbean *TimMBean) (err error) { } } if this.Addr != "" { - err = this.Connect.Client.TimMessage(mbean) + err = this.Connect.Client.TimMessage(context.Background(), mbean) Confirm.Add(mbean.GetThreadId(), mbean) } } else { @@ -238,7 +241,7 @@ func (this *Cli) SendPBean(pbean *TimPBean) (err error) { } } if this.Addr != "" { - err = this.Connect.Client.TimPresence(pbean) + err = this.Connect.Client.TimPresence(context.Background(), pbean) if err != nil { logger.Error("SendPBean error:", err.Error()) } @@ -257,7 +260,7 @@ func (this *Cli) DisConnect() { } }() if this != nil && this.Connect != nil { - this.Connect.Client.Transport.Close() + this.Connect.Close() } } @@ -271,7 +274,7 @@ func (this *Cli) Ack(ab *TimAckBean) { this.Sync.Lock() defer this.Sync.Unlock() if this != nil && this.Connect != nil && this.Flow == AUTH { - this.Connect.Client.TimAck(ab) + this.Connect.Client.TimAck(context.Background(), ab) } } @@ -284,7 +287,7 @@ func (this *Cli) Close() { }() if this != nil && this.Connect != nil { this.Flow = CLOSE - this.Connect.Client.Transport.Close() + this.Connect.Close() } } @@ -323,7 +326,7 @@ func (this *Cli) Ping() { logger.Debug("client ping>>>>>>>>>>>>>>>>>") this.Sync.Lock() defer this.Sync.Unlock() - err = this.Connect.Client.TimPing(fmt.Sprint(currentTimeMillis())) + err = this.Connect.Client.TimPing(context.Background(), fmt.Sprint(currentTimeMillis())) logger.Debug("client ping<<<<<<<<<<<<<<<<<") return }() @@ -352,12 +355,12 @@ func (this *Cli) Login() (err error) { fmt.Fprintln(os.Stderr, "error resolving address:", err) return } - useTransport := transportFactory.GetTransport(transport) + useTransport, _ := transportFactory.GetTransport(transport) timclient := NewITimClientFactory(useTransport, protocolFactory) if this.Connect != nil { this.Connect.Close() } - this.Connect = &Connect{FlowConnect: CONNECT_START} + this.Connect = &Connect{FlowConnect: CONNECT_START, ts: transport} this.Connect.setITimClient(timclient) this.Connect.Super = this if err = transport.Open(); err != nil { @@ -369,7 +372,7 @@ func (this *Cli) Login() (err error) { tid := new(Tid) resource := "goclient" tid.Domain, tid.Resource, tid.Name = this.Domain, &resource, this.Name - err = timclient.TimLogin(tid, this.Pwd) + err = timclient.TimLogin(context.Background(), tid, this.Pwd) if err != nil { logger.Error("cluster login err", err) this.ReConnLimit++ @@ -396,7 +399,7 @@ func (this *Connect) processor(processorchan chan int) { handler := new(TimImpl) // handler.Client = this.Super processor := NewITimProcessor(handler) - protocol := thrift.NewTCompactProtocol(this.Client.Transport) + protocol := thrift.NewTCompactProtocol(this.ts) for { if this == nil || this.FlowConnect == CONNECT_STOP { break @@ -405,7 +408,7 @@ func (this *Connect) processor(processorchan chan int) { this.FlowConnect = CONNECT_RUN processorchan <- 1 } - b, err := processor.Process(protocol, protocol) + b, err := processor.Process(context.Background(), protocol, protocol) if err != nil && !b { logger.Error("cluster processor error:", err.Error()) break diff --git a/tim.client/clientTimImpl.go b/client/clientTimImpl.go similarity index 66% rename from tim.client/clientTimImpl.go rename to client/clientTimImpl.go index 4829f75..61e1ae6 100644 --- a/tim.client/clientTimImpl.go +++ b/client/clientTimImpl.go @@ -4,17 +4,17 @@ package client import ( + "context" "errors" "fmt" - // "time" - // "runtime/debug" + + . "tim/common" + "tim/daoService" + . "tim/protocol" + "tim/route" + "tim/utils" "github.com/donnie4w/go-logger/logger" - . "tim.common" - "tim.daoService" - . "tim.protocol" - "tim.route" - "tim.utils" ) type TimImpl struct { @@ -25,100 +25,87 @@ type TimImpl struct { // Parameters: // - Param -func (this *TimImpl) TimStream(param *TimParam) (err error) { +func (this *TimImpl) TimStream(ctx context.Context, param *TimParam) (err error) { panic("error") - return } -func (this *TimImpl) TimStarttls() (err error) { +func (this *TimImpl) TimStarttls(ctx context.Context) (err error) { panic("error") - return } // Parameters: // - Tid // - Pwd -func (this *TimImpl) TimLogin(tid *Tid, pwd string) (err error) { +func (this *TimImpl) TimLogin(ctx context.Context, tid *Tid, pwd string) (err error) { logger.Debug("Login:", tid, pwd) panic("error") - return } // Parameters: // - Ab -func (this *TimImpl) TimAck(ab *TimAckBean) (err error) { +func (this *TimImpl) TimAck(ctx context.Context, ab *TimAckBean) (err error) { logger.Debug("TimAck=========>", ab) panic("error") - return } // Parameters: // - Pbean -func (this *TimImpl) TimPresence(pbean *TimPBean) (err error) { +func (this *TimImpl) TimPresence(ctx context.Context, pbean *TimPBean) (err error) { logger.Debug(pbean) panic("error") - return } // Parameters: // - Mbean -func (this *TimImpl) TimMessage(mbean *TimMBean) (err error) { +func (this *TimImpl) TimMessage(ctx context.Context, mbean *TimMBean) (err error) { logger.Debug(mbean) panic("error") - return } // Parameters: // - ThreadId -func (this *TimImpl) TimPing(threadId string) (err error) { +func (this *TimImpl) TimPing(ctx context.Context, threadId string) (err error) { panic("error") - return } // Parameters: // - E -func (this *TimImpl) TimError(e *TimError) (err error) { +func (this *TimImpl) TimError(ctx context.Context, e *TimError) (err error) { panic("error") - return } -func (this *TimImpl) TimLogout() (err error) { +func (this *TimImpl) TimLogout(ctx context.Context) (err error) { panic("error") - return } // Parameters: // - Tid // - Pwd -func (this *TimImpl) TimRegist(tid *Tid, pwd string) (err error) { +func (this *TimImpl) TimRegist(ctx context.Context, tid *Tid, pwd string) (err error) { panic("error") - return } // Parameters: // - Tid // - Pwd -func (this *TimImpl) TimRemoteUserAuth(tid *Tid, pwd string, auth *TimAuth) (r *TimRemoteUserBean, err error) { +func (this *TimImpl) TimRemoteUserAuth(ctx context.Context, id *Tid, pwd string, auth *TimAuth) (r *TimRemoteUserBean, err error) { panic("error") - return } // Parameters: // - Tid -func (this *TimImpl) TimRemoteUserGet(tid *Tid, auth *TimAuth) (r *TimRemoteUserBean, err error) { +func (this *TimImpl) TimRemoteUserGet(ctx context.Context, tid *Tid, auth *TimAuth) (r *TimRemoteUserBean, err error) { panic("error") - return } // Parameters: // - Tid // - Ub -func (this *TimImpl) TimRemoteUserEdit(tid *Tid, ub *TimUserBean, auth *TimAuth) (r *TimRemoteUserBean, err error) { +func (this *TimImpl) TimRemoteUserEdit(ctx context.Context, tid *Tid, ub *TimUserBean, auth *TimAuth) (r *TimRemoteUserBean, err error) { panic("error") - return } // Parameters: // - Pbean -func (this *TimImpl) TimResponsePresence(pbean *TimPBean, auth *TimAuth) (r *TimResponseBean, err error) { +func (this *TimImpl) TimResponsePresence(ctx context.Context, pbean *TimPBean, auth *TimAuth) (r *TimResponseBean, err error) { logger.Debug("TimResponsePresence", pbean, auth) if !checkAuth(auth) { err = errors.New(fmt.Sprint("cluster auth fail:", auth)) @@ -144,7 +131,7 @@ func _TimResponsePresence(pbean *TimPBean, auth *TimAuth) (r *TimResponseBean, e // Parameters: // - Mbean -func (this *TimImpl) TimResponseMessage(mbean *TimMBean, auth *TimAuth) (r *TimResponseBean, err error) { +func (this *TimImpl) TimResponseMessage(ctx context.Context, mbean *TimMBean, auth *TimAuth) (r *TimResponseBean, err error) { logger.Debug("TimResponseMessage", mbean, auth) if !checkAuth(auth) { err = errors.New(fmt.Sprint("cluster auth fail:", auth)) @@ -184,24 +171,21 @@ func _TimResponseMessage(mbean *TimMBean, auth *TimAuth) (r *TimResponseBean, er return } -func (this *TimImpl) TimMessageIq(timMsgIq *TimMessageIq, iqType string) (err error) { +func (this *TimImpl) TimMessageIq(ctx context.Context, timMsgIq *TimMessageIq, iqType string) (err error) { logger.Debug("TimMessageIq:", timMsgIq, " ", iqType) panic("error") - return } // Parameters: // - Mbean -func (this *TimImpl) TimMessageResult_(mbean *TimMBean) (err error) { +func (this *TimImpl) TimMessageResult_(ctx context.Context, mbean *TimMBean) (err error) { logger.Debug("TimMessageResult_:", mbean) panic("error") - return } -func (this *TimImpl) TimRoser(roster *TimRoster) (err error) { +func (this *TimImpl) TimRoser(ctx context.Context, roster *TimRoster) (err error) { logger.Debug("TimRoser:", roster) panic("error") - return } func checkAuth(a *TimAuth) bool { @@ -211,27 +195,24 @@ func checkAuth(a *TimAuth) bool { return false } -func (this *TimImpl) TimResponseMessageIq(timMsgIq *TimMessageIq, iqType string, auth *TimAuth) (r *TimMBeanList, err error) { +func (this *TimImpl) TimResponseMessageIq(ctx context.Context, timMsgIq *TimMessageIq, iqType string, auth *TimAuth) (r *TimMBeanList, err error) { logger.Debug("TimResponseMessageIq:", timMsgIq, iqType, auth) panic("error TimResponseMessageIq") - return } -func (this *TimImpl) TimMessageList(mbeanList *TimMBeanList) (err error) { +func (this *TimImpl) TimMessageList(ctx context.Context, mbeanList *TimMBeanList) (err error) { logger.Debug("TimMessageList:", mbeanList) panic("error TimMessageList") - return } // Parameters: // - PbeanList -func (this *TimImpl) TimPresenceList(pbeanList *TimPBeanList) (err error) { +func (this *TimImpl) TimPresenceList(ctx context.Context, pbeanList *TimPBeanList) (err error) { logger.Debug("TimPresenceList:", pbeanList) panic("error TimPresenceList") - return } -func (this *TimImpl) TimResponsePresenceList(pbeanList *TimPBeanList, auth *TimAuth) (r *TimResponseBean, err error) { +func (this *TimImpl) TimResponsePresenceList(ctx context.Context, pbeanList *TimPBeanList, auth *TimAuth) (r *TimResponseBean, err error) { if !checkAuth(auth) { err = errors.New(fmt.Sprint("cluster TimResponsePresenceList fail:", auth)) return @@ -266,7 +247,7 @@ func _TimResponsePresenceList(pbeanList *TimPBeanList, auth *TimAuth) (r *TimRes // Parameters: // - MbeanList // - Auth -func (this *TimImpl) TimResponseMessageList(mbeanList *TimMBeanList, auth *TimAuth) (r *TimResponseBean, err error) { +func (this *TimImpl) TimResponseMessageList(ctx context.Context, mbeanList *TimMBeanList, auth *TimAuth) (r *TimResponseBean, err error) { if !checkAuth(auth) { err = errors.New(fmt.Sprint("cluster TimResponseMessageList fail:", auth)) return @@ -298,7 +279,7 @@ func _TimResponseMessageList(mbeanList *TimMBeanList, auth *TimAuth) (r *TimResp return } -func (this *TimImpl) TimProperty(tpb *TimPropertyBean) (err error) { +func (this *TimImpl) TimProperty(ctx context.Context, tpb *TimPropertyBean) (err error) { logger.Debug("TimProperty:", tpb) return } diff --git a/tim.cluster/cluster.go b/cluster/cluster.go similarity index 99% rename from tim.cluster/cluster.go rename to cluster/cluster.go index 0ec449b..aff52e1 100644 --- a/tim.cluster/cluster.go +++ b/cluster/cluster.go @@ -13,11 +13,11 @@ import ( "github.com/donnie4w/go-logger/logger" - . "tim.Map" - . "tim.common" - "tim.daoService" - . "tim.protocol" - "tim.utils" + . "tim/Map" + . "tim/common" + "tim/daoService" + . "tim/protocol" + "tim/utils" ) var flag bool = false diff --git a/tim.cluster/clusterProcess.go b/cluster/clusterProcess.go similarity index 96% rename from tim.cluster/clusterProcess.go rename to cluster/clusterProcess.go index 6c6bcf0..152931a 100644 --- a/tim.cluster/clusterProcess.go +++ b/cluster/clusterProcess.go @@ -7,8 +7,8 @@ import ( "sync" "time" - . "tim.Map" - . "tim.clusterClient" + . "tim/Map" + . "tim/clusterClient" ) var MAX_POOL_SIZE int = 100 diff --git a/tim.cluster/redis.go b/cluster/redis.go similarity index 99% rename from tim.cluster/redis.go rename to cluster/redis.go index cf3bba2..cc8a33b 100644 --- a/tim.cluster/redis.go +++ b/cluster/redis.go @@ -8,9 +8,10 @@ import ( "runtime/debug" "time" + . "tim/common" + "github.com/donnie4w/go-logger/logger" "github.com/garyburd/redigo/redis" - . "tim.common" ) var Redis *RedisClient = new(RedisClient) diff --git a/tim.cluster/utils.go b/cluster/utils.go similarity index 100% rename from tim.cluster/utils.go rename to cluster/utils.go diff --git a/tim.clusterClient/clusterClient.go b/clusterClient/clusterClient.go similarity index 78% rename from tim.clusterClient/clusterClient.go rename to clusterClient/clusterClient.go index 170e86e..16fdd9b 100644 --- a/tim.clusterClient/clusterClient.go +++ b/clusterClient/clusterClient.go @@ -1,19 +1,22 @@ package clusterClient import ( + "context" "os" "runtime/debug" "sync" - "git.apache.org/thrift.git/lib/go/thrift" + . "tim/protocol" + + "github.com/apache/thrift/lib/go/thrift" "github.com/donnie4w/go-logger/logger" - . "tim.protocol" ) type ClusterClient struct { timclient *ITimClient lock *sync.RWMutex Weight int + ts *thrift.TSocket } func (this *ClusterClient) Close() { @@ -25,11 +28,19 @@ func (this *ClusterClient) Close() { }() this.Weight = 0 if this.timclient != nil { - this.timclient.Transport.Flush() - this.timclient.Transport.Close() + this.Flush() + this._Close() } } +func (this *ClusterClient) Flush() { + this.ts.Flush(context.Background()) +} + +func (this *ClusterClient) _Close() { + this.ts.Close() +} + func (this *ClusterClient) SendMBean(mbean *TimMBean, auth *TimAuth) (r *TimResponseBean, err error) { defer func() { if err := recover(); err != nil { @@ -39,7 +50,7 @@ func (this *ClusterClient) SendMBean(mbean *TimMBean, auth *TimAuth) (r *TimResp }() this.lock.Lock() defer this.lock.Unlock() - r, err = this.timclient.TimResponseMessage(mbean, auth) + r, err = this.timclient.TimResponseMessage(context.Background(), mbean, auth) return } @@ -52,7 +63,7 @@ func (this *ClusterClient) SendMBeanList(mbeanList *TimMBeanList, auth *TimAuth) }() this.lock.Lock() defer this.lock.Unlock() - r, err = this.timclient.TimResponseMessageList(mbeanList, auth) + r, err = this.timclient.TimResponseMessageList(context.Background(), mbeanList, auth) return } @@ -65,7 +76,7 @@ func (this *ClusterClient) SendPBean(pbean *TimPBean, auth *TimAuth) (r *TimResp }() this.lock.Lock() defer this.lock.Unlock() - r, err = this.timclient.TimResponsePresence(pbean, auth) + r, err = this.timclient.TimResponsePresence(context.Background(), pbean, auth) return } @@ -78,7 +89,7 @@ func (this *ClusterClient) SendPBeanList(pbeanList *TimPBeanList, auth *TimAuth) }() this.lock.Lock() defer this.lock.Unlock() - r, err = this.timclient.TimResponsePresenceList(pbeanList, auth) + r, err = this.timclient.TimResponsePresenceList(context.Background(), pbeanList, auth) return } @@ -97,7 +108,7 @@ func NewClusterClient(addr string) (clusterClient *ClusterClient, err error) { err = er return } - useTransport := transportFactory.GetTransport(transport) + useTransport, _ := transportFactory.GetTransport(transport) timclient := NewITimClientFactory(useTransport, protocolFactory) if er = transport.Open(); er != nil { logger.Error(os.Stderr, "Error opening socket to ", addr, " ", er) diff --git a/tim.clusterRoute/clusterRoute.go b/clusterRoute/clusterRoute.go similarity index 95% rename from tim.clusterRoute/clusterRoute.go rename to clusterRoute/clusterRoute.go index 5728efc..c4d76eb 100644 --- a/tim.clusterRoute/clusterRoute.go +++ b/clusterRoute/clusterRoute.go @@ -8,12 +8,14 @@ import ( "fmt" "runtime/debug" + "tim/cluster" + . "tim/connect" + "tim/daoService" + "tim/route" + + . "tim/protocol" + "github.com/donnie4w/go-logger/logger" - "tim.cluster" - . "tim.connect" - "tim.daoService" - . "tim.protocol" - "tim.route" ) /**********************************************Message***********************************************/ diff --git a/tim.clusterServer/clusterServer.go b/clusterServer/clusterServer.go similarity index 91% rename from tim.clusterServer/clusterServer.go rename to clusterServer/clusterServer.go index f6955ee..a62a874 100644 --- a/tim.clusterServer/clusterServer.go +++ b/clusterServer/clusterServer.go @@ -6,11 +6,12 @@ package clusterServer import ( "fmt" - "git.apache.org/thrift.git/lib/go/thrift" + "tim/client" + . "tim/common" + . "tim/protocol" + + "github.com/apache/thrift/lib/go/thrift" "github.com/donnie4w/go-logger/logger" - "tim.client" - . "tim.common" - . "tim.protocol" ) type Controlloer struct { diff --git a/tim.common/common.go b/common/common.go similarity index 96% rename from tim.common/common.go rename to common/common.go index bc507e7..0d61af6 100644 --- a/tim.common/common.go +++ b/common/common.go @@ -4,7 +4,7 @@ package common import ( - "tim.conf" + "tim/conf" ) /*版本*/ diff --git a/tim.conf/cluster.go b/conf/cluster.go similarity index 94% rename from tim.conf/cluster.go rename to conf/cluster.go index 7845602..a822498 100644 --- a/tim.conf/cluster.go +++ b/conf/cluster.go @@ -45,12 +45,12 @@ func (cb *ClusterBean) Init(filexml string) (b bool) { } xmlconfig, err := os.Open(filexml) if err != nil { - panic(fmt.Sprint("xmlconfig is error:", err.Error())) + logger.Error(fmt.Sprint("xmlconfig is error:", err.Error())) os.Exit(0) } config, err := ioutil.ReadAll(xmlconfig) if err != nil { - panic(fmt.Sprint("config is error:", err.Error())) + logger.Error(fmt.Sprint("config is error:", err.Error())) os.Exit(1) } dom, err := dom4g.LoadByXml(string(config)) diff --git a/tim.conf/conf.go b/conf/conf.go similarity index 96% rename from tim.conf/conf.go rename to conf/conf.go index 3c91698..8fe6500 100644 --- a/tim.conf/conf.go +++ b/conf/conf.go @@ -11,6 +11,7 @@ import ( "strconv" "github.com/donnie4w/dom4g" + "github.com/donnie4w/simplelog/logging" ) /**配置结构对象*/ @@ -144,12 +145,12 @@ func (cf *ConfBean) Init(filexml string) { if isExist(filexml) { xmlconfig, err := os.Open(filexml) if err != nil { - panic(fmt.Sprint("xmlconfig is error:", err.Error())) + logging.Error(fmt.Sprint("xmlconfig is error:", err.Error())) os.Exit(0) } config, err := ioutil.ReadAll(xmlconfig) if err != nil { - panic(fmt.Sprint("config is error:", err.Error())) + logging.Error(fmt.Sprint("config is error:", err.Error())) os.Exit(1) } xmlstr = string(config) diff --git a/tim.conf/conf_test.go b/conf/conf_test.go similarity index 68% rename from tim.conf/conf_test.go rename to conf/conf_test.go index 046b5e2..88e6417 100644 --- a/tim.conf/conf_test.go +++ b/conf/conf_test.go @@ -7,6 +7,6 @@ import ( func Test_init(t *testing.T) { cf := new(ConfBean) - cf.LoadFromXml(`D:\liteIDEspace\tim\src\tim.xml`) + // cf.LoadFromXml(`D:\liteIDEspace\tim\src\tim.xml`) fmt.Println(cf) } diff --git a/tim.connect/timconn.go b/connect/timconn.go similarity index 92% rename from tim.connect/timconn.go rename to connect/timconn.go index a169b51..227c655 100644 --- a/tim.connect/timconn.go +++ b/connect/timconn.go @@ -4,18 +4,21 @@ package connect import ( + "context" "errors" "fmt" "runtime/debug" "sync" "time" + . "tim/FW" + + "github.com/apache/thrift/lib/go/thrift" "github.com/donnie4w/go-logger/logger" - . "tim.FW" - // . "tim.Map" - . "tim.common" - . "tim.protocol" - . "tim.utils" + + . "tim/common" + . "tim/protocol" + . "tim/utils" ) type TimPool struct { @@ -163,6 +166,7 @@ func (t *TimPool) AddConnect(c *TimUser) { } type TimUser struct { + Ts thrift.TTransport UserTid *Tid Client *ITimClient Fw FLOW @@ -214,7 +218,7 @@ func (t *TimUser) SendMBean(mbean *TimMBean) (er error) { if CF.ConfirmAck == 1 { timer := time.NewTicker(3 * time.Second) t.LastSyncThreadId = mbean.GetThreadId() - er = t.Client.TimMessage(mbean) + er = t.Client.TimMessage(context.Background(), mbean) if er == nil { select { case <-timer.C: @@ -230,7 +234,7 @@ func (t *TimUser) SendMBean(mbean *TimMBean) (er error) { logger.Error("sendMBean:", er.Error()) } } else { - er = t.Client.TimMessage(mbean) + er = t.Client.TimMessage(context.Background(), mbean) } if er != nil { t.IsClose = true @@ -259,7 +263,7 @@ func (t *TimUser) SendMBeanList(mbeans []*TimMBean) (er error) { if CF.ConfirmAck == 1 { timer := time.NewTicker(5 * time.Second) t.LastSyncThreadId = mbeanList.GetThreadId() - er = t.Client.TimMessageList(mbeanList) + er = t.Client.TimMessageList(context.Background(), mbeanList) select { case <-timer.C: er = errors.New(fmt.Sprint("send ack overtime:", mbeanList.GetThreadId())) @@ -271,7 +275,7 @@ func (t *TimUser) SendMBeanList(mbeans []*TimMBean) (er error) { } } } else { - er = t.Client.TimMessageList(mbeanList) + er = t.Client.TimMessageList(context.Background(), mbeanList) } if er != nil { t.IsClose = true @@ -290,7 +294,7 @@ func (t *TimUser) Ping() (er error) { }() t.Sync.Lock() defer t.Sync.Unlock() - er = t.Client.TimPing(TimeMills()) + er = t.Client.TimPing(context.Background(), TimeMills()) return } @@ -307,7 +311,7 @@ func (t *TimUser) SendPBean(pbean *TimPBean) (er error) { } t.Sync.Lock() defer t.Sync.Unlock() - er = t.Client.TimPresence(pbean) + er = t.Client.TimPresence(context.Background(), pbean) return } @@ -327,7 +331,7 @@ func (t *TimUser) SendPBeanList(pbean []*TimPBean) (er error) { pbeanList := NewTimPBeanList() pbeanList.ThreadId = TimeMills() pbeanList.TimPBeanList = pbean - er = t.Client.TimPresenceList(pbeanList) + er = t.Client.TimPresenceList(context.Background(), pbeanList) return } @@ -341,7 +345,7 @@ func (t *TimUser) SendAckBean(ackBean *TimAckBean) (er error) { }() t.Sync.Lock() defer t.Sync.Unlock() - er = t.Client.TimAck(ackBean) + er = t.Client.TimAck(context.Background(), ackBean) return } @@ -355,7 +359,7 @@ func (t *TimUser) Close() (er error) { }() t.Sync.Lock() defer t.Sync.Unlock() - er = t.Client.Transport.Close() + er = t.Ts.Close() return } diff --git a/tim.createDao/createDao.go b/createDao/createDao.go similarity index 100% rename from tim.createDao/createDao.go rename to createDao/createDao.go diff --git a/tim.dao/tim_config.go b/dao/tim_config.go similarity index 100% rename from tim.dao/tim_config.go rename to dao/tim_config.go diff --git a/tim.dao/tim_domain.go b/dao/tim_domain.go similarity index 100% rename from tim.dao/tim_domain.go rename to dao/tim_domain.go diff --git a/tim.dao/tim_message.go b/dao/tim_message.go similarity index 100% rename from tim.dao/tim_message.go rename to dao/tim_message.go diff --git a/tim.dao/tim_mucmember.go b/dao/tim_mucmember.go similarity index 100% rename from tim.dao/tim_mucmember.go rename to dao/tim_mucmember.go diff --git a/tim.dao/tim_mucmessage.go b/dao/tim_mucmessage.go similarity index 100% rename from tim.dao/tim_mucmessage.go rename to dao/tim_mucmessage.go diff --git a/tim.dao/tim_mucoffline.go b/dao/tim_mucoffline.go similarity index 100% rename from tim.dao/tim_mucoffline.go rename to dao/tim_mucoffline.go diff --git a/tim.dao/tim_mucroom.go b/dao/tim_mucroom.go similarity index 100% rename from tim.dao/tim_mucroom.go rename to dao/tim_mucroom.go diff --git a/tim.dao/tim_offline.go b/dao/tim_offline.go similarity index 100% rename from tim.dao/tim_offline.go rename to dao/tim_offline.go diff --git a/tim.dao/tim_property.go b/dao/tim_property.go similarity index 100% rename from tim.dao/tim_property.go rename to dao/tim_property.go diff --git a/tim.dao/tim_roster.go b/dao/tim_roster.go similarity index 100% rename from tim.dao/tim_roster.go rename to dao/tim_roster.go diff --git a/tim.dao/tim_user.go b/dao/tim_user.go similarity index 100% rename from tim.dao/tim_user.go rename to dao/tim_user.go diff --git a/tim.daoService/daoservice.go b/daoService/daoservice.go similarity index 97% rename from tim.daoService/daoservice.go rename to daoService/daoservice.go index d1320a8..33c48f3 100644 --- a/tim.daoService/daoservice.go +++ b/daoService/daoservice.go @@ -4,6 +4,7 @@ package daoService import ( + "context" "errors" "fmt" "runtime/debug" @@ -11,23 +12,25 @@ import ( "strings" "time" - "git.apache.org/thrift.git/lib/go/thrift" + "github.com/apache/thrift/lib/go/thrift" "database/sql" "sync" + "tim/DB" + "tim/base64Util" + . "tim/common" + "tim/connect" + "tim/dao" + "tim/hbase" + "tim/hbaseService" + . "tim/protocol" + "tim/utils" + + . "tim/Map" + "github.com/donnie4w/gdao" "github.com/donnie4w/go-logger/logger" - "tim.DB" - . "tim.Map" - "tim.base64Util" - . "tim.common" - "tim.connect" - "tim.dao" - "tim.hbase" - "tim.hbaseService" - . "tim.protocol" - "tim.utils" ) var authProviderDB *sql.DB @@ -99,7 +102,7 @@ func _saveOfflineMBean(mbean *TimMBean) { tim_offline.SetStamp(utils.TimeMills()) mbean.Offline = NewTimTime() mbean.Offline.Timestamp = mbean.Timestamp - stanza, _ := thrift.NewTSerializer().Write(mbean) + stanza, _ := thrift.NewTSerializer().Write(context.Background(), mbean) base64string := base64Util.Base64Encode(stanza) length := len([]byte(base64string)) tim_offline.SetStanza(base64string) @@ -158,7 +161,7 @@ func _LoadOfflineMBean(tid *Tid) (mbeans []*TimMBean) { var timmbean *TimMBean = NewTimMBean() bb, er := base64Util.Base64Decode(of.GetStanza()) if er == nil { - thrift.NewTDeserializer().Read(timmbean, []byte(bb)) + thrift.NewTDeserializer().Read(context.Background(), timmbean, []byte(bb)) mbeans = append(mbeans, timmbean) } else { logger.Error("Base64Decode:", er) @@ -210,7 +213,7 @@ func _LoadOfflineMucMBean(tid *Tid) (mbeans []*TimMBean) { var timmbean *TimMBean = NewTimMBean() bb, er := base64Util.Base64Decode(mucmsg.GetStanza()) if er == nil { - thrift.NewTDeserializer().Read(timmbean, []byte(bb)) + thrift.NewTDeserializer().Read(context.Background(), timmbean, []byte(bb)) mbeans = append(mbeans, timmbean) } else { logger.Error("Base64Decode:", er) @@ -516,7 +519,7 @@ func _saveMBean(mbean *TimMBean, small, large int) (mid string, timestamp string message.SetTouser(toname) message.SetSmall(int64(small)) message.SetLarge(int64(large)) - stanza, _ := thrift.NewTSerializer().Write(mbean) + stanza, _ := thrift.NewTSerializer().Write(context.Background(), mbean) stanzastr := string(base64Util.Base64Encode(stanza)) message.SetStanza(stanzastr) message.Insert() @@ -558,7 +561,7 @@ func _SaveMucMBean(mbean *TimMBean) (mid string, err error) { tim_mucmessage.SetRoomtidname(mbean.GetFromTid().GetName()) tim_mucmessage.SetDomain(mbean.GetLeaguerTid().GetDomain()) tim_mucmessage.SetMsgtype(int64(mbean.GetMsgType())) - stanza, _ := thrift.NewTSerializer().Write(mbean) + stanza, _ := thrift.NewTSerializer().Write(context.Background(), mbean) stanzastr := string(base64Util.Base64Encode(stanza)) tim_mucmessage.SetStanza(stanzastr) tim_mucmessage.SetCreatetime(utils.NowTime()) @@ -715,7 +718,7 @@ func _LoadMBean(fidname, tidname, domain string, fromstamp, tostamp *string, lim tm := new(TimMBean) bb, er := base64Util.Base64Decode(msg.GetStanza()) if er == nil { - thrift.NewTDeserializer().Read(tm, bb) + thrift.NewTDeserializer().Read(context.Background(), tm, bb) mid := fmt.Sprint(msg.GetId()) tm.Mid = &mid tms = append(tms, tm) diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..a648e5d --- /dev/null +++ b/go.mod @@ -0,0 +1,13 @@ +module tim + +go 1.18 + +require ( + github.com/apache/thrift v0.17.0 + github.com/donnie4w/dom4g v0.0.0-20161128195229-fc6d4f1a3116 + github.com/donnie4w/gdao v0.0.0-20171119195027-08940c89571a + github.com/donnie4w/go-logger v0.0.0-20170827050443-4740c51383f4 + github.com/donnie4w/simplelog v0.0.0-20230210080929-accaa0195aad + github.com/garyburd/redigo v1.6.4 + github.com/go-sql-driver/mysql v1.7.0 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..1fdb48d --- /dev/null +++ b/go.sum @@ -0,0 +1,14 @@ +github.com/apache/thrift v0.17.0 h1:cMd2aj52n+8VoAtvSvLn4kDC3aZ6IAkBuqWQ2IDu7wo= +github.com/apache/thrift v0.17.0/go.mod h1:OLxhMRJxomX+1I/KUw03qoV3mMz16BwaKI+d4fPBx7Q= +github.com/donnie4w/dom4g v0.0.0-20161128195229-fc6d4f1a3116 h1:9mjV8gVXv6ist3mcI9PHSyz1gbLrz5fILUpQXPTKZo0= +github.com/donnie4w/dom4g v0.0.0-20161128195229-fc6d4f1a3116/go.mod h1:U75amtm/v1KFYxQXQlzbmWic+fHabP/o8Mgac1DiZbc= +github.com/donnie4w/gdao v0.0.0-20171119195027-08940c89571a h1:ps6uhttzM+7DvFwe1iSOR2Dv/GscH0J2BuOnEoUrMKQ= +github.com/donnie4w/gdao v0.0.0-20171119195027-08940c89571a/go.mod h1:JGaaklpLSOEva79hyqdQSJdFaq3dgW4VNytIPAGvRhg= +github.com/donnie4w/go-logger v0.0.0-20170827050443-4740c51383f4 h1:T9PR91sjTtrA1HmZB4G+M7OLCelch0f6rIEY7Mm1T4U= +github.com/donnie4w/go-logger v0.0.0-20170827050443-4740c51383f4/go.mod h1:L7S4x0R7vv3xoOhGuyAJyCO2MYzWOpccM4Isn8jIUgY= +github.com/donnie4w/simplelog v0.0.0-20230210080929-accaa0195aad h1:v757f6hY5JagHijogLdT/gaI6dYz4HlxTu2+I+tcTnY= +github.com/donnie4w/simplelog v0.0.0-20230210080929-accaa0195aad/go.mod h1:UNoDOR7K08td8Lgvxb46ViOoFPcbFqt0Fi3bkC8fKx4= +github.com/garyburd/redigo v1.6.4 h1:LFu2R3+ZOPgSMWMOL+saa/zXRjw0ID2G8FepO53BGlg= +github.com/garyburd/redigo v1.6.4/go.mod h1:rTb6epsqigu3kYKBnaF028A7Tf/Aw5s0cqA47doKKqw= +github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc= +github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= diff --git a/tim.hbase/client_test.go b/hbase/client_test.go similarity index 99% rename from tim.hbase/client_test.go rename to hbase/client_test.go index f01ada9..a777fff 100644 --- a/tim.hbase/client_test.go +++ b/hbase/client_test.go @@ -7,8 +7,9 @@ import ( "fmt" "testing" + "tim/utils" + "github.com/donnie4w/go-logger/logger" - "tim.utils" ) func TestClient(t *testing.T) { diff --git a/tim.hbase/constants.go b/hbase/constants.go similarity index 87% rename from tim.hbase/constants.go rename to hbase/constants.go index e6085f5..22c26ca 100644 --- a/tim.hbase/constants.go +++ b/hbase/constants.go @@ -6,7 +6,7 @@ package hbase import ( "bytes" "fmt" - "git.apache.org/thrift.git/lib/go/thrift" + "github.com/apache/thrift/lib/go/thrift" ) // (needed to ensure safety because of naive import list construction.) diff --git a/hbase/hbase-consts.go b/hbase/hbase-consts.go new file mode 100644 index 0000000..39c64f2 --- /dev/null +++ b/hbase/hbase-consts.go @@ -0,0 +1,25 @@ +// Code generated by Thrift Compiler (0.17.0). DO NOT EDIT. + +package hbase + +import ( + "bytes" + "context" + "errors" + "fmt" + "time" + thrift "github.com/apache/thrift/lib/go/thrift" +) + +// (needed to ensure safety because of naive import list construction.) +var _ = thrift.ZERO +var _ = fmt.Printf +var _ = errors.New +var _ = context.Background +var _ = time.Now +var _ = bytes.Equal + + +func init() { +} + diff --git a/hbase/hbase.go b/hbase/hbase.go new file mode 100644 index 0000000..f43ca65 --- /dev/null +++ b/hbase/hbase.go @@ -0,0 +1,29941 @@ +// Code generated by Thrift Compiler (0.17.0). DO NOT EDIT. + +package hbase + +import ( + "bytes" + "context" + "database/sql/driver" + "errors" + "fmt" + "time" + thrift "github.com/apache/thrift/lib/go/thrift" +) + +// (needed to ensure safety because of naive import list construction.) +var _ = thrift.ZERO +var _ = fmt.Printf +var _ = errors.New +var _ = context.Background +var _ = time.Now +var _ = bytes.Equal + +//Specify type of delete: +// - DELETE_COLUMN means exactly one version will be removed, +// - DELETE_COLUMNS means previous versions will also be removed. +type TDeleteType int64 +const ( + TDeleteType_DELETE_COLUMN TDeleteType = 0 + TDeleteType_DELETE_COLUMNS TDeleteType = 1 + TDeleteType_DELETE_FAMILY TDeleteType = 2 + TDeleteType_DELETE_FAMILY_VERSION TDeleteType = 3 +) + +func (p TDeleteType) String() string { + switch p { + case TDeleteType_DELETE_COLUMN: return "DELETE_COLUMN" + case TDeleteType_DELETE_COLUMNS: return "DELETE_COLUMNS" + case TDeleteType_DELETE_FAMILY: return "DELETE_FAMILY" + case TDeleteType_DELETE_FAMILY_VERSION: return "DELETE_FAMILY_VERSION" + } + return "" +} + +func TDeleteTypeFromString(s string) (TDeleteType, error) { + switch s { + case "DELETE_COLUMN": return TDeleteType_DELETE_COLUMN, nil + case "DELETE_COLUMNS": return TDeleteType_DELETE_COLUMNS, nil + case "DELETE_FAMILY": return TDeleteType_DELETE_FAMILY, nil + case "DELETE_FAMILY_VERSION": return TDeleteType_DELETE_FAMILY_VERSION, nil + } + return TDeleteType(0), fmt.Errorf("not a valid TDeleteType string") +} + + +func TDeleteTypePtr(v TDeleteType) *TDeleteType { return &v } + +func (p TDeleteType) MarshalText() ([]byte, error) { +return []byte(p.String()), nil +} + +func (p *TDeleteType) UnmarshalText(text []byte) error { +q, err := TDeleteTypeFromString(string(text)) +if (err != nil) { +return err +} +*p = q +return nil +} + +func (p *TDeleteType) Scan(value interface{}) error { +v, ok := value.(int64) +if !ok { +return errors.New("Scan value is not int64") +} +*p = TDeleteType(v) +return nil +} + +func (p * TDeleteType) Value() (driver.Value, error) { + if p == nil { + return nil, nil + } +return int64(*p), nil +} +//Specify Durability: +// - SKIP_WAL means do not write the Mutation to the WAL. +// - ASYNC_WAL means write the Mutation to the WAL asynchronously, +// - SYNC_WAL means write the Mutation to the WAL synchronously, +// - FSYNC_WAL means Write the Mutation to the WAL synchronously and force the entries to disk. +type TDurability int64 +const ( + TDurability_USE_DEFAULT TDurability = 0 + TDurability_SKIP_WAL TDurability = 1 + TDurability_ASYNC_WAL TDurability = 2 + TDurability_SYNC_WAL TDurability = 3 + TDurability_FSYNC_WAL TDurability = 4 +) + +func (p TDurability) String() string { + switch p { + case TDurability_USE_DEFAULT: return "USE_DEFAULT" + case TDurability_SKIP_WAL: return "SKIP_WAL" + case TDurability_ASYNC_WAL: return "ASYNC_WAL" + case TDurability_SYNC_WAL: return "SYNC_WAL" + case TDurability_FSYNC_WAL: return "FSYNC_WAL" + } + return "" +} + +func TDurabilityFromString(s string) (TDurability, error) { + switch s { + case "USE_DEFAULT": return TDurability_USE_DEFAULT, nil + case "SKIP_WAL": return TDurability_SKIP_WAL, nil + case "ASYNC_WAL": return TDurability_ASYNC_WAL, nil + case "SYNC_WAL": return TDurability_SYNC_WAL, nil + case "FSYNC_WAL": return TDurability_FSYNC_WAL, nil + } + return TDurability(0), fmt.Errorf("not a valid TDurability string") +} + + +func TDurabilityPtr(v TDurability) *TDurability { return &v } + +func (p TDurability) MarshalText() ([]byte, error) { +return []byte(p.String()), nil +} + +func (p *TDurability) UnmarshalText(text []byte) error { +q, err := TDurabilityFromString(string(text)) +if (err != nil) { +return err +} +*p = q +return nil +} + +func (p *TDurability) Scan(value interface{}) error { +v, ok := value.(int64) +if !ok { +return errors.New("Scan value is not int64") +} +*p = TDurability(v) +return nil +} + +func (p * TDurability) Value() (driver.Value, error) { + if p == nil { + return nil, nil + } +return int64(*p), nil +} +//Specify Consistency: +// - STRONG means reads only from primary region +// - TIMELINE means reads might return values from secondary region replicas +type TConsistency int64 +const ( + TConsistency_STRONG TConsistency = 1 + TConsistency_TIMELINE TConsistency = 2 +) + +func (p TConsistency) String() string { + switch p { + case TConsistency_STRONG: return "STRONG" + case TConsistency_TIMELINE: return "TIMELINE" + } + return "" +} + +func TConsistencyFromString(s string) (TConsistency, error) { + switch s { + case "STRONG": return TConsistency_STRONG, nil + case "TIMELINE": return TConsistency_TIMELINE, nil + } + return TConsistency(0), fmt.Errorf("not a valid TConsistency string") +} + + +func TConsistencyPtr(v TConsistency) *TConsistency { return &v } + +func (p TConsistency) MarshalText() ([]byte, error) { +return []byte(p.String()), nil +} + +func (p *TConsistency) UnmarshalText(text []byte) error { +q, err := TConsistencyFromString(string(text)) +if (err != nil) { +return err +} +*p = q +return nil +} + +func (p *TConsistency) Scan(value interface{}) error { +v, ok := value.(int64) +if !ok { +return errors.New("Scan value is not int64") +} +*p = TConsistency(v) +return nil +} + +func (p * TConsistency) Value() (driver.Value, error) { + if p == nil { + return nil, nil + } +return int64(*p), nil +} +type TReadType int64 +const ( + TReadType_DEFAULT TReadType = 1 + TReadType_STREAM TReadType = 2 + TReadType_PREAD TReadType = 3 +) + +func (p TReadType) String() string { + switch p { + case TReadType_DEFAULT: return "DEFAULT" + case TReadType_STREAM: return "STREAM" + case TReadType_PREAD: return "PREAD" + } + return "" +} + +func TReadTypeFromString(s string) (TReadType, error) { + switch s { + case "DEFAULT": return TReadType_DEFAULT, nil + case "STREAM": return TReadType_STREAM, nil + case "PREAD": return TReadType_PREAD, nil + } + return TReadType(0), fmt.Errorf("not a valid TReadType string") +} + + +func TReadTypePtr(v TReadType) *TReadType { return &v } + +func (p TReadType) MarshalText() ([]byte, error) { +return []byte(p.String()), nil +} + +func (p *TReadType) UnmarshalText(text []byte) error { +q, err := TReadTypeFromString(string(text)) +if (err != nil) { +return err +} +*p = q +return nil +} + +func (p *TReadType) Scan(value interface{}) error { +v, ok := value.(int64) +if !ok { +return errors.New("Scan value is not int64") +} +*p = TReadType(v) +return nil +} + +func (p * TReadType) Value() (driver.Value, error) { + if p == nil { + return nil, nil + } +return int64(*p), nil +} +//Thrift wrapper around +//org.apache.hadoop.hbase.filter.CompareFilter$CompareOp. +type TCompareOp int64 +const ( + TCompareOp_LESS TCompareOp = 0 + TCompareOp_LESS_OR_EQUAL TCompareOp = 1 + TCompareOp_EQUAL TCompareOp = 2 + TCompareOp_NOT_EQUAL TCompareOp = 3 + TCompareOp_GREATER_OR_EQUAL TCompareOp = 4 + TCompareOp_GREATER TCompareOp = 5 + TCompareOp_NO_OP TCompareOp = 6 +) + +func (p TCompareOp) String() string { + switch p { + case TCompareOp_LESS: return "LESS" + case TCompareOp_LESS_OR_EQUAL: return "LESS_OR_EQUAL" + case TCompareOp_EQUAL: return "EQUAL" + case TCompareOp_NOT_EQUAL: return "NOT_EQUAL" + case TCompareOp_GREATER_OR_EQUAL: return "GREATER_OR_EQUAL" + case TCompareOp_GREATER: return "GREATER" + case TCompareOp_NO_OP: return "NO_OP" + } + return "" +} + +func TCompareOpFromString(s string) (TCompareOp, error) { + switch s { + case "LESS": return TCompareOp_LESS, nil + case "LESS_OR_EQUAL": return TCompareOp_LESS_OR_EQUAL, nil + case "EQUAL": return TCompareOp_EQUAL, nil + case "NOT_EQUAL": return TCompareOp_NOT_EQUAL, nil + case "GREATER_OR_EQUAL": return TCompareOp_GREATER_OR_EQUAL, nil + case "GREATER": return TCompareOp_GREATER, nil + case "NO_OP": return TCompareOp_NO_OP, nil + } + return TCompareOp(0), fmt.Errorf("not a valid TCompareOp string") +} + + +func TCompareOpPtr(v TCompareOp) *TCompareOp { return &v } + +func (p TCompareOp) MarshalText() ([]byte, error) { +return []byte(p.String()), nil +} + +func (p *TCompareOp) UnmarshalText(text []byte) error { +q, err := TCompareOpFromString(string(text)) +if (err != nil) { +return err +} +*p = q +return nil +} + +func (p *TCompareOp) Scan(value interface{}) error { +v, ok := value.(int64) +if !ok { +return errors.New("Scan value is not int64") +} +*p = TCompareOp(v) +return nil +} + +func (p * TCompareOp) Value() (driver.Value, error) { + if p == nil { + return nil, nil + } +return int64(*p), nil +} +//Thrift wrapper around +//org.apache.hadoop.hbase.regionserver.BloomType +type TBloomFilterType int64 +const ( + TBloomFilterType_NONE TBloomFilterType = 0 + TBloomFilterType_ROW TBloomFilterType = 1 + TBloomFilterType_ROWCOL TBloomFilterType = 2 + TBloomFilterType_ROWPREFIX_FIXED_LENGTH TBloomFilterType = 3 +) + +func (p TBloomFilterType) String() string { + switch p { + case TBloomFilterType_NONE: return "NONE" + case TBloomFilterType_ROW: return "ROW" + case TBloomFilterType_ROWCOL: return "ROWCOL" + case TBloomFilterType_ROWPREFIX_FIXED_LENGTH: return "ROWPREFIX_FIXED_LENGTH" + } + return "" +} + +func TBloomFilterTypeFromString(s string) (TBloomFilterType, error) { + switch s { + case "NONE": return TBloomFilterType_NONE, nil + case "ROW": return TBloomFilterType_ROW, nil + case "ROWCOL": return TBloomFilterType_ROWCOL, nil + case "ROWPREFIX_FIXED_LENGTH": return TBloomFilterType_ROWPREFIX_FIXED_LENGTH, nil + } + return TBloomFilterType(0), fmt.Errorf("not a valid TBloomFilterType string") +} + + +func TBloomFilterTypePtr(v TBloomFilterType) *TBloomFilterType { return &v } + +func (p TBloomFilterType) MarshalText() ([]byte, error) { +return []byte(p.String()), nil +} + +func (p *TBloomFilterType) UnmarshalText(text []byte) error { +q, err := TBloomFilterTypeFromString(string(text)) +if (err != nil) { +return err +} +*p = q +return nil +} + +func (p *TBloomFilterType) Scan(value interface{}) error { +v, ok := value.(int64) +if !ok { +return errors.New("Scan value is not int64") +} +*p = TBloomFilterType(v) +return nil +} + +func (p * TBloomFilterType) Value() (driver.Value, error) { + if p == nil { + return nil, nil + } +return int64(*p), nil +} +//Thrift wrapper around +//org.apache.hadoop.hbase.io.compress.Algorithm +type TCompressionAlgorithm int64 +const ( + TCompressionAlgorithm_LZO TCompressionAlgorithm = 0 + TCompressionAlgorithm_GZ TCompressionAlgorithm = 1 + TCompressionAlgorithm_NONE TCompressionAlgorithm = 2 + TCompressionAlgorithm_SNAPPY TCompressionAlgorithm = 3 + TCompressionAlgorithm_LZ4 TCompressionAlgorithm = 4 + TCompressionAlgorithm_BZIP2 TCompressionAlgorithm = 5 + TCompressionAlgorithm_ZSTD TCompressionAlgorithm = 6 +) + +func (p TCompressionAlgorithm) String() string { + switch p { + case TCompressionAlgorithm_LZO: return "LZO" + case TCompressionAlgorithm_GZ: return "GZ" + case TCompressionAlgorithm_NONE: return "NONE" + case TCompressionAlgorithm_SNAPPY: return "SNAPPY" + case TCompressionAlgorithm_LZ4: return "LZ4" + case TCompressionAlgorithm_BZIP2: return "BZIP2" + case TCompressionAlgorithm_ZSTD: return "ZSTD" + } + return "" +} + +func TCompressionAlgorithmFromString(s string) (TCompressionAlgorithm, error) { + switch s { + case "LZO": return TCompressionAlgorithm_LZO, nil + case "GZ": return TCompressionAlgorithm_GZ, nil + case "NONE": return TCompressionAlgorithm_NONE, nil + case "SNAPPY": return TCompressionAlgorithm_SNAPPY, nil + case "LZ4": return TCompressionAlgorithm_LZ4, nil + case "BZIP2": return TCompressionAlgorithm_BZIP2, nil + case "ZSTD": return TCompressionAlgorithm_ZSTD, nil + } + return TCompressionAlgorithm(0), fmt.Errorf("not a valid TCompressionAlgorithm string") +} + + +func TCompressionAlgorithmPtr(v TCompressionAlgorithm) *TCompressionAlgorithm { return &v } + +func (p TCompressionAlgorithm) MarshalText() ([]byte, error) { +return []byte(p.String()), nil +} + +func (p *TCompressionAlgorithm) UnmarshalText(text []byte) error { +q, err := TCompressionAlgorithmFromString(string(text)) +if (err != nil) { +return err +} +*p = q +return nil +} + +func (p *TCompressionAlgorithm) Scan(value interface{}) error { +v, ok := value.(int64) +if !ok { +return errors.New("Scan value is not int64") +} +*p = TCompressionAlgorithm(v) +return nil +} + +func (p * TCompressionAlgorithm) Value() (driver.Value, error) { + if p == nil { + return nil, nil + } +return int64(*p), nil +} +//Thrift wrapper around +//org.apache.hadoop.hbase.io.encoding.DataBlockEncoding +type TDataBlockEncoding int64 +const ( + TDataBlockEncoding_NONE TDataBlockEncoding = 0 + TDataBlockEncoding_PREFIX TDataBlockEncoding = 2 + TDataBlockEncoding_DIFF TDataBlockEncoding = 3 + TDataBlockEncoding_FAST_DIFF TDataBlockEncoding = 4 + TDataBlockEncoding_ROW_INDEX_V1 TDataBlockEncoding = 7 +) + +func (p TDataBlockEncoding) String() string { + switch p { + case TDataBlockEncoding_NONE: return "NONE" + case TDataBlockEncoding_PREFIX: return "PREFIX" + case TDataBlockEncoding_DIFF: return "DIFF" + case TDataBlockEncoding_FAST_DIFF: return "FAST_DIFF" + case TDataBlockEncoding_ROW_INDEX_V1: return "ROW_INDEX_V1" + } + return "" +} + +func TDataBlockEncodingFromString(s string) (TDataBlockEncoding, error) { + switch s { + case "NONE": return TDataBlockEncoding_NONE, nil + case "PREFIX": return TDataBlockEncoding_PREFIX, nil + case "DIFF": return TDataBlockEncoding_DIFF, nil + case "FAST_DIFF": return TDataBlockEncoding_FAST_DIFF, nil + case "ROW_INDEX_V1": return TDataBlockEncoding_ROW_INDEX_V1, nil + } + return TDataBlockEncoding(0), fmt.Errorf("not a valid TDataBlockEncoding string") +} + + +func TDataBlockEncodingPtr(v TDataBlockEncoding) *TDataBlockEncoding { return &v } + +func (p TDataBlockEncoding) MarshalText() ([]byte, error) { +return []byte(p.String()), nil +} + +func (p *TDataBlockEncoding) UnmarshalText(text []byte) error { +q, err := TDataBlockEncodingFromString(string(text)) +if (err != nil) { +return err +} +*p = q +return nil +} + +func (p *TDataBlockEncoding) Scan(value interface{}) error { +v, ok := value.(int64) +if !ok { +return errors.New("Scan value is not int64") +} +*p = TDataBlockEncoding(v) +return nil +} + +func (p * TDataBlockEncoding) Value() (driver.Value, error) { + if p == nil { + return nil, nil + } +return int64(*p), nil +} +//Thrift wrapper around +//org.apache.hadoop.hbase.KeepDeletedCells +type TKeepDeletedCells int64 +const ( + TKeepDeletedCells_FALSE TKeepDeletedCells = 0 + TKeepDeletedCells_TRUE TKeepDeletedCells = 1 + TKeepDeletedCells_TTL TKeepDeletedCells = 2 +) + +func (p TKeepDeletedCells) String() string { + switch p { + case TKeepDeletedCells_FALSE: return "FALSE" + case TKeepDeletedCells_TRUE: return "TRUE" + case TKeepDeletedCells_TTL: return "TTL" + } + return "" +} + +func TKeepDeletedCellsFromString(s string) (TKeepDeletedCells, error) { + switch s { + case "FALSE": return TKeepDeletedCells_FALSE, nil + case "TRUE": return TKeepDeletedCells_TRUE, nil + case "TTL": return TKeepDeletedCells_TTL, nil + } + return TKeepDeletedCells(0), fmt.Errorf("not a valid TKeepDeletedCells string") +} + + +func TKeepDeletedCellsPtr(v TKeepDeletedCells) *TKeepDeletedCells { return &v } + +func (p TKeepDeletedCells) MarshalText() ([]byte, error) { +return []byte(p.String()), nil +} + +func (p *TKeepDeletedCells) UnmarshalText(text []byte) error { +q, err := TKeepDeletedCellsFromString(string(text)) +if (err != nil) { +return err +} +*p = q +return nil +} + +func (p *TKeepDeletedCells) Scan(value interface{}) error { +v, ok := value.(int64) +if !ok { +return errors.New("Scan value is not int64") +} +*p = TKeepDeletedCells(v) +return nil +} + +func (p * TKeepDeletedCells) Value() (driver.Value, error) { + if p == nil { + return nil, nil + } +return int64(*p), nil +} +type TLogType int64 +const ( + TLogType_SLOW_LOG TLogType = 1 + TLogType_LARGE_LOG TLogType = 2 +) + +func (p TLogType) String() string { + switch p { + case TLogType_SLOW_LOG: return "SLOW_LOG" + case TLogType_LARGE_LOG: return "LARGE_LOG" + } + return "" +} + +func TLogTypeFromString(s string) (TLogType, error) { + switch s { + case "SLOW_LOG": return TLogType_SLOW_LOG, nil + case "LARGE_LOG": return TLogType_LARGE_LOG, nil + } + return TLogType(0), fmt.Errorf("not a valid TLogType string") +} + + +func TLogTypePtr(v TLogType) *TLogType { return &v } + +func (p TLogType) MarshalText() ([]byte, error) { +return []byte(p.String()), nil +} + +func (p *TLogType) UnmarshalText(text []byte) error { +q, err := TLogTypeFromString(string(text)) +if (err != nil) { +return err +} +*p = q +return nil +} + +func (p *TLogType) Scan(value interface{}) error { +v, ok := value.(int64) +if !ok { +return errors.New("Scan value is not int64") +} +*p = TLogType(v) +return nil +} + +func (p * TLogType) Value() (driver.Value, error) { + if p == nil { + return nil, nil + } +return int64(*p), nil +} +type TFilterByOperator int64 +const ( + TFilterByOperator_AND TFilterByOperator = 0 + TFilterByOperator_OR TFilterByOperator = 1 +) + +func (p TFilterByOperator) String() string { + switch p { + case TFilterByOperator_AND: return "AND" + case TFilterByOperator_OR: return "OR" + } + return "" +} + +func TFilterByOperatorFromString(s string) (TFilterByOperator, error) { + switch s { + case "AND": return TFilterByOperator_AND, nil + case "OR": return TFilterByOperator_OR, nil + } + return TFilterByOperator(0), fmt.Errorf("not a valid TFilterByOperator string") +} + + +func TFilterByOperatorPtr(v TFilterByOperator) *TFilterByOperator { return &v } + +func (p TFilterByOperator) MarshalText() ([]byte, error) { +return []byte(p.String()), nil +} + +func (p *TFilterByOperator) UnmarshalText(text []byte) error { +q, err := TFilterByOperatorFromString(string(text)) +if (err != nil) { +return err +} +*p = q +return nil +} + +func (p *TFilterByOperator) Scan(value interface{}) error { +v, ok := value.(int64) +if !ok { +return errors.New("Scan value is not int64") +} +*p = TFilterByOperator(v) +return nil +} + +func (p * TFilterByOperator) Value() (driver.Value, error) { + if p == nil { + return nil, nil + } +return int64(*p), nil +} +//Specify type of thrift server: thrift and thrift2 +type TThriftServerType int64 +const ( + TThriftServerType_ONE TThriftServerType = 1 + TThriftServerType_TWO TThriftServerType = 2 +) + +func (p TThriftServerType) String() string { + switch p { + case TThriftServerType_ONE: return "ONE" + case TThriftServerType_TWO: return "TWO" + } + return "" +} + +func TThriftServerTypeFromString(s string) (TThriftServerType, error) { + switch s { + case "ONE": return TThriftServerType_ONE, nil + case "TWO": return TThriftServerType_TWO, nil + } + return TThriftServerType(0), fmt.Errorf("not a valid TThriftServerType string") +} + + +func TThriftServerTypePtr(v TThriftServerType) *TThriftServerType { return &v } + +func (p TThriftServerType) MarshalText() ([]byte, error) { +return []byte(p.String()), nil +} + +func (p *TThriftServerType) UnmarshalText(text []byte) error { +q, err := TThriftServerTypeFromString(string(text)) +if (err != nil) { +return err +} +*p = q +return nil +} + +func (p *TThriftServerType) Scan(value interface{}) error { +v, ok := value.(int64) +if !ok { +return errors.New("Scan value is not int64") +} +*p = TThriftServerType(v) +return nil +} + +func (p * TThriftServerType) Value() (driver.Value, error) { + if p == nil { + return nil, nil + } +return int64(*p), nil +} +// Attributes: +// - MinStamp +// - MaxStamp +type TTimeRange struct { + MinStamp int64 `thrift:"minStamp,1,required" db:"minStamp" json:"minStamp"` + MaxStamp int64 `thrift:"maxStamp,2,required" db:"maxStamp" json:"maxStamp"` +} + +func NewTTimeRange() *TTimeRange { + return &TTimeRange{} +} + + +func (p *TTimeRange) GetMinStamp() int64 { + return p.MinStamp +} + +func (p *TTimeRange) GetMaxStamp() int64 { + return p.MaxStamp +} +func (p *TTimeRange) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetMinStamp bool = false; + var issetMaxStamp bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.I64 { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetMinStamp = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.I64 { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetMaxStamp = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetMinStamp{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MinStamp is not set")); + } + if !issetMaxStamp{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MaxStamp is not set")); + } + return nil +} + +func (p *TTimeRange) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.MinStamp = v +} + return nil +} + +func (p *TTimeRange) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.MaxStamp = v +} + return nil +} + +func (p *TTimeRange) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TTimeRange"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TTimeRange) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "minStamp", thrift.I64, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:minStamp: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.MinStamp)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.minStamp (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:minStamp: ", p), err) } + return err +} + +func (p *TTimeRange) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "maxStamp", thrift.I64, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:maxStamp: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.MaxStamp)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.maxStamp (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:maxStamp: ", p), err) } + return err +} + +func (p *TTimeRange) Equals(other *TTimeRange) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.MinStamp != other.MinStamp { return false } + if p.MaxStamp != other.MaxStamp { return false } + return true +} + +func (p *TTimeRange) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TTimeRange(%+v)", *p) +} + +// Addresses a single cell or multiple cells +// in a HBase table by column family and optionally +// a column qualifier and timestamp +// +// Attributes: +// - Family +// - Qualifier +// - Timestamp +type TColumn struct { + Family []byte `thrift:"family,1,required" db:"family" json:"family"` + Qualifier []byte `thrift:"qualifier,2" db:"qualifier" json:"qualifier,omitempty"` + Timestamp *int64 `thrift:"timestamp,3" db:"timestamp" json:"timestamp,omitempty"` +} + +func NewTColumn() *TColumn { + return &TColumn{} +} + + +func (p *TColumn) GetFamily() []byte { + return p.Family +} +var TColumn_Qualifier_DEFAULT []byte + +func (p *TColumn) GetQualifier() []byte { + return p.Qualifier +} +var TColumn_Timestamp_DEFAULT int64 +func (p *TColumn) GetTimestamp() int64 { + if !p.IsSetTimestamp() { + return TColumn_Timestamp_DEFAULT + } +return *p.Timestamp +} +func (p *TColumn) IsSetQualifier() bool { + return p.Qualifier != nil +} + +func (p *TColumn) IsSetTimestamp() bool { + return p.Timestamp != nil +} + +func (p *TColumn) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetFamily bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetFamily = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.I64 { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetFamily{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Family is not set")); + } + return nil +} + +func (p *TColumn) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Family = v +} + return nil +} + +func (p *TColumn) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Qualifier = v +} + return nil +} + +func (p *TColumn) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Timestamp = &v +} + return nil +} + +func (p *TColumn) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TColumn"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TColumn) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "family", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:family: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Family); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.family (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:family: ", p), err) } + return err +} + +func (p *TColumn) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetQualifier() { + if err := oprot.WriteFieldBegin(ctx, "qualifier", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:qualifier: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Qualifier); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.qualifier (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:qualifier: ", p), err) } + } + return err +} + +func (p *TColumn) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimestamp() { + if err := oprot.WriteFieldBegin(ctx, "timestamp", thrift.I64, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:timestamp: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.Timestamp)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.timestamp (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:timestamp: ", p), err) } + } + return err +} + +func (p *TColumn) Equals(other *TColumn) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if bytes.Compare(p.Family, other.Family) != 0 { return false } + if bytes.Compare(p.Qualifier, other.Qualifier) != 0 { return false } + if p.Timestamp != other.Timestamp { + if p.Timestamp == nil || other.Timestamp == nil { + return false + } + if (*p.Timestamp) != (*other.Timestamp) { return false } + } + return true +} + +func (p *TColumn) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TColumn(%+v)", *p) +} + +// Represents a single cell and its value. +// +// Attributes: +// - Family +// - Qualifier +// - Value +// - Timestamp +// - Tags +// - Type +type TColumnValue struct { + Family []byte `thrift:"family,1,required" db:"family" json:"family"` + Qualifier []byte `thrift:"qualifier,2,required" db:"qualifier" json:"qualifier"` + Value []byte `thrift:"value,3,required" db:"value" json:"value"` + Timestamp *int64 `thrift:"timestamp,4" db:"timestamp" json:"timestamp,omitempty"` + Tags []byte `thrift:"tags,5" db:"tags" json:"tags,omitempty"` + Type *int8 `thrift:"type,6" db:"type" json:"type,omitempty"` +} + +func NewTColumnValue() *TColumnValue { + return &TColumnValue{} +} + + +func (p *TColumnValue) GetFamily() []byte { + return p.Family +} + +func (p *TColumnValue) GetQualifier() []byte { + return p.Qualifier +} + +func (p *TColumnValue) GetValue() []byte { + return p.Value +} +var TColumnValue_Timestamp_DEFAULT int64 +func (p *TColumnValue) GetTimestamp() int64 { + if !p.IsSetTimestamp() { + return TColumnValue_Timestamp_DEFAULT + } +return *p.Timestamp +} +var TColumnValue_Tags_DEFAULT []byte + +func (p *TColumnValue) GetTags() []byte { + return p.Tags +} +var TColumnValue_Type_DEFAULT int8 +func (p *TColumnValue) GetType() int8 { + if !p.IsSetType() { + return TColumnValue_Type_DEFAULT + } +return *p.Type +} +func (p *TColumnValue) IsSetTimestamp() bool { + return p.Timestamp != nil +} + +func (p *TColumnValue) IsSetTags() bool { + return p.Tags != nil +} + +func (p *TColumnValue) IsSetType() bool { + return p.Type != nil +} + +func (p *TColumnValue) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetFamily bool = false; + var issetQualifier bool = false; + var issetValue bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetFamily = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetQualifier = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + issetValue = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.I64 { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.STRING { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.BYTE { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetFamily{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Family is not set")); + } + if !issetQualifier{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Qualifier is not set")); + } + if !issetValue{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Value is not set")); + } + return nil +} + +func (p *TColumnValue) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Family = v +} + return nil +} + +func (p *TColumnValue) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Qualifier = v +} + return nil +} + +func (p *TColumnValue) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Value = v +} + return nil +} + +func (p *TColumnValue) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.Timestamp = &v +} + return nil +} + +func (p *TColumnValue) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) +} else { + p.Tags = v +} + return nil +} + +func (p *TColumnValue) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadByte(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) +} else { + temp := int8(v) + p.Type = &temp +} + return nil +} + +func (p *TColumnValue) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TColumnValue"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TColumnValue) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "family", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:family: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Family); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.family (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:family: ", p), err) } + return err +} + +func (p *TColumnValue) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "qualifier", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:qualifier: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Qualifier); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.qualifier (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:qualifier: ", p), err) } + return err +} + +func (p *TColumnValue) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "value", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:value: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Value); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.value (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:value: ", p), err) } + return err +} + +func (p *TColumnValue) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimestamp() { + if err := oprot.WriteFieldBegin(ctx, "timestamp", thrift.I64, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:timestamp: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.Timestamp)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.timestamp (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:timestamp: ", p), err) } + } + return err +} + +func (p *TColumnValue) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTags() { + if err := oprot.WriteFieldBegin(ctx, "tags", thrift.STRING, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:tags: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Tags); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.tags (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:tags: ", p), err) } + } + return err +} + +func (p *TColumnValue) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetType() { + if err := oprot.WriteFieldBegin(ctx, "type", thrift.BYTE, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:type: ", p), err) } + if err := oprot.WriteByte(ctx, int8(*p.Type)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.type (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:type: ", p), err) } + } + return err +} + +func (p *TColumnValue) Equals(other *TColumnValue) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if bytes.Compare(p.Family, other.Family) != 0 { return false } + if bytes.Compare(p.Qualifier, other.Qualifier) != 0 { return false } + if bytes.Compare(p.Value, other.Value) != 0 { return false } + if p.Timestamp != other.Timestamp { + if p.Timestamp == nil || other.Timestamp == nil { + return false + } + if (*p.Timestamp) != (*other.Timestamp) { return false } + } + if bytes.Compare(p.Tags, other.Tags) != 0 { return false } + if p.Type != other.Type { + if p.Type == nil || other.Type == nil { + return false + } + if (*p.Type) != (*other.Type) { return false } + } + return true +} + +func (p *TColumnValue) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TColumnValue(%+v)", *p) +} + +// Represents a single cell and the amount to increment it by +// +// Attributes: +// - Family +// - Qualifier +// - Amount +type TColumnIncrement struct { + Family []byte `thrift:"family,1,required" db:"family" json:"family"` + Qualifier []byte `thrift:"qualifier,2,required" db:"qualifier" json:"qualifier"` + Amount int64 `thrift:"amount,3" db:"amount" json:"amount"` +} + +func NewTColumnIncrement() *TColumnIncrement { + return &TColumnIncrement{ +Amount: 1, +} +} + + +func (p *TColumnIncrement) GetFamily() []byte { + return p.Family +} + +func (p *TColumnIncrement) GetQualifier() []byte { + return p.Qualifier +} +var TColumnIncrement_Amount_DEFAULT int64 = 1 + +func (p *TColumnIncrement) GetAmount() int64 { + return p.Amount +} +func (p *TColumnIncrement) IsSetAmount() bool { + return p.Amount != TColumnIncrement_Amount_DEFAULT +} + +func (p *TColumnIncrement) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetFamily bool = false; + var issetQualifier bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetFamily = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetQualifier = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.I64 { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetFamily{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Family is not set")); + } + if !issetQualifier{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Qualifier is not set")); + } + return nil +} + +func (p *TColumnIncrement) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Family = v +} + return nil +} + +func (p *TColumnIncrement) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Qualifier = v +} + return nil +} + +func (p *TColumnIncrement) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Amount = v +} + return nil +} + +func (p *TColumnIncrement) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TColumnIncrement"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TColumnIncrement) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "family", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:family: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Family); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.family (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:family: ", p), err) } + return err +} + +func (p *TColumnIncrement) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "qualifier", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:qualifier: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Qualifier); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.qualifier (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:qualifier: ", p), err) } + return err +} + +func (p *TColumnIncrement) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetAmount() { + if err := oprot.WriteFieldBegin(ctx, "amount", thrift.I64, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:amount: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.Amount)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.amount (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:amount: ", p), err) } + } + return err +} + +func (p *TColumnIncrement) Equals(other *TColumnIncrement) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if bytes.Compare(p.Family, other.Family) != 0 { return false } + if bytes.Compare(p.Qualifier, other.Qualifier) != 0 { return false } + if p.Amount != other.Amount { return false } + return true +} + +func (p *TColumnIncrement) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TColumnIncrement(%+v)", *p) +} + +// if no Result is found, row and columnValues will not be set. +// +// Attributes: +// - Row +// - ColumnValues +// - Stale +// - Partial +type TResult_ struct { + Row []byte `thrift:"row,1" db:"row" json:"row,omitempty"` + ColumnValues []*TColumnValue `thrift:"columnValues,2,required" db:"columnValues" json:"columnValues"` + Stale bool `thrift:"stale,3" db:"stale" json:"stale"` + Partial bool `thrift:"partial,4" db:"partial" json:"partial"` +} + +func NewTResult_() *TResult_ { + return &TResult_{} +} + +var TResult__Row_DEFAULT []byte + +func (p *TResult_) GetRow() []byte { + return p.Row +} + +func (p *TResult_) GetColumnValues() []*TColumnValue { + return p.ColumnValues +} +var TResult__Stale_DEFAULT bool = false + +func (p *TResult_) GetStale() bool { + return p.Stale +} +var TResult__Partial_DEFAULT bool = false + +func (p *TResult_) GetPartial() bool { + return p.Partial +} +func (p *TResult_) IsSetRow() bool { + return p.Row != nil +} + +func (p *TResult_) IsSetStale() bool { + return p.Stale != TResult__Stale_DEFAULT +} + +func (p *TResult_) IsSetPartial() bool { + return p.Partial != TResult__Partial_DEFAULT +} + +func (p *TResult_) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetColumnValues bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.LIST { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetColumnValues = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetColumnValues{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ColumnValues is not set")); + } + return nil +} + +func (p *TResult_) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Row = v +} + return nil +} + +func (p *TResult_) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TColumnValue, 0, size) + p.ColumnValues = tSlice + for i := 0; i < size; i ++ { + _elem0 := &TColumnValue{} + if err := _elem0.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem0), err) + } + p.ColumnValues = append(p.ColumnValues, _elem0) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TResult_) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Stale = v +} + return nil +} + +func (p *TResult_) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.Partial = v +} + return nil +} + +func (p *TResult_) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TResult"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TResult_) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetRow() { + if err := oprot.WriteFieldBegin(ctx, "row", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:row: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Row); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.row (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:row: ", p), err) } + } + return err +} + +func (p *TResult_) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "columnValues", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:columnValues: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ColumnValues)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ColumnValues { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:columnValues: ", p), err) } + return err +} + +func (p *TResult_) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetStale() { + if err := oprot.WriteFieldBegin(ctx, "stale", thrift.BOOL, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:stale: ", p), err) } + if err := oprot.WriteBool(ctx, bool(p.Stale)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.stale (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:stale: ", p), err) } + } + return err +} + +func (p *TResult_) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetPartial() { + if err := oprot.WriteFieldBegin(ctx, "partial", thrift.BOOL, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:partial: ", p), err) } + if err := oprot.WriteBool(ctx, bool(p.Partial)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.partial (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:partial: ", p), err) } + } + return err +} + +func (p *TResult_) Equals(other *TResult_) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if bytes.Compare(p.Row, other.Row) != 0 { return false } + if len(p.ColumnValues) != len(other.ColumnValues) { return false } + for i, _tgt := range p.ColumnValues { + _src1 := other.ColumnValues[i] + if !_tgt.Equals(_src1) { return false } + } + if p.Stale != other.Stale { return false } + if p.Partial != other.Partial { return false } + return true +} + +func (p *TResult_) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TResult_(%+v)", *p) +} + +// Attributes: +// - Labels +type TAuthorization struct { + Labels []string `thrift:"labels,1" db:"labels" json:"labels,omitempty"` +} + +func NewTAuthorization() *TAuthorization { + return &TAuthorization{} +} + +var TAuthorization_Labels_DEFAULT []string + +func (p *TAuthorization) GetLabels() []string { + return p.Labels +} +func (p *TAuthorization) IsSetLabels() bool { + return p.Labels != nil +} + +func (p *TAuthorization) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.LIST { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TAuthorization) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]string, 0, size) + p.Labels = tSlice + for i := 0; i < size; i ++ { +var _elem2 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem2 = v +} + p.Labels = append(p.Labels, _elem2) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TAuthorization) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TAuthorization"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TAuthorization) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetLabels() { + if err := oprot.WriteFieldBegin(ctx, "labels", thrift.LIST, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:labels: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Labels)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Labels { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:labels: ", p), err) } + } + return err +} + +func (p *TAuthorization) Equals(other *TAuthorization) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if len(p.Labels) != len(other.Labels) { return false } + for i, _tgt := range p.Labels { + _src3 := other.Labels[i] + if _tgt != _src3 { return false } + } + return true +} + +func (p *TAuthorization) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TAuthorization(%+v)", *p) +} + +// Attributes: +// - Expression +type TCellVisibility struct { + Expression *string `thrift:"expression,1" db:"expression" json:"expression,omitempty"` +} + +func NewTCellVisibility() *TCellVisibility { + return &TCellVisibility{} +} + +var TCellVisibility_Expression_DEFAULT string +func (p *TCellVisibility) GetExpression() string { + if !p.IsSetExpression() { + return TCellVisibility_Expression_DEFAULT + } +return *p.Expression +} +func (p *TCellVisibility) IsSetExpression() bool { + return p.Expression != nil +} + +func (p *TCellVisibility) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TCellVisibility) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Expression = &v +} + return nil +} + +func (p *TCellVisibility) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TCellVisibility"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TCellVisibility) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExpression() { + if err := oprot.WriteFieldBegin(ctx, "expression", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:expression: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Expression)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.expression (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:expression: ", p), err) } + } + return err +} + +func (p *TCellVisibility) Equals(other *TCellVisibility) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Expression != other.Expression { + if p.Expression == nil || other.Expression == nil { + return false + } + if (*p.Expression) != (*other.Expression) { return false } + } + return true +} + +func (p *TCellVisibility) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TCellVisibility(%+v)", *p) +} + +// Used to perform Get operations on a single row. +// +// The scope can be further narrowed down by specifying a list of +// columns or column families. +// +// To get everything for a row, instantiate a Get object with just the row to get. +// To further define the scope of what to get you can add a timestamp or time range +// with an optional maximum number of versions to return. +// +// If you specify a time range and a timestamp the range is ignored. +// Timestamps on TColumns are ignored. +// +// Attributes: +// - Row +// - Columns +// - Timestamp +// - TimeRange +// - MaxVersions +// - FilterString +// - Attributes +// - Authorizations +// - Consistency +// - TargetReplicaId +// - CacheBlocks +// - StoreLimit +// - StoreOffset +// - ExistenceOnly +// - FilterBytes +type TGet struct { + Row []byte `thrift:"row,1,required" db:"row" json:"row"` + Columns []*TColumn `thrift:"columns,2" db:"columns" json:"columns,omitempty"` + Timestamp *int64 `thrift:"timestamp,3" db:"timestamp" json:"timestamp,omitempty"` + TimeRange *TTimeRange `thrift:"timeRange,4" db:"timeRange" json:"timeRange,omitempty"` + MaxVersions *int32 `thrift:"maxVersions,5" db:"maxVersions" json:"maxVersions,omitempty"` + FilterString []byte `thrift:"filterString,6" db:"filterString" json:"filterString,omitempty"` + Attributes map[string][]byte `thrift:"attributes,7" db:"attributes" json:"attributes,omitempty"` + Authorizations *TAuthorization `thrift:"authorizations,8" db:"authorizations" json:"authorizations,omitempty"` + Consistency *TConsistency `thrift:"consistency,9" db:"consistency" json:"consistency,omitempty"` + TargetReplicaId *int32 `thrift:"targetReplicaId,10" db:"targetReplicaId" json:"targetReplicaId,omitempty"` + CacheBlocks *bool `thrift:"cacheBlocks,11" db:"cacheBlocks" json:"cacheBlocks,omitempty"` + StoreLimit *int32 `thrift:"storeLimit,12" db:"storeLimit" json:"storeLimit,omitempty"` + StoreOffset *int32 `thrift:"storeOffset,13" db:"storeOffset" json:"storeOffset,omitempty"` + ExistenceOnly *bool `thrift:"existence_only,14" db:"existence_only" json:"existence_only,omitempty"` + FilterBytes []byte `thrift:"filterBytes,15" db:"filterBytes" json:"filterBytes,omitempty"` +} + +func NewTGet() *TGet { + return &TGet{} +} + + +func (p *TGet) GetRow() []byte { + return p.Row +} +var TGet_Columns_DEFAULT []*TColumn + +func (p *TGet) GetColumns() []*TColumn { + return p.Columns +} +var TGet_Timestamp_DEFAULT int64 +func (p *TGet) GetTimestamp() int64 { + if !p.IsSetTimestamp() { + return TGet_Timestamp_DEFAULT + } +return *p.Timestamp +} +var TGet_TimeRange_DEFAULT *TTimeRange +func (p *TGet) GetTimeRange() *TTimeRange { + if !p.IsSetTimeRange() { + return TGet_TimeRange_DEFAULT + } +return p.TimeRange +} +var TGet_MaxVersions_DEFAULT int32 +func (p *TGet) GetMaxVersions() int32 { + if !p.IsSetMaxVersions() { + return TGet_MaxVersions_DEFAULT + } +return *p.MaxVersions +} +var TGet_FilterString_DEFAULT []byte + +func (p *TGet) GetFilterString() []byte { + return p.FilterString +} +var TGet_Attributes_DEFAULT map[string][]byte + +func (p *TGet) GetAttributes() map[string][]byte { + return p.Attributes +} +var TGet_Authorizations_DEFAULT *TAuthorization +func (p *TGet) GetAuthorizations() *TAuthorization { + if !p.IsSetAuthorizations() { + return TGet_Authorizations_DEFAULT + } +return p.Authorizations +} +var TGet_Consistency_DEFAULT TConsistency +func (p *TGet) GetConsistency() TConsistency { + if !p.IsSetConsistency() { + return TGet_Consistency_DEFAULT + } +return *p.Consistency +} +var TGet_TargetReplicaId_DEFAULT int32 +func (p *TGet) GetTargetReplicaId() int32 { + if !p.IsSetTargetReplicaId() { + return TGet_TargetReplicaId_DEFAULT + } +return *p.TargetReplicaId +} +var TGet_CacheBlocks_DEFAULT bool +func (p *TGet) GetCacheBlocks() bool { + if !p.IsSetCacheBlocks() { + return TGet_CacheBlocks_DEFAULT + } +return *p.CacheBlocks +} +var TGet_StoreLimit_DEFAULT int32 +func (p *TGet) GetStoreLimit() int32 { + if !p.IsSetStoreLimit() { + return TGet_StoreLimit_DEFAULT + } +return *p.StoreLimit +} +var TGet_StoreOffset_DEFAULT int32 +func (p *TGet) GetStoreOffset() int32 { + if !p.IsSetStoreOffset() { + return TGet_StoreOffset_DEFAULT + } +return *p.StoreOffset +} +var TGet_ExistenceOnly_DEFAULT bool +func (p *TGet) GetExistenceOnly() bool { + if !p.IsSetExistenceOnly() { + return TGet_ExistenceOnly_DEFAULT + } +return *p.ExistenceOnly +} +var TGet_FilterBytes_DEFAULT []byte + +func (p *TGet) GetFilterBytes() []byte { + return p.FilterBytes +} +func (p *TGet) IsSetColumns() bool { + return p.Columns != nil +} + +func (p *TGet) IsSetTimestamp() bool { + return p.Timestamp != nil +} + +func (p *TGet) IsSetTimeRange() bool { + return p.TimeRange != nil +} + +func (p *TGet) IsSetMaxVersions() bool { + return p.MaxVersions != nil +} + +func (p *TGet) IsSetFilterString() bool { + return p.FilterString != nil +} + +func (p *TGet) IsSetAttributes() bool { + return p.Attributes != nil +} + +func (p *TGet) IsSetAuthorizations() bool { + return p.Authorizations != nil +} + +func (p *TGet) IsSetConsistency() bool { + return p.Consistency != nil +} + +func (p *TGet) IsSetTargetReplicaId() bool { + return p.TargetReplicaId != nil +} + +func (p *TGet) IsSetCacheBlocks() bool { + return p.CacheBlocks != nil +} + +func (p *TGet) IsSetStoreLimit() bool { + return p.StoreLimit != nil +} + +func (p *TGet) IsSetStoreOffset() bool { + return p.StoreOffset != nil +} + +func (p *TGet) IsSetExistenceOnly() bool { + return p.ExistenceOnly != nil +} + +func (p *TGet) IsSetFilterBytes() bool { + return p.FilterBytes != nil +} + +func (p *TGet) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetRow bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetRow = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.LIST { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.I64 { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.I32 { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.STRING { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.MAP { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 8: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField8(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 9: + if fieldTypeId == thrift.I32 { + if err := p.ReadField9(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 10: + if fieldTypeId == thrift.I32 { + if err := p.ReadField10(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 11: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField11(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 12: + if fieldTypeId == thrift.I32 { + if err := p.ReadField12(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 13: + if fieldTypeId == thrift.I32 { + if err := p.ReadField13(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 14: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField14(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 15: + if fieldTypeId == thrift.STRING { + if err := p.ReadField15(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetRow{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Row is not set")); + } + return nil +} + +func (p *TGet) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Row = v +} + return nil +} + +func (p *TGet) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TColumn, 0, size) + p.Columns = tSlice + for i := 0; i < size; i ++ { + _elem4 := &TColumn{} + if err := _elem4.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem4), err) + } + p.Columns = append(p.Columns, _elem4) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TGet) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Timestamp = &v +} + return nil +} + +func (p *TGet) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + p.TimeRange = &TTimeRange{} + if err := p.TimeRange.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TimeRange), err) + } + return nil +} + +func (p *TGet) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) +} else { + p.MaxVersions = &v +} + return nil +} + +func (p *TGet) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) +} else { + p.FilterString = v +} + return nil +} + +func (p *TGet) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string][]byte, size) + p.Attributes = tMap + for i := 0; i < size; i ++ { +var _key5 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key5 = v +} +var _val6 []byte + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val6 = v +} + p.Attributes[_key5] = _val6 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TGet) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { + p.Authorizations = &TAuthorization{} + if err := p.Authorizations.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Authorizations), err) + } + return nil +} + +func (p *TGet) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 9: ", err) +} else { + temp := TConsistency(v) + p.Consistency = &temp +} + return nil +} + +func (p *TGet) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 10: ", err) +} else { + p.TargetReplicaId = &v +} + return nil +} + +func (p *TGet) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 11: ", err) +} else { + p.CacheBlocks = &v +} + return nil +} + +func (p *TGet) ReadField12(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 12: ", err) +} else { + p.StoreLimit = &v +} + return nil +} + +func (p *TGet) ReadField13(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 13: ", err) +} else { + p.StoreOffset = &v +} + return nil +} + +func (p *TGet) ReadField14(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 14: ", err) +} else { + p.ExistenceOnly = &v +} + return nil +} + +func (p *TGet) ReadField15(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 15: ", err) +} else { + p.FilterBytes = v +} + return nil +} + +func (p *TGet) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TGet"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + if err := p.writeField8(ctx, oprot); err != nil { return err } + if err := p.writeField9(ctx, oprot); err != nil { return err } + if err := p.writeField10(ctx, oprot); err != nil { return err } + if err := p.writeField11(ctx, oprot); err != nil { return err } + if err := p.writeField12(ctx, oprot); err != nil { return err } + if err := p.writeField13(ctx, oprot); err != nil { return err } + if err := p.writeField14(ctx, oprot); err != nil { return err } + if err := p.writeField15(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TGet) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "row", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:row: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Row); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.row (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:row: ", p), err) } + return err +} + +func (p *TGet) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetColumns() { + if err := oprot.WriteFieldBegin(ctx, "columns", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:columns: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Columns)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Columns { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:columns: ", p), err) } + } + return err +} + +func (p *TGet) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimestamp() { + if err := oprot.WriteFieldBegin(ctx, "timestamp", thrift.I64, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:timestamp: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.Timestamp)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.timestamp (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:timestamp: ", p), err) } + } + return err +} + +func (p *TGet) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimeRange() { + if err := oprot.WriteFieldBegin(ctx, "timeRange", thrift.STRUCT, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:timeRange: ", p), err) } + if err := p.TimeRange.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TimeRange), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:timeRange: ", p), err) } + } + return err +} + +func (p *TGet) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetMaxVersions() { + if err := oprot.WriteFieldBegin(ctx, "maxVersions", thrift.I32, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:maxVersions: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.MaxVersions)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.maxVersions (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:maxVersions: ", p), err) } + } + return err +} + +func (p *TGet) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetFilterString() { + if err := oprot.WriteFieldBegin(ctx, "filterString", thrift.STRING, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:filterString: ", p), err) } + if err := oprot.WriteBinary(ctx, p.FilterString); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.filterString (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:filterString: ", p), err) } + } + return err +} + +func (p *TGet) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetAttributes() { + if err := oprot.WriteFieldBegin(ctx, "attributes", thrift.MAP, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:attributes: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Attributes)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.Attributes { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteBinary(ctx, v); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:attributes: ", p), err) } + } + return err +} + +func (p *TGet) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetAuthorizations() { + if err := oprot.WriteFieldBegin(ctx, "authorizations", thrift.STRUCT, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:authorizations: ", p), err) } + if err := p.Authorizations.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Authorizations), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:authorizations: ", p), err) } + } + return err +} + +func (p *TGet) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetConsistency() { + if err := oprot.WriteFieldBegin(ctx, "consistency", thrift.I32, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:consistency: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.Consistency)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.consistency (9) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:consistency: ", p), err) } + } + return err +} + +func (p *TGet) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTargetReplicaId() { + if err := oprot.WriteFieldBegin(ctx, "targetReplicaId", thrift.I32, 10); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:targetReplicaId: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.TargetReplicaId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.targetReplicaId (10) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 10:targetReplicaId: ", p), err) } + } + return err +} + +func (p *TGet) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetCacheBlocks() { + if err := oprot.WriteFieldBegin(ctx, "cacheBlocks", thrift.BOOL, 11); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:cacheBlocks: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.CacheBlocks)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.cacheBlocks (11) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 11:cacheBlocks: ", p), err) } + } + return err +} + +func (p *TGet) writeField12(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetStoreLimit() { + if err := oprot.WriteFieldBegin(ctx, "storeLimit", thrift.I32, 12); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 12:storeLimit: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.StoreLimit)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.storeLimit (12) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 12:storeLimit: ", p), err) } + } + return err +} + +func (p *TGet) writeField13(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetStoreOffset() { + if err := oprot.WriteFieldBegin(ctx, "storeOffset", thrift.I32, 13); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 13:storeOffset: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.StoreOffset)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.storeOffset (13) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 13:storeOffset: ", p), err) } + } + return err +} + +func (p *TGet) writeField14(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExistenceOnly() { + if err := oprot.WriteFieldBegin(ctx, "existence_only", thrift.BOOL, 14); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 14:existence_only: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.ExistenceOnly)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.existence_only (14) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 14:existence_only: ", p), err) } + } + return err +} + +func (p *TGet) writeField15(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetFilterBytes() { + if err := oprot.WriteFieldBegin(ctx, "filterBytes", thrift.STRING, 15); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 15:filterBytes: ", p), err) } + if err := oprot.WriteBinary(ctx, p.FilterBytes); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.filterBytes (15) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 15:filterBytes: ", p), err) } + } + return err +} + +func (p *TGet) Equals(other *TGet) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if bytes.Compare(p.Row, other.Row) != 0 { return false } + if len(p.Columns) != len(other.Columns) { return false } + for i, _tgt := range p.Columns { + _src7 := other.Columns[i] + if !_tgt.Equals(_src7) { return false } + } + if p.Timestamp != other.Timestamp { + if p.Timestamp == nil || other.Timestamp == nil { + return false + } + if (*p.Timestamp) != (*other.Timestamp) { return false } + } + if !p.TimeRange.Equals(other.TimeRange) { return false } + if p.MaxVersions != other.MaxVersions { + if p.MaxVersions == nil || other.MaxVersions == nil { + return false + } + if (*p.MaxVersions) != (*other.MaxVersions) { return false } + } + if bytes.Compare(p.FilterString, other.FilterString) != 0 { return false } + if len(p.Attributes) != len(other.Attributes) { return false } + for k, _tgt := range p.Attributes { + _src8 := other.Attributes[k] + if bytes.Compare(_tgt, _src8) != 0 { return false } + } + if !p.Authorizations.Equals(other.Authorizations) { return false } + if p.Consistency != other.Consistency { + if p.Consistency == nil || other.Consistency == nil { + return false + } + if (*p.Consistency) != (*other.Consistency) { return false } + } + if p.TargetReplicaId != other.TargetReplicaId { + if p.TargetReplicaId == nil || other.TargetReplicaId == nil { + return false + } + if (*p.TargetReplicaId) != (*other.TargetReplicaId) { return false } + } + if p.CacheBlocks != other.CacheBlocks { + if p.CacheBlocks == nil || other.CacheBlocks == nil { + return false + } + if (*p.CacheBlocks) != (*other.CacheBlocks) { return false } + } + if p.StoreLimit != other.StoreLimit { + if p.StoreLimit == nil || other.StoreLimit == nil { + return false + } + if (*p.StoreLimit) != (*other.StoreLimit) { return false } + } + if p.StoreOffset != other.StoreOffset { + if p.StoreOffset == nil || other.StoreOffset == nil { + return false + } + if (*p.StoreOffset) != (*other.StoreOffset) { return false } + } + if p.ExistenceOnly != other.ExistenceOnly { + if p.ExistenceOnly == nil || other.ExistenceOnly == nil { + return false + } + if (*p.ExistenceOnly) != (*other.ExistenceOnly) { return false } + } + if bytes.Compare(p.FilterBytes, other.FilterBytes) != 0 { return false } + return true +} + +func (p *TGet) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TGet(%+v)", *p) +} + +// Used to perform Put operations for a single row. +// +// Add column values to this object and they'll be added. +// You can provide a default timestamp if the column values +// don't have one. If you don't provide a default timestamp +// the current time is inserted. +// +// You can specify how this Put should be written to the write-ahead Log (WAL) +// by changing the durability. If you don't provide durability, it defaults to +// column family's default setting for durability. +// +// Attributes: +// - Row +// - ColumnValues +// - Timestamp +// - Attributes +// - Durability +// - CellVisibility +type TPut struct { + Row []byte `thrift:"row,1,required" db:"row" json:"row"` + ColumnValues []*TColumnValue `thrift:"columnValues,2,required" db:"columnValues" json:"columnValues"` + Timestamp *int64 `thrift:"timestamp,3" db:"timestamp" json:"timestamp,omitempty"` + // unused field # 4 + Attributes map[string][]byte `thrift:"attributes,5" db:"attributes" json:"attributes,omitempty"` + Durability *TDurability `thrift:"durability,6" db:"durability" json:"durability,omitempty"` + CellVisibility *TCellVisibility `thrift:"cellVisibility,7" db:"cellVisibility" json:"cellVisibility,omitempty"` +} + +func NewTPut() *TPut { + return &TPut{} +} + + +func (p *TPut) GetRow() []byte { + return p.Row +} + +func (p *TPut) GetColumnValues() []*TColumnValue { + return p.ColumnValues +} +var TPut_Timestamp_DEFAULT int64 +func (p *TPut) GetTimestamp() int64 { + if !p.IsSetTimestamp() { + return TPut_Timestamp_DEFAULT + } +return *p.Timestamp +} +var TPut_Attributes_DEFAULT map[string][]byte + +func (p *TPut) GetAttributes() map[string][]byte { + return p.Attributes +} +var TPut_Durability_DEFAULT TDurability +func (p *TPut) GetDurability() TDurability { + if !p.IsSetDurability() { + return TPut_Durability_DEFAULT + } +return *p.Durability +} +var TPut_CellVisibility_DEFAULT *TCellVisibility +func (p *TPut) GetCellVisibility() *TCellVisibility { + if !p.IsSetCellVisibility() { + return TPut_CellVisibility_DEFAULT + } +return p.CellVisibility +} +func (p *TPut) IsSetTimestamp() bool { + return p.Timestamp != nil +} + +func (p *TPut) IsSetAttributes() bool { + return p.Attributes != nil +} + +func (p *TPut) IsSetDurability() bool { + return p.Durability != nil +} + +func (p *TPut) IsSetCellVisibility() bool { + return p.CellVisibility != nil +} + +func (p *TPut) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetRow bool = false; + var issetColumnValues bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetRow = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.LIST { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetColumnValues = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.I64 { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.MAP { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.I32 { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetRow{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Row is not set")); + } + if !issetColumnValues{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ColumnValues is not set")); + } + return nil +} + +func (p *TPut) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Row = v +} + return nil +} + +func (p *TPut) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TColumnValue, 0, size) + p.ColumnValues = tSlice + for i := 0; i < size; i ++ { + _elem9 := &TColumnValue{} + if err := _elem9.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem9), err) + } + p.ColumnValues = append(p.ColumnValues, _elem9) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TPut) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Timestamp = &v +} + return nil +} + +func (p *TPut) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string][]byte, size) + p.Attributes = tMap + for i := 0; i < size; i ++ { +var _key10 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key10 = v +} +var _val11 []byte + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val11 = v +} + p.Attributes[_key10] = _val11 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TPut) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) +} else { + temp := TDurability(v) + p.Durability = &temp +} + return nil +} + +func (p *TPut) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + p.CellVisibility = &TCellVisibility{} + if err := p.CellVisibility.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.CellVisibility), err) + } + return nil +} + +func (p *TPut) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TPut"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TPut) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "row", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:row: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Row); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.row (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:row: ", p), err) } + return err +} + +func (p *TPut) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "columnValues", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:columnValues: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ColumnValues)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ColumnValues { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:columnValues: ", p), err) } + return err +} + +func (p *TPut) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimestamp() { + if err := oprot.WriteFieldBegin(ctx, "timestamp", thrift.I64, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:timestamp: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.Timestamp)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.timestamp (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:timestamp: ", p), err) } + } + return err +} + +func (p *TPut) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetAttributes() { + if err := oprot.WriteFieldBegin(ctx, "attributes", thrift.MAP, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:attributes: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Attributes)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.Attributes { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteBinary(ctx, v); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:attributes: ", p), err) } + } + return err +} + +func (p *TPut) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetDurability() { + if err := oprot.WriteFieldBegin(ctx, "durability", thrift.I32, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:durability: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.Durability)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.durability (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:durability: ", p), err) } + } + return err +} + +func (p *TPut) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetCellVisibility() { + if err := oprot.WriteFieldBegin(ctx, "cellVisibility", thrift.STRUCT, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:cellVisibility: ", p), err) } + if err := p.CellVisibility.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.CellVisibility), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:cellVisibility: ", p), err) } + } + return err +} + +func (p *TPut) Equals(other *TPut) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if bytes.Compare(p.Row, other.Row) != 0 { return false } + if len(p.ColumnValues) != len(other.ColumnValues) { return false } + for i, _tgt := range p.ColumnValues { + _src12 := other.ColumnValues[i] + if !_tgt.Equals(_src12) { return false } + } + if p.Timestamp != other.Timestamp { + if p.Timestamp == nil || other.Timestamp == nil { + return false + } + if (*p.Timestamp) != (*other.Timestamp) { return false } + } + if len(p.Attributes) != len(other.Attributes) { return false } + for k, _tgt := range p.Attributes { + _src13 := other.Attributes[k] + if bytes.Compare(_tgt, _src13) != 0 { return false } + } + if p.Durability != other.Durability { + if p.Durability == nil || other.Durability == nil { + return false + } + if (*p.Durability) != (*other.Durability) { return false } + } + if !p.CellVisibility.Equals(other.CellVisibility) { return false } + return true +} + +func (p *TPut) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TPut(%+v)", *p) +} + +// Used to perform Delete operations on a single row. +// +// The scope can be further narrowed down by specifying a list of +// columns or column families as TColumns. +// +// Specifying only a family in a TColumn will delete the whole family. +// If a timestamp is specified all versions with a timestamp less than +// or equal to this will be deleted. If no timestamp is specified the +// current time will be used. +// +// Specifying a family and a column qualifier in a TColumn will delete only +// this qualifier. If a timestamp is specified only versions equal +// to this timestamp will be deleted. If no timestamp is specified the +// most recent version will be deleted. To delete all previous versions, +// specify the DELETE_COLUMNS TDeleteType. +// +// The top level timestamp is only used if a complete row should be deleted +// (i.e. no columns are passed) and if it is specified it works the same way +// as if you had added a TColumn for every column family and this timestamp +// (i.e. all versions older than or equal in all column families will be deleted) +// +// You can specify how this Delete should be written to the write-ahead Log (WAL) +// by changing the durability. If you don't provide durability, it defaults to +// column family's default setting for durability. +// +// Attributes: +// - Row +// - Columns +// - Timestamp +// - DeleteType +// - Attributes +// - Durability +type TDelete struct { + Row []byte `thrift:"row,1,required" db:"row" json:"row"` + Columns []*TColumn `thrift:"columns,2" db:"columns" json:"columns,omitempty"` + Timestamp *int64 `thrift:"timestamp,3" db:"timestamp" json:"timestamp,omitempty"` + DeleteType TDeleteType `thrift:"deleteType,4" db:"deleteType" json:"deleteType"` + // unused field # 5 + Attributes map[string][]byte `thrift:"attributes,6" db:"attributes" json:"attributes,omitempty"` + Durability *TDurability `thrift:"durability,7" db:"durability" json:"durability,omitempty"` +} + +func NewTDelete() *TDelete { + return &TDelete{ +DeleteType: 1, +} +} + + +func (p *TDelete) GetRow() []byte { + return p.Row +} +var TDelete_Columns_DEFAULT []*TColumn + +func (p *TDelete) GetColumns() []*TColumn { + return p.Columns +} +var TDelete_Timestamp_DEFAULT int64 +func (p *TDelete) GetTimestamp() int64 { + if !p.IsSetTimestamp() { + return TDelete_Timestamp_DEFAULT + } +return *p.Timestamp +} +var TDelete_DeleteType_DEFAULT TDeleteType = 1 + +func (p *TDelete) GetDeleteType() TDeleteType { + return p.DeleteType +} +var TDelete_Attributes_DEFAULT map[string][]byte + +func (p *TDelete) GetAttributes() map[string][]byte { + return p.Attributes +} +var TDelete_Durability_DEFAULT TDurability +func (p *TDelete) GetDurability() TDurability { + if !p.IsSetDurability() { + return TDelete_Durability_DEFAULT + } +return *p.Durability +} +func (p *TDelete) IsSetColumns() bool { + return p.Columns != nil +} + +func (p *TDelete) IsSetTimestamp() bool { + return p.Timestamp != nil +} + +func (p *TDelete) IsSetDeleteType() bool { + return p.DeleteType != TDelete_DeleteType_DEFAULT +} + +func (p *TDelete) IsSetAttributes() bool { + return p.Attributes != nil +} + +func (p *TDelete) IsSetDurability() bool { + return p.Durability != nil +} + +func (p *TDelete) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetRow bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetRow = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.LIST { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.I64 { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.I32 { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.MAP { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.I32 { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetRow{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Row is not set")); + } + return nil +} + +func (p *TDelete) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Row = v +} + return nil +} + +func (p *TDelete) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TColumn, 0, size) + p.Columns = tSlice + for i := 0; i < size; i ++ { + _elem14 := &TColumn{} + if err := _elem14.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem14), err) + } + p.Columns = append(p.Columns, _elem14) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TDelete) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Timestamp = &v +} + return nil +} + +func (p *TDelete) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + temp := TDeleteType(v) + p.DeleteType = temp +} + return nil +} + +func (p *TDelete) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string][]byte, size) + p.Attributes = tMap + for i := 0; i < size; i ++ { +var _key15 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key15 = v +} +var _val16 []byte + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val16 = v +} + p.Attributes[_key15] = _val16 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TDelete) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 7: ", err) +} else { + temp := TDurability(v) + p.Durability = &temp +} + return nil +} + +func (p *TDelete) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TDelete"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TDelete) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "row", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:row: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Row); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.row (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:row: ", p), err) } + return err +} + +func (p *TDelete) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetColumns() { + if err := oprot.WriteFieldBegin(ctx, "columns", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:columns: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Columns)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Columns { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:columns: ", p), err) } + } + return err +} + +func (p *TDelete) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimestamp() { + if err := oprot.WriteFieldBegin(ctx, "timestamp", thrift.I64, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:timestamp: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.Timestamp)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.timestamp (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:timestamp: ", p), err) } + } + return err +} + +func (p *TDelete) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetDeleteType() { + if err := oprot.WriteFieldBegin(ctx, "deleteType", thrift.I32, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:deleteType: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.DeleteType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.deleteType (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:deleteType: ", p), err) } + } + return err +} + +func (p *TDelete) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetAttributes() { + if err := oprot.WriteFieldBegin(ctx, "attributes", thrift.MAP, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:attributes: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Attributes)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.Attributes { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteBinary(ctx, v); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:attributes: ", p), err) } + } + return err +} + +func (p *TDelete) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetDurability() { + if err := oprot.WriteFieldBegin(ctx, "durability", thrift.I32, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:durability: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.Durability)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.durability (7) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:durability: ", p), err) } + } + return err +} + +func (p *TDelete) Equals(other *TDelete) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if bytes.Compare(p.Row, other.Row) != 0 { return false } + if len(p.Columns) != len(other.Columns) { return false } + for i, _tgt := range p.Columns { + _src17 := other.Columns[i] + if !_tgt.Equals(_src17) { return false } + } + if p.Timestamp != other.Timestamp { + if p.Timestamp == nil || other.Timestamp == nil { + return false + } + if (*p.Timestamp) != (*other.Timestamp) { return false } + } + if p.DeleteType != other.DeleteType { return false } + if len(p.Attributes) != len(other.Attributes) { return false } + for k, _tgt := range p.Attributes { + _src18 := other.Attributes[k] + if bytes.Compare(_tgt, _src18) != 0 { return false } + } + if p.Durability != other.Durability { + if p.Durability == nil || other.Durability == nil { + return false + } + if (*p.Durability) != (*other.Durability) { return false } + } + return true +} + +func (p *TDelete) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TDelete(%+v)", *p) +} + +// Used to perform Increment operations for a single row. +// +// You can specify how this Increment should be written to the write-ahead Log (WAL) +// by changing the durability. If you don't provide durability, it defaults to +// column family's default setting for durability. +// +// Attributes: +// - Row +// - Columns +// - Attributes +// - Durability +// - CellVisibility +// - ReturnResults +type TIncrement struct { + Row []byte `thrift:"row,1,required" db:"row" json:"row"` + Columns []*TColumnIncrement `thrift:"columns,2,required" db:"columns" json:"columns"` + // unused field # 3 + Attributes map[string][]byte `thrift:"attributes,4" db:"attributes" json:"attributes,omitempty"` + Durability *TDurability `thrift:"durability,5" db:"durability" json:"durability,omitempty"` + CellVisibility *TCellVisibility `thrift:"cellVisibility,6" db:"cellVisibility" json:"cellVisibility,omitempty"` + ReturnResults *bool `thrift:"returnResults,7" db:"returnResults" json:"returnResults,omitempty"` +} + +func NewTIncrement() *TIncrement { + return &TIncrement{} +} + + +func (p *TIncrement) GetRow() []byte { + return p.Row +} + +func (p *TIncrement) GetColumns() []*TColumnIncrement { + return p.Columns +} +var TIncrement_Attributes_DEFAULT map[string][]byte + +func (p *TIncrement) GetAttributes() map[string][]byte { + return p.Attributes +} +var TIncrement_Durability_DEFAULT TDurability +func (p *TIncrement) GetDurability() TDurability { + if !p.IsSetDurability() { + return TIncrement_Durability_DEFAULT + } +return *p.Durability +} +var TIncrement_CellVisibility_DEFAULT *TCellVisibility +func (p *TIncrement) GetCellVisibility() *TCellVisibility { + if !p.IsSetCellVisibility() { + return TIncrement_CellVisibility_DEFAULT + } +return p.CellVisibility +} +var TIncrement_ReturnResults_DEFAULT bool +func (p *TIncrement) GetReturnResults() bool { + if !p.IsSetReturnResults() { + return TIncrement_ReturnResults_DEFAULT + } +return *p.ReturnResults +} +func (p *TIncrement) IsSetAttributes() bool { + return p.Attributes != nil +} + +func (p *TIncrement) IsSetDurability() bool { + return p.Durability != nil +} + +func (p *TIncrement) IsSetCellVisibility() bool { + return p.CellVisibility != nil +} + +func (p *TIncrement) IsSetReturnResults() bool { + return p.ReturnResults != nil +} + +func (p *TIncrement) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetRow bool = false; + var issetColumns bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetRow = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.LIST { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetColumns = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.MAP { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.I32 { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetRow{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Row is not set")); + } + if !issetColumns{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Columns is not set")); + } + return nil +} + +func (p *TIncrement) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Row = v +} + return nil +} + +func (p *TIncrement) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TColumnIncrement, 0, size) + p.Columns = tSlice + for i := 0; i < size; i ++ { + _elem19 := &TColumnIncrement{ + Amount: 1, +} + if err := _elem19.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem19), err) + } + p.Columns = append(p.Columns, _elem19) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TIncrement) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string][]byte, size) + p.Attributes = tMap + for i := 0; i < size; i ++ { +var _key20 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key20 = v +} +var _val21 []byte + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val21 = v +} + p.Attributes[_key20] = _val21 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TIncrement) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) +} else { + temp := TDurability(v) + p.Durability = &temp +} + return nil +} + +func (p *TIncrement) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + p.CellVisibility = &TCellVisibility{} + if err := p.CellVisibility.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.CellVisibility), err) + } + return nil +} + +func (p *TIncrement) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 7: ", err) +} else { + p.ReturnResults = &v +} + return nil +} + +func (p *TIncrement) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TIncrement"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TIncrement) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "row", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:row: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Row); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.row (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:row: ", p), err) } + return err +} + +func (p *TIncrement) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "columns", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:columns: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Columns)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Columns { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:columns: ", p), err) } + return err +} + +func (p *TIncrement) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetAttributes() { + if err := oprot.WriteFieldBegin(ctx, "attributes", thrift.MAP, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:attributes: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Attributes)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.Attributes { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteBinary(ctx, v); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:attributes: ", p), err) } + } + return err +} + +func (p *TIncrement) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetDurability() { + if err := oprot.WriteFieldBegin(ctx, "durability", thrift.I32, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:durability: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.Durability)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.durability (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:durability: ", p), err) } + } + return err +} + +func (p *TIncrement) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetCellVisibility() { + if err := oprot.WriteFieldBegin(ctx, "cellVisibility", thrift.STRUCT, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:cellVisibility: ", p), err) } + if err := p.CellVisibility.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.CellVisibility), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:cellVisibility: ", p), err) } + } + return err +} + +func (p *TIncrement) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetReturnResults() { + if err := oprot.WriteFieldBegin(ctx, "returnResults", thrift.BOOL, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:returnResults: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.ReturnResults)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.returnResults (7) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:returnResults: ", p), err) } + } + return err +} + +func (p *TIncrement) Equals(other *TIncrement) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if bytes.Compare(p.Row, other.Row) != 0 { return false } + if len(p.Columns) != len(other.Columns) { return false } + for i, _tgt := range p.Columns { + _src22 := other.Columns[i] + if !_tgt.Equals(_src22) { return false } + } + if len(p.Attributes) != len(other.Attributes) { return false } + for k, _tgt := range p.Attributes { + _src23 := other.Attributes[k] + if bytes.Compare(_tgt, _src23) != 0 { return false } + } + if p.Durability != other.Durability { + if p.Durability == nil || other.Durability == nil { + return false + } + if (*p.Durability) != (*other.Durability) { return false } + } + if !p.CellVisibility.Equals(other.CellVisibility) { return false } + if p.ReturnResults != other.ReturnResults { + if p.ReturnResults == nil || other.ReturnResults == nil { + return false + } + if (*p.ReturnResults) != (*other.ReturnResults) { return false } + } + return true +} + +func (p *TIncrement) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TIncrement(%+v)", *p) +} + +// Attributes: +// - Row +// - Columns +// - Attributes +// - Durability +// - CellVisibility +// - ReturnResults +type TAppend struct { + Row []byte `thrift:"row,1,required" db:"row" json:"row"` + Columns []*TColumnValue `thrift:"columns,2,required" db:"columns" json:"columns"` + Attributes map[string][]byte `thrift:"attributes,3" db:"attributes" json:"attributes,omitempty"` + Durability *TDurability `thrift:"durability,4" db:"durability" json:"durability,omitempty"` + CellVisibility *TCellVisibility `thrift:"cellVisibility,5" db:"cellVisibility" json:"cellVisibility,omitempty"` + ReturnResults *bool `thrift:"returnResults,6" db:"returnResults" json:"returnResults,omitempty"` +} + +func NewTAppend() *TAppend { + return &TAppend{} +} + + +func (p *TAppend) GetRow() []byte { + return p.Row +} + +func (p *TAppend) GetColumns() []*TColumnValue { + return p.Columns +} +var TAppend_Attributes_DEFAULT map[string][]byte + +func (p *TAppend) GetAttributes() map[string][]byte { + return p.Attributes +} +var TAppend_Durability_DEFAULT TDurability +func (p *TAppend) GetDurability() TDurability { + if !p.IsSetDurability() { + return TAppend_Durability_DEFAULT + } +return *p.Durability +} +var TAppend_CellVisibility_DEFAULT *TCellVisibility +func (p *TAppend) GetCellVisibility() *TCellVisibility { + if !p.IsSetCellVisibility() { + return TAppend_CellVisibility_DEFAULT + } +return p.CellVisibility +} +var TAppend_ReturnResults_DEFAULT bool +func (p *TAppend) GetReturnResults() bool { + if !p.IsSetReturnResults() { + return TAppend_ReturnResults_DEFAULT + } +return *p.ReturnResults +} +func (p *TAppend) IsSetAttributes() bool { + return p.Attributes != nil +} + +func (p *TAppend) IsSetDurability() bool { + return p.Durability != nil +} + +func (p *TAppend) IsSetCellVisibility() bool { + return p.CellVisibility != nil +} + +func (p *TAppend) IsSetReturnResults() bool { + return p.ReturnResults != nil +} + +func (p *TAppend) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetRow bool = false; + var issetColumns bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetRow = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.LIST { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetColumns = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.MAP { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.I32 { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetRow{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Row is not set")); + } + if !issetColumns{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Columns is not set")); + } + return nil +} + +func (p *TAppend) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Row = v +} + return nil +} + +func (p *TAppend) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TColumnValue, 0, size) + p.Columns = tSlice + for i := 0; i < size; i ++ { + _elem24 := &TColumnValue{} + if err := _elem24.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem24), err) + } + p.Columns = append(p.Columns, _elem24) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TAppend) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string][]byte, size) + p.Attributes = tMap + for i := 0; i < size; i ++ { +var _key25 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key25 = v +} +var _val26 []byte + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val26 = v +} + p.Attributes[_key25] = _val26 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TAppend) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + temp := TDurability(v) + p.Durability = &temp +} + return nil +} + +func (p *TAppend) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + p.CellVisibility = &TCellVisibility{} + if err := p.CellVisibility.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.CellVisibility), err) + } + return nil +} + +func (p *TAppend) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) +} else { + p.ReturnResults = &v +} + return nil +} + +func (p *TAppend) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TAppend"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TAppend) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "row", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:row: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Row); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.row (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:row: ", p), err) } + return err +} + +func (p *TAppend) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "columns", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:columns: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Columns)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Columns { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:columns: ", p), err) } + return err +} + +func (p *TAppend) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetAttributes() { + if err := oprot.WriteFieldBegin(ctx, "attributes", thrift.MAP, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:attributes: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Attributes)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.Attributes { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteBinary(ctx, v); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:attributes: ", p), err) } + } + return err +} + +func (p *TAppend) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetDurability() { + if err := oprot.WriteFieldBegin(ctx, "durability", thrift.I32, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:durability: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.Durability)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.durability (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:durability: ", p), err) } + } + return err +} + +func (p *TAppend) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetCellVisibility() { + if err := oprot.WriteFieldBegin(ctx, "cellVisibility", thrift.STRUCT, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:cellVisibility: ", p), err) } + if err := p.CellVisibility.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.CellVisibility), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:cellVisibility: ", p), err) } + } + return err +} + +func (p *TAppend) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetReturnResults() { + if err := oprot.WriteFieldBegin(ctx, "returnResults", thrift.BOOL, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:returnResults: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.ReturnResults)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.returnResults (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:returnResults: ", p), err) } + } + return err +} + +func (p *TAppend) Equals(other *TAppend) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if bytes.Compare(p.Row, other.Row) != 0 { return false } + if len(p.Columns) != len(other.Columns) { return false } + for i, _tgt := range p.Columns { + _src27 := other.Columns[i] + if !_tgt.Equals(_src27) { return false } + } + if len(p.Attributes) != len(other.Attributes) { return false } + for k, _tgt := range p.Attributes { + _src28 := other.Attributes[k] + if bytes.Compare(_tgt, _src28) != 0 { return false } + } + if p.Durability != other.Durability { + if p.Durability == nil || other.Durability == nil { + return false + } + if (*p.Durability) != (*other.Durability) { return false } + } + if !p.CellVisibility.Equals(other.CellVisibility) { return false } + if p.ReturnResults != other.ReturnResults { + if p.ReturnResults == nil || other.ReturnResults == nil { + return false + } + if (*p.ReturnResults) != (*other.ReturnResults) { return false } + } + return true +} + +func (p *TAppend) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TAppend(%+v)", *p) +} + +// Any timestamps in the columns are ignored but the colFamTimeRangeMap included, use timeRange to select by timestamp. +// Max versions defaults to 1. +// +// Attributes: +// - StartRow +// - StopRow +// - Columns +// - Caching +// - MaxVersions +// - TimeRange +// - FilterString +// - BatchSize +// - Attributes +// - Authorizations +// - Reversed +// - CacheBlocks +// - ColFamTimeRangeMap +// - ReadType +// - Limit +// - Consistency +// - TargetReplicaId +// - FilterBytes +type TScan struct { + StartRow []byte `thrift:"startRow,1" db:"startRow" json:"startRow,omitempty"` + StopRow []byte `thrift:"stopRow,2" db:"stopRow" json:"stopRow,omitempty"` + Columns []*TColumn `thrift:"columns,3" db:"columns" json:"columns,omitempty"` + Caching *int32 `thrift:"caching,4" db:"caching" json:"caching,omitempty"` + MaxVersions int32 `thrift:"maxVersions,5" db:"maxVersions" json:"maxVersions"` + TimeRange *TTimeRange `thrift:"timeRange,6" db:"timeRange" json:"timeRange,omitempty"` + FilterString []byte `thrift:"filterString,7" db:"filterString" json:"filterString,omitempty"` + BatchSize *int32 `thrift:"batchSize,8" db:"batchSize" json:"batchSize,omitempty"` + Attributes map[string][]byte `thrift:"attributes,9" db:"attributes" json:"attributes,omitempty"` + Authorizations *TAuthorization `thrift:"authorizations,10" db:"authorizations" json:"authorizations,omitempty"` + Reversed *bool `thrift:"reversed,11" db:"reversed" json:"reversed,omitempty"` + CacheBlocks *bool `thrift:"cacheBlocks,12" db:"cacheBlocks" json:"cacheBlocks,omitempty"` + ColFamTimeRangeMap map[string]*TTimeRange `thrift:"colFamTimeRangeMap,13" db:"colFamTimeRangeMap" json:"colFamTimeRangeMap,omitempty"` + ReadType *TReadType `thrift:"readType,14" db:"readType" json:"readType,omitempty"` + Limit *int32 `thrift:"limit,15" db:"limit" json:"limit,omitempty"` + Consistency *TConsistency `thrift:"consistency,16" db:"consistency" json:"consistency,omitempty"` + TargetReplicaId *int32 `thrift:"targetReplicaId,17" db:"targetReplicaId" json:"targetReplicaId,omitempty"` + FilterBytes []byte `thrift:"filterBytes,18" db:"filterBytes" json:"filterBytes,omitempty"` +} + +func NewTScan() *TScan { + return &TScan{ +MaxVersions: 1, +} +} + +var TScan_StartRow_DEFAULT []byte + +func (p *TScan) GetStartRow() []byte { + return p.StartRow +} +var TScan_StopRow_DEFAULT []byte + +func (p *TScan) GetStopRow() []byte { + return p.StopRow +} +var TScan_Columns_DEFAULT []*TColumn + +func (p *TScan) GetColumns() []*TColumn { + return p.Columns +} +var TScan_Caching_DEFAULT int32 +func (p *TScan) GetCaching() int32 { + if !p.IsSetCaching() { + return TScan_Caching_DEFAULT + } +return *p.Caching +} +var TScan_MaxVersions_DEFAULT int32 = 1 + +func (p *TScan) GetMaxVersions() int32 { + return p.MaxVersions +} +var TScan_TimeRange_DEFAULT *TTimeRange +func (p *TScan) GetTimeRange() *TTimeRange { + if !p.IsSetTimeRange() { + return TScan_TimeRange_DEFAULT + } +return p.TimeRange +} +var TScan_FilterString_DEFAULT []byte + +func (p *TScan) GetFilterString() []byte { + return p.FilterString +} +var TScan_BatchSize_DEFAULT int32 +func (p *TScan) GetBatchSize() int32 { + if !p.IsSetBatchSize() { + return TScan_BatchSize_DEFAULT + } +return *p.BatchSize +} +var TScan_Attributes_DEFAULT map[string][]byte + +func (p *TScan) GetAttributes() map[string][]byte { + return p.Attributes +} +var TScan_Authorizations_DEFAULT *TAuthorization +func (p *TScan) GetAuthorizations() *TAuthorization { + if !p.IsSetAuthorizations() { + return TScan_Authorizations_DEFAULT + } +return p.Authorizations +} +var TScan_Reversed_DEFAULT bool +func (p *TScan) GetReversed() bool { + if !p.IsSetReversed() { + return TScan_Reversed_DEFAULT + } +return *p.Reversed +} +var TScan_CacheBlocks_DEFAULT bool +func (p *TScan) GetCacheBlocks() bool { + if !p.IsSetCacheBlocks() { + return TScan_CacheBlocks_DEFAULT + } +return *p.CacheBlocks +} +var TScan_ColFamTimeRangeMap_DEFAULT map[string]*TTimeRange + +func (p *TScan) GetColFamTimeRangeMap() map[string]*TTimeRange { + return p.ColFamTimeRangeMap +} +var TScan_ReadType_DEFAULT TReadType +func (p *TScan) GetReadType() TReadType { + if !p.IsSetReadType() { + return TScan_ReadType_DEFAULT + } +return *p.ReadType +} +var TScan_Limit_DEFAULT int32 +func (p *TScan) GetLimit() int32 { + if !p.IsSetLimit() { + return TScan_Limit_DEFAULT + } +return *p.Limit +} +var TScan_Consistency_DEFAULT TConsistency +func (p *TScan) GetConsistency() TConsistency { + if !p.IsSetConsistency() { + return TScan_Consistency_DEFAULT + } +return *p.Consistency +} +var TScan_TargetReplicaId_DEFAULT int32 +func (p *TScan) GetTargetReplicaId() int32 { + if !p.IsSetTargetReplicaId() { + return TScan_TargetReplicaId_DEFAULT + } +return *p.TargetReplicaId +} +var TScan_FilterBytes_DEFAULT []byte + +func (p *TScan) GetFilterBytes() []byte { + return p.FilterBytes +} +func (p *TScan) IsSetStartRow() bool { + return p.StartRow != nil +} + +func (p *TScan) IsSetStopRow() bool { + return p.StopRow != nil +} + +func (p *TScan) IsSetColumns() bool { + return p.Columns != nil +} + +func (p *TScan) IsSetCaching() bool { + return p.Caching != nil +} + +func (p *TScan) IsSetMaxVersions() bool { + return p.MaxVersions != TScan_MaxVersions_DEFAULT +} + +func (p *TScan) IsSetTimeRange() bool { + return p.TimeRange != nil +} + +func (p *TScan) IsSetFilterString() bool { + return p.FilterString != nil +} + +func (p *TScan) IsSetBatchSize() bool { + return p.BatchSize != nil +} + +func (p *TScan) IsSetAttributes() bool { + return p.Attributes != nil +} + +func (p *TScan) IsSetAuthorizations() bool { + return p.Authorizations != nil +} + +func (p *TScan) IsSetReversed() bool { + return p.Reversed != nil +} + +func (p *TScan) IsSetCacheBlocks() bool { + return p.CacheBlocks != nil +} + +func (p *TScan) IsSetColFamTimeRangeMap() bool { + return p.ColFamTimeRangeMap != nil +} + +func (p *TScan) IsSetReadType() bool { + return p.ReadType != nil +} + +func (p *TScan) IsSetLimit() bool { + return p.Limit != nil +} + +func (p *TScan) IsSetConsistency() bool { + return p.Consistency != nil +} + +func (p *TScan) IsSetTargetReplicaId() bool { + return p.TargetReplicaId != nil +} + +func (p *TScan) IsSetFilterBytes() bool { + return p.FilterBytes != nil +} + +func (p *TScan) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.LIST { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.I32 { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.I32 { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.STRING { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 8: + if fieldTypeId == thrift.I32 { + if err := p.ReadField8(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 9: + if fieldTypeId == thrift.MAP { + if err := p.ReadField9(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 10: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField10(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 11: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField11(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 12: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField12(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 13: + if fieldTypeId == thrift.MAP { + if err := p.ReadField13(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 14: + if fieldTypeId == thrift.I32 { + if err := p.ReadField14(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 15: + if fieldTypeId == thrift.I32 { + if err := p.ReadField15(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 16: + if fieldTypeId == thrift.I32 { + if err := p.ReadField16(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 17: + if fieldTypeId == thrift.I32 { + if err := p.ReadField17(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 18: + if fieldTypeId == thrift.STRING { + if err := p.ReadField18(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TScan) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.StartRow = v +} + return nil +} + +func (p *TScan) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.StopRow = v +} + return nil +} + +func (p *TScan) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TColumn, 0, size) + p.Columns = tSlice + for i := 0; i < size; i ++ { + _elem29 := &TColumn{} + if err := _elem29.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem29), err) + } + p.Columns = append(p.Columns, _elem29) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TScan) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.Caching = &v +} + return nil +} + +func (p *TScan) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) +} else { + p.MaxVersions = v +} + return nil +} + +func (p *TScan) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + p.TimeRange = &TTimeRange{} + if err := p.TimeRange.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TimeRange), err) + } + return nil +} + +func (p *TScan) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 7: ", err) +} else { + p.FilterString = v +} + return nil +} + +func (p *TScan) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 8: ", err) +} else { + p.BatchSize = &v +} + return nil +} + +func (p *TScan) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string][]byte, size) + p.Attributes = tMap + for i := 0; i < size; i ++ { +var _key30 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key30 = v +} +var _val31 []byte + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val31 = v +} + p.Attributes[_key30] = _val31 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TScan) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { + p.Authorizations = &TAuthorization{} + if err := p.Authorizations.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Authorizations), err) + } + return nil +} + +func (p *TScan) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 11: ", err) +} else { + p.Reversed = &v +} + return nil +} + +func (p *TScan) ReadField12(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 12: ", err) +} else { + p.CacheBlocks = &v +} + return nil +} + +func (p *TScan) ReadField13(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]*TTimeRange, size) + p.ColFamTimeRangeMap = tMap + for i := 0; i < size; i ++ { +var _key32 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key32 = v +} + _val33 := &TTimeRange{} + if err := _val33.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _val33), err) + } + p.ColFamTimeRangeMap[_key32] = _val33 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TScan) ReadField14(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 14: ", err) +} else { + temp := TReadType(v) + p.ReadType = &temp +} + return nil +} + +func (p *TScan) ReadField15(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 15: ", err) +} else { + p.Limit = &v +} + return nil +} + +func (p *TScan) ReadField16(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 16: ", err) +} else { + temp := TConsistency(v) + p.Consistency = &temp +} + return nil +} + +func (p *TScan) ReadField17(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 17: ", err) +} else { + p.TargetReplicaId = &v +} + return nil +} + +func (p *TScan) ReadField18(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 18: ", err) +} else { + p.FilterBytes = v +} + return nil +} + +func (p *TScan) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TScan"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + if err := p.writeField8(ctx, oprot); err != nil { return err } + if err := p.writeField9(ctx, oprot); err != nil { return err } + if err := p.writeField10(ctx, oprot); err != nil { return err } + if err := p.writeField11(ctx, oprot); err != nil { return err } + if err := p.writeField12(ctx, oprot); err != nil { return err } + if err := p.writeField13(ctx, oprot); err != nil { return err } + if err := p.writeField14(ctx, oprot); err != nil { return err } + if err := p.writeField15(ctx, oprot); err != nil { return err } + if err := p.writeField16(ctx, oprot); err != nil { return err } + if err := p.writeField17(ctx, oprot); err != nil { return err } + if err := p.writeField18(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TScan) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetStartRow() { + if err := oprot.WriteFieldBegin(ctx, "startRow", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:startRow: ", p), err) } + if err := oprot.WriteBinary(ctx, p.StartRow); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.startRow (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:startRow: ", p), err) } + } + return err +} + +func (p *TScan) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetStopRow() { + if err := oprot.WriteFieldBegin(ctx, "stopRow", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:stopRow: ", p), err) } + if err := oprot.WriteBinary(ctx, p.StopRow); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.stopRow (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:stopRow: ", p), err) } + } + return err +} + +func (p *TScan) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetColumns() { + if err := oprot.WriteFieldBegin(ctx, "columns", thrift.LIST, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:columns: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Columns)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Columns { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:columns: ", p), err) } + } + return err +} + +func (p *TScan) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetCaching() { + if err := oprot.WriteFieldBegin(ctx, "caching", thrift.I32, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:caching: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.Caching)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.caching (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:caching: ", p), err) } + } + return err +} + +func (p *TScan) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetMaxVersions() { + if err := oprot.WriteFieldBegin(ctx, "maxVersions", thrift.I32, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:maxVersions: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.MaxVersions)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.maxVersions (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:maxVersions: ", p), err) } + } + return err +} + +func (p *TScan) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimeRange() { + if err := oprot.WriteFieldBegin(ctx, "timeRange", thrift.STRUCT, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:timeRange: ", p), err) } + if err := p.TimeRange.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TimeRange), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:timeRange: ", p), err) } + } + return err +} + +func (p *TScan) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetFilterString() { + if err := oprot.WriteFieldBegin(ctx, "filterString", thrift.STRING, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:filterString: ", p), err) } + if err := oprot.WriteBinary(ctx, p.FilterString); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.filterString (7) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:filterString: ", p), err) } + } + return err +} + +func (p *TScan) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetBatchSize() { + if err := oprot.WriteFieldBegin(ctx, "batchSize", thrift.I32, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:batchSize: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.BatchSize)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.batchSize (8) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:batchSize: ", p), err) } + } + return err +} + +func (p *TScan) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetAttributes() { + if err := oprot.WriteFieldBegin(ctx, "attributes", thrift.MAP, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:attributes: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Attributes)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.Attributes { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteBinary(ctx, v); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:attributes: ", p), err) } + } + return err +} + +func (p *TScan) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetAuthorizations() { + if err := oprot.WriteFieldBegin(ctx, "authorizations", thrift.STRUCT, 10); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:authorizations: ", p), err) } + if err := p.Authorizations.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Authorizations), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 10:authorizations: ", p), err) } + } + return err +} + +func (p *TScan) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetReversed() { + if err := oprot.WriteFieldBegin(ctx, "reversed", thrift.BOOL, 11); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:reversed: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.Reversed)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.reversed (11) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 11:reversed: ", p), err) } + } + return err +} + +func (p *TScan) writeField12(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetCacheBlocks() { + if err := oprot.WriteFieldBegin(ctx, "cacheBlocks", thrift.BOOL, 12); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 12:cacheBlocks: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.CacheBlocks)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.cacheBlocks (12) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 12:cacheBlocks: ", p), err) } + } + return err +} + +func (p *TScan) writeField13(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetColFamTimeRangeMap() { + if err := oprot.WriteFieldBegin(ctx, "colFamTimeRangeMap", thrift.MAP, 13); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 13:colFamTimeRangeMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRUCT, len(p.ColFamTimeRangeMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ColFamTimeRangeMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 13:colFamTimeRangeMap: ", p), err) } + } + return err +} + +func (p *TScan) writeField14(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetReadType() { + if err := oprot.WriteFieldBegin(ctx, "readType", thrift.I32, 14); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 14:readType: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.ReadType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.readType (14) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 14:readType: ", p), err) } + } + return err +} + +func (p *TScan) writeField15(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetLimit() { + if err := oprot.WriteFieldBegin(ctx, "limit", thrift.I32, 15); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 15:limit: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.Limit)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.limit (15) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 15:limit: ", p), err) } + } + return err +} + +func (p *TScan) writeField16(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetConsistency() { + if err := oprot.WriteFieldBegin(ctx, "consistency", thrift.I32, 16); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 16:consistency: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.Consistency)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.consistency (16) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 16:consistency: ", p), err) } + } + return err +} + +func (p *TScan) writeField17(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTargetReplicaId() { + if err := oprot.WriteFieldBegin(ctx, "targetReplicaId", thrift.I32, 17); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 17:targetReplicaId: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.TargetReplicaId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.targetReplicaId (17) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 17:targetReplicaId: ", p), err) } + } + return err +} + +func (p *TScan) writeField18(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetFilterBytes() { + if err := oprot.WriteFieldBegin(ctx, "filterBytes", thrift.STRING, 18); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 18:filterBytes: ", p), err) } + if err := oprot.WriteBinary(ctx, p.FilterBytes); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.filterBytes (18) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 18:filterBytes: ", p), err) } + } + return err +} + +func (p *TScan) Equals(other *TScan) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if bytes.Compare(p.StartRow, other.StartRow) != 0 { return false } + if bytes.Compare(p.StopRow, other.StopRow) != 0 { return false } + if len(p.Columns) != len(other.Columns) { return false } + for i, _tgt := range p.Columns { + _src34 := other.Columns[i] + if !_tgt.Equals(_src34) { return false } + } + if p.Caching != other.Caching { + if p.Caching == nil || other.Caching == nil { + return false + } + if (*p.Caching) != (*other.Caching) { return false } + } + if p.MaxVersions != other.MaxVersions { return false } + if !p.TimeRange.Equals(other.TimeRange) { return false } + if bytes.Compare(p.FilterString, other.FilterString) != 0 { return false } + if p.BatchSize != other.BatchSize { + if p.BatchSize == nil || other.BatchSize == nil { + return false + } + if (*p.BatchSize) != (*other.BatchSize) { return false } + } + if len(p.Attributes) != len(other.Attributes) { return false } + for k, _tgt := range p.Attributes { + _src35 := other.Attributes[k] + if bytes.Compare(_tgt, _src35) != 0 { return false } + } + if !p.Authorizations.Equals(other.Authorizations) { return false } + if p.Reversed != other.Reversed { + if p.Reversed == nil || other.Reversed == nil { + return false + } + if (*p.Reversed) != (*other.Reversed) { return false } + } + if p.CacheBlocks != other.CacheBlocks { + if p.CacheBlocks == nil || other.CacheBlocks == nil { + return false + } + if (*p.CacheBlocks) != (*other.CacheBlocks) { return false } + } + if len(p.ColFamTimeRangeMap) != len(other.ColFamTimeRangeMap) { return false } + for k, _tgt := range p.ColFamTimeRangeMap { + _src36 := other.ColFamTimeRangeMap[k] + if !_tgt.Equals(_src36) { return false } + } + if p.ReadType != other.ReadType { + if p.ReadType == nil || other.ReadType == nil { + return false + } + if (*p.ReadType) != (*other.ReadType) { return false } + } + if p.Limit != other.Limit { + if p.Limit == nil || other.Limit == nil { + return false + } + if (*p.Limit) != (*other.Limit) { return false } + } + if p.Consistency != other.Consistency { + if p.Consistency == nil || other.Consistency == nil { + return false + } + if (*p.Consistency) != (*other.Consistency) { return false } + } + if p.TargetReplicaId != other.TargetReplicaId { + if p.TargetReplicaId == nil || other.TargetReplicaId == nil { + return false + } + if (*p.TargetReplicaId) != (*other.TargetReplicaId) { return false } + } + if bytes.Compare(p.FilterBytes, other.FilterBytes) != 0 { return false } + return true +} + +func (p *TScan) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TScan(%+v)", *p) +} + +// Atomic mutation for the specified row. It can be either Put or Delete. +// +// Attributes: +// - Put +// - DeleteSingle +type TMutation struct { + Put *TPut `thrift:"put,1" db:"put" json:"put,omitempty"` + DeleteSingle *TDelete `thrift:"deleteSingle,2" db:"deleteSingle" json:"deleteSingle,omitempty"` +} + +func NewTMutation() *TMutation { + return &TMutation{} +} + +var TMutation_Put_DEFAULT *TPut +func (p *TMutation) GetPut() *TPut { + if !p.IsSetPut() { + return TMutation_Put_DEFAULT + } +return p.Put +} +var TMutation_DeleteSingle_DEFAULT *TDelete +func (p *TMutation) GetDeleteSingle() *TDelete { + if !p.IsSetDeleteSingle() { + return TMutation_DeleteSingle_DEFAULT + } +return p.DeleteSingle +} +func (p *TMutation) CountSetFieldsTMutation() int { + count := 0 + if (p.IsSetPut()) { + count++ + } + if (p.IsSetDeleteSingle()) { + count++ + } + return count + +} + +func (p *TMutation) IsSetPut() bool { + return p.Put != nil +} + +func (p *TMutation) IsSetDeleteSingle() bool { + return p.DeleteSingle != nil +} + +func (p *TMutation) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TMutation) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Put = &TPut{} + if err := p.Put.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Put), err) + } + return nil +} + +func (p *TMutation) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.DeleteSingle = &TDelete{ + DeleteType: 1, +} + if err := p.DeleteSingle.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.DeleteSingle), err) + } + return nil +} + +func (p *TMutation) Write(ctx context.Context, oprot thrift.TProtocol) error { + if c := p.CountSetFieldsTMutation(); c != 1 { + return fmt.Errorf("%T write union: exactly one field must be set (%d set)", p, c) + } + if err := oprot.WriteStructBegin(ctx, "TMutation"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TMutation) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetPut() { + if err := oprot.WriteFieldBegin(ctx, "put", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:put: ", p), err) } + if err := p.Put.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Put), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:put: ", p), err) } + } + return err +} + +func (p *TMutation) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetDeleteSingle() { + if err := oprot.WriteFieldBegin(ctx, "deleteSingle", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:deleteSingle: ", p), err) } + if err := p.DeleteSingle.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.DeleteSingle), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:deleteSingle: ", p), err) } + } + return err +} + +func (p *TMutation) Equals(other *TMutation) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Put.Equals(other.Put) { return false } + if !p.DeleteSingle.Equals(other.DeleteSingle) { return false } + return true +} + +func (p *TMutation) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TMutation(%+v)", *p) +} + +// A TRowMutations object is used to apply a number of Mutations to a single row. +// +// Attributes: +// - Row +// - Mutations +type TRowMutations struct { + Row []byte `thrift:"row,1,required" db:"row" json:"row"` + Mutations []*TMutation `thrift:"mutations,2,required" db:"mutations" json:"mutations"` +} + +func NewTRowMutations() *TRowMutations { + return &TRowMutations{} +} + + +func (p *TRowMutations) GetRow() []byte { + return p.Row +} + +func (p *TRowMutations) GetMutations() []*TMutation { + return p.Mutations +} +func (p *TRowMutations) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetRow bool = false; + var issetMutations bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetRow = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.LIST { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetMutations = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetRow{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Row is not set")); + } + if !issetMutations{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Mutations is not set")); + } + return nil +} + +func (p *TRowMutations) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Row = v +} + return nil +} + +func (p *TRowMutations) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TMutation, 0, size) + p.Mutations = tSlice + for i := 0; i < size; i ++ { + _elem37 := &TMutation{} + if err := _elem37.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem37), err) + } + p.Mutations = append(p.Mutations, _elem37) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TRowMutations) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TRowMutations"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TRowMutations) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "row", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:row: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Row); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.row (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:row: ", p), err) } + return err +} + +func (p *TRowMutations) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "mutations", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:mutations: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Mutations)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Mutations { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:mutations: ", p), err) } + return err +} + +func (p *TRowMutations) Equals(other *TRowMutations) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if bytes.Compare(p.Row, other.Row) != 0 { return false } + if len(p.Mutations) != len(other.Mutations) { return false } + for i, _tgt := range p.Mutations { + _src38 := other.Mutations[i] + if !_tgt.Equals(_src38) { return false } + } + return true +} + +func (p *TRowMutations) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TRowMutations(%+v)", *p) +} + +// Attributes: +// - RegionId +// - TableName +// - StartKey +// - EndKey +// - Offline +// - Split +// - ReplicaId +type THRegionInfo struct { + RegionId int64 `thrift:"regionId,1,required" db:"regionId" json:"regionId"` + TableName []byte `thrift:"tableName,2,required" db:"tableName" json:"tableName"` + StartKey []byte `thrift:"startKey,3" db:"startKey" json:"startKey,omitempty"` + EndKey []byte `thrift:"endKey,4" db:"endKey" json:"endKey,omitempty"` + Offline *bool `thrift:"offline,5" db:"offline" json:"offline,omitempty"` + Split *bool `thrift:"split,6" db:"split" json:"split,omitempty"` + ReplicaId *int32 `thrift:"replicaId,7" db:"replicaId" json:"replicaId,omitempty"` +} + +func NewTHRegionInfo() *THRegionInfo { + return &THRegionInfo{} +} + + +func (p *THRegionInfo) GetRegionId() int64 { + return p.RegionId +} + +func (p *THRegionInfo) GetTableName() []byte { + return p.TableName +} +var THRegionInfo_StartKey_DEFAULT []byte + +func (p *THRegionInfo) GetStartKey() []byte { + return p.StartKey +} +var THRegionInfo_EndKey_DEFAULT []byte + +func (p *THRegionInfo) GetEndKey() []byte { + return p.EndKey +} +var THRegionInfo_Offline_DEFAULT bool +func (p *THRegionInfo) GetOffline() bool { + if !p.IsSetOffline() { + return THRegionInfo_Offline_DEFAULT + } +return *p.Offline +} +var THRegionInfo_Split_DEFAULT bool +func (p *THRegionInfo) GetSplit() bool { + if !p.IsSetSplit() { + return THRegionInfo_Split_DEFAULT + } +return *p.Split +} +var THRegionInfo_ReplicaId_DEFAULT int32 +func (p *THRegionInfo) GetReplicaId() int32 { + if !p.IsSetReplicaId() { + return THRegionInfo_ReplicaId_DEFAULT + } +return *p.ReplicaId +} +func (p *THRegionInfo) IsSetStartKey() bool { + return p.StartKey != nil +} + +func (p *THRegionInfo) IsSetEndKey() bool { + return p.EndKey != nil +} + +func (p *THRegionInfo) IsSetOffline() bool { + return p.Offline != nil +} + +func (p *THRegionInfo) IsSetSplit() bool { + return p.Split != nil +} + +func (p *THRegionInfo) IsSetReplicaId() bool { + return p.ReplicaId != nil +} + +func (p *THRegionInfo) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetRegionId bool = false; + var issetTableName bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.I64 { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetRegionId = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetTableName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.STRING { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.I32 { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetRegionId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field RegionId is not set")); + } + if !issetTableName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TableName is not set")); + } + return nil +} + +func (p *THRegionInfo) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.RegionId = v +} + return nil +} + +func (p *THRegionInfo) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.TableName = v +} + return nil +} + +func (p *THRegionInfo) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.StartKey = v +} + return nil +} + +func (p *THRegionInfo) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.EndKey = v +} + return nil +} + +func (p *THRegionInfo) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) +} else { + p.Offline = &v +} + return nil +} + +func (p *THRegionInfo) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) +} else { + p.Split = &v +} + return nil +} + +func (p *THRegionInfo) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 7: ", err) +} else { + p.ReplicaId = &v +} + return nil +} + +func (p *THRegionInfo) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "THRegionInfo"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THRegionInfo) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "regionId", thrift.I64, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:regionId: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.RegionId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.regionId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:regionId: ", p), err) } + return err +} + +func (p *THRegionInfo) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tableName", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tableName: ", p), err) } + if err := oprot.WriteBinary(ctx, p.TableName); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.tableName (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tableName: ", p), err) } + return err +} + +func (p *THRegionInfo) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetStartKey() { + if err := oprot.WriteFieldBegin(ctx, "startKey", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:startKey: ", p), err) } + if err := oprot.WriteBinary(ctx, p.StartKey); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.startKey (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:startKey: ", p), err) } + } + return err +} + +func (p *THRegionInfo) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetEndKey() { + if err := oprot.WriteFieldBegin(ctx, "endKey", thrift.STRING, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:endKey: ", p), err) } + if err := oprot.WriteBinary(ctx, p.EndKey); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.endKey (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:endKey: ", p), err) } + } + return err +} + +func (p *THRegionInfo) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetOffline() { + if err := oprot.WriteFieldBegin(ctx, "offline", thrift.BOOL, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:offline: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.Offline)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.offline (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:offline: ", p), err) } + } + return err +} + +func (p *THRegionInfo) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSplit() { + if err := oprot.WriteFieldBegin(ctx, "split", thrift.BOOL, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:split: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.Split)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.split (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:split: ", p), err) } + } + return err +} + +func (p *THRegionInfo) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetReplicaId() { + if err := oprot.WriteFieldBegin(ctx, "replicaId", thrift.I32, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:replicaId: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.ReplicaId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.replicaId (7) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:replicaId: ", p), err) } + } + return err +} + +func (p *THRegionInfo) Equals(other *THRegionInfo) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.RegionId != other.RegionId { return false } + if bytes.Compare(p.TableName, other.TableName) != 0 { return false } + if bytes.Compare(p.StartKey, other.StartKey) != 0 { return false } + if bytes.Compare(p.EndKey, other.EndKey) != 0 { return false } + if p.Offline != other.Offline { + if p.Offline == nil || other.Offline == nil { + return false + } + if (*p.Offline) != (*other.Offline) { return false } + } + if p.Split != other.Split { + if p.Split == nil || other.Split == nil { + return false + } + if (*p.Split) != (*other.Split) { return false } + } + if p.ReplicaId != other.ReplicaId { + if p.ReplicaId == nil || other.ReplicaId == nil { + return false + } + if (*p.ReplicaId) != (*other.ReplicaId) { return false } + } + return true +} + +func (p *THRegionInfo) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THRegionInfo(%+v)", *p) +} + +// Attributes: +// - HostName +// - Port +// - StartCode +type TServerName struct { + HostName string `thrift:"hostName,1,required" db:"hostName" json:"hostName"` + Port *int32 `thrift:"port,2" db:"port" json:"port,omitempty"` + StartCode *int64 `thrift:"startCode,3" db:"startCode" json:"startCode,omitempty"` +} + +func NewTServerName() *TServerName { + return &TServerName{} +} + + +func (p *TServerName) GetHostName() string { + return p.HostName +} +var TServerName_Port_DEFAULT int32 +func (p *TServerName) GetPort() int32 { + if !p.IsSetPort() { + return TServerName_Port_DEFAULT + } +return *p.Port +} +var TServerName_StartCode_DEFAULT int64 +func (p *TServerName) GetStartCode() int64 { + if !p.IsSetStartCode() { + return TServerName_StartCode_DEFAULT + } +return *p.StartCode +} +func (p *TServerName) IsSetPort() bool { + return p.Port != nil +} + +func (p *TServerName) IsSetStartCode() bool { + return p.StartCode != nil +} + +func (p *TServerName) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetHostName bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetHostName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.I32 { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.I64 { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetHostName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field HostName is not set")); + } + return nil +} + +func (p *TServerName) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.HostName = v +} + return nil +} + +func (p *TServerName) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Port = &v +} + return nil +} + +func (p *TServerName) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.StartCode = &v +} + return nil +} + +func (p *TServerName) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TServerName"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TServerName) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "hostName", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:hostName: ", p), err) } + if err := oprot.WriteString(ctx, string(p.HostName)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.hostName (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:hostName: ", p), err) } + return err +} + +func (p *TServerName) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetPort() { + if err := oprot.WriteFieldBegin(ctx, "port", thrift.I32, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:port: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.Port)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.port (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:port: ", p), err) } + } + return err +} + +func (p *TServerName) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetStartCode() { + if err := oprot.WriteFieldBegin(ctx, "startCode", thrift.I64, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:startCode: ", p), err) } + if err := oprot.WriteI64(ctx, int64(*p.StartCode)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.startCode (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:startCode: ", p), err) } + } + return err +} + +func (p *TServerName) Equals(other *TServerName) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.HostName != other.HostName { return false } + if p.Port != other.Port { + if p.Port == nil || other.Port == nil { + return false + } + if (*p.Port) != (*other.Port) { return false } + } + if p.StartCode != other.StartCode { + if p.StartCode == nil || other.StartCode == nil { + return false + } + if (*p.StartCode) != (*other.StartCode) { return false } + } + return true +} + +func (p *TServerName) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TServerName(%+v)", *p) +} + +// Attributes: +// - ServerName +// - RegionInfo +type THRegionLocation struct { + ServerName *TServerName `thrift:"serverName,1,required" db:"serverName" json:"serverName"` + RegionInfo *THRegionInfo `thrift:"regionInfo,2,required" db:"regionInfo" json:"regionInfo"` +} + +func NewTHRegionLocation() *THRegionLocation { + return &THRegionLocation{} +} + +var THRegionLocation_ServerName_DEFAULT *TServerName +func (p *THRegionLocation) GetServerName() *TServerName { + if !p.IsSetServerName() { + return THRegionLocation_ServerName_DEFAULT + } +return p.ServerName +} +var THRegionLocation_RegionInfo_DEFAULT *THRegionInfo +func (p *THRegionLocation) GetRegionInfo() *THRegionInfo { + if !p.IsSetRegionInfo() { + return THRegionLocation_RegionInfo_DEFAULT + } +return p.RegionInfo +} +func (p *THRegionLocation) IsSetServerName() bool { + return p.ServerName != nil +} + +func (p *THRegionLocation) IsSetRegionInfo() bool { + return p.RegionInfo != nil +} + +func (p *THRegionLocation) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetServerName bool = false; + var issetRegionInfo bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetServerName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetRegionInfo = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetServerName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ServerName is not set")); + } + if !issetRegionInfo{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field RegionInfo is not set")); + } + return nil +} + +func (p *THRegionLocation) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.ServerName = &TServerName{} + if err := p.ServerName.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ServerName), err) + } + return nil +} + +func (p *THRegionLocation) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.RegionInfo = &THRegionInfo{} + if err := p.RegionInfo.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.RegionInfo), err) + } + return nil +} + +func (p *THRegionLocation) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "THRegionLocation"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THRegionLocation) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "serverName", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:serverName: ", p), err) } + if err := p.ServerName.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ServerName), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:serverName: ", p), err) } + return err +} + +func (p *THRegionLocation) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "regionInfo", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:regionInfo: ", p), err) } + if err := p.RegionInfo.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.RegionInfo), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:regionInfo: ", p), err) } + return err +} + +func (p *THRegionLocation) Equals(other *THRegionLocation) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.ServerName.Equals(other.ServerName) { return false } + if !p.RegionInfo.Equals(other.RegionInfo) { return false } + return true +} + +func (p *THRegionLocation) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THRegionLocation(%+v)", *p) +} + +// Thrift wrapper around +// org.apache.hadoop.hbase.TableName +// +// Attributes: +// - Ns: namespace name +// - Qualifier: tablename +type TTableName struct { + Ns []byte `thrift:"ns,1" db:"ns" json:"ns,omitempty"` + Qualifier []byte `thrift:"qualifier,2,required" db:"qualifier" json:"qualifier"` +} + +func NewTTableName() *TTableName { + return &TTableName{} +} + +var TTableName_Ns_DEFAULT []byte + +func (p *TTableName) GetNs() []byte { + return p.Ns +} + +func (p *TTableName) GetQualifier() []byte { + return p.Qualifier +} +func (p *TTableName) IsSetNs() bool { + return p.Ns != nil +} + +func (p *TTableName) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetQualifier bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetQualifier = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetQualifier{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Qualifier is not set")); + } + return nil +} + +func (p *TTableName) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Ns = v +} + return nil +} + +func (p *TTableName) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Qualifier = v +} + return nil +} + +func (p *TTableName) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TTableName"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TTableName) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetNs() { + if err := oprot.WriteFieldBegin(ctx, "ns", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:ns: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Ns); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.ns (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:ns: ", p), err) } + } + return err +} + +func (p *TTableName) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "qualifier", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:qualifier: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Qualifier); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.qualifier (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:qualifier: ", p), err) } + return err +} + +func (p *TTableName) Equals(other *TTableName) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if bytes.Compare(p.Ns, other.Ns) != 0 { return false } + if bytes.Compare(p.Qualifier, other.Qualifier) != 0 { return false } + return true +} + +func (p *TTableName) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TTableName(%+v)", *p) +} + +// Thrift wrapper around +// org.apache.hadoop.hbase.client.ColumnFamilyDescriptor +// +// Attributes: +// - Name +// - Attributes +// - Configuration +// - BlockSize +// - BloomnFilterType +// - CompressionType +// - DfsReplication +// - DataBlockEncoding +// - KeepDeletedCells +// - MaxVersions +// - MinVersions +// - Scope +// - TimeToLive +// - BlockCacheEnabled +// - CacheBloomsOnWrite +// - CacheDataOnWrite +// - CacheIndexesOnWrite +// - CompressTags +// - EvictBlocksOnClose +// - InMemory +type TColumnFamilyDescriptor struct { + Name []byte `thrift:"name,1,required" db:"name" json:"name"` + Attributes map[string][]byte `thrift:"attributes,2" db:"attributes" json:"attributes,omitempty"` + Configuration map[string]string `thrift:"configuration,3" db:"configuration" json:"configuration,omitempty"` + BlockSize *int32 `thrift:"blockSize,4" db:"blockSize" json:"blockSize,omitempty"` + BloomnFilterType *TBloomFilterType `thrift:"bloomnFilterType,5" db:"bloomnFilterType" json:"bloomnFilterType,omitempty"` + CompressionType *TCompressionAlgorithm `thrift:"compressionType,6" db:"compressionType" json:"compressionType,omitempty"` + DfsReplication *int16 `thrift:"dfsReplication,7" db:"dfsReplication" json:"dfsReplication,omitempty"` + DataBlockEncoding *TDataBlockEncoding `thrift:"dataBlockEncoding,8" db:"dataBlockEncoding" json:"dataBlockEncoding,omitempty"` + KeepDeletedCells *TKeepDeletedCells `thrift:"keepDeletedCells,9" db:"keepDeletedCells" json:"keepDeletedCells,omitempty"` + MaxVersions *int32 `thrift:"maxVersions,10" db:"maxVersions" json:"maxVersions,omitempty"` + MinVersions *int32 `thrift:"minVersions,11" db:"minVersions" json:"minVersions,omitempty"` + Scope *int32 `thrift:"scope,12" db:"scope" json:"scope,omitempty"` + TimeToLive *int32 `thrift:"timeToLive,13" db:"timeToLive" json:"timeToLive,omitempty"` + BlockCacheEnabled *bool `thrift:"blockCacheEnabled,14" db:"blockCacheEnabled" json:"blockCacheEnabled,omitempty"` + CacheBloomsOnWrite *bool `thrift:"cacheBloomsOnWrite,15" db:"cacheBloomsOnWrite" json:"cacheBloomsOnWrite,omitempty"` + CacheDataOnWrite *bool `thrift:"cacheDataOnWrite,16" db:"cacheDataOnWrite" json:"cacheDataOnWrite,omitempty"` + CacheIndexesOnWrite *bool `thrift:"cacheIndexesOnWrite,17" db:"cacheIndexesOnWrite" json:"cacheIndexesOnWrite,omitempty"` + CompressTags *bool `thrift:"compressTags,18" db:"compressTags" json:"compressTags,omitempty"` + EvictBlocksOnClose *bool `thrift:"evictBlocksOnClose,19" db:"evictBlocksOnClose" json:"evictBlocksOnClose,omitempty"` + InMemory *bool `thrift:"inMemory,20" db:"inMemory" json:"inMemory,omitempty"` +} + +func NewTColumnFamilyDescriptor() *TColumnFamilyDescriptor { + return &TColumnFamilyDescriptor{} +} + + +func (p *TColumnFamilyDescriptor) GetName() []byte { + return p.Name +} +var TColumnFamilyDescriptor_Attributes_DEFAULT map[string][]byte + +func (p *TColumnFamilyDescriptor) GetAttributes() map[string][]byte { + return p.Attributes +} +var TColumnFamilyDescriptor_Configuration_DEFAULT map[string]string + +func (p *TColumnFamilyDescriptor) GetConfiguration() map[string]string { + return p.Configuration +} +var TColumnFamilyDescriptor_BlockSize_DEFAULT int32 +func (p *TColumnFamilyDescriptor) GetBlockSize() int32 { + if !p.IsSetBlockSize() { + return TColumnFamilyDescriptor_BlockSize_DEFAULT + } +return *p.BlockSize +} +var TColumnFamilyDescriptor_BloomnFilterType_DEFAULT TBloomFilterType +func (p *TColumnFamilyDescriptor) GetBloomnFilterType() TBloomFilterType { + if !p.IsSetBloomnFilterType() { + return TColumnFamilyDescriptor_BloomnFilterType_DEFAULT + } +return *p.BloomnFilterType +} +var TColumnFamilyDescriptor_CompressionType_DEFAULT TCompressionAlgorithm +func (p *TColumnFamilyDescriptor) GetCompressionType() TCompressionAlgorithm { + if !p.IsSetCompressionType() { + return TColumnFamilyDescriptor_CompressionType_DEFAULT + } +return *p.CompressionType +} +var TColumnFamilyDescriptor_DfsReplication_DEFAULT int16 +func (p *TColumnFamilyDescriptor) GetDfsReplication() int16 { + if !p.IsSetDfsReplication() { + return TColumnFamilyDescriptor_DfsReplication_DEFAULT + } +return *p.DfsReplication +} +var TColumnFamilyDescriptor_DataBlockEncoding_DEFAULT TDataBlockEncoding +func (p *TColumnFamilyDescriptor) GetDataBlockEncoding() TDataBlockEncoding { + if !p.IsSetDataBlockEncoding() { + return TColumnFamilyDescriptor_DataBlockEncoding_DEFAULT + } +return *p.DataBlockEncoding +} +var TColumnFamilyDescriptor_KeepDeletedCells_DEFAULT TKeepDeletedCells +func (p *TColumnFamilyDescriptor) GetKeepDeletedCells() TKeepDeletedCells { + if !p.IsSetKeepDeletedCells() { + return TColumnFamilyDescriptor_KeepDeletedCells_DEFAULT + } +return *p.KeepDeletedCells +} +var TColumnFamilyDescriptor_MaxVersions_DEFAULT int32 +func (p *TColumnFamilyDescriptor) GetMaxVersions() int32 { + if !p.IsSetMaxVersions() { + return TColumnFamilyDescriptor_MaxVersions_DEFAULT + } +return *p.MaxVersions +} +var TColumnFamilyDescriptor_MinVersions_DEFAULT int32 +func (p *TColumnFamilyDescriptor) GetMinVersions() int32 { + if !p.IsSetMinVersions() { + return TColumnFamilyDescriptor_MinVersions_DEFAULT + } +return *p.MinVersions +} +var TColumnFamilyDescriptor_Scope_DEFAULT int32 +func (p *TColumnFamilyDescriptor) GetScope() int32 { + if !p.IsSetScope() { + return TColumnFamilyDescriptor_Scope_DEFAULT + } +return *p.Scope +} +var TColumnFamilyDescriptor_TimeToLive_DEFAULT int32 +func (p *TColumnFamilyDescriptor) GetTimeToLive() int32 { + if !p.IsSetTimeToLive() { + return TColumnFamilyDescriptor_TimeToLive_DEFAULT + } +return *p.TimeToLive +} +var TColumnFamilyDescriptor_BlockCacheEnabled_DEFAULT bool +func (p *TColumnFamilyDescriptor) GetBlockCacheEnabled() bool { + if !p.IsSetBlockCacheEnabled() { + return TColumnFamilyDescriptor_BlockCacheEnabled_DEFAULT + } +return *p.BlockCacheEnabled +} +var TColumnFamilyDescriptor_CacheBloomsOnWrite_DEFAULT bool +func (p *TColumnFamilyDescriptor) GetCacheBloomsOnWrite() bool { + if !p.IsSetCacheBloomsOnWrite() { + return TColumnFamilyDescriptor_CacheBloomsOnWrite_DEFAULT + } +return *p.CacheBloomsOnWrite +} +var TColumnFamilyDescriptor_CacheDataOnWrite_DEFAULT bool +func (p *TColumnFamilyDescriptor) GetCacheDataOnWrite() bool { + if !p.IsSetCacheDataOnWrite() { + return TColumnFamilyDescriptor_CacheDataOnWrite_DEFAULT + } +return *p.CacheDataOnWrite +} +var TColumnFamilyDescriptor_CacheIndexesOnWrite_DEFAULT bool +func (p *TColumnFamilyDescriptor) GetCacheIndexesOnWrite() bool { + if !p.IsSetCacheIndexesOnWrite() { + return TColumnFamilyDescriptor_CacheIndexesOnWrite_DEFAULT + } +return *p.CacheIndexesOnWrite +} +var TColumnFamilyDescriptor_CompressTags_DEFAULT bool +func (p *TColumnFamilyDescriptor) GetCompressTags() bool { + if !p.IsSetCompressTags() { + return TColumnFamilyDescriptor_CompressTags_DEFAULT + } +return *p.CompressTags +} +var TColumnFamilyDescriptor_EvictBlocksOnClose_DEFAULT bool +func (p *TColumnFamilyDescriptor) GetEvictBlocksOnClose() bool { + if !p.IsSetEvictBlocksOnClose() { + return TColumnFamilyDescriptor_EvictBlocksOnClose_DEFAULT + } +return *p.EvictBlocksOnClose +} +var TColumnFamilyDescriptor_InMemory_DEFAULT bool +func (p *TColumnFamilyDescriptor) GetInMemory() bool { + if !p.IsSetInMemory() { + return TColumnFamilyDescriptor_InMemory_DEFAULT + } +return *p.InMemory +} +func (p *TColumnFamilyDescriptor) IsSetAttributes() bool { + return p.Attributes != nil +} + +func (p *TColumnFamilyDescriptor) IsSetConfiguration() bool { + return p.Configuration != nil +} + +func (p *TColumnFamilyDescriptor) IsSetBlockSize() bool { + return p.BlockSize != nil +} + +func (p *TColumnFamilyDescriptor) IsSetBloomnFilterType() bool { + return p.BloomnFilterType != nil +} + +func (p *TColumnFamilyDescriptor) IsSetCompressionType() bool { + return p.CompressionType != nil +} + +func (p *TColumnFamilyDescriptor) IsSetDfsReplication() bool { + return p.DfsReplication != nil +} + +func (p *TColumnFamilyDescriptor) IsSetDataBlockEncoding() bool { + return p.DataBlockEncoding != nil +} + +func (p *TColumnFamilyDescriptor) IsSetKeepDeletedCells() bool { + return p.KeepDeletedCells != nil +} + +func (p *TColumnFamilyDescriptor) IsSetMaxVersions() bool { + return p.MaxVersions != nil +} + +func (p *TColumnFamilyDescriptor) IsSetMinVersions() bool { + return p.MinVersions != nil +} + +func (p *TColumnFamilyDescriptor) IsSetScope() bool { + return p.Scope != nil +} + +func (p *TColumnFamilyDescriptor) IsSetTimeToLive() bool { + return p.TimeToLive != nil +} + +func (p *TColumnFamilyDescriptor) IsSetBlockCacheEnabled() bool { + return p.BlockCacheEnabled != nil +} + +func (p *TColumnFamilyDescriptor) IsSetCacheBloomsOnWrite() bool { + return p.CacheBloomsOnWrite != nil +} + +func (p *TColumnFamilyDescriptor) IsSetCacheDataOnWrite() bool { + return p.CacheDataOnWrite != nil +} + +func (p *TColumnFamilyDescriptor) IsSetCacheIndexesOnWrite() bool { + return p.CacheIndexesOnWrite != nil +} + +func (p *TColumnFamilyDescriptor) IsSetCompressTags() bool { + return p.CompressTags != nil +} + +func (p *TColumnFamilyDescriptor) IsSetEvictBlocksOnClose() bool { + return p.EvictBlocksOnClose != nil +} + +func (p *TColumnFamilyDescriptor) IsSetInMemory() bool { + return p.InMemory != nil +} + +func (p *TColumnFamilyDescriptor) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetName bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.MAP { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.MAP { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.I32 { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.I32 { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.I32 { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.I16 { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 8: + if fieldTypeId == thrift.I32 { + if err := p.ReadField8(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 9: + if fieldTypeId == thrift.I32 { + if err := p.ReadField9(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 10: + if fieldTypeId == thrift.I32 { + if err := p.ReadField10(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 11: + if fieldTypeId == thrift.I32 { + if err := p.ReadField11(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 12: + if fieldTypeId == thrift.I32 { + if err := p.ReadField12(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 13: + if fieldTypeId == thrift.I32 { + if err := p.ReadField13(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 14: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField14(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 15: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField15(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 16: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField16(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 17: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField17(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 18: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField18(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 19: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField19(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 20: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField20(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set")); + } + return nil +} + +func (p *TColumnFamilyDescriptor) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Name = v +} + return nil +} + +func (p *TColumnFamilyDescriptor) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string][]byte, size) + p.Attributes = tMap + for i := 0; i < size; i ++ { +var _key39 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key39 = v +} +var _val40 []byte + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val40 = v +} + p.Attributes[_key39] = _val40 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TColumnFamilyDescriptor) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.Configuration = tMap + for i := 0; i < size; i ++ { +var _key41 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key41 = v +} +var _val42 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val42 = v +} + p.Configuration[_key41] = _val42 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TColumnFamilyDescriptor) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.BlockSize = &v +} + return nil +} + +func (p *TColumnFamilyDescriptor) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) +} else { + temp := TBloomFilterType(v) + p.BloomnFilterType = &temp +} + return nil +} + +func (p *TColumnFamilyDescriptor) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) +} else { + temp := TCompressionAlgorithm(v) + p.CompressionType = &temp +} + return nil +} + +func (p *TColumnFamilyDescriptor) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI16(ctx); err != nil { + return thrift.PrependError("error reading field 7: ", err) +} else { + p.DfsReplication = &v +} + return nil +} + +func (p *TColumnFamilyDescriptor) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 8: ", err) +} else { + temp := TDataBlockEncoding(v) + p.DataBlockEncoding = &temp +} + return nil +} + +func (p *TColumnFamilyDescriptor) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 9: ", err) +} else { + temp := TKeepDeletedCells(v) + p.KeepDeletedCells = &temp +} + return nil +} + +func (p *TColumnFamilyDescriptor) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 10: ", err) +} else { + p.MaxVersions = &v +} + return nil +} + +func (p *TColumnFamilyDescriptor) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 11: ", err) +} else { + p.MinVersions = &v +} + return nil +} + +func (p *TColumnFamilyDescriptor) ReadField12(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 12: ", err) +} else { + p.Scope = &v +} + return nil +} + +func (p *TColumnFamilyDescriptor) ReadField13(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 13: ", err) +} else { + p.TimeToLive = &v +} + return nil +} + +func (p *TColumnFamilyDescriptor) ReadField14(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 14: ", err) +} else { + p.BlockCacheEnabled = &v +} + return nil +} + +func (p *TColumnFamilyDescriptor) ReadField15(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 15: ", err) +} else { + p.CacheBloomsOnWrite = &v +} + return nil +} + +func (p *TColumnFamilyDescriptor) ReadField16(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 16: ", err) +} else { + p.CacheDataOnWrite = &v +} + return nil +} + +func (p *TColumnFamilyDescriptor) ReadField17(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 17: ", err) +} else { + p.CacheIndexesOnWrite = &v +} + return nil +} + +func (p *TColumnFamilyDescriptor) ReadField18(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 18: ", err) +} else { + p.CompressTags = &v +} + return nil +} + +func (p *TColumnFamilyDescriptor) ReadField19(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 19: ", err) +} else { + p.EvictBlocksOnClose = &v +} + return nil +} + +func (p *TColumnFamilyDescriptor) ReadField20(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 20: ", err) +} else { + p.InMemory = &v +} + return nil +} + +func (p *TColumnFamilyDescriptor) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TColumnFamilyDescriptor"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + if err := p.writeField8(ctx, oprot); err != nil { return err } + if err := p.writeField9(ctx, oprot); err != nil { return err } + if err := p.writeField10(ctx, oprot); err != nil { return err } + if err := p.writeField11(ctx, oprot); err != nil { return err } + if err := p.writeField12(ctx, oprot); err != nil { return err } + if err := p.writeField13(ctx, oprot); err != nil { return err } + if err := p.writeField14(ctx, oprot); err != nil { return err } + if err := p.writeField15(ctx, oprot); err != nil { return err } + if err := p.writeField16(ctx, oprot); err != nil { return err } + if err := p.writeField17(ctx, oprot); err != nil { return err } + if err := p.writeField18(ctx, oprot); err != nil { return err } + if err := p.writeField19(ctx, oprot); err != nil { return err } + if err := p.writeField20(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TColumnFamilyDescriptor) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Name); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.name (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } + return err +} + +func (p *TColumnFamilyDescriptor) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetAttributes() { + if err := oprot.WriteFieldBegin(ctx, "attributes", thrift.MAP, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:attributes: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Attributes)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.Attributes { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteBinary(ctx, v); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:attributes: ", p), err) } + } + return err +} + +func (p *TColumnFamilyDescriptor) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetConfiguration() { + if err := oprot.WriteFieldBegin(ctx, "configuration", thrift.MAP, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:configuration: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Configuration)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.Configuration { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:configuration: ", p), err) } + } + return err +} + +func (p *TColumnFamilyDescriptor) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetBlockSize() { + if err := oprot.WriteFieldBegin(ctx, "blockSize", thrift.I32, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:blockSize: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.BlockSize)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.blockSize (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:blockSize: ", p), err) } + } + return err +} + +func (p *TColumnFamilyDescriptor) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetBloomnFilterType() { + if err := oprot.WriteFieldBegin(ctx, "bloomnFilterType", thrift.I32, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:bloomnFilterType: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.BloomnFilterType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.bloomnFilterType (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:bloomnFilterType: ", p), err) } + } + return err +} + +func (p *TColumnFamilyDescriptor) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetCompressionType() { + if err := oprot.WriteFieldBegin(ctx, "compressionType", thrift.I32, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:compressionType: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.CompressionType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.compressionType (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:compressionType: ", p), err) } + } + return err +} + +func (p *TColumnFamilyDescriptor) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetDfsReplication() { + if err := oprot.WriteFieldBegin(ctx, "dfsReplication", thrift.I16, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:dfsReplication: ", p), err) } + if err := oprot.WriteI16(ctx, int16(*p.DfsReplication)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.dfsReplication (7) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:dfsReplication: ", p), err) } + } + return err +} + +func (p *TColumnFamilyDescriptor) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetDataBlockEncoding() { + if err := oprot.WriteFieldBegin(ctx, "dataBlockEncoding", thrift.I32, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:dataBlockEncoding: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.DataBlockEncoding)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.dataBlockEncoding (8) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:dataBlockEncoding: ", p), err) } + } + return err +} + +func (p *TColumnFamilyDescriptor) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetKeepDeletedCells() { + if err := oprot.WriteFieldBegin(ctx, "keepDeletedCells", thrift.I32, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:keepDeletedCells: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.KeepDeletedCells)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.keepDeletedCells (9) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:keepDeletedCells: ", p), err) } + } + return err +} + +func (p *TColumnFamilyDescriptor) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetMaxVersions() { + if err := oprot.WriteFieldBegin(ctx, "maxVersions", thrift.I32, 10); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:maxVersions: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.MaxVersions)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.maxVersions (10) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 10:maxVersions: ", p), err) } + } + return err +} + +func (p *TColumnFamilyDescriptor) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetMinVersions() { + if err := oprot.WriteFieldBegin(ctx, "minVersions", thrift.I32, 11); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:minVersions: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.MinVersions)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.minVersions (11) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 11:minVersions: ", p), err) } + } + return err +} + +func (p *TColumnFamilyDescriptor) writeField12(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetScope() { + if err := oprot.WriteFieldBegin(ctx, "scope", thrift.I32, 12); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 12:scope: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.Scope)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.scope (12) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 12:scope: ", p), err) } + } + return err +} + +func (p *TColumnFamilyDescriptor) writeField13(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimeToLive() { + if err := oprot.WriteFieldBegin(ctx, "timeToLive", thrift.I32, 13); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 13:timeToLive: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.TimeToLive)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.timeToLive (13) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 13:timeToLive: ", p), err) } + } + return err +} + +func (p *TColumnFamilyDescriptor) writeField14(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetBlockCacheEnabled() { + if err := oprot.WriteFieldBegin(ctx, "blockCacheEnabled", thrift.BOOL, 14); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 14:blockCacheEnabled: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.BlockCacheEnabled)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.blockCacheEnabled (14) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 14:blockCacheEnabled: ", p), err) } + } + return err +} + +func (p *TColumnFamilyDescriptor) writeField15(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetCacheBloomsOnWrite() { + if err := oprot.WriteFieldBegin(ctx, "cacheBloomsOnWrite", thrift.BOOL, 15); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 15:cacheBloomsOnWrite: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.CacheBloomsOnWrite)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.cacheBloomsOnWrite (15) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 15:cacheBloomsOnWrite: ", p), err) } + } + return err +} + +func (p *TColumnFamilyDescriptor) writeField16(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetCacheDataOnWrite() { + if err := oprot.WriteFieldBegin(ctx, "cacheDataOnWrite", thrift.BOOL, 16); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 16:cacheDataOnWrite: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.CacheDataOnWrite)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.cacheDataOnWrite (16) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 16:cacheDataOnWrite: ", p), err) } + } + return err +} + +func (p *TColumnFamilyDescriptor) writeField17(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetCacheIndexesOnWrite() { + if err := oprot.WriteFieldBegin(ctx, "cacheIndexesOnWrite", thrift.BOOL, 17); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 17:cacheIndexesOnWrite: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.CacheIndexesOnWrite)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.cacheIndexesOnWrite (17) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 17:cacheIndexesOnWrite: ", p), err) } + } + return err +} + +func (p *TColumnFamilyDescriptor) writeField18(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetCompressTags() { + if err := oprot.WriteFieldBegin(ctx, "compressTags", thrift.BOOL, 18); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 18:compressTags: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.CompressTags)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.compressTags (18) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 18:compressTags: ", p), err) } + } + return err +} + +func (p *TColumnFamilyDescriptor) writeField19(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetEvictBlocksOnClose() { + if err := oprot.WriteFieldBegin(ctx, "evictBlocksOnClose", thrift.BOOL, 19); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 19:evictBlocksOnClose: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.EvictBlocksOnClose)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.evictBlocksOnClose (19) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 19:evictBlocksOnClose: ", p), err) } + } + return err +} + +func (p *TColumnFamilyDescriptor) writeField20(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetInMemory() { + if err := oprot.WriteFieldBegin(ctx, "inMemory", thrift.BOOL, 20); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 20:inMemory: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.InMemory)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.inMemory (20) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 20:inMemory: ", p), err) } + } + return err +} + +func (p *TColumnFamilyDescriptor) Equals(other *TColumnFamilyDescriptor) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if bytes.Compare(p.Name, other.Name) != 0 { return false } + if len(p.Attributes) != len(other.Attributes) { return false } + for k, _tgt := range p.Attributes { + _src43 := other.Attributes[k] + if bytes.Compare(_tgt, _src43) != 0 { return false } + } + if len(p.Configuration) != len(other.Configuration) { return false } + for k, _tgt := range p.Configuration { + _src44 := other.Configuration[k] + if _tgt != _src44 { return false } + } + if p.BlockSize != other.BlockSize { + if p.BlockSize == nil || other.BlockSize == nil { + return false + } + if (*p.BlockSize) != (*other.BlockSize) { return false } + } + if p.BloomnFilterType != other.BloomnFilterType { + if p.BloomnFilterType == nil || other.BloomnFilterType == nil { + return false + } + if (*p.BloomnFilterType) != (*other.BloomnFilterType) { return false } + } + if p.CompressionType != other.CompressionType { + if p.CompressionType == nil || other.CompressionType == nil { + return false + } + if (*p.CompressionType) != (*other.CompressionType) { return false } + } + if p.DfsReplication != other.DfsReplication { + if p.DfsReplication == nil || other.DfsReplication == nil { + return false + } + if (*p.DfsReplication) != (*other.DfsReplication) { return false } + } + if p.DataBlockEncoding != other.DataBlockEncoding { + if p.DataBlockEncoding == nil || other.DataBlockEncoding == nil { + return false + } + if (*p.DataBlockEncoding) != (*other.DataBlockEncoding) { return false } + } + if p.KeepDeletedCells != other.KeepDeletedCells { + if p.KeepDeletedCells == nil || other.KeepDeletedCells == nil { + return false + } + if (*p.KeepDeletedCells) != (*other.KeepDeletedCells) { return false } + } + if p.MaxVersions != other.MaxVersions { + if p.MaxVersions == nil || other.MaxVersions == nil { + return false + } + if (*p.MaxVersions) != (*other.MaxVersions) { return false } + } + if p.MinVersions != other.MinVersions { + if p.MinVersions == nil || other.MinVersions == nil { + return false + } + if (*p.MinVersions) != (*other.MinVersions) { return false } + } + if p.Scope != other.Scope { + if p.Scope == nil || other.Scope == nil { + return false + } + if (*p.Scope) != (*other.Scope) { return false } + } + if p.TimeToLive != other.TimeToLive { + if p.TimeToLive == nil || other.TimeToLive == nil { + return false + } + if (*p.TimeToLive) != (*other.TimeToLive) { return false } + } + if p.BlockCacheEnabled != other.BlockCacheEnabled { + if p.BlockCacheEnabled == nil || other.BlockCacheEnabled == nil { + return false + } + if (*p.BlockCacheEnabled) != (*other.BlockCacheEnabled) { return false } + } + if p.CacheBloomsOnWrite != other.CacheBloomsOnWrite { + if p.CacheBloomsOnWrite == nil || other.CacheBloomsOnWrite == nil { + return false + } + if (*p.CacheBloomsOnWrite) != (*other.CacheBloomsOnWrite) { return false } + } + if p.CacheDataOnWrite != other.CacheDataOnWrite { + if p.CacheDataOnWrite == nil || other.CacheDataOnWrite == nil { + return false + } + if (*p.CacheDataOnWrite) != (*other.CacheDataOnWrite) { return false } + } + if p.CacheIndexesOnWrite != other.CacheIndexesOnWrite { + if p.CacheIndexesOnWrite == nil || other.CacheIndexesOnWrite == nil { + return false + } + if (*p.CacheIndexesOnWrite) != (*other.CacheIndexesOnWrite) { return false } + } + if p.CompressTags != other.CompressTags { + if p.CompressTags == nil || other.CompressTags == nil { + return false + } + if (*p.CompressTags) != (*other.CompressTags) { return false } + } + if p.EvictBlocksOnClose != other.EvictBlocksOnClose { + if p.EvictBlocksOnClose == nil || other.EvictBlocksOnClose == nil { + return false + } + if (*p.EvictBlocksOnClose) != (*other.EvictBlocksOnClose) { return false } + } + if p.InMemory != other.InMemory { + if p.InMemory == nil || other.InMemory == nil { + return false + } + if (*p.InMemory) != (*other.InMemory) { return false } + } + return true +} + +func (p *TColumnFamilyDescriptor) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TColumnFamilyDescriptor(%+v)", *p) +} + +// Thrift wrapper around +// org.apache.hadoop.hbase.client.TableDescriptor +// +// Attributes: +// - TableName +// - Columns +// - Attributes +// - Durability +type TTableDescriptor struct { + TableName *TTableName `thrift:"tableName,1,required" db:"tableName" json:"tableName"` + Columns []*TColumnFamilyDescriptor `thrift:"columns,2" db:"columns" json:"columns,omitempty"` + Attributes map[string][]byte `thrift:"attributes,3" db:"attributes" json:"attributes,omitempty"` + Durability *TDurability `thrift:"durability,4" db:"durability" json:"durability,omitempty"` +} + +func NewTTableDescriptor() *TTableDescriptor { + return &TTableDescriptor{} +} + +var TTableDescriptor_TableName_DEFAULT *TTableName +func (p *TTableDescriptor) GetTableName() *TTableName { + if !p.IsSetTableName() { + return TTableDescriptor_TableName_DEFAULT + } +return p.TableName +} +var TTableDescriptor_Columns_DEFAULT []*TColumnFamilyDescriptor + +func (p *TTableDescriptor) GetColumns() []*TColumnFamilyDescriptor { + return p.Columns +} +var TTableDescriptor_Attributes_DEFAULT map[string][]byte + +func (p *TTableDescriptor) GetAttributes() map[string][]byte { + return p.Attributes +} +var TTableDescriptor_Durability_DEFAULT TDurability +func (p *TTableDescriptor) GetDurability() TDurability { + if !p.IsSetDurability() { + return TTableDescriptor_Durability_DEFAULT + } +return *p.Durability +} +func (p *TTableDescriptor) IsSetTableName() bool { + return p.TableName != nil +} + +func (p *TTableDescriptor) IsSetColumns() bool { + return p.Columns != nil +} + +func (p *TTableDescriptor) IsSetAttributes() bool { + return p.Attributes != nil +} + +func (p *TTableDescriptor) IsSetDurability() bool { + return p.Durability != nil +} + +func (p *TTableDescriptor) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTableName bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTableName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.LIST { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.MAP { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.I32 { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTableName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TableName is not set")); + } + return nil +} + +func (p *TTableDescriptor) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.TableName = &TTableName{} + if err := p.TableName.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TableName), err) + } + return nil +} + +func (p *TTableDescriptor) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TColumnFamilyDescriptor, 0, size) + p.Columns = tSlice + for i := 0; i < size; i ++ { + _elem45 := &TColumnFamilyDescriptor{} + if err := _elem45.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem45), err) + } + p.Columns = append(p.Columns, _elem45) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TTableDescriptor) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string][]byte, size) + p.Attributes = tMap + for i := 0; i < size; i ++ { +var _key46 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key46 = v +} +var _val47 []byte + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val47 = v +} + p.Attributes[_key46] = _val47 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TTableDescriptor) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + temp := TDurability(v) + p.Durability = &temp +} + return nil +} + +func (p *TTableDescriptor) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TTableDescriptor"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TTableDescriptor) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tableName", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tableName: ", p), err) } + if err := p.TableName.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TableName), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tableName: ", p), err) } + return err +} + +func (p *TTableDescriptor) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetColumns() { + if err := oprot.WriteFieldBegin(ctx, "columns", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:columns: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Columns)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Columns { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:columns: ", p), err) } + } + return err +} + +func (p *TTableDescriptor) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetAttributes() { + if err := oprot.WriteFieldBegin(ctx, "attributes", thrift.MAP, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:attributes: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Attributes)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.Attributes { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteBinary(ctx, v); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:attributes: ", p), err) } + } + return err +} + +func (p *TTableDescriptor) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetDurability() { + if err := oprot.WriteFieldBegin(ctx, "durability", thrift.I32, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:durability: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.Durability)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.durability (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:durability: ", p), err) } + } + return err +} + +func (p *TTableDescriptor) Equals(other *TTableDescriptor) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.TableName.Equals(other.TableName) { return false } + if len(p.Columns) != len(other.Columns) { return false } + for i, _tgt := range p.Columns { + _src48 := other.Columns[i] + if !_tgt.Equals(_src48) { return false } + } + if len(p.Attributes) != len(other.Attributes) { return false } + for k, _tgt := range p.Attributes { + _src49 := other.Attributes[k] + if bytes.Compare(_tgt, _src49) != 0 { return false } + } + if p.Durability != other.Durability { + if p.Durability == nil || other.Durability == nil { + return false + } + if (*p.Durability) != (*other.Durability) { return false } + } + return true +} + +func (p *TTableDescriptor) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TTableDescriptor(%+v)", *p) +} + +// Thrift wrapper around +// org.apache.hadoop.hbase.NamespaceDescriptor +// +// Attributes: +// - Name +// - Configuration +type TNamespaceDescriptor struct { + Name string `thrift:"name,1,required" db:"name" json:"name"` + Configuration map[string]string `thrift:"configuration,2" db:"configuration" json:"configuration,omitempty"` +} + +func NewTNamespaceDescriptor() *TNamespaceDescriptor { + return &TNamespaceDescriptor{} +} + + +func (p *TNamespaceDescriptor) GetName() string { + return p.Name +} +var TNamespaceDescriptor_Configuration_DEFAULT map[string]string + +func (p *TNamespaceDescriptor) GetConfiguration() map[string]string { + return p.Configuration +} +func (p *TNamespaceDescriptor) IsSetConfiguration() bool { + return p.Configuration != nil +} + +func (p *TNamespaceDescriptor) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetName bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.MAP { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set")); + } + return nil +} + +func (p *TNamespaceDescriptor) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Name = v +} + return nil +} + +func (p *TNamespaceDescriptor) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.Configuration = tMap + for i := 0; i < size; i ++ { +var _key50 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key50 = v +} +var _val51 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val51 = v +} + p.Configuration[_key50] = _val51 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TNamespaceDescriptor) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TNamespaceDescriptor"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TNamespaceDescriptor) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Name)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.name (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } + return err +} + +func (p *TNamespaceDescriptor) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetConfiguration() { + if err := oprot.WriteFieldBegin(ctx, "configuration", thrift.MAP, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:configuration: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.Configuration)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.Configuration { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:configuration: ", p), err) } + } + return err +} + +func (p *TNamespaceDescriptor) Equals(other *TNamespaceDescriptor) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Name != other.Name { return false } + if len(p.Configuration) != len(other.Configuration) { return false } + for k, _tgt := range p.Configuration { + _src52 := other.Configuration[k] + if _tgt != _src52 { return false } + } + return true +} + +func (p *TNamespaceDescriptor) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TNamespaceDescriptor(%+v)", *p) +} + +// Thrift wrapper around +// org.apache.hadoop.hbase.client.LogQueryFilter +// +// Attributes: +// - RegionName +// - ClientAddress +// - TableName +// - UserName +// - Limit +// - LogType +// - FilterByOperator +type TLogQueryFilter struct { + RegionName *string `thrift:"regionName,1" db:"regionName" json:"regionName,omitempty"` + ClientAddress *string `thrift:"clientAddress,2" db:"clientAddress" json:"clientAddress,omitempty"` + TableName *string `thrift:"tableName,3" db:"tableName" json:"tableName,omitempty"` + UserName *string `thrift:"userName,4" db:"userName" json:"userName,omitempty"` + Limit int32 `thrift:"limit,5" db:"limit" json:"limit"` + LogType TLogType `thrift:"logType,6" db:"logType" json:"logType"` + FilterByOperator TFilterByOperator `thrift:"filterByOperator,7" db:"filterByOperator" json:"filterByOperator"` +} + +func NewTLogQueryFilter() *TLogQueryFilter { + return &TLogQueryFilter{ +Limit: 10, + +LogType: 1, + +FilterByOperator: 1, +} +} + +var TLogQueryFilter_RegionName_DEFAULT string +func (p *TLogQueryFilter) GetRegionName() string { + if !p.IsSetRegionName() { + return TLogQueryFilter_RegionName_DEFAULT + } +return *p.RegionName +} +var TLogQueryFilter_ClientAddress_DEFAULT string +func (p *TLogQueryFilter) GetClientAddress() string { + if !p.IsSetClientAddress() { + return TLogQueryFilter_ClientAddress_DEFAULT + } +return *p.ClientAddress +} +var TLogQueryFilter_TableName_DEFAULT string +func (p *TLogQueryFilter) GetTableName() string { + if !p.IsSetTableName() { + return TLogQueryFilter_TableName_DEFAULT + } +return *p.TableName +} +var TLogQueryFilter_UserName_DEFAULT string +func (p *TLogQueryFilter) GetUserName() string { + if !p.IsSetUserName() { + return TLogQueryFilter_UserName_DEFAULT + } +return *p.UserName +} +var TLogQueryFilter_Limit_DEFAULT int32 = 10 + +func (p *TLogQueryFilter) GetLimit() int32 { + return p.Limit +} +var TLogQueryFilter_LogType_DEFAULT TLogType = 1 + +func (p *TLogQueryFilter) GetLogType() TLogType { + return p.LogType +} +var TLogQueryFilter_FilterByOperator_DEFAULT TFilterByOperator = 1 + +func (p *TLogQueryFilter) GetFilterByOperator() TFilterByOperator { + return p.FilterByOperator +} +func (p *TLogQueryFilter) IsSetRegionName() bool { + return p.RegionName != nil +} + +func (p *TLogQueryFilter) IsSetClientAddress() bool { + return p.ClientAddress != nil +} + +func (p *TLogQueryFilter) IsSetTableName() bool { + return p.TableName != nil +} + +func (p *TLogQueryFilter) IsSetUserName() bool { + return p.UserName != nil +} + +func (p *TLogQueryFilter) IsSetLimit() bool { + return p.Limit != TLogQueryFilter_Limit_DEFAULT +} + +func (p *TLogQueryFilter) IsSetLogType() bool { + return p.LogType != TLogQueryFilter_LogType_DEFAULT +} + +func (p *TLogQueryFilter) IsSetFilterByOperator() bool { + return p.FilterByOperator != TLogQueryFilter_FilterByOperator_DEFAULT +} + +func (p *TLogQueryFilter) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.STRING { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.I32 { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.I32 { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.I32 { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TLogQueryFilter) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.RegionName = &v +} + return nil +} + +func (p *TLogQueryFilter) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.ClientAddress = &v +} + return nil +} + +func (p *TLogQueryFilter) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.TableName = &v +} + return nil +} + +func (p *TLogQueryFilter) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.UserName = &v +} + return nil +} + +func (p *TLogQueryFilter) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) +} else { + p.Limit = v +} + return nil +} + +func (p *TLogQueryFilter) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) +} else { + temp := TLogType(v) + p.LogType = temp +} + return nil +} + +func (p *TLogQueryFilter) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 7: ", err) +} else { + temp := TFilterByOperator(v) + p.FilterByOperator = temp +} + return nil +} + +func (p *TLogQueryFilter) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TLogQueryFilter"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TLogQueryFilter) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetRegionName() { + if err := oprot.WriteFieldBegin(ctx, "regionName", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:regionName: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.RegionName)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.regionName (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:regionName: ", p), err) } + } + return err +} + +func (p *TLogQueryFilter) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetClientAddress() { + if err := oprot.WriteFieldBegin(ctx, "clientAddress", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:clientAddress: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.ClientAddress)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.clientAddress (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:clientAddress: ", p), err) } + } + return err +} + +func (p *TLogQueryFilter) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTableName() { + if err := oprot.WriteFieldBegin(ctx, "tableName", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:tableName: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.TableName)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.tableName (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:tableName: ", p), err) } + } + return err +} + +func (p *TLogQueryFilter) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetUserName() { + if err := oprot.WriteFieldBegin(ctx, "userName", thrift.STRING, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:userName: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.UserName)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.userName (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:userName: ", p), err) } + } + return err +} + +func (p *TLogQueryFilter) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetLimit() { + if err := oprot.WriteFieldBegin(ctx, "limit", thrift.I32, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:limit: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.Limit)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.limit (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:limit: ", p), err) } + } + return err +} + +func (p *TLogQueryFilter) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetLogType() { + if err := oprot.WriteFieldBegin(ctx, "logType", thrift.I32, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:logType: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.LogType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.logType (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:logType: ", p), err) } + } + return err +} + +func (p *TLogQueryFilter) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetFilterByOperator() { + if err := oprot.WriteFieldBegin(ctx, "filterByOperator", thrift.I32, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:filterByOperator: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.FilterByOperator)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.filterByOperator (7) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:filterByOperator: ", p), err) } + } + return err +} + +func (p *TLogQueryFilter) Equals(other *TLogQueryFilter) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.RegionName != other.RegionName { + if p.RegionName == nil || other.RegionName == nil { + return false + } + if (*p.RegionName) != (*other.RegionName) { return false } + } + if p.ClientAddress != other.ClientAddress { + if p.ClientAddress == nil || other.ClientAddress == nil { + return false + } + if (*p.ClientAddress) != (*other.ClientAddress) { return false } + } + if p.TableName != other.TableName { + if p.TableName == nil || other.TableName == nil { + return false + } + if (*p.TableName) != (*other.TableName) { return false } + } + if p.UserName != other.UserName { + if p.UserName == nil || other.UserName == nil { + return false + } + if (*p.UserName) != (*other.UserName) { return false } + } + if p.Limit != other.Limit { return false } + if p.LogType != other.LogType { return false } + if p.FilterByOperator != other.FilterByOperator { return false } + return true +} + +func (p *TLogQueryFilter) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TLogQueryFilter(%+v)", *p) +} + +// Thrift wrapper around +// org.apache.hadoop.hbase.client.OnlineLogRecordrd +// +// Attributes: +// - StartTime +// - ProcessingTime +// - QueueTime +// - ResponseSize +// - ClientAddress +// - ServerClass +// - MethodName +// - CallDetails +// - Param +// - UserName +// - MultiGetsCount +// - MultiMutationsCount +// - MultiServiceCalls +// - RegionName +type TOnlineLogRecord struct { + StartTime int64 `thrift:"startTime,1,required" db:"startTime" json:"startTime"` + ProcessingTime int32 `thrift:"processingTime,2,required" db:"processingTime" json:"processingTime"` + QueueTime int32 `thrift:"queueTime,3,required" db:"queueTime" json:"queueTime"` + ResponseSize int64 `thrift:"responseSize,4,required" db:"responseSize" json:"responseSize"` + ClientAddress string `thrift:"clientAddress,5,required" db:"clientAddress" json:"clientAddress"` + ServerClass string `thrift:"serverClass,6,required" db:"serverClass" json:"serverClass"` + MethodName string `thrift:"methodName,7,required" db:"methodName" json:"methodName"` + CallDetails string `thrift:"callDetails,8,required" db:"callDetails" json:"callDetails"` + Param string `thrift:"param,9,required" db:"param" json:"param"` + UserName string `thrift:"userName,10,required" db:"userName" json:"userName"` + MultiGetsCount int32 `thrift:"multiGetsCount,11,required" db:"multiGetsCount" json:"multiGetsCount"` + MultiMutationsCount int32 `thrift:"multiMutationsCount,12,required" db:"multiMutationsCount" json:"multiMutationsCount"` + MultiServiceCalls int32 `thrift:"multiServiceCalls,13,required" db:"multiServiceCalls" json:"multiServiceCalls"` + RegionName *string `thrift:"regionName,14" db:"regionName" json:"regionName,omitempty"` +} + +func NewTOnlineLogRecord() *TOnlineLogRecord { + return &TOnlineLogRecord{} +} + + +func (p *TOnlineLogRecord) GetStartTime() int64 { + return p.StartTime +} + +func (p *TOnlineLogRecord) GetProcessingTime() int32 { + return p.ProcessingTime +} + +func (p *TOnlineLogRecord) GetQueueTime() int32 { + return p.QueueTime +} + +func (p *TOnlineLogRecord) GetResponseSize() int64 { + return p.ResponseSize +} + +func (p *TOnlineLogRecord) GetClientAddress() string { + return p.ClientAddress +} + +func (p *TOnlineLogRecord) GetServerClass() string { + return p.ServerClass +} + +func (p *TOnlineLogRecord) GetMethodName() string { + return p.MethodName +} + +func (p *TOnlineLogRecord) GetCallDetails() string { + return p.CallDetails +} + +func (p *TOnlineLogRecord) GetParam() string { + return p.Param +} + +func (p *TOnlineLogRecord) GetUserName() string { + return p.UserName +} + +func (p *TOnlineLogRecord) GetMultiGetsCount() int32 { + return p.MultiGetsCount +} + +func (p *TOnlineLogRecord) GetMultiMutationsCount() int32 { + return p.MultiMutationsCount +} + +func (p *TOnlineLogRecord) GetMultiServiceCalls() int32 { + return p.MultiServiceCalls +} +var TOnlineLogRecord_RegionName_DEFAULT string +func (p *TOnlineLogRecord) GetRegionName() string { + if !p.IsSetRegionName() { + return TOnlineLogRecord_RegionName_DEFAULT + } +return *p.RegionName +} +func (p *TOnlineLogRecord) IsSetRegionName() bool { + return p.RegionName != nil +} + +func (p *TOnlineLogRecord) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetStartTime bool = false; + var issetProcessingTime bool = false; + var issetQueueTime bool = false; + var issetResponseSize bool = false; + var issetClientAddress bool = false; + var issetServerClass bool = false; + var issetMethodName bool = false; + var issetCallDetails bool = false; + var issetParam bool = false; + var issetUserName bool = false; + var issetMultiGetsCount bool = false; + var issetMultiMutationsCount bool = false; + var issetMultiServiceCalls bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.I64 { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetStartTime = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.I32 { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetProcessingTime = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.I32 { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + issetQueueTime = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.I64 { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + issetResponseSize = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.STRING { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + issetClientAddress = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.STRING { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + issetServerClass = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.STRING { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + issetMethodName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 8: + if fieldTypeId == thrift.STRING { + if err := p.ReadField8(ctx, iprot); err != nil { + return err + } + issetCallDetails = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 9: + if fieldTypeId == thrift.STRING { + if err := p.ReadField9(ctx, iprot); err != nil { + return err + } + issetParam = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 10: + if fieldTypeId == thrift.STRING { + if err := p.ReadField10(ctx, iprot); err != nil { + return err + } + issetUserName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 11: + if fieldTypeId == thrift.I32 { + if err := p.ReadField11(ctx, iprot); err != nil { + return err + } + issetMultiGetsCount = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 12: + if fieldTypeId == thrift.I32 { + if err := p.ReadField12(ctx, iprot); err != nil { + return err + } + issetMultiMutationsCount = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 13: + if fieldTypeId == thrift.I32 { + if err := p.ReadField13(ctx, iprot); err != nil { + return err + } + issetMultiServiceCalls = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 14: + if fieldTypeId == thrift.STRING { + if err := p.ReadField14(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetStartTime{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field StartTime is not set")); + } + if !issetProcessingTime{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ProcessingTime is not set")); + } + if !issetQueueTime{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field QueueTime is not set")); + } + if !issetResponseSize{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ResponseSize is not set")); + } + if !issetClientAddress{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ClientAddress is not set")); + } + if !issetServerClass{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ServerClass is not set")); + } + if !issetMethodName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MethodName is not set")); + } + if !issetCallDetails{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field CallDetails is not set")); + } + if !issetParam{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Param is not set")); + } + if !issetUserName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field UserName is not set")); + } + if !issetMultiGetsCount{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MultiGetsCount is not set")); + } + if !issetMultiMutationsCount{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MultiMutationsCount is not set")); + } + if !issetMultiServiceCalls{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MultiServiceCalls is not set")); + } + return nil +} + +func (p *TOnlineLogRecord) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.StartTime = v +} + return nil +} + +func (p *TOnlineLogRecord) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.ProcessingTime = v +} + return nil +} + +func (p *TOnlineLogRecord) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.QueueTime = v +} + return nil +} + +func (p *TOnlineLogRecord) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI64(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.ResponseSize = v +} + return nil +} + +func (p *TOnlineLogRecord) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) +} else { + p.ClientAddress = v +} + return nil +} + +func (p *TOnlineLogRecord) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) +} else { + p.ServerClass = v +} + return nil +} + +func (p *TOnlineLogRecord) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 7: ", err) +} else { + p.MethodName = v +} + return nil +} + +func (p *TOnlineLogRecord) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 8: ", err) +} else { + p.CallDetails = v +} + return nil +} + +func (p *TOnlineLogRecord) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 9: ", err) +} else { + p.Param = v +} + return nil +} + +func (p *TOnlineLogRecord) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 10: ", err) +} else { + p.UserName = v +} + return nil +} + +func (p *TOnlineLogRecord) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 11: ", err) +} else { + p.MultiGetsCount = v +} + return nil +} + +func (p *TOnlineLogRecord) ReadField12(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 12: ", err) +} else { + p.MultiMutationsCount = v +} + return nil +} + +func (p *TOnlineLogRecord) ReadField13(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 13: ", err) +} else { + p.MultiServiceCalls = v +} + return nil +} + +func (p *TOnlineLogRecord) ReadField14(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 14: ", err) +} else { + p.RegionName = &v +} + return nil +} + +func (p *TOnlineLogRecord) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TOnlineLogRecord"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + if err := p.writeField8(ctx, oprot); err != nil { return err } + if err := p.writeField9(ctx, oprot); err != nil { return err } + if err := p.writeField10(ctx, oprot); err != nil { return err } + if err := p.writeField11(ctx, oprot); err != nil { return err } + if err := p.writeField12(ctx, oprot); err != nil { return err } + if err := p.writeField13(ctx, oprot); err != nil { return err } + if err := p.writeField14(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TOnlineLogRecord) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "startTime", thrift.I64, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:startTime: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.StartTime)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.startTime (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:startTime: ", p), err) } + return err +} + +func (p *TOnlineLogRecord) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "processingTime", thrift.I32, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:processingTime: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.ProcessingTime)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.processingTime (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:processingTime: ", p), err) } + return err +} + +func (p *TOnlineLogRecord) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "queueTime", thrift.I32, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:queueTime: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.QueueTime)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.queueTime (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:queueTime: ", p), err) } + return err +} + +func (p *TOnlineLogRecord) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "responseSize", thrift.I64, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:responseSize: ", p), err) } + if err := oprot.WriteI64(ctx, int64(p.ResponseSize)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.responseSize (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:responseSize: ", p), err) } + return err +} + +func (p *TOnlineLogRecord) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "clientAddress", thrift.STRING, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:clientAddress: ", p), err) } + if err := oprot.WriteString(ctx, string(p.ClientAddress)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.clientAddress (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:clientAddress: ", p), err) } + return err +} + +func (p *TOnlineLogRecord) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "serverClass", thrift.STRING, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:serverClass: ", p), err) } + if err := oprot.WriteString(ctx, string(p.ServerClass)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.serverClass (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:serverClass: ", p), err) } + return err +} + +func (p *TOnlineLogRecord) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "methodName", thrift.STRING, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:methodName: ", p), err) } + if err := oprot.WriteString(ctx, string(p.MethodName)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.methodName (7) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:methodName: ", p), err) } + return err +} + +func (p *TOnlineLogRecord) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "callDetails", thrift.STRING, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:callDetails: ", p), err) } + if err := oprot.WriteString(ctx, string(p.CallDetails)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.callDetails (8) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:callDetails: ", p), err) } + return err +} + +func (p *TOnlineLogRecord) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "param", thrift.STRING, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:param: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Param)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.param (9) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:param: ", p), err) } + return err +} + +func (p *TOnlineLogRecord) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "userName", thrift.STRING, 10); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:userName: ", p), err) } + if err := oprot.WriteString(ctx, string(p.UserName)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.userName (10) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 10:userName: ", p), err) } + return err +} + +func (p *TOnlineLogRecord) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "multiGetsCount", thrift.I32, 11); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:multiGetsCount: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.MultiGetsCount)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.multiGetsCount (11) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 11:multiGetsCount: ", p), err) } + return err +} + +func (p *TOnlineLogRecord) writeField12(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "multiMutationsCount", thrift.I32, 12); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 12:multiMutationsCount: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.MultiMutationsCount)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.multiMutationsCount (12) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 12:multiMutationsCount: ", p), err) } + return err +} + +func (p *TOnlineLogRecord) writeField13(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "multiServiceCalls", thrift.I32, 13); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 13:multiServiceCalls: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.MultiServiceCalls)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.multiServiceCalls (13) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 13:multiServiceCalls: ", p), err) } + return err +} + +func (p *TOnlineLogRecord) writeField14(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetRegionName() { + if err := oprot.WriteFieldBegin(ctx, "regionName", thrift.STRING, 14); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 14:regionName: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.RegionName)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.regionName (14) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 14:regionName: ", p), err) } + } + return err +} + +func (p *TOnlineLogRecord) Equals(other *TOnlineLogRecord) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.StartTime != other.StartTime { return false } + if p.ProcessingTime != other.ProcessingTime { return false } + if p.QueueTime != other.QueueTime { return false } + if p.ResponseSize != other.ResponseSize { return false } + if p.ClientAddress != other.ClientAddress { return false } + if p.ServerClass != other.ServerClass { return false } + if p.MethodName != other.MethodName { return false } + if p.CallDetails != other.CallDetails { return false } + if p.Param != other.Param { return false } + if p.UserName != other.UserName { return false } + if p.MultiGetsCount != other.MultiGetsCount { return false } + if p.MultiMutationsCount != other.MultiMutationsCount { return false } + if p.MultiServiceCalls != other.MultiServiceCalls { return false } + if p.RegionName != other.RegionName { + if p.RegionName == nil || other.RegionName == nil { + return false + } + if (*p.RegionName) != (*other.RegionName) { return false } + } + return true +} + +func (p *TOnlineLogRecord) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TOnlineLogRecord(%+v)", *p) +} + +// A TIOError exception signals that an error occurred communicating +// to the HBase master or a HBase region server. Also used to return +// more general HBase error conditions. +// +// Attributes: +// - Message +// - CanRetry +type TIOError struct { + Message *string `thrift:"message,1" db:"message" json:"message,omitempty"` + CanRetry *bool `thrift:"canRetry,2" db:"canRetry" json:"canRetry,omitempty"` +} + +func NewTIOError() *TIOError { + return &TIOError{} +} + +var TIOError_Message_DEFAULT string +func (p *TIOError) GetMessage() string { + if !p.IsSetMessage() { + return TIOError_Message_DEFAULT + } +return *p.Message +} +var TIOError_CanRetry_DEFAULT bool +func (p *TIOError) GetCanRetry() bool { + if !p.IsSetCanRetry() { + return TIOError_CanRetry_DEFAULT + } +return *p.CanRetry +} +func (p *TIOError) IsSetMessage() bool { + return p.Message != nil +} + +func (p *TIOError) IsSetCanRetry() bool { + return p.CanRetry != nil +} + +func (p *TIOError) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TIOError) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Message = &v +} + return nil +} + +func (p *TIOError) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.CanRetry = &v +} + return nil +} + +func (p *TIOError) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TIOError"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TIOError) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetMessage() { + if err := oprot.WriteFieldBegin(ctx, "message", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:message: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Message)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.message (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:message: ", p), err) } + } + return err +} + +func (p *TIOError) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetCanRetry() { + if err := oprot.WriteFieldBegin(ctx, "canRetry", thrift.BOOL, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:canRetry: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.CanRetry)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.canRetry (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:canRetry: ", p), err) } + } + return err +} + +func (p *TIOError) Equals(other *TIOError) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Message != other.Message { + if p.Message == nil || other.Message == nil { + return false + } + if (*p.Message) != (*other.Message) { return false } + } + if p.CanRetry != other.CanRetry { + if p.CanRetry == nil || other.CanRetry == nil { + return false + } + if (*p.CanRetry) != (*other.CanRetry) { return false } + } + return true +} + +func (p *TIOError) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TIOError(%+v)", *p) +} + +func (p *TIOError) Error() string { + return p.String() +} + +func (TIOError) TExceptionType() thrift.TExceptionType { + return thrift.TExceptionTypeCompiled +} + +var _ thrift.TException = (*TIOError)(nil) + +// A TIllegalArgument exception indicates an illegal or invalid +// argument was passed into a procedure. +// +// Attributes: +// - Message +type TIllegalArgument struct { + Message *string `thrift:"message,1" db:"message" json:"message,omitempty"` +} + +func NewTIllegalArgument() *TIllegalArgument { + return &TIllegalArgument{} +} + +var TIllegalArgument_Message_DEFAULT string +func (p *TIllegalArgument) GetMessage() string { + if !p.IsSetMessage() { + return TIllegalArgument_Message_DEFAULT + } +return *p.Message +} +func (p *TIllegalArgument) IsSetMessage() bool { + return p.Message != nil +} + +func (p *TIllegalArgument) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TIllegalArgument) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Message = &v +} + return nil +} + +func (p *TIllegalArgument) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TIllegalArgument"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TIllegalArgument) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetMessage() { + if err := oprot.WriteFieldBegin(ctx, "message", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:message: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Message)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.message (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:message: ", p), err) } + } + return err +} + +func (p *TIllegalArgument) Equals(other *TIllegalArgument) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Message != other.Message { + if p.Message == nil || other.Message == nil { + return false + } + if (*p.Message) != (*other.Message) { return false } + } + return true +} + +func (p *TIllegalArgument) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TIllegalArgument(%+v)", *p) +} + +func (p *TIllegalArgument) Error() string { + return p.String() +} + +func (TIllegalArgument) TExceptionType() thrift.TExceptionType { + return thrift.TExceptionTypeCompiled +} + +var _ thrift.TException = (*TIllegalArgument)(nil) + +type THBaseService interface { + // Test for the existence of columns in the table, as specified in the TGet. + // + // @return true if the specified TGet matches one or more keys, false if not + // + // Parameters: + // - Table: the table to check on + // - Tget: the TGet to check for + Exists(ctx context.Context, table []byte, tget *TGet) (_r bool, _err error) + // Test for the existence of columns in the table, as specified by the TGets. + // + // This will return an array of booleans. Each value will be true if the related Get matches + // one or more keys, false if not. + // + // Parameters: + // - Table: the table to check on + // - Tgets: a list of TGets to check for + ExistsAll(ctx context.Context, table []byte, tgets []*TGet) (_r []bool, _err error) + // Method for getting data from a row. + // + // If the row cannot be found an empty Result is returned. + // This can be checked by the empty field of the TResult + // + // @return the result + // + // Parameters: + // - Table: the table to get from + // - Tget: the TGet to fetch + Get(ctx context.Context, table []byte, tget *TGet) (_r *TResult_, _err error) + // Method for getting multiple rows. + // + // If a row cannot be found there will be a null + // value in the result list for that TGet at the + // same position. + // + // So the Results are in the same order as the TGets. + // + // Parameters: + // - Table: the table to get from + // - Tgets: a list of TGets to fetch, the Result list + // will have the Results at corresponding positions + // or null if there was an error + GetMultiple(ctx context.Context, table []byte, tgets []*TGet) (_r []*TResult_, _err error) + // Commit a TPut to a table. + // + // Parameters: + // - Table: the table to put data in + // - Tput: the TPut to put + Put(ctx context.Context, table []byte, tput *TPut) (_err error) + // Atomically checks if a row/family/qualifier value matches the expected + // value. If it does, it adds the TPut. + // + // @return true if the new put was executed, false otherwise + // + // Parameters: + // - Table: to check in and put to + // - Row: row to check + // - Family: column family to check + // - Qualifier: column qualifier to check + // - Value: the expected value, if not provided the + // check is for the non-existence of the + // column in question + // - Tput: the TPut to put if the check succeeds + CheckAndPut(ctx context.Context, table []byte, row []byte, family []byte, qualifier []byte, value []byte, tput *TPut) (_r bool, _err error) + // Commit a List of Puts to the table. + // + // Parameters: + // - Table: the table to put data in + // - Tputs: a list of TPuts to commit + PutMultiple(ctx context.Context, table []byte, tputs []*TPut) (_err error) + // Deletes as specified by the TDelete. + // + // Note: "delete" is a reserved keyword and cannot be used in Thrift + // thus the inconsistent naming scheme from the other functions. + // + // Parameters: + // - Table: the table to delete from + // - Tdelete: the TDelete to delete + DeleteSingle(ctx context.Context, table []byte, tdelete *TDelete) (_err error) + // Bulk commit a List of TDeletes to the table. + // + // Throws a TIOError if any of the deletes fail. + // + // Always returns an empty list for backwards compatibility. + // + // Parameters: + // - Table: the table to delete from + // - Tdeletes: list of TDeletes to delete + DeleteMultiple(ctx context.Context, table []byte, tdeletes []*TDelete) (_r []*TDelete, _err error) + // Atomically checks if a row/family/qualifier value matches the expected + // value. If it does, it adds the delete. + // + // @return true if the new delete was executed, false otherwise + // + // Parameters: + // - Table: to check in and delete from + // - Row: row to check + // - Family: column family to check + // - Qualifier: column qualifier to check + // - Value: the expected value, if not provided the + // check is for the non-existence of the + // column in question + // - Tdelete: the TDelete to execute if the check succeeds + CheckAndDelete(ctx context.Context, table []byte, row []byte, family []byte, qualifier []byte, value []byte, tdelete *TDelete) (_r bool, _err error) + // Parameters: + // - Table: the table to increment the value on + // - Tincrement: the TIncrement to increment + Increment(ctx context.Context, table []byte, tincrement *TIncrement) (_r *TResult_, _err error) + // Parameters: + // - Table: the table to append the value on + // - Tappend: the TAppend to append + Append(ctx context.Context, table []byte, tappend *TAppend) (_r *TResult_, _err error) + // Get a Scanner for the provided TScan object. + // + // @return Scanner Id to be used with other scanner procedures + // + // Parameters: + // - Table: the table to get the Scanner for + // - Tscan: the scan object to get a Scanner for + OpenScanner(ctx context.Context, table []byte, tscan *TScan) (_r int32, _err error) + // Grabs multiple rows from a Scanner. + // + // @return Between zero and numRows TResults + // + // Parameters: + // - ScannerId: the Id of the Scanner to return rows from. This is an Id returned from the openScanner function. + // - NumRows: number of rows to return + GetScannerRows(ctx context.Context, scannerId int32, numRows int32) (_r []*TResult_, _err error) + // Closes the scanner. Should be called to free server side resources timely. + // Typically close once the scanner is not needed anymore, i.e. after looping + // over it to get all the required rows. + // + // Parameters: + // - ScannerId: the Id of the Scanner to close * + CloseScanner(ctx context.Context, scannerId int32) (_err error) + // mutateRow performs multiple mutations atomically on a single row. + // + // Parameters: + // - Table: table to apply the mutations + // - TrowMutations: mutations to apply + MutateRow(ctx context.Context, table []byte, trowMutations *TRowMutations) (_err error) + // Get results for the provided TScan object. + // This helper function opens a scanner, get the results and close the scanner. + // + // @return between zero and numRows TResults + // + // Parameters: + // - Table: the table to get the Scanner for + // - Tscan: the scan object to get a Scanner for + // - NumRows: number of rows to return + GetScannerResults(ctx context.Context, table []byte, tscan *TScan, numRows int32) (_r []*TResult_, _err error) + // Given a table and a row get the location of the region that + // would contain the given row key. + // + // reload = true means the cache will be cleared and the location + // will be fetched from meta. + // + // Parameters: + // - Table + // - Row + // - Reload + GetRegionLocation(ctx context.Context, table []byte, row []byte, reload bool) (_r *THRegionLocation, _err error) + // Get all of the region locations for a given table. + // + // + // Parameters: + // - Table + GetAllRegionLocations(ctx context.Context, table []byte) (_r []*THRegionLocation, _err error) + // Atomically checks if a row/family/qualifier value matches the expected + // value. If it does, it mutates the row. + // + // @return true if the row was mutated, false otherwise + // + // Parameters: + // - Table: to check in and delete from + // - Row: row to check + // - Family: column family to check + // - Qualifier: column qualifier to check + // - CompareOp: comparison to make on the value + // - Value: the expected value to be compared against, if not provided the + // check is for the non-existence of the column in question + // - RowMutations: row mutations to execute if the value matches + CheckAndMutate(ctx context.Context, table []byte, row []byte, family []byte, qualifier []byte, compareOp TCompareOp, value []byte, rowMutations *TRowMutations) (_r bool, _err error) + // Get a table descriptor. + // @return the TableDescriptor of the giving tablename + // + // + // Parameters: + // - Table: the tablename of the table to get tableDescriptor + GetTableDescriptor(ctx context.Context, table *TTableName) (_r *TTableDescriptor, _err error) + // Get table descriptors of tables. + // @return the TableDescriptor of the giving tablename + // + // + // Parameters: + // - Tables: the tablename list of the tables to get tableDescriptor + GetTableDescriptors(ctx context.Context, tables []*TTableName) (_r []*TTableDescriptor, _err error) + // + // @return true if table exists already, false if not + // + // + // Parameters: + // - TableName: the tablename of the tables to check + TableExists(ctx context.Context, tableName *TTableName) (_r bool, _err error) + // Get table descriptors of tables that match the given pattern + // @return the tableDescriptors of the matching table + // + // + // Parameters: + // - Regex: The regular expression to match against + // - IncludeSysTables: set to false if match only against userspace tables + GetTableDescriptorsByPattern(ctx context.Context, regex string, includeSysTables bool) (_r []*TTableDescriptor, _err error) + // Get table descriptors of tables in the given namespace + // @return the tableDescriptors in the namespce + // + // + // Parameters: + // - Name: The namesapce's name + GetTableDescriptorsByNamespace(ctx context.Context, name string) (_r []*TTableDescriptor, _err error) + // Get table names of tables that match the given pattern + // @return the table names of the matching table + // + // + // Parameters: + // - Regex: The regular expression to match against + // - IncludeSysTables: set to false if match only against userspace tables + GetTableNamesByPattern(ctx context.Context, regex string, includeSysTables bool) (_r []*TTableName, _err error) + // Get table names of tables in the given namespace + // @return the table names of the matching table + // + // + // Parameters: + // - Name: The namesapce's name + GetTableNamesByNamespace(ctx context.Context, name string) (_r []*TTableName, _err error) + // Creates a new table with an initial set of empty regions defined by the specified split keys. + // The total number of regions created will be the number of split keys plus one. Synchronous + // operation. + // + // + // Parameters: + // - Desc: table descriptor for table + // - SplitKeys: rray of split keys for the initial regions of the table + CreateTable(ctx context.Context, desc *TTableDescriptor, splitKeys [][]byte) (_err error) + // Deletes a table. Synchronous operation. + // + // + // Parameters: + // - TableName: the tablename to delete + DeleteTable(ctx context.Context, tableName *TTableName) (_err error) + // Truncate a table. Synchronous operation. + // + // + // Parameters: + // - TableName: the tablename to truncate + // - PreserveSplits: whether to preserve previous splits + TruncateTable(ctx context.Context, tableName *TTableName, preserveSplits bool) (_err error) + // Enalbe a table + // + // + // Parameters: + // - TableName: the tablename to enable + EnableTable(ctx context.Context, tableName *TTableName) (_err error) + // Disable a table + // + // + // Parameters: + // - TableName: the tablename to disable + DisableTable(ctx context.Context, tableName *TTableName) (_err error) + // + // @return true if table is enabled, false if not + // + // + // Parameters: + // - TableName: the tablename to check + IsTableEnabled(ctx context.Context, tableName *TTableName) (_r bool, _err error) + // + // @return true if table is disabled, false if not + // + // + // Parameters: + // - TableName: the tablename to check + IsTableDisabled(ctx context.Context, tableName *TTableName) (_r bool, _err error) + // + // @return true if table is available, false if not + // + // + // Parameters: + // - TableName: the tablename to check + IsTableAvailable(ctx context.Context, tableName *TTableName) (_r bool, _err error) + // * Use this api to check if the table has been created with the specified number of splitkeys + // * which was used while creating the given table. Note : If this api is used after a table's + // * region gets splitted, the api may return false. + // * + // * @return true if table is available, false if not + // * + // * @deprecated Since 2.2.0. Because the same method in Table interface has been deprecated + // * since 2.0.0, we will remove it in 3.0.0 release. + // * Use {@link #isTableAvailable(TTableName tableName)} instead + // * + // + // Parameters: + // - TableName: the tablename to check + // - SplitKeys: keys to check if the table has been created with all split keys + IsTableAvailableWithSplit(ctx context.Context, tableName *TTableName, splitKeys [][]byte) (_r bool, _err error) + // Add a column family to an existing table. Synchronous operation. + // + // + // Parameters: + // - TableName: the tablename to add column family to + // - Column: column family descriptor of column family to be added + AddColumnFamily(ctx context.Context, tableName *TTableName, column *TColumnFamilyDescriptor) (_err error) + // Delete a column family from a table. Synchronous operation. + // + // + // Parameters: + // - TableName: the tablename to delete column family from + // - Column: name of column family to be deleted + DeleteColumnFamily(ctx context.Context, tableName *TTableName, column []byte) (_err error) + // Modify an existing column family on a table. Synchronous operation. + // + // + // Parameters: + // - TableName: the tablename to modify column family + // - Column: column family descriptor of column family to be modified + ModifyColumnFamily(ctx context.Context, tableName *TTableName, column *TColumnFamilyDescriptor) (_err error) + // Modify an existing table + // + // + // Parameters: + // - Desc: the descriptor of the table to modify + ModifyTable(ctx context.Context, desc *TTableDescriptor) (_err error) + // Create a new namespace. Blocks until namespace has been successfully created or an exception is + // thrown + // + // + // Parameters: + // - NamespaceDesc: descriptor which describes the new namespace + CreateNamespace(ctx context.Context, namespaceDesc *TNamespaceDescriptor) (_err error) + // Modify an existing namespace. Blocks until namespace has been successfully modified or an + // exception is thrown + // + // + // Parameters: + // - NamespaceDesc: descriptor which describes the new namespace + ModifyNamespace(ctx context.Context, namespaceDesc *TNamespaceDescriptor) (_err error) + // Delete an existing namespace. Only empty namespaces (no tables) can be removed. + // Blocks until namespace has been successfully deleted or an + // exception is thrown. + // + // + // Parameters: + // - Name: namespace name + DeleteNamespace(ctx context.Context, name string) (_err error) + // Get a namespace descriptor by name. + // @retrun the descriptor + // + // + // Parameters: + // - Name: name of namespace descriptor + GetNamespaceDescriptor(ctx context.Context, name string) (_r *TNamespaceDescriptor, _err error) + // @return all namespaces + // + ListNamespaceDescriptors(ctx context.Context) (_r []*TNamespaceDescriptor, _err error) + // @return all namespace names + // + ListNamespaces(ctx context.Context) (_r []string, _err error) + // Get the type of this thrift server. + // + // @return the type of this thrift server + GetThriftServerType(ctx context.Context) (_r TThriftServerType, _err error) + // Retrieves online slow RPC logs from the provided list of + // RegionServers + // + // @return online slowlog response list + // @throws TIOError if a remote or network exception occurs + // + // Parameters: + // - ServerNames: @param serverNames Server names to get slowlog responses from + // - LogQueryFilter: @param logQueryFilter filter to be used if provided + GetSlowLogResponses(ctx context.Context, serverNames []*TServerName, logQueryFilter *TLogQueryFilter) (_r []*TOnlineLogRecord, _err error) + // Clears online slow/large RPC logs from the provided list of + // RegionServers + // + // @return List of booleans representing if online slowlog response buffer is cleaned + // from each RegionServer + // @throws TIOError if a remote or network exception occurs + // + // Parameters: + // - ServerNames: @param serverNames Set of Server names to clean slowlog responses from + ClearSlowLogResponses(ctx context.Context, serverNames []*TServerName) (_r []bool, _err error) + // Returns the cluster ID for this cluster. + GetClusterId(ctx context.Context) (_r string, _err error) +} + +type THBaseServiceClient struct { + c thrift.TClient + meta thrift.ResponseMeta +} + +func NewTHBaseServiceClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *THBaseServiceClient { + return &THBaseServiceClient{ + c: thrift.NewTStandardClient(f.GetProtocol(t), f.GetProtocol(t)), + } +} + +func NewTHBaseServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *THBaseServiceClient { + return &THBaseServiceClient{ + c: thrift.NewTStandardClient(iprot, oprot), + } +} + +func NewTHBaseServiceClient(c thrift.TClient) *THBaseServiceClient { + return &THBaseServiceClient{ + c: c, + } +} + +func (p *THBaseServiceClient) Client_() thrift.TClient { + return p.c +} + +func (p *THBaseServiceClient) LastResponseMeta_() thrift.ResponseMeta { + return p.meta +} + +func (p *THBaseServiceClient) SetLastResponseMeta_(meta thrift.ResponseMeta) { + p.meta = meta +} + +// Test for the existence of columns in the table, as specified in the TGet. +// +// @return true if the specified TGet matches one or more keys, false if not +// +// Parameters: +// - Table: the table to check on +// - Tget: the TGet to check for +func (p *THBaseServiceClient) Exists(ctx context.Context, table []byte, tget *TGet) (_r bool, _err error) { + var _args53 THBaseServiceExistsArgs + _args53.Table = table + _args53.Tget = tget + var _result55 THBaseServiceExistsResult + var _meta54 thrift.ResponseMeta + _meta54, _err = p.Client_().Call(ctx, "exists", &_args53, &_result55) + p.SetLastResponseMeta_(_meta54) + if _err != nil { + return + } + switch { + case _result55.Io!= nil: + return _r, _result55.Io + } + + return _result55.GetSuccess(), nil +} + +// Test for the existence of columns in the table, as specified by the TGets. +// +// This will return an array of booleans. Each value will be true if the related Get matches +// one or more keys, false if not. +// +// Parameters: +// - Table: the table to check on +// - Tgets: a list of TGets to check for +func (p *THBaseServiceClient) ExistsAll(ctx context.Context, table []byte, tgets []*TGet) (_r []bool, _err error) { + var _args56 THBaseServiceExistsAllArgs + _args56.Table = table + _args56.Tgets = tgets + var _result58 THBaseServiceExistsAllResult + var _meta57 thrift.ResponseMeta + _meta57, _err = p.Client_().Call(ctx, "existsAll", &_args56, &_result58) + p.SetLastResponseMeta_(_meta57) + if _err != nil { + return + } + switch { + case _result58.Io!= nil: + return _r, _result58.Io + } + + return _result58.GetSuccess(), nil +} + +// Method for getting data from a row. +// +// If the row cannot be found an empty Result is returned. +// This can be checked by the empty field of the TResult +// +// @return the result +// +// Parameters: +// - Table: the table to get from +// - Tget: the TGet to fetch +func (p *THBaseServiceClient) Get(ctx context.Context, table []byte, tget *TGet) (_r *TResult_, _err error) { + var _args59 THBaseServiceGetArgs + _args59.Table = table + _args59.Tget = tget + var _result61 THBaseServiceGetResult + var _meta60 thrift.ResponseMeta + _meta60, _err = p.Client_().Call(ctx, "get", &_args59, &_result61) + p.SetLastResponseMeta_(_meta60) + if _err != nil { + return + } + switch { + case _result61.Io!= nil: + return _r, _result61.Io + } + + if _ret62 := _result61.GetSuccess(); _ret62 != nil { + return _ret62, nil + } + return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "get failed: unknown result") +} + +// Method for getting multiple rows. +// +// If a row cannot be found there will be a null +// value in the result list for that TGet at the +// same position. +// +// So the Results are in the same order as the TGets. +// +// Parameters: +// - Table: the table to get from +// - Tgets: a list of TGets to fetch, the Result list +// will have the Results at corresponding positions +// or null if there was an error +func (p *THBaseServiceClient) GetMultiple(ctx context.Context, table []byte, tgets []*TGet) (_r []*TResult_, _err error) { + var _args63 THBaseServiceGetMultipleArgs + _args63.Table = table + _args63.Tgets = tgets + var _result65 THBaseServiceGetMultipleResult + var _meta64 thrift.ResponseMeta + _meta64, _err = p.Client_().Call(ctx, "getMultiple", &_args63, &_result65) + p.SetLastResponseMeta_(_meta64) + if _err != nil { + return + } + switch { + case _result65.Io!= nil: + return _r, _result65.Io + } + + return _result65.GetSuccess(), nil +} + +// Commit a TPut to a table. +// +// Parameters: +// - Table: the table to put data in +// - Tput: the TPut to put +func (p *THBaseServiceClient) Put(ctx context.Context, table []byte, tput *TPut) (_err error) { + var _args66 THBaseServicePutArgs + _args66.Table = table + _args66.Tput = tput + var _result68 THBaseServicePutResult + var _meta67 thrift.ResponseMeta + _meta67, _err = p.Client_().Call(ctx, "put", &_args66, &_result68) + p.SetLastResponseMeta_(_meta67) + if _err != nil { + return + } + switch { + case _result68.Io!= nil: + return _result68.Io + } + + return nil +} + +// Atomically checks if a row/family/qualifier value matches the expected +// value. If it does, it adds the TPut. +// +// @return true if the new put was executed, false otherwise +// +// Parameters: +// - Table: to check in and put to +// - Row: row to check +// - Family: column family to check +// - Qualifier: column qualifier to check +// - Value: the expected value, if not provided the +// check is for the non-existence of the +// column in question +// - Tput: the TPut to put if the check succeeds +func (p *THBaseServiceClient) CheckAndPut(ctx context.Context, table []byte, row []byte, family []byte, qualifier []byte, value []byte, tput *TPut) (_r bool, _err error) { + var _args69 THBaseServiceCheckAndPutArgs + _args69.Table = table + _args69.Row = row + _args69.Family = family + _args69.Qualifier = qualifier + _args69.Value = value + _args69.Tput = tput + var _result71 THBaseServiceCheckAndPutResult + var _meta70 thrift.ResponseMeta + _meta70, _err = p.Client_().Call(ctx, "checkAndPut", &_args69, &_result71) + p.SetLastResponseMeta_(_meta70) + if _err != nil { + return + } + switch { + case _result71.Io!= nil: + return _r, _result71.Io + } + + return _result71.GetSuccess(), nil +} + +// Commit a List of Puts to the table. +// +// Parameters: +// - Table: the table to put data in +// - Tputs: a list of TPuts to commit +func (p *THBaseServiceClient) PutMultiple(ctx context.Context, table []byte, tputs []*TPut) (_err error) { + var _args72 THBaseServicePutMultipleArgs + _args72.Table = table + _args72.Tputs = tputs + var _result74 THBaseServicePutMultipleResult + var _meta73 thrift.ResponseMeta + _meta73, _err = p.Client_().Call(ctx, "putMultiple", &_args72, &_result74) + p.SetLastResponseMeta_(_meta73) + if _err != nil { + return + } + switch { + case _result74.Io!= nil: + return _result74.Io + } + + return nil +} + +// Deletes as specified by the TDelete. +// +// Note: "delete" is a reserved keyword and cannot be used in Thrift +// thus the inconsistent naming scheme from the other functions. +// +// Parameters: +// - Table: the table to delete from +// - Tdelete: the TDelete to delete +func (p *THBaseServiceClient) DeleteSingle(ctx context.Context, table []byte, tdelete *TDelete) (_err error) { + var _args75 THBaseServiceDeleteSingleArgs + _args75.Table = table + _args75.Tdelete = tdelete + var _result77 THBaseServiceDeleteSingleResult + var _meta76 thrift.ResponseMeta + _meta76, _err = p.Client_().Call(ctx, "deleteSingle", &_args75, &_result77) + p.SetLastResponseMeta_(_meta76) + if _err != nil { + return + } + switch { + case _result77.Io!= nil: + return _result77.Io + } + + return nil +} + +// Bulk commit a List of TDeletes to the table. +// +// Throws a TIOError if any of the deletes fail. +// +// Always returns an empty list for backwards compatibility. +// +// Parameters: +// - Table: the table to delete from +// - Tdeletes: list of TDeletes to delete +func (p *THBaseServiceClient) DeleteMultiple(ctx context.Context, table []byte, tdeletes []*TDelete) (_r []*TDelete, _err error) { + var _args78 THBaseServiceDeleteMultipleArgs + _args78.Table = table + _args78.Tdeletes = tdeletes + var _result80 THBaseServiceDeleteMultipleResult + var _meta79 thrift.ResponseMeta + _meta79, _err = p.Client_().Call(ctx, "deleteMultiple", &_args78, &_result80) + p.SetLastResponseMeta_(_meta79) + if _err != nil { + return + } + switch { + case _result80.Io!= nil: + return _r, _result80.Io + } + + return _result80.GetSuccess(), nil +} + +// Atomically checks if a row/family/qualifier value matches the expected +// value. If it does, it adds the delete. +// +// @return true if the new delete was executed, false otherwise +// +// Parameters: +// - Table: to check in and delete from +// - Row: row to check +// - Family: column family to check +// - Qualifier: column qualifier to check +// - Value: the expected value, if not provided the +// check is for the non-existence of the +// column in question +// - Tdelete: the TDelete to execute if the check succeeds +func (p *THBaseServiceClient) CheckAndDelete(ctx context.Context, table []byte, row []byte, family []byte, qualifier []byte, value []byte, tdelete *TDelete) (_r bool, _err error) { + var _args81 THBaseServiceCheckAndDeleteArgs + _args81.Table = table + _args81.Row = row + _args81.Family = family + _args81.Qualifier = qualifier + _args81.Value = value + _args81.Tdelete = tdelete + var _result83 THBaseServiceCheckAndDeleteResult + var _meta82 thrift.ResponseMeta + _meta82, _err = p.Client_().Call(ctx, "checkAndDelete", &_args81, &_result83) + p.SetLastResponseMeta_(_meta82) + if _err != nil { + return + } + switch { + case _result83.Io!= nil: + return _r, _result83.Io + } + + return _result83.GetSuccess(), nil +} + +// Parameters: +// - Table: the table to increment the value on +// - Tincrement: the TIncrement to increment +func (p *THBaseServiceClient) Increment(ctx context.Context, table []byte, tincrement *TIncrement) (_r *TResult_, _err error) { + var _args84 THBaseServiceIncrementArgs + _args84.Table = table + _args84.Tincrement = tincrement + var _result86 THBaseServiceIncrementResult + var _meta85 thrift.ResponseMeta + _meta85, _err = p.Client_().Call(ctx, "increment", &_args84, &_result86) + p.SetLastResponseMeta_(_meta85) + if _err != nil { + return + } + switch { + case _result86.Io!= nil: + return _r, _result86.Io + } + + if _ret87 := _result86.GetSuccess(); _ret87 != nil { + return _ret87, nil + } + return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "increment failed: unknown result") +} + +// Parameters: +// - Table: the table to append the value on +// - Tappend: the TAppend to append +func (p *THBaseServiceClient) Append(ctx context.Context, table []byte, tappend *TAppend) (_r *TResult_, _err error) { + var _args88 THBaseServiceAppendArgs + _args88.Table = table + _args88.Tappend = tappend + var _result90 THBaseServiceAppendResult + var _meta89 thrift.ResponseMeta + _meta89, _err = p.Client_().Call(ctx, "append", &_args88, &_result90) + p.SetLastResponseMeta_(_meta89) + if _err != nil { + return + } + switch { + case _result90.Io!= nil: + return _r, _result90.Io + } + + if _ret91 := _result90.GetSuccess(); _ret91 != nil { + return _ret91, nil + } + return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "append failed: unknown result") +} + +// Get a Scanner for the provided TScan object. +// +// @return Scanner Id to be used with other scanner procedures +// +// Parameters: +// - Table: the table to get the Scanner for +// - Tscan: the scan object to get a Scanner for +func (p *THBaseServiceClient) OpenScanner(ctx context.Context, table []byte, tscan *TScan) (_r int32, _err error) { + var _args92 THBaseServiceOpenScannerArgs + _args92.Table = table + _args92.Tscan = tscan + var _result94 THBaseServiceOpenScannerResult + var _meta93 thrift.ResponseMeta + _meta93, _err = p.Client_().Call(ctx, "openScanner", &_args92, &_result94) + p.SetLastResponseMeta_(_meta93) + if _err != nil { + return + } + switch { + case _result94.Io!= nil: + return _r, _result94.Io + } + + return _result94.GetSuccess(), nil +} + +// Grabs multiple rows from a Scanner. +// +// @return Between zero and numRows TResults +// +// Parameters: +// - ScannerId: the Id of the Scanner to return rows from. This is an Id returned from the openScanner function. +// - NumRows: number of rows to return +func (p *THBaseServiceClient) GetScannerRows(ctx context.Context, scannerId int32, numRows int32) (_r []*TResult_, _err error) { + var _args95 THBaseServiceGetScannerRowsArgs + _args95.ScannerId = scannerId + _args95.NumRows = numRows + var _result97 THBaseServiceGetScannerRowsResult + var _meta96 thrift.ResponseMeta + _meta96, _err = p.Client_().Call(ctx, "getScannerRows", &_args95, &_result97) + p.SetLastResponseMeta_(_meta96) + if _err != nil { + return + } + switch { + case _result97.Io!= nil: + return _r, _result97.Io + case _result97.Ia!= nil: + return _r, _result97.Ia + } + + return _result97.GetSuccess(), nil +} + +// Closes the scanner. Should be called to free server side resources timely. +// Typically close once the scanner is not needed anymore, i.e. after looping +// over it to get all the required rows. +// +// Parameters: +// - ScannerId: the Id of the Scanner to close * +func (p *THBaseServiceClient) CloseScanner(ctx context.Context, scannerId int32) (_err error) { + var _args98 THBaseServiceCloseScannerArgs + _args98.ScannerId = scannerId + var _result100 THBaseServiceCloseScannerResult + var _meta99 thrift.ResponseMeta + _meta99, _err = p.Client_().Call(ctx, "closeScanner", &_args98, &_result100) + p.SetLastResponseMeta_(_meta99) + if _err != nil { + return + } + switch { + case _result100.Io!= nil: + return _result100.Io + case _result100.Ia!= nil: + return _result100.Ia + } + + return nil +} + +// mutateRow performs multiple mutations atomically on a single row. +// +// Parameters: +// - Table: table to apply the mutations +// - TrowMutations: mutations to apply +func (p *THBaseServiceClient) MutateRow(ctx context.Context, table []byte, trowMutations *TRowMutations) (_err error) { + var _args101 THBaseServiceMutateRowArgs + _args101.Table = table + _args101.TrowMutations = trowMutations + var _result103 THBaseServiceMutateRowResult + var _meta102 thrift.ResponseMeta + _meta102, _err = p.Client_().Call(ctx, "mutateRow", &_args101, &_result103) + p.SetLastResponseMeta_(_meta102) + if _err != nil { + return + } + switch { + case _result103.Io!= nil: + return _result103.Io + } + + return nil +} + +// Get results for the provided TScan object. +// This helper function opens a scanner, get the results and close the scanner. +// +// @return between zero and numRows TResults +// +// Parameters: +// - Table: the table to get the Scanner for +// - Tscan: the scan object to get a Scanner for +// - NumRows: number of rows to return +func (p *THBaseServiceClient) GetScannerResults(ctx context.Context, table []byte, tscan *TScan, numRows int32) (_r []*TResult_, _err error) { + var _args104 THBaseServiceGetScannerResultsArgs + _args104.Table = table + _args104.Tscan = tscan + _args104.NumRows = numRows + var _result106 THBaseServiceGetScannerResultsResult + var _meta105 thrift.ResponseMeta + _meta105, _err = p.Client_().Call(ctx, "getScannerResults", &_args104, &_result106) + p.SetLastResponseMeta_(_meta105) + if _err != nil { + return + } + switch { + case _result106.Io!= nil: + return _r, _result106.Io + } + + return _result106.GetSuccess(), nil +} + +// Given a table and a row get the location of the region that +// would contain the given row key. +// +// reload = true means the cache will be cleared and the location +// will be fetched from meta. +// +// Parameters: +// - Table +// - Row +// - Reload +func (p *THBaseServiceClient) GetRegionLocation(ctx context.Context, table []byte, row []byte, reload bool) (_r *THRegionLocation, _err error) { + var _args107 THBaseServiceGetRegionLocationArgs + _args107.Table = table + _args107.Row = row + _args107.Reload = reload + var _result109 THBaseServiceGetRegionLocationResult + var _meta108 thrift.ResponseMeta + _meta108, _err = p.Client_().Call(ctx, "getRegionLocation", &_args107, &_result109) + p.SetLastResponseMeta_(_meta108) + if _err != nil { + return + } + switch { + case _result109.Io!= nil: + return _r, _result109.Io + } + + if _ret110 := _result109.GetSuccess(); _ret110 != nil { + return _ret110, nil + } + return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "getRegionLocation failed: unknown result") +} + +// Get all of the region locations for a given table. +// +// +// Parameters: +// - Table +func (p *THBaseServiceClient) GetAllRegionLocations(ctx context.Context, table []byte) (_r []*THRegionLocation, _err error) { + var _args111 THBaseServiceGetAllRegionLocationsArgs + _args111.Table = table + var _result113 THBaseServiceGetAllRegionLocationsResult + var _meta112 thrift.ResponseMeta + _meta112, _err = p.Client_().Call(ctx, "getAllRegionLocations", &_args111, &_result113) + p.SetLastResponseMeta_(_meta112) + if _err != nil { + return + } + switch { + case _result113.Io!= nil: + return _r, _result113.Io + } + + return _result113.GetSuccess(), nil +} + +// Atomically checks if a row/family/qualifier value matches the expected +// value. If it does, it mutates the row. +// +// @return true if the row was mutated, false otherwise +// +// Parameters: +// - Table: to check in and delete from +// - Row: row to check +// - Family: column family to check +// - Qualifier: column qualifier to check +// - CompareOp: comparison to make on the value +// - Value: the expected value to be compared against, if not provided the +// check is for the non-existence of the column in question +// - RowMutations: row mutations to execute if the value matches +func (p *THBaseServiceClient) CheckAndMutate(ctx context.Context, table []byte, row []byte, family []byte, qualifier []byte, compareOp TCompareOp, value []byte, rowMutations *TRowMutations) (_r bool, _err error) { + var _args114 THBaseServiceCheckAndMutateArgs + _args114.Table = table + _args114.Row = row + _args114.Family = family + _args114.Qualifier = qualifier + _args114.CompareOp = compareOp + _args114.Value = value + _args114.RowMutations = rowMutations + var _result116 THBaseServiceCheckAndMutateResult + var _meta115 thrift.ResponseMeta + _meta115, _err = p.Client_().Call(ctx, "checkAndMutate", &_args114, &_result116) + p.SetLastResponseMeta_(_meta115) + if _err != nil { + return + } + switch { + case _result116.Io!= nil: + return _r, _result116.Io + } + + return _result116.GetSuccess(), nil +} + +// Get a table descriptor. +// @return the TableDescriptor of the giving tablename +// +// +// Parameters: +// - Table: the tablename of the table to get tableDescriptor +func (p *THBaseServiceClient) GetTableDescriptor(ctx context.Context, table *TTableName) (_r *TTableDescriptor, _err error) { + var _args117 THBaseServiceGetTableDescriptorArgs + _args117.Table = table + var _result119 THBaseServiceGetTableDescriptorResult + var _meta118 thrift.ResponseMeta + _meta118, _err = p.Client_().Call(ctx, "getTableDescriptor", &_args117, &_result119) + p.SetLastResponseMeta_(_meta118) + if _err != nil { + return + } + switch { + case _result119.Io!= nil: + return _r, _result119.Io + } + + if _ret120 := _result119.GetSuccess(); _ret120 != nil { + return _ret120, nil + } + return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "getTableDescriptor failed: unknown result") +} + +// Get table descriptors of tables. +// @return the TableDescriptor of the giving tablename +// +// +// Parameters: +// - Tables: the tablename list of the tables to get tableDescriptor +func (p *THBaseServiceClient) GetTableDescriptors(ctx context.Context, tables []*TTableName) (_r []*TTableDescriptor, _err error) { + var _args121 THBaseServiceGetTableDescriptorsArgs + _args121.Tables = tables + var _result123 THBaseServiceGetTableDescriptorsResult + var _meta122 thrift.ResponseMeta + _meta122, _err = p.Client_().Call(ctx, "getTableDescriptors", &_args121, &_result123) + p.SetLastResponseMeta_(_meta122) + if _err != nil { + return + } + switch { + case _result123.Io!= nil: + return _r, _result123.Io + } + + return _result123.GetSuccess(), nil +} + +// +// @return true if table exists already, false if not +// +// +// Parameters: +// - TableName: the tablename of the tables to check +func (p *THBaseServiceClient) TableExists(ctx context.Context, tableName *TTableName) (_r bool, _err error) { + var _args124 THBaseServiceTableExistsArgs + _args124.TableName = tableName + var _result126 THBaseServiceTableExistsResult + var _meta125 thrift.ResponseMeta + _meta125, _err = p.Client_().Call(ctx, "tableExists", &_args124, &_result126) + p.SetLastResponseMeta_(_meta125) + if _err != nil { + return + } + switch { + case _result126.Io!= nil: + return _r, _result126.Io + } + + return _result126.GetSuccess(), nil +} + +// Get table descriptors of tables that match the given pattern +// @return the tableDescriptors of the matching table +// +// +// Parameters: +// - Regex: The regular expression to match against +// - IncludeSysTables: set to false if match only against userspace tables +func (p *THBaseServiceClient) GetTableDescriptorsByPattern(ctx context.Context, regex string, includeSysTables bool) (_r []*TTableDescriptor, _err error) { + var _args127 THBaseServiceGetTableDescriptorsByPatternArgs + _args127.Regex = regex + _args127.IncludeSysTables = includeSysTables + var _result129 THBaseServiceGetTableDescriptorsByPatternResult + var _meta128 thrift.ResponseMeta + _meta128, _err = p.Client_().Call(ctx, "getTableDescriptorsByPattern", &_args127, &_result129) + p.SetLastResponseMeta_(_meta128) + if _err != nil { + return + } + switch { + case _result129.Io!= nil: + return _r, _result129.Io + } + + return _result129.GetSuccess(), nil +} + +// Get table descriptors of tables in the given namespace +// @return the tableDescriptors in the namespce +// +// +// Parameters: +// - Name: The namesapce's name +func (p *THBaseServiceClient) GetTableDescriptorsByNamespace(ctx context.Context, name string) (_r []*TTableDescriptor, _err error) { + var _args130 THBaseServiceGetTableDescriptorsByNamespaceArgs + _args130.Name = name + var _result132 THBaseServiceGetTableDescriptorsByNamespaceResult + var _meta131 thrift.ResponseMeta + _meta131, _err = p.Client_().Call(ctx, "getTableDescriptorsByNamespace", &_args130, &_result132) + p.SetLastResponseMeta_(_meta131) + if _err != nil { + return + } + switch { + case _result132.Io!= nil: + return _r, _result132.Io + } + + return _result132.GetSuccess(), nil +} + +// Get table names of tables that match the given pattern +// @return the table names of the matching table +// +// +// Parameters: +// - Regex: The regular expression to match against +// - IncludeSysTables: set to false if match only against userspace tables +func (p *THBaseServiceClient) GetTableNamesByPattern(ctx context.Context, regex string, includeSysTables bool) (_r []*TTableName, _err error) { + var _args133 THBaseServiceGetTableNamesByPatternArgs + _args133.Regex = regex + _args133.IncludeSysTables = includeSysTables + var _result135 THBaseServiceGetTableNamesByPatternResult + var _meta134 thrift.ResponseMeta + _meta134, _err = p.Client_().Call(ctx, "getTableNamesByPattern", &_args133, &_result135) + p.SetLastResponseMeta_(_meta134) + if _err != nil { + return + } + switch { + case _result135.Io!= nil: + return _r, _result135.Io + } + + return _result135.GetSuccess(), nil +} + +// Get table names of tables in the given namespace +// @return the table names of the matching table +// +// +// Parameters: +// - Name: The namesapce's name +func (p *THBaseServiceClient) GetTableNamesByNamespace(ctx context.Context, name string) (_r []*TTableName, _err error) { + var _args136 THBaseServiceGetTableNamesByNamespaceArgs + _args136.Name = name + var _result138 THBaseServiceGetTableNamesByNamespaceResult + var _meta137 thrift.ResponseMeta + _meta137, _err = p.Client_().Call(ctx, "getTableNamesByNamespace", &_args136, &_result138) + p.SetLastResponseMeta_(_meta137) + if _err != nil { + return + } + switch { + case _result138.Io!= nil: + return _r, _result138.Io + } + + return _result138.GetSuccess(), nil +} + +// Creates a new table with an initial set of empty regions defined by the specified split keys. +// The total number of regions created will be the number of split keys plus one. Synchronous +// operation. +// +// +// Parameters: +// - Desc: table descriptor for table +// - SplitKeys: rray of split keys for the initial regions of the table +func (p *THBaseServiceClient) CreateTable(ctx context.Context, desc *TTableDescriptor, splitKeys [][]byte) (_err error) { + var _args139 THBaseServiceCreateTableArgs + _args139.Desc = desc + _args139.SplitKeys = splitKeys + var _result141 THBaseServiceCreateTableResult + var _meta140 thrift.ResponseMeta + _meta140, _err = p.Client_().Call(ctx, "createTable", &_args139, &_result141) + p.SetLastResponseMeta_(_meta140) + if _err != nil { + return + } + switch { + case _result141.Io!= nil: + return _result141.Io + } + + return nil +} + +// Deletes a table. Synchronous operation. +// +// +// Parameters: +// - TableName: the tablename to delete +func (p *THBaseServiceClient) DeleteTable(ctx context.Context, tableName *TTableName) (_err error) { + var _args142 THBaseServiceDeleteTableArgs + _args142.TableName = tableName + var _result144 THBaseServiceDeleteTableResult + var _meta143 thrift.ResponseMeta + _meta143, _err = p.Client_().Call(ctx, "deleteTable", &_args142, &_result144) + p.SetLastResponseMeta_(_meta143) + if _err != nil { + return + } + switch { + case _result144.Io!= nil: + return _result144.Io + } + + return nil +} + +// Truncate a table. Synchronous operation. +// +// +// Parameters: +// - TableName: the tablename to truncate +// - PreserveSplits: whether to preserve previous splits +func (p *THBaseServiceClient) TruncateTable(ctx context.Context, tableName *TTableName, preserveSplits bool) (_err error) { + var _args145 THBaseServiceTruncateTableArgs + _args145.TableName = tableName + _args145.PreserveSplits = preserveSplits + var _result147 THBaseServiceTruncateTableResult + var _meta146 thrift.ResponseMeta + _meta146, _err = p.Client_().Call(ctx, "truncateTable", &_args145, &_result147) + p.SetLastResponseMeta_(_meta146) + if _err != nil { + return + } + switch { + case _result147.Io!= nil: + return _result147.Io + } + + return nil +} + +// Enalbe a table +// +// +// Parameters: +// - TableName: the tablename to enable +func (p *THBaseServiceClient) EnableTable(ctx context.Context, tableName *TTableName) (_err error) { + var _args148 THBaseServiceEnableTableArgs + _args148.TableName = tableName + var _result150 THBaseServiceEnableTableResult + var _meta149 thrift.ResponseMeta + _meta149, _err = p.Client_().Call(ctx, "enableTable", &_args148, &_result150) + p.SetLastResponseMeta_(_meta149) + if _err != nil { + return + } + switch { + case _result150.Io!= nil: + return _result150.Io + } + + return nil +} + +// Disable a table +// +// +// Parameters: +// - TableName: the tablename to disable +func (p *THBaseServiceClient) DisableTable(ctx context.Context, tableName *TTableName) (_err error) { + var _args151 THBaseServiceDisableTableArgs + _args151.TableName = tableName + var _result153 THBaseServiceDisableTableResult + var _meta152 thrift.ResponseMeta + _meta152, _err = p.Client_().Call(ctx, "disableTable", &_args151, &_result153) + p.SetLastResponseMeta_(_meta152) + if _err != nil { + return + } + switch { + case _result153.Io!= nil: + return _result153.Io + } + + return nil +} + +// +// @return true if table is enabled, false if not +// +// +// Parameters: +// - TableName: the tablename to check +func (p *THBaseServiceClient) IsTableEnabled(ctx context.Context, tableName *TTableName) (_r bool, _err error) { + var _args154 THBaseServiceIsTableEnabledArgs + _args154.TableName = tableName + var _result156 THBaseServiceIsTableEnabledResult + var _meta155 thrift.ResponseMeta + _meta155, _err = p.Client_().Call(ctx, "isTableEnabled", &_args154, &_result156) + p.SetLastResponseMeta_(_meta155) + if _err != nil { + return + } + switch { + case _result156.Io!= nil: + return _r, _result156.Io + } + + return _result156.GetSuccess(), nil +} + +// +// @return true if table is disabled, false if not +// +// +// Parameters: +// - TableName: the tablename to check +func (p *THBaseServiceClient) IsTableDisabled(ctx context.Context, tableName *TTableName) (_r bool, _err error) { + var _args157 THBaseServiceIsTableDisabledArgs + _args157.TableName = tableName + var _result159 THBaseServiceIsTableDisabledResult + var _meta158 thrift.ResponseMeta + _meta158, _err = p.Client_().Call(ctx, "isTableDisabled", &_args157, &_result159) + p.SetLastResponseMeta_(_meta158) + if _err != nil { + return + } + switch { + case _result159.Io!= nil: + return _r, _result159.Io + } + + return _result159.GetSuccess(), nil +} + +// +// @return true if table is available, false if not +// +// +// Parameters: +// - TableName: the tablename to check +func (p *THBaseServiceClient) IsTableAvailable(ctx context.Context, tableName *TTableName) (_r bool, _err error) { + var _args160 THBaseServiceIsTableAvailableArgs + _args160.TableName = tableName + var _result162 THBaseServiceIsTableAvailableResult + var _meta161 thrift.ResponseMeta + _meta161, _err = p.Client_().Call(ctx, "isTableAvailable", &_args160, &_result162) + p.SetLastResponseMeta_(_meta161) + if _err != nil { + return + } + switch { + case _result162.Io!= nil: + return _r, _result162.Io + } + + return _result162.GetSuccess(), nil +} + +// * Use this api to check if the table has been created with the specified number of splitkeys +// * which was used while creating the given table. Note : If this api is used after a table's +// * region gets splitted, the api may return false. +// * +// * @return true if table is available, false if not +// * +// * @deprecated Since 2.2.0. Because the same method in Table interface has been deprecated +// * since 2.0.0, we will remove it in 3.0.0 release. +// * Use {@link #isTableAvailable(TTableName tableName)} instead +// * +// +// Parameters: +// - TableName: the tablename to check +// - SplitKeys: keys to check if the table has been created with all split keys +func (p *THBaseServiceClient) IsTableAvailableWithSplit(ctx context.Context, tableName *TTableName, splitKeys [][]byte) (_r bool, _err error) { + var _args163 THBaseServiceIsTableAvailableWithSplitArgs + _args163.TableName = tableName + _args163.SplitKeys = splitKeys + var _result165 THBaseServiceIsTableAvailableWithSplitResult + var _meta164 thrift.ResponseMeta + _meta164, _err = p.Client_().Call(ctx, "isTableAvailableWithSplit", &_args163, &_result165) + p.SetLastResponseMeta_(_meta164) + if _err != nil { + return + } + switch { + case _result165.Io!= nil: + return _r, _result165.Io + } + + return _result165.GetSuccess(), nil +} + +// Add a column family to an existing table. Synchronous operation. +// +// +// Parameters: +// - TableName: the tablename to add column family to +// - Column: column family descriptor of column family to be added +func (p *THBaseServiceClient) AddColumnFamily(ctx context.Context, tableName *TTableName, column *TColumnFamilyDescriptor) (_err error) { + var _args166 THBaseServiceAddColumnFamilyArgs + _args166.TableName = tableName + _args166.Column = column + var _result168 THBaseServiceAddColumnFamilyResult + var _meta167 thrift.ResponseMeta + _meta167, _err = p.Client_().Call(ctx, "addColumnFamily", &_args166, &_result168) + p.SetLastResponseMeta_(_meta167) + if _err != nil { + return + } + switch { + case _result168.Io!= nil: + return _result168.Io + } + + return nil +} + +// Delete a column family from a table. Synchronous operation. +// +// +// Parameters: +// - TableName: the tablename to delete column family from +// - Column: name of column family to be deleted +func (p *THBaseServiceClient) DeleteColumnFamily(ctx context.Context, tableName *TTableName, column []byte) (_err error) { + var _args169 THBaseServiceDeleteColumnFamilyArgs + _args169.TableName = tableName + _args169.Column = column + var _result171 THBaseServiceDeleteColumnFamilyResult + var _meta170 thrift.ResponseMeta + _meta170, _err = p.Client_().Call(ctx, "deleteColumnFamily", &_args169, &_result171) + p.SetLastResponseMeta_(_meta170) + if _err != nil { + return + } + switch { + case _result171.Io!= nil: + return _result171.Io + } + + return nil +} + +// Modify an existing column family on a table. Synchronous operation. +// +// +// Parameters: +// - TableName: the tablename to modify column family +// - Column: column family descriptor of column family to be modified +func (p *THBaseServiceClient) ModifyColumnFamily(ctx context.Context, tableName *TTableName, column *TColumnFamilyDescriptor) (_err error) { + var _args172 THBaseServiceModifyColumnFamilyArgs + _args172.TableName = tableName + _args172.Column = column + var _result174 THBaseServiceModifyColumnFamilyResult + var _meta173 thrift.ResponseMeta + _meta173, _err = p.Client_().Call(ctx, "modifyColumnFamily", &_args172, &_result174) + p.SetLastResponseMeta_(_meta173) + if _err != nil { + return + } + switch { + case _result174.Io!= nil: + return _result174.Io + } + + return nil +} + +// Modify an existing table +// +// +// Parameters: +// - Desc: the descriptor of the table to modify +func (p *THBaseServiceClient) ModifyTable(ctx context.Context, desc *TTableDescriptor) (_err error) { + var _args175 THBaseServiceModifyTableArgs + _args175.Desc = desc + var _result177 THBaseServiceModifyTableResult + var _meta176 thrift.ResponseMeta + _meta176, _err = p.Client_().Call(ctx, "modifyTable", &_args175, &_result177) + p.SetLastResponseMeta_(_meta176) + if _err != nil { + return + } + switch { + case _result177.Io!= nil: + return _result177.Io + } + + return nil +} + +// Create a new namespace. Blocks until namespace has been successfully created or an exception is +// thrown +// +// +// Parameters: +// - NamespaceDesc: descriptor which describes the new namespace +func (p *THBaseServiceClient) CreateNamespace(ctx context.Context, namespaceDesc *TNamespaceDescriptor) (_err error) { + var _args178 THBaseServiceCreateNamespaceArgs + _args178.NamespaceDesc = namespaceDesc + var _result180 THBaseServiceCreateNamespaceResult + var _meta179 thrift.ResponseMeta + _meta179, _err = p.Client_().Call(ctx, "createNamespace", &_args178, &_result180) + p.SetLastResponseMeta_(_meta179) + if _err != nil { + return + } + switch { + case _result180.Io!= nil: + return _result180.Io + } + + return nil +} + +// Modify an existing namespace. Blocks until namespace has been successfully modified or an +// exception is thrown +// +// +// Parameters: +// - NamespaceDesc: descriptor which describes the new namespace +func (p *THBaseServiceClient) ModifyNamespace(ctx context.Context, namespaceDesc *TNamespaceDescriptor) (_err error) { + var _args181 THBaseServiceModifyNamespaceArgs + _args181.NamespaceDesc = namespaceDesc + var _result183 THBaseServiceModifyNamespaceResult + var _meta182 thrift.ResponseMeta + _meta182, _err = p.Client_().Call(ctx, "modifyNamespace", &_args181, &_result183) + p.SetLastResponseMeta_(_meta182) + if _err != nil { + return + } + switch { + case _result183.Io!= nil: + return _result183.Io + } + + return nil +} + +// Delete an existing namespace. Only empty namespaces (no tables) can be removed. +// Blocks until namespace has been successfully deleted or an +// exception is thrown. +// +// +// Parameters: +// - Name: namespace name +func (p *THBaseServiceClient) DeleteNamespace(ctx context.Context, name string) (_err error) { + var _args184 THBaseServiceDeleteNamespaceArgs + _args184.Name = name + var _result186 THBaseServiceDeleteNamespaceResult + var _meta185 thrift.ResponseMeta + _meta185, _err = p.Client_().Call(ctx, "deleteNamespace", &_args184, &_result186) + p.SetLastResponseMeta_(_meta185) + if _err != nil { + return + } + switch { + case _result186.Io!= nil: + return _result186.Io + } + + return nil +} + +// Get a namespace descriptor by name. +// @retrun the descriptor +// +// +// Parameters: +// - Name: name of namespace descriptor +func (p *THBaseServiceClient) GetNamespaceDescriptor(ctx context.Context, name string) (_r *TNamespaceDescriptor, _err error) { + var _args187 THBaseServiceGetNamespaceDescriptorArgs + _args187.Name = name + var _result189 THBaseServiceGetNamespaceDescriptorResult + var _meta188 thrift.ResponseMeta + _meta188, _err = p.Client_().Call(ctx, "getNamespaceDescriptor", &_args187, &_result189) + p.SetLastResponseMeta_(_meta188) + if _err != nil { + return + } + switch { + case _result189.Io!= nil: + return _r, _result189.Io + } + + if _ret190 := _result189.GetSuccess(); _ret190 != nil { + return _ret190, nil + } + return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "getNamespaceDescriptor failed: unknown result") +} + +// @return all namespaces +// +func (p *THBaseServiceClient) ListNamespaceDescriptors(ctx context.Context) (_r []*TNamespaceDescriptor, _err error) { + var _args191 THBaseServiceListNamespaceDescriptorsArgs + var _result193 THBaseServiceListNamespaceDescriptorsResult + var _meta192 thrift.ResponseMeta + _meta192, _err = p.Client_().Call(ctx, "listNamespaceDescriptors", &_args191, &_result193) + p.SetLastResponseMeta_(_meta192) + if _err != nil { + return + } + switch { + case _result193.Io!= nil: + return _r, _result193.Io + } + + return _result193.GetSuccess(), nil +} + +// @return all namespace names +// +func (p *THBaseServiceClient) ListNamespaces(ctx context.Context) (_r []string, _err error) { + var _args194 THBaseServiceListNamespacesArgs + var _result196 THBaseServiceListNamespacesResult + var _meta195 thrift.ResponseMeta + _meta195, _err = p.Client_().Call(ctx, "listNamespaces", &_args194, &_result196) + p.SetLastResponseMeta_(_meta195) + if _err != nil { + return + } + switch { + case _result196.Io!= nil: + return _r, _result196.Io + } + + return _result196.GetSuccess(), nil +} + +// Get the type of this thrift server. +// +// @return the type of this thrift server +func (p *THBaseServiceClient) GetThriftServerType(ctx context.Context) (_r TThriftServerType, _err error) { + var _args197 THBaseServiceGetThriftServerTypeArgs + var _result199 THBaseServiceGetThriftServerTypeResult + var _meta198 thrift.ResponseMeta + _meta198, _err = p.Client_().Call(ctx, "getThriftServerType", &_args197, &_result199) + p.SetLastResponseMeta_(_meta198) + if _err != nil { + return + } + return _result199.GetSuccess(), nil +} + +// Retrieves online slow RPC logs from the provided list of +// RegionServers +// +// @return online slowlog response list +// @throws TIOError if a remote or network exception occurs +// +// Parameters: +// - ServerNames: @param serverNames Server names to get slowlog responses from +// - LogQueryFilter: @param logQueryFilter filter to be used if provided +func (p *THBaseServiceClient) GetSlowLogResponses(ctx context.Context, serverNames []*TServerName, logQueryFilter *TLogQueryFilter) (_r []*TOnlineLogRecord, _err error) { + var _args200 THBaseServiceGetSlowLogResponsesArgs + _args200.ServerNames = serverNames + _args200.LogQueryFilter = logQueryFilter + var _result202 THBaseServiceGetSlowLogResponsesResult + var _meta201 thrift.ResponseMeta + _meta201, _err = p.Client_().Call(ctx, "getSlowLogResponses", &_args200, &_result202) + p.SetLastResponseMeta_(_meta201) + if _err != nil { + return + } + switch { + case _result202.Io!= nil: + return _r, _result202.Io + } + + return _result202.GetSuccess(), nil +} + +// Clears online slow/large RPC logs from the provided list of +// RegionServers +// +// @return List of booleans representing if online slowlog response buffer is cleaned +// from each RegionServer +// @throws TIOError if a remote or network exception occurs +// +// Parameters: +// - ServerNames: @param serverNames Set of Server names to clean slowlog responses from +func (p *THBaseServiceClient) ClearSlowLogResponses(ctx context.Context, serverNames []*TServerName) (_r []bool, _err error) { + var _args203 THBaseServiceClearSlowLogResponsesArgs + _args203.ServerNames = serverNames + var _result205 THBaseServiceClearSlowLogResponsesResult + var _meta204 thrift.ResponseMeta + _meta204, _err = p.Client_().Call(ctx, "clearSlowLogResponses", &_args203, &_result205) + p.SetLastResponseMeta_(_meta204) + if _err != nil { + return + } + switch { + case _result205.Io!= nil: + return _r, _result205.Io + } + + return _result205.GetSuccess(), nil +} + +// Returns the cluster ID for this cluster. +func (p *THBaseServiceClient) GetClusterId(ctx context.Context) (_r string, _err error) { + var _args206 THBaseServiceGetClusterIdArgs + var _result208 THBaseServiceGetClusterIdResult + var _meta207 thrift.ResponseMeta + _meta207, _err = p.Client_().Call(ctx, "getClusterId", &_args206, &_result208) + p.SetLastResponseMeta_(_meta207) + if _err != nil { + return + } + return _result208.GetSuccess(), nil +} + +type THBaseServiceProcessor struct { + processorMap map[string]thrift.TProcessorFunction + handler THBaseService +} + +func (p *THBaseServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction) { + p.processorMap[key] = processor +} + +func (p *THBaseServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool) { + processor, ok = p.processorMap[key] + return processor, ok +} + +func (p *THBaseServiceProcessor) ProcessorMap() map[string]thrift.TProcessorFunction { + return p.processorMap +} + +func NewTHBaseServiceProcessor(handler THBaseService) *THBaseServiceProcessor { + + self209 := &THBaseServiceProcessor{handler:handler, processorMap:make(map[string]thrift.TProcessorFunction)} + self209.processorMap["exists"] = &tHBaseServiceProcessorExists{handler:handler} + self209.processorMap["existsAll"] = &tHBaseServiceProcessorExistsAll{handler:handler} + self209.processorMap["get"] = &tHBaseServiceProcessorGet{handler:handler} + self209.processorMap["getMultiple"] = &tHBaseServiceProcessorGetMultiple{handler:handler} + self209.processorMap["put"] = &tHBaseServiceProcessorPut{handler:handler} + self209.processorMap["checkAndPut"] = &tHBaseServiceProcessorCheckAndPut{handler:handler} + self209.processorMap["putMultiple"] = &tHBaseServiceProcessorPutMultiple{handler:handler} + self209.processorMap["deleteSingle"] = &tHBaseServiceProcessorDeleteSingle{handler:handler} + self209.processorMap["deleteMultiple"] = &tHBaseServiceProcessorDeleteMultiple{handler:handler} + self209.processorMap["checkAndDelete"] = &tHBaseServiceProcessorCheckAndDelete{handler:handler} + self209.processorMap["increment"] = &tHBaseServiceProcessorIncrement{handler:handler} + self209.processorMap["append"] = &tHBaseServiceProcessorAppend{handler:handler} + self209.processorMap["openScanner"] = &tHBaseServiceProcessorOpenScanner{handler:handler} + self209.processorMap["getScannerRows"] = &tHBaseServiceProcessorGetScannerRows{handler:handler} + self209.processorMap["closeScanner"] = &tHBaseServiceProcessorCloseScanner{handler:handler} + self209.processorMap["mutateRow"] = &tHBaseServiceProcessorMutateRow{handler:handler} + self209.processorMap["getScannerResults"] = &tHBaseServiceProcessorGetScannerResults{handler:handler} + self209.processorMap["getRegionLocation"] = &tHBaseServiceProcessorGetRegionLocation{handler:handler} + self209.processorMap["getAllRegionLocations"] = &tHBaseServiceProcessorGetAllRegionLocations{handler:handler} + self209.processorMap["checkAndMutate"] = &tHBaseServiceProcessorCheckAndMutate{handler:handler} + self209.processorMap["getTableDescriptor"] = &tHBaseServiceProcessorGetTableDescriptor{handler:handler} + self209.processorMap["getTableDescriptors"] = &tHBaseServiceProcessorGetTableDescriptors{handler:handler} + self209.processorMap["tableExists"] = &tHBaseServiceProcessorTableExists{handler:handler} + self209.processorMap["getTableDescriptorsByPattern"] = &tHBaseServiceProcessorGetTableDescriptorsByPattern{handler:handler} + self209.processorMap["getTableDescriptorsByNamespace"] = &tHBaseServiceProcessorGetTableDescriptorsByNamespace{handler:handler} + self209.processorMap["getTableNamesByPattern"] = &tHBaseServiceProcessorGetTableNamesByPattern{handler:handler} + self209.processorMap["getTableNamesByNamespace"] = &tHBaseServiceProcessorGetTableNamesByNamespace{handler:handler} + self209.processorMap["createTable"] = &tHBaseServiceProcessorCreateTable{handler:handler} + self209.processorMap["deleteTable"] = &tHBaseServiceProcessorDeleteTable{handler:handler} + self209.processorMap["truncateTable"] = &tHBaseServiceProcessorTruncateTable{handler:handler} + self209.processorMap["enableTable"] = &tHBaseServiceProcessorEnableTable{handler:handler} + self209.processorMap["disableTable"] = &tHBaseServiceProcessorDisableTable{handler:handler} + self209.processorMap["isTableEnabled"] = &tHBaseServiceProcessorIsTableEnabled{handler:handler} + self209.processorMap["isTableDisabled"] = &tHBaseServiceProcessorIsTableDisabled{handler:handler} + self209.processorMap["isTableAvailable"] = &tHBaseServiceProcessorIsTableAvailable{handler:handler} + self209.processorMap["isTableAvailableWithSplit"] = &tHBaseServiceProcessorIsTableAvailableWithSplit{handler:handler} + self209.processorMap["addColumnFamily"] = &tHBaseServiceProcessorAddColumnFamily{handler:handler} + self209.processorMap["deleteColumnFamily"] = &tHBaseServiceProcessorDeleteColumnFamily{handler:handler} + self209.processorMap["modifyColumnFamily"] = &tHBaseServiceProcessorModifyColumnFamily{handler:handler} + self209.processorMap["modifyTable"] = &tHBaseServiceProcessorModifyTable{handler:handler} + self209.processorMap["createNamespace"] = &tHBaseServiceProcessorCreateNamespace{handler:handler} + self209.processorMap["modifyNamespace"] = &tHBaseServiceProcessorModifyNamespace{handler:handler} + self209.processorMap["deleteNamespace"] = &tHBaseServiceProcessorDeleteNamespace{handler:handler} + self209.processorMap["getNamespaceDescriptor"] = &tHBaseServiceProcessorGetNamespaceDescriptor{handler:handler} + self209.processorMap["listNamespaceDescriptors"] = &tHBaseServiceProcessorListNamespaceDescriptors{handler:handler} + self209.processorMap["listNamespaces"] = &tHBaseServiceProcessorListNamespaces{handler:handler} + self209.processorMap["getThriftServerType"] = &tHBaseServiceProcessorGetThriftServerType{handler:handler} + self209.processorMap["getSlowLogResponses"] = &tHBaseServiceProcessorGetSlowLogResponses{handler:handler} + self209.processorMap["clearSlowLogResponses"] = &tHBaseServiceProcessorClearSlowLogResponses{handler:handler} + self209.processorMap["getClusterId"] = &tHBaseServiceProcessorGetClusterId{handler:handler} +return self209 +} + +func (p *THBaseServiceProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + name, _, seqId, err2 := iprot.ReadMessageBegin(ctx) + if err2 != nil { return false, thrift.WrapTException(err2) } + if processor, ok := p.GetProcessorFunction(name); ok { + return processor.Process(ctx, seqId, iprot, oprot) + } + iprot.Skip(ctx, thrift.STRUCT) + iprot.ReadMessageEnd(ctx) + x210 := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function " + name) + oprot.WriteMessageBegin(ctx, name, thrift.EXCEPTION, seqId) + x210.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, x210 + +} + +type tHBaseServiceProcessorExists struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorExists) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err211 error + args := THBaseServiceExistsArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "exists", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceExistsResult{} + if retval, err2 := p.handler.Exists(ctx, args.Table, args.Tget); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc212 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing exists: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "exists", thrift.EXCEPTION, seqId); err2 != nil { + _write_err211 = thrift.WrapTException(err2) + } + if err2 := _exc212.Write(ctx, oprot); _write_err211 == nil && err2 != nil { + _write_err211 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err211 == nil && err2 != nil { + _write_err211 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err211 == nil && err2 != nil { + _write_err211 = thrift.WrapTException(err2) + } + if _write_err211 != nil { + return false, thrift.WrapTException(_write_err211) + } + return true, err + } + } else { + result.Success = &retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "exists", thrift.REPLY, seqId); err2 != nil { + _write_err211 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err211 == nil && err2 != nil { + _write_err211 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err211 == nil && err2 != nil { + _write_err211 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err211 == nil && err2 != nil { + _write_err211 = thrift.WrapTException(err2) + } + if _write_err211 != nil { + return false, thrift.WrapTException(_write_err211) + } + return true, err +} + +type tHBaseServiceProcessorExistsAll struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorExistsAll) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err213 error + args := THBaseServiceExistsAllArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "existsAll", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceExistsAllResult{} + if retval, err2 := p.handler.ExistsAll(ctx, args.Table, args.Tgets); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc214 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing existsAll: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "existsAll", thrift.EXCEPTION, seqId); err2 != nil { + _write_err213 = thrift.WrapTException(err2) + } + if err2 := _exc214.Write(ctx, oprot); _write_err213 == nil && err2 != nil { + _write_err213 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err213 == nil && err2 != nil { + _write_err213 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err213 == nil && err2 != nil { + _write_err213 = thrift.WrapTException(err2) + } + if _write_err213 != nil { + return false, thrift.WrapTException(_write_err213) + } + return true, err + } + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "existsAll", thrift.REPLY, seqId); err2 != nil { + _write_err213 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err213 == nil && err2 != nil { + _write_err213 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err213 == nil && err2 != nil { + _write_err213 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err213 == nil && err2 != nil { + _write_err213 = thrift.WrapTException(err2) + } + if _write_err213 != nil { + return false, thrift.WrapTException(_write_err213) + } + return true, err +} + +type tHBaseServiceProcessorGet struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorGet) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err215 error + args := THBaseServiceGetArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "get", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceGetResult{} + if retval, err2 := p.handler.Get(ctx, args.Table, args.Tget); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc216 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing get: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "get", thrift.EXCEPTION, seqId); err2 != nil { + _write_err215 = thrift.WrapTException(err2) + } + if err2 := _exc216.Write(ctx, oprot); _write_err215 == nil && err2 != nil { + _write_err215 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err215 == nil && err2 != nil { + _write_err215 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err215 == nil && err2 != nil { + _write_err215 = thrift.WrapTException(err2) + } + if _write_err215 != nil { + return false, thrift.WrapTException(_write_err215) + } + return true, err + } + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "get", thrift.REPLY, seqId); err2 != nil { + _write_err215 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err215 == nil && err2 != nil { + _write_err215 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err215 == nil && err2 != nil { + _write_err215 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err215 == nil && err2 != nil { + _write_err215 = thrift.WrapTException(err2) + } + if _write_err215 != nil { + return false, thrift.WrapTException(_write_err215) + } + return true, err +} + +type tHBaseServiceProcessorGetMultiple struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorGetMultiple) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err217 error + args := THBaseServiceGetMultipleArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getMultiple", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceGetMultipleResult{} + if retval, err2 := p.handler.GetMultiple(ctx, args.Table, args.Tgets); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc218 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getMultiple: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "getMultiple", thrift.EXCEPTION, seqId); err2 != nil { + _write_err217 = thrift.WrapTException(err2) + } + if err2 := _exc218.Write(ctx, oprot); _write_err217 == nil && err2 != nil { + _write_err217 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err217 == nil && err2 != nil { + _write_err217 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err217 == nil && err2 != nil { + _write_err217 = thrift.WrapTException(err2) + } + if _write_err217 != nil { + return false, thrift.WrapTException(_write_err217) + } + return true, err + } + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "getMultiple", thrift.REPLY, seqId); err2 != nil { + _write_err217 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err217 == nil && err2 != nil { + _write_err217 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err217 == nil && err2 != nil { + _write_err217 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err217 == nil && err2 != nil { + _write_err217 = thrift.WrapTException(err2) + } + if _write_err217 != nil { + return false, thrift.WrapTException(_write_err217) + } + return true, err +} + +type tHBaseServiceProcessorPut struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorPut) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err219 error + args := THBaseServicePutArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "put", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServicePutResult{} + if err2 := p.handler.Put(ctx, args.Table, args.Tput); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc220 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing put: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "put", thrift.EXCEPTION, seqId); err2 != nil { + _write_err219 = thrift.WrapTException(err2) + } + if err2 := _exc220.Write(ctx, oprot); _write_err219 == nil && err2 != nil { + _write_err219 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err219 == nil && err2 != nil { + _write_err219 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err219 == nil && err2 != nil { + _write_err219 = thrift.WrapTException(err2) + } + if _write_err219 != nil { + return false, thrift.WrapTException(_write_err219) + } + return true, err + } + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "put", thrift.REPLY, seqId); err2 != nil { + _write_err219 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err219 == nil && err2 != nil { + _write_err219 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err219 == nil && err2 != nil { + _write_err219 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err219 == nil && err2 != nil { + _write_err219 = thrift.WrapTException(err2) + } + if _write_err219 != nil { + return false, thrift.WrapTException(_write_err219) + } + return true, err +} + +type tHBaseServiceProcessorCheckAndPut struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorCheckAndPut) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err221 error + args := THBaseServiceCheckAndPutArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "checkAndPut", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceCheckAndPutResult{} + if retval, err2 := p.handler.CheckAndPut(ctx, args.Table, args.Row, args.Family, args.Qualifier, args.Value, args.Tput); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc222 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing checkAndPut: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "checkAndPut", thrift.EXCEPTION, seqId); err2 != nil { + _write_err221 = thrift.WrapTException(err2) + } + if err2 := _exc222.Write(ctx, oprot); _write_err221 == nil && err2 != nil { + _write_err221 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err221 == nil && err2 != nil { + _write_err221 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err221 == nil && err2 != nil { + _write_err221 = thrift.WrapTException(err2) + } + if _write_err221 != nil { + return false, thrift.WrapTException(_write_err221) + } + return true, err + } + } else { + result.Success = &retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "checkAndPut", thrift.REPLY, seqId); err2 != nil { + _write_err221 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err221 == nil && err2 != nil { + _write_err221 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err221 == nil && err2 != nil { + _write_err221 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err221 == nil && err2 != nil { + _write_err221 = thrift.WrapTException(err2) + } + if _write_err221 != nil { + return false, thrift.WrapTException(_write_err221) + } + return true, err +} + +type tHBaseServiceProcessorPutMultiple struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorPutMultiple) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err223 error + args := THBaseServicePutMultipleArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "putMultiple", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServicePutMultipleResult{} + if err2 := p.handler.PutMultiple(ctx, args.Table, args.Tputs); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc224 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing putMultiple: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "putMultiple", thrift.EXCEPTION, seqId); err2 != nil { + _write_err223 = thrift.WrapTException(err2) + } + if err2 := _exc224.Write(ctx, oprot); _write_err223 == nil && err2 != nil { + _write_err223 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err223 == nil && err2 != nil { + _write_err223 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err223 == nil && err2 != nil { + _write_err223 = thrift.WrapTException(err2) + } + if _write_err223 != nil { + return false, thrift.WrapTException(_write_err223) + } + return true, err + } + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "putMultiple", thrift.REPLY, seqId); err2 != nil { + _write_err223 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err223 == nil && err2 != nil { + _write_err223 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err223 == nil && err2 != nil { + _write_err223 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err223 == nil && err2 != nil { + _write_err223 = thrift.WrapTException(err2) + } + if _write_err223 != nil { + return false, thrift.WrapTException(_write_err223) + } + return true, err +} + +type tHBaseServiceProcessorDeleteSingle struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorDeleteSingle) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err225 error + args := THBaseServiceDeleteSingleArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "deleteSingle", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceDeleteSingleResult{} + if err2 := p.handler.DeleteSingle(ctx, args.Table, args.Tdelete); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc226 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteSingle: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "deleteSingle", thrift.EXCEPTION, seqId); err2 != nil { + _write_err225 = thrift.WrapTException(err2) + } + if err2 := _exc226.Write(ctx, oprot); _write_err225 == nil && err2 != nil { + _write_err225 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err225 == nil && err2 != nil { + _write_err225 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err225 == nil && err2 != nil { + _write_err225 = thrift.WrapTException(err2) + } + if _write_err225 != nil { + return false, thrift.WrapTException(_write_err225) + } + return true, err + } + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "deleteSingle", thrift.REPLY, seqId); err2 != nil { + _write_err225 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err225 == nil && err2 != nil { + _write_err225 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err225 == nil && err2 != nil { + _write_err225 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err225 == nil && err2 != nil { + _write_err225 = thrift.WrapTException(err2) + } + if _write_err225 != nil { + return false, thrift.WrapTException(_write_err225) + } + return true, err +} + +type tHBaseServiceProcessorDeleteMultiple struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorDeleteMultiple) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err227 error + args := THBaseServiceDeleteMultipleArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "deleteMultiple", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceDeleteMultipleResult{} + if retval, err2 := p.handler.DeleteMultiple(ctx, args.Table, args.Tdeletes); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc228 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteMultiple: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "deleteMultiple", thrift.EXCEPTION, seqId); err2 != nil { + _write_err227 = thrift.WrapTException(err2) + } + if err2 := _exc228.Write(ctx, oprot); _write_err227 == nil && err2 != nil { + _write_err227 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err227 == nil && err2 != nil { + _write_err227 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err227 == nil && err2 != nil { + _write_err227 = thrift.WrapTException(err2) + } + if _write_err227 != nil { + return false, thrift.WrapTException(_write_err227) + } + return true, err + } + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "deleteMultiple", thrift.REPLY, seqId); err2 != nil { + _write_err227 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err227 == nil && err2 != nil { + _write_err227 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err227 == nil && err2 != nil { + _write_err227 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err227 == nil && err2 != nil { + _write_err227 = thrift.WrapTException(err2) + } + if _write_err227 != nil { + return false, thrift.WrapTException(_write_err227) + } + return true, err +} + +type tHBaseServiceProcessorCheckAndDelete struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorCheckAndDelete) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err229 error + args := THBaseServiceCheckAndDeleteArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "checkAndDelete", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceCheckAndDeleteResult{} + if retval, err2 := p.handler.CheckAndDelete(ctx, args.Table, args.Row, args.Family, args.Qualifier, args.Value, args.Tdelete); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc230 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing checkAndDelete: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "checkAndDelete", thrift.EXCEPTION, seqId); err2 != nil { + _write_err229 = thrift.WrapTException(err2) + } + if err2 := _exc230.Write(ctx, oprot); _write_err229 == nil && err2 != nil { + _write_err229 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err229 == nil && err2 != nil { + _write_err229 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err229 == nil && err2 != nil { + _write_err229 = thrift.WrapTException(err2) + } + if _write_err229 != nil { + return false, thrift.WrapTException(_write_err229) + } + return true, err + } + } else { + result.Success = &retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "checkAndDelete", thrift.REPLY, seqId); err2 != nil { + _write_err229 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err229 == nil && err2 != nil { + _write_err229 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err229 == nil && err2 != nil { + _write_err229 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err229 == nil && err2 != nil { + _write_err229 = thrift.WrapTException(err2) + } + if _write_err229 != nil { + return false, thrift.WrapTException(_write_err229) + } + return true, err +} + +type tHBaseServiceProcessorIncrement struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorIncrement) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err231 error + args := THBaseServiceIncrementArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "increment", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceIncrementResult{} + if retval, err2 := p.handler.Increment(ctx, args.Table, args.Tincrement); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc232 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing increment: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "increment", thrift.EXCEPTION, seqId); err2 != nil { + _write_err231 = thrift.WrapTException(err2) + } + if err2 := _exc232.Write(ctx, oprot); _write_err231 == nil && err2 != nil { + _write_err231 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err231 == nil && err2 != nil { + _write_err231 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err231 == nil && err2 != nil { + _write_err231 = thrift.WrapTException(err2) + } + if _write_err231 != nil { + return false, thrift.WrapTException(_write_err231) + } + return true, err + } + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "increment", thrift.REPLY, seqId); err2 != nil { + _write_err231 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err231 == nil && err2 != nil { + _write_err231 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err231 == nil && err2 != nil { + _write_err231 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err231 == nil && err2 != nil { + _write_err231 = thrift.WrapTException(err2) + } + if _write_err231 != nil { + return false, thrift.WrapTException(_write_err231) + } + return true, err +} + +type tHBaseServiceProcessorAppend struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorAppend) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err233 error + args := THBaseServiceAppendArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "append", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceAppendResult{} + if retval, err2 := p.handler.Append(ctx, args.Table, args.Tappend); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc234 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing append: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "append", thrift.EXCEPTION, seqId); err2 != nil { + _write_err233 = thrift.WrapTException(err2) + } + if err2 := _exc234.Write(ctx, oprot); _write_err233 == nil && err2 != nil { + _write_err233 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err233 == nil && err2 != nil { + _write_err233 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err233 == nil && err2 != nil { + _write_err233 = thrift.WrapTException(err2) + } + if _write_err233 != nil { + return false, thrift.WrapTException(_write_err233) + } + return true, err + } + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "append", thrift.REPLY, seqId); err2 != nil { + _write_err233 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err233 == nil && err2 != nil { + _write_err233 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err233 == nil && err2 != nil { + _write_err233 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err233 == nil && err2 != nil { + _write_err233 = thrift.WrapTException(err2) + } + if _write_err233 != nil { + return false, thrift.WrapTException(_write_err233) + } + return true, err +} + +type tHBaseServiceProcessorOpenScanner struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorOpenScanner) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err235 error + args := THBaseServiceOpenScannerArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "openScanner", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceOpenScannerResult{} + if retval, err2 := p.handler.OpenScanner(ctx, args.Table, args.Tscan); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc236 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing openScanner: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "openScanner", thrift.EXCEPTION, seqId); err2 != nil { + _write_err235 = thrift.WrapTException(err2) + } + if err2 := _exc236.Write(ctx, oprot); _write_err235 == nil && err2 != nil { + _write_err235 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err235 == nil && err2 != nil { + _write_err235 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err235 == nil && err2 != nil { + _write_err235 = thrift.WrapTException(err2) + } + if _write_err235 != nil { + return false, thrift.WrapTException(_write_err235) + } + return true, err + } + } else { + result.Success = &retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "openScanner", thrift.REPLY, seqId); err2 != nil { + _write_err235 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err235 == nil && err2 != nil { + _write_err235 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err235 == nil && err2 != nil { + _write_err235 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err235 == nil && err2 != nil { + _write_err235 = thrift.WrapTException(err2) + } + if _write_err235 != nil { + return false, thrift.WrapTException(_write_err235) + } + return true, err +} + +type tHBaseServiceProcessorGetScannerRows struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorGetScannerRows) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err237 error + args := THBaseServiceGetScannerRowsArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getScannerRows", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceGetScannerRowsResult{} + if retval, err2 := p.handler.GetScannerRows(ctx, args.ScannerId, args.NumRows); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + case *TIllegalArgument: + result.Ia = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc238 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getScannerRows: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "getScannerRows", thrift.EXCEPTION, seqId); err2 != nil { + _write_err237 = thrift.WrapTException(err2) + } + if err2 := _exc238.Write(ctx, oprot); _write_err237 == nil && err2 != nil { + _write_err237 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err237 == nil && err2 != nil { + _write_err237 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err237 == nil && err2 != nil { + _write_err237 = thrift.WrapTException(err2) + } + if _write_err237 != nil { + return false, thrift.WrapTException(_write_err237) + } + return true, err + } + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "getScannerRows", thrift.REPLY, seqId); err2 != nil { + _write_err237 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err237 == nil && err2 != nil { + _write_err237 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err237 == nil && err2 != nil { + _write_err237 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err237 == nil && err2 != nil { + _write_err237 = thrift.WrapTException(err2) + } + if _write_err237 != nil { + return false, thrift.WrapTException(_write_err237) + } + return true, err +} + +type tHBaseServiceProcessorCloseScanner struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorCloseScanner) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err239 error + args := THBaseServiceCloseScannerArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "closeScanner", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceCloseScannerResult{} + if err2 := p.handler.CloseScanner(ctx, args.ScannerId); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + case *TIllegalArgument: + result.Ia = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc240 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing closeScanner: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "closeScanner", thrift.EXCEPTION, seqId); err2 != nil { + _write_err239 = thrift.WrapTException(err2) + } + if err2 := _exc240.Write(ctx, oprot); _write_err239 == nil && err2 != nil { + _write_err239 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err239 == nil && err2 != nil { + _write_err239 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err239 == nil && err2 != nil { + _write_err239 = thrift.WrapTException(err2) + } + if _write_err239 != nil { + return false, thrift.WrapTException(_write_err239) + } + return true, err + } + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "closeScanner", thrift.REPLY, seqId); err2 != nil { + _write_err239 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err239 == nil && err2 != nil { + _write_err239 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err239 == nil && err2 != nil { + _write_err239 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err239 == nil && err2 != nil { + _write_err239 = thrift.WrapTException(err2) + } + if _write_err239 != nil { + return false, thrift.WrapTException(_write_err239) + } + return true, err +} + +type tHBaseServiceProcessorMutateRow struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorMutateRow) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err241 error + args := THBaseServiceMutateRowArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "mutateRow", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceMutateRowResult{} + if err2 := p.handler.MutateRow(ctx, args.Table, args.TrowMutations); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc242 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing mutateRow: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "mutateRow", thrift.EXCEPTION, seqId); err2 != nil { + _write_err241 = thrift.WrapTException(err2) + } + if err2 := _exc242.Write(ctx, oprot); _write_err241 == nil && err2 != nil { + _write_err241 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err241 == nil && err2 != nil { + _write_err241 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err241 == nil && err2 != nil { + _write_err241 = thrift.WrapTException(err2) + } + if _write_err241 != nil { + return false, thrift.WrapTException(_write_err241) + } + return true, err + } + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "mutateRow", thrift.REPLY, seqId); err2 != nil { + _write_err241 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err241 == nil && err2 != nil { + _write_err241 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err241 == nil && err2 != nil { + _write_err241 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err241 == nil && err2 != nil { + _write_err241 = thrift.WrapTException(err2) + } + if _write_err241 != nil { + return false, thrift.WrapTException(_write_err241) + } + return true, err +} + +type tHBaseServiceProcessorGetScannerResults struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorGetScannerResults) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err243 error + args := THBaseServiceGetScannerResultsArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getScannerResults", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceGetScannerResultsResult{} + if retval, err2 := p.handler.GetScannerResults(ctx, args.Table, args.Tscan, args.NumRows); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc244 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getScannerResults: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "getScannerResults", thrift.EXCEPTION, seqId); err2 != nil { + _write_err243 = thrift.WrapTException(err2) + } + if err2 := _exc244.Write(ctx, oprot); _write_err243 == nil && err2 != nil { + _write_err243 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err243 == nil && err2 != nil { + _write_err243 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err243 == nil && err2 != nil { + _write_err243 = thrift.WrapTException(err2) + } + if _write_err243 != nil { + return false, thrift.WrapTException(_write_err243) + } + return true, err + } + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "getScannerResults", thrift.REPLY, seqId); err2 != nil { + _write_err243 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err243 == nil && err2 != nil { + _write_err243 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err243 == nil && err2 != nil { + _write_err243 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err243 == nil && err2 != nil { + _write_err243 = thrift.WrapTException(err2) + } + if _write_err243 != nil { + return false, thrift.WrapTException(_write_err243) + } + return true, err +} + +type tHBaseServiceProcessorGetRegionLocation struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorGetRegionLocation) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err245 error + args := THBaseServiceGetRegionLocationArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getRegionLocation", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceGetRegionLocationResult{} + if retval, err2 := p.handler.GetRegionLocation(ctx, args.Table, args.Row, args.Reload); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc246 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getRegionLocation: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "getRegionLocation", thrift.EXCEPTION, seqId); err2 != nil { + _write_err245 = thrift.WrapTException(err2) + } + if err2 := _exc246.Write(ctx, oprot); _write_err245 == nil && err2 != nil { + _write_err245 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err245 == nil && err2 != nil { + _write_err245 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err245 == nil && err2 != nil { + _write_err245 = thrift.WrapTException(err2) + } + if _write_err245 != nil { + return false, thrift.WrapTException(_write_err245) + } + return true, err + } + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "getRegionLocation", thrift.REPLY, seqId); err2 != nil { + _write_err245 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err245 == nil && err2 != nil { + _write_err245 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err245 == nil && err2 != nil { + _write_err245 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err245 == nil && err2 != nil { + _write_err245 = thrift.WrapTException(err2) + } + if _write_err245 != nil { + return false, thrift.WrapTException(_write_err245) + } + return true, err +} + +type tHBaseServiceProcessorGetAllRegionLocations struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorGetAllRegionLocations) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err247 error + args := THBaseServiceGetAllRegionLocationsArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getAllRegionLocations", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceGetAllRegionLocationsResult{} + if retval, err2 := p.handler.GetAllRegionLocations(ctx, args.Table); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc248 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getAllRegionLocations: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "getAllRegionLocations", thrift.EXCEPTION, seqId); err2 != nil { + _write_err247 = thrift.WrapTException(err2) + } + if err2 := _exc248.Write(ctx, oprot); _write_err247 == nil && err2 != nil { + _write_err247 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err247 == nil && err2 != nil { + _write_err247 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err247 == nil && err2 != nil { + _write_err247 = thrift.WrapTException(err2) + } + if _write_err247 != nil { + return false, thrift.WrapTException(_write_err247) + } + return true, err + } + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "getAllRegionLocations", thrift.REPLY, seqId); err2 != nil { + _write_err247 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err247 == nil && err2 != nil { + _write_err247 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err247 == nil && err2 != nil { + _write_err247 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err247 == nil && err2 != nil { + _write_err247 = thrift.WrapTException(err2) + } + if _write_err247 != nil { + return false, thrift.WrapTException(_write_err247) + } + return true, err +} + +type tHBaseServiceProcessorCheckAndMutate struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorCheckAndMutate) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err249 error + args := THBaseServiceCheckAndMutateArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "checkAndMutate", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceCheckAndMutateResult{} + if retval, err2 := p.handler.CheckAndMutate(ctx, args.Table, args.Row, args.Family, args.Qualifier, args.CompareOp, args.Value, args.RowMutations); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc250 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing checkAndMutate: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "checkAndMutate", thrift.EXCEPTION, seqId); err2 != nil { + _write_err249 = thrift.WrapTException(err2) + } + if err2 := _exc250.Write(ctx, oprot); _write_err249 == nil && err2 != nil { + _write_err249 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err249 == nil && err2 != nil { + _write_err249 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err249 == nil && err2 != nil { + _write_err249 = thrift.WrapTException(err2) + } + if _write_err249 != nil { + return false, thrift.WrapTException(_write_err249) + } + return true, err + } + } else { + result.Success = &retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "checkAndMutate", thrift.REPLY, seqId); err2 != nil { + _write_err249 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err249 == nil && err2 != nil { + _write_err249 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err249 == nil && err2 != nil { + _write_err249 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err249 == nil && err2 != nil { + _write_err249 = thrift.WrapTException(err2) + } + if _write_err249 != nil { + return false, thrift.WrapTException(_write_err249) + } + return true, err +} + +type tHBaseServiceProcessorGetTableDescriptor struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorGetTableDescriptor) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err251 error + args := THBaseServiceGetTableDescriptorArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getTableDescriptor", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceGetTableDescriptorResult{} + if retval, err2 := p.handler.GetTableDescriptor(ctx, args.Table); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc252 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getTableDescriptor: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "getTableDescriptor", thrift.EXCEPTION, seqId); err2 != nil { + _write_err251 = thrift.WrapTException(err2) + } + if err2 := _exc252.Write(ctx, oprot); _write_err251 == nil && err2 != nil { + _write_err251 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err251 == nil && err2 != nil { + _write_err251 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err251 == nil && err2 != nil { + _write_err251 = thrift.WrapTException(err2) + } + if _write_err251 != nil { + return false, thrift.WrapTException(_write_err251) + } + return true, err + } + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "getTableDescriptor", thrift.REPLY, seqId); err2 != nil { + _write_err251 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err251 == nil && err2 != nil { + _write_err251 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err251 == nil && err2 != nil { + _write_err251 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err251 == nil && err2 != nil { + _write_err251 = thrift.WrapTException(err2) + } + if _write_err251 != nil { + return false, thrift.WrapTException(_write_err251) + } + return true, err +} + +type tHBaseServiceProcessorGetTableDescriptors struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorGetTableDescriptors) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err253 error + args := THBaseServiceGetTableDescriptorsArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getTableDescriptors", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceGetTableDescriptorsResult{} + if retval, err2 := p.handler.GetTableDescriptors(ctx, args.Tables); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc254 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getTableDescriptors: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "getTableDescriptors", thrift.EXCEPTION, seqId); err2 != nil { + _write_err253 = thrift.WrapTException(err2) + } + if err2 := _exc254.Write(ctx, oprot); _write_err253 == nil && err2 != nil { + _write_err253 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err253 == nil && err2 != nil { + _write_err253 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err253 == nil && err2 != nil { + _write_err253 = thrift.WrapTException(err2) + } + if _write_err253 != nil { + return false, thrift.WrapTException(_write_err253) + } + return true, err + } + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "getTableDescriptors", thrift.REPLY, seqId); err2 != nil { + _write_err253 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err253 == nil && err2 != nil { + _write_err253 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err253 == nil && err2 != nil { + _write_err253 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err253 == nil && err2 != nil { + _write_err253 = thrift.WrapTException(err2) + } + if _write_err253 != nil { + return false, thrift.WrapTException(_write_err253) + } + return true, err +} + +type tHBaseServiceProcessorTableExists struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorTableExists) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err255 error + args := THBaseServiceTableExistsArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "tableExists", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceTableExistsResult{} + if retval, err2 := p.handler.TableExists(ctx, args.TableName); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc256 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing tableExists: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "tableExists", thrift.EXCEPTION, seqId); err2 != nil { + _write_err255 = thrift.WrapTException(err2) + } + if err2 := _exc256.Write(ctx, oprot); _write_err255 == nil && err2 != nil { + _write_err255 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err255 == nil && err2 != nil { + _write_err255 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err255 == nil && err2 != nil { + _write_err255 = thrift.WrapTException(err2) + } + if _write_err255 != nil { + return false, thrift.WrapTException(_write_err255) + } + return true, err + } + } else { + result.Success = &retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "tableExists", thrift.REPLY, seqId); err2 != nil { + _write_err255 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err255 == nil && err2 != nil { + _write_err255 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err255 == nil && err2 != nil { + _write_err255 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err255 == nil && err2 != nil { + _write_err255 = thrift.WrapTException(err2) + } + if _write_err255 != nil { + return false, thrift.WrapTException(_write_err255) + } + return true, err +} + +type tHBaseServiceProcessorGetTableDescriptorsByPattern struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorGetTableDescriptorsByPattern) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err257 error + args := THBaseServiceGetTableDescriptorsByPatternArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getTableDescriptorsByPattern", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceGetTableDescriptorsByPatternResult{} + if retval, err2 := p.handler.GetTableDescriptorsByPattern(ctx, args.Regex, args.IncludeSysTables); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc258 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getTableDescriptorsByPattern: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "getTableDescriptorsByPattern", thrift.EXCEPTION, seqId); err2 != nil { + _write_err257 = thrift.WrapTException(err2) + } + if err2 := _exc258.Write(ctx, oprot); _write_err257 == nil && err2 != nil { + _write_err257 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err257 == nil && err2 != nil { + _write_err257 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err257 == nil && err2 != nil { + _write_err257 = thrift.WrapTException(err2) + } + if _write_err257 != nil { + return false, thrift.WrapTException(_write_err257) + } + return true, err + } + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "getTableDescriptorsByPattern", thrift.REPLY, seqId); err2 != nil { + _write_err257 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err257 == nil && err2 != nil { + _write_err257 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err257 == nil && err2 != nil { + _write_err257 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err257 == nil && err2 != nil { + _write_err257 = thrift.WrapTException(err2) + } + if _write_err257 != nil { + return false, thrift.WrapTException(_write_err257) + } + return true, err +} + +type tHBaseServiceProcessorGetTableDescriptorsByNamespace struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorGetTableDescriptorsByNamespace) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err259 error + args := THBaseServiceGetTableDescriptorsByNamespaceArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getTableDescriptorsByNamespace", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceGetTableDescriptorsByNamespaceResult{} + if retval, err2 := p.handler.GetTableDescriptorsByNamespace(ctx, args.Name); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc260 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getTableDescriptorsByNamespace: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "getTableDescriptorsByNamespace", thrift.EXCEPTION, seqId); err2 != nil { + _write_err259 = thrift.WrapTException(err2) + } + if err2 := _exc260.Write(ctx, oprot); _write_err259 == nil && err2 != nil { + _write_err259 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err259 == nil && err2 != nil { + _write_err259 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err259 == nil && err2 != nil { + _write_err259 = thrift.WrapTException(err2) + } + if _write_err259 != nil { + return false, thrift.WrapTException(_write_err259) + } + return true, err + } + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "getTableDescriptorsByNamespace", thrift.REPLY, seqId); err2 != nil { + _write_err259 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err259 == nil && err2 != nil { + _write_err259 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err259 == nil && err2 != nil { + _write_err259 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err259 == nil && err2 != nil { + _write_err259 = thrift.WrapTException(err2) + } + if _write_err259 != nil { + return false, thrift.WrapTException(_write_err259) + } + return true, err +} + +type tHBaseServiceProcessorGetTableNamesByPattern struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorGetTableNamesByPattern) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err261 error + args := THBaseServiceGetTableNamesByPatternArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getTableNamesByPattern", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceGetTableNamesByPatternResult{} + if retval, err2 := p.handler.GetTableNamesByPattern(ctx, args.Regex, args.IncludeSysTables); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc262 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getTableNamesByPattern: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "getTableNamesByPattern", thrift.EXCEPTION, seqId); err2 != nil { + _write_err261 = thrift.WrapTException(err2) + } + if err2 := _exc262.Write(ctx, oprot); _write_err261 == nil && err2 != nil { + _write_err261 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err261 == nil && err2 != nil { + _write_err261 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err261 == nil && err2 != nil { + _write_err261 = thrift.WrapTException(err2) + } + if _write_err261 != nil { + return false, thrift.WrapTException(_write_err261) + } + return true, err + } + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "getTableNamesByPattern", thrift.REPLY, seqId); err2 != nil { + _write_err261 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err261 == nil && err2 != nil { + _write_err261 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err261 == nil && err2 != nil { + _write_err261 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err261 == nil && err2 != nil { + _write_err261 = thrift.WrapTException(err2) + } + if _write_err261 != nil { + return false, thrift.WrapTException(_write_err261) + } + return true, err +} + +type tHBaseServiceProcessorGetTableNamesByNamespace struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorGetTableNamesByNamespace) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err263 error + args := THBaseServiceGetTableNamesByNamespaceArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getTableNamesByNamespace", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceGetTableNamesByNamespaceResult{} + if retval, err2 := p.handler.GetTableNamesByNamespace(ctx, args.Name); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc264 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getTableNamesByNamespace: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "getTableNamesByNamespace", thrift.EXCEPTION, seqId); err2 != nil { + _write_err263 = thrift.WrapTException(err2) + } + if err2 := _exc264.Write(ctx, oprot); _write_err263 == nil && err2 != nil { + _write_err263 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err263 == nil && err2 != nil { + _write_err263 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err263 == nil && err2 != nil { + _write_err263 = thrift.WrapTException(err2) + } + if _write_err263 != nil { + return false, thrift.WrapTException(_write_err263) + } + return true, err + } + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "getTableNamesByNamespace", thrift.REPLY, seqId); err2 != nil { + _write_err263 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err263 == nil && err2 != nil { + _write_err263 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err263 == nil && err2 != nil { + _write_err263 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err263 == nil && err2 != nil { + _write_err263 = thrift.WrapTException(err2) + } + if _write_err263 != nil { + return false, thrift.WrapTException(_write_err263) + } + return true, err +} + +type tHBaseServiceProcessorCreateTable struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorCreateTable) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err265 error + args := THBaseServiceCreateTableArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "createTable", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceCreateTableResult{} + if err2 := p.handler.CreateTable(ctx, args.Desc, args.SplitKeys); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc266 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createTable: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "createTable", thrift.EXCEPTION, seqId); err2 != nil { + _write_err265 = thrift.WrapTException(err2) + } + if err2 := _exc266.Write(ctx, oprot); _write_err265 == nil && err2 != nil { + _write_err265 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err265 == nil && err2 != nil { + _write_err265 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err265 == nil && err2 != nil { + _write_err265 = thrift.WrapTException(err2) + } + if _write_err265 != nil { + return false, thrift.WrapTException(_write_err265) + } + return true, err + } + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "createTable", thrift.REPLY, seqId); err2 != nil { + _write_err265 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err265 == nil && err2 != nil { + _write_err265 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err265 == nil && err2 != nil { + _write_err265 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err265 == nil && err2 != nil { + _write_err265 = thrift.WrapTException(err2) + } + if _write_err265 != nil { + return false, thrift.WrapTException(_write_err265) + } + return true, err +} + +type tHBaseServiceProcessorDeleteTable struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorDeleteTable) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err267 error + args := THBaseServiceDeleteTableArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "deleteTable", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceDeleteTableResult{} + if err2 := p.handler.DeleteTable(ctx, args.TableName); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc268 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteTable: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "deleteTable", thrift.EXCEPTION, seqId); err2 != nil { + _write_err267 = thrift.WrapTException(err2) + } + if err2 := _exc268.Write(ctx, oprot); _write_err267 == nil && err2 != nil { + _write_err267 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err267 == nil && err2 != nil { + _write_err267 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err267 == nil && err2 != nil { + _write_err267 = thrift.WrapTException(err2) + } + if _write_err267 != nil { + return false, thrift.WrapTException(_write_err267) + } + return true, err + } + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "deleteTable", thrift.REPLY, seqId); err2 != nil { + _write_err267 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err267 == nil && err2 != nil { + _write_err267 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err267 == nil && err2 != nil { + _write_err267 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err267 == nil && err2 != nil { + _write_err267 = thrift.WrapTException(err2) + } + if _write_err267 != nil { + return false, thrift.WrapTException(_write_err267) + } + return true, err +} + +type tHBaseServiceProcessorTruncateTable struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorTruncateTable) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err269 error + args := THBaseServiceTruncateTableArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "truncateTable", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceTruncateTableResult{} + if err2 := p.handler.TruncateTable(ctx, args.TableName, args.PreserveSplits); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc270 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing truncateTable: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "truncateTable", thrift.EXCEPTION, seqId); err2 != nil { + _write_err269 = thrift.WrapTException(err2) + } + if err2 := _exc270.Write(ctx, oprot); _write_err269 == nil && err2 != nil { + _write_err269 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err269 == nil && err2 != nil { + _write_err269 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err269 == nil && err2 != nil { + _write_err269 = thrift.WrapTException(err2) + } + if _write_err269 != nil { + return false, thrift.WrapTException(_write_err269) + } + return true, err + } + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "truncateTable", thrift.REPLY, seqId); err2 != nil { + _write_err269 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err269 == nil && err2 != nil { + _write_err269 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err269 == nil && err2 != nil { + _write_err269 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err269 == nil && err2 != nil { + _write_err269 = thrift.WrapTException(err2) + } + if _write_err269 != nil { + return false, thrift.WrapTException(_write_err269) + } + return true, err +} + +type tHBaseServiceProcessorEnableTable struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorEnableTable) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err271 error + args := THBaseServiceEnableTableArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "enableTable", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceEnableTableResult{} + if err2 := p.handler.EnableTable(ctx, args.TableName); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc272 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing enableTable: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "enableTable", thrift.EXCEPTION, seqId); err2 != nil { + _write_err271 = thrift.WrapTException(err2) + } + if err2 := _exc272.Write(ctx, oprot); _write_err271 == nil && err2 != nil { + _write_err271 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err271 == nil && err2 != nil { + _write_err271 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err271 == nil && err2 != nil { + _write_err271 = thrift.WrapTException(err2) + } + if _write_err271 != nil { + return false, thrift.WrapTException(_write_err271) + } + return true, err + } + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "enableTable", thrift.REPLY, seqId); err2 != nil { + _write_err271 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err271 == nil && err2 != nil { + _write_err271 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err271 == nil && err2 != nil { + _write_err271 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err271 == nil && err2 != nil { + _write_err271 = thrift.WrapTException(err2) + } + if _write_err271 != nil { + return false, thrift.WrapTException(_write_err271) + } + return true, err +} + +type tHBaseServiceProcessorDisableTable struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorDisableTable) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err273 error + args := THBaseServiceDisableTableArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "disableTable", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceDisableTableResult{} + if err2 := p.handler.DisableTable(ctx, args.TableName); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc274 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing disableTable: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "disableTable", thrift.EXCEPTION, seqId); err2 != nil { + _write_err273 = thrift.WrapTException(err2) + } + if err2 := _exc274.Write(ctx, oprot); _write_err273 == nil && err2 != nil { + _write_err273 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err273 == nil && err2 != nil { + _write_err273 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err273 == nil && err2 != nil { + _write_err273 = thrift.WrapTException(err2) + } + if _write_err273 != nil { + return false, thrift.WrapTException(_write_err273) + } + return true, err + } + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "disableTable", thrift.REPLY, seqId); err2 != nil { + _write_err273 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err273 == nil && err2 != nil { + _write_err273 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err273 == nil && err2 != nil { + _write_err273 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err273 == nil && err2 != nil { + _write_err273 = thrift.WrapTException(err2) + } + if _write_err273 != nil { + return false, thrift.WrapTException(_write_err273) + } + return true, err +} + +type tHBaseServiceProcessorIsTableEnabled struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorIsTableEnabled) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err275 error + args := THBaseServiceIsTableEnabledArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "isTableEnabled", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceIsTableEnabledResult{} + if retval, err2 := p.handler.IsTableEnabled(ctx, args.TableName); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc276 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing isTableEnabled: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "isTableEnabled", thrift.EXCEPTION, seqId); err2 != nil { + _write_err275 = thrift.WrapTException(err2) + } + if err2 := _exc276.Write(ctx, oprot); _write_err275 == nil && err2 != nil { + _write_err275 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err275 == nil && err2 != nil { + _write_err275 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err275 == nil && err2 != nil { + _write_err275 = thrift.WrapTException(err2) + } + if _write_err275 != nil { + return false, thrift.WrapTException(_write_err275) + } + return true, err + } + } else { + result.Success = &retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "isTableEnabled", thrift.REPLY, seqId); err2 != nil { + _write_err275 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err275 == nil && err2 != nil { + _write_err275 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err275 == nil && err2 != nil { + _write_err275 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err275 == nil && err2 != nil { + _write_err275 = thrift.WrapTException(err2) + } + if _write_err275 != nil { + return false, thrift.WrapTException(_write_err275) + } + return true, err +} + +type tHBaseServiceProcessorIsTableDisabled struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorIsTableDisabled) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err277 error + args := THBaseServiceIsTableDisabledArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "isTableDisabled", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceIsTableDisabledResult{} + if retval, err2 := p.handler.IsTableDisabled(ctx, args.TableName); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc278 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing isTableDisabled: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "isTableDisabled", thrift.EXCEPTION, seqId); err2 != nil { + _write_err277 = thrift.WrapTException(err2) + } + if err2 := _exc278.Write(ctx, oprot); _write_err277 == nil && err2 != nil { + _write_err277 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err277 == nil && err2 != nil { + _write_err277 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err277 == nil && err2 != nil { + _write_err277 = thrift.WrapTException(err2) + } + if _write_err277 != nil { + return false, thrift.WrapTException(_write_err277) + } + return true, err + } + } else { + result.Success = &retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "isTableDisabled", thrift.REPLY, seqId); err2 != nil { + _write_err277 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err277 == nil && err2 != nil { + _write_err277 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err277 == nil && err2 != nil { + _write_err277 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err277 == nil && err2 != nil { + _write_err277 = thrift.WrapTException(err2) + } + if _write_err277 != nil { + return false, thrift.WrapTException(_write_err277) + } + return true, err +} + +type tHBaseServiceProcessorIsTableAvailable struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorIsTableAvailable) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err279 error + args := THBaseServiceIsTableAvailableArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "isTableAvailable", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceIsTableAvailableResult{} + if retval, err2 := p.handler.IsTableAvailable(ctx, args.TableName); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc280 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing isTableAvailable: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "isTableAvailable", thrift.EXCEPTION, seqId); err2 != nil { + _write_err279 = thrift.WrapTException(err2) + } + if err2 := _exc280.Write(ctx, oprot); _write_err279 == nil && err2 != nil { + _write_err279 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err279 == nil && err2 != nil { + _write_err279 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err279 == nil && err2 != nil { + _write_err279 = thrift.WrapTException(err2) + } + if _write_err279 != nil { + return false, thrift.WrapTException(_write_err279) + } + return true, err + } + } else { + result.Success = &retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "isTableAvailable", thrift.REPLY, seqId); err2 != nil { + _write_err279 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err279 == nil && err2 != nil { + _write_err279 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err279 == nil && err2 != nil { + _write_err279 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err279 == nil && err2 != nil { + _write_err279 = thrift.WrapTException(err2) + } + if _write_err279 != nil { + return false, thrift.WrapTException(_write_err279) + } + return true, err +} + +type tHBaseServiceProcessorIsTableAvailableWithSplit struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorIsTableAvailableWithSplit) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err281 error + args := THBaseServiceIsTableAvailableWithSplitArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "isTableAvailableWithSplit", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceIsTableAvailableWithSplitResult{} + if retval, err2 := p.handler.IsTableAvailableWithSplit(ctx, args.TableName, args.SplitKeys); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc282 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing isTableAvailableWithSplit: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "isTableAvailableWithSplit", thrift.EXCEPTION, seqId); err2 != nil { + _write_err281 = thrift.WrapTException(err2) + } + if err2 := _exc282.Write(ctx, oprot); _write_err281 == nil && err2 != nil { + _write_err281 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err281 == nil && err2 != nil { + _write_err281 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err281 == nil && err2 != nil { + _write_err281 = thrift.WrapTException(err2) + } + if _write_err281 != nil { + return false, thrift.WrapTException(_write_err281) + } + return true, err + } + } else { + result.Success = &retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "isTableAvailableWithSplit", thrift.REPLY, seqId); err2 != nil { + _write_err281 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err281 == nil && err2 != nil { + _write_err281 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err281 == nil && err2 != nil { + _write_err281 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err281 == nil && err2 != nil { + _write_err281 = thrift.WrapTException(err2) + } + if _write_err281 != nil { + return false, thrift.WrapTException(_write_err281) + } + return true, err +} + +type tHBaseServiceProcessorAddColumnFamily struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorAddColumnFamily) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err283 error + args := THBaseServiceAddColumnFamilyArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "addColumnFamily", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceAddColumnFamilyResult{} + if err2 := p.handler.AddColumnFamily(ctx, args.TableName, args.Column); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc284 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing addColumnFamily: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "addColumnFamily", thrift.EXCEPTION, seqId); err2 != nil { + _write_err283 = thrift.WrapTException(err2) + } + if err2 := _exc284.Write(ctx, oprot); _write_err283 == nil && err2 != nil { + _write_err283 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err283 == nil && err2 != nil { + _write_err283 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err283 == nil && err2 != nil { + _write_err283 = thrift.WrapTException(err2) + } + if _write_err283 != nil { + return false, thrift.WrapTException(_write_err283) + } + return true, err + } + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "addColumnFamily", thrift.REPLY, seqId); err2 != nil { + _write_err283 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err283 == nil && err2 != nil { + _write_err283 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err283 == nil && err2 != nil { + _write_err283 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err283 == nil && err2 != nil { + _write_err283 = thrift.WrapTException(err2) + } + if _write_err283 != nil { + return false, thrift.WrapTException(_write_err283) + } + return true, err +} + +type tHBaseServiceProcessorDeleteColumnFamily struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorDeleteColumnFamily) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err285 error + args := THBaseServiceDeleteColumnFamilyArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "deleteColumnFamily", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceDeleteColumnFamilyResult{} + if err2 := p.handler.DeleteColumnFamily(ctx, args.TableName, args.Column); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc286 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteColumnFamily: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "deleteColumnFamily", thrift.EXCEPTION, seqId); err2 != nil { + _write_err285 = thrift.WrapTException(err2) + } + if err2 := _exc286.Write(ctx, oprot); _write_err285 == nil && err2 != nil { + _write_err285 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err285 == nil && err2 != nil { + _write_err285 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err285 == nil && err2 != nil { + _write_err285 = thrift.WrapTException(err2) + } + if _write_err285 != nil { + return false, thrift.WrapTException(_write_err285) + } + return true, err + } + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "deleteColumnFamily", thrift.REPLY, seqId); err2 != nil { + _write_err285 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err285 == nil && err2 != nil { + _write_err285 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err285 == nil && err2 != nil { + _write_err285 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err285 == nil && err2 != nil { + _write_err285 = thrift.WrapTException(err2) + } + if _write_err285 != nil { + return false, thrift.WrapTException(_write_err285) + } + return true, err +} + +type tHBaseServiceProcessorModifyColumnFamily struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorModifyColumnFamily) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err287 error + args := THBaseServiceModifyColumnFamilyArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "modifyColumnFamily", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceModifyColumnFamilyResult{} + if err2 := p.handler.ModifyColumnFamily(ctx, args.TableName, args.Column); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc288 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing modifyColumnFamily: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "modifyColumnFamily", thrift.EXCEPTION, seqId); err2 != nil { + _write_err287 = thrift.WrapTException(err2) + } + if err2 := _exc288.Write(ctx, oprot); _write_err287 == nil && err2 != nil { + _write_err287 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err287 == nil && err2 != nil { + _write_err287 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err287 == nil && err2 != nil { + _write_err287 = thrift.WrapTException(err2) + } + if _write_err287 != nil { + return false, thrift.WrapTException(_write_err287) + } + return true, err + } + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "modifyColumnFamily", thrift.REPLY, seqId); err2 != nil { + _write_err287 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err287 == nil && err2 != nil { + _write_err287 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err287 == nil && err2 != nil { + _write_err287 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err287 == nil && err2 != nil { + _write_err287 = thrift.WrapTException(err2) + } + if _write_err287 != nil { + return false, thrift.WrapTException(_write_err287) + } + return true, err +} + +type tHBaseServiceProcessorModifyTable struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorModifyTable) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err289 error + args := THBaseServiceModifyTableArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "modifyTable", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceModifyTableResult{} + if err2 := p.handler.ModifyTable(ctx, args.Desc); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc290 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing modifyTable: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "modifyTable", thrift.EXCEPTION, seqId); err2 != nil { + _write_err289 = thrift.WrapTException(err2) + } + if err2 := _exc290.Write(ctx, oprot); _write_err289 == nil && err2 != nil { + _write_err289 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err289 == nil && err2 != nil { + _write_err289 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err289 == nil && err2 != nil { + _write_err289 = thrift.WrapTException(err2) + } + if _write_err289 != nil { + return false, thrift.WrapTException(_write_err289) + } + return true, err + } + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "modifyTable", thrift.REPLY, seqId); err2 != nil { + _write_err289 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err289 == nil && err2 != nil { + _write_err289 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err289 == nil && err2 != nil { + _write_err289 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err289 == nil && err2 != nil { + _write_err289 = thrift.WrapTException(err2) + } + if _write_err289 != nil { + return false, thrift.WrapTException(_write_err289) + } + return true, err +} + +type tHBaseServiceProcessorCreateNamespace struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorCreateNamespace) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err291 error + args := THBaseServiceCreateNamespaceArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "createNamespace", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceCreateNamespaceResult{} + if err2 := p.handler.CreateNamespace(ctx, args.NamespaceDesc); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc292 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing createNamespace: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "createNamespace", thrift.EXCEPTION, seqId); err2 != nil { + _write_err291 = thrift.WrapTException(err2) + } + if err2 := _exc292.Write(ctx, oprot); _write_err291 == nil && err2 != nil { + _write_err291 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err291 == nil && err2 != nil { + _write_err291 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err291 == nil && err2 != nil { + _write_err291 = thrift.WrapTException(err2) + } + if _write_err291 != nil { + return false, thrift.WrapTException(_write_err291) + } + return true, err + } + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "createNamespace", thrift.REPLY, seqId); err2 != nil { + _write_err291 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err291 == nil && err2 != nil { + _write_err291 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err291 == nil && err2 != nil { + _write_err291 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err291 == nil && err2 != nil { + _write_err291 = thrift.WrapTException(err2) + } + if _write_err291 != nil { + return false, thrift.WrapTException(_write_err291) + } + return true, err +} + +type tHBaseServiceProcessorModifyNamespace struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorModifyNamespace) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err293 error + args := THBaseServiceModifyNamespaceArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "modifyNamespace", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceModifyNamespaceResult{} + if err2 := p.handler.ModifyNamespace(ctx, args.NamespaceDesc); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc294 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing modifyNamespace: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "modifyNamespace", thrift.EXCEPTION, seqId); err2 != nil { + _write_err293 = thrift.WrapTException(err2) + } + if err2 := _exc294.Write(ctx, oprot); _write_err293 == nil && err2 != nil { + _write_err293 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err293 == nil && err2 != nil { + _write_err293 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err293 == nil && err2 != nil { + _write_err293 = thrift.WrapTException(err2) + } + if _write_err293 != nil { + return false, thrift.WrapTException(_write_err293) + } + return true, err + } + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "modifyNamespace", thrift.REPLY, seqId); err2 != nil { + _write_err293 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err293 == nil && err2 != nil { + _write_err293 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err293 == nil && err2 != nil { + _write_err293 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err293 == nil && err2 != nil { + _write_err293 = thrift.WrapTException(err2) + } + if _write_err293 != nil { + return false, thrift.WrapTException(_write_err293) + } + return true, err +} + +type tHBaseServiceProcessorDeleteNamespace struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorDeleteNamespace) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err295 error + args := THBaseServiceDeleteNamespaceArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "deleteNamespace", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceDeleteNamespaceResult{} + if err2 := p.handler.DeleteNamespace(ctx, args.Name); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc296 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteNamespace: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "deleteNamespace", thrift.EXCEPTION, seqId); err2 != nil { + _write_err295 = thrift.WrapTException(err2) + } + if err2 := _exc296.Write(ctx, oprot); _write_err295 == nil && err2 != nil { + _write_err295 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err295 == nil && err2 != nil { + _write_err295 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err295 == nil && err2 != nil { + _write_err295 = thrift.WrapTException(err2) + } + if _write_err295 != nil { + return false, thrift.WrapTException(_write_err295) + } + return true, err + } + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "deleteNamespace", thrift.REPLY, seqId); err2 != nil { + _write_err295 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err295 == nil && err2 != nil { + _write_err295 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err295 == nil && err2 != nil { + _write_err295 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err295 == nil && err2 != nil { + _write_err295 = thrift.WrapTException(err2) + } + if _write_err295 != nil { + return false, thrift.WrapTException(_write_err295) + } + return true, err +} + +type tHBaseServiceProcessorGetNamespaceDescriptor struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorGetNamespaceDescriptor) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err297 error + args := THBaseServiceGetNamespaceDescriptorArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getNamespaceDescriptor", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceGetNamespaceDescriptorResult{} + if retval, err2 := p.handler.GetNamespaceDescriptor(ctx, args.Name); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc298 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getNamespaceDescriptor: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "getNamespaceDescriptor", thrift.EXCEPTION, seqId); err2 != nil { + _write_err297 = thrift.WrapTException(err2) + } + if err2 := _exc298.Write(ctx, oprot); _write_err297 == nil && err2 != nil { + _write_err297 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err297 == nil && err2 != nil { + _write_err297 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err297 == nil && err2 != nil { + _write_err297 = thrift.WrapTException(err2) + } + if _write_err297 != nil { + return false, thrift.WrapTException(_write_err297) + } + return true, err + } + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "getNamespaceDescriptor", thrift.REPLY, seqId); err2 != nil { + _write_err297 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err297 == nil && err2 != nil { + _write_err297 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err297 == nil && err2 != nil { + _write_err297 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err297 == nil && err2 != nil { + _write_err297 = thrift.WrapTException(err2) + } + if _write_err297 != nil { + return false, thrift.WrapTException(_write_err297) + } + return true, err +} + +type tHBaseServiceProcessorListNamespaceDescriptors struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorListNamespaceDescriptors) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err299 error + args := THBaseServiceListNamespaceDescriptorsArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "listNamespaceDescriptors", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceListNamespaceDescriptorsResult{} + if retval, err2 := p.handler.ListNamespaceDescriptors(ctx); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc300 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing listNamespaceDescriptors: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "listNamespaceDescriptors", thrift.EXCEPTION, seqId); err2 != nil { + _write_err299 = thrift.WrapTException(err2) + } + if err2 := _exc300.Write(ctx, oprot); _write_err299 == nil && err2 != nil { + _write_err299 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err299 == nil && err2 != nil { + _write_err299 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err299 == nil && err2 != nil { + _write_err299 = thrift.WrapTException(err2) + } + if _write_err299 != nil { + return false, thrift.WrapTException(_write_err299) + } + return true, err + } + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "listNamespaceDescriptors", thrift.REPLY, seqId); err2 != nil { + _write_err299 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err299 == nil && err2 != nil { + _write_err299 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err299 == nil && err2 != nil { + _write_err299 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err299 == nil && err2 != nil { + _write_err299 = thrift.WrapTException(err2) + } + if _write_err299 != nil { + return false, thrift.WrapTException(_write_err299) + } + return true, err +} + +type tHBaseServiceProcessorListNamespaces struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorListNamespaces) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err301 error + args := THBaseServiceListNamespacesArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "listNamespaces", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceListNamespacesResult{} + if retval, err2 := p.handler.ListNamespaces(ctx); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc302 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing listNamespaces: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "listNamespaces", thrift.EXCEPTION, seqId); err2 != nil { + _write_err301 = thrift.WrapTException(err2) + } + if err2 := _exc302.Write(ctx, oprot); _write_err301 == nil && err2 != nil { + _write_err301 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err301 == nil && err2 != nil { + _write_err301 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err301 == nil && err2 != nil { + _write_err301 = thrift.WrapTException(err2) + } + if _write_err301 != nil { + return false, thrift.WrapTException(_write_err301) + } + return true, err + } + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "listNamespaces", thrift.REPLY, seqId); err2 != nil { + _write_err301 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err301 == nil && err2 != nil { + _write_err301 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err301 == nil && err2 != nil { + _write_err301 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err301 == nil && err2 != nil { + _write_err301 = thrift.WrapTException(err2) + } + if _write_err301 != nil { + return false, thrift.WrapTException(_write_err301) + } + return true, err +} + +type tHBaseServiceProcessorGetThriftServerType struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorGetThriftServerType) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err303 error + args := THBaseServiceGetThriftServerTypeArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getThriftServerType", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceGetThriftServerTypeResult{} + if retval, err2 := p.handler.GetThriftServerType(ctx); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc304 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getThriftServerType: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "getThriftServerType", thrift.EXCEPTION, seqId); err2 != nil { + _write_err303 = thrift.WrapTException(err2) + } + if err2 := _exc304.Write(ctx, oprot); _write_err303 == nil && err2 != nil { + _write_err303 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err303 == nil && err2 != nil { + _write_err303 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err303 == nil && err2 != nil { + _write_err303 = thrift.WrapTException(err2) + } + if _write_err303 != nil { + return false, thrift.WrapTException(_write_err303) + } + return true, err + } else { + result.Success = &retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "getThriftServerType", thrift.REPLY, seqId); err2 != nil { + _write_err303 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err303 == nil && err2 != nil { + _write_err303 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err303 == nil && err2 != nil { + _write_err303 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err303 == nil && err2 != nil { + _write_err303 = thrift.WrapTException(err2) + } + if _write_err303 != nil { + return false, thrift.WrapTException(_write_err303) + } + return true, err +} + +type tHBaseServiceProcessorGetSlowLogResponses struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorGetSlowLogResponses) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err305 error + args := THBaseServiceGetSlowLogResponsesArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getSlowLogResponses", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceGetSlowLogResponsesResult{} + if retval, err2 := p.handler.GetSlowLogResponses(ctx, args.ServerNames, args.LogQueryFilter); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc306 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getSlowLogResponses: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "getSlowLogResponses", thrift.EXCEPTION, seqId); err2 != nil { + _write_err305 = thrift.WrapTException(err2) + } + if err2 := _exc306.Write(ctx, oprot); _write_err305 == nil && err2 != nil { + _write_err305 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err305 == nil && err2 != nil { + _write_err305 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err305 == nil && err2 != nil { + _write_err305 = thrift.WrapTException(err2) + } + if _write_err305 != nil { + return false, thrift.WrapTException(_write_err305) + } + return true, err + } + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "getSlowLogResponses", thrift.REPLY, seqId); err2 != nil { + _write_err305 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err305 == nil && err2 != nil { + _write_err305 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err305 == nil && err2 != nil { + _write_err305 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err305 == nil && err2 != nil { + _write_err305 = thrift.WrapTException(err2) + } + if _write_err305 != nil { + return false, thrift.WrapTException(_write_err305) + } + return true, err +} + +type tHBaseServiceProcessorClearSlowLogResponses struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorClearSlowLogResponses) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err307 error + args := THBaseServiceClearSlowLogResponsesArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "clearSlowLogResponses", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceClearSlowLogResponsesResult{} + if retval, err2 := p.handler.ClearSlowLogResponses(ctx, args.ServerNames); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + switch v := err2.(type) { + case *TIOError: + result.Io = v + default: + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc308 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing clearSlowLogResponses: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "clearSlowLogResponses", thrift.EXCEPTION, seqId); err2 != nil { + _write_err307 = thrift.WrapTException(err2) + } + if err2 := _exc308.Write(ctx, oprot); _write_err307 == nil && err2 != nil { + _write_err307 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err307 == nil && err2 != nil { + _write_err307 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err307 == nil && err2 != nil { + _write_err307 = thrift.WrapTException(err2) + } + if _write_err307 != nil { + return false, thrift.WrapTException(_write_err307) + } + return true, err + } + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "clearSlowLogResponses", thrift.REPLY, seqId); err2 != nil { + _write_err307 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err307 == nil && err2 != nil { + _write_err307 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err307 == nil && err2 != nil { + _write_err307 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err307 == nil && err2 != nil { + _write_err307 = thrift.WrapTException(err2) + } + if _write_err307 != nil { + return false, thrift.WrapTException(_write_err307) + } + return true, err +} + +type tHBaseServiceProcessorGetClusterId struct { + handler THBaseService +} + +func (p *tHBaseServiceProcessorGetClusterId) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err309 error + args := THBaseServiceGetClusterIdArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "getClusterId", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := THBaseServiceGetClusterIdResult{} + if retval, err2 := p.handler.GetClusterId(ctx); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc310 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getClusterId: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "getClusterId", thrift.EXCEPTION, seqId); err2 != nil { + _write_err309 = thrift.WrapTException(err2) + } + if err2 := _exc310.Write(ctx, oprot); _write_err309 == nil && err2 != nil { + _write_err309 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err309 == nil && err2 != nil { + _write_err309 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err309 == nil && err2 != nil { + _write_err309 = thrift.WrapTException(err2) + } + if _write_err309 != nil { + return false, thrift.WrapTException(_write_err309) + } + return true, err + } else { + result.Success = &retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "getClusterId", thrift.REPLY, seqId); err2 != nil { + _write_err309 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err309 == nil && err2 != nil { + _write_err309 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err309 == nil && err2 != nil { + _write_err309 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err309 == nil && err2 != nil { + _write_err309 = thrift.WrapTException(err2) + } + if _write_err309 != nil { + return false, thrift.WrapTException(_write_err309) + } + return true, err +} + + +// HELPER FUNCTIONS AND STRUCTURES + +// Attributes: +// - Table: the table to check on +// - Tget: the TGet to check for +type THBaseServiceExistsArgs struct { + Table []byte `thrift:"table,1,required" db:"table" json:"table"` + Tget *TGet `thrift:"tget,2,required" db:"tget" json:"tget"` +} + +func NewTHBaseServiceExistsArgs() *THBaseServiceExistsArgs { + return &THBaseServiceExistsArgs{} +} + + +func (p *THBaseServiceExistsArgs) GetTable() []byte { + return p.Table +} +var THBaseServiceExistsArgs_Tget_DEFAULT *TGet +func (p *THBaseServiceExistsArgs) GetTget() *TGet { + if !p.IsSetTget() { + return THBaseServiceExistsArgs_Tget_DEFAULT + } +return p.Tget +} +func (p *THBaseServiceExistsArgs) IsSetTget() bool { + return p.Tget != nil +} + +func (p *THBaseServiceExistsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTable bool = false; + var issetTget bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTable = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetTget = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTable{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")); + } + if !issetTget{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tget is not set")); + } + return nil +} + +func (p *THBaseServiceExistsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Table = v +} + return nil +} + +func (p *THBaseServiceExistsArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Tget = &TGet{} + if err := p.Tget.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tget), err) + } + return nil +} + +func (p *THBaseServiceExistsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "exists_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceExistsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Table); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) } + return err +} + +func (p *THBaseServiceExistsArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tget", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tget: ", p), err) } + if err := p.Tget.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tget), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tget: ", p), err) } + return err +} + +func (p *THBaseServiceExistsArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceExistsArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceExistsResult struct { + Success *bool `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceExistsResult() *THBaseServiceExistsResult { + return &THBaseServiceExistsResult{} +} + +var THBaseServiceExistsResult_Success_DEFAULT bool +func (p *THBaseServiceExistsResult) GetSuccess() bool { + if !p.IsSetSuccess() { + return THBaseServiceExistsResult_Success_DEFAULT + } +return *p.Success +} +var THBaseServiceExistsResult_Io_DEFAULT *TIOError +func (p *THBaseServiceExistsResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceExistsResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceExistsResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceExistsResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceExistsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceExistsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + p.Success = &v +} + return nil +} + +func (p *THBaseServiceExistsResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceExistsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "exists_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceExistsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.BOOL, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.Success)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceExistsResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceExistsResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceExistsResult(%+v)", *p) +} + +// Attributes: +// - Table: the table to check on +// - Tgets: a list of TGets to check for +type THBaseServiceExistsAllArgs struct { + Table []byte `thrift:"table,1,required" db:"table" json:"table"` + Tgets []*TGet `thrift:"tgets,2,required" db:"tgets" json:"tgets"` +} + +func NewTHBaseServiceExistsAllArgs() *THBaseServiceExistsAllArgs { + return &THBaseServiceExistsAllArgs{} +} + + +func (p *THBaseServiceExistsAllArgs) GetTable() []byte { + return p.Table +} + +func (p *THBaseServiceExistsAllArgs) GetTgets() []*TGet { + return p.Tgets +} +func (p *THBaseServiceExistsAllArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTable bool = false; + var issetTgets bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTable = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.LIST { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetTgets = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTable{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")); + } + if !issetTgets{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tgets is not set")); + } + return nil +} + +func (p *THBaseServiceExistsAllArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Table = v +} + return nil +} + +func (p *THBaseServiceExistsAllArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TGet, 0, size) + p.Tgets = tSlice + for i := 0; i < size; i ++ { + _elem311 := &TGet{} + if err := _elem311.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem311), err) + } + p.Tgets = append(p.Tgets, _elem311) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *THBaseServiceExistsAllArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "existsAll_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceExistsAllArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Table); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) } + return err +} + +func (p *THBaseServiceExistsAllArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tgets", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tgets: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Tgets)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Tgets { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tgets: ", p), err) } + return err +} + +func (p *THBaseServiceExistsAllArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceExistsAllArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceExistsAllResult struct { + Success []bool `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceExistsAllResult() *THBaseServiceExistsAllResult { + return &THBaseServiceExistsAllResult{} +} + +var THBaseServiceExistsAllResult_Success_DEFAULT []bool + +func (p *THBaseServiceExistsAllResult) GetSuccess() []bool { + return p.Success +} +var THBaseServiceExistsAllResult_Io_DEFAULT *TIOError +func (p *THBaseServiceExistsAllResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceExistsAllResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceExistsAllResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceExistsAllResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceExistsAllResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.LIST { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceExistsAllResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]bool, 0, size) + p.Success = tSlice + for i := 0; i < size; i ++ { +var _elem312 bool + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem312 = v +} + p.Success = append(p.Success, _elem312) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *THBaseServiceExistsAllResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceExistsAllResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "existsAll_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceExistsAllResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.LIST, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.BOOL, len(p.Success)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Success { + if err := oprot.WriteBool(ctx, bool(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceExistsAllResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceExistsAllResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceExistsAllResult(%+v)", *p) +} + +// Attributes: +// - Table: the table to get from +// - Tget: the TGet to fetch +type THBaseServiceGetArgs struct { + Table []byte `thrift:"table,1,required" db:"table" json:"table"` + Tget *TGet `thrift:"tget,2,required" db:"tget" json:"tget"` +} + +func NewTHBaseServiceGetArgs() *THBaseServiceGetArgs { + return &THBaseServiceGetArgs{} +} + + +func (p *THBaseServiceGetArgs) GetTable() []byte { + return p.Table +} +var THBaseServiceGetArgs_Tget_DEFAULT *TGet +func (p *THBaseServiceGetArgs) GetTget() *TGet { + if !p.IsSetTget() { + return THBaseServiceGetArgs_Tget_DEFAULT + } +return p.Tget +} +func (p *THBaseServiceGetArgs) IsSetTget() bool { + return p.Tget != nil +} + +func (p *THBaseServiceGetArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTable bool = false; + var issetTget bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTable = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetTget = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTable{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")); + } + if !issetTget{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tget is not set")); + } + return nil +} + +func (p *THBaseServiceGetArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Table = v +} + return nil +} + +func (p *THBaseServiceGetArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Tget = &TGet{} + if err := p.Tget.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tget), err) + } + return nil +} + +func (p *THBaseServiceGetArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "get_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Table); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) } + return err +} + +func (p *THBaseServiceGetArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tget", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tget: ", p), err) } + if err := p.Tget.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tget), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tget: ", p), err) } + return err +} + +func (p *THBaseServiceGetArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceGetResult struct { + Success *TResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceGetResult() *THBaseServiceGetResult { + return &THBaseServiceGetResult{} +} + +var THBaseServiceGetResult_Success_DEFAULT *TResult_ +func (p *THBaseServiceGetResult) GetSuccess() *TResult_ { + if !p.IsSetSuccess() { + return THBaseServiceGetResult_Success_DEFAULT + } +return p.Success +} +var THBaseServiceGetResult_Io_DEFAULT *TIOError +func (p *THBaseServiceGetResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceGetResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceGetResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceGetResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceGetResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceGetResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TResult_{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } + return nil +} + +func (p *THBaseServiceGetResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceGetResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "get_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetResult(%+v)", *p) +} + +// Attributes: +// - Table: the table to get from +// - Tgets: a list of TGets to fetch, the Result list +// will have the Results at corresponding positions +// or null if there was an error +type THBaseServiceGetMultipleArgs struct { + Table []byte `thrift:"table,1,required" db:"table" json:"table"` + Tgets []*TGet `thrift:"tgets,2,required" db:"tgets" json:"tgets"` +} + +func NewTHBaseServiceGetMultipleArgs() *THBaseServiceGetMultipleArgs { + return &THBaseServiceGetMultipleArgs{} +} + + +func (p *THBaseServiceGetMultipleArgs) GetTable() []byte { + return p.Table +} + +func (p *THBaseServiceGetMultipleArgs) GetTgets() []*TGet { + return p.Tgets +} +func (p *THBaseServiceGetMultipleArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTable bool = false; + var issetTgets bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTable = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.LIST { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetTgets = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTable{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")); + } + if !issetTgets{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tgets is not set")); + } + return nil +} + +func (p *THBaseServiceGetMultipleArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Table = v +} + return nil +} + +func (p *THBaseServiceGetMultipleArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TGet, 0, size) + p.Tgets = tSlice + for i := 0; i < size; i ++ { + _elem313 := &TGet{} + if err := _elem313.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem313), err) + } + p.Tgets = append(p.Tgets, _elem313) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *THBaseServiceGetMultipleArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getMultiple_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetMultipleArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Table); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) } + return err +} + +func (p *THBaseServiceGetMultipleArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tgets", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tgets: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Tgets)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Tgets { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tgets: ", p), err) } + return err +} + +func (p *THBaseServiceGetMultipleArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetMultipleArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceGetMultipleResult struct { + Success []*TResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceGetMultipleResult() *THBaseServiceGetMultipleResult { + return &THBaseServiceGetMultipleResult{} +} + +var THBaseServiceGetMultipleResult_Success_DEFAULT []*TResult_ + +func (p *THBaseServiceGetMultipleResult) GetSuccess() []*TResult_ { + return p.Success +} +var THBaseServiceGetMultipleResult_Io_DEFAULT *TIOError +func (p *THBaseServiceGetMultipleResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceGetMultipleResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceGetMultipleResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceGetMultipleResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceGetMultipleResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.LIST { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceGetMultipleResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TResult_, 0, size) + p.Success = tSlice + for i := 0; i < size; i ++ { + _elem314 := &TResult_{} + if err := _elem314.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem314), err) + } + p.Success = append(p.Success, _elem314) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *THBaseServiceGetMultipleResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceGetMultipleResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getMultiple_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetMultipleResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.LIST, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Success)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Success { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetMultipleResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetMultipleResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetMultipleResult(%+v)", *p) +} + +// Attributes: +// - Table: the table to put data in +// - Tput: the TPut to put +type THBaseServicePutArgs struct { + Table []byte `thrift:"table,1,required" db:"table" json:"table"` + Tput *TPut `thrift:"tput,2,required" db:"tput" json:"tput"` +} + +func NewTHBaseServicePutArgs() *THBaseServicePutArgs { + return &THBaseServicePutArgs{} +} + + +func (p *THBaseServicePutArgs) GetTable() []byte { + return p.Table +} +var THBaseServicePutArgs_Tput_DEFAULT *TPut +func (p *THBaseServicePutArgs) GetTput() *TPut { + if !p.IsSetTput() { + return THBaseServicePutArgs_Tput_DEFAULT + } +return p.Tput +} +func (p *THBaseServicePutArgs) IsSetTput() bool { + return p.Tput != nil +} + +func (p *THBaseServicePutArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTable bool = false; + var issetTput bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTable = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetTput = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTable{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")); + } + if !issetTput{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tput is not set")); + } + return nil +} + +func (p *THBaseServicePutArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Table = v +} + return nil +} + +func (p *THBaseServicePutArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Tput = &TPut{} + if err := p.Tput.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tput), err) + } + return nil +} + +func (p *THBaseServicePutArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "put_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServicePutArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Table); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) } + return err +} + +func (p *THBaseServicePutArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tput", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tput: ", p), err) } + if err := p.Tput.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tput), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tput: ", p), err) } + return err +} + +func (p *THBaseServicePutArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServicePutArgs(%+v)", *p) +} + +// Attributes: +// - Io +type THBaseServicePutResult struct { + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServicePutResult() *THBaseServicePutResult { + return &THBaseServicePutResult{} +} + +var THBaseServicePutResult_Io_DEFAULT *TIOError +func (p *THBaseServicePutResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServicePutResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServicePutResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServicePutResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServicePutResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServicePutResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "put_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServicePutResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServicePutResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServicePutResult(%+v)", *p) +} + +// Attributes: +// - Table: to check in and put to +// - Row: row to check +// - Family: column family to check +// - Qualifier: column qualifier to check +// - Value: the expected value, if not provided the +// check is for the non-existence of the +// column in question +// - Tput: the TPut to put if the check succeeds +type THBaseServiceCheckAndPutArgs struct { + Table []byte `thrift:"table,1,required" db:"table" json:"table"` + Row []byte `thrift:"row,2,required" db:"row" json:"row"` + Family []byte `thrift:"family,3,required" db:"family" json:"family"` + Qualifier []byte `thrift:"qualifier,4,required" db:"qualifier" json:"qualifier"` + Value []byte `thrift:"value,5" db:"value" json:"value"` + Tput *TPut `thrift:"tput,6,required" db:"tput" json:"tput"` +} + +func NewTHBaseServiceCheckAndPutArgs() *THBaseServiceCheckAndPutArgs { + return &THBaseServiceCheckAndPutArgs{} +} + + +func (p *THBaseServiceCheckAndPutArgs) GetTable() []byte { + return p.Table +} + +func (p *THBaseServiceCheckAndPutArgs) GetRow() []byte { + return p.Row +} + +func (p *THBaseServiceCheckAndPutArgs) GetFamily() []byte { + return p.Family +} + +func (p *THBaseServiceCheckAndPutArgs) GetQualifier() []byte { + return p.Qualifier +} + +func (p *THBaseServiceCheckAndPutArgs) GetValue() []byte { + return p.Value +} +var THBaseServiceCheckAndPutArgs_Tput_DEFAULT *TPut +func (p *THBaseServiceCheckAndPutArgs) GetTput() *TPut { + if !p.IsSetTput() { + return THBaseServiceCheckAndPutArgs_Tput_DEFAULT + } +return p.Tput +} +func (p *THBaseServiceCheckAndPutArgs) IsSetTput() bool { + return p.Tput != nil +} + +func (p *THBaseServiceCheckAndPutArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTable bool = false; + var issetRow bool = false; + var issetFamily bool = false; + var issetQualifier bool = false; + var issetTput bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTable = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetRow = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + issetFamily = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.STRING { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + issetQualifier = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.STRING { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + issetTput = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTable{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")); + } + if !issetRow{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Row is not set")); + } + if !issetFamily{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Family is not set")); + } + if !issetQualifier{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Qualifier is not set")); + } + if !issetTput{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tput is not set")); + } + return nil +} + +func (p *THBaseServiceCheckAndPutArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Table = v +} + return nil +} + +func (p *THBaseServiceCheckAndPutArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Row = v +} + return nil +} + +func (p *THBaseServiceCheckAndPutArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Family = v +} + return nil +} + +func (p *THBaseServiceCheckAndPutArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.Qualifier = v +} + return nil +} + +func (p *THBaseServiceCheckAndPutArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) +} else { + p.Value = v +} + return nil +} + +func (p *THBaseServiceCheckAndPutArgs) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + p.Tput = &TPut{} + if err := p.Tput.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tput), err) + } + return nil +} + +func (p *THBaseServiceCheckAndPutArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "checkAndPut_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceCheckAndPutArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Table); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) } + return err +} + +func (p *THBaseServiceCheckAndPutArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "row", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:row: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Row); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.row (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:row: ", p), err) } + return err +} + +func (p *THBaseServiceCheckAndPutArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "family", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:family: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Family); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.family (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:family: ", p), err) } + return err +} + +func (p *THBaseServiceCheckAndPutArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "qualifier", thrift.STRING, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:qualifier: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Qualifier); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.qualifier (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:qualifier: ", p), err) } + return err +} + +func (p *THBaseServiceCheckAndPutArgs) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "value", thrift.STRING, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:value: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Value); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.value (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:value: ", p), err) } + return err +} + +func (p *THBaseServiceCheckAndPutArgs) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tput", thrift.STRUCT, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:tput: ", p), err) } + if err := p.Tput.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tput), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:tput: ", p), err) } + return err +} + +func (p *THBaseServiceCheckAndPutArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceCheckAndPutArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceCheckAndPutResult struct { + Success *bool `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceCheckAndPutResult() *THBaseServiceCheckAndPutResult { + return &THBaseServiceCheckAndPutResult{} +} + +var THBaseServiceCheckAndPutResult_Success_DEFAULT bool +func (p *THBaseServiceCheckAndPutResult) GetSuccess() bool { + if !p.IsSetSuccess() { + return THBaseServiceCheckAndPutResult_Success_DEFAULT + } +return *p.Success +} +var THBaseServiceCheckAndPutResult_Io_DEFAULT *TIOError +func (p *THBaseServiceCheckAndPutResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceCheckAndPutResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceCheckAndPutResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceCheckAndPutResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceCheckAndPutResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceCheckAndPutResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + p.Success = &v +} + return nil +} + +func (p *THBaseServiceCheckAndPutResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceCheckAndPutResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "checkAndPut_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceCheckAndPutResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.BOOL, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.Success)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceCheckAndPutResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceCheckAndPutResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceCheckAndPutResult(%+v)", *p) +} + +// Attributes: +// - Table: the table to put data in +// - Tputs: a list of TPuts to commit +type THBaseServicePutMultipleArgs struct { + Table []byte `thrift:"table,1,required" db:"table" json:"table"` + Tputs []*TPut `thrift:"tputs,2,required" db:"tputs" json:"tputs"` +} + +func NewTHBaseServicePutMultipleArgs() *THBaseServicePutMultipleArgs { + return &THBaseServicePutMultipleArgs{} +} + + +func (p *THBaseServicePutMultipleArgs) GetTable() []byte { + return p.Table +} + +func (p *THBaseServicePutMultipleArgs) GetTputs() []*TPut { + return p.Tputs +} +func (p *THBaseServicePutMultipleArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTable bool = false; + var issetTputs bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTable = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.LIST { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetTputs = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTable{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")); + } + if !issetTputs{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tputs is not set")); + } + return nil +} + +func (p *THBaseServicePutMultipleArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Table = v +} + return nil +} + +func (p *THBaseServicePutMultipleArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TPut, 0, size) + p.Tputs = tSlice + for i := 0; i < size; i ++ { + _elem315 := &TPut{} + if err := _elem315.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem315), err) + } + p.Tputs = append(p.Tputs, _elem315) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *THBaseServicePutMultipleArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "putMultiple_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServicePutMultipleArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Table); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) } + return err +} + +func (p *THBaseServicePutMultipleArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tputs", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tputs: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Tputs)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Tputs { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tputs: ", p), err) } + return err +} + +func (p *THBaseServicePutMultipleArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServicePutMultipleArgs(%+v)", *p) +} + +// Attributes: +// - Io +type THBaseServicePutMultipleResult struct { + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServicePutMultipleResult() *THBaseServicePutMultipleResult { + return &THBaseServicePutMultipleResult{} +} + +var THBaseServicePutMultipleResult_Io_DEFAULT *TIOError +func (p *THBaseServicePutMultipleResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServicePutMultipleResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServicePutMultipleResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServicePutMultipleResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServicePutMultipleResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServicePutMultipleResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "putMultiple_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServicePutMultipleResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServicePutMultipleResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServicePutMultipleResult(%+v)", *p) +} + +// Attributes: +// - Table: the table to delete from +// - Tdelete: the TDelete to delete +type THBaseServiceDeleteSingleArgs struct { + Table []byte `thrift:"table,1,required" db:"table" json:"table"` + Tdelete *TDelete `thrift:"tdelete,2,required" db:"tdelete" json:"tdelete"` +} + +func NewTHBaseServiceDeleteSingleArgs() *THBaseServiceDeleteSingleArgs { + return &THBaseServiceDeleteSingleArgs{} +} + + +func (p *THBaseServiceDeleteSingleArgs) GetTable() []byte { + return p.Table +} +var THBaseServiceDeleteSingleArgs_Tdelete_DEFAULT *TDelete +func (p *THBaseServiceDeleteSingleArgs) GetTdelete() *TDelete { + if !p.IsSetTdelete() { + return THBaseServiceDeleteSingleArgs_Tdelete_DEFAULT + } +return p.Tdelete +} +func (p *THBaseServiceDeleteSingleArgs) IsSetTdelete() bool { + return p.Tdelete != nil +} + +func (p *THBaseServiceDeleteSingleArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTable bool = false; + var issetTdelete bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTable = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetTdelete = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTable{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")); + } + if !issetTdelete{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tdelete is not set")); + } + return nil +} + +func (p *THBaseServiceDeleteSingleArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Table = v +} + return nil +} + +func (p *THBaseServiceDeleteSingleArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Tdelete = &TDelete{ + DeleteType: 1, +} + if err := p.Tdelete.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tdelete), err) + } + return nil +} + +func (p *THBaseServiceDeleteSingleArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "deleteSingle_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceDeleteSingleArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Table); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) } + return err +} + +func (p *THBaseServiceDeleteSingleArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tdelete", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tdelete: ", p), err) } + if err := p.Tdelete.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tdelete), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tdelete: ", p), err) } + return err +} + +func (p *THBaseServiceDeleteSingleArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceDeleteSingleArgs(%+v)", *p) +} + +// Attributes: +// - Io +type THBaseServiceDeleteSingleResult struct { + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceDeleteSingleResult() *THBaseServiceDeleteSingleResult { + return &THBaseServiceDeleteSingleResult{} +} + +var THBaseServiceDeleteSingleResult_Io_DEFAULT *TIOError +func (p *THBaseServiceDeleteSingleResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceDeleteSingleResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceDeleteSingleResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceDeleteSingleResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceDeleteSingleResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceDeleteSingleResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "deleteSingle_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceDeleteSingleResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceDeleteSingleResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceDeleteSingleResult(%+v)", *p) +} + +// Attributes: +// - Table: the table to delete from +// - Tdeletes: list of TDeletes to delete +type THBaseServiceDeleteMultipleArgs struct { + Table []byte `thrift:"table,1,required" db:"table" json:"table"` + Tdeletes []*TDelete `thrift:"tdeletes,2,required" db:"tdeletes" json:"tdeletes"` +} + +func NewTHBaseServiceDeleteMultipleArgs() *THBaseServiceDeleteMultipleArgs { + return &THBaseServiceDeleteMultipleArgs{} +} + + +func (p *THBaseServiceDeleteMultipleArgs) GetTable() []byte { + return p.Table +} + +func (p *THBaseServiceDeleteMultipleArgs) GetTdeletes() []*TDelete { + return p.Tdeletes +} +func (p *THBaseServiceDeleteMultipleArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTable bool = false; + var issetTdeletes bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTable = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.LIST { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetTdeletes = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTable{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")); + } + if !issetTdeletes{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tdeletes is not set")); + } + return nil +} + +func (p *THBaseServiceDeleteMultipleArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Table = v +} + return nil +} + +func (p *THBaseServiceDeleteMultipleArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TDelete, 0, size) + p.Tdeletes = tSlice + for i := 0; i < size; i ++ { + _elem316 := &TDelete{ + DeleteType: 1, +} + if err := _elem316.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem316), err) + } + p.Tdeletes = append(p.Tdeletes, _elem316) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *THBaseServiceDeleteMultipleArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "deleteMultiple_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceDeleteMultipleArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Table); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) } + return err +} + +func (p *THBaseServiceDeleteMultipleArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tdeletes", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tdeletes: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Tdeletes)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Tdeletes { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tdeletes: ", p), err) } + return err +} + +func (p *THBaseServiceDeleteMultipleArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceDeleteMultipleArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceDeleteMultipleResult struct { + Success []*TDelete `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceDeleteMultipleResult() *THBaseServiceDeleteMultipleResult { + return &THBaseServiceDeleteMultipleResult{} +} + +var THBaseServiceDeleteMultipleResult_Success_DEFAULT []*TDelete + +func (p *THBaseServiceDeleteMultipleResult) GetSuccess() []*TDelete { + return p.Success +} +var THBaseServiceDeleteMultipleResult_Io_DEFAULT *TIOError +func (p *THBaseServiceDeleteMultipleResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceDeleteMultipleResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceDeleteMultipleResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceDeleteMultipleResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceDeleteMultipleResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.LIST { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceDeleteMultipleResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TDelete, 0, size) + p.Success = tSlice + for i := 0; i < size; i ++ { + _elem317 := &TDelete{ + DeleteType: 1, +} + if err := _elem317.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem317), err) + } + p.Success = append(p.Success, _elem317) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *THBaseServiceDeleteMultipleResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceDeleteMultipleResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "deleteMultiple_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceDeleteMultipleResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.LIST, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Success)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Success { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceDeleteMultipleResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceDeleteMultipleResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceDeleteMultipleResult(%+v)", *p) +} + +// Attributes: +// - Table: to check in and delete from +// - Row: row to check +// - Family: column family to check +// - Qualifier: column qualifier to check +// - Value: the expected value, if not provided the +// check is for the non-existence of the +// column in question +// - Tdelete: the TDelete to execute if the check succeeds +type THBaseServiceCheckAndDeleteArgs struct { + Table []byte `thrift:"table,1,required" db:"table" json:"table"` + Row []byte `thrift:"row,2,required" db:"row" json:"row"` + Family []byte `thrift:"family,3,required" db:"family" json:"family"` + Qualifier []byte `thrift:"qualifier,4,required" db:"qualifier" json:"qualifier"` + Value []byte `thrift:"value,5" db:"value" json:"value"` + Tdelete *TDelete `thrift:"tdelete,6,required" db:"tdelete" json:"tdelete"` +} + +func NewTHBaseServiceCheckAndDeleteArgs() *THBaseServiceCheckAndDeleteArgs { + return &THBaseServiceCheckAndDeleteArgs{} +} + + +func (p *THBaseServiceCheckAndDeleteArgs) GetTable() []byte { + return p.Table +} + +func (p *THBaseServiceCheckAndDeleteArgs) GetRow() []byte { + return p.Row +} + +func (p *THBaseServiceCheckAndDeleteArgs) GetFamily() []byte { + return p.Family +} + +func (p *THBaseServiceCheckAndDeleteArgs) GetQualifier() []byte { + return p.Qualifier +} + +func (p *THBaseServiceCheckAndDeleteArgs) GetValue() []byte { + return p.Value +} +var THBaseServiceCheckAndDeleteArgs_Tdelete_DEFAULT *TDelete +func (p *THBaseServiceCheckAndDeleteArgs) GetTdelete() *TDelete { + if !p.IsSetTdelete() { + return THBaseServiceCheckAndDeleteArgs_Tdelete_DEFAULT + } +return p.Tdelete +} +func (p *THBaseServiceCheckAndDeleteArgs) IsSetTdelete() bool { + return p.Tdelete != nil +} + +func (p *THBaseServiceCheckAndDeleteArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTable bool = false; + var issetRow bool = false; + var issetFamily bool = false; + var issetQualifier bool = false; + var issetTdelete bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTable = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetRow = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + issetFamily = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.STRING { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + issetQualifier = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.STRING { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + issetTdelete = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTable{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")); + } + if !issetRow{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Row is not set")); + } + if !issetFamily{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Family is not set")); + } + if !issetQualifier{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Qualifier is not set")); + } + if !issetTdelete{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tdelete is not set")); + } + return nil +} + +func (p *THBaseServiceCheckAndDeleteArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Table = v +} + return nil +} + +func (p *THBaseServiceCheckAndDeleteArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Row = v +} + return nil +} + +func (p *THBaseServiceCheckAndDeleteArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Family = v +} + return nil +} + +func (p *THBaseServiceCheckAndDeleteArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.Qualifier = v +} + return nil +} + +func (p *THBaseServiceCheckAndDeleteArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) +} else { + p.Value = v +} + return nil +} + +func (p *THBaseServiceCheckAndDeleteArgs) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + p.Tdelete = &TDelete{ + DeleteType: 1, +} + if err := p.Tdelete.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tdelete), err) + } + return nil +} + +func (p *THBaseServiceCheckAndDeleteArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "checkAndDelete_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceCheckAndDeleteArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Table); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) } + return err +} + +func (p *THBaseServiceCheckAndDeleteArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "row", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:row: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Row); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.row (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:row: ", p), err) } + return err +} + +func (p *THBaseServiceCheckAndDeleteArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "family", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:family: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Family); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.family (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:family: ", p), err) } + return err +} + +func (p *THBaseServiceCheckAndDeleteArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "qualifier", thrift.STRING, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:qualifier: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Qualifier); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.qualifier (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:qualifier: ", p), err) } + return err +} + +func (p *THBaseServiceCheckAndDeleteArgs) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "value", thrift.STRING, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:value: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Value); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.value (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:value: ", p), err) } + return err +} + +func (p *THBaseServiceCheckAndDeleteArgs) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tdelete", thrift.STRUCT, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:tdelete: ", p), err) } + if err := p.Tdelete.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tdelete), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:tdelete: ", p), err) } + return err +} + +func (p *THBaseServiceCheckAndDeleteArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceCheckAndDeleteArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceCheckAndDeleteResult struct { + Success *bool `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceCheckAndDeleteResult() *THBaseServiceCheckAndDeleteResult { + return &THBaseServiceCheckAndDeleteResult{} +} + +var THBaseServiceCheckAndDeleteResult_Success_DEFAULT bool +func (p *THBaseServiceCheckAndDeleteResult) GetSuccess() bool { + if !p.IsSetSuccess() { + return THBaseServiceCheckAndDeleteResult_Success_DEFAULT + } +return *p.Success +} +var THBaseServiceCheckAndDeleteResult_Io_DEFAULT *TIOError +func (p *THBaseServiceCheckAndDeleteResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceCheckAndDeleteResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceCheckAndDeleteResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceCheckAndDeleteResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceCheckAndDeleteResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceCheckAndDeleteResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + p.Success = &v +} + return nil +} + +func (p *THBaseServiceCheckAndDeleteResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceCheckAndDeleteResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "checkAndDelete_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceCheckAndDeleteResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.BOOL, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.Success)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceCheckAndDeleteResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceCheckAndDeleteResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceCheckAndDeleteResult(%+v)", *p) +} + +// Attributes: +// - Table: the table to increment the value on +// - Tincrement: the TIncrement to increment +type THBaseServiceIncrementArgs struct { + Table []byte `thrift:"table,1,required" db:"table" json:"table"` + Tincrement *TIncrement `thrift:"tincrement,2,required" db:"tincrement" json:"tincrement"` +} + +func NewTHBaseServiceIncrementArgs() *THBaseServiceIncrementArgs { + return &THBaseServiceIncrementArgs{} +} + + +func (p *THBaseServiceIncrementArgs) GetTable() []byte { + return p.Table +} +var THBaseServiceIncrementArgs_Tincrement_DEFAULT *TIncrement +func (p *THBaseServiceIncrementArgs) GetTincrement() *TIncrement { + if !p.IsSetTincrement() { + return THBaseServiceIncrementArgs_Tincrement_DEFAULT + } +return p.Tincrement +} +func (p *THBaseServiceIncrementArgs) IsSetTincrement() bool { + return p.Tincrement != nil +} + +func (p *THBaseServiceIncrementArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTable bool = false; + var issetTincrement bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTable = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetTincrement = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTable{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")); + } + if !issetTincrement{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tincrement is not set")); + } + return nil +} + +func (p *THBaseServiceIncrementArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Table = v +} + return nil +} + +func (p *THBaseServiceIncrementArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Tincrement = &TIncrement{} + if err := p.Tincrement.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tincrement), err) + } + return nil +} + +func (p *THBaseServiceIncrementArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "increment_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceIncrementArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Table); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) } + return err +} + +func (p *THBaseServiceIncrementArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tincrement", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tincrement: ", p), err) } + if err := p.Tincrement.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tincrement), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tincrement: ", p), err) } + return err +} + +func (p *THBaseServiceIncrementArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceIncrementArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceIncrementResult struct { + Success *TResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceIncrementResult() *THBaseServiceIncrementResult { + return &THBaseServiceIncrementResult{} +} + +var THBaseServiceIncrementResult_Success_DEFAULT *TResult_ +func (p *THBaseServiceIncrementResult) GetSuccess() *TResult_ { + if !p.IsSetSuccess() { + return THBaseServiceIncrementResult_Success_DEFAULT + } +return p.Success +} +var THBaseServiceIncrementResult_Io_DEFAULT *TIOError +func (p *THBaseServiceIncrementResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceIncrementResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceIncrementResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceIncrementResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceIncrementResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceIncrementResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TResult_{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } + return nil +} + +func (p *THBaseServiceIncrementResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceIncrementResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "increment_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceIncrementResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceIncrementResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceIncrementResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceIncrementResult(%+v)", *p) +} + +// Attributes: +// - Table: the table to append the value on +// - Tappend: the TAppend to append +type THBaseServiceAppendArgs struct { + Table []byte `thrift:"table,1,required" db:"table" json:"table"` + Tappend *TAppend `thrift:"tappend,2,required" db:"tappend" json:"tappend"` +} + +func NewTHBaseServiceAppendArgs() *THBaseServiceAppendArgs { + return &THBaseServiceAppendArgs{} +} + + +func (p *THBaseServiceAppendArgs) GetTable() []byte { + return p.Table +} +var THBaseServiceAppendArgs_Tappend_DEFAULT *TAppend +func (p *THBaseServiceAppendArgs) GetTappend() *TAppend { + if !p.IsSetTappend() { + return THBaseServiceAppendArgs_Tappend_DEFAULT + } +return p.Tappend +} +func (p *THBaseServiceAppendArgs) IsSetTappend() bool { + return p.Tappend != nil +} + +func (p *THBaseServiceAppendArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTable bool = false; + var issetTappend bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTable = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetTappend = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTable{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")); + } + if !issetTappend{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tappend is not set")); + } + return nil +} + +func (p *THBaseServiceAppendArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Table = v +} + return nil +} + +func (p *THBaseServiceAppendArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Tappend = &TAppend{} + if err := p.Tappend.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tappend), err) + } + return nil +} + +func (p *THBaseServiceAppendArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "append_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceAppendArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Table); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) } + return err +} + +func (p *THBaseServiceAppendArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tappend", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tappend: ", p), err) } + if err := p.Tappend.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tappend), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tappend: ", p), err) } + return err +} + +func (p *THBaseServiceAppendArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceAppendArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceAppendResult struct { + Success *TResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceAppendResult() *THBaseServiceAppendResult { + return &THBaseServiceAppendResult{} +} + +var THBaseServiceAppendResult_Success_DEFAULT *TResult_ +func (p *THBaseServiceAppendResult) GetSuccess() *TResult_ { + if !p.IsSetSuccess() { + return THBaseServiceAppendResult_Success_DEFAULT + } +return p.Success +} +var THBaseServiceAppendResult_Io_DEFAULT *TIOError +func (p *THBaseServiceAppendResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceAppendResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceAppendResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceAppendResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceAppendResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceAppendResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TResult_{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } + return nil +} + +func (p *THBaseServiceAppendResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceAppendResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "append_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceAppendResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceAppendResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceAppendResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceAppendResult(%+v)", *p) +} + +// Attributes: +// - Table: the table to get the Scanner for +// - Tscan: the scan object to get a Scanner for +type THBaseServiceOpenScannerArgs struct { + Table []byte `thrift:"table,1,required" db:"table" json:"table"` + Tscan *TScan `thrift:"tscan,2,required" db:"tscan" json:"tscan"` +} + +func NewTHBaseServiceOpenScannerArgs() *THBaseServiceOpenScannerArgs { + return &THBaseServiceOpenScannerArgs{} +} + + +func (p *THBaseServiceOpenScannerArgs) GetTable() []byte { + return p.Table +} +var THBaseServiceOpenScannerArgs_Tscan_DEFAULT *TScan +func (p *THBaseServiceOpenScannerArgs) GetTscan() *TScan { + if !p.IsSetTscan() { + return THBaseServiceOpenScannerArgs_Tscan_DEFAULT + } +return p.Tscan +} +func (p *THBaseServiceOpenScannerArgs) IsSetTscan() bool { + return p.Tscan != nil +} + +func (p *THBaseServiceOpenScannerArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTable bool = false; + var issetTscan bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTable = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetTscan = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTable{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")); + } + if !issetTscan{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tscan is not set")); + } + return nil +} + +func (p *THBaseServiceOpenScannerArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Table = v +} + return nil +} + +func (p *THBaseServiceOpenScannerArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Tscan = &TScan{ + MaxVersions: 1, +} + if err := p.Tscan.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tscan), err) + } + return nil +} + +func (p *THBaseServiceOpenScannerArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "openScanner_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceOpenScannerArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Table); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) } + return err +} + +func (p *THBaseServiceOpenScannerArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tscan", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tscan: ", p), err) } + if err := p.Tscan.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tscan), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tscan: ", p), err) } + return err +} + +func (p *THBaseServiceOpenScannerArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceOpenScannerArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceOpenScannerResult struct { + Success *int32 `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceOpenScannerResult() *THBaseServiceOpenScannerResult { + return &THBaseServiceOpenScannerResult{} +} + +var THBaseServiceOpenScannerResult_Success_DEFAULT int32 +func (p *THBaseServiceOpenScannerResult) GetSuccess() int32 { + if !p.IsSetSuccess() { + return THBaseServiceOpenScannerResult_Success_DEFAULT + } +return *p.Success +} +var THBaseServiceOpenScannerResult_Io_DEFAULT *TIOError +func (p *THBaseServiceOpenScannerResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceOpenScannerResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceOpenScannerResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceOpenScannerResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceOpenScannerResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.I32 { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceOpenScannerResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + p.Success = &v +} + return nil +} + +func (p *THBaseServiceOpenScannerResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceOpenScannerResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "openScanner_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceOpenScannerResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceOpenScannerResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceOpenScannerResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceOpenScannerResult(%+v)", *p) +} + +// Attributes: +// - ScannerId: the Id of the Scanner to return rows from. This is an Id returned from the openScanner function. +// - NumRows: number of rows to return +type THBaseServiceGetScannerRowsArgs struct { + ScannerId int32 `thrift:"scannerId,1,required" db:"scannerId" json:"scannerId"` + NumRows int32 `thrift:"numRows,2" db:"numRows" json:"numRows"` +} + +func NewTHBaseServiceGetScannerRowsArgs() *THBaseServiceGetScannerRowsArgs { + return &THBaseServiceGetScannerRowsArgs{ +NumRows: 1, +} +} + + +func (p *THBaseServiceGetScannerRowsArgs) GetScannerId() int32 { + return p.ScannerId +} + +func (p *THBaseServiceGetScannerRowsArgs) GetNumRows() int32 { + return p.NumRows +} +func (p *THBaseServiceGetScannerRowsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetScannerId bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.I32 { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetScannerId = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.I32 { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetScannerId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ScannerId is not set")); + } + return nil +} + +func (p *THBaseServiceGetScannerRowsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.ScannerId = v +} + return nil +} + +func (p *THBaseServiceGetScannerRowsArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.NumRows = v +} + return nil +} + +func (p *THBaseServiceGetScannerRowsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getScannerRows_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetScannerRowsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "scannerId", thrift.I32, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:scannerId: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.ScannerId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.scannerId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:scannerId: ", p), err) } + return err +} + +func (p *THBaseServiceGetScannerRowsArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "numRows", thrift.I32, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:numRows: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.NumRows)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.numRows (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:numRows: ", p), err) } + return err +} + +func (p *THBaseServiceGetScannerRowsArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetScannerRowsArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +// - Ia: if the scannerId is invalid +type THBaseServiceGetScannerRowsResult struct { + Success []*TResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` + Ia *TIllegalArgument `thrift:"ia,2" db:"ia" json:"ia,omitempty"` +} + +func NewTHBaseServiceGetScannerRowsResult() *THBaseServiceGetScannerRowsResult { + return &THBaseServiceGetScannerRowsResult{} +} + +var THBaseServiceGetScannerRowsResult_Success_DEFAULT []*TResult_ + +func (p *THBaseServiceGetScannerRowsResult) GetSuccess() []*TResult_ { + return p.Success +} +var THBaseServiceGetScannerRowsResult_Io_DEFAULT *TIOError +func (p *THBaseServiceGetScannerRowsResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceGetScannerRowsResult_Io_DEFAULT + } +return p.Io +} +var THBaseServiceGetScannerRowsResult_Ia_DEFAULT *TIllegalArgument +func (p *THBaseServiceGetScannerRowsResult) GetIa() *TIllegalArgument { + if !p.IsSetIa() { + return THBaseServiceGetScannerRowsResult_Ia_DEFAULT + } +return p.Ia +} +func (p *THBaseServiceGetScannerRowsResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceGetScannerRowsResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceGetScannerRowsResult) IsSetIa() bool { + return p.Ia != nil +} + +func (p *THBaseServiceGetScannerRowsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.LIST { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceGetScannerRowsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TResult_, 0, size) + p.Success = tSlice + for i := 0; i < size; i ++ { + _elem318 := &TResult_{} + if err := _elem318.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem318), err) + } + p.Success = append(p.Success, _elem318) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *THBaseServiceGetScannerRowsResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceGetScannerRowsResult) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Ia = &TIllegalArgument{} + if err := p.Ia.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Ia), err) + } + return nil +} + +func (p *THBaseServiceGetScannerRowsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getScannerRows_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetScannerRowsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.LIST, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Success)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Success { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetScannerRowsResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetScannerRowsResult) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIa() { + if err := oprot.WriteFieldBegin(ctx, "ia", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:ia: ", p), err) } + if err := p.Ia.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Ia), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:ia: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetScannerRowsResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetScannerRowsResult(%+v)", *p) +} + +// Attributes: +// - ScannerId: the Id of the Scanner to close * +type THBaseServiceCloseScannerArgs struct { + ScannerId int32 `thrift:"scannerId,1,required" db:"scannerId" json:"scannerId"` +} + +func NewTHBaseServiceCloseScannerArgs() *THBaseServiceCloseScannerArgs { + return &THBaseServiceCloseScannerArgs{} +} + + +func (p *THBaseServiceCloseScannerArgs) GetScannerId() int32 { + return p.ScannerId +} +func (p *THBaseServiceCloseScannerArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetScannerId bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.I32 { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetScannerId = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetScannerId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ScannerId is not set")); + } + return nil +} + +func (p *THBaseServiceCloseScannerArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.ScannerId = v +} + return nil +} + +func (p *THBaseServiceCloseScannerArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "closeScanner_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceCloseScannerArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "scannerId", thrift.I32, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:scannerId: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.ScannerId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.scannerId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:scannerId: ", p), err) } + return err +} + +func (p *THBaseServiceCloseScannerArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceCloseScannerArgs(%+v)", *p) +} + +// Attributes: +// - Io +// - Ia: if the scannerId is invalid +type THBaseServiceCloseScannerResult struct { + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` + Ia *TIllegalArgument `thrift:"ia,2" db:"ia" json:"ia,omitempty"` +} + +func NewTHBaseServiceCloseScannerResult() *THBaseServiceCloseScannerResult { + return &THBaseServiceCloseScannerResult{} +} + +var THBaseServiceCloseScannerResult_Io_DEFAULT *TIOError +func (p *THBaseServiceCloseScannerResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceCloseScannerResult_Io_DEFAULT + } +return p.Io +} +var THBaseServiceCloseScannerResult_Ia_DEFAULT *TIllegalArgument +func (p *THBaseServiceCloseScannerResult) GetIa() *TIllegalArgument { + if !p.IsSetIa() { + return THBaseServiceCloseScannerResult_Ia_DEFAULT + } +return p.Ia +} +func (p *THBaseServiceCloseScannerResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceCloseScannerResult) IsSetIa() bool { + return p.Ia != nil +} + +func (p *THBaseServiceCloseScannerResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceCloseScannerResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceCloseScannerResult) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Ia = &TIllegalArgument{} + if err := p.Ia.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Ia), err) + } + return nil +} + +func (p *THBaseServiceCloseScannerResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "closeScanner_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceCloseScannerResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceCloseScannerResult) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIa() { + if err := oprot.WriteFieldBegin(ctx, "ia", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:ia: ", p), err) } + if err := p.Ia.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Ia), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:ia: ", p), err) } + } + return err +} + +func (p *THBaseServiceCloseScannerResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceCloseScannerResult(%+v)", *p) +} + +// Attributes: +// - Table: table to apply the mutations +// - TrowMutations: mutations to apply +type THBaseServiceMutateRowArgs struct { + Table []byte `thrift:"table,1,required" db:"table" json:"table"` + TrowMutations *TRowMutations `thrift:"trowMutations,2,required" db:"trowMutations" json:"trowMutations"` +} + +func NewTHBaseServiceMutateRowArgs() *THBaseServiceMutateRowArgs { + return &THBaseServiceMutateRowArgs{} +} + + +func (p *THBaseServiceMutateRowArgs) GetTable() []byte { + return p.Table +} +var THBaseServiceMutateRowArgs_TrowMutations_DEFAULT *TRowMutations +func (p *THBaseServiceMutateRowArgs) GetTrowMutations() *TRowMutations { + if !p.IsSetTrowMutations() { + return THBaseServiceMutateRowArgs_TrowMutations_DEFAULT + } +return p.TrowMutations +} +func (p *THBaseServiceMutateRowArgs) IsSetTrowMutations() bool { + return p.TrowMutations != nil +} + +func (p *THBaseServiceMutateRowArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTable bool = false; + var issetTrowMutations bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTable = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetTrowMutations = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTable{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")); + } + if !issetTrowMutations{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TrowMutations is not set")); + } + return nil +} + +func (p *THBaseServiceMutateRowArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Table = v +} + return nil +} + +func (p *THBaseServiceMutateRowArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.TrowMutations = &TRowMutations{} + if err := p.TrowMutations.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TrowMutations), err) + } + return nil +} + +func (p *THBaseServiceMutateRowArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "mutateRow_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceMutateRowArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Table); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) } + return err +} + +func (p *THBaseServiceMutateRowArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "trowMutations", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:trowMutations: ", p), err) } + if err := p.TrowMutations.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TrowMutations), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:trowMutations: ", p), err) } + return err +} + +func (p *THBaseServiceMutateRowArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceMutateRowArgs(%+v)", *p) +} + +// Attributes: +// - Io +type THBaseServiceMutateRowResult struct { + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceMutateRowResult() *THBaseServiceMutateRowResult { + return &THBaseServiceMutateRowResult{} +} + +var THBaseServiceMutateRowResult_Io_DEFAULT *TIOError +func (p *THBaseServiceMutateRowResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceMutateRowResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceMutateRowResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceMutateRowResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceMutateRowResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceMutateRowResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "mutateRow_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceMutateRowResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceMutateRowResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceMutateRowResult(%+v)", *p) +} + +// Attributes: +// - Table: the table to get the Scanner for +// - Tscan: the scan object to get a Scanner for +// - NumRows: number of rows to return +type THBaseServiceGetScannerResultsArgs struct { + Table []byte `thrift:"table,1,required" db:"table" json:"table"` + Tscan *TScan `thrift:"tscan,2,required" db:"tscan" json:"tscan"` + NumRows int32 `thrift:"numRows,3" db:"numRows" json:"numRows"` +} + +func NewTHBaseServiceGetScannerResultsArgs() *THBaseServiceGetScannerResultsArgs { + return &THBaseServiceGetScannerResultsArgs{ +NumRows: 1, +} +} + + +func (p *THBaseServiceGetScannerResultsArgs) GetTable() []byte { + return p.Table +} +var THBaseServiceGetScannerResultsArgs_Tscan_DEFAULT *TScan +func (p *THBaseServiceGetScannerResultsArgs) GetTscan() *TScan { + if !p.IsSetTscan() { + return THBaseServiceGetScannerResultsArgs_Tscan_DEFAULT + } +return p.Tscan +} + +func (p *THBaseServiceGetScannerResultsArgs) GetNumRows() int32 { + return p.NumRows +} +func (p *THBaseServiceGetScannerResultsArgs) IsSetTscan() bool { + return p.Tscan != nil +} + +func (p *THBaseServiceGetScannerResultsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTable bool = false; + var issetTscan bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTable = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetTscan = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.I32 { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTable{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")); + } + if !issetTscan{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tscan is not set")); + } + return nil +} + +func (p *THBaseServiceGetScannerResultsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Table = v +} + return nil +} + +func (p *THBaseServiceGetScannerResultsArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Tscan = &TScan{ + MaxVersions: 1, +} + if err := p.Tscan.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tscan), err) + } + return nil +} + +func (p *THBaseServiceGetScannerResultsArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.NumRows = v +} + return nil +} + +func (p *THBaseServiceGetScannerResultsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getScannerResults_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetScannerResultsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Table); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) } + return err +} + +func (p *THBaseServiceGetScannerResultsArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tscan", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tscan: ", p), err) } + if err := p.Tscan.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tscan), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tscan: ", p), err) } + return err +} + +func (p *THBaseServiceGetScannerResultsArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "numRows", thrift.I32, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:numRows: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.NumRows)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.numRows (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:numRows: ", p), err) } + return err +} + +func (p *THBaseServiceGetScannerResultsArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetScannerResultsArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceGetScannerResultsResult struct { + Success []*TResult_ `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceGetScannerResultsResult() *THBaseServiceGetScannerResultsResult { + return &THBaseServiceGetScannerResultsResult{} +} + +var THBaseServiceGetScannerResultsResult_Success_DEFAULT []*TResult_ + +func (p *THBaseServiceGetScannerResultsResult) GetSuccess() []*TResult_ { + return p.Success +} +var THBaseServiceGetScannerResultsResult_Io_DEFAULT *TIOError +func (p *THBaseServiceGetScannerResultsResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceGetScannerResultsResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceGetScannerResultsResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceGetScannerResultsResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceGetScannerResultsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.LIST { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceGetScannerResultsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TResult_, 0, size) + p.Success = tSlice + for i := 0; i < size; i ++ { + _elem319 := &TResult_{} + if err := _elem319.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem319), err) + } + p.Success = append(p.Success, _elem319) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *THBaseServiceGetScannerResultsResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceGetScannerResultsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getScannerResults_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetScannerResultsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.LIST, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Success)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Success { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetScannerResultsResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetScannerResultsResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetScannerResultsResult(%+v)", *p) +} + +// Attributes: +// - Table +// - Row +// - Reload +type THBaseServiceGetRegionLocationArgs struct { + Table []byte `thrift:"table,1,required" db:"table" json:"table"` + Row []byte `thrift:"row,2,required" db:"row" json:"row"` + Reload bool `thrift:"reload,3" db:"reload" json:"reload"` +} + +func NewTHBaseServiceGetRegionLocationArgs() *THBaseServiceGetRegionLocationArgs { + return &THBaseServiceGetRegionLocationArgs{} +} + + +func (p *THBaseServiceGetRegionLocationArgs) GetTable() []byte { + return p.Table +} + +func (p *THBaseServiceGetRegionLocationArgs) GetRow() []byte { + return p.Row +} + +func (p *THBaseServiceGetRegionLocationArgs) GetReload() bool { + return p.Reload +} +func (p *THBaseServiceGetRegionLocationArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTable bool = false; + var issetRow bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTable = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetRow = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTable{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")); + } + if !issetRow{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Row is not set")); + } + return nil +} + +func (p *THBaseServiceGetRegionLocationArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Table = v +} + return nil +} + +func (p *THBaseServiceGetRegionLocationArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Row = v +} + return nil +} + +func (p *THBaseServiceGetRegionLocationArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Reload = v +} + return nil +} + +func (p *THBaseServiceGetRegionLocationArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getRegionLocation_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetRegionLocationArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Table); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) } + return err +} + +func (p *THBaseServiceGetRegionLocationArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "row", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:row: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Row); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.row (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:row: ", p), err) } + return err +} + +func (p *THBaseServiceGetRegionLocationArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "reload", thrift.BOOL, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:reload: ", p), err) } + if err := oprot.WriteBool(ctx, bool(p.Reload)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.reload (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:reload: ", p), err) } + return err +} + +func (p *THBaseServiceGetRegionLocationArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetRegionLocationArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceGetRegionLocationResult struct { + Success *THRegionLocation `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceGetRegionLocationResult() *THBaseServiceGetRegionLocationResult { + return &THBaseServiceGetRegionLocationResult{} +} + +var THBaseServiceGetRegionLocationResult_Success_DEFAULT *THRegionLocation +func (p *THBaseServiceGetRegionLocationResult) GetSuccess() *THRegionLocation { + if !p.IsSetSuccess() { + return THBaseServiceGetRegionLocationResult_Success_DEFAULT + } +return p.Success +} +var THBaseServiceGetRegionLocationResult_Io_DEFAULT *TIOError +func (p *THBaseServiceGetRegionLocationResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceGetRegionLocationResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceGetRegionLocationResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceGetRegionLocationResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceGetRegionLocationResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceGetRegionLocationResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &THRegionLocation{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } + return nil +} + +func (p *THBaseServiceGetRegionLocationResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceGetRegionLocationResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getRegionLocation_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetRegionLocationResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetRegionLocationResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetRegionLocationResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetRegionLocationResult(%+v)", *p) +} + +// Attributes: +// - Table +type THBaseServiceGetAllRegionLocationsArgs struct { + Table []byte `thrift:"table,1,required" db:"table" json:"table"` +} + +func NewTHBaseServiceGetAllRegionLocationsArgs() *THBaseServiceGetAllRegionLocationsArgs { + return &THBaseServiceGetAllRegionLocationsArgs{} +} + + +func (p *THBaseServiceGetAllRegionLocationsArgs) GetTable() []byte { + return p.Table +} +func (p *THBaseServiceGetAllRegionLocationsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTable bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTable = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTable{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")); + } + return nil +} + +func (p *THBaseServiceGetAllRegionLocationsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Table = v +} + return nil +} + +func (p *THBaseServiceGetAllRegionLocationsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getAllRegionLocations_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetAllRegionLocationsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Table); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) } + return err +} + +func (p *THBaseServiceGetAllRegionLocationsArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetAllRegionLocationsArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceGetAllRegionLocationsResult struct { + Success []*THRegionLocation `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceGetAllRegionLocationsResult() *THBaseServiceGetAllRegionLocationsResult { + return &THBaseServiceGetAllRegionLocationsResult{} +} + +var THBaseServiceGetAllRegionLocationsResult_Success_DEFAULT []*THRegionLocation + +func (p *THBaseServiceGetAllRegionLocationsResult) GetSuccess() []*THRegionLocation { + return p.Success +} +var THBaseServiceGetAllRegionLocationsResult_Io_DEFAULT *TIOError +func (p *THBaseServiceGetAllRegionLocationsResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceGetAllRegionLocationsResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceGetAllRegionLocationsResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceGetAllRegionLocationsResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceGetAllRegionLocationsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.LIST { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceGetAllRegionLocationsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*THRegionLocation, 0, size) + p.Success = tSlice + for i := 0; i < size; i ++ { + _elem320 := &THRegionLocation{} + if err := _elem320.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem320), err) + } + p.Success = append(p.Success, _elem320) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *THBaseServiceGetAllRegionLocationsResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceGetAllRegionLocationsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getAllRegionLocations_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetAllRegionLocationsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.LIST, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Success)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Success { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetAllRegionLocationsResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetAllRegionLocationsResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetAllRegionLocationsResult(%+v)", *p) +} + +// Attributes: +// - Table: to check in and delete from +// - Row: row to check +// - Family: column family to check +// - Qualifier: column qualifier to check +// - CompareOp: comparison to make on the value +// - Value: the expected value to be compared against, if not provided the +// check is for the non-existence of the column in question +// - RowMutations: row mutations to execute if the value matches +type THBaseServiceCheckAndMutateArgs struct { + Table []byte `thrift:"table,1,required" db:"table" json:"table"` + Row []byte `thrift:"row,2,required" db:"row" json:"row"` + Family []byte `thrift:"family,3,required" db:"family" json:"family"` + Qualifier []byte `thrift:"qualifier,4,required" db:"qualifier" json:"qualifier"` + CompareOp TCompareOp `thrift:"compareOp,5,required" db:"compareOp" json:"compareOp"` + Value []byte `thrift:"value,6" db:"value" json:"value"` + RowMutations *TRowMutations `thrift:"rowMutations,7,required" db:"rowMutations" json:"rowMutations"` +} + +func NewTHBaseServiceCheckAndMutateArgs() *THBaseServiceCheckAndMutateArgs { + return &THBaseServiceCheckAndMutateArgs{} +} + + +func (p *THBaseServiceCheckAndMutateArgs) GetTable() []byte { + return p.Table +} + +func (p *THBaseServiceCheckAndMutateArgs) GetRow() []byte { + return p.Row +} + +func (p *THBaseServiceCheckAndMutateArgs) GetFamily() []byte { + return p.Family +} + +func (p *THBaseServiceCheckAndMutateArgs) GetQualifier() []byte { + return p.Qualifier +} + +func (p *THBaseServiceCheckAndMutateArgs) GetCompareOp() TCompareOp { + return p.CompareOp +} + +func (p *THBaseServiceCheckAndMutateArgs) GetValue() []byte { + return p.Value +} +var THBaseServiceCheckAndMutateArgs_RowMutations_DEFAULT *TRowMutations +func (p *THBaseServiceCheckAndMutateArgs) GetRowMutations() *TRowMutations { + if !p.IsSetRowMutations() { + return THBaseServiceCheckAndMutateArgs_RowMutations_DEFAULT + } +return p.RowMutations +} +func (p *THBaseServiceCheckAndMutateArgs) IsSetRowMutations() bool { + return p.RowMutations != nil +} + +func (p *THBaseServiceCheckAndMutateArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTable bool = false; + var issetRow bool = false; + var issetFamily bool = false; + var issetQualifier bool = false; + var issetCompareOp bool = false; + var issetRowMutations bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTable = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetRow = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + issetFamily = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.STRING { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + issetQualifier = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.I32 { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + issetCompareOp = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.STRING { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + issetRowMutations = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTable{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")); + } + if !issetRow{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Row is not set")); + } + if !issetFamily{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Family is not set")); + } + if !issetQualifier{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Qualifier is not set")); + } + if !issetCompareOp{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field CompareOp is not set")); + } + if !issetRowMutations{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field RowMutations is not set")); + } + return nil +} + +func (p *THBaseServiceCheckAndMutateArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Table = v +} + return nil +} + +func (p *THBaseServiceCheckAndMutateArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Row = v +} + return nil +} + +func (p *THBaseServiceCheckAndMutateArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Family = v +} + return nil +} + +func (p *THBaseServiceCheckAndMutateArgs) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.Qualifier = v +} + return nil +} + +func (p *THBaseServiceCheckAndMutateArgs) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) +} else { + temp := TCompareOp(v) + p.CompareOp = temp +} + return nil +} + +func (p *THBaseServiceCheckAndMutateArgs) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) +} else { + p.Value = v +} + return nil +} + +func (p *THBaseServiceCheckAndMutateArgs) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + p.RowMutations = &TRowMutations{} + if err := p.RowMutations.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.RowMutations), err) + } + return nil +} + +func (p *THBaseServiceCheckAndMutateArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "checkAndMutate_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceCheckAndMutateArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Table); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) } + return err +} + +func (p *THBaseServiceCheckAndMutateArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "row", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:row: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Row); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.row (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:row: ", p), err) } + return err +} + +func (p *THBaseServiceCheckAndMutateArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "family", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:family: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Family); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.family (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:family: ", p), err) } + return err +} + +func (p *THBaseServiceCheckAndMutateArgs) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "qualifier", thrift.STRING, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:qualifier: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Qualifier); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.qualifier (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:qualifier: ", p), err) } + return err +} + +func (p *THBaseServiceCheckAndMutateArgs) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "compareOp", thrift.I32, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:compareOp: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.CompareOp)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.compareOp (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:compareOp: ", p), err) } + return err +} + +func (p *THBaseServiceCheckAndMutateArgs) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "value", thrift.STRING, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:value: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Value); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.value (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:value: ", p), err) } + return err +} + +func (p *THBaseServiceCheckAndMutateArgs) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "rowMutations", thrift.STRUCT, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:rowMutations: ", p), err) } + if err := p.RowMutations.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.RowMutations), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:rowMutations: ", p), err) } + return err +} + +func (p *THBaseServiceCheckAndMutateArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceCheckAndMutateArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceCheckAndMutateResult struct { + Success *bool `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceCheckAndMutateResult() *THBaseServiceCheckAndMutateResult { + return &THBaseServiceCheckAndMutateResult{} +} + +var THBaseServiceCheckAndMutateResult_Success_DEFAULT bool +func (p *THBaseServiceCheckAndMutateResult) GetSuccess() bool { + if !p.IsSetSuccess() { + return THBaseServiceCheckAndMutateResult_Success_DEFAULT + } +return *p.Success +} +var THBaseServiceCheckAndMutateResult_Io_DEFAULT *TIOError +func (p *THBaseServiceCheckAndMutateResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceCheckAndMutateResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceCheckAndMutateResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceCheckAndMutateResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceCheckAndMutateResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceCheckAndMutateResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + p.Success = &v +} + return nil +} + +func (p *THBaseServiceCheckAndMutateResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceCheckAndMutateResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "checkAndMutate_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceCheckAndMutateResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.BOOL, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.Success)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceCheckAndMutateResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceCheckAndMutateResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceCheckAndMutateResult(%+v)", *p) +} + +// Attributes: +// - Table: the tablename of the table to get tableDescriptor +type THBaseServiceGetTableDescriptorArgs struct { + Table *TTableName `thrift:"table,1,required" db:"table" json:"table"` +} + +func NewTHBaseServiceGetTableDescriptorArgs() *THBaseServiceGetTableDescriptorArgs { + return &THBaseServiceGetTableDescriptorArgs{} +} + +var THBaseServiceGetTableDescriptorArgs_Table_DEFAULT *TTableName +func (p *THBaseServiceGetTableDescriptorArgs) GetTable() *TTableName { + if !p.IsSetTable() { + return THBaseServiceGetTableDescriptorArgs_Table_DEFAULT + } +return p.Table +} +func (p *THBaseServiceGetTableDescriptorArgs) IsSetTable() bool { + return p.Table != nil +} + +func (p *THBaseServiceGetTableDescriptorArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTable bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTable = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTable{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")); + } + return nil +} + +func (p *THBaseServiceGetTableDescriptorArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Table = &TTableName{} + if err := p.Table.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Table), err) + } + return nil +} + +func (p *THBaseServiceGetTableDescriptorArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getTableDescriptor_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetTableDescriptorArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "table", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) } + if err := p.Table.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Table), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) } + return err +} + +func (p *THBaseServiceGetTableDescriptorArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetTableDescriptorArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceGetTableDescriptorResult struct { + Success *TTableDescriptor `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceGetTableDescriptorResult() *THBaseServiceGetTableDescriptorResult { + return &THBaseServiceGetTableDescriptorResult{} +} + +var THBaseServiceGetTableDescriptorResult_Success_DEFAULT *TTableDescriptor +func (p *THBaseServiceGetTableDescriptorResult) GetSuccess() *TTableDescriptor { + if !p.IsSetSuccess() { + return THBaseServiceGetTableDescriptorResult_Success_DEFAULT + } +return p.Success +} +var THBaseServiceGetTableDescriptorResult_Io_DEFAULT *TIOError +func (p *THBaseServiceGetTableDescriptorResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceGetTableDescriptorResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceGetTableDescriptorResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceGetTableDescriptorResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceGetTableDescriptorResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceGetTableDescriptorResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TTableDescriptor{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } + return nil +} + +func (p *THBaseServiceGetTableDescriptorResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceGetTableDescriptorResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getTableDescriptor_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetTableDescriptorResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetTableDescriptorResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetTableDescriptorResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetTableDescriptorResult(%+v)", *p) +} + +// Attributes: +// - Tables: the tablename list of the tables to get tableDescriptor +type THBaseServiceGetTableDescriptorsArgs struct { + Tables []*TTableName `thrift:"tables,1,required" db:"tables" json:"tables"` +} + +func NewTHBaseServiceGetTableDescriptorsArgs() *THBaseServiceGetTableDescriptorsArgs { + return &THBaseServiceGetTableDescriptorsArgs{} +} + + +func (p *THBaseServiceGetTableDescriptorsArgs) GetTables() []*TTableName { + return p.Tables +} +func (p *THBaseServiceGetTableDescriptorsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTables bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.LIST { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTables = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTables{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tables is not set")); + } + return nil +} + +func (p *THBaseServiceGetTableDescriptorsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TTableName, 0, size) + p.Tables = tSlice + for i := 0; i < size; i ++ { + _elem321 := &TTableName{} + if err := _elem321.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem321), err) + } + p.Tables = append(p.Tables, _elem321) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *THBaseServiceGetTableDescriptorsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getTableDescriptors_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetTableDescriptorsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tables", thrift.LIST, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tables: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Tables)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Tables { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tables: ", p), err) } + return err +} + +func (p *THBaseServiceGetTableDescriptorsArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetTableDescriptorsArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceGetTableDescriptorsResult struct { + Success []*TTableDescriptor `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceGetTableDescriptorsResult() *THBaseServiceGetTableDescriptorsResult { + return &THBaseServiceGetTableDescriptorsResult{} +} + +var THBaseServiceGetTableDescriptorsResult_Success_DEFAULT []*TTableDescriptor + +func (p *THBaseServiceGetTableDescriptorsResult) GetSuccess() []*TTableDescriptor { + return p.Success +} +var THBaseServiceGetTableDescriptorsResult_Io_DEFAULT *TIOError +func (p *THBaseServiceGetTableDescriptorsResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceGetTableDescriptorsResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceGetTableDescriptorsResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceGetTableDescriptorsResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceGetTableDescriptorsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.LIST { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceGetTableDescriptorsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TTableDescriptor, 0, size) + p.Success = tSlice + for i := 0; i < size; i ++ { + _elem322 := &TTableDescriptor{} + if err := _elem322.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem322), err) + } + p.Success = append(p.Success, _elem322) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *THBaseServiceGetTableDescriptorsResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceGetTableDescriptorsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getTableDescriptors_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetTableDescriptorsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.LIST, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Success)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Success { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetTableDescriptorsResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetTableDescriptorsResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetTableDescriptorsResult(%+v)", *p) +} + +// Attributes: +// - TableName: the tablename of the tables to check +type THBaseServiceTableExistsArgs struct { + TableName *TTableName `thrift:"tableName,1" db:"tableName" json:"tableName"` +} + +func NewTHBaseServiceTableExistsArgs() *THBaseServiceTableExistsArgs { + return &THBaseServiceTableExistsArgs{} +} + +var THBaseServiceTableExistsArgs_TableName_DEFAULT *TTableName +func (p *THBaseServiceTableExistsArgs) GetTableName() *TTableName { + if !p.IsSetTableName() { + return THBaseServiceTableExistsArgs_TableName_DEFAULT + } +return p.TableName +} +func (p *THBaseServiceTableExistsArgs) IsSetTableName() bool { + return p.TableName != nil +} + +func (p *THBaseServiceTableExistsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceTableExistsArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.TableName = &TTableName{} + if err := p.TableName.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TableName), err) + } + return nil +} + +func (p *THBaseServiceTableExistsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "tableExists_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceTableExistsArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tableName", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tableName: ", p), err) } + if err := p.TableName.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TableName), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tableName: ", p), err) } + return err +} + +func (p *THBaseServiceTableExistsArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceTableExistsArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceTableExistsResult struct { + Success *bool `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceTableExistsResult() *THBaseServiceTableExistsResult { + return &THBaseServiceTableExistsResult{} +} + +var THBaseServiceTableExistsResult_Success_DEFAULT bool +func (p *THBaseServiceTableExistsResult) GetSuccess() bool { + if !p.IsSetSuccess() { + return THBaseServiceTableExistsResult_Success_DEFAULT + } +return *p.Success +} +var THBaseServiceTableExistsResult_Io_DEFAULT *TIOError +func (p *THBaseServiceTableExistsResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceTableExistsResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceTableExistsResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceTableExistsResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceTableExistsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceTableExistsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + p.Success = &v +} + return nil +} + +func (p *THBaseServiceTableExistsResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceTableExistsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "tableExists_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceTableExistsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.BOOL, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.Success)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceTableExistsResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceTableExistsResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceTableExistsResult(%+v)", *p) +} + +// Attributes: +// - Regex: The regular expression to match against +// - IncludeSysTables: set to false if match only against userspace tables +type THBaseServiceGetTableDescriptorsByPatternArgs struct { + Regex string `thrift:"regex,1" db:"regex" json:"regex"` + IncludeSysTables bool `thrift:"includeSysTables,2,required" db:"includeSysTables" json:"includeSysTables"` +} + +func NewTHBaseServiceGetTableDescriptorsByPatternArgs() *THBaseServiceGetTableDescriptorsByPatternArgs { + return &THBaseServiceGetTableDescriptorsByPatternArgs{} +} + + +func (p *THBaseServiceGetTableDescriptorsByPatternArgs) GetRegex() string { + return p.Regex +} + +func (p *THBaseServiceGetTableDescriptorsByPatternArgs) GetIncludeSysTables() bool { + return p.IncludeSysTables +} +func (p *THBaseServiceGetTableDescriptorsByPatternArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetIncludeSysTables bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetIncludeSysTables = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetIncludeSysTables{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field IncludeSysTables is not set")); + } + return nil +} + +func (p *THBaseServiceGetTableDescriptorsByPatternArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Regex = v +} + return nil +} + +func (p *THBaseServiceGetTableDescriptorsByPatternArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.IncludeSysTables = v +} + return nil +} + +func (p *THBaseServiceGetTableDescriptorsByPatternArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getTableDescriptorsByPattern_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetTableDescriptorsByPatternArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "regex", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:regex: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Regex)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.regex (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:regex: ", p), err) } + return err +} + +func (p *THBaseServiceGetTableDescriptorsByPatternArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "includeSysTables", thrift.BOOL, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:includeSysTables: ", p), err) } + if err := oprot.WriteBool(ctx, bool(p.IncludeSysTables)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.includeSysTables (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:includeSysTables: ", p), err) } + return err +} + +func (p *THBaseServiceGetTableDescriptorsByPatternArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetTableDescriptorsByPatternArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceGetTableDescriptorsByPatternResult struct { + Success []*TTableDescriptor `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceGetTableDescriptorsByPatternResult() *THBaseServiceGetTableDescriptorsByPatternResult { + return &THBaseServiceGetTableDescriptorsByPatternResult{} +} + +var THBaseServiceGetTableDescriptorsByPatternResult_Success_DEFAULT []*TTableDescriptor + +func (p *THBaseServiceGetTableDescriptorsByPatternResult) GetSuccess() []*TTableDescriptor { + return p.Success +} +var THBaseServiceGetTableDescriptorsByPatternResult_Io_DEFAULT *TIOError +func (p *THBaseServiceGetTableDescriptorsByPatternResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceGetTableDescriptorsByPatternResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceGetTableDescriptorsByPatternResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceGetTableDescriptorsByPatternResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceGetTableDescriptorsByPatternResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.LIST { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceGetTableDescriptorsByPatternResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TTableDescriptor, 0, size) + p.Success = tSlice + for i := 0; i < size; i ++ { + _elem323 := &TTableDescriptor{} + if err := _elem323.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem323), err) + } + p.Success = append(p.Success, _elem323) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *THBaseServiceGetTableDescriptorsByPatternResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceGetTableDescriptorsByPatternResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getTableDescriptorsByPattern_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetTableDescriptorsByPatternResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.LIST, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Success)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Success { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetTableDescriptorsByPatternResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetTableDescriptorsByPatternResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetTableDescriptorsByPatternResult(%+v)", *p) +} + +// Attributes: +// - Name: The namesapce's name +type THBaseServiceGetTableDescriptorsByNamespaceArgs struct { + Name string `thrift:"name,1,required" db:"name" json:"name"` +} + +func NewTHBaseServiceGetTableDescriptorsByNamespaceArgs() *THBaseServiceGetTableDescriptorsByNamespaceArgs { + return &THBaseServiceGetTableDescriptorsByNamespaceArgs{} +} + + +func (p *THBaseServiceGetTableDescriptorsByNamespaceArgs) GetName() string { + return p.Name +} +func (p *THBaseServiceGetTableDescriptorsByNamespaceArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetName bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set")); + } + return nil +} + +func (p *THBaseServiceGetTableDescriptorsByNamespaceArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Name = v +} + return nil +} + +func (p *THBaseServiceGetTableDescriptorsByNamespaceArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getTableDescriptorsByNamespace_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetTableDescriptorsByNamespaceArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Name)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.name (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } + return err +} + +func (p *THBaseServiceGetTableDescriptorsByNamespaceArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetTableDescriptorsByNamespaceArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceGetTableDescriptorsByNamespaceResult struct { + Success []*TTableDescriptor `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceGetTableDescriptorsByNamespaceResult() *THBaseServiceGetTableDescriptorsByNamespaceResult { + return &THBaseServiceGetTableDescriptorsByNamespaceResult{} +} + +var THBaseServiceGetTableDescriptorsByNamespaceResult_Success_DEFAULT []*TTableDescriptor + +func (p *THBaseServiceGetTableDescriptorsByNamespaceResult) GetSuccess() []*TTableDescriptor { + return p.Success +} +var THBaseServiceGetTableDescriptorsByNamespaceResult_Io_DEFAULT *TIOError +func (p *THBaseServiceGetTableDescriptorsByNamespaceResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceGetTableDescriptorsByNamespaceResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceGetTableDescriptorsByNamespaceResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceGetTableDescriptorsByNamespaceResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceGetTableDescriptorsByNamespaceResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.LIST { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceGetTableDescriptorsByNamespaceResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TTableDescriptor, 0, size) + p.Success = tSlice + for i := 0; i < size; i ++ { + _elem324 := &TTableDescriptor{} + if err := _elem324.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem324), err) + } + p.Success = append(p.Success, _elem324) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *THBaseServiceGetTableDescriptorsByNamespaceResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceGetTableDescriptorsByNamespaceResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getTableDescriptorsByNamespace_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetTableDescriptorsByNamespaceResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.LIST, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Success)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Success { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetTableDescriptorsByNamespaceResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetTableDescriptorsByNamespaceResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetTableDescriptorsByNamespaceResult(%+v)", *p) +} + +// Attributes: +// - Regex: The regular expression to match against +// - IncludeSysTables: set to false if match only against userspace tables +type THBaseServiceGetTableNamesByPatternArgs struct { + Regex string `thrift:"regex,1" db:"regex" json:"regex"` + IncludeSysTables bool `thrift:"includeSysTables,2,required" db:"includeSysTables" json:"includeSysTables"` +} + +func NewTHBaseServiceGetTableNamesByPatternArgs() *THBaseServiceGetTableNamesByPatternArgs { + return &THBaseServiceGetTableNamesByPatternArgs{} +} + + +func (p *THBaseServiceGetTableNamesByPatternArgs) GetRegex() string { + return p.Regex +} + +func (p *THBaseServiceGetTableNamesByPatternArgs) GetIncludeSysTables() bool { + return p.IncludeSysTables +} +func (p *THBaseServiceGetTableNamesByPatternArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetIncludeSysTables bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetIncludeSysTables = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetIncludeSysTables{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field IncludeSysTables is not set")); + } + return nil +} + +func (p *THBaseServiceGetTableNamesByPatternArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Regex = v +} + return nil +} + +func (p *THBaseServiceGetTableNamesByPatternArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.IncludeSysTables = v +} + return nil +} + +func (p *THBaseServiceGetTableNamesByPatternArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getTableNamesByPattern_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetTableNamesByPatternArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "regex", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:regex: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Regex)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.regex (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:regex: ", p), err) } + return err +} + +func (p *THBaseServiceGetTableNamesByPatternArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "includeSysTables", thrift.BOOL, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:includeSysTables: ", p), err) } + if err := oprot.WriteBool(ctx, bool(p.IncludeSysTables)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.includeSysTables (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:includeSysTables: ", p), err) } + return err +} + +func (p *THBaseServiceGetTableNamesByPatternArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetTableNamesByPatternArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceGetTableNamesByPatternResult struct { + Success []*TTableName `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceGetTableNamesByPatternResult() *THBaseServiceGetTableNamesByPatternResult { + return &THBaseServiceGetTableNamesByPatternResult{} +} + +var THBaseServiceGetTableNamesByPatternResult_Success_DEFAULT []*TTableName + +func (p *THBaseServiceGetTableNamesByPatternResult) GetSuccess() []*TTableName { + return p.Success +} +var THBaseServiceGetTableNamesByPatternResult_Io_DEFAULT *TIOError +func (p *THBaseServiceGetTableNamesByPatternResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceGetTableNamesByPatternResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceGetTableNamesByPatternResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceGetTableNamesByPatternResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceGetTableNamesByPatternResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.LIST { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceGetTableNamesByPatternResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TTableName, 0, size) + p.Success = tSlice + for i := 0; i < size; i ++ { + _elem325 := &TTableName{} + if err := _elem325.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem325), err) + } + p.Success = append(p.Success, _elem325) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *THBaseServiceGetTableNamesByPatternResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceGetTableNamesByPatternResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getTableNamesByPattern_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetTableNamesByPatternResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.LIST, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Success)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Success { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetTableNamesByPatternResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetTableNamesByPatternResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetTableNamesByPatternResult(%+v)", *p) +} + +// Attributes: +// - Name: The namesapce's name +type THBaseServiceGetTableNamesByNamespaceArgs struct { + Name string `thrift:"name,1,required" db:"name" json:"name"` +} + +func NewTHBaseServiceGetTableNamesByNamespaceArgs() *THBaseServiceGetTableNamesByNamespaceArgs { + return &THBaseServiceGetTableNamesByNamespaceArgs{} +} + + +func (p *THBaseServiceGetTableNamesByNamespaceArgs) GetName() string { + return p.Name +} +func (p *THBaseServiceGetTableNamesByNamespaceArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetName bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set")); + } + return nil +} + +func (p *THBaseServiceGetTableNamesByNamespaceArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Name = v +} + return nil +} + +func (p *THBaseServiceGetTableNamesByNamespaceArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getTableNamesByNamespace_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetTableNamesByNamespaceArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Name)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.name (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } + return err +} + +func (p *THBaseServiceGetTableNamesByNamespaceArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetTableNamesByNamespaceArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceGetTableNamesByNamespaceResult struct { + Success []*TTableName `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceGetTableNamesByNamespaceResult() *THBaseServiceGetTableNamesByNamespaceResult { + return &THBaseServiceGetTableNamesByNamespaceResult{} +} + +var THBaseServiceGetTableNamesByNamespaceResult_Success_DEFAULT []*TTableName + +func (p *THBaseServiceGetTableNamesByNamespaceResult) GetSuccess() []*TTableName { + return p.Success +} +var THBaseServiceGetTableNamesByNamespaceResult_Io_DEFAULT *TIOError +func (p *THBaseServiceGetTableNamesByNamespaceResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceGetTableNamesByNamespaceResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceGetTableNamesByNamespaceResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceGetTableNamesByNamespaceResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceGetTableNamesByNamespaceResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.LIST { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceGetTableNamesByNamespaceResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TTableName, 0, size) + p.Success = tSlice + for i := 0; i < size; i ++ { + _elem326 := &TTableName{} + if err := _elem326.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem326), err) + } + p.Success = append(p.Success, _elem326) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *THBaseServiceGetTableNamesByNamespaceResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceGetTableNamesByNamespaceResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getTableNamesByNamespace_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetTableNamesByNamespaceResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.LIST, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Success)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Success { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetTableNamesByNamespaceResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetTableNamesByNamespaceResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetTableNamesByNamespaceResult(%+v)", *p) +} + +// Attributes: +// - Desc: table descriptor for table +// - SplitKeys: rray of split keys for the initial regions of the table +type THBaseServiceCreateTableArgs struct { + Desc *TTableDescriptor `thrift:"desc,1,required" db:"desc" json:"desc"` + SplitKeys [][]byte `thrift:"splitKeys,2" db:"splitKeys" json:"splitKeys"` +} + +func NewTHBaseServiceCreateTableArgs() *THBaseServiceCreateTableArgs { + return &THBaseServiceCreateTableArgs{} +} + +var THBaseServiceCreateTableArgs_Desc_DEFAULT *TTableDescriptor +func (p *THBaseServiceCreateTableArgs) GetDesc() *TTableDescriptor { + if !p.IsSetDesc() { + return THBaseServiceCreateTableArgs_Desc_DEFAULT + } +return p.Desc +} + +func (p *THBaseServiceCreateTableArgs) GetSplitKeys() [][]byte { + return p.SplitKeys +} +func (p *THBaseServiceCreateTableArgs) IsSetDesc() bool { + return p.Desc != nil +} + +func (p *THBaseServiceCreateTableArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetDesc bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetDesc = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.LIST { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetDesc{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Desc is not set")); + } + return nil +} + +func (p *THBaseServiceCreateTableArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Desc = &TTableDescriptor{} + if err := p.Desc.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Desc), err) + } + return nil +} + +func (p *THBaseServiceCreateTableArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([][]byte, 0, size) + p.SplitKeys = tSlice + for i := 0; i < size; i ++ { +var _elem327 []byte + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem327 = v +} + p.SplitKeys = append(p.SplitKeys, _elem327) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *THBaseServiceCreateTableArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "createTable_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceCreateTableArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "desc", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:desc: ", p), err) } + if err := p.Desc.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Desc), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:desc: ", p), err) } + return err +} + +func (p *THBaseServiceCreateTableArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "splitKeys", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:splitKeys: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.SplitKeys)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.SplitKeys { + if err := oprot.WriteBinary(ctx, v); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:splitKeys: ", p), err) } + return err +} + +func (p *THBaseServiceCreateTableArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceCreateTableArgs(%+v)", *p) +} + +// Attributes: +// - Io +type THBaseServiceCreateTableResult struct { + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceCreateTableResult() *THBaseServiceCreateTableResult { + return &THBaseServiceCreateTableResult{} +} + +var THBaseServiceCreateTableResult_Io_DEFAULT *TIOError +func (p *THBaseServiceCreateTableResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceCreateTableResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceCreateTableResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceCreateTableResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceCreateTableResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceCreateTableResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "createTable_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceCreateTableResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceCreateTableResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceCreateTableResult(%+v)", *p) +} + +// Attributes: +// - TableName: the tablename to delete +type THBaseServiceDeleteTableArgs struct { + TableName *TTableName `thrift:"tableName,1,required" db:"tableName" json:"tableName"` +} + +func NewTHBaseServiceDeleteTableArgs() *THBaseServiceDeleteTableArgs { + return &THBaseServiceDeleteTableArgs{} +} + +var THBaseServiceDeleteTableArgs_TableName_DEFAULT *TTableName +func (p *THBaseServiceDeleteTableArgs) GetTableName() *TTableName { + if !p.IsSetTableName() { + return THBaseServiceDeleteTableArgs_TableName_DEFAULT + } +return p.TableName +} +func (p *THBaseServiceDeleteTableArgs) IsSetTableName() bool { + return p.TableName != nil +} + +func (p *THBaseServiceDeleteTableArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTableName bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTableName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTableName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TableName is not set")); + } + return nil +} + +func (p *THBaseServiceDeleteTableArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.TableName = &TTableName{} + if err := p.TableName.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TableName), err) + } + return nil +} + +func (p *THBaseServiceDeleteTableArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "deleteTable_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceDeleteTableArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tableName", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tableName: ", p), err) } + if err := p.TableName.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TableName), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tableName: ", p), err) } + return err +} + +func (p *THBaseServiceDeleteTableArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceDeleteTableArgs(%+v)", *p) +} + +// Attributes: +// - Io +type THBaseServiceDeleteTableResult struct { + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceDeleteTableResult() *THBaseServiceDeleteTableResult { + return &THBaseServiceDeleteTableResult{} +} + +var THBaseServiceDeleteTableResult_Io_DEFAULT *TIOError +func (p *THBaseServiceDeleteTableResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceDeleteTableResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceDeleteTableResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceDeleteTableResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceDeleteTableResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceDeleteTableResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "deleteTable_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceDeleteTableResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceDeleteTableResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceDeleteTableResult(%+v)", *p) +} + +// Attributes: +// - TableName: the tablename to truncate +// - PreserveSplits: whether to preserve previous splits +type THBaseServiceTruncateTableArgs struct { + TableName *TTableName `thrift:"tableName,1,required" db:"tableName" json:"tableName"` + PreserveSplits bool `thrift:"preserveSplits,2,required" db:"preserveSplits" json:"preserveSplits"` +} + +func NewTHBaseServiceTruncateTableArgs() *THBaseServiceTruncateTableArgs { + return &THBaseServiceTruncateTableArgs{} +} + +var THBaseServiceTruncateTableArgs_TableName_DEFAULT *TTableName +func (p *THBaseServiceTruncateTableArgs) GetTableName() *TTableName { + if !p.IsSetTableName() { + return THBaseServiceTruncateTableArgs_TableName_DEFAULT + } +return p.TableName +} + +func (p *THBaseServiceTruncateTableArgs) GetPreserveSplits() bool { + return p.PreserveSplits +} +func (p *THBaseServiceTruncateTableArgs) IsSetTableName() bool { + return p.TableName != nil +} + +func (p *THBaseServiceTruncateTableArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTableName bool = false; + var issetPreserveSplits bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTableName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetPreserveSplits = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTableName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TableName is not set")); + } + if !issetPreserveSplits{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PreserveSplits is not set")); + } + return nil +} + +func (p *THBaseServiceTruncateTableArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.TableName = &TTableName{} + if err := p.TableName.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TableName), err) + } + return nil +} + +func (p *THBaseServiceTruncateTableArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.PreserveSplits = v +} + return nil +} + +func (p *THBaseServiceTruncateTableArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "truncateTable_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceTruncateTableArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tableName", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tableName: ", p), err) } + if err := p.TableName.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TableName), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tableName: ", p), err) } + return err +} + +func (p *THBaseServiceTruncateTableArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "preserveSplits", thrift.BOOL, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:preserveSplits: ", p), err) } + if err := oprot.WriteBool(ctx, bool(p.PreserveSplits)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.preserveSplits (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:preserveSplits: ", p), err) } + return err +} + +func (p *THBaseServiceTruncateTableArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceTruncateTableArgs(%+v)", *p) +} + +// Attributes: +// - Io +type THBaseServiceTruncateTableResult struct { + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceTruncateTableResult() *THBaseServiceTruncateTableResult { + return &THBaseServiceTruncateTableResult{} +} + +var THBaseServiceTruncateTableResult_Io_DEFAULT *TIOError +func (p *THBaseServiceTruncateTableResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceTruncateTableResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceTruncateTableResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceTruncateTableResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceTruncateTableResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceTruncateTableResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "truncateTable_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceTruncateTableResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceTruncateTableResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceTruncateTableResult(%+v)", *p) +} + +// Attributes: +// - TableName: the tablename to enable +type THBaseServiceEnableTableArgs struct { + TableName *TTableName `thrift:"tableName,1,required" db:"tableName" json:"tableName"` +} + +func NewTHBaseServiceEnableTableArgs() *THBaseServiceEnableTableArgs { + return &THBaseServiceEnableTableArgs{} +} + +var THBaseServiceEnableTableArgs_TableName_DEFAULT *TTableName +func (p *THBaseServiceEnableTableArgs) GetTableName() *TTableName { + if !p.IsSetTableName() { + return THBaseServiceEnableTableArgs_TableName_DEFAULT + } +return p.TableName +} +func (p *THBaseServiceEnableTableArgs) IsSetTableName() bool { + return p.TableName != nil +} + +func (p *THBaseServiceEnableTableArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTableName bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTableName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTableName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TableName is not set")); + } + return nil +} + +func (p *THBaseServiceEnableTableArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.TableName = &TTableName{} + if err := p.TableName.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TableName), err) + } + return nil +} + +func (p *THBaseServiceEnableTableArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "enableTable_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceEnableTableArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tableName", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tableName: ", p), err) } + if err := p.TableName.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TableName), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tableName: ", p), err) } + return err +} + +func (p *THBaseServiceEnableTableArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceEnableTableArgs(%+v)", *p) +} + +// Attributes: +// - Io +type THBaseServiceEnableTableResult struct { + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceEnableTableResult() *THBaseServiceEnableTableResult { + return &THBaseServiceEnableTableResult{} +} + +var THBaseServiceEnableTableResult_Io_DEFAULT *TIOError +func (p *THBaseServiceEnableTableResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceEnableTableResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceEnableTableResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceEnableTableResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceEnableTableResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceEnableTableResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "enableTable_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceEnableTableResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceEnableTableResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceEnableTableResult(%+v)", *p) +} + +// Attributes: +// - TableName: the tablename to disable +type THBaseServiceDisableTableArgs struct { + TableName *TTableName `thrift:"tableName,1,required" db:"tableName" json:"tableName"` +} + +func NewTHBaseServiceDisableTableArgs() *THBaseServiceDisableTableArgs { + return &THBaseServiceDisableTableArgs{} +} + +var THBaseServiceDisableTableArgs_TableName_DEFAULT *TTableName +func (p *THBaseServiceDisableTableArgs) GetTableName() *TTableName { + if !p.IsSetTableName() { + return THBaseServiceDisableTableArgs_TableName_DEFAULT + } +return p.TableName +} +func (p *THBaseServiceDisableTableArgs) IsSetTableName() bool { + return p.TableName != nil +} + +func (p *THBaseServiceDisableTableArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTableName bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTableName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTableName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TableName is not set")); + } + return nil +} + +func (p *THBaseServiceDisableTableArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.TableName = &TTableName{} + if err := p.TableName.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TableName), err) + } + return nil +} + +func (p *THBaseServiceDisableTableArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "disableTable_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceDisableTableArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tableName", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tableName: ", p), err) } + if err := p.TableName.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TableName), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tableName: ", p), err) } + return err +} + +func (p *THBaseServiceDisableTableArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceDisableTableArgs(%+v)", *p) +} + +// Attributes: +// - Io +type THBaseServiceDisableTableResult struct { + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceDisableTableResult() *THBaseServiceDisableTableResult { + return &THBaseServiceDisableTableResult{} +} + +var THBaseServiceDisableTableResult_Io_DEFAULT *TIOError +func (p *THBaseServiceDisableTableResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceDisableTableResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceDisableTableResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceDisableTableResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceDisableTableResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceDisableTableResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "disableTable_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceDisableTableResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceDisableTableResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceDisableTableResult(%+v)", *p) +} + +// Attributes: +// - TableName: the tablename to check +type THBaseServiceIsTableEnabledArgs struct { + TableName *TTableName `thrift:"tableName,1,required" db:"tableName" json:"tableName"` +} + +func NewTHBaseServiceIsTableEnabledArgs() *THBaseServiceIsTableEnabledArgs { + return &THBaseServiceIsTableEnabledArgs{} +} + +var THBaseServiceIsTableEnabledArgs_TableName_DEFAULT *TTableName +func (p *THBaseServiceIsTableEnabledArgs) GetTableName() *TTableName { + if !p.IsSetTableName() { + return THBaseServiceIsTableEnabledArgs_TableName_DEFAULT + } +return p.TableName +} +func (p *THBaseServiceIsTableEnabledArgs) IsSetTableName() bool { + return p.TableName != nil +} + +func (p *THBaseServiceIsTableEnabledArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTableName bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTableName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTableName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TableName is not set")); + } + return nil +} + +func (p *THBaseServiceIsTableEnabledArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.TableName = &TTableName{} + if err := p.TableName.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TableName), err) + } + return nil +} + +func (p *THBaseServiceIsTableEnabledArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "isTableEnabled_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceIsTableEnabledArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tableName", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tableName: ", p), err) } + if err := p.TableName.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TableName), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tableName: ", p), err) } + return err +} + +func (p *THBaseServiceIsTableEnabledArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceIsTableEnabledArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceIsTableEnabledResult struct { + Success *bool `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceIsTableEnabledResult() *THBaseServiceIsTableEnabledResult { + return &THBaseServiceIsTableEnabledResult{} +} + +var THBaseServiceIsTableEnabledResult_Success_DEFAULT bool +func (p *THBaseServiceIsTableEnabledResult) GetSuccess() bool { + if !p.IsSetSuccess() { + return THBaseServiceIsTableEnabledResult_Success_DEFAULT + } +return *p.Success +} +var THBaseServiceIsTableEnabledResult_Io_DEFAULT *TIOError +func (p *THBaseServiceIsTableEnabledResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceIsTableEnabledResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceIsTableEnabledResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceIsTableEnabledResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceIsTableEnabledResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceIsTableEnabledResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + p.Success = &v +} + return nil +} + +func (p *THBaseServiceIsTableEnabledResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceIsTableEnabledResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "isTableEnabled_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceIsTableEnabledResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.BOOL, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.Success)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceIsTableEnabledResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceIsTableEnabledResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceIsTableEnabledResult(%+v)", *p) +} + +// Attributes: +// - TableName: the tablename to check +type THBaseServiceIsTableDisabledArgs struct { + TableName *TTableName `thrift:"tableName,1,required" db:"tableName" json:"tableName"` +} + +func NewTHBaseServiceIsTableDisabledArgs() *THBaseServiceIsTableDisabledArgs { + return &THBaseServiceIsTableDisabledArgs{} +} + +var THBaseServiceIsTableDisabledArgs_TableName_DEFAULT *TTableName +func (p *THBaseServiceIsTableDisabledArgs) GetTableName() *TTableName { + if !p.IsSetTableName() { + return THBaseServiceIsTableDisabledArgs_TableName_DEFAULT + } +return p.TableName +} +func (p *THBaseServiceIsTableDisabledArgs) IsSetTableName() bool { + return p.TableName != nil +} + +func (p *THBaseServiceIsTableDisabledArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTableName bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTableName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTableName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TableName is not set")); + } + return nil +} + +func (p *THBaseServiceIsTableDisabledArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.TableName = &TTableName{} + if err := p.TableName.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TableName), err) + } + return nil +} + +func (p *THBaseServiceIsTableDisabledArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "isTableDisabled_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceIsTableDisabledArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tableName", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tableName: ", p), err) } + if err := p.TableName.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TableName), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tableName: ", p), err) } + return err +} + +func (p *THBaseServiceIsTableDisabledArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceIsTableDisabledArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceIsTableDisabledResult struct { + Success *bool `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceIsTableDisabledResult() *THBaseServiceIsTableDisabledResult { + return &THBaseServiceIsTableDisabledResult{} +} + +var THBaseServiceIsTableDisabledResult_Success_DEFAULT bool +func (p *THBaseServiceIsTableDisabledResult) GetSuccess() bool { + if !p.IsSetSuccess() { + return THBaseServiceIsTableDisabledResult_Success_DEFAULT + } +return *p.Success +} +var THBaseServiceIsTableDisabledResult_Io_DEFAULT *TIOError +func (p *THBaseServiceIsTableDisabledResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceIsTableDisabledResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceIsTableDisabledResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceIsTableDisabledResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceIsTableDisabledResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceIsTableDisabledResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + p.Success = &v +} + return nil +} + +func (p *THBaseServiceIsTableDisabledResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceIsTableDisabledResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "isTableDisabled_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceIsTableDisabledResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.BOOL, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.Success)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceIsTableDisabledResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceIsTableDisabledResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceIsTableDisabledResult(%+v)", *p) +} + +// Attributes: +// - TableName: the tablename to check +type THBaseServiceIsTableAvailableArgs struct { + TableName *TTableName `thrift:"tableName,1,required" db:"tableName" json:"tableName"` +} + +func NewTHBaseServiceIsTableAvailableArgs() *THBaseServiceIsTableAvailableArgs { + return &THBaseServiceIsTableAvailableArgs{} +} + +var THBaseServiceIsTableAvailableArgs_TableName_DEFAULT *TTableName +func (p *THBaseServiceIsTableAvailableArgs) GetTableName() *TTableName { + if !p.IsSetTableName() { + return THBaseServiceIsTableAvailableArgs_TableName_DEFAULT + } +return p.TableName +} +func (p *THBaseServiceIsTableAvailableArgs) IsSetTableName() bool { + return p.TableName != nil +} + +func (p *THBaseServiceIsTableAvailableArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTableName bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTableName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTableName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TableName is not set")); + } + return nil +} + +func (p *THBaseServiceIsTableAvailableArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.TableName = &TTableName{} + if err := p.TableName.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TableName), err) + } + return nil +} + +func (p *THBaseServiceIsTableAvailableArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "isTableAvailable_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceIsTableAvailableArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tableName", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tableName: ", p), err) } + if err := p.TableName.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TableName), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tableName: ", p), err) } + return err +} + +func (p *THBaseServiceIsTableAvailableArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceIsTableAvailableArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceIsTableAvailableResult struct { + Success *bool `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceIsTableAvailableResult() *THBaseServiceIsTableAvailableResult { + return &THBaseServiceIsTableAvailableResult{} +} + +var THBaseServiceIsTableAvailableResult_Success_DEFAULT bool +func (p *THBaseServiceIsTableAvailableResult) GetSuccess() bool { + if !p.IsSetSuccess() { + return THBaseServiceIsTableAvailableResult_Success_DEFAULT + } +return *p.Success +} +var THBaseServiceIsTableAvailableResult_Io_DEFAULT *TIOError +func (p *THBaseServiceIsTableAvailableResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceIsTableAvailableResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceIsTableAvailableResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceIsTableAvailableResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceIsTableAvailableResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceIsTableAvailableResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + p.Success = &v +} + return nil +} + +func (p *THBaseServiceIsTableAvailableResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceIsTableAvailableResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "isTableAvailable_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceIsTableAvailableResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.BOOL, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.Success)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceIsTableAvailableResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceIsTableAvailableResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceIsTableAvailableResult(%+v)", *p) +} + +// Attributes: +// - TableName: the tablename to check +// - SplitKeys: keys to check if the table has been created with all split keys +type THBaseServiceIsTableAvailableWithSplitArgs struct { + TableName *TTableName `thrift:"tableName,1,required" db:"tableName" json:"tableName"` + SplitKeys [][]byte `thrift:"splitKeys,2" db:"splitKeys" json:"splitKeys"` +} + +func NewTHBaseServiceIsTableAvailableWithSplitArgs() *THBaseServiceIsTableAvailableWithSplitArgs { + return &THBaseServiceIsTableAvailableWithSplitArgs{} +} + +var THBaseServiceIsTableAvailableWithSplitArgs_TableName_DEFAULT *TTableName +func (p *THBaseServiceIsTableAvailableWithSplitArgs) GetTableName() *TTableName { + if !p.IsSetTableName() { + return THBaseServiceIsTableAvailableWithSplitArgs_TableName_DEFAULT + } +return p.TableName +} + +func (p *THBaseServiceIsTableAvailableWithSplitArgs) GetSplitKeys() [][]byte { + return p.SplitKeys +} +func (p *THBaseServiceIsTableAvailableWithSplitArgs) IsSetTableName() bool { + return p.TableName != nil +} + +func (p *THBaseServiceIsTableAvailableWithSplitArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTableName bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTableName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.LIST { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTableName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TableName is not set")); + } + return nil +} + +func (p *THBaseServiceIsTableAvailableWithSplitArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.TableName = &TTableName{} + if err := p.TableName.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TableName), err) + } + return nil +} + +func (p *THBaseServiceIsTableAvailableWithSplitArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([][]byte, 0, size) + p.SplitKeys = tSlice + for i := 0; i < size; i ++ { +var _elem328 []byte + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem328 = v +} + p.SplitKeys = append(p.SplitKeys, _elem328) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *THBaseServiceIsTableAvailableWithSplitArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "isTableAvailableWithSplit_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceIsTableAvailableWithSplitArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tableName", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tableName: ", p), err) } + if err := p.TableName.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TableName), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tableName: ", p), err) } + return err +} + +func (p *THBaseServiceIsTableAvailableWithSplitArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "splitKeys", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:splitKeys: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.SplitKeys)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.SplitKeys { + if err := oprot.WriteBinary(ctx, v); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:splitKeys: ", p), err) } + return err +} + +func (p *THBaseServiceIsTableAvailableWithSplitArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceIsTableAvailableWithSplitArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceIsTableAvailableWithSplitResult struct { + Success *bool `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceIsTableAvailableWithSplitResult() *THBaseServiceIsTableAvailableWithSplitResult { + return &THBaseServiceIsTableAvailableWithSplitResult{} +} + +var THBaseServiceIsTableAvailableWithSplitResult_Success_DEFAULT bool +func (p *THBaseServiceIsTableAvailableWithSplitResult) GetSuccess() bool { + if !p.IsSetSuccess() { + return THBaseServiceIsTableAvailableWithSplitResult_Success_DEFAULT + } +return *p.Success +} +var THBaseServiceIsTableAvailableWithSplitResult_Io_DEFAULT *TIOError +func (p *THBaseServiceIsTableAvailableWithSplitResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceIsTableAvailableWithSplitResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceIsTableAvailableWithSplitResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceIsTableAvailableWithSplitResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceIsTableAvailableWithSplitResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.BOOL { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceIsTableAvailableWithSplitResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + p.Success = &v +} + return nil +} + +func (p *THBaseServiceIsTableAvailableWithSplitResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceIsTableAvailableWithSplitResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "isTableAvailableWithSplit_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceIsTableAvailableWithSplitResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.BOOL, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteBool(ctx, bool(*p.Success)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceIsTableAvailableWithSplitResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceIsTableAvailableWithSplitResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceIsTableAvailableWithSplitResult(%+v)", *p) +} + +// Attributes: +// - TableName: the tablename to add column family to +// - Column: column family descriptor of column family to be added +type THBaseServiceAddColumnFamilyArgs struct { + TableName *TTableName `thrift:"tableName,1,required" db:"tableName" json:"tableName"` + Column *TColumnFamilyDescriptor `thrift:"column,2,required" db:"column" json:"column"` +} + +func NewTHBaseServiceAddColumnFamilyArgs() *THBaseServiceAddColumnFamilyArgs { + return &THBaseServiceAddColumnFamilyArgs{} +} + +var THBaseServiceAddColumnFamilyArgs_TableName_DEFAULT *TTableName +func (p *THBaseServiceAddColumnFamilyArgs) GetTableName() *TTableName { + if !p.IsSetTableName() { + return THBaseServiceAddColumnFamilyArgs_TableName_DEFAULT + } +return p.TableName +} +var THBaseServiceAddColumnFamilyArgs_Column_DEFAULT *TColumnFamilyDescriptor +func (p *THBaseServiceAddColumnFamilyArgs) GetColumn() *TColumnFamilyDescriptor { + if !p.IsSetColumn() { + return THBaseServiceAddColumnFamilyArgs_Column_DEFAULT + } +return p.Column +} +func (p *THBaseServiceAddColumnFamilyArgs) IsSetTableName() bool { + return p.TableName != nil +} + +func (p *THBaseServiceAddColumnFamilyArgs) IsSetColumn() bool { + return p.Column != nil +} + +func (p *THBaseServiceAddColumnFamilyArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTableName bool = false; + var issetColumn bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTableName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetColumn = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTableName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TableName is not set")); + } + if !issetColumn{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Column is not set")); + } + return nil +} + +func (p *THBaseServiceAddColumnFamilyArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.TableName = &TTableName{} + if err := p.TableName.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TableName), err) + } + return nil +} + +func (p *THBaseServiceAddColumnFamilyArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Column = &TColumnFamilyDescriptor{} + if err := p.Column.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Column), err) + } + return nil +} + +func (p *THBaseServiceAddColumnFamilyArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "addColumnFamily_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceAddColumnFamilyArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tableName", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tableName: ", p), err) } + if err := p.TableName.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TableName), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tableName: ", p), err) } + return err +} + +func (p *THBaseServiceAddColumnFamilyArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "column", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:column: ", p), err) } + if err := p.Column.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Column), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:column: ", p), err) } + return err +} + +func (p *THBaseServiceAddColumnFamilyArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceAddColumnFamilyArgs(%+v)", *p) +} + +// Attributes: +// - Io +type THBaseServiceAddColumnFamilyResult struct { + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceAddColumnFamilyResult() *THBaseServiceAddColumnFamilyResult { + return &THBaseServiceAddColumnFamilyResult{} +} + +var THBaseServiceAddColumnFamilyResult_Io_DEFAULT *TIOError +func (p *THBaseServiceAddColumnFamilyResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceAddColumnFamilyResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceAddColumnFamilyResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceAddColumnFamilyResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceAddColumnFamilyResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceAddColumnFamilyResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "addColumnFamily_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceAddColumnFamilyResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceAddColumnFamilyResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceAddColumnFamilyResult(%+v)", *p) +} + +// Attributes: +// - TableName: the tablename to delete column family from +// - Column: name of column family to be deleted +type THBaseServiceDeleteColumnFamilyArgs struct { + TableName *TTableName `thrift:"tableName,1,required" db:"tableName" json:"tableName"` + Column []byte `thrift:"column,2,required" db:"column" json:"column"` +} + +func NewTHBaseServiceDeleteColumnFamilyArgs() *THBaseServiceDeleteColumnFamilyArgs { + return &THBaseServiceDeleteColumnFamilyArgs{} +} + +var THBaseServiceDeleteColumnFamilyArgs_TableName_DEFAULT *TTableName +func (p *THBaseServiceDeleteColumnFamilyArgs) GetTableName() *TTableName { + if !p.IsSetTableName() { + return THBaseServiceDeleteColumnFamilyArgs_TableName_DEFAULT + } +return p.TableName +} + +func (p *THBaseServiceDeleteColumnFamilyArgs) GetColumn() []byte { + return p.Column +} +func (p *THBaseServiceDeleteColumnFamilyArgs) IsSetTableName() bool { + return p.TableName != nil +} + +func (p *THBaseServiceDeleteColumnFamilyArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTableName bool = false; + var issetColumn bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTableName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetColumn = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTableName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TableName is not set")); + } + if !issetColumn{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Column is not set")); + } + return nil +} + +func (p *THBaseServiceDeleteColumnFamilyArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.TableName = &TTableName{} + if err := p.TableName.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TableName), err) + } + return nil +} + +func (p *THBaseServiceDeleteColumnFamilyArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Column = v +} + return nil +} + +func (p *THBaseServiceDeleteColumnFamilyArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "deleteColumnFamily_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceDeleteColumnFamilyArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tableName", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tableName: ", p), err) } + if err := p.TableName.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TableName), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tableName: ", p), err) } + return err +} + +func (p *THBaseServiceDeleteColumnFamilyArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "column", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:column: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Column); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.column (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:column: ", p), err) } + return err +} + +func (p *THBaseServiceDeleteColumnFamilyArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceDeleteColumnFamilyArgs(%+v)", *p) +} + +// Attributes: +// - Io +type THBaseServiceDeleteColumnFamilyResult struct { + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceDeleteColumnFamilyResult() *THBaseServiceDeleteColumnFamilyResult { + return &THBaseServiceDeleteColumnFamilyResult{} +} + +var THBaseServiceDeleteColumnFamilyResult_Io_DEFAULT *TIOError +func (p *THBaseServiceDeleteColumnFamilyResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceDeleteColumnFamilyResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceDeleteColumnFamilyResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceDeleteColumnFamilyResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceDeleteColumnFamilyResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceDeleteColumnFamilyResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "deleteColumnFamily_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceDeleteColumnFamilyResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceDeleteColumnFamilyResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceDeleteColumnFamilyResult(%+v)", *p) +} + +// Attributes: +// - TableName: the tablename to modify column family +// - Column: column family descriptor of column family to be modified +type THBaseServiceModifyColumnFamilyArgs struct { + TableName *TTableName `thrift:"tableName,1,required" db:"tableName" json:"tableName"` + Column *TColumnFamilyDescriptor `thrift:"column,2,required" db:"column" json:"column"` +} + +func NewTHBaseServiceModifyColumnFamilyArgs() *THBaseServiceModifyColumnFamilyArgs { + return &THBaseServiceModifyColumnFamilyArgs{} +} + +var THBaseServiceModifyColumnFamilyArgs_TableName_DEFAULT *TTableName +func (p *THBaseServiceModifyColumnFamilyArgs) GetTableName() *TTableName { + if !p.IsSetTableName() { + return THBaseServiceModifyColumnFamilyArgs_TableName_DEFAULT + } +return p.TableName +} +var THBaseServiceModifyColumnFamilyArgs_Column_DEFAULT *TColumnFamilyDescriptor +func (p *THBaseServiceModifyColumnFamilyArgs) GetColumn() *TColumnFamilyDescriptor { + if !p.IsSetColumn() { + return THBaseServiceModifyColumnFamilyArgs_Column_DEFAULT + } +return p.Column +} +func (p *THBaseServiceModifyColumnFamilyArgs) IsSetTableName() bool { + return p.TableName != nil +} + +func (p *THBaseServiceModifyColumnFamilyArgs) IsSetColumn() bool { + return p.Column != nil +} + +func (p *THBaseServiceModifyColumnFamilyArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetTableName bool = false; + var issetColumn bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetTableName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetColumn = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetTableName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TableName is not set")); + } + if !issetColumn{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Column is not set")); + } + return nil +} + +func (p *THBaseServiceModifyColumnFamilyArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.TableName = &TTableName{} + if err := p.TableName.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TableName), err) + } + return nil +} + +func (p *THBaseServiceModifyColumnFamilyArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Column = &TColumnFamilyDescriptor{} + if err := p.Column.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Column), err) + } + return nil +} + +func (p *THBaseServiceModifyColumnFamilyArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "modifyColumnFamily_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceModifyColumnFamilyArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tableName", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tableName: ", p), err) } + if err := p.TableName.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TableName), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tableName: ", p), err) } + return err +} + +func (p *THBaseServiceModifyColumnFamilyArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "column", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:column: ", p), err) } + if err := p.Column.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Column), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:column: ", p), err) } + return err +} + +func (p *THBaseServiceModifyColumnFamilyArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceModifyColumnFamilyArgs(%+v)", *p) +} + +// Attributes: +// - Io +type THBaseServiceModifyColumnFamilyResult struct { + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceModifyColumnFamilyResult() *THBaseServiceModifyColumnFamilyResult { + return &THBaseServiceModifyColumnFamilyResult{} +} + +var THBaseServiceModifyColumnFamilyResult_Io_DEFAULT *TIOError +func (p *THBaseServiceModifyColumnFamilyResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceModifyColumnFamilyResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceModifyColumnFamilyResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceModifyColumnFamilyResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceModifyColumnFamilyResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceModifyColumnFamilyResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "modifyColumnFamily_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceModifyColumnFamilyResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceModifyColumnFamilyResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceModifyColumnFamilyResult(%+v)", *p) +} + +// Attributes: +// - Desc: the descriptor of the table to modify +type THBaseServiceModifyTableArgs struct { + Desc *TTableDescriptor `thrift:"desc,1,required" db:"desc" json:"desc"` +} + +func NewTHBaseServiceModifyTableArgs() *THBaseServiceModifyTableArgs { + return &THBaseServiceModifyTableArgs{} +} + +var THBaseServiceModifyTableArgs_Desc_DEFAULT *TTableDescriptor +func (p *THBaseServiceModifyTableArgs) GetDesc() *TTableDescriptor { + if !p.IsSetDesc() { + return THBaseServiceModifyTableArgs_Desc_DEFAULT + } +return p.Desc +} +func (p *THBaseServiceModifyTableArgs) IsSetDesc() bool { + return p.Desc != nil +} + +func (p *THBaseServiceModifyTableArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetDesc bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetDesc = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetDesc{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Desc is not set")); + } + return nil +} + +func (p *THBaseServiceModifyTableArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Desc = &TTableDescriptor{} + if err := p.Desc.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Desc), err) + } + return nil +} + +func (p *THBaseServiceModifyTableArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "modifyTable_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceModifyTableArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "desc", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:desc: ", p), err) } + if err := p.Desc.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Desc), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:desc: ", p), err) } + return err +} + +func (p *THBaseServiceModifyTableArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceModifyTableArgs(%+v)", *p) +} + +// Attributes: +// - Io +type THBaseServiceModifyTableResult struct { + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceModifyTableResult() *THBaseServiceModifyTableResult { + return &THBaseServiceModifyTableResult{} +} + +var THBaseServiceModifyTableResult_Io_DEFAULT *TIOError +func (p *THBaseServiceModifyTableResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceModifyTableResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceModifyTableResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceModifyTableResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceModifyTableResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceModifyTableResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "modifyTable_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceModifyTableResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceModifyTableResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceModifyTableResult(%+v)", *p) +} + +// Attributes: +// - NamespaceDesc: descriptor which describes the new namespace +type THBaseServiceCreateNamespaceArgs struct { + NamespaceDesc *TNamespaceDescriptor `thrift:"namespaceDesc,1,required" db:"namespaceDesc" json:"namespaceDesc"` +} + +func NewTHBaseServiceCreateNamespaceArgs() *THBaseServiceCreateNamespaceArgs { + return &THBaseServiceCreateNamespaceArgs{} +} + +var THBaseServiceCreateNamespaceArgs_NamespaceDesc_DEFAULT *TNamespaceDescriptor +func (p *THBaseServiceCreateNamespaceArgs) GetNamespaceDesc() *TNamespaceDescriptor { + if !p.IsSetNamespaceDesc() { + return THBaseServiceCreateNamespaceArgs_NamespaceDesc_DEFAULT + } +return p.NamespaceDesc +} +func (p *THBaseServiceCreateNamespaceArgs) IsSetNamespaceDesc() bool { + return p.NamespaceDesc != nil +} + +func (p *THBaseServiceCreateNamespaceArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetNamespaceDesc bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetNamespaceDesc = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetNamespaceDesc{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field NamespaceDesc is not set")); + } + return nil +} + +func (p *THBaseServiceCreateNamespaceArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.NamespaceDesc = &TNamespaceDescriptor{} + if err := p.NamespaceDesc.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.NamespaceDesc), err) + } + return nil +} + +func (p *THBaseServiceCreateNamespaceArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "createNamespace_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceCreateNamespaceArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "namespaceDesc", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:namespaceDesc: ", p), err) } + if err := p.NamespaceDesc.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.NamespaceDesc), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:namespaceDesc: ", p), err) } + return err +} + +func (p *THBaseServiceCreateNamespaceArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceCreateNamespaceArgs(%+v)", *p) +} + +// Attributes: +// - Io +type THBaseServiceCreateNamespaceResult struct { + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceCreateNamespaceResult() *THBaseServiceCreateNamespaceResult { + return &THBaseServiceCreateNamespaceResult{} +} + +var THBaseServiceCreateNamespaceResult_Io_DEFAULT *TIOError +func (p *THBaseServiceCreateNamespaceResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceCreateNamespaceResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceCreateNamespaceResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceCreateNamespaceResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceCreateNamespaceResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceCreateNamespaceResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "createNamespace_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceCreateNamespaceResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceCreateNamespaceResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceCreateNamespaceResult(%+v)", *p) +} + +// Attributes: +// - NamespaceDesc: descriptor which describes the new namespace +type THBaseServiceModifyNamespaceArgs struct { + NamespaceDesc *TNamespaceDescriptor `thrift:"namespaceDesc,1,required" db:"namespaceDesc" json:"namespaceDesc"` +} + +func NewTHBaseServiceModifyNamespaceArgs() *THBaseServiceModifyNamespaceArgs { + return &THBaseServiceModifyNamespaceArgs{} +} + +var THBaseServiceModifyNamespaceArgs_NamespaceDesc_DEFAULT *TNamespaceDescriptor +func (p *THBaseServiceModifyNamespaceArgs) GetNamespaceDesc() *TNamespaceDescriptor { + if !p.IsSetNamespaceDesc() { + return THBaseServiceModifyNamespaceArgs_NamespaceDesc_DEFAULT + } +return p.NamespaceDesc +} +func (p *THBaseServiceModifyNamespaceArgs) IsSetNamespaceDesc() bool { + return p.NamespaceDesc != nil +} + +func (p *THBaseServiceModifyNamespaceArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetNamespaceDesc bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetNamespaceDesc = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetNamespaceDesc{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field NamespaceDesc is not set")); + } + return nil +} + +func (p *THBaseServiceModifyNamespaceArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.NamespaceDesc = &TNamespaceDescriptor{} + if err := p.NamespaceDesc.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.NamespaceDesc), err) + } + return nil +} + +func (p *THBaseServiceModifyNamespaceArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "modifyNamespace_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceModifyNamespaceArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "namespaceDesc", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:namespaceDesc: ", p), err) } + if err := p.NamespaceDesc.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.NamespaceDesc), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:namespaceDesc: ", p), err) } + return err +} + +func (p *THBaseServiceModifyNamespaceArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceModifyNamespaceArgs(%+v)", *p) +} + +// Attributes: +// - Io +type THBaseServiceModifyNamespaceResult struct { + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceModifyNamespaceResult() *THBaseServiceModifyNamespaceResult { + return &THBaseServiceModifyNamespaceResult{} +} + +var THBaseServiceModifyNamespaceResult_Io_DEFAULT *TIOError +func (p *THBaseServiceModifyNamespaceResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceModifyNamespaceResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceModifyNamespaceResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceModifyNamespaceResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceModifyNamespaceResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceModifyNamespaceResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "modifyNamespace_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceModifyNamespaceResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceModifyNamespaceResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceModifyNamespaceResult(%+v)", *p) +} + +// Attributes: +// - Name: namespace name +type THBaseServiceDeleteNamespaceArgs struct { + Name string `thrift:"name,1,required" db:"name" json:"name"` +} + +func NewTHBaseServiceDeleteNamespaceArgs() *THBaseServiceDeleteNamespaceArgs { + return &THBaseServiceDeleteNamespaceArgs{} +} + + +func (p *THBaseServiceDeleteNamespaceArgs) GetName() string { + return p.Name +} +func (p *THBaseServiceDeleteNamespaceArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetName bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set")); + } + return nil +} + +func (p *THBaseServiceDeleteNamespaceArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Name = v +} + return nil +} + +func (p *THBaseServiceDeleteNamespaceArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "deleteNamespace_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceDeleteNamespaceArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Name)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.name (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } + return err +} + +func (p *THBaseServiceDeleteNamespaceArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceDeleteNamespaceArgs(%+v)", *p) +} + +// Attributes: +// - Io +type THBaseServiceDeleteNamespaceResult struct { + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceDeleteNamespaceResult() *THBaseServiceDeleteNamespaceResult { + return &THBaseServiceDeleteNamespaceResult{} +} + +var THBaseServiceDeleteNamespaceResult_Io_DEFAULT *TIOError +func (p *THBaseServiceDeleteNamespaceResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceDeleteNamespaceResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceDeleteNamespaceResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceDeleteNamespaceResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceDeleteNamespaceResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceDeleteNamespaceResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "deleteNamespace_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceDeleteNamespaceResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceDeleteNamespaceResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceDeleteNamespaceResult(%+v)", *p) +} + +// Attributes: +// - Name: name of namespace descriptor +type THBaseServiceGetNamespaceDescriptorArgs struct { + Name string `thrift:"name,1,required" db:"name" json:"name"` +} + +func NewTHBaseServiceGetNamespaceDescriptorArgs() *THBaseServiceGetNamespaceDescriptorArgs { + return &THBaseServiceGetNamespaceDescriptorArgs{} +} + + +func (p *THBaseServiceGetNamespaceDescriptorArgs) GetName() string { + return p.Name +} +func (p *THBaseServiceGetNamespaceDescriptorArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetName bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set")); + } + return nil +} + +func (p *THBaseServiceGetNamespaceDescriptorArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Name = v +} + return nil +} + +func (p *THBaseServiceGetNamespaceDescriptorArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getNamespaceDescriptor_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetNamespaceDescriptorArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Name)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.name (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } + return err +} + +func (p *THBaseServiceGetNamespaceDescriptorArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetNamespaceDescriptorArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceGetNamespaceDescriptorResult struct { + Success *TNamespaceDescriptor `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceGetNamespaceDescriptorResult() *THBaseServiceGetNamespaceDescriptorResult { + return &THBaseServiceGetNamespaceDescriptorResult{} +} + +var THBaseServiceGetNamespaceDescriptorResult_Success_DEFAULT *TNamespaceDescriptor +func (p *THBaseServiceGetNamespaceDescriptorResult) GetSuccess() *TNamespaceDescriptor { + if !p.IsSetSuccess() { + return THBaseServiceGetNamespaceDescriptorResult_Success_DEFAULT + } +return p.Success +} +var THBaseServiceGetNamespaceDescriptorResult_Io_DEFAULT *TIOError +func (p *THBaseServiceGetNamespaceDescriptorResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceGetNamespaceDescriptorResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceGetNamespaceDescriptorResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceGetNamespaceDescriptorResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceGetNamespaceDescriptorResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceGetNamespaceDescriptorResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TNamespaceDescriptor{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } + return nil +} + +func (p *THBaseServiceGetNamespaceDescriptorResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceGetNamespaceDescriptorResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getNamespaceDescriptor_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetNamespaceDescriptorResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetNamespaceDescriptorResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetNamespaceDescriptorResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetNamespaceDescriptorResult(%+v)", *p) +} + +type THBaseServiceListNamespaceDescriptorsArgs struct { +} + +func NewTHBaseServiceListNamespaceDescriptorsArgs() *THBaseServiceListNamespaceDescriptorsArgs { + return &THBaseServiceListNamespaceDescriptorsArgs{} +} + +func (p *THBaseServiceListNamespaceDescriptorsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceListNamespaceDescriptorsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "listNamespaceDescriptors_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceListNamespaceDescriptorsArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceListNamespaceDescriptorsArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceListNamespaceDescriptorsResult struct { + Success []*TNamespaceDescriptor `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceListNamespaceDescriptorsResult() *THBaseServiceListNamespaceDescriptorsResult { + return &THBaseServiceListNamespaceDescriptorsResult{} +} + +var THBaseServiceListNamespaceDescriptorsResult_Success_DEFAULT []*TNamespaceDescriptor + +func (p *THBaseServiceListNamespaceDescriptorsResult) GetSuccess() []*TNamespaceDescriptor { + return p.Success +} +var THBaseServiceListNamespaceDescriptorsResult_Io_DEFAULT *TIOError +func (p *THBaseServiceListNamespaceDescriptorsResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceListNamespaceDescriptorsResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceListNamespaceDescriptorsResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceListNamespaceDescriptorsResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceListNamespaceDescriptorsResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.LIST { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceListNamespaceDescriptorsResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TNamespaceDescriptor, 0, size) + p.Success = tSlice + for i := 0; i < size; i ++ { + _elem329 := &TNamespaceDescriptor{} + if err := _elem329.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem329), err) + } + p.Success = append(p.Success, _elem329) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *THBaseServiceListNamespaceDescriptorsResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceListNamespaceDescriptorsResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "listNamespaceDescriptors_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceListNamespaceDescriptorsResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.LIST, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Success)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Success { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceListNamespaceDescriptorsResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceListNamespaceDescriptorsResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceListNamespaceDescriptorsResult(%+v)", *p) +} + +type THBaseServiceListNamespacesArgs struct { +} + +func NewTHBaseServiceListNamespacesArgs() *THBaseServiceListNamespacesArgs { + return &THBaseServiceListNamespacesArgs{} +} + +func (p *THBaseServiceListNamespacesArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceListNamespacesArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "listNamespaces_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceListNamespacesArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceListNamespacesArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceListNamespacesResult struct { + Success []string `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceListNamespacesResult() *THBaseServiceListNamespacesResult { + return &THBaseServiceListNamespacesResult{} +} + +var THBaseServiceListNamespacesResult_Success_DEFAULT []string + +func (p *THBaseServiceListNamespacesResult) GetSuccess() []string { + return p.Success +} +var THBaseServiceListNamespacesResult_Io_DEFAULT *TIOError +func (p *THBaseServiceListNamespacesResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceListNamespacesResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceListNamespacesResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceListNamespacesResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceListNamespacesResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.LIST { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceListNamespacesResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]string, 0, size) + p.Success = tSlice + for i := 0; i < size; i ++ { +var _elem330 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem330 = v +} + p.Success = append(p.Success, _elem330) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *THBaseServiceListNamespacesResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceListNamespacesResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "listNamespaces_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceListNamespacesResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.LIST, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Success)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Success { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceListNamespacesResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceListNamespacesResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceListNamespacesResult(%+v)", *p) +} + +type THBaseServiceGetThriftServerTypeArgs struct { +} + +func NewTHBaseServiceGetThriftServerTypeArgs() *THBaseServiceGetThriftServerTypeArgs { + return &THBaseServiceGetThriftServerTypeArgs{} +} + +func (p *THBaseServiceGetThriftServerTypeArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceGetThriftServerTypeArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getThriftServerType_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetThriftServerTypeArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetThriftServerTypeArgs(%+v)", *p) +} + +// Attributes: +// - Success +type THBaseServiceGetThriftServerTypeResult struct { + Success *TThriftServerType `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewTHBaseServiceGetThriftServerTypeResult() *THBaseServiceGetThriftServerTypeResult { + return &THBaseServiceGetThriftServerTypeResult{} +} + +var THBaseServiceGetThriftServerTypeResult_Success_DEFAULT TThriftServerType +func (p *THBaseServiceGetThriftServerTypeResult) GetSuccess() TThriftServerType { + if !p.IsSetSuccess() { + return THBaseServiceGetThriftServerTypeResult_Success_DEFAULT + } +return *p.Success +} +func (p *THBaseServiceGetThriftServerTypeResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceGetThriftServerTypeResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.I32 { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceGetThriftServerTypeResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + temp := TThriftServerType(v) + p.Success = &temp +} + return nil +} + +func (p *THBaseServiceGetThriftServerTypeResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getThriftServerType_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetThriftServerTypeResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.I32, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.Success)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetThriftServerTypeResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetThriftServerTypeResult(%+v)", *p) +} + +// Attributes: +// - ServerNames: @param serverNames Server names to get slowlog responses from +// - LogQueryFilter: @param logQueryFilter filter to be used if provided +type THBaseServiceGetSlowLogResponsesArgs struct { + ServerNames []*TServerName `thrift:"serverNames,1" db:"serverNames" json:"serverNames"` + LogQueryFilter *TLogQueryFilter `thrift:"logQueryFilter,2" db:"logQueryFilter" json:"logQueryFilter"` +} + +func NewTHBaseServiceGetSlowLogResponsesArgs() *THBaseServiceGetSlowLogResponsesArgs { + return &THBaseServiceGetSlowLogResponsesArgs{} +} + + +func (p *THBaseServiceGetSlowLogResponsesArgs) GetServerNames() []*TServerName { + return p.ServerNames +} +var THBaseServiceGetSlowLogResponsesArgs_LogQueryFilter_DEFAULT *TLogQueryFilter +func (p *THBaseServiceGetSlowLogResponsesArgs) GetLogQueryFilter() *TLogQueryFilter { + if !p.IsSetLogQueryFilter() { + return THBaseServiceGetSlowLogResponsesArgs_LogQueryFilter_DEFAULT + } +return p.LogQueryFilter +} +func (p *THBaseServiceGetSlowLogResponsesArgs) IsSetLogQueryFilter() bool { + return p.LogQueryFilter != nil +} + +func (p *THBaseServiceGetSlowLogResponsesArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.SET { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceGetSlowLogResponsesArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) + if err != nil { + return thrift.PrependError("error reading set begin: ", err) + } + tSet := make([]*TServerName, 0, size) + p.ServerNames = tSet + for i := 0; i < size; i ++ { + _elem331 := &TServerName{} + if err := _elem331.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem331), err) + } + p.ServerNames = append(p.ServerNames, _elem331) + } + if err := iprot.ReadSetEnd(ctx); err != nil { + return thrift.PrependError("error reading set end: ", err) + } + return nil +} + +func (p *THBaseServiceGetSlowLogResponsesArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.LogQueryFilter = &TLogQueryFilter{ + Limit: 10, + + LogType: 1, + + FilterByOperator: 1, +} + if err := p.LogQueryFilter.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.LogQueryFilter), err) + } + return nil +} + +func (p *THBaseServiceGetSlowLogResponsesArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getSlowLogResponses_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetSlowLogResponsesArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "serverNames", thrift.SET, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:serverNames: ", p), err) } + if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.ServerNames)); err != nil { + return thrift.PrependError("error writing set begin: ", err) + } + for i := 0; i" + } + return fmt.Sprintf("THBaseServiceGetSlowLogResponsesArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceGetSlowLogResponsesResult struct { + Success []*TOnlineLogRecord `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceGetSlowLogResponsesResult() *THBaseServiceGetSlowLogResponsesResult { + return &THBaseServiceGetSlowLogResponsesResult{} +} + +var THBaseServiceGetSlowLogResponsesResult_Success_DEFAULT []*TOnlineLogRecord + +func (p *THBaseServiceGetSlowLogResponsesResult) GetSuccess() []*TOnlineLogRecord { + return p.Success +} +var THBaseServiceGetSlowLogResponsesResult_Io_DEFAULT *TIOError +func (p *THBaseServiceGetSlowLogResponsesResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceGetSlowLogResponsesResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceGetSlowLogResponsesResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceGetSlowLogResponsesResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceGetSlowLogResponsesResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.LIST { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceGetSlowLogResponsesResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TOnlineLogRecord, 0, size) + p.Success = tSlice + for i := 0; i < size; i ++ { + _elem332 := &TOnlineLogRecord{} + if err := _elem332.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem332), err) + } + p.Success = append(p.Success, _elem332) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *THBaseServiceGetSlowLogResponsesResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceGetSlowLogResponsesResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getSlowLogResponses_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetSlowLogResponsesResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.LIST, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.Success)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Success { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetSlowLogResponsesResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetSlowLogResponsesResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetSlowLogResponsesResult(%+v)", *p) +} + +// Attributes: +// - ServerNames: @param serverNames Set of Server names to clean slowlog responses from +type THBaseServiceClearSlowLogResponsesArgs struct { + ServerNames []*TServerName `thrift:"serverNames,1" db:"serverNames" json:"serverNames"` +} + +func NewTHBaseServiceClearSlowLogResponsesArgs() *THBaseServiceClearSlowLogResponsesArgs { + return &THBaseServiceClearSlowLogResponsesArgs{} +} + + +func (p *THBaseServiceClearSlowLogResponsesArgs) GetServerNames() []*TServerName { + return p.ServerNames +} +func (p *THBaseServiceClearSlowLogResponsesArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.SET { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceClearSlowLogResponsesArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadSetBegin(ctx) + if err != nil { + return thrift.PrependError("error reading set begin: ", err) + } + tSet := make([]*TServerName, 0, size) + p.ServerNames = tSet + for i := 0; i < size; i ++ { + _elem333 := &TServerName{} + if err := _elem333.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem333), err) + } + p.ServerNames = append(p.ServerNames, _elem333) + } + if err := iprot.ReadSetEnd(ctx); err != nil { + return thrift.PrependError("error reading set end: ", err) + } + return nil +} + +func (p *THBaseServiceClearSlowLogResponsesArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "clearSlowLogResponses_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceClearSlowLogResponsesArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "serverNames", thrift.SET, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:serverNames: ", p), err) } + if err := oprot.WriteSetBegin(ctx, thrift.STRUCT, len(p.ServerNames)); err != nil { + return thrift.PrependError("error writing set begin: ", err) + } + for i := 0; i" + } + return fmt.Sprintf("THBaseServiceClearSlowLogResponsesArgs(%+v)", *p) +} + +// Attributes: +// - Success +// - Io +type THBaseServiceClearSlowLogResponsesResult struct { + Success []bool `thrift:"success,0" db:"success" json:"success,omitempty"` + Io *TIOError `thrift:"io,1" db:"io" json:"io,omitempty"` +} + +func NewTHBaseServiceClearSlowLogResponsesResult() *THBaseServiceClearSlowLogResponsesResult { + return &THBaseServiceClearSlowLogResponsesResult{} +} + +var THBaseServiceClearSlowLogResponsesResult_Success_DEFAULT []bool + +func (p *THBaseServiceClearSlowLogResponsesResult) GetSuccess() []bool { + return p.Success +} +var THBaseServiceClearSlowLogResponsesResult_Io_DEFAULT *TIOError +func (p *THBaseServiceClearSlowLogResponsesResult) GetIo() *TIOError { + if !p.IsSetIo() { + return THBaseServiceClearSlowLogResponsesResult_Io_DEFAULT + } +return p.Io +} +func (p *THBaseServiceClearSlowLogResponsesResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceClearSlowLogResponsesResult) IsSetIo() bool { + return p.Io != nil +} + +func (p *THBaseServiceClearSlowLogResponsesResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.LIST { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceClearSlowLogResponsesResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]bool, 0, size) + p.Success = tSlice + for i := 0; i < size; i ++ { +var _elem334 bool + if v, err := iprot.ReadBool(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem334 = v +} + p.Success = append(p.Success, _elem334) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *THBaseServiceClearSlowLogResponsesResult) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Io = &TIOError{} + if err := p.Io.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) + } + return nil +} + +func (p *THBaseServiceClearSlowLogResponsesResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "clearSlowLogResponses_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceClearSlowLogResponsesResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.LIST, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.BOOL, len(p.Success)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Success { + if err := oprot.WriteBool(ctx, bool(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceClearSlowLogResponsesResult) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetIo() { + if err := oprot.WriteFieldBegin(ctx, "io", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) } + if err := p.Io.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) } + } + return err +} + +func (p *THBaseServiceClearSlowLogResponsesResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceClearSlowLogResponsesResult(%+v)", *p) +} + +type THBaseServiceGetClusterIdArgs struct { +} + +func NewTHBaseServiceGetClusterIdArgs() *THBaseServiceGetClusterIdArgs { + return &THBaseServiceGetClusterIdArgs{} +} + +func (p *THBaseServiceGetClusterIdArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceGetClusterIdArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getClusterId_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetClusterIdArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetClusterIdArgs(%+v)", *p) +} + +// Attributes: +// - Success +type THBaseServiceGetClusterIdResult struct { + Success *string `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewTHBaseServiceGetClusterIdResult() *THBaseServiceGetClusterIdResult { + return &THBaseServiceGetClusterIdResult{} +} + +var THBaseServiceGetClusterIdResult_Success_DEFAULT string +func (p *THBaseServiceGetClusterIdResult) GetSuccess() string { + if !p.IsSetSuccess() { + return THBaseServiceGetClusterIdResult_Success_DEFAULT + } +return *p.Success +} +func (p *THBaseServiceGetClusterIdResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *THBaseServiceGetClusterIdResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRING { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *THBaseServiceGetClusterIdResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + p.Success = &v +} + return nil +} + +func (p *THBaseServiceGetClusterIdResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "getClusterId_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *THBaseServiceGetClusterIdResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRING, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Success)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *THBaseServiceGetClusterIdResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("THBaseServiceGetClusterIdResult(%+v)", *p) +} + + diff --git a/tim.hbase/hbaseClient.go b/hbase/hbaseClient.go similarity index 89% rename from tim.hbase/hbaseClient.go rename to hbase/hbaseClient.go index 686a659..1b2fb7c 100644 --- a/tim.hbase/hbaseClient.go +++ b/hbase/hbaseClient.go @@ -11,15 +11,17 @@ import ( "sync/atomic" "time" - "git.apache.org/thrift.git/lib/go/thrift" + . "tim/common" + "tim/utils" + + "github.com/apache/thrift/lib/go/thrift" "github.com/donnie4w/go-logger/logger" - . "tim.common" - "tim.utils" ) var maxOpenConns int = 100 var maxIdleConns int = 50 var minOpenConns int = 10 +var soTimeout int = 60 var timeoutConns int = 5 // second var IdleTimeOut int = 180 // second @@ -47,14 +49,19 @@ func putPool(t *clientBean) { type clientBean struct { tsclient *THBaseServiceClient + tsock *thrift.TSocket createtime int64 } +func (this *clientBean) Close() error { + return this.tsock.Close() +} + func newClientBean() (cb *clientBean) { i := 5 for i > 0 { cb = new(clientBean) - cb.tsclient = _NewHbaseClient() + cb.tsclient, cb.tsock = _NewHbaseClient() cb.createtime = utils.TimeMillsInt64() if cb.tsclient != nil { break @@ -137,11 +144,11 @@ func closeTHBaseServiceClient(t *clientBean) { } }() if t != nil { - t.tsclient.Transport.Close() + t.Close() } } -func _NewHbaseClient() (hbaseClient *THBaseServiceClient) { +func _NewHbaseClient() (hbaseClient *THBaseServiceClient, tsocket *thrift.TSocket) { defer func() { if err := recover(); err != nil { logger.Error("ClusterClient,", err) @@ -153,7 +160,8 @@ func _NewHbaseClient() (hbaseClient *THBaseServiceClient) { addr = "127.0.0.1:9090" } // tsocket, er := thrift.NewTSocket(addr) - tsocket, er := thrift.NewTSocketTimeout(addr, time.Duration(timeoutConns)*time.Second) + var er error + tsocket, er = thrift.NewTSocketTimeout(addr, time.Duration(timeoutConns)*time.Second, time.Duration(soTimeout)*time.Second) tProtocol := thrift.NewTBinaryProtocol(tsocket, true, true) if er != nil { logger.Error(os.Stderr, "error resolving address:", er.Error()) @@ -162,7 +170,7 @@ func _NewHbaseClient() (hbaseClient *THBaseServiceClient) { hbaseClient = NewTHBaseServiceClientProtocol(tsocket, tProtocol, tProtocol) if er = tsocket.Open(); er != nil { logger.Error(os.Stderr, "Error opening socket to ", addr, " ", er) - return nil + return nil, nil } ClientPool.addLength() return diff --git a/tim.hbase/hbaseService.go b/hbase/hbaseService.go similarity index 94% rename from tim.hbase/hbaseService.go rename to hbase/hbaseService.go index 659bb98..3dd356b 100644 --- a/tim.hbase/hbaseService.go +++ b/hbase/hbaseService.go @@ -5,12 +5,13 @@ package hbase // "github.com/donnie4w/go-logger/logger" import ( + "context" "errors" "fmt" "reflect" "strings" - "tim.utils" + "tim/utils" ) var maxcount int32 = (1 << 14) @@ -39,7 +40,7 @@ func getSerialNo(tablename string, row string) (id int64, err error) { tc.Family = []byte(row) ti.Columns = []*TColumnIncrement{tc} var result *TResult_ - result, err = hbaseClient.Increment([]byte("tim_serialno"), ti) + result, err = hbaseClient.Increment(context.Background(), []byte("tim_serialno"), ti) if err == nil && result != nil && len(result.GetColumnValues()) > 0 { bb := result.GetColumnValues()[0].GetValue() id = Bytes2hex(bb) @@ -108,7 +109,7 @@ func UpdateMultiple(tablename string, beans []*Bean) (er error) { tput.ColumnValues = []*TColumnValue{tColumnValue} tputs = append(tputs, tput) } - er = hbaseClient.PutMultiple([]byte(tablename), tputs) + er = hbaseClient.PutMultiple(context.Background(), []byte(tablename), tputs) if er != nil { panic(er.Error()) } @@ -147,7 +148,7 @@ func DeleteRow(tablename string, row int64) (er error) { hbaseClient := client.tsclient tdelete := NewTDelete() tdelete.Row = Hex2bytes(row) - er = hbaseClient.DeleteSingle([]byte(tablename), tdelete) + er = hbaseClient.DeleteSingle(context.Background(), []byte(tablename), tdelete) if er != nil { panic(er.Error()) } @@ -163,7 +164,7 @@ func _DeleteRows(hbaseClient *THBaseServiceClient, tablename string, rows []int6 tdelete.Row = Hex2bytes(row) tdeletes = append(tdeletes, tdelete) } - _, err = hbaseClient.DeleteMultiple([]byte(tablename), tdeletes) + _, err = hbaseClient.DeleteMultiple(context.Background(), []byte(tablename), tdeletes) return } @@ -215,7 +216,7 @@ func DeleteFromQualifier(tablename string, beans []*Bean) (err error) { } } tscan.Columns = columns - rs, er := hbaseClient.GetScannerResults([]byte(tablename), tscan, maxcount) + rs, er := hbaseClient.GetScannerResults(context.Background(), []byte(tablename), tscan, maxcount) if er != nil { panic(er.Error()) } @@ -261,7 +262,7 @@ func _getResultByBean(hbaseClient *THBaseServiceClient, tablename string, beans if count <= 0 { count = maxcount } - rs, err = hbaseClient.GetScannerResults([]byte(tablename), tscan, count) + rs, err = hbaseClient.GetScannerResults(context.Background(), []byte(tablename), tscan, count) return } @@ -470,7 +471,7 @@ func ScansFromRow(tablename string, beans []*Bean, count int32, reversed bool) ( tgets = append(tgets, tget) } } - results, err = hbaseClient.GetMultiple([]byte(tablename), tgets) + results, err = hbaseClient.GetMultiple(context.Background(), []byte(tablename), tgets) if err != nil { panic(err.Error()) } @@ -500,7 +501,7 @@ func SelectByRows(tablename string, rows []int64) (results []*TResult_, err erro tgets = append(tgets, tget) } } - results, err = hbaseClient.GetMultiple([]byte(tablename), tgets) + results, err = hbaseClient.GetMultiple(context.Background(), []byte(tablename), tgets) if err != nil { panic(err.Error()) } @@ -531,7 +532,7 @@ func get(tablename string, row int64, family, qualifier string) (result *TResult } tget.Columns = []*TColumn{tColumn} } - result, err = hbaseClient.Get([]byte(tablename), tget) + result, err = hbaseClient.Get(context.Background(), []byte(tablename), tget) if err != nil { panic(err.Error()) } diff --git a/tim.hbase/hbasedao.go b/hbase/hbasedao.go similarity index 100% rename from tim.hbase/hbasedao.go rename to hbase/hbasedao.go diff --git a/tim.hbaseService/hbaseService.go b/hbaseService/hbaseService.go similarity index 98% rename from tim.hbaseService/hbaseService.go rename to hbaseService/hbaseService.go index 5389337..5733bda 100644 --- a/tim.hbaseService/hbaseService.go +++ b/hbaseService/hbaseService.go @@ -4,17 +4,19 @@ package hbaseService import ( + "context" "errors" "fmt" "runtime/debug" - "git.apache.org/thrift.git/lib/go/thrift" + "tim/base64Util" + . "tim/common" + "tim/hbase" + . "tim/protocol" + "tim/utils" + + "github.com/apache/thrift/lib/go/thrift" "github.com/donnie4w/go-logger/logger" - "tim.base64Util" - . "tim.common" - "tim.hbase" - . "tim.protocol" - "tim.utils" ) /*保存离线信息列表*/ @@ -72,7 +74,7 @@ func _saveOfflineMBean(mbean *TimMBean) { tim_offline.Stamp = utils.TimeMills() mbean.Offline = NewTimTime() mbean.Offline.Timestamp = mbean.Timestamp - stanza, _ := thrift.NewTSerializer().Write(mbean) + stanza, _ := thrift.NewTSerializer().Write(context.Background(), mbean) base64string := base64Util.Base64Encode(stanza) length := len([]byte(base64string)) tim_offline.Stanza = base64string @@ -151,7 +153,7 @@ func LoadOfflineMBean(tid *Tid) (mbeans []*TimMBean) { var timmbean *TimMBean = NewTimMBean() bb, er := base64Util.Base64Decode(t.Stanza) if er == nil { - thrift.NewTDeserializer().Read(timmbean, []byte(bb)) + thrift.NewTDeserializer().Read(context.Background(), timmbean, []byte(bb)) mbeans = append(mbeans, timmbean) } else { logger.Error("Base64Decode:", er) @@ -223,7 +225,7 @@ func LoadOfflineMucMBean(tid *Tid) (mbeans []*TimMBean) { var timmbean *TimMBean = NewTimMBean() bb, er := base64Util.Base64Decode(t.Stanza) if er == nil { - thrift.NewTDeserializer().Read(timmbean, []byte(bb)) + thrift.NewTDeserializer().Read(context.Background(), timmbean, []byte(bb)) mbeans = append(mbeans, timmbean) } else { logger.Error("Base64Decode:", er) @@ -498,7 +500,7 @@ func _saveMBean(mbean *TimMBean, small, large int) (mid string, timestamp string message.Large = fmt.Sprint(large) message.Msgtype = fmt.Sprint(mbean.GetMsgType()) message.Msgmode = "1" - stanza, _ := thrift.NewTSerializer().Write(mbean) + stanza, _ := thrift.NewTSerializer().Write(context.Background(), mbean) stanzastr := string(base64Util.Base64Encode(stanza)) message.Stanza = stanzastr message.IndexChatid = chatid @@ -545,7 +547,7 @@ func SaveMucMBean(mbean *TimMBean) (mid string, err error) { tim_mucmessage.Roomtidname = mbean.GetFromTid().GetName() tim_mucmessage.Domain = mbean.GetLeaguerTid().GetDomain() tim_mucmessage.Msgtype = fmt.Sprint(mbean.GetMsgType()) - stanza, _ := thrift.NewTSerializer().Write(mbean) + stanza, _ := thrift.NewTSerializer().Write(context.Background(), mbean) stanzastr := string(base64Util.Base64Encode(stanza)) tim_mucmessage.Stanza = stanzastr tim_mucmessage.Createtime = utils.NowTime() @@ -723,7 +725,7 @@ func LoadMBean(fidname, tidname, domain string, fromstamp, tostamp *string, limi tm := new(TimMBean) bb, er := base64Util.Base64Decode(msg.Stanza) if er == nil { - thrift.NewTDeserializer().Read(tm, bb) + thrift.NewTDeserializer().Read(context.Background(), tm, bb) mid := fmt.Sprint(msg.Id) tm.Mid = &mid tms = append(tms, tm) diff --git a/tim.impl/err.go b/impl/err.go similarity index 100% rename from tim.impl/err.go rename to impl/err.go diff --git a/tim.impl/impl.go b/impl/impl.go similarity index 80% rename from tim.impl/impl.go rename to impl/impl.go index 7d15ec8..867cdb1 100644 --- a/tim.impl/impl.go +++ b/impl/impl.go @@ -4,23 +4,25 @@ package impl import ( + "context" "errors" "fmt" "runtime/debug" "time" - "git.apache.org/thrift.git/lib/go/thrift" + "tim/FW" + "tim/cluster" + "tim/clusterRoute" + . "tim/common" + . "tim/connect" + "tim/daoService" + . "tim/protocol" + "tim/route" + "tim/tfClient" + "tim/utils" + + "github.com/apache/thrift/lib/go/thrift" "github.com/donnie4w/go-logger/logger" - "tim.FW" - "tim.cluster" - "tim.clusterRoute" - . "tim.common" - . "tim.connect" - "tim.daoService" - . "tim.protocol" - "tim.route" - "tim.tfClient" - "tim.utils" ) type TimImpl struct { @@ -33,7 +35,7 @@ type TimImpl struct { // Parameters: // - Param -func (this *TimImpl) TimStream(param *TimParam) (err error) { +func (this *TimImpl) TimStream(ctx context.Context, param *TimParam) (err error) { if param != nil { if param.GetInterflow() == "1" { this.Tu.Interflow = 1 @@ -45,15 +47,14 @@ func (this *TimImpl) TimStream(param *TimParam) (err error) { } return } -func (this *TimImpl) TimStarttls() (err error) { +func (this *TimImpl) TimStarttls(ctx context.Context) (err error) { panic("") - return } // Parameters: // - Tid // - Pwd -func (this *TimImpl) TimLogin(tid *Tid, pwd string) (err error) { +func (this *TimImpl) TimLogin(ctx context.Context, tid *Tid, pwd string) (err error) { defer func() { if err := recover(); err != nil { logger.Warn("Login error", err) @@ -109,7 +110,7 @@ func (this *TimImpl) TimLogin(tid *Tid, pwd string) (err error) { // Parameters: // - Ab -func (this *TimImpl) TimAck(ab *TimAckBean) (err error) { +func (this *TimImpl) TimAck(cx context.Context, ab *TimAckBean) (err error) { if this.Tu.Fw != FW.AUTH { panic(fmt.Sprint("not auth:", this.Tu.Fw)) } @@ -133,7 +134,7 @@ func (this *TimImpl) TimAck(ab *TimAckBean) (err error) { // Parameters: // - Pbean -func (this *TimImpl) TimPresence(pbean *TimPBean) (err error) { +func (this *TimImpl) TimPresence(ctx context.Context, pbean *TimPBean) (err error) { if CF.Presence != 1 { return } @@ -203,7 +204,7 @@ func _TimPresence(this *TimImpl, pbean *TimPBean, isAck bool) (err error) { // Parameters: // - Mbean -func (this *TimImpl) TimMessage(mbean *TimMBean) (err error) { +func (this *TimImpl) TimMessage(ctx context.Context, mbean *TimMBean) (err error) { if this.Tu.Fw != FW.AUTH { panic("not auth") } @@ -289,7 +290,7 @@ func _TimMessage(this *TimImpl, mbean *TimMBean) (err error) { // Parameters: // - ThreadId -func (this *TimImpl) TimPing(threadId string) (err error) { +func (this *TimImpl) TimPing(ctx context.Context, threadId string) (err error) { if this.Tu.Fw != FW.AUTH { panic("not auth") } @@ -304,56 +305,49 @@ func (this *TimImpl) TimPing(threadId string) (err error) { // Parameters: // - E -func (this *TimImpl) TimError(e *TimError) (err error) { +func (this *TimImpl) TimError(cx context.Context, e *TimError) (err error) { panic("TimError") - return } -func (this *TimImpl) TimLogout() (err error) { +func (this *TimImpl) TimLogout(cx context.Context) (err error) { panic("TimLogout") - return } // Parameters: // - Tid // - Pwd -func (this *TimImpl) TimRegist(tid *Tid, pwd string) (err error) { +func (this *TimImpl) TimRegist(ctx context.Context, tid *Tid, pwd string) (err error) { panic("error TimRegist") - return } // Parameters: // - Tid // - Pwd -func (this *TimImpl) TimRemoteUserAuth(tid *Tid, pwd string, auth *TimAuth) (r *TimRemoteUserBean, err error) { +func (this *TimImpl) TimRemoteUserAuth(ctx context.Context, tid *Tid, pwd string, auth *TimAuth) (r *TimRemoteUserBean, err error) { panic("error TimRemoteUserAuth") - return } // Parameters: // - Tid -func (this *TimImpl) TimRemoteUserGet(tid *Tid, auth *TimAuth) (r *TimRemoteUserBean, err error) { +func (this *TimImpl) TimRemoteUserGet(ctx context.Context, tid *Tid, auth *TimAuth) (r *TimRemoteUserBean, err error) { panic("error TimRemoteUserGet") - return } // Parameters: // - Tid // - Ub -func (this *TimImpl) TimRemoteUserEdit(tid *Tid, ub *TimUserBean, auth *TimAuth) (r *TimRemoteUserBean, err error) { +func (this *TimImpl) TimRemoteUserEdit(ctx context.Context, tid *Tid, ub *TimUserBean, auth *TimAuth) (r *TimRemoteUserBean, err error) { panic("error TimRemoteUserEdit") - return } // Parameters: // - Pbean -func (this *TimImpl) TimResponsePresence(pbean *TimPBean, auth *TimAuth) (r *TimResponseBean, err error) { +func (this *TimImpl) TimResponsePresence(ctx context.Context, pbean *TimPBean, auth *TimAuth) (r *TimResponseBean, err error) { panic("TimResponsePresence") - return } // Parameters: // - Mbean -func (this *TimImpl) TimResponseMessage(mbean *TimMBean, auth *TimAuth) (r *TimResponseBean, err error) { +func (this *TimImpl) TimResponseMessage(ctx context.Context, mbean *TimMBean, auth *TimAuth) (r *TimResponseBean, err error) { r = NewTimResponseBean() fromDomain := mbean.GetFromTid().GetDomain() toDomain := mbean.GetToTid().GetDomain() @@ -396,7 +390,7 @@ func (this *TimImpl) TimResponseMessage(mbean *TimMBean, auth *TimAuth) (r *TimR return } -func (this *TimImpl) TimMessageIq(timMsgIq *TimMessageIq, iqType string) (err error) { +func (this *TimImpl) TimMessageIq(ctx context.Context, timMsgIq *TimMessageIq, iqType string) (err error) { // logger.Debug("TimMessageIq:", timMsgIq, " ", iqType) switch iqType { case "get": @@ -413,11 +407,11 @@ func (this *TimImpl) TimMessageIq(timMsgIq *TimMessageIq, iqType string) (err er mbeanlist := NewTimMBeanList() mbeanlist.ThreadId = utils.TimeMills() mbeanlist.TimMBeanList = mbeans - this.Tu.Client.TimMessageList(mbeanlist) + this.Tu.Client.TimMessageList(context.Background(), mbeanlist) } else { if mbeans != nil { for _, mbean := range mbeans { - er := this.Tu.Client.TimMessageResult_(mbean) + er := this.Tu.Client.TimMessageResult_(context.Background(), mbean) if er != nil { break } @@ -449,19 +443,17 @@ func (this *TimImpl) TimMessageIq(timMsgIq *TimMessageIq, iqType string) (err er // Parameters: // - Mbean -func (this *TimImpl) TimMessageResult_(mbean *TimMBean) (err error) { +func (this *TimImpl) TimMessageResult_(ctx context.Context, mbean *TimMBean) (err error) { logger.Debug("TimMessageResult_:", mbean) panic("error TimMessageResult_") - return } -func (this *TimImpl) TimRoser(roster *TimRoster) (err error) { +func (this *TimImpl) TimRoser(ctx context.Context, roster *TimRoster) (err error) { logger.Debug("TimRoser:", roster) panic("error TimRoser") - return } -func (this *TimImpl) TimResponseMessageIq(timMsgIq *TimMessageIq, iqType string, auth *TimAuth) (r *TimMBeanList, err error) { +func (this *TimImpl) TimResponseMessageIq(ctx context.Context, timMsgIq *TimMessageIq, iqType string, auth *TimAuth) (r *TimMBeanList, err error) { // logger.Debug("TimResponseMessageIq:", timMsgIq, iqType, auth) user_auth_url := CF.GetKV("user_auth_url", "") isAuth := false @@ -505,7 +497,7 @@ func httpAuth(tid *Tid, pwd, user_auth_url string) (isAuth bool) { logger.Error(string(debug.Stack())) } }() - r, er = client.TimRemoteUserAuth(tid, pwd, nil) + r, er = client.TimRemoteUserAuth(context.Background(), tid, pwd, nil) if er == nil && r != nil { logger.Debug(r) if r.ExtraMap != nil { @@ -526,36 +518,32 @@ func httpAuth(tid *Tid, pwd, user_auth_url string) (isAuth bool) { return } -func (this *TimImpl) TimMessageList(mbeanList *TimMBeanList) (err error) { +func (this *TimImpl) TimMessageList(ctx context.Context, mbeanList *TimMBeanList) (err error) { logger.Debug("TimMessageList:", mbeanList) panic("error TimMessageList") - return } // Parameters: // - PbeanList -func (this *TimImpl) TimPresenceList(pbeanList *TimPBeanList) (err error) { +func (this *TimImpl) TimPresenceList(ctx context.Context, pbeanList *TimPBeanList) (err error) { logger.Debug("TimPresenceList:", pbeanList) panic("error TimPresenceList") - return } -func (this *TimImpl) TimResponsePresenceList(pbeanList *TimPBeanList, auth *TimAuth) (r *TimResponseBean, err error) { +func (this *TimImpl) TimResponsePresenceList(ctx context.Context, pbeanList *TimPBeanList, auth *TimAuth) (r *TimResponseBean, err error) { logger.Debug("TimResponsePresenceList:", pbeanList) panic("error TimResponsePresenceList") - return } // Parameters: // - MbeanList // - Auth -func (this *TimImpl) TimResponseMessageList(mbeanList *TimMBeanList, auth *TimAuth) (r *TimResponseBean, err error) { +func (this *TimImpl) TimResponseMessageList(ctx context.Context, mbeanList *TimMBeanList, auth *TimAuth) (r *TimResponseBean, err error) { logger.Debug("TimResponseMessageList:", mbeanList) panic("error TimResponseMessageList") - return } -func (this *TimImpl) TimProperty(tpb *TimPropertyBean) (err error) { +func (this *TimImpl) TimProperty(ctx context.Context, tpb *TimPropertyBean) (err error) { if this.Tu.Fw != FW.AUTH { panic("not auth") } diff --git a/tim.impl/service.go b/impl/service.go similarity index 95% rename from tim.impl/service.go rename to impl/service.go index 8ca11fd..cc5edd5 100644 --- a/tim.impl/service.go +++ b/impl/service.go @@ -4,8 +4,8 @@ package impl import ( - . "tim.protocol" - "tim.utils" + . "tim/protocol" + "tim/utils" ) func newTid(name string, domain, resource *string) *Tid { diff --git a/log/tim.log b/log/tim.log new file mode 100644 index 0000000..41ee380 --- /dev/null +++ b/log/tim.log @@ -0,0 +1,44 @@ +2023/02/11 15:52:05 redis.go:73: error Do error dial tcp 127.0.0.1:6379: connectex: No connection could be made because the target machine actively refused it. PING [] +2023/02/11 15:52:05 cluster.go:40: error redis connect failed:dial tcp 127.0.0.1:6379: connectex: No connection could be made because the target machine actively refused it. +2023/02/11 15:53:23 redis.go:73: error Do error dial tcp 127.0.0.1:6379: connectex: No connection could be made because the target machine actively refused it. PING [] +2023/02/11 15:53:23 cluster.go:40: error redis connect failed:dial tcp 127.0.0.1:6379: connectex: No connection could be made because the target machine actively refused it. +2023/02/11 15:56:02 daoservice.go:948: error goroutine 1 [running]: +runtime/debug.Stack() + D:/installsoft/go/src/runtime/debug/stack.go:24 +0x65 +tim/daoService.AddConf.func1() + D:/workspace/donnie4w_go/src/github.com/tim/daoService/daoservice.go:948 +0x2a +panic({0xc8eb20, 0xfede50}) + D:/installsoft/go/src/runtime/panic.go:838 +0x207 +database/sql.(*Rows).close(0x0, {0x0, 0x0}) + D:/installsoft/go/src/database/sql/sql.go:3308 +0x8e +database/sql.(*Rows).Close(0xc00009a000?) + D:/installsoft/go/src/database/sql/sql.go:3304 +0x1d +tim/dao.(*Tim_config).Selects(0x0?, {0x0?, 0x5?, 0xc00011de18?}) + D:/workspace/donnie4w_go/src/github.com/tim/dao/tim_config.go:221 +0x1ca +tim/daoService.AddConf() + D:/workspace/donnie4w_go/src/github.com/tim/daoService/daoservice.go:955 +0xc5 +tim/daoService.InitDaoservice() + D:/workspace/donnie4w_go/src/github.com/tim/daoService/daoservice.go:46 +0x17 +main.main() + D:/workspace/donnie4w_go/src/github.com/tim/tim.go:95 +0x485 + +2023/02/11 15:56:02 daoservice.go:1031: error goroutine 1 [running]: +runtime/debug.Stack() + D:/installsoft/go/src/runtime/debug/stack.go:24 +0x65 +tim/daoService.updateVersion.func1() + D:/workspace/donnie4w_go/src/github.com/tim/daoService/daoservice.go:1031 +0x2a +panic({0xc8eb20, 0xfede50}) + D:/installsoft/go/src/runtime/panic.go:838 +0x207 +database/sql.(*Rows).close(0x0, {0x0, 0x0}) + D:/installsoft/go/src/database/sql/sql.go:3308 +0x8e +database/sql.(*Rows).Close(0xc000216000?) + D:/installsoft/go/src/database/sql/sql.go:3304 +0x1d +tim/dao.(*Tim_config).Select(0xc000216000?, {0x0?, 0x1?, 0xd054c8?}) + D:/workspace/donnie4w_go/src/github.com/tim/dao/tim_config.go:199 +0x19e +tim/daoService.updateVersion() + D:/workspace/donnie4w_go/src/github.com/tim/daoService/daoservice.go:1039 +0x148 +tim/daoService.InitDaoservice() + D:/workspace/donnie4w_go/src/github.com/tim/daoService/daoservice.go:47 +0x1c +main.main() + D:/workspace/donnie4w_go/src/github.com/tim/tim.go:95 +0x485 + diff --git a/tim.mode/mode.go b/mode/mode.go similarity index 100% rename from tim.mode/mode.go rename to mode/mode.go diff --git a/tim.model/model.go b/model/model.go similarity index 93% rename from tim.model/model.go rename to model/model.go index 4d724e6..f5900f3 100644 --- a/tim.model/model.go +++ b/model/model.go @@ -4,8 +4,9 @@ package model import ( + "tim/DB" + "github.com/donnie4w/gdao" - "tim.DB" ) func init() { diff --git a/protocol/GoUnusedProtection__.go b/protocol/GoUnusedProtection__.go new file mode 100644 index 0000000..b51bc1a --- /dev/null +++ b/protocol/GoUnusedProtection__.go @@ -0,0 +1,6 @@ +// Code generated by Thrift Compiler (0.17.0). DO NOT EDIT. + +package protocol + +var GoUnusedProtection__ int; + diff --git a/protocol/i_tim-remote/i_tim-remote.go b/protocol/i_tim-remote/i_tim-remote.go new file mode 100644 index 0000000..f8cad4d --- /dev/null +++ b/protocol/i_tim-remote/i_tim-remote.go @@ -0,0 +1,891 @@ +// Code generated by Thrift Compiler (0.17.0). DO NOT EDIT. + +package main + +import ( + "context" + "flag" + "fmt" + "math" + "net" + "net/url" + "os" + "strconv" + "strings" + thrift "github.com/apache/thrift/lib/go/thrift" + "protocol" +) + +var _ = protocol.GoUnusedProtection__ + +func Usage() { + fmt.Fprintln(os.Stderr, "Usage of ", os.Args[0], " [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]:") + flag.PrintDefaults() + fmt.Fprintln(os.Stderr, "\nFunctions:") + fmt.Fprintln(os.Stderr, " void timStream(TimParam param)") + fmt.Fprintln(os.Stderr, " void timStarttls()") + fmt.Fprintln(os.Stderr, " void timLogin(Tid tid, string pwd)") + fmt.Fprintln(os.Stderr, " void timAck(TimAckBean ab)") + fmt.Fprintln(os.Stderr, " void timPresence(TimPBean pbean)") + fmt.Fprintln(os.Stderr, " void timMessage(TimMBean mbean)") + fmt.Fprintln(os.Stderr, " void timPing(string threadId)") + fmt.Fprintln(os.Stderr, " void timError(TimError e)") + fmt.Fprintln(os.Stderr, " void timLogout()") + fmt.Fprintln(os.Stderr, " void timRegist(Tid tid, string auth)") + fmt.Fprintln(os.Stderr, " void timRoser(TimRoster roster)") + fmt.Fprintln(os.Stderr, " void timMessageList(TimMBeanList mbeanList)") + fmt.Fprintln(os.Stderr, " void timPresenceList(TimPBeanList pbeanList)") + fmt.Fprintln(os.Stderr, " void timMessageIq(TimMessageIq timMsgIq, string iqType)") + fmt.Fprintln(os.Stderr, " void timMessageResult(TimMBean mbean)") + fmt.Fprintln(os.Stderr, " void timProperty(TimPropertyBean tpb)") + fmt.Fprintln(os.Stderr, " TimRemoteUserBean timRemoteUserAuth(Tid tid, string pwd, TimAuth auth)") + fmt.Fprintln(os.Stderr, " TimRemoteUserBean timRemoteUserGet(Tid tid, TimAuth auth)") + fmt.Fprintln(os.Stderr, " TimRemoteUserBean timRemoteUserEdit(Tid tid, TimUserBean ub, TimAuth auth)") + fmt.Fprintln(os.Stderr, " TimResponseBean timResponsePresence(TimPBean pbean, TimAuth auth)") + fmt.Fprintln(os.Stderr, " TimResponseBean timResponseMessage(TimMBean mbean, TimAuth auth)") + fmt.Fprintln(os.Stderr, " TimMBeanList timResponseMessageIq(TimMessageIq timMsgIq, string iqType, TimAuth auth)") + fmt.Fprintln(os.Stderr, " TimResponseBean timResponsePresenceList(TimPBeanList pbeanList, TimAuth auth)") + fmt.Fprintln(os.Stderr, " TimResponseBean timResponseMessageList(TimMBeanList mbeanList, TimAuth auth)") + fmt.Fprintln(os.Stderr) + os.Exit(0) +} + +type httpHeaders map[string]string + +func (h httpHeaders) String() string { + var m map[string]string = h + return fmt.Sprintf("%s", m) +} + +func (h httpHeaders) Set(value string) error { + parts := strings.Split(value, ": ") + if len(parts) != 2 { + return fmt.Errorf("header should be of format 'Key: Value'") + } + h[parts[0]] = parts[1] + return nil +} + +func main() { + flag.Usage = Usage + var host string + var port int + var protocol string + var urlString string + var framed bool + var useHttp bool + headers := make(httpHeaders) + var parsedUrl *url.URL + var trans thrift.TTransport + _ = strconv.Atoi + _ = math.Abs + flag.Usage = Usage + flag.StringVar(&host, "h", "localhost", "Specify host and port") + flag.IntVar(&port, "p", 9090, "Specify port") + flag.StringVar(&protocol, "P", "binary", "Specify the protocol (binary, compact, simplejson, json)") + flag.StringVar(&urlString, "u", "", "Specify the url") + flag.BoolVar(&framed, "framed", false, "Use framed transport") + flag.BoolVar(&useHttp, "http", false, "Use http") + flag.Var(headers, "H", "Headers to set on the http(s) request (e.g. -H \"Key: Value\")") + flag.Parse() + + if len(urlString) > 0 { + var err error + parsedUrl, err = url.Parse(urlString) + if err != nil { + fmt.Fprintln(os.Stderr, "Error parsing URL: ", err) + flag.Usage() + } + host = parsedUrl.Host + useHttp = len(parsedUrl.Scheme) <= 0 || parsedUrl.Scheme == "http" || parsedUrl.Scheme == "https" + } else if useHttp { + _, err := url.Parse(fmt.Sprint("http://", host, ":", port)) + if err != nil { + fmt.Fprintln(os.Stderr, "Error parsing URL: ", err) + flag.Usage() + } + } + + cmd := flag.Arg(0) + var err error + var cfg *thrift.TConfiguration = nil + if useHttp { + trans, err = thrift.NewTHttpClient(parsedUrl.String()) + if len(headers) > 0 { + httptrans := trans.(*thrift.THttpClient) + for key, value := range headers { + httptrans.SetHeader(key, value) + } + } + } else { + portStr := fmt.Sprint(port) + if strings.Contains(host, ":") { + host, portStr, err = net.SplitHostPort(host) + if err != nil { + fmt.Fprintln(os.Stderr, "error with host:", err) + os.Exit(1) + } + } + trans = thrift.NewTSocketConf(net.JoinHostPort(host, portStr), cfg) + if err != nil { + fmt.Fprintln(os.Stderr, "error resolving address:", err) + os.Exit(1) + } + if framed { + trans = thrift.NewTFramedTransportConf(trans, cfg) + } + } + if err != nil { + fmt.Fprintln(os.Stderr, "Error creating transport", err) + os.Exit(1) + } + defer trans.Close() + var protocolFactory thrift.TProtocolFactory + switch protocol { + case "compact": + protocolFactory = thrift.NewTCompactProtocolFactoryConf(cfg) + break + case "simplejson": + protocolFactory = thrift.NewTSimpleJSONProtocolFactoryConf(cfg) + break + case "json": + protocolFactory = thrift.NewTJSONProtocolFactory() + break + case "binary", "": + protocolFactory = thrift.NewTBinaryProtocolFactoryConf(cfg) + break + default: + fmt.Fprintln(os.Stderr, "Invalid protocol specified: ", protocol) + Usage() + os.Exit(1) + } + iprot := protocolFactory.GetProtocol(trans) + oprot := protocolFactory.GetProtocol(trans) + client := protocol.NewITimClient(thrift.NewTStandardClient(iprot, oprot)) + if err := trans.Open(); err != nil { + fmt.Fprintln(os.Stderr, "Error opening socket to ", host, ":", port, " ", err) + os.Exit(1) + } + + switch cmd { + case "timStream": + if flag.NArg() - 1 != 1 { + fmt.Fprintln(os.Stderr, "TimStream requires 1 args") + flag.Usage() + } + arg159 := flag.Arg(1) + mbTrans160 := thrift.NewTMemoryBufferLen(len(arg159)) + defer mbTrans160.Close() + _, err161 := mbTrans160.WriteString(arg159) + if err161 != nil { + Usage() + return + } + factory162 := thrift.NewTJSONProtocolFactory() + jsProt163 := factory162.GetProtocol(mbTrans160) + argvalue0 := protocol.NewTimParam() + err164 := argvalue0.Read(context.Background(), jsProt163) + if err164 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.TimStream(context.Background(), value0)) + fmt.Print("\n") + break + case "timStarttls": + if flag.NArg() - 1 != 0 { + fmt.Fprintln(os.Stderr, "TimStarttls requires 0 args") + flag.Usage() + } + fmt.Print(client.TimStarttls(context.Background())) + fmt.Print("\n") + break + case "timLogin": + if flag.NArg() - 1 != 2 { + fmt.Fprintln(os.Stderr, "TimLogin requires 2 args") + flag.Usage() + } + arg165 := flag.Arg(1) + mbTrans166 := thrift.NewTMemoryBufferLen(len(arg165)) + defer mbTrans166.Close() + _, err167 := mbTrans166.WriteString(arg165) + if err167 != nil { + Usage() + return + } + factory168 := thrift.NewTJSONProtocolFactory() + jsProt169 := factory168.GetProtocol(mbTrans166) + argvalue0 := protocol.NewTid() + err170 := argvalue0.Read(context.Background(), jsProt169) + if err170 != nil { + Usage() + return + } + value0 := argvalue0 + argvalue1 := flag.Arg(2) + value1 := argvalue1 + fmt.Print(client.TimLogin(context.Background(), value0, value1)) + fmt.Print("\n") + break + case "timAck": + if flag.NArg() - 1 != 1 { + fmt.Fprintln(os.Stderr, "TimAck requires 1 args") + flag.Usage() + } + arg172 := flag.Arg(1) + mbTrans173 := thrift.NewTMemoryBufferLen(len(arg172)) + defer mbTrans173.Close() + _, err174 := mbTrans173.WriteString(arg172) + if err174 != nil { + Usage() + return + } + factory175 := thrift.NewTJSONProtocolFactory() + jsProt176 := factory175.GetProtocol(mbTrans173) + argvalue0 := protocol.NewTimAckBean() + err177 := argvalue0.Read(context.Background(), jsProt176) + if err177 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.TimAck(context.Background(), value0)) + fmt.Print("\n") + break + case "timPresence": + if flag.NArg() - 1 != 1 { + fmt.Fprintln(os.Stderr, "TimPresence requires 1 args") + flag.Usage() + } + arg178 := flag.Arg(1) + mbTrans179 := thrift.NewTMemoryBufferLen(len(arg178)) + defer mbTrans179.Close() + _, err180 := mbTrans179.WriteString(arg178) + if err180 != nil { + Usage() + return + } + factory181 := thrift.NewTJSONProtocolFactory() + jsProt182 := factory181.GetProtocol(mbTrans179) + argvalue0 := protocol.NewTimPBean() + err183 := argvalue0.Read(context.Background(), jsProt182) + if err183 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.TimPresence(context.Background(), value0)) + fmt.Print("\n") + break + case "timMessage": + if flag.NArg() - 1 != 1 { + fmt.Fprintln(os.Stderr, "TimMessage requires 1 args") + flag.Usage() + } + arg184 := flag.Arg(1) + mbTrans185 := thrift.NewTMemoryBufferLen(len(arg184)) + defer mbTrans185.Close() + _, err186 := mbTrans185.WriteString(arg184) + if err186 != nil { + Usage() + return + } + factory187 := thrift.NewTJSONProtocolFactory() + jsProt188 := factory187.GetProtocol(mbTrans185) + argvalue0 := protocol.NewTimMBean() + err189 := argvalue0.Read(context.Background(), jsProt188) + if err189 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.TimMessage(context.Background(), value0)) + fmt.Print("\n") + break + case "timPing": + if flag.NArg() - 1 != 1 { + fmt.Fprintln(os.Stderr, "TimPing requires 1 args") + flag.Usage() + } + argvalue0 := flag.Arg(1) + value0 := argvalue0 + fmt.Print(client.TimPing(context.Background(), value0)) + fmt.Print("\n") + break + case "timError": + if flag.NArg() - 1 != 1 { + fmt.Fprintln(os.Stderr, "TimError requires 1 args") + flag.Usage() + } + arg191 := flag.Arg(1) + mbTrans192 := thrift.NewTMemoryBufferLen(len(arg191)) + defer mbTrans192.Close() + _, err193 := mbTrans192.WriteString(arg191) + if err193 != nil { + Usage() + return + } + factory194 := thrift.NewTJSONProtocolFactory() + jsProt195 := factory194.GetProtocol(mbTrans192) + argvalue0 := protocol.NewTimError() + err196 := argvalue0.Read(context.Background(), jsProt195) + if err196 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.TimError(context.Background(), value0)) + fmt.Print("\n") + break + case "timLogout": + if flag.NArg() - 1 != 0 { + fmt.Fprintln(os.Stderr, "TimLogout requires 0 args") + flag.Usage() + } + fmt.Print(client.TimLogout(context.Background())) + fmt.Print("\n") + break + case "timRegist": + if flag.NArg() - 1 != 2 { + fmt.Fprintln(os.Stderr, "TimRegist requires 2 args") + flag.Usage() + } + arg197 := flag.Arg(1) + mbTrans198 := thrift.NewTMemoryBufferLen(len(arg197)) + defer mbTrans198.Close() + _, err199 := mbTrans198.WriteString(arg197) + if err199 != nil { + Usage() + return + } + factory200 := thrift.NewTJSONProtocolFactory() + jsProt201 := factory200.GetProtocol(mbTrans198) + argvalue0 := protocol.NewTid() + err202 := argvalue0.Read(context.Background(), jsProt201) + if err202 != nil { + Usage() + return + } + value0 := argvalue0 + argvalue1 := flag.Arg(2) + value1 := argvalue1 + fmt.Print(client.TimRegist(context.Background(), value0, value1)) + fmt.Print("\n") + break + case "timRoser": + if flag.NArg() - 1 != 1 { + fmt.Fprintln(os.Stderr, "TimRoser requires 1 args") + flag.Usage() + } + arg204 := flag.Arg(1) + mbTrans205 := thrift.NewTMemoryBufferLen(len(arg204)) + defer mbTrans205.Close() + _, err206 := mbTrans205.WriteString(arg204) + if err206 != nil { + Usage() + return + } + factory207 := thrift.NewTJSONProtocolFactory() + jsProt208 := factory207.GetProtocol(mbTrans205) + argvalue0 := protocol.NewTimRoster() + err209 := argvalue0.Read(context.Background(), jsProt208) + if err209 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.TimRoser(context.Background(), value0)) + fmt.Print("\n") + break + case "timMessageList": + if flag.NArg() - 1 != 1 { + fmt.Fprintln(os.Stderr, "TimMessageList requires 1 args") + flag.Usage() + } + arg210 := flag.Arg(1) + mbTrans211 := thrift.NewTMemoryBufferLen(len(arg210)) + defer mbTrans211.Close() + _, err212 := mbTrans211.WriteString(arg210) + if err212 != nil { + Usage() + return + } + factory213 := thrift.NewTJSONProtocolFactory() + jsProt214 := factory213.GetProtocol(mbTrans211) + argvalue0 := protocol.NewTimMBeanList() + err215 := argvalue0.Read(context.Background(), jsProt214) + if err215 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.TimMessageList(context.Background(), value0)) + fmt.Print("\n") + break + case "timPresenceList": + if flag.NArg() - 1 != 1 { + fmt.Fprintln(os.Stderr, "TimPresenceList requires 1 args") + flag.Usage() + } + arg216 := flag.Arg(1) + mbTrans217 := thrift.NewTMemoryBufferLen(len(arg216)) + defer mbTrans217.Close() + _, err218 := mbTrans217.WriteString(arg216) + if err218 != nil { + Usage() + return + } + factory219 := thrift.NewTJSONProtocolFactory() + jsProt220 := factory219.GetProtocol(mbTrans217) + argvalue0 := protocol.NewTimPBeanList() + err221 := argvalue0.Read(context.Background(), jsProt220) + if err221 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.TimPresenceList(context.Background(), value0)) + fmt.Print("\n") + break + case "timMessageIq": + if flag.NArg() - 1 != 2 { + fmt.Fprintln(os.Stderr, "TimMessageIq requires 2 args") + flag.Usage() + } + arg222 := flag.Arg(1) + mbTrans223 := thrift.NewTMemoryBufferLen(len(arg222)) + defer mbTrans223.Close() + _, err224 := mbTrans223.WriteString(arg222) + if err224 != nil { + Usage() + return + } + factory225 := thrift.NewTJSONProtocolFactory() + jsProt226 := factory225.GetProtocol(mbTrans223) + argvalue0 := protocol.NewTimMessageIq() + err227 := argvalue0.Read(context.Background(), jsProt226) + if err227 != nil { + Usage() + return + } + value0 := argvalue0 + argvalue1 := flag.Arg(2) + value1 := argvalue1 + fmt.Print(client.TimMessageIq(context.Background(), value0, value1)) + fmt.Print("\n") + break + case "timMessageResult": + if flag.NArg() - 1 != 1 { + fmt.Fprintln(os.Stderr, "TimMessageResult_ requires 1 args") + flag.Usage() + } + arg229 := flag.Arg(1) + mbTrans230 := thrift.NewTMemoryBufferLen(len(arg229)) + defer mbTrans230.Close() + _, err231 := mbTrans230.WriteString(arg229) + if err231 != nil { + Usage() + return + } + factory232 := thrift.NewTJSONProtocolFactory() + jsProt233 := factory232.GetProtocol(mbTrans230) + argvalue0 := protocol.NewTimMBean() + err234 := argvalue0.Read(context.Background(), jsProt233) + if err234 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.TimMessageResult_(context.Background(), value0)) + fmt.Print("\n") + break + case "timProperty": + if flag.NArg() - 1 != 1 { + fmt.Fprintln(os.Stderr, "TimProperty requires 1 args") + flag.Usage() + } + arg235 := flag.Arg(1) + mbTrans236 := thrift.NewTMemoryBufferLen(len(arg235)) + defer mbTrans236.Close() + _, err237 := mbTrans236.WriteString(arg235) + if err237 != nil { + Usage() + return + } + factory238 := thrift.NewTJSONProtocolFactory() + jsProt239 := factory238.GetProtocol(mbTrans236) + argvalue0 := protocol.NewTimPropertyBean() + err240 := argvalue0.Read(context.Background(), jsProt239) + if err240 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.TimProperty(context.Background(), value0)) + fmt.Print("\n") + break + case "timRemoteUserAuth": + if flag.NArg() - 1 != 3 { + fmt.Fprintln(os.Stderr, "TimRemoteUserAuth requires 3 args") + flag.Usage() + } + arg241 := flag.Arg(1) + mbTrans242 := thrift.NewTMemoryBufferLen(len(arg241)) + defer mbTrans242.Close() + _, err243 := mbTrans242.WriteString(arg241) + if err243 != nil { + Usage() + return + } + factory244 := thrift.NewTJSONProtocolFactory() + jsProt245 := factory244.GetProtocol(mbTrans242) + argvalue0 := protocol.NewTid() + err246 := argvalue0.Read(context.Background(), jsProt245) + if err246 != nil { + Usage() + return + } + value0 := argvalue0 + argvalue1 := flag.Arg(2) + value1 := argvalue1 + arg248 := flag.Arg(3) + mbTrans249 := thrift.NewTMemoryBufferLen(len(arg248)) + defer mbTrans249.Close() + _, err250 := mbTrans249.WriteString(arg248) + if err250 != nil { + Usage() + return + } + factory251 := thrift.NewTJSONProtocolFactory() + jsProt252 := factory251.GetProtocol(mbTrans249) + argvalue2 := protocol.NewTimAuth() + err253 := argvalue2.Read(context.Background(), jsProt252) + if err253 != nil { + Usage() + return + } + value2 := argvalue2 + fmt.Print(client.TimRemoteUserAuth(context.Background(), value0, value1, value2)) + fmt.Print("\n") + break + case "timRemoteUserGet": + if flag.NArg() - 1 != 2 { + fmt.Fprintln(os.Stderr, "TimRemoteUserGet requires 2 args") + flag.Usage() + } + arg254 := flag.Arg(1) + mbTrans255 := thrift.NewTMemoryBufferLen(len(arg254)) + defer mbTrans255.Close() + _, err256 := mbTrans255.WriteString(arg254) + if err256 != nil { + Usage() + return + } + factory257 := thrift.NewTJSONProtocolFactory() + jsProt258 := factory257.GetProtocol(mbTrans255) + argvalue0 := protocol.NewTid() + err259 := argvalue0.Read(context.Background(), jsProt258) + if err259 != nil { + Usage() + return + } + value0 := argvalue0 + arg260 := flag.Arg(2) + mbTrans261 := thrift.NewTMemoryBufferLen(len(arg260)) + defer mbTrans261.Close() + _, err262 := mbTrans261.WriteString(arg260) + if err262 != nil { + Usage() + return + } + factory263 := thrift.NewTJSONProtocolFactory() + jsProt264 := factory263.GetProtocol(mbTrans261) + argvalue1 := protocol.NewTimAuth() + err265 := argvalue1.Read(context.Background(), jsProt264) + if err265 != nil { + Usage() + return + } + value1 := argvalue1 + fmt.Print(client.TimRemoteUserGet(context.Background(), value0, value1)) + fmt.Print("\n") + break + case "timRemoteUserEdit": + if flag.NArg() - 1 != 3 { + fmt.Fprintln(os.Stderr, "TimRemoteUserEdit requires 3 args") + flag.Usage() + } + arg266 := flag.Arg(1) + mbTrans267 := thrift.NewTMemoryBufferLen(len(arg266)) + defer mbTrans267.Close() + _, err268 := mbTrans267.WriteString(arg266) + if err268 != nil { + Usage() + return + } + factory269 := thrift.NewTJSONProtocolFactory() + jsProt270 := factory269.GetProtocol(mbTrans267) + argvalue0 := protocol.NewTid() + err271 := argvalue0.Read(context.Background(), jsProt270) + if err271 != nil { + Usage() + return + } + value0 := argvalue0 + arg272 := flag.Arg(2) + mbTrans273 := thrift.NewTMemoryBufferLen(len(arg272)) + defer mbTrans273.Close() + _, err274 := mbTrans273.WriteString(arg272) + if err274 != nil { + Usage() + return + } + factory275 := thrift.NewTJSONProtocolFactory() + jsProt276 := factory275.GetProtocol(mbTrans273) + argvalue1 := protocol.NewTimUserBean() + err277 := argvalue1.Read(context.Background(), jsProt276) + if err277 != nil { + Usage() + return + } + value1 := argvalue1 + arg278 := flag.Arg(3) + mbTrans279 := thrift.NewTMemoryBufferLen(len(arg278)) + defer mbTrans279.Close() + _, err280 := mbTrans279.WriteString(arg278) + if err280 != nil { + Usage() + return + } + factory281 := thrift.NewTJSONProtocolFactory() + jsProt282 := factory281.GetProtocol(mbTrans279) + argvalue2 := protocol.NewTimAuth() + err283 := argvalue2.Read(context.Background(), jsProt282) + if err283 != nil { + Usage() + return + } + value2 := argvalue2 + fmt.Print(client.TimRemoteUserEdit(context.Background(), value0, value1, value2)) + fmt.Print("\n") + break + case "timResponsePresence": + if flag.NArg() - 1 != 2 { + fmt.Fprintln(os.Stderr, "TimResponsePresence requires 2 args") + flag.Usage() + } + arg284 := flag.Arg(1) + mbTrans285 := thrift.NewTMemoryBufferLen(len(arg284)) + defer mbTrans285.Close() + _, err286 := mbTrans285.WriteString(arg284) + if err286 != nil { + Usage() + return + } + factory287 := thrift.NewTJSONProtocolFactory() + jsProt288 := factory287.GetProtocol(mbTrans285) + argvalue0 := protocol.NewTimPBean() + err289 := argvalue0.Read(context.Background(), jsProt288) + if err289 != nil { + Usage() + return + } + value0 := argvalue0 + arg290 := flag.Arg(2) + mbTrans291 := thrift.NewTMemoryBufferLen(len(arg290)) + defer mbTrans291.Close() + _, err292 := mbTrans291.WriteString(arg290) + if err292 != nil { + Usage() + return + } + factory293 := thrift.NewTJSONProtocolFactory() + jsProt294 := factory293.GetProtocol(mbTrans291) + argvalue1 := protocol.NewTimAuth() + err295 := argvalue1.Read(context.Background(), jsProt294) + if err295 != nil { + Usage() + return + } + value1 := argvalue1 + fmt.Print(client.TimResponsePresence(context.Background(), value0, value1)) + fmt.Print("\n") + break + case "timResponseMessage": + if flag.NArg() - 1 != 2 { + fmt.Fprintln(os.Stderr, "TimResponseMessage requires 2 args") + flag.Usage() + } + arg296 := flag.Arg(1) + mbTrans297 := thrift.NewTMemoryBufferLen(len(arg296)) + defer mbTrans297.Close() + _, err298 := mbTrans297.WriteString(arg296) + if err298 != nil { + Usage() + return + } + factory299 := thrift.NewTJSONProtocolFactory() + jsProt300 := factory299.GetProtocol(mbTrans297) + argvalue0 := protocol.NewTimMBean() + err301 := argvalue0.Read(context.Background(), jsProt300) + if err301 != nil { + Usage() + return + } + value0 := argvalue0 + arg302 := flag.Arg(2) + mbTrans303 := thrift.NewTMemoryBufferLen(len(arg302)) + defer mbTrans303.Close() + _, err304 := mbTrans303.WriteString(arg302) + if err304 != nil { + Usage() + return + } + factory305 := thrift.NewTJSONProtocolFactory() + jsProt306 := factory305.GetProtocol(mbTrans303) + argvalue1 := protocol.NewTimAuth() + err307 := argvalue1.Read(context.Background(), jsProt306) + if err307 != nil { + Usage() + return + } + value1 := argvalue1 + fmt.Print(client.TimResponseMessage(context.Background(), value0, value1)) + fmt.Print("\n") + break + case "timResponseMessageIq": + if flag.NArg() - 1 != 3 { + fmt.Fprintln(os.Stderr, "TimResponseMessageIq requires 3 args") + flag.Usage() + } + arg308 := flag.Arg(1) + mbTrans309 := thrift.NewTMemoryBufferLen(len(arg308)) + defer mbTrans309.Close() + _, err310 := mbTrans309.WriteString(arg308) + if err310 != nil { + Usage() + return + } + factory311 := thrift.NewTJSONProtocolFactory() + jsProt312 := factory311.GetProtocol(mbTrans309) + argvalue0 := protocol.NewTimMessageIq() + err313 := argvalue0.Read(context.Background(), jsProt312) + if err313 != nil { + Usage() + return + } + value0 := argvalue0 + argvalue1 := flag.Arg(2) + value1 := argvalue1 + arg315 := flag.Arg(3) + mbTrans316 := thrift.NewTMemoryBufferLen(len(arg315)) + defer mbTrans316.Close() + _, err317 := mbTrans316.WriteString(arg315) + if err317 != nil { + Usage() + return + } + factory318 := thrift.NewTJSONProtocolFactory() + jsProt319 := factory318.GetProtocol(mbTrans316) + argvalue2 := protocol.NewTimAuth() + err320 := argvalue2.Read(context.Background(), jsProt319) + if err320 != nil { + Usage() + return + } + value2 := argvalue2 + fmt.Print(client.TimResponseMessageIq(context.Background(), value0, value1, value2)) + fmt.Print("\n") + break + case "timResponsePresenceList": + if flag.NArg() - 1 != 2 { + fmt.Fprintln(os.Stderr, "TimResponsePresenceList requires 2 args") + flag.Usage() + } + arg321 := flag.Arg(1) + mbTrans322 := thrift.NewTMemoryBufferLen(len(arg321)) + defer mbTrans322.Close() + _, err323 := mbTrans322.WriteString(arg321) + if err323 != nil { + Usage() + return + } + factory324 := thrift.NewTJSONProtocolFactory() + jsProt325 := factory324.GetProtocol(mbTrans322) + argvalue0 := protocol.NewTimPBeanList() + err326 := argvalue0.Read(context.Background(), jsProt325) + if err326 != nil { + Usage() + return + } + value0 := argvalue0 + arg327 := flag.Arg(2) + mbTrans328 := thrift.NewTMemoryBufferLen(len(arg327)) + defer mbTrans328.Close() + _, err329 := mbTrans328.WriteString(arg327) + if err329 != nil { + Usage() + return + } + factory330 := thrift.NewTJSONProtocolFactory() + jsProt331 := factory330.GetProtocol(mbTrans328) + argvalue1 := protocol.NewTimAuth() + err332 := argvalue1.Read(context.Background(), jsProt331) + if err332 != nil { + Usage() + return + } + value1 := argvalue1 + fmt.Print(client.TimResponsePresenceList(context.Background(), value0, value1)) + fmt.Print("\n") + break + case "timResponseMessageList": + if flag.NArg() - 1 != 2 { + fmt.Fprintln(os.Stderr, "TimResponseMessageList requires 2 args") + flag.Usage() + } + arg333 := flag.Arg(1) + mbTrans334 := thrift.NewTMemoryBufferLen(len(arg333)) + defer mbTrans334.Close() + _, err335 := mbTrans334.WriteString(arg333) + if err335 != nil { + Usage() + return + } + factory336 := thrift.NewTJSONProtocolFactory() + jsProt337 := factory336.GetProtocol(mbTrans334) + argvalue0 := protocol.NewTimMBeanList() + err338 := argvalue0.Read(context.Background(), jsProt337) + if err338 != nil { + Usage() + return + } + value0 := argvalue0 + arg339 := flag.Arg(2) + mbTrans340 := thrift.NewTMemoryBufferLen(len(arg339)) + defer mbTrans340.Close() + _, err341 := mbTrans340.WriteString(arg339) + if err341 != nil { + Usage() + return + } + factory342 := thrift.NewTJSONProtocolFactory() + jsProt343 := factory342.GetProtocol(mbTrans340) + argvalue1 := protocol.NewTimAuth() + err344 := argvalue1.Read(context.Background(), jsProt343) + if err344 != nil { + Usage() + return + } + value1 := argvalue1 + fmt.Print(client.TimResponseMessageList(context.Background(), value0, value1)) + fmt.Print("\n") + break + case "": + Usage() + break + default: + fmt.Fprintln(os.Stderr, "Invalid function ", cmd) + } +} diff --git a/tim.protocol/constants.go b/protocol/tim-consts.go similarity index 60% rename from tim.protocol/constants.go rename to protocol/tim-consts.go index 8f1bc92..8f13ef8 100644 --- a/tim.protocol/constants.go +++ b/protocol/tim-consts.go @@ -1,17 +1,22 @@ -// Autogenerated by Thrift Compiler (0.9.3) -// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +// Code generated by Thrift Compiler (0.17.0). DO NOT EDIT. package protocol import ( "bytes" + "context" + "errors" "fmt" - "git.apache.org/thrift.git/lib/go/thrift" + "time" + thrift "github.com/apache/thrift/lib/go/thrift" ) // (needed to ensure safety because of naive import list construction.) var _ = thrift.ZERO var _ = fmt.Printf +var _ = errors.New +var _ = context.Background +var _ = time.Now var _ = bytes.Equal const Protocolversion = 4 @@ -21,3 +26,4 @@ const TIM_SC_FAILED = "400" func init() { } + diff --git a/protocol/tim.go b/protocol/tim.go new file mode 100644 index 0000000..4974d73 --- /dev/null +++ b/protocol/tim.go @@ -0,0 +1,14297 @@ +// Code generated by Thrift Compiler (0.17.0). DO NOT EDIT. + +package protocol + +import ( + "bytes" + "context" + "errors" + "fmt" + "time" + "github.com/apache/thrift/lib/go/thrift" +) + +// (needed to ensure safety because of naive import list construction.) +var _ = thrift.ZERO +var _ = fmt.Printf +var _ = errors.New +var _ = context.Background +var _ = time.Now +var _ = bytes.Equal + +// Attributes: +// - ErrCode: 错误码 +// - ErrMsg: 错误内容 +type TimError struct { + ErrCode *int32 `thrift:"errCode,1" db:"errCode" json:"errCode,omitempty"` + ErrMsg *string `thrift:"errMsg,2" db:"errMsg" json:"errMsg,omitempty"` +} + +func NewTimError() *TimError { + return &TimError{} +} + +var TimError_ErrCode_DEFAULT int32 +func (p *TimError) GetErrCode() int32 { + if !p.IsSetErrCode() { + return TimError_ErrCode_DEFAULT + } +return *p.ErrCode +} +var TimError_ErrMsg_DEFAULT string +func (p *TimError) GetErrMsg() string { + if !p.IsSetErrMsg() { + return TimError_ErrMsg_DEFAULT + } +return *p.ErrMsg +} +func (p *TimError) IsSetErrCode() bool { + return p.ErrCode != nil +} + +func (p *TimError) IsSetErrMsg() bool { + return p.ErrMsg != nil +} + +func (p *TimError) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.I32 { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimError) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.ErrCode = &v +} + return nil +} + +func (p *TimError) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.ErrMsg = &v +} + return nil +} + +func (p *TimError) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimError"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimError) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetErrCode() { + if err := oprot.WriteFieldBegin(ctx, "errCode", thrift.I32, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:errCode: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.ErrCode)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.errCode (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:errCode: ", p), err) } + } + return err +} + +func (p *TimError) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetErrMsg() { + if err := oprot.WriteFieldBegin(ctx, "errMsg", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:errMsg: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.ErrMsg)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.errMsg (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:errMsg: ", p), err) } + } + return err +} + +func (p *TimError) Equals(other *TimError) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.ErrCode != other.ErrCode { + if p.ErrCode == nil || other.ErrCode == nil { + return false + } + if (*p.ErrCode) != (*other.ErrCode) { return false } + } + if p.ErrMsg != other.ErrMsg { + if p.ErrMsg == nil || other.ErrMsg == nil { + return false + } + if (*p.ErrMsg) != (*other.ErrMsg) { return false } + } + return true +} + +func (p *TimError) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimError(%+v)", *p) +} + +// Attributes: +// - Key: 键 +// - Value: 值 +type TimNode struct { + Key *string `thrift:"key,1" db:"key" json:"key,omitempty"` + Value *string `thrift:"value,2" db:"value" json:"value,omitempty"` +} + +func NewTimNode() *TimNode { + return &TimNode{} +} + +var TimNode_Key_DEFAULT string +func (p *TimNode) GetKey() string { + if !p.IsSetKey() { + return TimNode_Key_DEFAULT + } +return *p.Key +} +var TimNode_Value_DEFAULT string +func (p *TimNode) GetValue() string { + if !p.IsSetValue() { + return TimNode_Value_DEFAULT + } +return *p.Value +} +func (p *TimNode) IsSetKey() bool { + return p.Key != nil +} + +func (p *TimNode) IsSetValue() bool { + return p.Value != nil +} + +func (p *TimNode) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimNode) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Key = &v +} + return nil +} + +func (p *TimNode) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Value = &v +} + return nil +} + +func (p *TimNode) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimNode"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimNode) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetKey() { + if err := oprot.WriteFieldBegin(ctx, "key", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:key: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Key)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.key (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:key: ", p), err) } + } + return err +} + +func (p *TimNode) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetValue() { + if err := oprot.WriteFieldBegin(ctx, "value", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:value: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Value)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.value (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:value: ", p), err) } + } + return err +} + +func (p *TimNode) Equals(other *TimNode) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Key != other.Key { + if p.Key == nil || other.Key == nil { + return false + } + if (*p.Key) != (*other.Key) { return false } + } + if p.Value != other.Value { + if p.Value == nil || other.Value == nil { + return false + } + if (*p.Value) != (*other.Value) { return false } + } + return true +} + +func (p *TimNode) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimNode(%+v)", *p) +} + +// Attributes: +// - ID: id,返回所要回执协议的线程id +// - AckType: 类型,自定义 如:ping,message等 +// - AckStatus: 状态,如成功,失败等 +// - ExtraList: 附加信息 +// - Err: 错误信息 +// - ExtraMap +type TimAckBean struct { + ID *string `thrift:"id,1" db:"id" json:"id,omitempty"` + AckType *string `thrift:"ackType,2" db:"ackType" json:"ackType,omitempty"` + AckStatus *string `thrift:"ackStatus,3" db:"ackStatus" json:"ackStatus,omitempty"` + ExtraList []*TimNode `thrift:"extraList,4" db:"extraList" json:"extraList,omitempty"` + Err *TimError `thrift:"err,5" db:"err" json:"err,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,6" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimAckBean() *TimAckBean { + return &TimAckBean{} +} + +var TimAckBean_ID_DEFAULT string +func (p *TimAckBean) GetID() string { + if !p.IsSetID() { + return TimAckBean_ID_DEFAULT + } +return *p.ID +} +var TimAckBean_AckType_DEFAULT string +func (p *TimAckBean) GetAckType() string { + if !p.IsSetAckType() { + return TimAckBean_AckType_DEFAULT + } +return *p.AckType +} +var TimAckBean_AckStatus_DEFAULT string +func (p *TimAckBean) GetAckStatus() string { + if !p.IsSetAckStatus() { + return TimAckBean_AckStatus_DEFAULT + } +return *p.AckStatus +} +var TimAckBean_ExtraList_DEFAULT []*TimNode + +func (p *TimAckBean) GetExtraList() []*TimNode { + return p.ExtraList +} +var TimAckBean_Err_DEFAULT *TimError +func (p *TimAckBean) GetErr() *TimError { + if !p.IsSetErr() { + return TimAckBean_Err_DEFAULT + } +return p.Err +} +var TimAckBean_ExtraMap_DEFAULT map[string]string + +func (p *TimAckBean) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimAckBean) IsSetID() bool { + return p.ID != nil +} + +func (p *TimAckBean) IsSetAckType() bool { + return p.AckType != nil +} + +func (p *TimAckBean) IsSetAckStatus() bool { + return p.AckStatus != nil +} + +func (p *TimAckBean) IsSetExtraList() bool { + return p.ExtraList != nil +} + +func (p *TimAckBean) IsSetErr() bool { + return p.Err != nil +} + +func (p *TimAckBean) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimAckBean) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.LIST { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.MAP { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimAckBean) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.ID = &v +} + return nil +} + +func (p *TimAckBean) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.AckType = &v +} + return nil +} + +func (p *TimAckBean) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.AckStatus = &v +} + return nil +} + +func (p *TimAckBean) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TimNode, 0, size) + p.ExtraList = tSlice + for i := 0; i < size; i ++ { + _elem0 := &TimNode{} + if err := _elem0.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem0), err) + } + p.ExtraList = append(p.ExtraList, _elem0) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimAckBean) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + p.Err = &TimError{} + if err := p.Err.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Err), err) + } + return nil +} + +func (p *TimAckBean) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key1 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key1 = v +} +var _val2 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val2 = v +} + p.ExtraMap[_key1] = _val2 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimAckBean) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimAckBean"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimAckBean) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetID() { + if err := oprot.WriteFieldBegin(ctx, "id", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:id: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.ID)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.id (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:id: ", p), err) } + } + return err +} + +func (p *TimAckBean) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetAckType() { + if err := oprot.WriteFieldBegin(ctx, "ackType", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:ackType: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.AckType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.ackType (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:ackType: ", p), err) } + } + return err +} + +func (p *TimAckBean) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetAckStatus() { + if err := oprot.WriteFieldBegin(ctx, "ackStatus", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:ackStatus: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.AckStatus)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.ackStatus (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:ackStatus: ", p), err) } + } + return err +} + +func (p *TimAckBean) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraList() { + if err := oprot.WriteFieldBegin(ctx, "extraList", thrift.LIST, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ExtraList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ExtraList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraList: ", p), err) } + } + return err +} + +func (p *TimAckBean) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetErr() { + if err := oprot.WriteFieldBegin(ctx, "err", thrift.STRUCT, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:err: ", p), err) } + if err := p.Err.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Err), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:err: ", p), err) } + } + return err +} + +func (p *TimAckBean) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:extraMap: ", p), err) } + } + return err +} + +func (p *TimAckBean) Equals(other *TimAckBean) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.ID != other.ID { + if p.ID == nil || other.ID == nil { + return false + } + if (*p.ID) != (*other.ID) { return false } + } + if p.AckType != other.AckType { + if p.AckType == nil || other.AckType == nil { + return false + } + if (*p.AckType) != (*other.AckType) { return false } + } + if p.AckStatus != other.AckStatus { + if p.AckStatus == nil || other.AckStatus == nil { + return false + } + if (*p.AckStatus) != (*other.AckStatus) { return false } + } + if len(p.ExtraList) != len(other.ExtraList) { return false } + for i, _tgt := range p.ExtraList { + _src3 := other.ExtraList[i] + if !_tgt.Equals(_src3) { return false } + } + if !p.Err.Equals(other.Err) { return false } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src4 := other.ExtraMap[k] + if _tgt != _src4 { return false } + } + return true +} + +func (p *TimAckBean) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimAckBean(%+v)", *p) +} + +// Attributes: +// - Chl: 渠道 +// - Platform: 平台 +// - Version: version 客户端协议版本 +type TimHBean struct { + Chl int32 `thrift:"chl,1,required" db:"chl" json:"chl"` + Platform *int32 `thrift:"platform,2" db:"platform" json:"platform,omitempty"` + Version int16 `thrift:"version,3,required" db:"version" json:"version"` +} + +func NewTimHBean() *TimHBean { + return &TimHBean{} +} + + +func (p *TimHBean) GetChl() int32 { + return p.Chl +} +var TimHBean_Platform_DEFAULT int32 +func (p *TimHBean) GetPlatform() int32 { + if !p.IsSetPlatform() { + return TimHBean_Platform_DEFAULT + } +return *p.Platform +} + +func (p *TimHBean) GetVersion() int16 { + return p.Version +} +func (p *TimHBean) IsSetPlatform() bool { + return p.Platform != nil +} + +func (p *TimHBean) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetChl bool = false; + var issetVersion bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.I32 { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetChl = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.I32 { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.I16 { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + issetVersion = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetChl{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Chl is not set")); + } + if !issetVersion{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Version is not set")); + } + return nil +} + +func (p *TimHBean) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Chl = v +} + return nil +} + +func (p *TimHBean) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Platform = &v +} + return nil +} + +func (p *TimHBean) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI16(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Version = v +} + return nil +} + +func (p *TimHBean) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimHBean"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimHBean) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "chl", thrift.I32, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:chl: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.Chl)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.chl (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:chl: ", p), err) } + return err +} + +func (p *TimHBean) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetPlatform() { + if err := oprot.WriteFieldBegin(ctx, "platform", thrift.I32, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:platform: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.Platform)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.platform (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:platform: ", p), err) } + } + return err +} + +func (p *TimHBean) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "version", thrift.I16, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:version: ", p), err) } + if err := oprot.WriteI16(ctx, int16(p.Version)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.version (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:version: ", p), err) } + return err +} + +func (p *TimHBean) Equals(other *TimHBean) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Chl != other.Chl { return false } + if p.Platform != other.Platform { + if p.Platform == nil || other.Platform == nil { + return false + } + if (*p.Platform) != (*other.Platform) { return false } + } + if p.Version != other.Version { return false } + return true +} + +func (p *TimHBean) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimHBean(%+v)", *p) +} + +// Attributes: +// - Timestamp: 服务器时间 +// - Version: 版本 +// - Lang: 语言 +// - ExtraList: 附加信息 +// - ExtraMap +// - Interflow: 消息合流 +// - TLS: tls +type TimParam struct { + Timestamp *string `thrift:"timestamp,1" db:"timestamp" json:"timestamp,omitempty"` + Version *int16 `thrift:"version,2" db:"version" json:"version,omitempty"` + Lang *string `thrift:"lang,3" db:"lang" json:"lang,omitempty"` + ExtraList []*TimNode `thrift:"extraList,4" db:"extraList" json:"extraList,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,5" db:"extraMap" json:"extraMap,omitempty"` + Interflow *string `thrift:"interflow,6" db:"interflow" json:"interflow,omitempty"` + TLS *string `thrift:"tls,7" db:"tls" json:"tls,omitempty"` +} + +func NewTimParam() *TimParam { + return &TimParam{} +} + +var TimParam_Timestamp_DEFAULT string +func (p *TimParam) GetTimestamp() string { + if !p.IsSetTimestamp() { + return TimParam_Timestamp_DEFAULT + } +return *p.Timestamp +} +var TimParam_Version_DEFAULT int16 +func (p *TimParam) GetVersion() int16 { + if !p.IsSetVersion() { + return TimParam_Version_DEFAULT + } +return *p.Version +} +var TimParam_Lang_DEFAULT string +func (p *TimParam) GetLang() string { + if !p.IsSetLang() { + return TimParam_Lang_DEFAULT + } +return *p.Lang +} +var TimParam_ExtraList_DEFAULT []*TimNode + +func (p *TimParam) GetExtraList() []*TimNode { + return p.ExtraList +} +var TimParam_ExtraMap_DEFAULT map[string]string + +func (p *TimParam) GetExtraMap() map[string]string { + return p.ExtraMap +} +var TimParam_Interflow_DEFAULT string +func (p *TimParam) GetInterflow() string { + if !p.IsSetInterflow() { + return TimParam_Interflow_DEFAULT + } +return *p.Interflow +} +var TimParam_TLS_DEFAULT string +func (p *TimParam) GetTLS() string { + if !p.IsSetTLS() { + return TimParam_TLS_DEFAULT + } +return *p.TLS +} +func (p *TimParam) IsSetTimestamp() bool { + return p.Timestamp != nil +} + +func (p *TimParam) IsSetVersion() bool { + return p.Version != nil +} + +func (p *TimParam) IsSetLang() bool { + return p.Lang != nil +} + +func (p *TimParam) IsSetExtraList() bool { + return p.ExtraList != nil +} + +func (p *TimParam) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimParam) IsSetInterflow() bool { + return p.Interflow != nil +} + +func (p *TimParam) IsSetTLS() bool { + return p.TLS != nil +} + +func (p *TimParam) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.I16 { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.LIST { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.MAP { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.STRING { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.STRING { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimParam) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Timestamp = &v +} + return nil +} + +func (p *TimParam) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI16(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Version = &v +} + return nil +} + +func (p *TimParam) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Lang = &v +} + return nil +} + +func (p *TimParam) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TimNode, 0, size) + p.ExtraList = tSlice + for i := 0; i < size; i ++ { + _elem5 := &TimNode{} + if err := _elem5.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem5), err) + } + p.ExtraList = append(p.ExtraList, _elem5) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimParam) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key6 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key6 = v +} +var _val7 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val7 = v +} + p.ExtraMap[_key6] = _val7 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimParam) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) +} else { + p.Interflow = &v +} + return nil +} + +func (p *TimParam) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 7: ", err) +} else { + p.TLS = &v +} + return nil +} + +func (p *TimParam) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimParam"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimParam) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimestamp() { + if err := oprot.WriteFieldBegin(ctx, "timestamp", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:timestamp: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Timestamp)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.timestamp (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:timestamp: ", p), err) } + } + return err +} + +func (p *TimParam) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetVersion() { + if err := oprot.WriteFieldBegin(ctx, "version", thrift.I16, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:version: ", p), err) } + if err := oprot.WriteI16(ctx, int16(*p.Version)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.version (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:version: ", p), err) } + } + return err +} + +func (p *TimParam) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetLang() { + if err := oprot.WriteFieldBegin(ctx, "lang", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:lang: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Lang)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.lang (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:lang: ", p), err) } + } + return err +} + +func (p *TimParam) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraList() { + if err := oprot.WriteFieldBegin(ctx, "extraList", thrift.LIST, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ExtraList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ExtraList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraList: ", p), err) } + } + return err +} + +func (p *TimParam) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:extraMap: ", p), err) } + } + return err +} + +func (p *TimParam) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetInterflow() { + if err := oprot.WriteFieldBegin(ctx, "interflow", thrift.STRING, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:interflow: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Interflow)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.interflow (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:interflow: ", p), err) } + } + return err +} + +func (p *TimParam) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTLS() { + if err := oprot.WriteFieldBegin(ctx, "tls", thrift.STRING, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:tls: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.TLS)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.tls (7) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:tls: ", p), err) } + } + return err +} + +func (p *TimParam) Equals(other *TimParam) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Timestamp != other.Timestamp { + if p.Timestamp == nil || other.Timestamp == nil { + return false + } + if (*p.Timestamp) != (*other.Timestamp) { return false } + } + if p.Version != other.Version { + if p.Version == nil || other.Version == nil { + return false + } + if (*p.Version) != (*other.Version) { return false } + } + if p.Lang != other.Lang { + if p.Lang == nil || other.Lang == nil { + return false + } + if (*p.Lang) != (*other.Lang) { return false } + } + if len(p.ExtraList) != len(other.ExtraList) { return false } + for i, _tgt := range p.ExtraList { + _src8 := other.ExtraList[i] + if !_tgt.Equals(_src8) { return false } + } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src9 := other.ExtraMap[k] + if _tgt != _src9 { return false } + } + if p.Interflow != other.Interflow { + if p.Interflow == nil || other.Interflow == nil { + return false + } + if (*p.Interflow) != (*other.Interflow) { return false } + } + if p.TLS != other.TLS { + if p.TLS == nil || other.TLS == nil { + return false + } + if (*p.TLS) != (*other.TLS) { return false } + } + return true +} + +func (p *TimParam) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimParam(%+v)", *p) +} + +// Attributes: +// - Timestamp: 时间戳 (毫秒) +// - Formattime: 格式化时间 +type TimTime struct { + Timestamp *string `thrift:"timestamp,1" db:"timestamp" json:"timestamp,omitempty"` + Formattime *string `thrift:"formattime,2" db:"formattime" json:"formattime,omitempty"` +} + +func NewTimTime() *TimTime { + return &TimTime{} +} + +var TimTime_Timestamp_DEFAULT string +func (p *TimTime) GetTimestamp() string { + if !p.IsSetTimestamp() { + return TimTime_Timestamp_DEFAULT + } +return *p.Timestamp +} +var TimTime_Formattime_DEFAULT string +func (p *TimTime) GetFormattime() string { + if !p.IsSetFormattime() { + return TimTime_Formattime_DEFAULT + } +return *p.Formattime +} +func (p *TimTime) IsSetTimestamp() bool { + return p.Timestamp != nil +} + +func (p *TimTime) IsSetFormattime() bool { + return p.Formattime != nil +} + +func (p *TimTime) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimTime) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Timestamp = &v +} + return nil +} + +func (p *TimTime) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Formattime = &v +} + return nil +} + +func (p *TimTime) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimTime"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimTime) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimestamp() { + if err := oprot.WriteFieldBegin(ctx, "timestamp", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:timestamp: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Timestamp)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.timestamp (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:timestamp: ", p), err) } + } + return err +} + +func (p *TimTime) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetFormattime() { + if err := oprot.WriteFieldBegin(ctx, "formattime", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:formattime: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Formattime)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.formattime (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:formattime: ", p), err) } + } + return err +} + +func (p *TimTime) Equals(other *TimTime) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Timestamp != other.Timestamp { + if p.Timestamp == nil || other.Timestamp == nil { + return false + } + if (*p.Timestamp) != (*other.Timestamp) { return false } + } + if p.Formattime != other.Formattime { + if p.Formattime == nil || other.Formattime == nil { + return false + } + if (*p.Formattime) != (*other.Formattime) { return false } + } + return true +} + +func (p *TimTime) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimTime(%+v)", *p) +} + +// Attributes: +// - Country: 国家 +// - Province: 省 +// - City: 市 +// - ExtraList: 附加信息:如区,镇,乡等 +// - ExtraMap +type TimArea struct { + Country *string `thrift:"country,1" db:"country" json:"country,omitempty"` + Province *string `thrift:"province,2" db:"province" json:"province,omitempty"` + City *string `thrift:"city,3" db:"city" json:"city,omitempty"` + ExtraList []*TimNode `thrift:"extraList,4" db:"extraList" json:"extraList,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,5" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimArea() *TimArea { + return &TimArea{} +} + +var TimArea_Country_DEFAULT string +func (p *TimArea) GetCountry() string { + if !p.IsSetCountry() { + return TimArea_Country_DEFAULT + } +return *p.Country +} +var TimArea_Province_DEFAULT string +func (p *TimArea) GetProvince() string { + if !p.IsSetProvince() { + return TimArea_Province_DEFAULT + } +return *p.Province +} +var TimArea_City_DEFAULT string +func (p *TimArea) GetCity() string { + if !p.IsSetCity() { + return TimArea_City_DEFAULT + } +return *p.City +} +var TimArea_ExtraList_DEFAULT []*TimNode + +func (p *TimArea) GetExtraList() []*TimNode { + return p.ExtraList +} +var TimArea_ExtraMap_DEFAULT map[string]string + +func (p *TimArea) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimArea) IsSetCountry() bool { + return p.Country != nil +} + +func (p *TimArea) IsSetProvince() bool { + return p.Province != nil +} + +func (p *TimArea) IsSetCity() bool { + return p.City != nil +} + +func (p *TimArea) IsSetExtraList() bool { + return p.ExtraList != nil +} + +func (p *TimArea) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimArea) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.LIST { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.MAP { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimArea) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Country = &v +} + return nil +} + +func (p *TimArea) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Province = &v +} + return nil +} + +func (p *TimArea) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.City = &v +} + return nil +} + +func (p *TimArea) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TimNode, 0, size) + p.ExtraList = tSlice + for i := 0; i < size; i ++ { + _elem10 := &TimNode{} + if err := _elem10.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem10), err) + } + p.ExtraList = append(p.ExtraList, _elem10) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimArea) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key11 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key11 = v +} +var _val12 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val12 = v +} + p.ExtraMap[_key11] = _val12 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimArea) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimArea"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimArea) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetCountry() { + if err := oprot.WriteFieldBegin(ctx, "country", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:country: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Country)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.country (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:country: ", p), err) } + } + return err +} + +func (p *TimArea) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetProvince() { + if err := oprot.WriteFieldBegin(ctx, "province", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:province: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Province)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.province (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:province: ", p), err) } + } + return err +} + +func (p *TimArea) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetCity() { + if err := oprot.WriteFieldBegin(ctx, "city", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:city: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.City)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.city (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:city: ", p), err) } + } + return err +} + +func (p *TimArea) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraList() { + if err := oprot.WriteFieldBegin(ctx, "extraList", thrift.LIST, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ExtraList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ExtraList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraList: ", p), err) } + } + return err +} + +func (p *TimArea) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:extraMap: ", p), err) } + } + return err +} + +func (p *TimArea) Equals(other *TimArea) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Country != other.Country { + if p.Country == nil || other.Country == nil { + return false + } + if (*p.Country) != (*other.Country) { return false } + } + if p.Province != other.Province { + if p.Province == nil || other.Province == nil { + return false + } + if (*p.Province) != (*other.Province) { return false } + } + if p.City != other.City { + if p.City == nil || other.City == nil { + return false + } + if (*p.City) != (*other.City) { return false } + } + if len(p.ExtraList) != len(other.ExtraList) { return false } + for i, _tgt := range p.ExtraList { + _src13 := other.ExtraList[i] + if !_tgt.Equals(_src13) { return false } + } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src14 := other.ExtraMap[k] + if _tgt != _src14 { return false } + } + return true +} + +func (p *TimArea) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimArea(%+v)", *p) +} + +// Attributes: +// - Name: 登陆名 用户登录号,房间号等 +// - Domain: 域名 用于区分渠道等 appid,appsecret +// - Resource: 系统 自行约定 如 : 1IOS,2android,3H5,4WEB 等 +// - Type: normal,group +// - ExtraList: 附加信息:如传递客户端信息 iphone6,xiaomi,huawei等 +// - ExtraMap +type Tid struct { + Name string `thrift:"name,1,required" db:"name" json:"name"` + Domain *string `thrift:"domain,2" db:"domain" json:"domain,omitempty"` + Resource *string `thrift:"resource,3" db:"resource" json:"resource,omitempty"` + Type *string `thrift:"type,4" db:"type" json:"type,omitempty"` + ExtraList []*TimNode `thrift:"extraList,5" db:"extraList" json:"extraList,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,6" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTid() *Tid { + return &Tid{} +} + + +func (p *Tid) GetName() string { + return p.Name +} +var Tid_Domain_DEFAULT string +func (p *Tid) GetDomain() string { + if !p.IsSetDomain() { + return Tid_Domain_DEFAULT + } +return *p.Domain +} +var Tid_Resource_DEFAULT string +func (p *Tid) GetResource() string { + if !p.IsSetResource() { + return Tid_Resource_DEFAULT + } +return *p.Resource +} +var Tid_Type_DEFAULT string +func (p *Tid) GetType() string { + if !p.IsSetType() { + return Tid_Type_DEFAULT + } +return *p.Type +} +var Tid_ExtraList_DEFAULT []*TimNode + +func (p *Tid) GetExtraList() []*TimNode { + return p.ExtraList +} +var Tid_ExtraMap_DEFAULT map[string]string + +func (p *Tid) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *Tid) IsSetDomain() bool { + return p.Domain != nil +} + +func (p *Tid) IsSetResource() bool { + return p.Resource != nil +} + +func (p *Tid) IsSetType() bool { + return p.Type != nil +} + +func (p *Tid) IsSetExtraList() bool { + return p.ExtraList != nil +} + +func (p *Tid) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *Tid) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetName bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.STRING { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.LIST { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.MAP { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set")); + } + return nil +} + +func (p *Tid) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Name = v +} + return nil +} + +func (p *Tid) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Domain = &v +} + return nil +} + +func (p *Tid) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Resource = &v +} + return nil +} + +func (p *Tid) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.Type = &v +} + return nil +} + +func (p *Tid) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TimNode, 0, size) + p.ExtraList = tSlice + for i := 0; i < size; i ++ { + _elem15 := &TimNode{} + if err := _elem15.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem15), err) + } + p.ExtraList = append(p.ExtraList, _elem15) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *Tid) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key16 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key16 = v +} +var _val17 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val17 = v +} + p.ExtraMap[_key16] = _val17 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *Tid) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "Tid"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *Tid) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Name)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.name (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } + return err +} + +func (p *Tid) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetDomain() { + if err := oprot.WriteFieldBegin(ctx, "domain", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:domain: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Domain)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.domain (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:domain: ", p), err) } + } + return err +} + +func (p *Tid) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetResource() { + if err := oprot.WriteFieldBegin(ctx, "resource", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:resource: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Resource)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.resource (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:resource: ", p), err) } + } + return err +} + +func (p *Tid) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetType() { + if err := oprot.WriteFieldBegin(ctx, "type", thrift.STRING, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:type: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Type)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.type (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:type: ", p), err) } + } + return err +} + +func (p *Tid) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraList() { + if err := oprot.WriteFieldBegin(ctx, "extraList", thrift.LIST, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:extraList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ExtraList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ExtraList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:extraList: ", p), err) } + } + return err +} + +func (p *Tid) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:extraMap: ", p), err) } + } + return err +} + +func (p *Tid) Equals(other *Tid) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Name != other.Name { return false } + if p.Domain != other.Domain { + if p.Domain == nil || other.Domain == nil { + return false + } + if (*p.Domain) != (*other.Domain) { return false } + } + if p.Resource != other.Resource { + if p.Resource == nil || other.Resource == nil { + return false + } + if (*p.Resource) != (*other.Resource) { return false } + } + if p.Type != other.Type { + if p.Type == nil || other.Type == nil { + return false + } + if (*p.Type) != (*other.Type) { return false } + } + if len(p.ExtraList) != len(other.ExtraList) { return false } + for i, _tgt := range p.ExtraList { + _src18 := other.ExtraList[i] + if !_tgt.Equals(_src18) { return false } + } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src19 := other.ExtraMap[k] + if _tgt != _src19 { return false } + } + return true +} + +func (p *Tid) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("Tid(%+v)", *p) +} + +// Attributes: +// - Tid: 用户bean +// - Nickname: 昵称 +// - Remarkname: 备注名称 +// - Brithday: 生日 2000-01-01 +// - Gender: 性别 自行约定 如 : 0不知,1男,2女 +// - Headurl: 头像地址 http://xxx.jpg +// - Area: 地区 +// - Headbyte: 头像 +// - PhotoBytes: 其他图片 +// - ExtraList: 扩展字段 +// - ExtraMap +type TimUserBean struct { + Tid *Tid `thrift:"tid,1" db:"tid" json:"tid,omitempty"` + Nickname *string `thrift:"nickname,2" db:"nickname" json:"nickname,omitempty"` + Remarkname *string `thrift:"remarkname,3" db:"remarkname" json:"remarkname,omitempty"` + Brithday *string `thrift:"brithday,4" db:"brithday" json:"brithday,omitempty"` + Gender *int16 `thrift:"gender,5" db:"gender" json:"gender,omitempty"` + Headurl *string `thrift:"headurl,6" db:"headurl" json:"headurl,omitempty"` + Area *TimArea `thrift:"area,7" db:"area" json:"area,omitempty"` + Headbyte []byte `thrift:"headbyte,8" db:"headbyte" json:"headbyte,omitempty"` + PhotoBytes [][]byte `thrift:"photoBytes,9" db:"photoBytes" json:"photoBytes,omitempty"` + ExtraList []*TimNode `thrift:"extraList,10" db:"extraList" json:"extraList,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,11" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimUserBean() *TimUserBean { + return &TimUserBean{} +} + +var TimUserBean_Tid_DEFAULT *Tid +func (p *TimUserBean) GetTid() *Tid { + if !p.IsSetTid() { + return TimUserBean_Tid_DEFAULT + } +return p.Tid +} +var TimUserBean_Nickname_DEFAULT string +func (p *TimUserBean) GetNickname() string { + if !p.IsSetNickname() { + return TimUserBean_Nickname_DEFAULT + } +return *p.Nickname +} +var TimUserBean_Remarkname_DEFAULT string +func (p *TimUserBean) GetRemarkname() string { + if !p.IsSetRemarkname() { + return TimUserBean_Remarkname_DEFAULT + } +return *p.Remarkname +} +var TimUserBean_Brithday_DEFAULT string +func (p *TimUserBean) GetBrithday() string { + if !p.IsSetBrithday() { + return TimUserBean_Brithday_DEFAULT + } +return *p.Brithday +} +var TimUserBean_Gender_DEFAULT int16 +func (p *TimUserBean) GetGender() int16 { + if !p.IsSetGender() { + return TimUserBean_Gender_DEFAULT + } +return *p.Gender +} +var TimUserBean_Headurl_DEFAULT string +func (p *TimUserBean) GetHeadurl() string { + if !p.IsSetHeadurl() { + return TimUserBean_Headurl_DEFAULT + } +return *p.Headurl +} +var TimUserBean_Area_DEFAULT *TimArea +func (p *TimUserBean) GetArea() *TimArea { + if !p.IsSetArea() { + return TimUserBean_Area_DEFAULT + } +return p.Area +} +var TimUserBean_Headbyte_DEFAULT []byte + +func (p *TimUserBean) GetHeadbyte() []byte { + return p.Headbyte +} +var TimUserBean_PhotoBytes_DEFAULT [][]byte + +func (p *TimUserBean) GetPhotoBytes() [][]byte { + return p.PhotoBytes +} +var TimUserBean_ExtraList_DEFAULT []*TimNode + +func (p *TimUserBean) GetExtraList() []*TimNode { + return p.ExtraList +} +var TimUserBean_ExtraMap_DEFAULT map[string]string + +func (p *TimUserBean) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimUserBean) IsSetTid() bool { + return p.Tid != nil +} + +func (p *TimUserBean) IsSetNickname() bool { + return p.Nickname != nil +} + +func (p *TimUserBean) IsSetRemarkname() bool { + return p.Remarkname != nil +} + +func (p *TimUserBean) IsSetBrithday() bool { + return p.Brithday != nil +} + +func (p *TimUserBean) IsSetGender() bool { + return p.Gender != nil +} + +func (p *TimUserBean) IsSetHeadurl() bool { + return p.Headurl != nil +} + +func (p *TimUserBean) IsSetArea() bool { + return p.Area != nil +} + +func (p *TimUserBean) IsSetHeadbyte() bool { + return p.Headbyte != nil +} + +func (p *TimUserBean) IsSetPhotoBytes() bool { + return p.PhotoBytes != nil +} + +func (p *TimUserBean) IsSetExtraList() bool { + return p.ExtraList != nil +} + +func (p *TimUserBean) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimUserBean) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.STRING { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.I16 { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.STRING { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 8: + if fieldTypeId == thrift.STRING { + if err := p.ReadField8(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 9: + if fieldTypeId == thrift.LIST { + if err := p.ReadField9(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 10: + if fieldTypeId == thrift.LIST { + if err := p.ReadField10(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 11: + if fieldTypeId == thrift.MAP { + if err := p.ReadField11(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimUserBean) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Tid = &Tid{} + if err := p.Tid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) + } + return nil +} + +func (p *TimUserBean) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Nickname = &v +} + return nil +} + +func (p *TimUserBean) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Remarkname = &v +} + return nil +} + +func (p *TimUserBean) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.Brithday = &v +} + return nil +} + +func (p *TimUserBean) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI16(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) +} else { + p.Gender = &v +} + return nil +} + +func (p *TimUserBean) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) +} else { + p.Headurl = &v +} + return nil +} + +func (p *TimUserBean) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + p.Area = &TimArea{} + if err := p.Area.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Area), err) + } + return nil +} + +func (p *TimUserBean) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 8: ", err) +} else { + p.Headbyte = v +} + return nil +} + +func (p *TimUserBean) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([][]byte, 0, size) + p.PhotoBytes = tSlice + for i := 0; i < size; i ++ { +var _elem20 []byte + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem20 = v +} + p.PhotoBytes = append(p.PhotoBytes, _elem20) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimUserBean) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TimNode, 0, size) + p.ExtraList = tSlice + for i := 0; i < size; i ++ { + _elem21 := &TimNode{} + if err := _elem21.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem21), err) + } + p.ExtraList = append(p.ExtraList, _elem21) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimUserBean) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key22 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key22 = v +} +var _val23 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val23 = v +} + p.ExtraMap[_key22] = _val23 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimUserBean) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimUserBean"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + if err := p.writeField8(ctx, oprot); err != nil { return err } + if err := p.writeField9(ctx, oprot); err != nil { return err } + if err := p.writeField10(ctx, oprot); err != nil { return err } + if err := p.writeField11(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimUserBean) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTid() { + if err := oprot.WriteFieldBegin(ctx, "tid", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) } + if err := p.Tid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) } + } + return err +} + +func (p *TimUserBean) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetNickname() { + if err := oprot.WriteFieldBegin(ctx, "nickname", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:nickname: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Nickname)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.nickname (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:nickname: ", p), err) } + } + return err +} + +func (p *TimUserBean) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetRemarkname() { + if err := oprot.WriteFieldBegin(ctx, "remarkname", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:remarkname: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Remarkname)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.remarkname (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:remarkname: ", p), err) } + } + return err +} + +func (p *TimUserBean) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetBrithday() { + if err := oprot.WriteFieldBegin(ctx, "brithday", thrift.STRING, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:brithday: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Brithday)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.brithday (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:brithday: ", p), err) } + } + return err +} + +func (p *TimUserBean) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetGender() { + if err := oprot.WriteFieldBegin(ctx, "gender", thrift.I16, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:gender: ", p), err) } + if err := oprot.WriteI16(ctx, int16(*p.Gender)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.gender (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:gender: ", p), err) } + } + return err +} + +func (p *TimUserBean) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetHeadurl() { + if err := oprot.WriteFieldBegin(ctx, "headurl", thrift.STRING, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:headurl: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Headurl)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.headurl (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:headurl: ", p), err) } + } + return err +} + +func (p *TimUserBean) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetArea() { + if err := oprot.WriteFieldBegin(ctx, "area", thrift.STRUCT, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:area: ", p), err) } + if err := p.Area.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Area), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:area: ", p), err) } + } + return err +} + +func (p *TimUserBean) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetHeadbyte() { + if err := oprot.WriteFieldBegin(ctx, "headbyte", thrift.STRING, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:headbyte: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Headbyte); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.headbyte (8) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:headbyte: ", p), err) } + } + return err +} + +func (p *TimUserBean) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetPhotoBytes() { + if err := oprot.WriteFieldBegin(ctx, "photoBytes", thrift.LIST, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:photoBytes: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.PhotoBytes)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.PhotoBytes { + if err := oprot.WriteBinary(ctx, v); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:photoBytes: ", p), err) } + } + return err +} + +func (p *TimUserBean) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraList() { + if err := oprot.WriteFieldBegin(ctx, "extraList", thrift.LIST, 10); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:extraList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ExtraList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ExtraList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 10:extraList: ", p), err) } + } + return err +} + +func (p *TimUserBean) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 11); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 11:extraMap: ", p), err) } + } + return err +} + +func (p *TimUserBean) Equals(other *TimUserBean) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Tid.Equals(other.Tid) { return false } + if p.Nickname != other.Nickname { + if p.Nickname == nil || other.Nickname == nil { + return false + } + if (*p.Nickname) != (*other.Nickname) { return false } + } + if p.Remarkname != other.Remarkname { + if p.Remarkname == nil || other.Remarkname == nil { + return false + } + if (*p.Remarkname) != (*other.Remarkname) { return false } + } + if p.Brithday != other.Brithday { + if p.Brithday == nil || other.Brithday == nil { + return false + } + if (*p.Brithday) != (*other.Brithday) { return false } + } + if p.Gender != other.Gender { + if p.Gender == nil || other.Gender == nil { + return false + } + if (*p.Gender) != (*other.Gender) { return false } + } + if p.Headurl != other.Headurl { + if p.Headurl == nil || other.Headurl == nil { + return false + } + if (*p.Headurl) != (*other.Headurl) { return false } + } + if !p.Area.Equals(other.Area) { return false } + if bytes.Compare(p.Headbyte, other.Headbyte) != 0 { return false } + if len(p.PhotoBytes) != len(other.PhotoBytes) { return false } + for i, _tgt := range p.PhotoBytes { + _src24 := other.PhotoBytes[i] + if bytes.Compare(_tgt, _src24) != 0 { return false } + } + if len(p.ExtraList) != len(other.ExtraList) { return false } + for i, _tgt := range p.ExtraList { + _src25 := other.ExtraList[i] + if !_tgt.Equals(_src25) { return false } + } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src26 := other.ExtraMap[k] + if _tgt != _src26 { return false } + } + return true +} + +func (p *TimUserBean) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimUserBean(%+v)", *p) +} + +// Attributes: +// - Tid: 房间Tid +// - FounderTid: 创建人Tid +// - HostsTid: 主持人Tid +// - MembersTid: memberTid +// - Headurl: 头像地址 http://xxx.jpg +// - RoomName: 房间名称 +// - Desc: 房间说明 +// - CreateTime: 房间创建时间 +// - ExtraList: 扩展字段 +// - ExtraMap +type TimRoom struct { + Tid *Tid `thrift:"tid,1" db:"tid" json:"tid,omitempty"` + FounderTid *Tid `thrift:"founderTid,2" db:"founderTid" json:"founderTid,omitempty"` + HostsTid []*Tid `thrift:"HostsTid,3" db:"HostsTid" json:"HostsTid,omitempty"` + MembersTid []*Tid `thrift:"membersTid,4" db:"membersTid" json:"membersTid,omitempty"` + Headurl *string `thrift:"headurl,5" db:"headurl" json:"headurl,omitempty"` + RoomName *string `thrift:"roomName,6" db:"roomName" json:"roomName,omitempty"` + Desc *string `thrift:"desc,7" db:"desc" json:"desc,omitempty"` + CreateTime *TimTime `thrift:"createTime,8" db:"createTime" json:"createTime,omitempty"` + ExtraList []*TimNode `thrift:"extraList,9" db:"extraList" json:"extraList,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,10" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimRoom() *TimRoom { + return &TimRoom{} +} + +var TimRoom_Tid_DEFAULT *Tid +func (p *TimRoom) GetTid() *Tid { + if !p.IsSetTid() { + return TimRoom_Tid_DEFAULT + } +return p.Tid +} +var TimRoom_FounderTid_DEFAULT *Tid +func (p *TimRoom) GetFounderTid() *Tid { + if !p.IsSetFounderTid() { + return TimRoom_FounderTid_DEFAULT + } +return p.FounderTid +} +var TimRoom_HostsTid_DEFAULT []*Tid + +func (p *TimRoom) GetHostsTid() []*Tid { + return p.HostsTid +} +var TimRoom_MembersTid_DEFAULT []*Tid + +func (p *TimRoom) GetMembersTid() []*Tid { + return p.MembersTid +} +var TimRoom_Headurl_DEFAULT string +func (p *TimRoom) GetHeadurl() string { + if !p.IsSetHeadurl() { + return TimRoom_Headurl_DEFAULT + } +return *p.Headurl +} +var TimRoom_RoomName_DEFAULT string +func (p *TimRoom) GetRoomName() string { + if !p.IsSetRoomName() { + return TimRoom_RoomName_DEFAULT + } +return *p.RoomName +} +var TimRoom_Desc_DEFAULT string +func (p *TimRoom) GetDesc() string { + if !p.IsSetDesc() { + return TimRoom_Desc_DEFAULT + } +return *p.Desc +} +var TimRoom_CreateTime_DEFAULT *TimTime +func (p *TimRoom) GetCreateTime() *TimTime { + if !p.IsSetCreateTime() { + return TimRoom_CreateTime_DEFAULT + } +return p.CreateTime +} +var TimRoom_ExtraList_DEFAULT []*TimNode + +func (p *TimRoom) GetExtraList() []*TimNode { + return p.ExtraList +} +var TimRoom_ExtraMap_DEFAULT map[string]string + +func (p *TimRoom) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimRoom) IsSetTid() bool { + return p.Tid != nil +} + +func (p *TimRoom) IsSetFounderTid() bool { + return p.FounderTid != nil +} + +func (p *TimRoom) IsSetHostsTid() bool { + return p.HostsTid != nil +} + +func (p *TimRoom) IsSetMembersTid() bool { + return p.MembersTid != nil +} + +func (p *TimRoom) IsSetHeadurl() bool { + return p.Headurl != nil +} + +func (p *TimRoom) IsSetRoomName() bool { + return p.RoomName != nil +} + +func (p *TimRoom) IsSetDesc() bool { + return p.Desc != nil +} + +func (p *TimRoom) IsSetCreateTime() bool { + return p.CreateTime != nil +} + +func (p *TimRoom) IsSetExtraList() bool { + return p.ExtraList != nil +} + +func (p *TimRoom) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimRoom) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.LIST { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.LIST { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.STRING { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.STRING { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.STRING { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 8: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField8(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 9: + if fieldTypeId == thrift.LIST { + if err := p.ReadField9(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 10: + if fieldTypeId == thrift.MAP { + if err := p.ReadField10(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimRoom) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Tid = &Tid{} + if err := p.Tid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) + } + return nil +} + +func (p *TimRoom) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.FounderTid = &Tid{} + if err := p.FounderTid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.FounderTid), err) + } + return nil +} + +func (p *TimRoom) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*Tid, 0, size) + p.HostsTid = tSlice + for i := 0; i < size; i ++ { + _elem27 := &Tid{} + if err := _elem27.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem27), err) + } + p.HostsTid = append(p.HostsTid, _elem27) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimRoom) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*Tid, 0, size) + p.MembersTid = tSlice + for i := 0; i < size; i ++ { + _elem28 := &Tid{} + if err := _elem28.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem28), err) + } + p.MembersTid = append(p.MembersTid, _elem28) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimRoom) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) +} else { + p.Headurl = &v +} + return nil +} + +func (p *TimRoom) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) +} else { + p.RoomName = &v +} + return nil +} + +func (p *TimRoom) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 7: ", err) +} else { + p.Desc = &v +} + return nil +} + +func (p *TimRoom) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { + p.CreateTime = &TimTime{} + if err := p.CreateTime.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.CreateTime), err) + } + return nil +} + +func (p *TimRoom) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TimNode, 0, size) + p.ExtraList = tSlice + for i := 0; i < size; i ++ { + _elem29 := &TimNode{} + if err := _elem29.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem29), err) + } + p.ExtraList = append(p.ExtraList, _elem29) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimRoom) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key30 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key30 = v +} +var _val31 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val31 = v +} + p.ExtraMap[_key30] = _val31 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimRoom) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimRoom"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + if err := p.writeField8(ctx, oprot); err != nil { return err } + if err := p.writeField9(ctx, oprot); err != nil { return err } + if err := p.writeField10(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimRoom) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTid() { + if err := oprot.WriteFieldBegin(ctx, "tid", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) } + if err := p.Tid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) } + } + return err +} + +func (p *TimRoom) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetFounderTid() { + if err := oprot.WriteFieldBegin(ctx, "founderTid", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:founderTid: ", p), err) } + if err := p.FounderTid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.FounderTid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:founderTid: ", p), err) } + } + return err +} + +func (p *TimRoom) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetHostsTid() { + if err := oprot.WriteFieldBegin(ctx, "HostsTid", thrift.LIST, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:HostsTid: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.HostsTid)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.HostsTid { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:HostsTid: ", p), err) } + } + return err +} + +func (p *TimRoom) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetMembersTid() { + if err := oprot.WriteFieldBegin(ctx, "membersTid", thrift.LIST, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:membersTid: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.MembersTid)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.MembersTid { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:membersTid: ", p), err) } + } + return err +} + +func (p *TimRoom) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetHeadurl() { + if err := oprot.WriteFieldBegin(ctx, "headurl", thrift.STRING, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:headurl: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Headurl)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.headurl (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:headurl: ", p), err) } + } + return err +} + +func (p *TimRoom) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetRoomName() { + if err := oprot.WriteFieldBegin(ctx, "roomName", thrift.STRING, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:roomName: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.RoomName)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.roomName (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:roomName: ", p), err) } + } + return err +} + +func (p *TimRoom) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetDesc() { + if err := oprot.WriteFieldBegin(ctx, "desc", thrift.STRING, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:desc: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Desc)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.desc (7) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:desc: ", p), err) } + } + return err +} + +func (p *TimRoom) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetCreateTime() { + if err := oprot.WriteFieldBegin(ctx, "createTime", thrift.STRUCT, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:createTime: ", p), err) } + if err := p.CreateTime.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.CreateTime), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:createTime: ", p), err) } + } + return err +} + +func (p *TimRoom) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraList() { + if err := oprot.WriteFieldBegin(ctx, "extraList", thrift.LIST, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:extraList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ExtraList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ExtraList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:extraList: ", p), err) } + } + return err +} + +func (p *TimRoom) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 10); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 10:extraMap: ", p), err) } + } + return err +} + +func (p *TimRoom) Equals(other *TimRoom) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Tid.Equals(other.Tid) { return false } + if !p.FounderTid.Equals(other.FounderTid) { return false } + if len(p.HostsTid) != len(other.HostsTid) { return false } + for i, _tgt := range p.HostsTid { + _src32 := other.HostsTid[i] + if !_tgt.Equals(_src32) { return false } + } + if len(p.MembersTid) != len(other.MembersTid) { return false } + for i, _tgt := range p.MembersTid { + _src33 := other.MembersTid[i] + if !_tgt.Equals(_src33) { return false } + } + if p.Headurl != other.Headurl { + if p.Headurl == nil || other.Headurl == nil { + return false + } + if (*p.Headurl) != (*other.Headurl) { return false } + } + if p.RoomName != other.RoomName { + if p.RoomName == nil || other.RoomName == nil { + return false + } + if (*p.RoomName) != (*other.RoomName) { return false } + } + if p.Desc != other.Desc { + if p.Desc == nil || other.Desc == nil { + return false + } + if (*p.Desc) != (*other.Desc) { return false } + } + if !p.CreateTime.Equals(other.CreateTime) { return false } + if len(p.ExtraList) != len(other.ExtraList) { return false } + for i, _tgt := range p.ExtraList { + _src34 := other.ExtraList[i] + if !_tgt.Equals(_src34) { return false } + } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src35 := other.ExtraMap[k] + if _tgt != _src35 { return false } + } + return true +} + +func (p *TimRoom) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimRoom(%+v)", *p) +} + +// Attributes: +// - ThreadId: 标识 +// - FromTid +// - ToTid +// - Status: subscribe:订阅其他用户的状态 probe:请求获取其他用户的状态 unavailable:不可用,离线(offline)状态 +// - Type: normal:类似于email,主要特点是不要求响应; +// chat:类似于qq里的好友即时聊天,主要特点是实时通讯; +// groupchat:类似于聊天室里的群聊; +// headline:用于发送alert和notification; +// error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; +// - Priority: 优先权 0 。高优先级的resource能接受发送到bare JID的消息,低优先级的resource不能 +// - Show: chat:聊天中 away:暂时离开 xa:eXtend Away,长时间离开 dnd:勿打扰 online:在线 offline:离线 +// - LeaguerTid: 成员Tid 群聊时信息发送者Tid +// - ExtraList: 扩展字段 +// - Error: 错误码 +// - ExtraMap +type TimPBean struct { + ThreadId string `thrift:"threadId,1,required" db:"threadId" json:"threadId"` + FromTid *Tid `thrift:"fromTid,2" db:"fromTid" json:"fromTid,omitempty"` + ToTid *Tid `thrift:"toTid,3" db:"toTid" json:"toTid,omitempty"` + Status *string `thrift:"status,4" db:"status" json:"status,omitempty"` + Type *string `thrift:"type,5" db:"type" json:"type,omitempty"` + Priority *int32 `thrift:"priority,6" db:"priority" json:"priority,omitempty"` + Show *string `thrift:"show,7" db:"show" json:"show,omitempty"` + LeaguerTid *Tid `thrift:"leaguerTid,8" db:"leaguerTid" json:"leaguerTid,omitempty"` + ExtraList []*TimNode `thrift:"extraList,9" db:"extraList" json:"extraList,omitempty"` + Error *TimError `thrift:"error,10" db:"error" json:"error,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,11" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimPBean() *TimPBean { + return &TimPBean{} +} + + +func (p *TimPBean) GetThreadId() string { + return p.ThreadId +} +var TimPBean_FromTid_DEFAULT *Tid +func (p *TimPBean) GetFromTid() *Tid { + if !p.IsSetFromTid() { + return TimPBean_FromTid_DEFAULT + } +return p.FromTid +} +var TimPBean_ToTid_DEFAULT *Tid +func (p *TimPBean) GetToTid() *Tid { + if !p.IsSetToTid() { + return TimPBean_ToTid_DEFAULT + } +return p.ToTid +} +var TimPBean_Status_DEFAULT string +func (p *TimPBean) GetStatus() string { + if !p.IsSetStatus() { + return TimPBean_Status_DEFAULT + } +return *p.Status +} +var TimPBean_Type_DEFAULT string +func (p *TimPBean) GetType() string { + if !p.IsSetType() { + return TimPBean_Type_DEFAULT + } +return *p.Type +} +var TimPBean_Priority_DEFAULT int32 +func (p *TimPBean) GetPriority() int32 { + if !p.IsSetPriority() { + return TimPBean_Priority_DEFAULT + } +return *p.Priority +} +var TimPBean_Show_DEFAULT string +func (p *TimPBean) GetShow() string { + if !p.IsSetShow() { + return TimPBean_Show_DEFAULT + } +return *p.Show +} +var TimPBean_LeaguerTid_DEFAULT *Tid +func (p *TimPBean) GetLeaguerTid() *Tid { + if !p.IsSetLeaguerTid() { + return TimPBean_LeaguerTid_DEFAULT + } +return p.LeaguerTid +} +var TimPBean_ExtraList_DEFAULT []*TimNode + +func (p *TimPBean) GetExtraList() []*TimNode { + return p.ExtraList +} +var TimPBean_Error_DEFAULT *TimError +func (p *TimPBean) GetError() *TimError { + if !p.IsSetError() { + return TimPBean_Error_DEFAULT + } +return p.Error +} +var TimPBean_ExtraMap_DEFAULT map[string]string + +func (p *TimPBean) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimPBean) IsSetFromTid() bool { + return p.FromTid != nil +} + +func (p *TimPBean) IsSetToTid() bool { + return p.ToTid != nil +} + +func (p *TimPBean) IsSetStatus() bool { + return p.Status != nil +} + +func (p *TimPBean) IsSetType() bool { + return p.Type != nil +} + +func (p *TimPBean) IsSetPriority() bool { + return p.Priority != nil +} + +func (p *TimPBean) IsSetShow() bool { + return p.Show != nil +} + +func (p *TimPBean) IsSetLeaguerTid() bool { + return p.LeaguerTid != nil +} + +func (p *TimPBean) IsSetExtraList() bool { + return p.ExtraList != nil +} + +func (p *TimPBean) IsSetError() bool { + return p.Error != nil +} + +func (p *TimPBean) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimPBean) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetThreadId bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetThreadId = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.STRING { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.STRING { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.I32 { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.STRING { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 8: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField8(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 9: + if fieldTypeId == thrift.LIST { + if err := p.ReadField9(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 10: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField10(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 11: + if fieldTypeId == thrift.MAP { + if err := p.ReadField11(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetThreadId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ThreadId is not set")); + } + return nil +} + +func (p *TimPBean) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.ThreadId = v +} + return nil +} + +func (p *TimPBean) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.FromTid = &Tid{} + if err := p.FromTid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.FromTid), err) + } + return nil +} + +func (p *TimPBean) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + p.ToTid = &Tid{} + if err := p.ToTid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ToTid), err) + } + return nil +} + +func (p *TimPBean) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.Status = &v +} + return nil +} + +func (p *TimPBean) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) +} else { + p.Type = &v +} + return nil +} + +func (p *TimPBean) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) +} else { + p.Priority = &v +} + return nil +} + +func (p *TimPBean) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 7: ", err) +} else { + p.Show = &v +} + return nil +} + +func (p *TimPBean) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { + p.LeaguerTid = &Tid{} + if err := p.LeaguerTid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.LeaguerTid), err) + } + return nil +} + +func (p *TimPBean) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TimNode, 0, size) + p.ExtraList = tSlice + for i := 0; i < size; i ++ { + _elem36 := &TimNode{} + if err := _elem36.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem36), err) + } + p.ExtraList = append(p.ExtraList, _elem36) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimPBean) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { + p.Error = &TimError{} + if err := p.Error.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Error), err) + } + return nil +} + +func (p *TimPBean) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key37 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key37 = v +} +var _val38 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val38 = v +} + p.ExtraMap[_key37] = _val38 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimPBean) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimPBean"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + if err := p.writeField8(ctx, oprot); err != nil { return err } + if err := p.writeField9(ctx, oprot); err != nil { return err } + if err := p.writeField10(ctx, oprot); err != nil { return err } + if err := p.writeField11(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimPBean) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "threadId", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) } + if err := oprot.WriteString(ctx, string(p.ThreadId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) } + return err +} + +func (p *TimPBean) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetFromTid() { + if err := oprot.WriteFieldBegin(ctx, "fromTid", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:fromTid: ", p), err) } + if err := p.FromTid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.FromTid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:fromTid: ", p), err) } + } + return err +} + +func (p *TimPBean) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetToTid() { + if err := oprot.WriteFieldBegin(ctx, "toTid", thrift.STRUCT, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:toTid: ", p), err) } + if err := p.ToTid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ToTid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:toTid: ", p), err) } + } + return err +} + +func (p *TimPBean) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetStatus() { + if err := oprot.WriteFieldBegin(ctx, "status", thrift.STRING, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:status: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Status)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.status (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:status: ", p), err) } + } + return err +} + +func (p *TimPBean) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetType() { + if err := oprot.WriteFieldBegin(ctx, "type", thrift.STRING, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:type: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Type)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.type (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:type: ", p), err) } + } + return err +} + +func (p *TimPBean) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetPriority() { + if err := oprot.WriteFieldBegin(ctx, "priority", thrift.I32, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:priority: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.Priority)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.priority (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:priority: ", p), err) } + } + return err +} + +func (p *TimPBean) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetShow() { + if err := oprot.WriteFieldBegin(ctx, "show", thrift.STRING, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:show: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Show)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.show (7) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:show: ", p), err) } + } + return err +} + +func (p *TimPBean) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetLeaguerTid() { + if err := oprot.WriteFieldBegin(ctx, "leaguerTid", thrift.STRUCT, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:leaguerTid: ", p), err) } + if err := p.LeaguerTid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.LeaguerTid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:leaguerTid: ", p), err) } + } + return err +} + +func (p *TimPBean) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraList() { + if err := oprot.WriteFieldBegin(ctx, "extraList", thrift.LIST, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:extraList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ExtraList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ExtraList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:extraList: ", p), err) } + } + return err +} + +func (p *TimPBean) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetError() { + if err := oprot.WriteFieldBegin(ctx, "error", thrift.STRUCT, 10); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:error: ", p), err) } + if err := p.Error.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Error), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 10:error: ", p), err) } + } + return err +} + +func (p *TimPBean) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 11); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 11:extraMap: ", p), err) } + } + return err +} + +func (p *TimPBean) Equals(other *TimPBean) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.ThreadId != other.ThreadId { return false } + if !p.FromTid.Equals(other.FromTid) { return false } + if !p.ToTid.Equals(other.ToTid) { return false } + if p.Status != other.Status { + if p.Status == nil || other.Status == nil { + return false + } + if (*p.Status) != (*other.Status) { return false } + } + if p.Type != other.Type { + if p.Type == nil || other.Type == nil { + return false + } + if (*p.Type) != (*other.Type) { return false } + } + if p.Priority != other.Priority { + if p.Priority == nil || other.Priority == nil { + return false + } + if (*p.Priority) != (*other.Priority) { return false } + } + if p.Show != other.Show { + if p.Show == nil || other.Show == nil { + return false + } + if (*p.Show) != (*other.Show) { return false } + } + if !p.LeaguerTid.Equals(other.LeaguerTid) { return false } + if len(p.ExtraList) != len(other.ExtraList) { return false } + for i, _tgt := range p.ExtraList { + _src39 := other.ExtraList[i] + if !_tgt.Equals(_src39) { return false } + } + if !p.Error.Equals(other.Error) { return false } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src40 := other.ExtraMap[k] + if _tgt != _src40 { return false } + } + return true +} + +func (p *TimPBean) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimPBean(%+v)", *p) +} + +// Attributes: +// - ThreadId: 线程id +// - Mid: 消息id号 +// - FromTid: 来源Tid +// - ToTid: 目标Tid +// - Body: 信息内容 +// - Type: normal:类似于email,主要特点是不要求响应; +// chat:类似于qq里的好友即时聊天,主要特点是实时通讯; +// groupchat:类似于聊天室里的群聊; +// headline:用于发送alert和notification; +// error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; +// - MsgType: 消息类型 1 文字 2 图片 3 语音 4视频 5混合 +// - Offline: 是否离线信息 +// - LeaguerTid: 成员Tid 群聊时信息发送者Tid +// - ExtraList: 扩展字段 +// - Timestamp: 服务器发送信息时间戳(毫秒) +// - Error: 错误码 +// - ExtraMap +// - Readstatus: 0未读 1已读 +type TimMBean struct { + ThreadId string `thrift:"threadId,1,required" db:"threadId" json:"threadId"` + Mid *string `thrift:"mid,2" db:"mid" json:"mid,omitempty"` + FromTid *Tid `thrift:"fromTid,3" db:"fromTid" json:"fromTid,omitempty"` + ToTid *Tid `thrift:"toTid,4" db:"toTid" json:"toTid,omitempty"` + Body *string `thrift:"body,5" db:"body" json:"body,omitempty"` + Type *string `thrift:"type,6" db:"type" json:"type,omitempty"` + MsgType *int16 `thrift:"msgType,7" db:"msgType" json:"msgType,omitempty"` + Offline *TimTime `thrift:"offline,8" db:"offline" json:"offline,omitempty"` + LeaguerTid *Tid `thrift:"leaguerTid,9" db:"leaguerTid" json:"leaguerTid,omitempty"` + ExtraList []*TimNode `thrift:"extraList,10" db:"extraList" json:"extraList,omitempty"` + Timestamp *string `thrift:"timestamp,11" db:"timestamp" json:"timestamp,omitempty"` + Error *TimError `thrift:"error,12" db:"error" json:"error,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,13" db:"extraMap" json:"extraMap,omitempty"` + Readstatus *int16 `thrift:"readstatus,14" db:"readstatus" json:"readstatus,omitempty"` +} + +func NewTimMBean() *TimMBean { + return &TimMBean{} +} + + +func (p *TimMBean) GetThreadId() string { + return p.ThreadId +} +var TimMBean_Mid_DEFAULT string +func (p *TimMBean) GetMid() string { + if !p.IsSetMid() { + return TimMBean_Mid_DEFAULT + } +return *p.Mid +} +var TimMBean_FromTid_DEFAULT *Tid +func (p *TimMBean) GetFromTid() *Tid { + if !p.IsSetFromTid() { + return TimMBean_FromTid_DEFAULT + } +return p.FromTid +} +var TimMBean_ToTid_DEFAULT *Tid +func (p *TimMBean) GetToTid() *Tid { + if !p.IsSetToTid() { + return TimMBean_ToTid_DEFAULT + } +return p.ToTid +} +var TimMBean_Body_DEFAULT string +func (p *TimMBean) GetBody() string { + if !p.IsSetBody() { + return TimMBean_Body_DEFAULT + } +return *p.Body +} +var TimMBean_Type_DEFAULT string +func (p *TimMBean) GetType() string { + if !p.IsSetType() { + return TimMBean_Type_DEFAULT + } +return *p.Type +} +var TimMBean_MsgType_DEFAULT int16 +func (p *TimMBean) GetMsgType() int16 { + if !p.IsSetMsgType() { + return TimMBean_MsgType_DEFAULT + } +return *p.MsgType +} +var TimMBean_Offline_DEFAULT *TimTime +func (p *TimMBean) GetOffline() *TimTime { + if !p.IsSetOffline() { + return TimMBean_Offline_DEFAULT + } +return p.Offline +} +var TimMBean_LeaguerTid_DEFAULT *Tid +func (p *TimMBean) GetLeaguerTid() *Tid { + if !p.IsSetLeaguerTid() { + return TimMBean_LeaguerTid_DEFAULT + } +return p.LeaguerTid +} +var TimMBean_ExtraList_DEFAULT []*TimNode + +func (p *TimMBean) GetExtraList() []*TimNode { + return p.ExtraList +} +var TimMBean_Timestamp_DEFAULT string +func (p *TimMBean) GetTimestamp() string { + if !p.IsSetTimestamp() { + return TimMBean_Timestamp_DEFAULT + } +return *p.Timestamp +} +var TimMBean_Error_DEFAULT *TimError +func (p *TimMBean) GetError() *TimError { + if !p.IsSetError() { + return TimMBean_Error_DEFAULT + } +return p.Error +} +var TimMBean_ExtraMap_DEFAULT map[string]string + +func (p *TimMBean) GetExtraMap() map[string]string { + return p.ExtraMap +} +var TimMBean_Readstatus_DEFAULT int16 +func (p *TimMBean) GetReadstatus() int16 { + if !p.IsSetReadstatus() { + return TimMBean_Readstatus_DEFAULT + } +return *p.Readstatus +} +func (p *TimMBean) IsSetMid() bool { + return p.Mid != nil +} + +func (p *TimMBean) IsSetFromTid() bool { + return p.FromTid != nil +} + +func (p *TimMBean) IsSetToTid() bool { + return p.ToTid != nil +} + +func (p *TimMBean) IsSetBody() bool { + return p.Body != nil +} + +func (p *TimMBean) IsSetType() bool { + return p.Type != nil +} + +func (p *TimMBean) IsSetMsgType() bool { + return p.MsgType != nil +} + +func (p *TimMBean) IsSetOffline() bool { + return p.Offline != nil +} + +func (p *TimMBean) IsSetLeaguerTid() bool { + return p.LeaguerTid != nil +} + +func (p *TimMBean) IsSetExtraList() bool { + return p.ExtraList != nil +} + +func (p *TimMBean) IsSetTimestamp() bool { + return p.Timestamp != nil +} + +func (p *TimMBean) IsSetError() bool { + return p.Error != nil +} + +func (p *TimMBean) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimMBean) IsSetReadstatus() bool { + return p.Readstatus != nil +} + +func (p *TimMBean) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetThreadId bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetThreadId = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.STRING { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.STRING { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.I16 { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 8: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField8(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 9: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField9(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 10: + if fieldTypeId == thrift.LIST { + if err := p.ReadField10(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 11: + if fieldTypeId == thrift.STRING { + if err := p.ReadField11(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 12: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField12(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 13: + if fieldTypeId == thrift.MAP { + if err := p.ReadField13(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 14: + if fieldTypeId == thrift.I16 { + if err := p.ReadField14(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetThreadId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ThreadId is not set")); + } + return nil +} + +func (p *TimMBean) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.ThreadId = v +} + return nil +} + +func (p *TimMBean) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Mid = &v +} + return nil +} + +func (p *TimMBean) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + p.FromTid = &Tid{} + if err := p.FromTid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.FromTid), err) + } + return nil +} + +func (p *TimMBean) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + p.ToTid = &Tid{} + if err := p.ToTid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ToTid), err) + } + return nil +} + +func (p *TimMBean) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) +} else { + p.Body = &v +} + return nil +} + +func (p *TimMBean) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) +} else { + p.Type = &v +} + return nil +} + +func (p *TimMBean) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI16(ctx); err != nil { + return thrift.PrependError("error reading field 7: ", err) +} else { + p.MsgType = &v +} + return nil +} + +func (p *TimMBean) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { + p.Offline = &TimTime{} + if err := p.Offline.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Offline), err) + } + return nil +} + +func (p *TimMBean) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { + p.LeaguerTid = &Tid{} + if err := p.LeaguerTid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.LeaguerTid), err) + } + return nil +} + +func (p *TimMBean) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TimNode, 0, size) + p.ExtraList = tSlice + for i := 0; i < size; i ++ { + _elem41 := &TimNode{} + if err := _elem41.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem41), err) + } + p.ExtraList = append(p.ExtraList, _elem41) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimMBean) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 11: ", err) +} else { + p.Timestamp = &v +} + return nil +} + +func (p *TimMBean) ReadField12(ctx context.Context, iprot thrift.TProtocol) error { + p.Error = &TimError{} + if err := p.Error.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Error), err) + } + return nil +} + +func (p *TimMBean) ReadField13(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key42 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key42 = v +} +var _val43 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val43 = v +} + p.ExtraMap[_key42] = _val43 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimMBean) ReadField14(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI16(ctx); err != nil { + return thrift.PrependError("error reading field 14: ", err) +} else { + p.Readstatus = &v +} + return nil +} + +func (p *TimMBean) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimMBean"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + if err := p.writeField8(ctx, oprot); err != nil { return err } + if err := p.writeField9(ctx, oprot); err != nil { return err } + if err := p.writeField10(ctx, oprot); err != nil { return err } + if err := p.writeField11(ctx, oprot); err != nil { return err } + if err := p.writeField12(ctx, oprot); err != nil { return err } + if err := p.writeField13(ctx, oprot); err != nil { return err } + if err := p.writeField14(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimMBean) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "threadId", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) } + if err := oprot.WriteString(ctx, string(p.ThreadId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) } + return err +} + +func (p *TimMBean) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetMid() { + if err := oprot.WriteFieldBegin(ctx, "mid", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:mid: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Mid)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.mid (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:mid: ", p), err) } + } + return err +} + +func (p *TimMBean) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetFromTid() { + if err := oprot.WriteFieldBegin(ctx, "fromTid", thrift.STRUCT, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:fromTid: ", p), err) } + if err := p.FromTid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.FromTid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:fromTid: ", p), err) } + } + return err +} + +func (p *TimMBean) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetToTid() { + if err := oprot.WriteFieldBegin(ctx, "toTid", thrift.STRUCT, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:toTid: ", p), err) } + if err := p.ToTid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ToTid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:toTid: ", p), err) } + } + return err +} + +func (p *TimMBean) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetBody() { + if err := oprot.WriteFieldBegin(ctx, "body", thrift.STRING, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:body: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Body)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.body (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:body: ", p), err) } + } + return err +} + +func (p *TimMBean) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetType() { + if err := oprot.WriteFieldBegin(ctx, "type", thrift.STRING, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:type: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Type)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.type (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:type: ", p), err) } + } + return err +} + +func (p *TimMBean) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetMsgType() { + if err := oprot.WriteFieldBegin(ctx, "msgType", thrift.I16, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:msgType: ", p), err) } + if err := oprot.WriteI16(ctx, int16(*p.MsgType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.msgType (7) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:msgType: ", p), err) } + } + return err +} + +func (p *TimMBean) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetOffline() { + if err := oprot.WriteFieldBegin(ctx, "offline", thrift.STRUCT, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:offline: ", p), err) } + if err := p.Offline.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Offline), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:offline: ", p), err) } + } + return err +} + +func (p *TimMBean) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetLeaguerTid() { + if err := oprot.WriteFieldBegin(ctx, "leaguerTid", thrift.STRUCT, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:leaguerTid: ", p), err) } + if err := p.LeaguerTid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.LeaguerTid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:leaguerTid: ", p), err) } + } + return err +} + +func (p *TimMBean) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraList() { + if err := oprot.WriteFieldBegin(ctx, "extraList", thrift.LIST, 10); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:extraList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ExtraList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ExtraList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 10:extraList: ", p), err) } + } + return err +} + +func (p *TimMBean) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimestamp() { + if err := oprot.WriteFieldBegin(ctx, "timestamp", thrift.STRING, 11); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:timestamp: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Timestamp)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.timestamp (11) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 11:timestamp: ", p), err) } + } + return err +} + +func (p *TimMBean) writeField12(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetError() { + if err := oprot.WriteFieldBegin(ctx, "error", thrift.STRUCT, 12); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 12:error: ", p), err) } + if err := p.Error.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Error), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 12:error: ", p), err) } + } + return err +} + +func (p *TimMBean) writeField13(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 13); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 13:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 13:extraMap: ", p), err) } + } + return err +} + +func (p *TimMBean) writeField14(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetReadstatus() { + if err := oprot.WriteFieldBegin(ctx, "readstatus", thrift.I16, 14); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 14:readstatus: ", p), err) } + if err := oprot.WriteI16(ctx, int16(*p.Readstatus)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.readstatus (14) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 14:readstatus: ", p), err) } + } + return err +} + +func (p *TimMBean) Equals(other *TimMBean) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.ThreadId != other.ThreadId { return false } + if p.Mid != other.Mid { + if p.Mid == nil || other.Mid == nil { + return false + } + if (*p.Mid) != (*other.Mid) { return false } + } + if !p.FromTid.Equals(other.FromTid) { return false } + if !p.ToTid.Equals(other.ToTid) { return false } + if p.Body != other.Body { + if p.Body == nil || other.Body == nil { + return false + } + if (*p.Body) != (*other.Body) { return false } + } + if p.Type != other.Type { + if p.Type == nil || other.Type == nil { + return false + } + if (*p.Type) != (*other.Type) { return false } + } + if p.MsgType != other.MsgType { + if p.MsgType == nil || other.MsgType == nil { + return false + } + if (*p.MsgType) != (*other.MsgType) { return false } + } + if !p.Offline.Equals(other.Offline) { return false } + if !p.LeaguerTid.Equals(other.LeaguerTid) { return false } + if len(p.ExtraList) != len(other.ExtraList) { return false } + for i, _tgt := range p.ExtraList { + _src44 := other.ExtraList[i] + if !_tgt.Equals(_src44) { return false } + } + if p.Timestamp != other.Timestamp { + if p.Timestamp == nil || other.Timestamp == nil { + return false + } + if (*p.Timestamp) != (*other.Timestamp) { return false } + } + if !p.Error.Equals(other.Error) { return false } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src45 := other.ExtraMap[k] + if _tgt != _src45 { return false } + } + if p.Readstatus != other.Readstatus { + if p.Readstatus == nil || other.Readstatus == nil { + return false + } + if (*p.Readstatus) != (*other.Readstatus) { return false } + } + return true +} + +func (p *TimMBean) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimMBean(%+v)", *p) +} + +// Attributes: +// - ThreadId: 线程id +// - FromTid +// - ToTid +// - Type: Get :获取当前域值。类似于http get方法 +// Set :设置或替换get查询的值。类似于http put方法。 +// Result :说明成功的响应了先前的查询。类似于http状态码200。 +// Error: 查询和响应中出现的错误。 +// - ExtraList: 扩展字段 +// - Error: 错误码 +// - ExtraMap +type TimIqBean struct { + ThreadId string `thrift:"threadId,1,required" db:"threadId" json:"threadId"` + FromTid *Tid `thrift:"fromTid,2" db:"fromTid" json:"fromTid,omitempty"` + ToTid *Tid `thrift:"toTid,3" db:"toTid" json:"toTid,omitempty"` + Type *string `thrift:"type,4" db:"type" json:"type,omitempty"` + ExtraList []*TimNode `thrift:"extraList,5" db:"extraList" json:"extraList,omitempty"` + Error *TimError `thrift:"error,6" db:"error" json:"error,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,7" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimIqBean() *TimIqBean { + return &TimIqBean{} +} + + +func (p *TimIqBean) GetThreadId() string { + return p.ThreadId +} +var TimIqBean_FromTid_DEFAULT *Tid +func (p *TimIqBean) GetFromTid() *Tid { + if !p.IsSetFromTid() { + return TimIqBean_FromTid_DEFAULT + } +return p.FromTid +} +var TimIqBean_ToTid_DEFAULT *Tid +func (p *TimIqBean) GetToTid() *Tid { + if !p.IsSetToTid() { + return TimIqBean_ToTid_DEFAULT + } +return p.ToTid +} +var TimIqBean_Type_DEFAULT string +func (p *TimIqBean) GetType() string { + if !p.IsSetType() { + return TimIqBean_Type_DEFAULT + } +return *p.Type +} +var TimIqBean_ExtraList_DEFAULT []*TimNode + +func (p *TimIqBean) GetExtraList() []*TimNode { + return p.ExtraList +} +var TimIqBean_Error_DEFAULT *TimError +func (p *TimIqBean) GetError() *TimError { + if !p.IsSetError() { + return TimIqBean_Error_DEFAULT + } +return p.Error +} +var TimIqBean_ExtraMap_DEFAULT map[string]string + +func (p *TimIqBean) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimIqBean) IsSetFromTid() bool { + return p.FromTid != nil +} + +func (p *TimIqBean) IsSetToTid() bool { + return p.ToTid != nil +} + +func (p *TimIqBean) IsSetType() bool { + return p.Type != nil +} + +func (p *TimIqBean) IsSetExtraList() bool { + return p.ExtraList != nil +} + +func (p *TimIqBean) IsSetError() bool { + return p.Error != nil +} + +func (p *TimIqBean) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimIqBean) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetThreadId bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetThreadId = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.STRING { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.LIST { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.MAP { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetThreadId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ThreadId is not set")); + } + return nil +} + +func (p *TimIqBean) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.ThreadId = v +} + return nil +} + +func (p *TimIqBean) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.FromTid = &Tid{} + if err := p.FromTid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.FromTid), err) + } + return nil +} + +func (p *TimIqBean) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + p.ToTid = &Tid{} + if err := p.ToTid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ToTid), err) + } + return nil +} + +func (p *TimIqBean) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.Type = &v +} + return nil +} + +func (p *TimIqBean) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TimNode, 0, size) + p.ExtraList = tSlice + for i := 0; i < size; i ++ { + _elem46 := &TimNode{} + if err := _elem46.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem46), err) + } + p.ExtraList = append(p.ExtraList, _elem46) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimIqBean) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + p.Error = &TimError{} + if err := p.Error.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Error), err) + } + return nil +} + +func (p *TimIqBean) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key47 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key47 = v +} +var _val48 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val48 = v +} + p.ExtraMap[_key47] = _val48 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimIqBean) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimIqBean"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimIqBean) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "threadId", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) } + if err := oprot.WriteString(ctx, string(p.ThreadId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) } + return err +} + +func (p *TimIqBean) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetFromTid() { + if err := oprot.WriteFieldBegin(ctx, "fromTid", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:fromTid: ", p), err) } + if err := p.FromTid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.FromTid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:fromTid: ", p), err) } + } + return err +} + +func (p *TimIqBean) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetToTid() { + if err := oprot.WriteFieldBegin(ctx, "toTid", thrift.STRUCT, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:toTid: ", p), err) } + if err := p.ToTid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ToTid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:toTid: ", p), err) } + } + return err +} + +func (p *TimIqBean) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetType() { + if err := oprot.WriteFieldBegin(ctx, "type", thrift.STRING, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:type: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Type)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.type (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:type: ", p), err) } + } + return err +} + +func (p *TimIqBean) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraList() { + if err := oprot.WriteFieldBegin(ctx, "extraList", thrift.LIST, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:extraList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ExtraList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ExtraList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:extraList: ", p), err) } + } + return err +} + +func (p *TimIqBean) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetError() { + if err := oprot.WriteFieldBegin(ctx, "error", thrift.STRUCT, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:error: ", p), err) } + if err := p.Error.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Error), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:error: ", p), err) } + } + return err +} + +func (p *TimIqBean) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:extraMap: ", p), err) } + } + return err +} + +func (p *TimIqBean) Equals(other *TimIqBean) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.ThreadId != other.ThreadId { return false } + if !p.FromTid.Equals(other.FromTid) { return false } + if !p.ToTid.Equals(other.ToTid) { return false } + if p.Type != other.Type { + if p.Type == nil || other.Type == nil { + return false + } + if (*p.Type) != (*other.Type) { return false } + } + if len(p.ExtraList) != len(other.ExtraList) { return false } + for i, _tgt := range p.ExtraList { + _src49 := other.ExtraList[i] + if !_tgt.Equals(_src49) { return false } + } + if !p.Error.Equals(other.Error) { return false } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src50 := other.ExtraMap[k] + if _tgt != _src50 { return false } + } + return true +} + +func (p *TimIqBean) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimIqBean(%+v)", *p) +} + +// Attributes: +// - Subscription: none表示用户和contact之前没有任何的关系(虽然在server的buddy list中存在) +// to表示用户能看到contact的presence,但是contact看不到用户的Presence +// from和to的含义相反,指用户看不到contact的presence,但是contact可以看到 +// both表示相关之间都能看到对方的presence +// - Tid +// - Name: 用户名 +// - ExtraMap +type TimRoster struct { + Subscription string `thrift:"subscription,1,required" db:"subscription" json:"subscription"` + Tid *Tid `thrift:"tid,2,required" db:"tid" json:"tid"` + Name *string `thrift:"name,3" db:"name" json:"name,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,4" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimRoster() *TimRoster { + return &TimRoster{} +} + + +func (p *TimRoster) GetSubscription() string { + return p.Subscription +} +var TimRoster_Tid_DEFAULT *Tid +func (p *TimRoster) GetTid() *Tid { + if !p.IsSetTid() { + return TimRoster_Tid_DEFAULT + } +return p.Tid +} +var TimRoster_Name_DEFAULT string +func (p *TimRoster) GetName() string { + if !p.IsSetName() { + return TimRoster_Name_DEFAULT + } +return *p.Name +} +var TimRoster_ExtraMap_DEFAULT map[string]string + +func (p *TimRoster) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimRoster) IsSetTid() bool { + return p.Tid != nil +} + +func (p *TimRoster) IsSetName() bool { + return p.Name != nil +} + +func (p *TimRoster) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimRoster) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetSubscription bool = false; + var issetTid bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetSubscription = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetTid = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.MAP { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetSubscription{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Subscription is not set")); + } + if !issetTid{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tid is not set")); + } + return nil +} + +func (p *TimRoster) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Subscription = v +} + return nil +} + +func (p *TimRoster) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Tid = &Tid{} + if err := p.Tid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) + } + return nil +} + +func (p *TimRoster) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Name = &v +} + return nil +} + +func (p *TimRoster) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key51 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key51 = v +} +var _val52 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val52 = v +} + p.ExtraMap[_key51] = _val52 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimRoster) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimRoster"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimRoster) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "subscription", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:subscription: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Subscription)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.subscription (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:subscription: ", p), err) } + return err +} + +func (p *TimRoster) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tid", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tid: ", p), err) } + if err := p.Tid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tid: ", p), err) } + return err +} + +func (p *TimRoster) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetName() { + if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:name: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Name)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.name (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:name: ", p), err) } + } + return err +} + +func (p *TimRoster) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) } + } + return err +} + +func (p *TimRoster) Equals(other *TimRoster) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Subscription != other.Subscription { return false } + if !p.Tid.Equals(other.Tid) { return false } + if p.Name != other.Name { + if p.Name == nil || other.Name == nil { + return false + } + if (*p.Name) != (*other.Name) { return false } + } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src53 := other.ExtraMap[k] + if _tgt != _src53 { return false } + } + return true +} + +func (p *TimRoster) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimRoster(%+v)", *p) +} + +// Attributes: +// - Error: 错误码 +// - Ub: 远程用户信息 +// - ExtraMap +type TimRemoteUserBean struct { + Error *TimError `thrift:"error,1" db:"error" json:"error,omitempty"` + Ub *TimUserBean `thrift:"ub,2" db:"ub" json:"ub,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,3" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimRemoteUserBean() *TimRemoteUserBean { + return &TimRemoteUserBean{} +} + +var TimRemoteUserBean_Error_DEFAULT *TimError +func (p *TimRemoteUserBean) GetError() *TimError { + if !p.IsSetError() { + return TimRemoteUserBean_Error_DEFAULT + } +return p.Error +} +var TimRemoteUserBean_Ub_DEFAULT *TimUserBean +func (p *TimRemoteUserBean) GetUb() *TimUserBean { + if !p.IsSetUb() { + return TimRemoteUserBean_Ub_DEFAULT + } +return p.Ub +} +var TimRemoteUserBean_ExtraMap_DEFAULT map[string]string + +func (p *TimRemoteUserBean) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimRemoteUserBean) IsSetError() bool { + return p.Error != nil +} + +func (p *TimRemoteUserBean) IsSetUb() bool { + return p.Ub != nil +} + +func (p *TimRemoteUserBean) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimRemoteUserBean) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.MAP { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimRemoteUserBean) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Error = &TimError{} + if err := p.Error.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Error), err) + } + return nil +} + +func (p *TimRemoteUserBean) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Ub = &TimUserBean{} + if err := p.Ub.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Ub), err) + } + return nil +} + +func (p *TimRemoteUserBean) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key54 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key54 = v +} +var _val55 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val55 = v +} + p.ExtraMap[_key54] = _val55 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimRemoteUserBean) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimRemoteUserBean"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimRemoteUserBean) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetError() { + if err := oprot.WriteFieldBegin(ctx, "error", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:error: ", p), err) } + if err := p.Error.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Error), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:error: ", p), err) } + } + return err +} + +func (p *TimRemoteUserBean) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetUb() { + if err := oprot.WriteFieldBegin(ctx, "ub", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:ub: ", p), err) } + if err := p.Ub.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Ub), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:ub: ", p), err) } + } + return err +} + +func (p *TimRemoteUserBean) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:extraMap: ", p), err) } + } + return err +} + +func (p *TimRemoteUserBean) Equals(other *TimRemoteUserBean) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Error.Equals(other.Error) { return false } + if !p.Ub.Equals(other.Ub) { return false } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src56 := other.ExtraMap[k] + if _tgt != _src56 { return false } + } + return true +} + +func (p *TimRemoteUserBean) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimRemoteUserBean(%+v)", *p) +} + +// Attributes: +// - Error: 错误码 +// - Room: 远程房间信息 +// - ExtraMap +type TimRemoteRoom struct { + Error *TimError `thrift:"error,1" db:"error" json:"error,omitempty"` + Room *TimRoom `thrift:"room,2" db:"room" json:"room,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,3" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimRemoteRoom() *TimRemoteRoom { + return &TimRemoteRoom{} +} + +var TimRemoteRoom_Error_DEFAULT *TimError +func (p *TimRemoteRoom) GetError() *TimError { + if !p.IsSetError() { + return TimRemoteRoom_Error_DEFAULT + } +return p.Error +} +var TimRemoteRoom_Room_DEFAULT *TimRoom +func (p *TimRemoteRoom) GetRoom() *TimRoom { + if !p.IsSetRoom() { + return TimRemoteRoom_Room_DEFAULT + } +return p.Room +} +var TimRemoteRoom_ExtraMap_DEFAULT map[string]string + +func (p *TimRemoteRoom) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimRemoteRoom) IsSetError() bool { + return p.Error != nil +} + +func (p *TimRemoteRoom) IsSetRoom() bool { + return p.Room != nil +} + +func (p *TimRemoteRoom) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimRemoteRoom) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.MAP { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimRemoteRoom) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Error = &TimError{} + if err := p.Error.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Error), err) + } + return nil +} + +func (p *TimRemoteRoom) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Room = &TimRoom{} + if err := p.Room.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Room), err) + } + return nil +} + +func (p *TimRemoteRoom) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key57 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key57 = v +} +var _val58 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val58 = v +} + p.ExtraMap[_key57] = _val58 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimRemoteRoom) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimRemoteRoom"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimRemoteRoom) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetError() { + if err := oprot.WriteFieldBegin(ctx, "error", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:error: ", p), err) } + if err := p.Error.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Error), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:error: ", p), err) } + } + return err +} + +func (p *TimRemoteRoom) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetRoom() { + if err := oprot.WriteFieldBegin(ctx, "room", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:room: ", p), err) } + if err := p.Room.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Room), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:room: ", p), err) } + } + return err +} + +func (p *TimRemoteRoom) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:extraMap: ", p), err) } + } + return err +} + +func (p *TimRemoteRoom) Equals(other *TimRemoteRoom) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Error.Equals(other.Error) { return false } + if !p.Room.Equals(other.Room) { return false } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src59 := other.ExtraMap[k] + if _tgt != _src59 { return false } + } + return true +} + +func (p *TimRemoteRoom) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimRemoteRoom(%+v)", *p) +} + +// Attributes: +// - ThreadId +// - Error: 错误码 +// - ExtraList: 附加信息 +// - ExtraMap +type TimResponseBean struct { + ThreadId *string `thrift:"threadId,1" db:"threadId" json:"threadId,omitempty"` + Error *TimError `thrift:"error,2" db:"error" json:"error,omitempty"` + ExtraList []*TimNode `thrift:"extraList,3" db:"extraList" json:"extraList,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,4" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimResponseBean() *TimResponseBean { + return &TimResponseBean{} +} + +var TimResponseBean_ThreadId_DEFAULT string +func (p *TimResponseBean) GetThreadId() string { + if !p.IsSetThreadId() { + return TimResponseBean_ThreadId_DEFAULT + } +return *p.ThreadId +} +var TimResponseBean_Error_DEFAULT *TimError +func (p *TimResponseBean) GetError() *TimError { + if !p.IsSetError() { + return TimResponseBean_Error_DEFAULT + } +return p.Error +} +var TimResponseBean_ExtraList_DEFAULT []*TimNode + +func (p *TimResponseBean) GetExtraList() []*TimNode { + return p.ExtraList +} +var TimResponseBean_ExtraMap_DEFAULT map[string]string + +func (p *TimResponseBean) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimResponseBean) IsSetThreadId() bool { + return p.ThreadId != nil +} + +func (p *TimResponseBean) IsSetError() bool { + return p.Error != nil +} + +func (p *TimResponseBean) IsSetExtraList() bool { + return p.ExtraList != nil +} + +func (p *TimResponseBean) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimResponseBean) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.LIST { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.MAP { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimResponseBean) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.ThreadId = &v +} + return nil +} + +func (p *TimResponseBean) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Error = &TimError{} + if err := p.Error.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Error), err) + } + return nil +} + +func (p *TimResponseBean) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TimNode, 0, size) + p.ExtraList = tSlice + for i := 0; i < size; i ++ { + _elem60 := &TimNode{} + if err := _elem60.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem60), err) + } + p.ExtraList = append(p.ExtraList, _elem60) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimResponseBean) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key61 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key61 = v +} +var _val62 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val62 = v +} + p.ExtraMap[_key61] = _val62 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimResponseBean) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimResponseBean"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimResponseBean) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetThreadId() { + if err := oprot.WriteFieldBegin(ctx, "threadId", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.ThreadId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) } + } + return err +} + +func (p *TimResponseBean) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetError() { + if err := oprot.WriteFieldBegin(ctx, "error", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:error: ", p), err) } + if err := p.Error.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Error), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:error: ", p), err) } + } + return err +} + +func (p *TimResponseBean) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraList() { + if err := oprot.WriteFieldBegin(ctx, "extraList", thrift.LIST, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:extraList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ExtraList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ExtraList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:extraList: ", p), err) } + } + return err +} + +func (p *TimResponseBean) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) } + } + return err +} + +func (p *TimResponseBean) Equals(other *TimResponseBean) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.ThreadId != other.ThreadId { + if p.ThreadId == nil || other.ThreadId == nil { + return false + } + if (*p.ThreadId) != (*other.ThreadId) { return false } + } + if !p.Error.Equals(other.Error) { return false } + if len(p.ExtraList) != len(other.ExtraList) { return false } + for i, _tgt := range p.ExtraList { + _src63 := other.ExtraList[i] + if !_tgt.Equals(_src63) { return false } + } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src64 := other.ExtraMap[k] + if _tgt != _src64 { return false } + } + return true +} + +func (p *TimResponseBean) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimResponseBean(%+v)", *p) +} + +// Attributes: +// - FromTid +// - ToTid +// - Addr: ip地址 +// - Port: 端口 +// - Transport: 传输类型 1:tcp 2:udp +// - PubId: 发布id 通过发布id 可以连接两个发布id相同的用户 +// - ExtraMap +type TimSock5Bean struct { + FromTid *Tid `thrift:"fromTid,1,required" db:"fromTid" json:"fromTid"` + ToTid *Tid `thrift:"toTid,2,required" db:"toTid" json:"toTid"` + Addr string `thrift:"addr,3,required" db:"addr" json:"addr"` + Port int32 `thrift:"port,4,required" db:"port" json:"port"` + Transport int16 `thrift:"transport,5,required" db:"transport" json:"transport"` + PubId string `thrift:"pubId,6,required" db:"pubId" json:"pubId"` + ExtraMap map[string]string `thrift:"extraMap,7" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimSock5Bean() *TimSock5Bean { + return &TimSock5Bean{} +} + +var TimSock5Bean_FromTid_DEFAULT *Tid +func (p *TimSock5Bean) GetFromTid() *Tid { + if !p.IsSetFromTid() { + return TimSock5Bean_FromTid_DEFAULT + } +return p.FromTid +} +var TimSock5Bean_ToTid_DEFAULT *Tid +func (p *TimSock5Bean) GetToTid() *Tid { + if !p.IsSetToTid() { + return TimSock5Bean_ToTid_DEFAULT + } +return p.ToTid +} + +func (p *TimSock5Bean) GetAddr() string { + return p.Addr +} + +func (p *TimSock5Bean) GetPort() int32 { + return p.Port +} + +func (p *TimSock5Bean) GetTransport() int16 { + return p.Transport +} + +func (p *TimSock5Bean) GetPubId() string { + return p.PubId +} +var TimSock5Bean_ExtraMap_DEFAULT map[string]string + +func (p *TimSock5Bean) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimSock5Bean) IsSetFromTid() bool { + return p.FromTid != nil +} + +func (p *TimSock5Bean) IsSetToTid() bool { + return p.ToTid != nil +} + +func (p *TimSock5Bean) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimSock5Bean) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetFromTid bool = false; + var issetToTid bool = false; + var issetAddr bool = false; + var issetPort bool = false; + var issetTransport bool = false; + var issetPubId bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetFromTid = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetToTid = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + issetAddr = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.I32 { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + issetPort = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.I16 { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + issetTransport = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.STRING { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + issetPubId = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.MAP { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetFromTid{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field FromTid is not set")); + } + if !issetToTid{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ToTid is not set")); + } + if !issetAddr{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Addr is not set")); + } + if !issetPort{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Port is not set")); + } + if !issetTransport{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Transport is not set")); + } + if !issetPubId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PubId is not set")); + } + return nil +} + +func (p *TimSock5Bean) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.FromTid = &Tid{} + if err := p.FromTid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.FromTid), err) + } + return nil +} + +func (p *TimSock5Bean) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.ToTid = &Tid{} + if err := p.ToTid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ToTid), err) + } + return nil +} + +func (p *TimSock5Bean) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Addr = v +} + return nil +} + +func (p *TimSock5Bean) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.Port = v +} + return nil +} + +func (p *TimSock5Bean) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI16(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) +} else { + p.Transport = v +} + return nil +} + +func (p *TimSock5Bean) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) +} else { + p.PubId = v +} + return nil +} + +func (p *TimSock5Bean) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key65 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key65 = v +} +var _val66 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val66 = v +} + p.ExtraMap[_key65] = _val66 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimSock5Bean) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimSock5Bean"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimSock5Bean) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "fromTid", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:fromTid: ", p), err) } + if err := p.FromTid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.FromTid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:fromTid: ", p), err) } + return err +} + +func (p *TimSock5Bean) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "toTid", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:toTid: ", p), err) } + if err := p.ToTid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ToTid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:toTid: ", p), err) } + return err +} + +func (p *TimSock5Bean) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "addr", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:addr: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Addr)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.addr (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:addr: ", p), err) } + return err +} + +func (p *TimSock5Bean) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "port", thrift.I32, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:port: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.Port)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.port (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:port: ", p), err) } + return err +} + +func (p *TimSock5Bean) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "transport", thrift.I16, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:transport: ", p), err) } + if err := oprot.WriteI16(ctx, int16(p.Transport)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.transport (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:transport: ", p), err) } + return err +} + +func (p *TimSock5Bean) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "pubId", thrift.STRING, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:pubId: ", p), err) } + if err := oprot.WriteString(ctx, string(p.PubId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.pubId (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:pubId: ", p), err) } + return err +} + +func (p *TimSock5Bean) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:extraMap: ", p), err) } + } + return err +} + +func (p *TimSock5Bean) Equals(other *TimSock5Bean) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.FromTid.Equals(other.FromTid) { return false } + if !p.ToTid.Equals(other.ToTid) { return false } + if p.Addr != other.Addr { return false } + if p.Port != other.Port { return false } + if p.Transport != other.Transport { return false } + if p.PubId != other.PubId { return false } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src67 := other.ExtraMap[k] + if _tgt != _src67 { return false } + } + return true +} + +func (p *TimSock5Bean) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimSock5Bean(%+v)", *p) +} + +// Attributes: +// - PubId: 发布id +// - Index: 序号数据块 +// - Bytes: 数据块 +// - ExtraMap +type TimSock5Bytes struct { + PubId string `thrift:"pubId,1,required" db:"pubId" json:"pubId"` + Index int32 `thrift:"index,2,required" db:"index" json:"index"` + Bytes [][]byte `thrift:"bytes,3,required" db:"bytes" json:"bytes"` + ExtraMap map[string]string `thrift:"extraMap,4" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimSock5Bytes() *TimSock5Bytes { + return &TimSock5Bytes{} +} + + +func (p *TimSock5Bytes) GetPubId() string { + return p.PubId +} + +func (p *TimSock5Bytes) GetIndex() int32 { + return p.Index +} + +func (p *TimSock5Bytes) GetBytes() [][]byte { + return p.Bytes +} +var TimSock5Bytes_ExtraMap_DEFAULT map[string]string + +func (p *TimSock5Bytes) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimSock5Bytes) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimSock5Bytes) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetPubId bool = false; + var issetIndex bool = false; + var issetBytes bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetPubId = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.I32 { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetIndex = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.LIST { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + issetBytes = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.MAP { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetPubId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PubId is not set")); + } + if !issetIndex{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Index is not set")); + } + if !issetBytes{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Bytes is not set")); + } + return nil +} + +func (p *TimSock5Bytes) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.PubId = v +} + return nil +} + +func (p *TimSock5Bytes) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Index = v +} + return nil +} + +func (p *TimSock5Bytes) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([][]byte, 0, size) + p.Bytes = tSlice + for i := 0; i < size; i ++ { +var _elem68 []byte + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem68 = v +} + p.Bytes = append(p.Bytes, _elem68) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimSock5Bytes) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key69 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key69 = v +} +var _val70 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val70 = v +} + p.ExtraMap[_key69] = _val70 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimSock5Bytes) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimSock5Bytes"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimSock5Bytes) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "pubId", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pubId: ", p), err) } + if err := oprot.WriteString(ctx, string(p.PubId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.pubId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:pubId: ", p), err) } + return err +} + +func (p *TimSock5Bytes) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "index", thrift.I32, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:index: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.Index)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.index (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:index: ", p), err) } + return err +} + +func (p *TimSock5Bytes) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "bytes", thrift.LIST, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:bytes: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Bytes)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Bytes { + if err := oprot.WriteBinary(ctx, v); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:bytes: ", p), err) } + return err +} + +func (p *TimSock5Bytes) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) } + } + return err +} + +func (p *TimSock5Bytes) Equals(other *TimSock5Bytes) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.PubId != other.PubId { return false } + if p.Index != other.Index { return false } + if len(p.Bytes) != len(other.Bytes) { return false } + for i, _tgt := range p.Bytes { + _src71 := other.Bytes[i] + if bytes.Compare(_tgt, _src71) != 0 { return false } + } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src72 := other.ExtraMap[k] + if _tgt != _src72 { return false } + } + return true +} + +func (p *TimSock5Bytes) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimSock5Bytes(%+v)", *p) +} + +// Attributes: +// - FromTimeStamp: 时间上 +// - ToTimeStamp: 时间下 +// - LimitCount: 条数 +// - ExtraMap +type TimPage struct { + FromTimeStamp *string `thrift:"fromTimeStamp,1" db:"fromTimeStamp" json:"fromTimeStamp,omitempty"` + ToTimeStamp *string `thrift:"toTimeStamp,2" db:"toTimeStamp" json:"toTimeStamp,omitempty"` + LimitCount *int32 `thrift:"limitCount,3" db:"limitCount" json:"limitCount,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,4" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimPage() *TimPage { + return &TimPage{} +} + +var TimPage_FromTimeStamp_DEFAULT string +func (p *TimPage) GetFromTimeStamp() string { + if !p.IsSetFromTimeStamp() { + return TimPage_FromTimeStamp_DEFAULT + } +return *p.FromTimeStamp +} +var TimPage_ToTimeStamp_DEFAULT string +func (p *TimPage) GetToTimeStamp() string { + if !p.IsSetToTimeStamp() { + return TimPage_ToTimeStamp_DEFAULT + } +return *p.ToTimeStamp +} +var TimPage_LimitCount_DEFAULT int32 +func (p *TimPage) GetLimitCount() int32 { + if !p.IsSetLimitCount() { + return TimPage_LimitCount_DEFAULT + } +return *p.LimitCount +} +var TimPage_ExtraMap_DEFAULT map[string]string + +func (p *TimPage) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimPage) IsSetFromTimeStamp() bool { + return p.FromTimeStamp != nil +} + +func (p *TimPage) IsSetToTimeStamp() bool { + return p.ToTimeStamp != nil +} + +func (p *TimPage) IsSetLimitCount() bool { + return p.LimitCount != nil +} + +func (p *TimPage) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimPage) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.I32 { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.MAP { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimPage) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.FromTimeStamp = &v +} + return nil +} + +func (p *TimPage) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.ToTimeStamp = &v +} + return nil +} + +func (p *TimPage) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.LimitCount = &v +} + return nil +} + +func (p *TimPage) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key73 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key73 = v +} +var _val74 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val74 = v +} + p.ExtraMap[_key73] = _val74 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimPage) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimPage"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimPage) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetFromTimeStamp() { + if err := oprot.WriteFieldBegin(ctx, "fromTimeStamp", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:fromTimeStamp: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.FromTimeStamp)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.fromTimeStamp (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:fromTimeStamp: ", p), err) } + } + return err +} + +func (p *TimPage) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetToTimeStamp() { + if err := oprot.WriteFieldBegin(ctx, "toTimeStamp", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:toTimeStamp: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.ToTimeStamp)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.toTimeStamp (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:toTimeStamp: ", p), err) } + } + return err +} + +func (p *TimPage) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetLimitCount() { + if err := oprot.WriteFieldBegin(ctx, "limitCount", thrift.I32, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:limitCount: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.LimitCount)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.limitCount (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:limitCount: ", p), err) } + } + return err +} + +func (p *TimPage) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) } + } + return err +} + +func (p *TimPage) Equals(other *TimPage) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.FromTimeStamp != other.FromTimeStamp { + if p.FromTimeStamp == nil || other.FromTimeStamp == nil { + return false + } + if (*p.FromTimeStamp) != (*other.FromTimeStamp) { return false } + } + if p.ToTimeStamp != other.ToTimeStamp { + if p.ToTimeStamp == nil || other.ToTimeStamp == nil { + return false + } + if (*p.ToTimeStamp) != (*other.ToTimeStamp) { return false } + } + if p.LimitCount != other.LimitCount { + if p.LimitCount == nil || other.LimitCount == nil { + return false + } + if (*p.LimitCount) != (*other.LimitCount) { return false } + } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src75 := other.ExtraMap[k] + if _tgt != _src75 { return false } + } + return true +} + +func (p *TimPage) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimPage(%+v)", *p) +} + +// Attributes: +// - Tidlist: tid集合 +// - TimPage: 分页 +// - Midlist: mid集合 +// - ExtraMap +type TimMessageIq struct { + Tidlist []string `thrift:"tidlist,1" db:"tidlist" json:"tidlist,omitempty"` + TimPage *TimPage `thrift:"timPage,2" db:"timPage" json:"timPage,omitempty"` + Midlist []string `thrift:"midlist,3" db:"midlist" json:"midlist,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,4" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimMessageIq() *TimMessageIq { + return &TimMessageIq{} +} + +var TimMessageIq_Tidlist_DEFAULT []string + +func (p *TimMessageIq) GetTidlist() []string { + return p.Tidlist +} +var TimMessageIq_TimPage_DEFAULT *TimPage +func (p *TimMessageIq) GetTimPage() *TimPage { + if !p.IsSetTimPage() { + return TimMessageIq_TimPage_DEFAULT + } +return p.TimPage +} +var TimMessageIq_Midlist_DEFAULT []string + +func (p *TimMessageIq) GetMidlist() []string { + return p.Midlist +} +var TimMessageIq_ExtraMap_DEFAULT map[string]string + +func (p *TimMessageIq) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimMessageIq) IsSetTidlist() bool { + return p.Tidlist != nil +} + +func (p *TimMessageIq) IsSetTimPage() bool { + return p.TimPage != nil +} + +func (p *TimMessageIq) IsSetMidlist() bool { + return p.Midlist != nil +} + +func (p *TimMessageIq) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimMessageIq) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.LIST { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.LIST { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.MAP { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimMessageIq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]string, 0, size) + p.Tidlist = tSlice + for i := 0; i < size; i ++ { +var _elem76 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem76 = v +} + p.Tidlist = append(p.Tidlist, _elem76) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimMessageIq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.TimPage = &TimPage{} + if err := p.TimPage.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TimPage), err) + } + return nil +} + +func (p *TimMessageIq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]string, 0, size) + p.Midlist = tSlice + for i := 0; i < size; i ++ { +var _elem77 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem77 = v +} + p.Midlist = append(p.Midlist, _elem77) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimMessageIq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key78 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key78 = v +} +var _val79 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val79 = v +} + p.ExtraMap[_key78] = _val79 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimMessageIq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimMessageIq"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimMessageIq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTidlist() { + if err := oprot.WriteFieldBegin(ctx, "tidlist", thrift.LIST, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tidlist: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Tidlist)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Tidlist { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tidlist: ", p), err) } + } + return err +} + +func (p *TimMessageIq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimPage() { + if err := oprot.WriteFieldBegin(ctx, "timPage", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:timPage: ", p), err) } + if err := p.TimPage.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TimPage), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:timPage: ", p), err) } + } + return err +} + +func (p *TimMessageIq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetMidlist() { + if err := oprot.WriteFieldBegin(ctx, "midlist", thrift.LIST, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:midlist: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Midlist)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Midlist { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:midlist: ", p), err) } + } + return err +} + +func (p *TimMessageIq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) } + } + return err +} + +func (p *TimMessageIq) Equals(other *TimMessageIq) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if len(p.Tidlist) != len(other.Tidlist) { return false } + for i, _tgt := range p.Tidlist { + _src80 := other.Tidlist[i] + if _tgt != _src80 { return false } + } + if !p.TimPage.Equals(other.TimPage) { return false } + if len(p.Midlist) != len(other.Midlist) { return false } + for i, _tgt := range p.Midlist { + _src81 := other.Midlist[i] + if _tgt != _src81 { return false } + } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src82 := other.ExtraMap[k] + if _tgt != _src82 { return false } + } + return true +} + +func (p *TimMessageIq) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimMessageIq(%+v)", *p) +} + +// Attributes: +// - Domain: 域名 +// - Username: 用户名 +// - Pwd: 密码 +type TimAuth struct { + Domain *string `thrift:"domain,1" db:"domain" json:"domain,omitempty"` + Username *string `thrift:"username,2" db:"username" json:"username,omitempty"` + Pwd *string `thrift:"pwd,3" db:"pwd" json:"pwd,omitempty"` +} + +func NewTimAuth() *TimAuth { + return &TimAuth{} +} + +var TimAuth_Domain_DEFAULT string +func (p *TimAuth) GetDomain() string { + if !p.IsSetDomain() { + return TimAuth_Domain_DEFAULT + } +return *p.Domain +} +var TimAuth_Username_DEFAULT string +func (p *TimAuth) GetUsername() string { + if !p.IsSetUsername() { + return TimAuth_Username_DEFAULT + } +return *p.Username +} +var TimAuth_Pwd_DEFAULT string +func (p *TimAuth) GetPwd() string { + if !p.IsSetPwd() { + return TimAuth_Pwd_DEFAULT + } +return *p.Pwd +} +func (p *TimAuth) IsSetDomain() bool { + return p.Domain != nil +} + +func (p *TimAuth) IsSetUsername() bool { + return p.Username != nil +} + +func (p *TimAuth) IsSetPwd() bool { + return p.Pwd != nil +} + +func (p *TimAuth) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimAuth) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Domain = &v +} + return nil +} + +func (p *TimAuth) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Username = &v +} + return nil +} + +func (p *TimAuth) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Pwd = &v +} + return nil +} + +func (p *TimAuth) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimAuth"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimAuth) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetDomain() { + if err := oprot.WriteFieldBegin(ctx, "domain", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:domain: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Domain)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.domain (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:domain: ", p), err) } + } + return err +} + +func (p *TimAuth) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetUsername() { + if err := oprot.WriteFieldBegin(ctx, "username", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:username: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Username)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.username (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:username: ", p), err) } + } + return err +} + +func (p *TimAuth) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetPwd() { + if err := oprot.WriteFieldBegin(ctx, "pwd", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:pwd: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Pwd)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.pwd (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:pwd: ", p), err) } + } + return err +} + +func (p *TimAuth) Equals(other *TimAuth) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Domain != other.Domain { + if p.Domain == nil || other.Domain == nil { + return false + } + if (*p.Domain) != (*other.Domain) { return false } + } + if p.Username != other.Username { + if p.Username == nil || other.Username == nil { + return false + } + if (*p.Username) != (*other.Username) { return false } + } + if p.Pwd != other.Pwd { + if p.Pwd == nil || other.Pwd == nil { + return false + } + if (*p.Pwd) != (*other.Pwd) { return false } + } + return true +} + +func (p *TimAuth) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimAuth(%+v)", *p) +} + +// Attributes: +// - ThreadId +// - TimMBeanList: 信息列表 +// - ReqType: 类型 +// - ExtraMap +type TimMBeanList struct { + ThreadId string `thrift:"threadId,1,required" db:"threadId" json:"threadId"` + TimMBeanList []*TimMBean `thrift:"timMBeanList,2" db:"timMBeanList" json:"timMBeanList,omitempty"` + ReqType *string `thrift:"reqType,3" db:"reqType" json:"reqType,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,4" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimMBeanList() *TimMBeanList { + return &TimMBeanList{} +} + + +func (p *TimMBeanList) GetThreadId() string { + return p.ThreadId +} +var TimMBeanList_TimMBeanList_DEFAULT []*TimMBean + +func (p *TimMBeanList) GetTimMBeanList() []*TimMBean { + return p.TimMBeanList +} +var TimMBeanList_ReqType_DEFAULT string +func (p *TimMBeanList) GetReqType() string { + if !p.IsSetReqType() { + return TimMBeanList_ReqType_DEFAULT + } +return *p.ReqType +} +var TimMBeanList_ExtraMap_DEFAULT map[string]string + +func (p *TimMBeanList) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimMBeanList) IsSetTimMBeanList() bool { + return p.TimMBeanList != nil +} + +func (p *TimMBeanList) IsSetReqType() bool { + return p.ReqType != nil +} + +func (p *TimMBeanList) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimMBeanList) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetThreadId bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetThreadId = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.LIST { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.MAP { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetThreadId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ThreadId is not set")); + } + return nil +} + +func (p *TimMBeanList) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.ThreadId = v +} + return nil +} + +func (p *TimMBeanList) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TimMBean, 0, size) + p.TimMBeanList = tSlice + for i := 0; i < size; i ++ { + _elem83 := &TimMBean{} + if err := _elem83.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem83), err) + } + p.TimMBeanList = append(p.TimMBeanList, _elem83) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimMBeanList) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.ReqType = &v +} + return nil +} + +func (p *TimMBeanList) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key84 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key84 = v +} +var _val85 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val85 = v +} + p.ExtraMap[_key84] = _val85 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimMBeanList) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimMBeanList"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimMBeanList) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "threadId", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) } + if err := oprot.WriteString(ctx, string(p.ThreadId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) } + return err +} + +func (p *TimMBeanList) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimMBeanList() { + if err := oprot.WriteFieldBegin(ctx, "timMBeanList", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:timMBeanList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.TimMBeanList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.TimMBeanList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:timMBeanList: ", p), err) } + } + return err +} + +func (p *TimMBeanList) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetReqType() { + if err := oprot.WriteFieldBegin(ctx, "reqType", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:reqType: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.ReqType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.reqType (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:reqType: ", p), err) } + } + return err +} + +func (p *TimMBeanList) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) } + } + return err +} + +func (p *TimMBeanList) Equals(other *TimMBeanList) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.ThreadId != other.ThreadId { return false } + if len(p.TimMBeanList) != len(other.TimMBeanList) { return false } + for i, _tgt := range p.TimMBeanList { + _src86 := other.TimMBeanList[i] + if !_tgt.Equals(_src86) { return false } + } + if p.ReqType != other.ReqType { + if p.ReqType == nil || other.ReqType == nil { + return false + } + if (*p.ReqType) != (*other.ReqType) { return false } + } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src87 := other.ExtraMap[k] + if _tgt != _src87 { return false } + } + return true +} + +func (p *TimMBeanList) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimMBeanList(%+v)", *p) +} + +// Attributes: +// - ThreadId +// - TimPBeanList: 状态信息列表 +// - ReqType: 类型 +// - ExtraMap +type TimPBeanList struct { + ThreadId string `thrift:"threadId,1,required" db:"threadId" json:"threadId"` + TimPBeanList []*TimPBean `thrift:"timPBeanList,2" db:"timPBeanList" json:"timPBeanList,omitempty"` + ReqType *string `thrift:"reqType,3" db:"reqType" json:"reqType,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,4" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimPBeanList() *TimPBeanList { + return &TimPBeanList{} +} + + +func (p *TimPBeanList) GetThreadId() string { + return p.ThreadId +} +var TimPBeanList_TimPBeanList_DEFAULT []*TimPBean + +func (p *TimPBeanList) GetTimPBeanList() []*TimPBean { + return p.TimPBeanList +} +var TimPBeanList_ReqType_DEFAULT string +func (p *TimPBeanList) GetReqType() string { + if !p.IsSetReqType() { + return TimPBeanList_ReqType_DEFAULT + } +return *p.ReqType +} +var TimPBeanList_ExtraMap_DEFAULT map[string]string + +func (p *TimPBeanList) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimPBeanList) IsSetTimPBeanList() bool { + return p.TimPBeanList != nil +} + +func (p *TimPBeanList) IsSetReqType() bool { + return p.ReqType != nil +} + +func (p *TimPBeanList) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimPBeanList) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetThreadId bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetThreadId = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.LIST { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.MAP { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetThreadId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ThreadId is not set")); + } + return nil +} + +func (p *TimPBeanList) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.ThreadId = v +} + return nil +} + +func (p *TimPBeanList) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TimPBean, 0, size) + p.TimPBeanList = tSlice + for i := 0; i < size; i ++ { + _elem88 := &TimPBean{} + if err := _elem88.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem88), err) + } + p.TimPBeanList = append(p.TimPBeanList, _elem88) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimPBeanList) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.ReqType = &v +} + return nil +} + +func (p *TimPBeanList) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key89 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key89 = v +} +var _val90 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val90 = v +} + p.ExtraMap[_key89] = _val90 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimPBeanList) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimPBeanList"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimPBeanList) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "threadId", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) } + if err := oprot.WriteString(ctx, string(p.ThreadId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) } + return err +} + +func (p *TimPBeanList) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimPBeanList() { + if err := oprot.WriteFieldBegin(ctx, "timPBeanList", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:timPBeanList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.TimPBeanList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.TimPBeanList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:timPBeanList: ", p), err) } + } + return err +} + +func (p *TimPBeanList) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetReqType() { + if err := oprot.WriteFieldBegin(ctx, "reqType", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:reqType: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.ReqType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.reqType (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:reqType: ", p), err) } + } + return err +} + +func (p *TimPBeanList) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) } + } + return err +} + +func (p *TimPBeanList) Equals(other *TimPBeanList) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.ThreadId != other.ThreadId { return false } + if len(p.TimPBeanList) != len(other.TimPBeanList) { return false } + for i, _tgt := range p.TimPBeanList { + _src91 := other.TimPBeanList[i] + if !_tgt.Equals(_src91) { return false } + } + if p.ReqType != other.ReqType { + if p.ReqType == nil || other.ReqType == nil { + return false + } + if (*p.ReqType) != (*other.ReqType) { return false } + } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src92 := other.ExtraMap[k] + if _tgt != _src92 { return false } + } + return true +} + +func (p *TimPBeanList) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimPBeanList(%+v)", *p) +} + +// Attributes: +// - ThreadId +// - Interflow: 消息合流 +// - TLS: tls +type TimPropertyBean struct { + ThreadId *string `thrift:"threadId,1" db:"threadId" json:"threadId,omitempty"` + Interflow *string `thrift:"interflow,2" db:"interflow" json:"interflow,omitempty"` + TLS *string `thrift:"tls,3" db:"tls" json:"tls,omitempty"` +} + +func NewTimPropertyBean() *TimPropertyBean { + return &TimPropertyBean{} +} + +var TimPropertyBean_ThreadId_DEFAULT string +func (p *TimPropertyBean) GetThreadId() string { + if !p.IsSetThreadId() { + return TimPropertyBean_ThreadId_DEFAULT + } +return *p.ThreadId +} +var TimPropertyBean_Interflow_DEFAULT string +func (p *TimPropertyBean) GetInterflow() string { + if !p.IsSetInterflow() { + return TimPropertyBean_Interflow_DEFAULT + } +return *p.Interflow +} +var TimPropertyBean_TLS_DEFAULT string +func (p *TimPropertyBean) GetTLS() string { + if !p.IsSetTLS() { + return TimPropertyBean_TLS_DEFAULT + } +return *p.TLS +} +func (p *TimPropertyBean) IsSetThreadId() bool { + return p.ThreadId != nil +} + +func (p *TimPropertyBean) IsSetInterflow() bool { + return p.Interflow != nil +} + +func (p *TimPropertyBean) IsSetTLS() bool { + return p.TLS != nil +} + +func (p *TimPropertyBean) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimPropertyBean) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.ThreadId = &v +} + return nil +} + +func (p *TimPropertyBean) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Interflow = &v +} + return nil +} + +func (p *TimPropertyBean) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.TLS = &v +} + return nil +} + +func (p *TimPropertyBean) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimPropertyBean"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimPropertyBean) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetThreadId() { + if err := oprot.WriteFieldBegin(ctx, "threadId", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.ThreadId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) } + } + return err +} + +func (p *TimPropertyBean) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetInterflow() { + if err := oprot.WriteFieldBegin(ctx, "interflow", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:interflow: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Interflow)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.interflow (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:interflow: ", p), err) } + } + return err +} + +func (p *TimPropertyBean) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTLS() { + if err := oprot.WriteFieldBegin(ctx, "tls", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:tls: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.TLS)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.tls (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:tls: ", p), err) } + } + return err +} + +func (p *TimPropertyBean) Equals(other *TimPropertyBean) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.ThreadId != other.ThreadId { + if p.ThreadId == nil || other.ThreadId == nil { + return false + } + if (*p.ThreadId) != (*other.ThreadId) { return false } + } + if p.Interflow != other.Interflow { + if p.Interflow == nil || other.Interflow == nil { + return false + } + if (*p.Interflow) != (*other.Interflow) { return false } + } + if p.TLS != other.TLS { + if p.TLS == nil || other.TLS == nil { + return false + } + if (*p.TLS) != (*other.TLS) { return false } + } + return true +} + +func (p *TimPropertyBean) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimPropertyBean(%+v)", *p) +} + +type ITim interface { + // 流程开始 + // + // Parameters: + // - Param + TimStream(ctx context.Context, param *TimParam) (_err error) + // tls协议 + TimStarttls(ctx context.Context) (_err error) + // 登陆协议 + // + // Parameters: + // - Tid + // - Pwd + TimLogin(ctx context.Context, tid *Tid, pwd string) (_err error) + // 回执信息 + // + // Parameters: + // - Ab + TimAck(ctx context.Context, ab *TimAckBean) (_err error) + // 广播出席协议或接收广播协议 + // + // Parameters: + // - Pbean + TimPresence(ctx context.Context, pbean *TimPBean) (_err error) + // 发送信息或接收信息 + // + // Parameters: + // - Mbean + TimMessage(ctx context.Context, mbean *TimMBean) (_err error) + // ping 心跳协议 + // + // Parameters: + // - ThreadId + TimPing(ctx context.Context, threadId string) (_err error) + // 错误通知 + // + // Parameters: + // - E + TimError(ctx context.Context, e *TimError) (_err error) + // 登出协议 + TimLogout(ctx context.Context) (_err error) + // 注册协议 + // + // Parameters: + // - Tid + // - Auth + TimRegist(ctx context.Context, tid *Tid, auth string) (_err error) + // 花名册 + // + // Parameters: + // - Roster + TimRoser(ctx context.Context, roster *TimRoster) (_err error) + // 发送信息或接收信息列表(合流) + // + // Parameters: + // - MbeanList + TimMessageList(ctx context.Context, mbeanList *TimMBeanList) (_err error) + // 发送状态信息列表(合流) + // + // Parameters: + // - PbeanList + TimPresenceList(ctx context.Context, pbeanList *TimPBeanList) (_err error) + // 信息请求 get请求数据 del删除 + // + // Parameters: + // - TimMsgIq + // - IqType + TimMessageIq(ctx context.Context, timMsgIq *TimMessageIq, iqType string) (_err error) + // 信息请求 + // + // Parameters: + // - Mbean + TimMessageResult_(ctx context.Context, mbean *TimMBean) (_err error) + // 用户协议属性请求 + // + // Parameters: + // - Tpb + TimProperty(ctx context.Context, tpb *TimPropertyBean) (_err error) + // 请求远程验证信息 + // + // Parameters: + // - Tid + // - Pwd + // - Auth + TimRemoteUserAuth(ctx context.Context, tid *Tid, pwd string, auth *TimAuth) (_r *TimRemoteUserBean, _err error) + // 请求远程用户信息 + // + // Parameters: + // - Tid + // - Auth + TimRemoteUserGet(ctx context.Context, tid *Tid, auth *TimAuth) (_r *TimRemoteUserBean, _err error) + // 编辑远程用户信息 + // + // Parameters: + // - Tid + // - Ub + // - Auth + TimRemoteUserEdit(ctx context.Context, tid *Tid, ub *TimUserBean, auth *TimAuth) (_r *TimRemoteUserBean, _err error) + // 广播出席协议或接收广播协议 + // + // Parameters: + // - Pbean + // - Auth + TimResponsePresence(ctx context.Context, pbean *TimPBean, auth *TimAuth) (_r *TimResponseBean, _err error) + // 发送信息或接收信息 + // + // Parameters: + // - Mbean + // - Auth + TimResponseMessage(ctx context.Context, mbean *TimMBean, auth *TimAuth) (_r *TimResponseBean, _err error) + // 信息请求 get请求数据 del删除(辅助接口) + // + // Parameters: + // - TimMsgIq + // - IqType + // - Auth + TimResponseMessageIq(ctx context.Context, timMsgIq *TimMessageIq, iqType string, auth *TimAuth) (_r *TimMBeanList, _err error) + // 广播出席协议或接收广播协议 + // + // Parameters: + // - PbeanList + // - Auth + TimResponsePresenceList(ctx context.Context, pbeanList *TimPBeanList, auth *TimAuth) (_r *TimResponseBean, _err error) + // 发送信息或接收信息 + // + // Parameters: + // - MbeanList + // - Auth + TimResponseMessageList(ctx context.Context, mbeanList *TimMBeanList, auth *TimAuth) (_r *TimResponseBean, _err error) +} + +type ITimClient struct { + c thrift.TClient + meta thrift.ResponseMeta +} + +func NewITimClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *ITimClient { + return &ITimClient{ + c: thrift.NewTStandardClient(f.GetProtocol(t), f.GetProtocol(t)), + } +} + +func NewITimClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *ITimClient { + return &ITimClient{ + c: thrift.NewTStandardClient(iprot, oprot), + } +} + +func NewITimClient(c thrift.TClient) *ITimClient { + return &ITimClient{ + c: c, + } +} + +func (p *ITimClient) Client_() thrift.TClient { + return p.c +} + +func (p *ITimClient) LastResponseMeta_() thrift.ResponseMeta { + return p.meta +} + +func (p *ITimClient) SetLastResponseMeta_(meta thrift.ResponseMeta) { + p.meta = meta +} + +// 流程开始 +// +// Parameters: +// - Param +func (p *ITimClient) TimStream(ctx context.Context, param *TimParam) (_err error) { + var _args93 ITimTimStreamArgs + _args93.Param = param + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timStream", &_args93, nil); err != nil { + return err + } + return nil +} + +// tls协议 +func (p *ITimClient) TimStarttls(ctx context.Context) (_err error) { + var _args94 ITimTimStarttlsArgs + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timStarttls", &_args94, nil); err != nil { + return err + } + return nil +} + +// 登陆协议 +// +// Parameters: +// - Tid +// - Pwd +func (p *ITimClient) TimLogin(ctx context.Context, tid *Tid, pwd string) (_err error) { + var _args95 ITimTimLoginArgs + _args95.Tid = tid + _args95.Pwd = pwd + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timLogin", &_args95, nil); err != nil { + return err + } + return nil +} + +// 回执信息 +// +// Parameters: +// - Ab +func (p *ITimClient) TimAck(ctx context.Context, ab *TimAckBean) (_err error) { + var _args96 ITimTimAckArgs + _args96.Ab = ab + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timAck", &_args96, nil); err != nil { + return err + } + return nil +} + +// 广播出席协议或接收广播协议 +// +// Parameters: +// - Pbean +func (p *ITimClient) TimPresence(ctx context.Context, pbean *TimPBean) (_err error) { + var _args97 ITimTimPresenceArgs + _args97.Pbean = pbean + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timPresence", &_args97, nil); err != nil { + return err + } + return nil +} + +// 发送信息或接收信息 +// +// Parameters: +// - Mbean +func (p *ITimClient) TimMessage(ctx context.Context, mbean *TimMBean) (_err error) { + var _args98 ITimTimMessageArgs + _args98.Mbean = mbean + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timMessage", &_args98, nil); err != nil { + return err + } + return nil +} + +// ping 心跳协议 +// +// Parameters: +// - ThreadId +func (p *ITimClient) TimPing(ctx context.Context, threadId string) (_err error) { + var _args99 ITimTimPingArgs + _args99.ThreadId = threadId + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timPing", &_args99, nil); err != nil { + return err + } + return nil +} + +// 错误通知 +// +// Parameters: +// - E +func (p *ITimClient) TimError(ctx context.Context, e *TimError) (_err error) { + var _args100 ITimTimErrorArgs + _args100.E = e + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timError", &_args100, nil); err != nil { + return err + } + return nil +} + +// 登出协议 +func (p *ITimClient) TimLogout(ctx context.Context) (_err error) { + var _args101 ITimTimLogoutArgs + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timLogout", &_args101, nil); err != nil { + return err + } + return nil +} + +// 注册协议 +// +// Parameters: +// - Tid +// - Auth +func (p *ITimClient) TimRegist(ctx context.Context, tid *Tid, auth string) (_err error) { + var _args102 ITimTimRegistArgs + _args102.Tid = tid + _args102.Auth = auth + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timRegist", &_args102, nil); err != nil { + return err + } + return nil +} + +// 花名册 +// +// Parameters: +// - Roster +func (p *ITimClient) TimRoser(ctx context.Context, roster *TimRoster) (_err error) { + var _args103 ITimTimRoserArgs + _args103.Roster = roster + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timRoser", &_args103, nil); err != nil { + return err + } + return nil +} + +// 发送信息或接收信息列表(合流) +// +// Parameters: +// - MbeanList +func (p *ITimClient) TimMessageList(ctx context.Context, mbeanList *TimMBeanList) (_err error) { + var _args104 ITimTimMessageListArgs + _args104.MbeanList = mbeanList + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timMessageList", &_args104, nil); err != nil { + return err + } + return nil +} + +// 发送状态信息列表(合流) +// +// Parameters: +// - PbeanList +func (p *ITimClient) TimPresenceList(ctx context.Context, pbeanList *TimPBeanList) (_err error) { + var _args105 ITimTimPresenceListArgs + _args105.PbeanList = pbeanList + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timPresenceList", &_args105, nil); err != nil { + return err + } + return nil +} + +// 信息请求 get请求数据 del删除 +// +// Parameters: +// - TimMsgIq +// - IqType +func (p *ITimClient) TimMessageIq(ctx context.Context, timMsgIq *TimMessageIq, iqType string) (_err error) { + var _args106 ITimTimMessageIqArgs + _args106.TimMsgIq = timMsgIq + _args106.IqType = iqType + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timMessageIq", &_args106, nil); err != nil { + return err + } + return nil +} + +// 信息请求 +// +// Parameters: +// - Mbean +func (p *ITimClient) TimMessageResult_(ctx context.Context, mbean *TimMBean) (_err error) { + var _args107 ITimTimMessageResultArgs + _args107.Mbean = mbean + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timMessageResult", &_args107, nil); err != nil { + return err + } + return nil +} + +// 用户协议属性请求 +// +// Parameters: +// - Tpb +func (p *ITimClient) TimProperty(ctx context.Context, tpb *TimPropertyBean) (_err error) { + var _args108 ITimTimPropertyArgs + _args108.Tpb = tpb + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timProperty", &_args108, nil); err != nil { + return err + } + return nil +} + +// 请求远程验证信息 +// +// Parameters: +// - Tid +// - Pwd +// - Auth +func (p *ITimClient) TimRemoteUserAuth(ctx context.Context, tid *Tid, pwd string, auth *TimAuth) (_r *TimRemoteUserBean, _err error) { + var _args109 ITimTimRemoteUserAuthArgs + _args109.Tid = tid + _args109.Pwd = pwd + _args109.Auth = auth + var _result111 ITimTimRemoteUserAuthResult + var _meta110 thrift.ResponseMeta + _meta110, _err = p.Client_().Call(ctx, "timRemoteUserAuth", &_args109, &_result111) + p.SetLastResponseMeta_(_meta110) + if _err != nil { + return + } + if _ret112 := _result111.GetSuccess(); _ret112 != nil { + return _ret112, nil + } + return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "timRemoteUserAuth failed: unknown result") +} + +// 请求远程用户信息 +// +// Parameters: +// - Tid +// - Auth +func (p *ITimClient) TimRemoteUserGet(ctx context.Context, tid *Tid, auth *TimAuth) (_r *TimRemoteUserBean, _err error) { + var _args113 ITimTimRemoteUserGetArgs + _args113.Tid = tid + _args113.Auth = auth + var _result115 ITimTimRemoteUserGetResult + var _meta114 thrift.ResponseMeta + _meta114, _err = p.Client_().Call(ctx, "timRemoteUserGet", &_args113, &_result115) + p.SetLastResponseMeta_(_meta114) + if _err != nil { + return + } + if _ret116 := _result115.GetSuccess(); _ret116 != nil { + return _ret116, nil + } + return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "timRemoteUserGet failed: unknown result") +} + +// 编辑远程用户信息 +// +// Parameters: +// - Tid +// - Ub +// - Auth +func (p *ITimClient) TimRemoteUserEdit(ctx context.Context, tid *Tid, ub *TimUserBean, auth *TimAuth) (_r *TimRemoteUserBean, _err error) { + var _args117 ITimTimRemoteUserEditArgs + _args117.Tid = tid + _args117.Ub = ub + _args117.Auth = auth + var _result119 ITimTimRemoteUserEditResult + var _meta118 thrift.ResponseMeta + _meta118, _err = p.Client_().Call(ctx, "timRemoteUserEdit", &_args117, &_result119) + p.SetLastResponseMeta_(_meta118) + if _err != nil { + return + } + if _ret120 := _result119.GetSuccess(); _ret120 != nil { + return _ret120, nil + } + return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "timRemoteUserEdit failed: unknown result") +} + +// 广播出席协议或接收广播协议 +// +// Parameters: +// - Pbean +// - Auth +func (p *ITimClient) TimResponsePresence(ctx context.Context, pbean *TimPBean, auth *TimAuth) (_r *TimResponseBean, _err error) { + var _args121 ITimTimResponsePresenceArgs + _args121.Pbean = pbean + _args121.Auth = auth + var _result123 ITimTimResponsePresenceResult + var _meta122 thrift.ResponseMeta + _meta122, _err = p.Client_().Call(ctx, "timResponsePresence", &_args121, &_result123) + p.SetLastResponseMeta_(_meta122) + if _err != nil { + return + } + if _ret124 := _result123.GetSuccess(); _ret124 != nil { + return _ret124, nil + } + return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "timResponsePresence failed: unknown result") +} + +// 发送信息或接收信息 +// +// Parameters: +// - Mbean +// - Auth +func (p *ITimClient) TimResponseMessage(ctx context.Context, mbean *TimMBean, auth *TimAuth) (_r *TimResponseBean, _err error) { + var _args125 ITimTimResponseMessageArgs + _args125.Mbean = mbean + _args125.Auth = auth + var _result127 ITimTimResponseMessageResult + var _meta126 thrift.ResponseMeta + _meta126, _err = p.Client_().Call(ctx, "timResponseMessage", &_args125, &_result127) + p.SetLastResponseMeta_(_meta126) + if _err != nil { + return + } + if _ret128 := _result127.GetSuccess(); _ret128 != nil { + return _ret128, nil + } + return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "timResponseMessage failed: unknown result") +} + +// 信息请求 get请求数据 del删除(辅助接口) +// +// Parameters: +// - TimMsgIq +// - IqType +// - Auth +func (p *ITimClient) TimResponseMessageIq(ctx context.Context, timMsgIq *TimMessageIq, iqType string, auth *TimAuth) (_r *TimMBeanList, _err error) { + var _args129 ITimTimResponseMessageIqArgs + _args129.TimMsgIq = timMsgIq + _args129.IqType = iqType + _args129.Auth = auth + var _result131 ITimTimResponseMessageIqResult + var _meta130 thrift.ResponseMeta + _meta130, _err = p.Client_().Call(ctx, "timResponseMessageIq", &_args129, &_result131) + p.SetLastResponseMeta_(_meta130) + if _err != nil { + return + } + if _ret132 := _result131.GetSuccess(); _ret132 != nil { + return _ret132, nil + } + return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "timResponseMessageIq failed: unknown result") +} + +// 广播出席协议或接收广播协议 +// +// Parameters: +// - PbeanList +// - Auth +func (p *ITimClient) TimResponsePresenceList(ctx context.Context, pbeanList *TimPBeanList, auth *TimAuth) (_r *TimResponseBean, _err error) { + var _args133 ITimTimResponsePresenceListArgs + _args133.PbeanList = pbeanList + _args133.Auth = auth + var _result135 ITimTimResponsePresenceListResult + var _meta134 thrift.ResponseMeta + _meta134, _err = p.Client_().Call(ctx, "timResponsePresenceList", &_args133, &_result135) + p.SetLastResponseMeta_(_meta134) + if _err != nil { + return + } + if _ret136 := _result135.GetSuccess(); _ret136 != nil { + return _ret136, nil + } + return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "timResponsePresenceList failed: unknown result") +} + +// 发送信息或接收信息 +// +// Parameters: +// - MbeanList +// - Auth +func (p *ITimClient) TimResponseMessageList(ctx context.Context, mbeanList *TimMBeanList, auth *TimAuth) (_r *TimResponseBean, _err error) { + var _args137 ITimTimResponseMessageListArgs + _args137.MbeanList = mbeanList + _args137.Auth = auth + var _result139 ITimTimResponseMessageListResult + var _meta138 thrift.ResponseMeta + _meta138, _err = p.Client_().Call(ctx, "timResponseMessageList", &_args137, &_result139) + p.SetLastResponseMeta_(_meta138) + if _err != nil { + return + } + if _ret140 := _result139.GetSuccess(); _ret140 != nil { + return _ret140, nil + } + return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "timResponseMessageList failed: unknown result") +} + +type ITimProcessor struct { + processorMap map[string]thrift.TProcessorFunction + handler ITim +} + +func (p *ITimProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction) { + p.processorMap[key] = processor +} + +func (p *ITimProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool) { + processor, ok = p.processorMap[key] + return processor, ok +} + +func (p *ITimProcessor) ProcessorMap() map[string]thrift.TProcessorFunction { + return p.processorMap +} + +func NewITimProcessor(handler ITim) *ITimProcessor { + + self141 := &ITimProcessor{handler:handler, processorMap:make(map[string]thrift.TProcessorFunction)} + self141.processorMap["timStream"] = &iTimProcessorTimStream{handler:handler} + self141.processorMap["timStarttls"] = &iTimProcessorTimStarttls{handler:handler} + self141.processorMap["timLogin"] = &iTimProcessorTimLogin{handler:handler} + self141.processorMap["timAck"] = &iTimProcessorTimAck{handler:handler} + self141.processorMap["timPresence"] = &iTimProcessorTimPresence{handler:handler} + self141.processorMap["timMessage"] = &iTimProcessorTimMessage{handler:handler} + self141.processorMap["timPing"] = &iTimProcessorTimPing{handler:handler} + self141.processorMap["timError"] = &iTimProcessorTimError{handler:handler} + self141.processorMap["timLogout"] = &iTimProcessorTimLogout{handler:handler} + self141.processorMap["timRegist"] = &iTimProcessorTimRegist{handler:handler} + self141.processorMap["timRoser"] = &iTimProcessorTimRoser{handler:handler} + self141.processorMap["timMessageList"] = &iTimProcessorTimMessageList{handler:handler} + self141.processorMap["timPresenceList"] = &iTimProcessorTimPresenceList{handler:handler} + self141.processorMap["timMessageIq"] = &iTimProcessorTimMessageIq{handler:handler} + self141.processorMap["timMessageResult"] = &iTimProcessorTimMessageResult_{handler:handler} + self141.processorMap["timProperty"] = &iTimProcessorTimProperty{handler:handler} + self141.processorMap["timRemoteUserAuth"] = &iTimProcessorTimRemoteUserAuth{handler:handler} + self141.processorMap["timRemoteUserGet"] = &iTimProcessorTimRemoteUserGet{handler:handler} + self141.processorMap["timRemoteUserEdit"] = &iTimProcessorTimRemoteUserEdit{handler:handler} + self141.processorMap["timResponsePresence"] = &iTimProcessorTimResponsePresence{handler:handler} + self141.processorMap["timResponseMessage"] = &iTimProcessorTimResponseMessage{handler:handler} + self141.processorMap["timResponseMessageIq"] = &iTimProcessorTimResponseMessageIq{handler:handler} + self141.processorMap["timResponsePresenceList"] = &iTimProcessorTimResponsePresenceList{handler:handler} + self141.processorMap["timResponseMessageList"] = &iTimProcessorTimResponseMessageList{handler:handler} +return self141 +} + +func (p *ITimProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + name, _, seqId, err2 := iprot.ReadMessageBegin(ctx) + if err2 != nil { return false, thrift.WrapTException(err2) } + if processor, ok := p.GetProcessorFunction(name); ok { + return processor.Process(ctx, seqId, iprot, oprot) + } + iprot.Skip(ctx, thrift.STRUCT) + iprot.ReadMessageEnd(ctx) + x142 := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function " + name) + oprot.WriteMessageBegin(ctx, name, thrift.EXCEPTION, seqId) + x142.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, x142 + +} + +type iTimProcessorTimStream struct { + handler ITim +} + +func (p *iTimProcessorTimStream) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimStreamArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimStream(ctx, args.Param); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimStarttls struct { + handler ITim +} + +func (p *iTimProcessorTimStarttls) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimStarttlsArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimStarttls(ctx); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimLogin struct { + handler ITim +} + +func (p *iTimProcessorTimLogin) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimLoginArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimLogin(ctx, args.Tid, args.Pwd); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimAck struct { + handler ITim +} + +func (p *iTimProcessorTimAck) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimAckArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimAck(ctx, args.Ab); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimPresence struct { + handler ITim +} + +func (p *iTimProcessorTimPresence) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimPresenceArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimPresence(ctx, args.Pbean); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimMessage struct { + handler ITim +} + +func (p *iTimProcessorTimMessage) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimMessageArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimMessage(ctx, args.Mbean); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimPing struct { + handler ITim +} + +func (p *iTimProcessorTimPing) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimPingArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimPing(ctx, args.ThreadId); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimError struct { + handler ITim +} + +func (p *iTimProcessorTimError) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimErrorArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimError(ctx, args.E); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimLogout struct { + handler ITim +} + +func (p *iTimProcessorTimLogout) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimLogoutArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimLogout(ctx); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimRegist struct { + handler ITim +} + +func (p *iTimProcessorTimRegist) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimRegistArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimRegist(ctx, args.Tid, args.Auth); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimRoser struct { + handler ITim +} + +func (p *iTimProcessorTimRoser) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimRoserArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimRoser(ctx, args.Roster); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimMessageList struct { + handler ITim +} + +func (p *iTimProcessorTimMessageList) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimMessageListArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimMessageList(ctx, args.MbeanList); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimPresenceList struct { + handler ITim +} + +func (p *iTimProcessorTimPresenceList) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimPresenceListArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimPresenceList(ctx, args.PbeanList); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimMessageIq struct { + handler ITim +} + +func (p *iTimProcessorTimMessageIq) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimMessageIqArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimMessageIq(ctx, args.TimMsgIq, args.IqType); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimMessageResult_ struct { + handler ITim +} + +func (p *iTimProcessorTimMessageResult_) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimMessageResultArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimMessageResult_(ctx, args.Mbean); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimProperty struct { + handler ITim +} + +func (p *iTimProcessorTimProperty) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimPropertyArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimProperty(ctx, args.Tpb); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimRemoteUserAuth struct { + handler ITim +} + +func (p *iTimProcessorTimRemoteUserAuth) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err143 error + args := ITimTimRemoteUserAuthArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "timRemoteUserAuth", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := ITimTimRemoteUserAuthResult{} + if retval, err2 := p.handler.TimRemoteUserAuth(ctx, args.Tid, args.Pwd, args.Auth); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc144 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timRemoteUserAuth: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "timRemoteUserAuth", thrift.EXCEPTION, seqId); err2 != nil { + _write_err143 = thrift.WrapTException(err2) + } + if err2 := _exc144.Write(ctx, oprot); _write_err143 == nil && err2 != nil { + _write_err143 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err143 == nil && err2 != nil { + _write_err143 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err143 == nil && err2 != nil { + _write_err143 = thrift.WrapTException(err2) + } + if _write_err143 != nil { + return false, thrift.WrapTException(_write_err143) + } + return true, err + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "timRemoteUserAuth", thrift.REPLY, seqId); err2 != nil { + _write_err143 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err143 == nil && err2 != nil { + _write_err143 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err143 == nil && err2 != nil { + _write_err143 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err143 == nil && err2 != nil { + _write_err143 = thrift.WrapTException(err2) + } + if _write_err143 != nil { + return false, thrift.WrapTException(_write_err143) + } + return true, err +} + +type iTimProcessorTimRemoteUserGet struct { + handler ITim +} + +func (p *iTimProcessorTimRemoteUserGet) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err145 error + args := ITimTimRemoteUserGetArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "timRemoteUserGet", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := ITimTimRemoteUserGetResult{} + if retval, err2 := p.handler.TimRemoteUserGet(ctx, args.Tid, args.Auth); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc146 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timRemoteUserGet: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "timRemoteUserGet", thrift.EXCEPTION, seqId); err2 != nil { + _write_err145 = thrift.WrapTException(err2) + } + if err2 := _exc146.Write(ctx, oprot); _write_err145 == nil && err2 != nil { + _write_err145 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err145 == nil && err2 != nil { + _write_err145 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err145 == nil && err2 != nil { + _write_err145 = thrift.WrapTException(err2) + } + if _write_err145 != nil { + return false, thrift.WrapTException(_write_err145) + } + return true, err + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "timRemoteUserGet", thrift.REPLY, seqId); err2 != nil { + _write_err145 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err145 == nil && err2 != nil { + _write_err145 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err145 == nil && err2 != nil { + _write_err145 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err145 == nil && err2 != nil { + _write_err145 = thrift.WrapTException(err2) + } + if _write_err145 != nil { + return false, thrift.WrapTException(_write_err145) + } + return true, err +} + +type iTimProcessorTimRemoteUserEdit struct { + handler ITim +} + +func (p *iTimProcessorTimRemoteUserEdit) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err147 error + args := ITimTimRemoteUserEditArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "timRemoteUserEdit", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := ITimTimRemoteUserEditResult{} + if retval, err2 := p.handler.TimRemoteUserEdit(ctx, args.Tid, args.Ub, args.Auth); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc148 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timRemoteUserEdit: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "timRemoteUserEdit", thrift.EXCEPTION, seqId); err2 != nil { + _write_err147 = thrift.WrapTException(err2) + } + if err2 := _exc148.Write(ctx, oprot); _write_err147 == nil && err2 != nil { + _write_err147 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err147 == nil && err2 != nil { + _write_err147 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err147 == nil && err2 != nil { + _write_err147 = thrift.WrapTException(err2) + } + if _write_err147 != nil { + return false, thrift.WrapTException(_write_err147) + } + return true, err + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "timRemoteUserEdit", thrift.REPLY, seqId); err2 != nil { + _write_err147 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err147 == nil && err2 != nil { + _write_err147 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err147 == nil && err2 != nil { + _write_err147 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err147 == nil && err2 != nil { + _write_err147 = thrift.WrapTException(err2) + } + if _write_err147 != nil { + return false, thrift.WrapTException(_write_err147) + } + return true, err +} + +type iTimProcessorTimResponsePresence struct { + handler ITim +} + +func (p *iTimProcessorTimResponsePresence) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err149 error + args := ITimTimResponsePresenceArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "timResponsePresence", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := ITimTimResponsePresenceResult{} + if retval, err2 := p.handler.TimResponsePresence(ctx, args.Pbean, args.Auth); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc150 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timResponsePresence: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "timResponsePresence", thrift.EXCEPTION, seqId); err2 != nil { + _write_err149 = thrift.WrapTException(err2) + } + if err2 := _exc150.Write(ctx, oprot); _write_err149 == nil && err2 != nil { + _write_err149 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err149 == nil && err2 != nil { + _write_err149 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err149 == nil && err2 != nil { + _write_err149 = thrift.WrapTException(err2) + } + if _write_err149 != nil { + return false, thrift.WrapTException(_write_err149) + } + return true, err + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "timResponsePresence", thrift.REPLY, seqId); err2 != nil { + _write_err149 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err149 == nil && err2 != nil { + _write_err149 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err149 == nil && err2 != nil { + _write_err149 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err149 == nil && err2 != nil { + _write_err149 = thrift.WrapTException(err2) + } + if _write_err149 != nil { + return false, thrift.WrapTException(_write_err149) + } + return true, err +} + +type iTimProcessorTimResponseMessage struct { + handler ITim +} + +func (p *iTimProcessorTimResponseMessage) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err151 error + args := ITimTimResponseMessageArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "timResponseMessage", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := ITimTimResponseMessageResult{} + if retval, err2 := p.handler.TimResponseMessage(ctx, args.Mbean, args.Auth); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc152 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timResponseMessage: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "timResponseMessage", thrift.EXCEPTION, seqId); err2 != nil { + _write_err151 = thrift.WrapTException(err2) + } + if err2 := _exc152.Write(ctx, oprot); _write_err151 == nil && err2 != nil { + _write_err151 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err151 == nil && err2 != nil { + _write_err151 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err151 == nil && err2 != nil { + _write_err151 = thrift.WrapTException(err2) + } + if _write_err151 != nil { + return false, thrift.WrapTException(_write_err151) + } + return true, err + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "timResponseMessage", thrift.REPLY, seqId); err2 != nil { + _write_err151 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err151 == nil && err2 != nil { + _write_err151 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err151 == nil && err2 != nil { + _write_err151 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err151 == nil && err2 != nil { + _write_err151 = thrift.WrapTException(err2) + } + if _write_err151 != nil { + return false, thrift.WrapTException(_write_err151) + } + return true, err +} + +type iTimProcessorTimResponseMessageIq struct { + handler ITim +} + +func (p *iTimProcessorTimResponseMessageIq) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err153 error + args := ITimTimResponseMessageIqArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "timResponseMessageIq", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := ITimTimResponseMessageIqResult{} + if retval, err2 := p.handler.TimResponseMessageIq(ctx, args.TimMsgIq, args.IqType, args.Auth); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc154 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timResponseMessageIq: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "timResponseMessageIq", thrift.EXCEPTION, seqId); err2 != nil { + _write_err153 = thrift.WrapTException(err2) + } + if err2 := _exc154.Write(ctx, oprot); _write_err153 == nil && err2 != nil { + _write_err153 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err153 == nil && err2 != nil { + _write_err153 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err153 == nil && err2 != nil { + _write_err153 = thrift.WrapTException(err2) + } + if _write_err153 != nil { + return false, thrift.WrapTException(_write_err153) + } + return true, err + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "timResponseMessageIq", thrift.REPLY, seqId); err2 != nil { + _write_err153 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err153 == nil && err2 != nil { + _write_err153 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err153 == nil && err2 != nil { + _write_err153 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err153 == nil && err2 != nil { + _write_err153 = thrift.WrapTException(err2) + } + if _write_err153 != nil { + return false, thrift.WrapTException(_write_err153) + } + return true, err +} + +type iTimProcessorTimResponsePresenceList struct { + handler ITim +} + +func (p *iTimProcessorTimResponsePresenceList) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err155 error + args := ITimTimResponsePresenceListArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "timResponsePresenceList", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := ITimTimResponsePresenceListResult{} + if retval, err2 := p.handler.TimResponsePresenceList(ctx, args.PbeanList, args.Auth); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc156 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timResponsePresenceList: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "timResponsePresenceList", thrift.EXCEPTION, seqId); err2 != nil { + _write_err155 = thrift.WrapTException(err2) + } + if err2 := _exc156.Write(ctx, oprot); _write_err155 == nil && err2 != nil { + _write_err155 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err155 == nil && err2 != nil { + _write_err155 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err155 == nil && err2 != nil { + _write_err155 = thrift.WrapTException(err2) + } + if _write_err155 != nil { + return false, thrift.WrapTException(_write_err155) + } + return true, err + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "timResponsePresenceList", thrift.REPLY, seqId); err2 != nil { + _write_err155 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err155 == nil && err2 != nil { + _write_err155 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err155 == nil && err2 != nil { + _write_err155 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err155 == nil && err2 != nil { + _write_err155 = thrift.WrapTException(err2) + } + if _write_err155 != nil { + return false, thrift.WrapTException(_write_err155) + } + return true, err +} + +type iTimProcessorTimResponseMessageList struct { + handler ITim +} + +func (p *iTimProcessorTimResponseMessageList) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err157 error + args := ITimTimResponseMessageListArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "timResponseMessageList", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := ITimTimResponseMessageListResult{} + if retval, err2 := p.handler.TimResponseMessageList(ctx, args.MbeanList, args.Auth); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc158 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timResponseMessageList: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "timResponseMessageList", thrift.EXCEPTION, seqId); err2 != nil { + _write_err157 = thrift.WrapTException(err2) + } + if err2 := _exc158.Write(ctx, oprot); _write_err157 == nil && err2 != nil { + _write_err157 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err157 == nil && err2 != nil { + _write_err157 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err157 == nil && err2 != nil { + _write_err157 = thrift.WrapTException(err2) + } + if _write_err157 != nil { + return false, thrift.WrapTException(_write_err157) + } + return true, err + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "timResponseMessageList", thrift.REPLY, seqId); err2 != nil { + _write_err157 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err157 == nil && err2 != nil { + _write_err157 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err157 == nil && err2 != nil { + _write_err157 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err157 == nil && err2 != nil { + _write_err157 = thrift.WrapTException(err2) + } + if _write_err157 != nil { + return false, thrift.WrapTException(_write_err157) + } + return true, err +} + + +// HELPER FUNCTIONS AND STRUCTURES + +// Attributes: +// - Param +type ITimTimStreamArgs struct { + Param *TimParam `thrift:"param,1" db:"param" json:"param"` +} + +func NewITimTimStreamArgs() *ITimTimStreamArgs { + return &ITimTimStreamArgs{} +} + +var ITimTimStreamArgs_Param_DEFAULT *TimParam +func (p *ITimTimStreamArgs) GetParam() *TimParam { + if !p.IsSetParam() { + return ITimTimStreamArgs_Param_DEFAULT + } +return p.Param +} +func (p *ITimTimStreamArgs) IsSetParam() bool { + return p.Param != nil +} + +func (p *ITimTimStreamArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimStreamArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Param = &TimParam{} + if err := p.Param.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Param), err) + } + return nil +} + +func (p *ITimTimStreamArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timStream_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimStreamArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "param", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:param: ", p), err) } + if err := p.Param.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Param), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:param: ", p), err) } + return err +} + +func (p *ITimTimStreamArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimStreamArgs(%+v)", *p) +} + +type ITimTimStarttlsArgs struct { +} + +func NewITimTimStarttlsArgs() *ITimTimStarttlsArgs { + return &ITimTimStarttlsArgs{} +} + +func (p *ITimTimStarttlsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimStarttlsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timStarttls_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimStarttlsArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimStarttlsArgs(%+v)", *p) +} + +// Attributes: +// - Tid +// - Pwd +type ITimTimLoginArgs struct { + Tid *Tid `thrift:"tid,1" db:"tid" json:"tid"` + Pwd string `thrift:"pwd,2" db:"pwd" json:"pwd"` +} + +func NewITimTimLoginArgs() *ITimTimLoginArgs { + return &ITimTimLoginArgs{} +} + +var ITimTimLoginArgs_Tid_DEFAULT *Tid +func (p *ITimTimLoginArgs) GetTid() *Tid { + if !p.IsSetTid() { + return ITimTimLoginArgs_Tid_DEFAULT + } +return p.Tid +} + +func (p *ITimTimLoginArgs) GetPwd() string { + return p.Pwd +} +func (p *ITimTimLoginArgs) IsSetTid() bool { + return p.Tid != nil +} + +func (p *ITimTimLoginArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimLoginArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Tid = &Tid{} + if err := p.Tid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) + } + return nil +} + +func (p *ITimTimLoginArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Pwd = v +} + return nil +} + +func (p *ITimTimLoginArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timLogin_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimLoginArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tid", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) } + if err := p.Tid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) } + return err +} + +func (p *ITimTimLoginArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "pwd", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:pwd: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Pwd)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.pwd (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:pwd: ", p), err) } + return err +} + +func (p *ITimTimLoginArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimLoginArgs(%+v)", *p) +} + +// Attributes: +// - Ab +type ITimTimAckArgs struct { + Ab *TimAckBean `thrift:"ab,1" db:"ab" json:"ab"` +} + +func NewITimTimAckArgs() *ITimTimAckArgs { + return &ITimTimAckArgs{} +} + +var ITimTimAckArgs_Ab_DEFAULT *TimAckBean +func (p *ITimTimAckArgs) GetAb() *TimAckBean { + if !p.IsSetAb() { + return ITimTimAckArgs_Ab_DEFAULT + } +return p.Ab +} +func (p *ITimTimAckArgs) IsSetAb() bool { + return p.Ab != nil +} + +func (p *ITimTimAckArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimAckArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Ab = &TimAckBean{} + if err := p.Ab.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Ab), err) + } + return nil +} + +func (p *ITimTimAckArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timAck_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimAckArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "ab", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:ab: ", p), err) } + if err := p.Ab.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Ab), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:ab: ", p), err) } + return err +} + +func (p *ITimTimAckArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimAckArgs(%+v)", *p) +} + +// Attributes: +// - Pbean +type ITimTimPresenceArgs struct { + Pbean *TimPBean `thrift:"pbean,1" db:"pbean" json:"pbean"` +} + +func NewITimTimPresenceArgs() *ITimTimPresenceArgs { + return &ITimTimPresenceArgs{} +} + +var ITimTimPresenceArgs_Pbean_DEFAULT *TimPBean +func (p *ITimTimPresenceArgs) GetPbean() *TimPBean { + if !p.IsSetPbean() { + return ITimTimPresenceArgs_Pbean_DEFAULT + } +return p.Pbean +} +func (p *ITimTimPresenceArgs) IsSetPbean() bool { + return p.Pbean != nil +} + +func (p *ITimTimPresenceArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimPresenceArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Pbean = &TimPBean{} + if err := p.Pbean.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Pbean), err) + } + return nil +} + +func (p *ITimTimPresenceArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timPresence_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimPresenceArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "pbean", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pbean: ", p), err) } + if err := p.Pbean.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Pbean), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:pbean: ", p), err) } + return err +} + +func (p *ITimTimPresenceArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimPresenceArgs(%+v)", *p) +} + +// Attributes: +// - Mbean +type ITimTimMessageArgs struct { + Mbean *TimMBean `thrift:"mbean,1" db:"mbean" json:"mbean"` +} + +func NewITimTimMessageArgs() *ITimTimMessageArgs { + return &ITimTimMessageArgs{} +} + +var ITimTimMessageArgs_Mbean_DEFAULT *TimMBean +func (p *ITimTimMessageArgs) GetMbean() *TimMBean { + if !p.IsSetMbean() { + return ITimTimMessageArgs_Mbean_DEFAULT + } +return p.Mbean +} +func (p *ITimTimMessageArgs) IsSetMbean() bool { + return p.Mbean != nil +} + +func (p *ITimTimMessageArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimMessageArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Mbean = &TimMBean{} + if err := p.Mbean.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Mbean), err) + } + return nil +} + +func (p *ITimTimMessageArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timMessage_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimMessageArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "mbean", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:mbean: ", p), err) } + if err := p.Mbean.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Mbean), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:mbean: ", p), err) } + return err +} + +func (p *ITimTimMessageArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimMessageArgs(%+v)", *p) +} + +// Attributes: +// - ThreadId +type ITimTimPingArgs struct { + ThreadId string `thrift:"threadId,1" db:"threadId" json:"threadId"` +} + +func NewITimTimPingArgs() *ITimTimPingArgs { + return &ITimTimPingArgs{} +} + + +func (p *ITimTimPingArgs) GetThreadId() string { + return p.ThreadId +} +func (p *ITimTimPingArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimPingArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.ThreadId = v +} + return nil +} + +func (p *ITimTimPingArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timPing_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimPingArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "threadId", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) } + if err := oprot.WriteString(ctx, string(p.ThreadId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) } + return err +} + +func (p *ITimTimPingArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimPingArgs(%+v)", *p) +} + +// Attributes: +// - E +type ITimTimErrorArgs struct { + E *TimError `thrift:"e,1" db:"e" json:"e"` +} + +func NewITimTimErrorArgs() *ITimTimErrorArgs { + return &ITimTimErrorArgs{} +} + +var ITimTimErrorArgs_E_DEFAULT *TimError +func (p *ITimTimErrorArgs) GetE() *TimError { + if !p.IsSetE() { + return ITimTimErrorArgs_E_DEFAULT + } +return p.E +} +func (p *ITimTimErrorArgs) IsSetE() bool { + return p.E != nil +} + +func (p *ITimTimErrorArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimErrorArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.E = &TimError{} + if err := p.E.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.E), err) + } + return nil +} + +func (p *ITimTimErrorArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timError_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimErrorArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "e", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:e: ", p), err) } + if err := p.E.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.E), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:e: ", p), err) } + return err +} + +func (p *ITimTimErrorArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimErrorArgs(%+v)", *p) +} + +type ITimTimLogoutArgs struct { +} + +func NewITimTimLogoutArgs() *ITimTimLogoutArgs { + return &ITimTimLogoutArgs{} +} + +func (p *ITimTimLogoutArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimLogoutArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timLogout_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimLogoutArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimLogoutArgs(%+v)", *p) +} + +// Attributes: +// - Tid +// - Auth +type ITimTimRegistArgs struct { + Tid *Tid `thrift:"tid,1" db:"tid" json:"tid"` + Auth string `thrift:"auth,2" db:"auth" json:"auth"` +} + +func NewITimTimRegistArgs() *ITimTimRegistArgs { + return &ITimTimRegistArgs{} +} + +var ITimTimRegistArgs_Tid_DEFAULT *Tid +func (p *ITimTimRegistArgs) GetTid() *Tid { + if !p.IsSetTid() { + return ITimTimRegistArgs_Tid_DEFAULT + } +return p.Tid +} + +func (p *ITimTimRegistArgs) GetAuth() string { + return p.Auth +} +func (p *ITimTimRegistArgs) IsSetTid() bool { + return p.Tid != nil +} + +func (p *ITimTimRegistArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimRegistArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Tid = &Tid{} + if err := p.Tid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) + } + return nil +} + +func (p *ITimTimRegistArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Auth = v +} + return nil +} + +func (p *ITimTimRegistArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timRegist_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimRegistArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tid", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) } + if err := p.Tid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) } + return err +} + +func (p *ITimTimRegistArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "auth", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:auth: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Auth)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.auth (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:auth: ", p), err) } + return err +} + +func (p *ITimTimRegistArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimRegistArgs(%+v)", *p) +} + +// Attributes: +// - Roster +type ITimTimRoserArgs struct { + Roster *TimRoster `thrift:"roster,1" db:"roster" json:"roster"` +} + +func NewITimTimRoserArgs() *ITimTimRoserArgs { + return &ITimTimRoserArgs{} +} + +var ITimTimRoserArgs_Roster_DEFAULT *TimRoster +func (p *ITimTimRoserArgs) GetRoster() *TimRoster { + if !p.IsSetRoster() { + return ITimTimRoserArgs_Roster_DEFAULT + } +return p.Roster +} +func (p *ITimTimRoserArgs) IsSetRoster() bool { + return p.Roster != nil +} + +func (p *ITimTimRoserArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimRoserArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Roster = &TimRoster{} + if err := p.Roster.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Roster), err) + } + return nil +} + +func (p *ITimTimRoserArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timRoser_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimRoserArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "roster", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:roster: ", p), err) } + if err := p.Roster.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Roster), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:roster: ", p), err) } + return err +} + +func (p *ITimTimRoserArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimRoserArgs(%+v)", *p) +} + +// Attributes: +// - MbeanList +type ITimTimMessageListArgs struct { + MbeanList *TimMBeanList `thrift:"mbeanList,1" db:"mbeanList" json:"mbeanList"` +} + +func NewITimTimMessageListArgs() *ITimTimMessageListArgs { + return &ITimTimMessageListArgs{} +} + +var ITimTimMessageListArgs_MbeanList_DEFAULT *TimMBeanList +func (p *ITimTimMessageListArgs) GetMbeanList() *TimMBeanList { + if !p.IsSetMbeanList() { + return ITimTimMessageListArgs_MbeanList_DEFAULT + } +return p.MbeanList +} +func (p *ITimTimMessageListArgs) IsSetMbeanList() bool { + return p.MbeanList != nil +} + +func (p *ITimTimMessageListArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimMessageListArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.MbeanList = &TimMBeanList{} + if err := p.MbeanList.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.MbeanList), err) + } + return nil +} + +func (p *ITimTimMessageListArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timMessageList_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimMessageListArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "mbeanList", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:mbeanList: ", p), err) } + if err := p.MbeanList.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.MbeanList), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:mbeanList: ", p), err) } + return err +} + +func (p *ITimTimMessageListArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimMessageListArgs(%+v)", *p) +} + +// Attributes: +// - PbeanList +type ITimTimPresenceListArgs struct { + PbeanList *TimPBeanList `thrift:"pbeanList,1" db:"pbeanList" json:"pbeanList"` +} + +func NewITimTimPresenceListArgs() *ITimTimPresenceListArgs { + return &ITimTimPresenceListArgs{} +} + +var ITimTimPresenceListArgs_PbeanList_DEFAULT *TimPBeanList +func (p *ITimTimPresenceListArgs) GetPbeanList() *TimPBeanList { + if !p.IsSetPbeanList() { + return ITimTimPresenceListArgs_PbeanList_DEFAULT + } +return p.PbeanList +} +func (p *ITimTimPresenceListArgs) IsSetPbeanList() bool { + return p.PbeanList != nil +} + +func (p *ITimTimPresenceListArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimPresenceListArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.PbeanList = &TimPBeanList{} + if err := p.PbeanList.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.PbeanList), err) + } + return nil +} + +func (p *ITimTimPresenceListArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timPresenceList_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimPresenceListArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "pbeanList", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pbeanList: ", p), err) } + if err := p.PbeanList.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.PbeanList), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:pbeanList: ", p), err) } + return err +} + +func (p *ITimTimPresenceListArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimPresenceListArgs(%+v)", *p) +} + +// Attributes: +// - TimMsgIq +// - IqType +type ITimTimMessageIqArgs struct { + TimMsgIq *TimMessageIq `thrift:"timMsgIq,1" db:"timMsgIq" json:"timMsgIq"` + IqType string `thrift:"iqType,2" db:"iqType" json:"iqType"` +} + +func NewITimTimMessageIqArgs() *ITimTimMessageIqArgs { + return &ITimTimMessageIqArgs{} +} + +var ITimTimMessageIqArgs_TimMsgIq_DEFAULT *TimMessageIq +func (p *ITimTimMessageIqArgs) GetTimMsgIq() *TimMessageIq { + if !p.IsSetTimMsgIq() { + return ITimTimMessageIqArgs_TimMsgIq_DEFAULT + } +return p.TimMsgIq +} + +func (p *ITimTimMessageIqArgs) GetIqType() string { + return p.IqType +} +func (p *ITimTimMessageIqArgs) IsSetTimMsgIq() bool { + return p.TimMsgIq != nil +} + +func (p *ITimTimMessageIqArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimMessageIqArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.TimMsgIq = &TimMessageIq{} + if err := p.TimMsgIq.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TimMsgIq), err) + } + return nil +} + +func (p *ITimTimMessageIqArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.IqType = v +} + return nil +} + +func (p *ITimTimMessageIqArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timMessageIq_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimMessageIqArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "timMsgIq", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:timMsgIq: ", p), err) } + if err := p.TimMsgIq.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TimMsgIq), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:timMsgIq: ", p), err) } + return err +} + +func (p *ITimTimMessageIqArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "iqType", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:iqType: ", p), err) } + if err := oprot.WriteString(ctx, string(p.IqType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.iqType (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:iqType: ", p), err) } + return err +} + +func (p *ITimTimMessageIqArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimMessageIqArgs(%+v)", *p) +} + +// Attributes: +// - Mbean +type ITimTimMessageResultArgs struct { + Mbean *TimMBean `thrift:"mbean,1" db:"mbean" json:"mbean"` +} + +func NewITimTimMessageResultArgs() *ITimTimMessageResultArgs { + return &ITimTimMessageResultArgs{} +} + +var ITimTimMessageResultArgs_Mbean_DEFAULT *TimMBean +func (p *ITimTimMessageResultArgs) GetMbean() *TimMBean { + if !p.IsSetMbean() { + return ITimTimMessageResultArgs_Mbean_DEFAULT + } +return p.Mbean +} +func (p *ITimTimMessageResultArgs) IsSetMbean() bool { + return p.Mbean != nil +} + +func (p *ITimTimMessageResultArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimMessageResultArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Mbean = &TimMBean{} + if err := p.Mbean.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Mbean), err) + } + return nil +} + +func (p *ITimTimMessageResultArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timMessageResult_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimMessageResultArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "mbean", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:mbean: ", p), err) } + if err := p.Mbean.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Mbean), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:mbean: ", p), err) } + return err +} + +func (p *ITimTimMessageResultArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimMessageResultArgs(%+v)", *p) +} + +// Attributes: +// - Tpb +type ITimTimPropertyArgs struct { + Tpb *TimPropertyBean `thrift:"tpb,1" db:"tpb" json:"tpb"` +} + +func NewITimTimPropertyArgs() *ITimTimPropertyArgs { + return &ITimTimPropertyArgs{} +} + +var ITimTimPropertyArgs_Tpb_DEFAULT *TimPropertyBean +func (p *ITimTimPropertyArgs) GetTpb() *TimPropertyBean { + if !p.IsSetTpb() { + return ITimTimPropertyArgs_Tpb_DEFAULT + } +return p.Tpb +} +func (p *ITimTimPropertyArgs) IsSetTpb() bool { + return p.Tpb != nil +} + +func (p *ITimTimPropertyArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimPropertyArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Tpb = &TimPropertyBean{} + if err := p.Tpb.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tpb), err) + } + return nil +} + +func (p *ITimTimPropertyArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timProperty_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimPropertyArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tpb", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tpb: ", p), err) } + if err := p.Tpb.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tpb), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tpb: ", p), err) } + return err +} + +func (p *ITimTimPropertyArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimPropertyArgs(%+v)", *p) +} + +// Attributes: +// - Tid +// - Pwd +// - Auth +type ITimTimRemoteUserAuthArgs struct { + Tid *Tid `thrift:"tid,1" db:"tid" json:"tid"` + Pwd string `thrift:"pwd,2" db:"pwd" json:"pwd"` + Auth *TimAuth `thrift:"auth,3" db:"auth" json:"auth"` +} + +func NewITimTimRemoteUserAuthArgs() *ITimTimRemoteUserAuthArgs { + return &ITimTimRemoteUserAuthArgs{} +} + +var ITimTimRemoteUserAuthArgs_Tid_DEFAULT *Tid +func (p *ITimTimRemoteUserAuthArgs) GetTid() *Tid { + if !p.IsSetTid() { + return ITimTimRemoteUserAuthArgs_Tid_DEFAULT + } +return p.Tid +} + +func (p *ITimTimRemoteUserAuthArgs) GetPwd() string { + return p.Pwd +} +var ITimTimRemoteUserAuthArgs_Auth_DEFAULT *TimAuth +func (p *ITimTimRemoteUserAuthArgs) GetAuth() *TimAuth { + if !p.IsSetAuth() { + return ITimTimRemoteUserAuthArgs_Auth_DEFAULT + } +return p.Auth +} +func (p *ITimTimRemoteUserAuthArgs) IsSetTid() bool { + return p.Tid != nil +} + +func (p *ITimTimRemoteUserAuthArgs) IsSetAuth() bool { + return p.Auth != nil +} + +func (p *ITimTimRemoteUserAuthArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimRemoteUserAuthArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Tid = &Tid{} + if err := p.Tid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) + } + return nil +} + +func (p *ITimTimRemoteUserAuthArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Pwd = v +} + return nil +} + +func (p *ITimTimRemoteUserAuthArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + p.Auth = &TimAuth{} + if err := p.Auth.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) + } + return nil +} + +func (p *ITimTimRemoteUserAuthArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timRemoteUserAuth_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimRemoteUserAuthArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tid", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) } + if err := p.Tid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) } + return err +} + +func (p *ITimTimRemoteUserAuthArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "pwd", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:pwd: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Pwd)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.pwd (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:pwd: ", p), err) } + return err +} + +func (p *ITimTimRemoteUserAuthArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "auth", thrift.STRUCT, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:auth: ", p), err) } + if err := p.Auth.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:auth: ", p), err) } + return err +} + +func (p *ITimTimRemoteUserAuthArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimRemoteUserAuthArgs(%+v)", *p) +} + +// Attributes: +// - Success +type ITimTimRemoteUserAuthResult struct { + Success *TimRemoteUserBean `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewITimTimRemoteUserAuthResult() *ITimTimRemoteUserAuthResult { + return &ITimTimRemoteUserAuthResult{} +} + +var ITimTimRemoteUserAuthResult_Success_DEFAULT *TimRemoteUserBean +func (p *ITimTimRemoteUserAuthResult) GetSuccess() *TimRemoteUserBean { + if !p.IsSetSuccess() { + return ITimTimRemoteUserAuthResult_Success_DEFAULT + } +return p.Success +} +func (p *ITimTimRemoteUserAuthResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *ITimTimRemoteUserAuthResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimRemoteUserAuthResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TimRemoteUserBean{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } + return nil +} + +func (p *ITimTimRemoteUserAuthResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timRemoteUserAuth_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimRemoteUserAuthResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *ITimTimRemoteUserAuthResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimRemoteUserAuthResult(%+v)", *p) +} + +// Attributes: +// - Tid +// - Auth +type ITimTimRemoteUserGetArgs struct { + Tid *Tid `thrift:"tid,1" db:"tid" json:"tid"` + Auth *TimAuth `thrift:"auth,2" db:"auth" json:"auth"` +} + +func NewITimTimRemoteUserGetArgs() *ITimTimRemoteUserGetArgs { + return &ITimTimRemoteUserGetArgs{} +} + +var ITimTimRemoteUserGetArgs_Tid_DEFAULT *Tid +func (p *ITimTimRemoteUserGetArgs) GetTid() *Tid { + if !p.IsSetTid() { + return ITimTimRemoteUserGetArgs_Tid_DEFAULT + } +return p.Tid +} +var ITimTimRemoteUserGetArgs_Auth_DEFAULT *TimAuth +func (p *ITimTimRemoteUserGetArgs) GetAuth() *TimAuth { + if !p.IsSetAuth() { + return ITimTimRemoteUserGetArgs_Auth_DEFAULT + } +return p.Auth +} +func (p *ITimTimRemoteUserGetArgs) IsSetTid() bool { + return p.Tid != nil +} + +func (p *ITimTimRemoteUserGetArgs) IsSetAuth() bool { + return p.Auth != nil +} + +func (p *ITimTimRemoteUserGetArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimRemoteUserGetArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Tid = &Tid{} + if err := p.Tid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) + } + return nil +} + +func (p *ITimTimRemoteUserGetArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Auth = &TimAuth{} + if err := p.Auth.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) + } + return nil +} + +func (p *ITimTimRemoteUserGetArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timRemoteUserGet_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimRemoteUserGetArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tid", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) } + if err := p.Tid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) } + return err +} + +func (p *ITimTimRemoteUserGetArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "auth", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:auth: ", p), err) } + if err := p.Auth.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:auth: ", p), err) } + return err +} + +func (p *ITimTimRemoteUserGetArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimRemoteUserGetArgs(%+v)", *p) +} + +// Attributes: +// - Success +type ITimTimRemoteUserGetResult struct { + Success *TimRemoteUserBean `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewITimTimRemoteUserGetResult() *ITimTimRemoteUserGetResult { + return &ITimTimRemoteUserGetResult{} +} + +var ITimTimRemoteUserGetResult_Success_DEFAULT *TimRemoteUserBean +func (p *ITimTimRemoteUserGetResult) GetSuccess() *TimRemoteUserBean { + if !p.IsSetSuccess() { + return ITimTimRemoteUserGetResult_Success_DEFAULT + } +return p.Success +} +func (p *ITimTimRemoteUserGetResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *ITimTimRemoteUserGetResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimRemoteUserGetResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TimRemoteUserBean{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } + return nil +} + +func (p *ITimTimRemoteUserGetResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timRemoteUserGet_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimRemoteUserGetResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *ITimTimRemoteUserGetResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimRemoteUserGetResult(%+v)", *p) +} + +// Attributes: +// - Tid +// - Ub +// - Auth +type ITimTimRemoteUserEditArgs struct { + Tid *Tid `thrift:"tid,1" db:"tid" json:"tid"` + Ub *TimUserBean `thrift:"ub,2" db:"ub" json:"ub"` + Auth *TimAuth `thrift:"auth,3" db:"auth" json:"auth"` +} + +func NewITimTimRemoteUserEditArgs() *ITimTimRemoteUserEditArgs { + return &ITimTimRemoteUserEditArgs{} +} + +var ITimTimRemoteUserEditArgs_Tid_DEFAULT *Tid +func (p *ITimTimRemoteUserEditArgs) GetTid() *Tid { + if !p.IsSetTid() { + return ITimTimRemoteUserEditArgs_Tid_DEFAULT + } +return p.Tid +} +var ITimTimRemoteUserEditArgs_Ub_DEFAULT *TimUserBean +func (p *ITimTimRemoteUserEditArgs) GetUb() *TimUserBean { + if !p.IsSetUb() { + return ITimTimRemoteUserEditArgs_Ub_DEFAULT + } +return p.Ub +} +var ITimTimRemoteUserEditArgs_Auth_DEFAULT *TimAuth +func (p *ITimTimRemoteUserEditArgs) GetAuth() *TimAuth { + if !p.IsSetAuth() { + return ITimTimRemoteUserEditArgs_Auth_DEFAULT + } +return p.Auth +} +func (p *ITimTimRemoteUserEditArgs) IsSetTid() bool { + return p.Tid != nil +} + +func (p *ITimTimRemoteUserEditArgs) IsSetUb() bool { + return p.Ub != nil +} + +func (p *ITimTimRemoteUserEditArgs) IsSetAuth() bool { + return p.Auth != nil +} + +func (p *ITimTimRemoteUserEditArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimRemoteUserEditArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Tid = &Tid{} + if err := p.Tid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) + } + return nil +} + +func (p *ITimTimRemoteUserEditArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Ub = &TimUserBean{} + if err := p.Ub.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Ub), err) + } + return nil +} + +func (p *ITimTimRemoteUserEditArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + p.Auth = &TimAuth{} + if err := p.Auth.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) + } + return nil +} + +func (p *ITimTimRemoteUserEditArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timRemoteUserEdit_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimRemoteUserEditArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tid", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) } + if err := p.Tid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) } + return err +} + +func (p *ITimTimRemoteUserEditArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "ub", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:ub: ", p), err) } + if err := p.Ub.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Ub), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:ub: ", p), err) } + return err +} + +func (p *ITimTimRemoteUserEditArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "auth", thrift.STRUCT, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:auth: ", p), err) } + if err := p.Auth.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:auth: ", p), err) } + return err +} + +func (p *ITimTimRemoteUserEditArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimRemoteUserEditArgs(%+v)", *p) +} + +// Attributes: +// - Success +type ITimTimRemoteUserEditResult struct { + Success *TimRemoteUserBean `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewITimTimRemoteUserEditResult() *ITimTimRemoteUserEditResult { + return &ITimTimRemoteUserEditResult{} +} + +var ITimTimRemoteUserEditResult_Success_DEFAULT *TimRemoteUserBean +func (p *ITimTimRemoteUserEditResult) GetSuccess() *TimRemoteUserBean { + if !p.IsSetSuccess() { + return ITimTimRemoteUserEditResult_Success_DEFAULT + } +return p.Success +} +func (p *ITimTimRemoteUserEditResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *ITimTimRemoteUserEditResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimRemoteUserEditResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TimRemoteUserBean{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } + return nil +} + +func (p *ITimTimRemoteUserEditResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timRemoteUserEdit_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimRemoteUserEditResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *ITimTimRemoteUserEditResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimRemoteUserEditResult(%+v)", *p) +} + +// Attributes: +// - Pbean +// - Auth +type ITimTimResponsePresenceArgs struct { + Pbean *TimPBean `thrift:"pbean,1" db:"pbean" json:"pbean"` + Auth *TimAuth `thrift:"auth,2" db:"auth" json:"auth"` +} + +func NewITimTimResponsePresenceArgs() *ITimTimResponsePresenceArgs { + return &ITimTimResponsePresenceArgs{} +} + +var ITimTimResponsePresenceArgs_Pbean_DEFAULT *TimPBean +func (p *ITimTimResponsePresenceArgs) GetPbean() *TimPBean { + if !p.IsSetPbean() { + return ITimTimResponsePresenceArgs_Pbean_DEFAULT + } +return p.Pbean +} +var ITimTimResponsePresenceArgs_Auth_DEFAULT *TimAuth +func (p *ITimTimResponsePresenceArgs) GetAuth() *TimAuth { + if !p.IsSetAuth() { + return ITimTimResponsePresenceArgs_Auth_DEFAULT + } +return p.Auth +} +func (p *ITimTimResponsePresenceArgs) IsSetPbean() bool { + return p.Pbean != nil +} + +func (p *ITimTimResponsePresenceArgs) IsSetAuth() bool { + return p.Auth != nil +} + +func (p *ITimTimResponsePresenceArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimResponsePresenceArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Pbean = &TimPBean{} + if err := p.Pbean.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Pbean), err) + } + return nil +} + +func (p *ITimTimResponsePresenceArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Auth = &TimAuth{} + if err := p.Auth.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) + } + return nil +} + +func (p *ITimTimResponsePresenceArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timResponsePresence_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimResponsePresenceArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "pbean", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pbean: ", p), err) } + if err := p.Pbean.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Pbean), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:pbean: ", p), err) } + return err +} + +func (p *ITimTimResponsePresenceArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "auth", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:auth: ", p), err) } + if err := p.Auth.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:auth: ", p), err) } + return err +} + +func (p *ITimTimResponsePresenceArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimResponsePresenceArgs(%+v)", *p) +} + +// Attributes: +// - Success +type ITimTimResponsePresenceResult struct { + Success *TimResponseBean `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewITimTimResponsePresenceResult() *ITimTimResponsePresenceResult { + return &ITimTimResponsePresenceResult{} +} + +var ITimTimResponsePresenceResult_Success_DEFAULT *TimResponseBean +func (p *ITimTimResponsePresenceResult) GetSuccess() *TimResponseBean { + if !p.IsSetSuccess() { + return ITimTimResponsePresenceResult_Success_DEFAULT + } +return p.Success +} +func (p *ITimTimResponsePresenceResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *ITimTimResponsePresenceResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimResponsePresenceResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TimResponseBean{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } + return nil +} + +func (p *ITimTimResponsePresenceResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timResponsePresence_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimResponsePresenceResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *ITimTimResponsePresenceResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimResponsePresenceResult(%+v)", *p) +} + +// Attributes: +// - Mbean +// - Auth +type ITimTimResponseMessageArgs struct { + Mbean *TimMBean `thrift:"mbean,1" db:"mbean" json:"mbean"` + Auth *TimAuth `thrift:"auth,2" db:"auth" json:"auth"` +} + +func NewITimTimResponseMessageArgs() *ITimTimResponseMessageArgs { + return &ITimTimResponseMessageArgs{} +} + +var ITimTimResponseMessageArgs_Mbean_DEFAULT *TimMBean +func (p *ITimTimResponseMessageArgs) GetMbean() *TimMBean { + if !p.IsSetMbean() { + return ITimTimResponseMessageArgs_Mbean_DEFAULT + } +return p.Mbean +} +var ITimTimResponseMessageArgs_Auth_DEFAULT *TimAuth +func (p *ITimTimResponseMessageArgs) GetAuth() *TimAuth { + if !p.IsSetAuth() { + return ITimTimResponseMessageArgs_Auth_DEFAULT + } +return p.Auth +} +func (p *ITimTimResponseMessageArgs) IsSetMbean() bool { + return p.Mbean != nil +} + +func (p *ITimTimResponseMessageArgs) IsSetAuth() bool { + return p.Auth != nil +} + +func (p *ITimTimResponseMessageArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimResponseMessageArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Mbean = &TimMBean{} + if err := p.Mbean.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Mbean), err) + } + return nil +} + +func (p *ITimTimResponseMessageArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Auth = &TimAuth{} + if err := p.Auth.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) + } + return nil +} + +func (p *ITimTimResponseMessageArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timResponseMessage_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimResponseMessageArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "mbean", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:mbean: ", p), err) } + if err := p.Mbean.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Mbean), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:mbean: ", p), err) } + return err +} + +func (p *ITimTimResponseMessageArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "auth", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:auth: ", p), err) } + if err := p.Auth.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:auth: ", p), err) } + return err +} + +func (p *ITimTimResponseMessageArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimResponseMessageArgs(%+v)", *p) +} + +// Attributes: +// - Success +type ITimTimResponseMessageResult struct { + Success *TimResponseBean `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewITimTimResponseMessageResult() *ITimTimResponseMessageResult { + return &ITimTimResponseMessageResult{} +} + +var ITimTimResponseMessageResult_Success_DEFAULT *TimResponseBean +func (p *ITimTimResponseMessageResult) GetSuccess() *TimResponseBean { + if !p.IsSetSuccess() { + return ITimTimResponseMessageResult_Success_DEFAULT + } +return p.Success +} +func (p *ITimTimResponseMessageResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *ITimTimResponseMessageResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimResponseMessageResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TimResponseBean{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } + return nil +} + +func (p *ITimTimResponseMessageResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timResponseMessage_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimResponseMessageResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *ITimTimResponseMessageResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimResponseMessageResult(%+v)", *p) +} + +// Attributes: +// - TimMsgIq +// - IqType +// - Auth +type ITimTimResponseMessageIqArgs struct { + TimMsgIq *TimMessageIq `thrift:"timMsgIq,1" db:"timMsgIq" json:"timMsgIq"` + IqType string `thrift:"iqType,2" db:"iqType" json:"iqType"` + Auth *TimAuth `thrift:"auth,3" db:"auth" json:"auth"` +} + +func NewITimTimResponseMessageIqArgs() *ITimTimResponseMessageIqArgs { + return &ITimTimResponseMessageIqArgs{} +} + +var ITimTimResponseMessageIqArgs_TimMsgIq_DEFAULT *TimMessageIq +func (p *ITimTimResponseMessageIqArgs) GetTimMsgIq() *TimMessageIq { + if !p.IsSetTimMsgIq() { + return ITimTimResponseMessageIqArgs_TimMsgIq_DEFAULT + } +return p.TimMsgIq +} + +func (p *ITimTimResponseMessageIqArgs) GetIqType() string { + return p.IqType +} +var ITimTimResponseMessageIqArgs_Auth_DEFAULT *TimAuth +func (p *ITimTimResponseMessageIqArgs) GetAuth() *TimAuth { + if !p.IsSetAuth() { + return ITimTimResponseMessageIqArgs_Auth_DEFAULT + } +return p.Auth +} +func (p *ITimTimResponseMessageIqArgs) IsSetTimMsgIq() bool { + return p.TimMsgIq != nil +} + +func (p *ITimTimResponseMessageIqArgs) IsSetAuth() bool { + return p.Auth != nil +} + +func (p *ITimTimResponseMessageIqArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimResponseMessageIqArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.TimMsgIq = &TimMessageIq{} + if err := p.TimMsgIq.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TimMsgIq), err) + } + return nil +} + +func (p *ITimTimResponseMessageIqArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.IqType = v +} + return nil +} + +func (p *ITimTimResponseMessageIqArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + p.Auth = &TimAuth{} + if err := p.Auth.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) + } + return nil +} + +func (p *ITimTimResponseMessageIqArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timResponseMessageIq_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimResponseMessageIqArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "timMsgIq", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:timMsgIq: ", p), err) } + if err := p.TimMsgIq.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TimMsgIq), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:timMsgIq: ", p), err) } + return err +} + +func (p *ITimTimResponseMessageIqArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "iqType", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:iqType: ", p), err) } + if err := oprot.WriteString(ctx, string(p.IqType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.iqType (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:iqType: ", p), err) } + return err +} + +func (p *ITimTimResponseMessageIqArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "auth", thrift.STRUCT, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:auth: ", p), err) } + if err := p.Auth.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:auth: ", p), err) } + return err +} + +func (p *ITimTimResponseMessageIqArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimResponseMessageIqArgs(%+v)", *p) +} + +// Attributes: +// - Success +type ITimTimResponseMessageIqResult struct { + Success *TimMBeanList `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewITimTimResponseMessageIqResult() *ITimTimResponseMessageIqResult { + return &ITimTimResponseMessageIqResult{} +} + +var ITimTimResponseMessageIqResult_Success_DEFAULT *TimMBeanList +func (p *ITimTimResponseMessageIqResult) GetSuccess() *TimMBeanList { + if !p.IsSetSuccess() { + return ITimTimResponseMessageIqResult_Success_DEFAULT + } +return p.Success +} +func (p *ITimTimResponseMessageIqResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *ITimTimResponseMessageIqResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimResponseMessageIqResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TimMBeanList{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } + return nil +} + +func (p *ITimTimResponseMessageIqResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timResponseMessageIq_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimResponseMessageIqResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *ITimTimResponseMessageIqResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimResponseMessageIqResult(%+v)", *p) +} + +// Attributes: +// - PbeanList +// - Auth +type ITimTimResponsePresenceListArgs struct { + PbeanList *TimPBeanList `thrift:"pbeanList,1" db:"pbeanList" json:"pbeanList"` + Auth *TimAuth `thrift:"auth,2" db:"auth" json:"auth"` +} + +func NewITimTimResponsePresenceListArgs() *ITimTimResponsePresenceListArgs { + return &ITimTimResponsePresenceListArgs{} +} + +var ITimTimResponsePresenceListArgs_PbeanList_DEFAULT *TimPBeanList +func (p *ITimTimResponsePresenceListArgs) GetPbeanList() *TimPBeanList { + if !p.IsSetPbeanList() { + return ITimTimResponsePresenceListArgs_PbeanList_DEFAULT + } +return p.PbeanList +} +var ITimTimResponsePresenceListArgs_Auth_DEFAULT *TimAuth +func (p *ITimTimResponsePresenceListArgs) GetAuth() *TimAuth { + if !p.IsSetAuth() { + return ITimTimResponsePresenceListArgs_Auth_DEFAULT + } +return p.Auth +} +func (p *ITimTimResponsePresenceListArgs) IsSetPbeanList() bool { + return p.PbeanList != nil +} + +func (p *ITimTimResponsePresenceListArgs) IsSetAuth() bool { + return p.Auth != nil +} + +func (p *ITimTimResponsePresenceListArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimResponsePresenceListArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.PbeanList = &TimPBeanList{} + if err := p.PbeanList.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.PbeanList), err) + } + return nil +} + +func (p *ITimTimResponsePresenceListArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Auth = &TimAuth{} + if err := p.Auth.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) + } + return nil +} + +func (p *ITimTimResponsePresenceListArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timResponsePresenceList_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimResponsePresenceListArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "pbeanList", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pbeanList: ", p), err) } + if err := p.PbeanList.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.PbeanList), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:pbeanList: ", p), err) } + return err +} + +func (p *ITimTimResponsePresenceListArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "auth", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:auth: ", p), err) } + if err := p.Auth.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:auth: ", p), err) } + return err +} + +func (p *ITimTimResponsePresenceListArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimResponsePresenceListArgs(%+v)", *p) +} + +// Attributes: +// - Success +type ITimTimResponsePresenceListResult struct { + Success *TimResponseBean `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewITimTimResponsePresenceListResult() *ITimTimResponsePresenceListResult { + return &ITimTimResponsePresenceListResult{} +} + +var ITimTimResponsePresenceListResult_Success_DEFAULT *TimResponseBean +func (p *ITimTimResponsePresenceListResult) GetSuccess() *TimResponseBean { + if !p.IsSetSuccess() { + return ITimTimResponsePresenceListResult_Success_DEFAULT + } +return p.Success +} +func (p *ITimTimResponsePresenceListResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *ITimTimResponsePresenceListResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimResponsePresenceListResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TimResponseBean{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } + return nil +} + +func (p *ITimTimResponsePresenceListResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timResponsePresenceList_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimResponsePresenceListResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *ITimTimResponsePresenceListResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimResponsePresenceListResult(%+v)", *p) +} + +// Attributes: +// - MbeanList +// - Auth +type ITimTimResponseMessageListArgs struct { + MbeanList *TimMBeanList `thrift:"mbeanList,1" db:"mbeanList" json:"mbeanList"` + Auth *TimAuth `thrift:"auth,2" db:"auth" json:"auth"` +} + +func NewITimTimResponseMessageListArgs() *ITimTimResponseMessageListArgs { + return &ITimTimResponseMessageListArgs{} +} + +var ITimTimResponseMessageListArgs_MbeanList_DEFAULT *TimMBeanList +func (p *ITimTimResponseMessageListArgs) GetMbeanList() *TimMBeanList { + if !p.IsSetMbeanList() { + return ITimTimResponseMessageListArgs_MbeanList_DEFAULT + } +return p.MbeanList +} +var ITimTimResponseMessageListArgs_Auth_DEFAULT *TimAuth +func (p *ITimTimResponseMessageListArgs) GetAuth() *TimAuth { + if !p.IsSetAuth() { + return ITimTimResponseMessageListArgs_Auth_DEFAULT + } +return p.Auth +} +func (p *ITimTimResponseMessageListArgs) IsSetMbeanList() bool { + return p.MbeanList != nil +} + +func (p *ITimTimResponseMessageListArgs) IsSetAuth() bool { + return p.Auth != nil +} + +func (p *ITimTimResponseMessageListArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimResponseMessageListArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.MbeanList = &TimMBeanList{} + if err := p.MbeanList.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.MbeanList), err) + } + return nil +} + +func (p *ITimTimResponseMessageListArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Auth = &TimAuth{} + if err := p.Auth.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) + } + return nil +} + +func (p *ITimTimResponseMessageListArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timResponseMessageList_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimResponseMessageListArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "mbeanList", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:mbeanList: ", p), err) } + if err := p.MbeanList.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.MbeanList), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:mbeanList: ", p), err) } + return err +} + +func (p *ITimTimResponseMessageListArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "auth", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:auth: ", p), err) } + if err := p.Auth.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:auth: ", p), err) } + return err +} + +func (p *ITimTimResponseMessageListArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimResponseMessageListArgs(%+v)", *p) +} + +// Attributes: +// - Success +type ITimTimResponseMessageListResult struct { + Success *TimResponseBean `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewITimTimResponseMessageListResult() *ITimTimResponseMessageListResult { + return &ITimTimResponseMessageListResult{} +} + +var ITimTimResponseMessageListResult_Success_DEFAULT *TimResponseBean +func (p *ITimTimResponseMessageListResult) GetSuccess() *TimResponseBean { + if !p.IsSetSuccess() { + return ITimTimResponseMessageListResult_Success_DEFAULT + } +return p.Success +} +func (p *ITimTimResponseMessageListResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *ITimTimResponseMessageListResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimResponseMessageListResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TimResponseBean{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } + return nil +} + +func (p *ITimTimResponseMessageListResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timResponseMessageList_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimResponseMessageListResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *ITimTimResponseMessageListResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimResponseMessageListResult(%+v)", *p) +} + + diff --git a/protocols/gen-c_glib/i_tim.c b/protocols/gen-c_glib/i_tim.c index 7a27f7c..c1c0cc5 100644 --- a/protocols/gen-c_glib/i_tim.c +++ b/protocols/gen-c_glib/i_tim.c @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -355,6 +355,8 @@ gboolean i_tim_client_send_tim_login (ITimIf * iface, const Tid * tid, const gch xfer += ret; if ((ret = thrift_protocol_write_string (protocol, pwd, error)) < 0) return 0; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return 0; xfer += ret; @@ -561,6 +563,8 @@ gboolean i_tim_client_send_tim_ping (ITimIf * iface, const gchar * threadId, GEr xfer += ret; if ((ret = thrift_protocol_write_string (protocol, threadId, error)) < 0) return 0; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return 0; xfer += ret; @@ -715,6 +719,8 @@ gboolean i_tim_client_send_tim_regist (ITimIf * iface, const Tid * tid, const gc xfer += ret; if ((ret = thrift_protocol_write_string (protocol, auth, error)) < 0) return 0; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return 0; xfer += ret; @@ -931,6 +937,8 @@ gboolean i_tim_client_send_tim_message_iq (ITimIf * iface, const TimMessageIq * xfer += ret; if ((ret = thrift_protocol_write_string (protocol, iqType, error)) < 0) return 0; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return 0; xfer += ret; @@ -1095,6 +1103,8 @@ gboolean i_tim_client_send_tim_remote_user_auth (ITimIf * iface, const Tid * tid xfer += ret; if ((ret = thrift_protocol_write_string (protocol, pwd, error)) < 0) return 0; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return 0; xfer += ret; @@ -2053,6 +2063,8 @@ gboolean i_tim_client_send_tim_response_message_iq (ITimIf * iface, const TimMes xfer += ret; if ((ret = thrift_protocol_write_string (protocol, iqType, error)) < 0) return 0; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return 0; xfer += ret; @@ -4360,8 +4372,6 @@ i_tim_processor_process_tim_remote_user_auth (ITimProcessor *self, error) == TRUE) { g_object_set (result_struct, "success", return_value, NULL); - if (return_value != NULL) - g_object_unref (return_value); result = ((thrift_protocol_write_message_begin (output_protocol, @@ -4406,6 +4416,8 @@ i_tim_processor_process_tim_remote_user_auth (ITimProcessor *self, g_free (pwd); if (auth != NULL) g_object_unref (auth); + if (return_value != NULL) + g_object_unref (return_value); g_object_unref (result_struct); if (result == TRUE) @@ -4465,8 +4477,6 @@ i_tim_processor_process_tim_remote_user_get (ITimProcessor *self, error) == TRUE) { g_object_set (result_struct, "success", return_value, NULL); - if (return_value != NULL) - g_object_unref (return_value); result = ((thrift_protocol_write_message_begin (output_protocol, @@ -4509,6 +4519,8 @@ i_tim_processor_process_tim_remote_user_get (ITimProcessor *self, g_object_unref (tid); if (auth != NULL) g_object_unref (auth); + if (return_value != NULL) + g_object_unref (return_value); g_object_unref (result_struct); if (result == TRUE) @@ -4571,8 +4583,6 @@ i_tim_processor_process_tim_remote_user_edit (ITimProcessor *self, error) == TRUE) { g_object_set (result_struct, "success", return_value, NULL); - if (return_value != NULL) - g_object_unref (return_value); result = ((thrift_protocol_write_message_begin (output_protocol, @@ -4617,6 +4627,8 @@ i_tim_processor_process_tim_remote_user_edit (ITimProcessor *self, g_object_unref (ub); if (auth != NULL) g_object_unref (auth); + if (return_value != NULL) + g_object_unref (return_value); g_object_unref (result_struct); if (result == TRUE) @@ -4676,8 +4688,6 @@ i_tim_processor_process_tim_response_presence (ITimProcessor *self, error) == TRUE) { g_object_set (result_struct, "success", return_value, NULL); - if (return_value != NULL) - g_object_unref (return_value); result = ((thrift_protocol_write_message_begin (output_protocol, @@ -4720,6 +4730,8 @@ i_tim_processor_process_tim_response_presence (ITimProcessor *self, g_object_unref (pbean); if (auth != NULL) g_object_unref (auth); + if (return_value != NULL) + g_object_unref (return_value); g_object_unref (result_struct); if (result == TRUE) @@ -4779,8 +4791,6 @@ i_tim_processor_process_tim_response_message (ITimProcessor *self, error) == TRUE) { g_object_set (result_struct, "success", return_value, NULL); - if (return_value != NULL) - g_object_unref (return_value); result = ((thrift_protocol_write_message_begin (output_protocol, @@ -4823,6 +4833,8 @@ i_tim_processor_process_tim_response_message (ITimProcessor *self, g_object_unref (mbean); if (auth != NULL) g_object_unref (auth); + if (return_value != NULL) + g_object_unref (return_value); g_object_unref (result_struct); if (result == TRUE) @@ -4885,8 +4897,6 @@ i_tim_processor_process_tim_response_message_iq (ITimProcessor *self, error) == TRUE) { g_object_set (result_struct, "success", return_value, NULL); - if (return_value != NULL) - g_object_unref (return_value); result = ((thrift_protocol_write_message_begin (output_protocol, @@ -4931,6 +4941,8 @@ i_tim_processor_process_tim_response_message_iq (ITimProcessor *self, g_free (iqType); if (auth != NULL) g_object_unref (auth); + if (return_value != NULL) + g_object_unref (return_value); g_object_unref (result_struct); if (result == TRUE) @@ -4990,8 +5002,6 @@ i_tim_processor_process_tim_response_presence_list (ITimProcessor *self, error) == TRUE) { g_object_set (result_struct, "success", return_value, NULL); - if (return_value != NULL) - g_object_unref (return_value); result = ((thrift_protocol_write_message_begin (output_protocol, @@ -5034,6 +5044,8 @@ i_tim_processor_process_tim_response_presence_list (ITimProcessor *self, g_object_unref (pbeanList); if (auth != NULL) g_object_unref (auth); + if (return_value != NULL) + g_object_unref (return_value); g_object_unref (result_struct); if (result == TRUE) @@ -5093,8 +5105,6 @@ i_tim_processor_process_tim_response_message_list (ITimProcessor *self, error) == TRUE) { g_object_set (result_struct, "success", return_value, NULL); - if (return_value != NULL) - g_object_unref (return_value); result = ((thrift_protocol_write_message_begin (output_protocol, @@ -5137,6 +5147,8 @@ i_tim_processor_process_tim_response_message_list (ITimProcessor *self, g_object_unref (mbeanList); if (auth != NULL) g_object_unref (auth); + if (return_value != NULL) + g_object_unref (return_value); g_object_unref (result_struct); if (result == TRUE) @@ -5172,6 +5184,7 @@ i_tim_processor_dispatch_call (ThriftDispatchProcessor *dispatch_processor, process_function_def = g_hash_table_lookup (self->process_map, method_name); if (process_function_def != NULL) { + g_free (method_name); dispatch_result = (*process_function_def->function) (self, sequence_id, input_protocol, @@ -5251,7 +5264,7 @@ i_tim_processor_finalize (GObject *gobject) { ITimProcessor *self = I_TIM_PROCESSOR (gobject); - g_hash_table_destroy (self->process_map); + thrift_safe_hash_table_destroy (self->process_map); G_OBJECT_CLASS (i_tim_processor_parent_class)->finalize (gobject); } diff --git a/protocols/gen-c_glib/i_tim.h b/protocols/gen-c_glib/i_tim.h index 99a39c5..2015623 100644 --- a/protocols/gen-c_glib/i_tim.h +++ b/protocols/gen-c_glib/i_tim.h @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated diff --git a/protocols/gen-c_glib/tim_types.c b/protocols/gen-c_glib/tim_types.c index 2015f68..a930ff3 100644 --- a/protocols/gen-c_glib/tim_types.c +++ b/protocols/gen-c_glib/tim_types.c @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -133,6 +133,8 @@ tim_error_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_i32 (protocol, this_object->errCode, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -143,6 +145,8 @@ tim_error_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->errMsg, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -426,6 +430,8 @@ tim_node_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->key, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -436,6 +442,8 @@ tim_node_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->value, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -804,7 +812,8 @@ tim_ack_bean_read (ThriftStruct *object, ThriftProtocol *protocol, GError **erro if ((ret = thrift_protocol_read_string (protocol, &val2, error)) < 0) return -1; xfer += ret; - g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key1, (gpointer) val2); + if (this_object->extraMap && key1) + g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key1, (gpointer) val2); } /* read the map end marker */ @@ -854,6 +863,8 @@ tim_ack_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **err xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->id, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -864,6 +875,8 @@ tim_ack_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **err xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->ackType, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -874,6 +887,8 @@ tim_ack_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **err xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->ackStatus, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -885,10 +900,10 @@ tim_ack_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **err { guint i3; - if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) this_object->extraList->len, error)) < 0) + if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) (this_object->extraList ? this_object->extraList->len : 0), error)) < 0) return -1; xfer += ret; - for (i3 = 0; i3 < this_object->extraList->len; i3++) + for (i3 = 0; i3 < (this_object->extraList ? this_object->extraList->len : 0); i3++) { if ((ret = thrift_struct_write (THRIFT_STRUCT ((g_ptr_array_index ((GPtrArray *) this_object->extraList, i3))), protocol, error)) < 0) return -1; @@ -926,10 +941,11 @@ tim_ack_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **err gchar ** keys; int i = 0, key_count; - if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap), error)) < 0) + if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, this_object->extraMap ? (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap) : 0, error)) < 0) return -1; xfer += ret; - g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); + if (this_object->extraMap) + g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); key_count = g_list_length (key_list); keys = g_newa (gchar *, key_count); for (iter = g_list_first (key_list); iter; iter = iter->next) @@ -943,8 +959,12 @@ tim_ack_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **err if ((ret = thrift_protocol_write_string (protocol, key4, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_string (protocol, val5, error)) < 0) return -1; + xfer += ret; + } if ((ret = thrift_protocol_write_map_end (protocol, error)) < 0) return -1; @@ -1365,6 +1385,8 @@ tim_h_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error xfer += ret; if ((ret = thrift_protocol_write_i32 (protocol, this_object->chl, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -1374,6 +1396,8 @@ tim_h_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error xfer += ret; if ((ret = thrift_protocol_write_i32 (protocol, this_object->platform, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -1383,6 +1407,8 @@ tim_h_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error xfer += ret; if ((ret = thrift_protocol_write_i16 (protocol, this_object->version, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -1738,7 +1764,8 @@ tim_param_read (ThriftStruct *object, ThriftProtocol *protocol, GError **error) if ((ret = thrift_protocol_read_string (protocol, &val8, error)) < 0) return -1; xfer += ret; - g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key7, (gpointer) val8); + if (this_object->extraMap && key7) + g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key7, (gpointer) val8); } /* read the map end marker */ @@ -1826,6 +1853,8 @@ tim_param_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->timestamp, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -1836,6 +1865,8 @@ tim_param_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_i16 (protocol, this_object->version, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -1846,6 +1877,8 @@ tim_param_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->lang, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -1857,10 +1890,10 @@ tim_param_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) { guint i9; - if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) this_object->extraList->len, error)) < 0) + if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) (this_object->extraList ? this_object->extraList->len : 0), error)) < 0) return -1; xfer += ret; - for (i9 = 0; i9 < this_object->extraList->len; i9++) + for (i9 = 0; i9 < (this_object->extraList ? this_object->extraList->len : 0); i9++) { if ((ret = thrift_struct_write (THRIFT_STRUCT ((g_ptr_array_index ((GPtrArray *) this_object->extraList, i9))), protocol, error)) < 0) return -1; @@ -1886,10 +1919,11 @@ tim_param_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) gchar ** keys; int i = 0, key_count; - if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap), error)) < 0) + if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, this_object->extraMap ? (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap) : 0, error)) < 0) return -1; xfer += ret; - g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); + if (this_object->extraMap) + g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); key_count = g_list_length (key_list); keys = g_newa (gchar *, key_count); for (iter = g_list_first (key_list); iter; iter = iter->next) @@ -1903,8 +1937,12 @@ tim_param_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) if ((ret = thrift_protocol_write_string (protocol, key10, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_string (protocol, val11, error)) < 0) return -1; + xfer += ret; + } if ((ret = thrift_protocol_write_map_end (protocol, error)) < 0) return -1; @@ -1920,6 +1958,8 @@ tim_param_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->interflow, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -1930,6 +1970,8 @@ tim_param_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->tls, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -2348,6 +2390,8 @@ tim_time_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->timestamp, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -2358,6 +2402,8 @@ tim_time_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->formattime, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -2710,7 +2756,8 @@ tim_area_read (ThriftStruct *object, ThriftProtocol *protocol, GError **error) if ((ret = thrift_protocol_read_string (protocol, &val14, error)) < 0) return -1; xfer += ret; - g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key13, (gpointer) val14); + if (this_object->extraMap && key13) + g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key13, (gpointer) val14); } /* read the map end marker */ @@ -2760,6 +2807,8 @@ tim_area_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->country, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -2770,6 +2819,8 @@ tim_area_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->province, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -2780,6 +2831,8 @@ tim_area_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->city, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -2791,10 +2844,10 @@ tim_area_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) { guint i15; - if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) this_object->extraList->len, error)) < 0) + if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) (this_object->extraList ? this_object->extraList->len : 0), error)) < 0) return -1; xfer += ret; - for (i15 = 0; i15 < this_object->extraList->len; i15++) + for (i15 = 0; i15 < (this_object->extraList ? this_object->extraList->len : 0); i15++) { if ((ret = thrift_struct_write (THRIFT_STRUCT ((g_ptr_array_index ((GPtrArray *) this_object->extraList, i15))), protocol, error)) < 0) return -1; @@ -2820,10 +2873,11 @@ tim_area_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) gchar ** keys; int i = 0, key_count; - if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap), error)) < 0) + if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, this_object->extraMap ? (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap) : 0, error)) < 0) return -1; xfer += ret; - g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); + if (this_object->extraMap) + g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); key_count = g_list_length (key_list); keys = g_newa (gchar *, key_count); for (iter = g_list_first (key_list); iter; iter = iter->next) @@ -2837,8 +2891,12 @@ tim_area_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) if ((ret = thrift_protocol_write_string (protocol, key16, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_string (protocol, val17, error)) < 0) return -1; + xfer += ret; + } if ((ret = thrift_protocol_write_map_end (protocol, error)) < 0) return -1; @@ -3298,7 +3356,8 @@ tid_read (ThriftStruct *object, ThriftProtocol *protocol, GError **error) if ((ret = thrift_protocol_read_string (protocol, &val20, error)) < 0) return -1; xfer += ret; - g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key19, (gpointer) val20); + if (this_object->extraMap && key19) + g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key19, (gpointer) val20); } /* read the map end marker */ @@ -3355,6 +3414,8 @@ tid_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->name, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -3364,6 +3425,8 @@ tid_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->domain, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -3374,6 +3437,8 @@ tid_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->resource, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -3384,6 +3449,8 @@ tid_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->type, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -3395,10 +3462,10 @@ tid_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) { guint i21; - if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) this_object->extraList->len, error)) < 0) + if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) (this_object->extraList ? this_object->extraList->len : 0), error)) < 0) return -1; xfer += ret; - for (i21 = 0; i21 < this_object->extraList->len; i21++) + for (i21 = 0; i21 < (this_object->extraList ? this_object->extraList->len : 0); i21++) { if ((ret = thrift_struct_write (THRIFT_STRUCT ((g_ptr_array_index ((GPtrArray *) this_object->extraList, i21))), protocol, error)) < 0) return -1; @@ -3424,10 +3491,11 @@ tid_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) gchar ** keys; int i = 0, key_count; - if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap), error)) < 0) + if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, this_object->extraMap ? (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap) : 0, error)) < 0) return -1; xfer += ret; - g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); + if (this_object->extraMap) + g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); key_count = g_list_length (key_list); keys = g_newa (gchar *, key_count); for (iter = g_list_first (key_list); iter; iter = iter->next) @@ -3441,8 +3509,12 @@ tid_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) if ((ret = thrift_protocol_write_string (protocol, key22, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_string (protocol, val23, error)) < 0) return -1; + xfer += ret; + } if ((ret = thrift_protocol_write_map_end (protocol, error)) < 0) return -1; @@ -4037,7 +4109,8 @@ tim_user_bean_read (ThriftStruct *object, ThriftProtocol *protocol, GError **err if ((ret = thrift_protocol_read_string (protocol, &val27, error)) < 0) return -1; xfer += ret; - g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key26, (gpointer) val27); + if (this_object->extraMap && key26) + g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key26, (gpointer) val27); } /* read the map end marker */ @@ -4099,6 +4172,8 @@ tim_user_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **er xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->nickname, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -4109,6 +4184,8 @@ tim_user_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **er xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->remarkname, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -4119,6 +4196,8 @@ tim_user_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **er xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->brithday, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -4129,6 +4208,8 @@ tim_user_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **er xfer += ret; if ((ret = thrift_protocol_write_i16 (protocol, this_object->gender, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -4139,6 +4220,8 @@ tim_user_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **er xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->headurl, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -4159,8 +4242,10 @@ tim_user_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **er if ((ret = thrift_protocol_write_field_begin (protocol, "headbyte", T_STRING, 8, error)) < 0) return -1; xfer += ret; - if ((ret = thrift_protocol_write_binary (protocol, ((GByteArray *) this_object->headbyte)->data, ((GByteArray *) this_object->headbyte)->len, error)) < 0) + if ((ret = thrift_protocol_write_binary (protocol, this_object->headbyte ? ((GByteArray *) this_object->headbyte)->data : NULL, this_object->headbyte ? ((GByteArray *) this_object->headbyte)->len : 0, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -4172,13 +4257,15 @@ tim_user_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **er { guint i28; - if ((ret = thrift_protocol_write_list_begin (protocol, T_STRING, (gint32) this_object->photoBytes->len, error)) < 0) + if ((ret = thrift_protocol_write_list_begin (protocol, T_STRING, (gint32) (this_object->photoBytes ? this_object->photoBytes->len : 0), error)) < 0) return -1; xfer += ret; - for (i28 = 0; i28 < this_object->photoBytes->len; i28++) + for (i28 = 0; i28 < (this_object->photoBytes ? this_object->photoBytes->len : 0); i28++) { - if ((ret = thrift_protocol_write_binary (protocol, ((GByteArray *) ((gchar*)g_ptr_array_index ((GPtrArray *) this_object->photoBytes, i28)))->data, ((GByteArray *) ((gchar*)g_ptr_array_index ((GPtrArray *) this_object->photoBytes, i28)))->len, error)) < 0) + if ((ret = thrift_protocol_write_binary (protocol, ((gchar*)g_ptr_array_index ((GPtrArray *) this_object->photoBytes, i28)) ? ((GByteArray *) ((gchar*)g_ptr_array_index ((GPtrArray *) this_object->photoBytes, i28)))->data : NULL, ((gchar*)g_ptr_array_index ((GPtrArray *) this_object->photoBytes, i28)) ? ((GByteArray *) ((gchar*)g_ptr_array_index ((GPtrArray *) this_object->photoBytes, i28)))->len : 0, error)) < 0) return -1; + xfer += ret; + } if ((ret = thrift_protocol_write_list_end (protocol, error)) < 0) return -1; @@ -4195,10 +4282,10 @@ tim_user_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **er { guint i29; - if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) this_object->extraList->len, error)) < 0) + if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) (this_object->extraList ? this_object->extraList->len : 0), error)) < 0) return -1; xfer += ret; - for (i29 = 0; i29 < this_object->extraList->len; i29++) + for (i29 = 0; i29 < (this_object->extraList ? this_object->extraList->len : 0); i29++) { if ((ret = thrift_struct_write (THRIFT_STRUCT ((g_ptr_array_index ((GPtrArray *) this_object->extraList, i29))), protocol, error)) < 0) return -1; @@ -4224,10 +4311,11 @@ tim_user_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **er gchar ** keys; int i = 0, key_count; - if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap), error)) < 0) + if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, this_object->extraMap ? (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap) : 0, error)) < 0) return -1; xfer += ret; - g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); + if (this_object->extraMap) + g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); key_count = g_list_length (key_list); keys = g_newa (gchar *, key_count); for (iter = g_list_first (key_list); iter; iter = iter->next) @@ -4241,8 +4329,12 @@ tim_user_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **er if ((ret = thrift_protocol_write_string (protocol, key30, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_string (protocol, val31, error)) < 0) return -1; + xfer += ret; + } if ((ret = thrift_protocol_write_map_end (protocol, error)) < 0) return -1; @@ -4434,7 +4526,7 @@ tim_user_bean_instance_init (TimUserBean * object) object->__isset_area = FALSE; object->headbyte = NULL; object->__isset_headbyte = FALSE; - object->photoBytes = g_ptr_array_new_with_free_func (g_free); + object->photoBytes = g_ptr_array_new_with_free_func (thrift_string_free); object->__isset_photoBytes = FALSE; object->extraList = g_ptr_array_new_with_free_func (g_object_unref); object->__isset_extraList = FALSE; @@ -4968,7 +5060,8 @@ tim_room_read (ThriftStruct *object, ThriftProtocol *protocol, GError **error) if ((ret = thrift_protocol_read_string (protocol, &val36, error)) < 0) return -1; xfer += ret; - g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key35, (gpointer) val36); + if (this_object->extraMap && key35) + g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key35, (gpointer) val36); } /* read the map end marker */ @@ -5043,10 +5136,10 @@ tim_room_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) { guint i37; - if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) this_object->HostsTid->len, error)) < 0) + if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) (this_object->HostsTid ? this_object->HostsTid->len : 0), error)) < 0) return -1; xfer += ret; - for (i37 = 0; i37 < this_object->HostsTid->len; i37++) + for (i37 = 0; i37 < (this_object->HostsTid ? this_object->HostsTid->len : 0); i37++) { if ((ret = thrift_struct_write (THRIFT_STRUCT ((g_ptr_array_index ((GPtrArray *) this_object->HostsTid, i37))), protocol, error)) < 0) return -1; @@ -5068,10 +5161,10 @@ tim_room_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) { guint i38; - if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) this_object->membersTid->len, error)) < 0) + if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) (this_object->membersTid ? this_object->membersTid->len : 0), error)) < 0) return -1; xfer += ret; - for (i38 = 0; i38 < this_object->membersTid->len; i38++) + for (i38 = 0; i38 < (this_object->membersTid ? this_object->membersTid->len : 0); i38++) { if ((ret = thrift_struct_write (THRIFT_STRUCT ((g_ptr_array_index ((GPtrArray *) this_object->membersTid, i38))), protocol, error)) < 0) return -1; @@ -5092,6 +5185,8 @@ tim_room_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->headurl, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -5102,6 +5197,8 @@ tim_room_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->roomName, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -5112,6 +5209,8 @@ tim_room_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->desc, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -5135,10 +5234,10 @@ tim_room_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) { guint i39; - if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) this_object->extraList->len, error)) < 0) + if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) (this_object->extraList ? this_object->extraList->len : 0), error)) < 0) return -1; xfer += ret; - for (i39 = 0; i39 < this_object->extraList->len; i39++) + for (i39 = 0; i39 < (this_object->extraList ? this_object->extraList->len : 0); i39++) { if ((ret = thrift_struct_write (THRIFT_STRUCT ((g_ptr_array_index ((GPtrArray *) this_object->extraList, i39))), protocol, error)) < 0) return -1; @@ -5164,10 +5263,11 @@ tim_room_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) gchar ** keys; int i = 0, key_count; - if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap), error)) < 0) + if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, this_object->extraMap ? (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap) : 0, error)) < 0) return -1; xfer += ret; - g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); + if (this_object->extraMap) + g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); key_count = g_list_length (key_list); keys = g_newa (gchar *, key_count); for (iter = g_list_first (key_list); iter; iter = iter->next) @@ -5181,8 +5281,12 @@ tim_room_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) if ((ret = thrift_protocol_write_string (protocol, key40, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_string (protocol, val41, error)) < 0) return -1; + xfer += ret; + } if ((ret = thrift_protocol_write_map_end (protocol, error)) < 0) return -1; @@ -5855,7 +5959,8 @@ tim_p_bean_read (ThriftStruct *object, ThriftProtocol *protocol, GError **error) if ((ret = thrift_protocol_read_string (protocol, &val44, error)) < 0) return -1; xfer += ret; - g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key43, (gpointer) val44); + if (this_object->extraMap && key43) + g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key43, (gpointer) val44); } /* read the map end marker */ @@ -5912,6 +6017,8 @@ tim_p_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->threadId, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -5945,6 +6052,8 @@ tim_p_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->status, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -5955,6 +6064,8 @@ tim_p_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->type, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -5965,6 +6076,8 @@ tim_p_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error xfer += ret; if ((ret = thrift_protocol_write_i32 (protocol, this_object->priority, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -5975,6 +6088,8 @@ tim_p_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->show, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -5998,10 +6113,10 @@ tim_p_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error { guint i45; - if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) this_object->extraList->len, error)) < 0) + if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) (this_object->extraList ? this_object->extraList->len : 0), error)) < 0) return -1; xfer += ret; - for (i45 = 0; i45 < this_object->extraList->len; i45++) + for (i45 = 0; i45 < (this_object->extraList ? this_object->extraList->len : 0); i45++) { if ((ret = thrift_struct_write (THRIFT_STRUCT ((g_ptr_array_index ((GPtrArray *) this_object->extraList, i45))), protocol, error)) < 0) return -1; @@ -6039,10 +6154,11 @@ tim_p_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error gchar ** keys; int i = 0, key_count; - if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap), error)) < 0) + if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, this_object->extraMap ? (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap) : 0, error)) < 0) return -1; xfer += ret; - g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); + if (this_object->extraMap) + g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); key_count = g_list_length (key_list); keys = g_newa (gchar *, key_count); for (iter = g_list_first (key_list); iter; iter = iter->next) @@ -6056,8 +6172,12 @@ tim_p_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error if ((ret = thrift_protocol_write_string (protocol, key46, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_string (protocol, val47, error)) < 0) return -1; + xfer += ret; + } if ((ret = thrift_protocol_write_map_end (protocol, error)) < 0) return -1; @@ -6787,7 +6907,8 @@ tim_m_bean_read (ThriftStruct *object, ThriftProtocol *protocol, GError **error) if ((ret = thrift_protocol_read_string (protocol, &val50, error)) < 0) return -1; xfer += ret; - g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key49, (gpointer) val50); + if (this_object->extraMap && key49) + g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key49, (gpointer) val50); } /* read the map end marker */ @@ -6857,6 +6978,8 @@ tim_m_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->threadId, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -6866,6 +6989,8 @@ tim_m_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->mid, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -6900,6 +7025,8 @@ tim_m_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->body, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -6910,6 +7037,8 @@ tim_m_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->type, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -6920,6 +7049,8 @@ tim_m_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error xfer += ret; if ((ret = thrift_protocol_write_i16 (protocol, this_object->msgType, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -6955,10 +7086,10 @@ tim_m_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error { guint i51; - if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) this_object->extraList->len, error)) < 0) + if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) (this_object->extraList ? this_object->extraList->len : 0), error)) < 0) return -1; xfer += ret; - for (i51 = 0; i51 < this_object->extraList->len; i51++) + for (i51 = 0; i51 < (this_object->extraList ? this_object->extraList->len : 0); i51++) { if ((ret = thrift_struct_write (THRIFT_STRUCT ((g_ptr_array_index ((GPtrArray *) this_object->extraList, i51))), protocol, error)) < 0) return -1; @@ -6979,6 +7110,8 @@ tim_m_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->timestamp, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -7006,10 +7139,11 @@ tim_m_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error gchar ** keys; int i = 0, key_count; - if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap), error)) < 0) + if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, this_object->extraMap ? (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap) : 0, error)) < 0) return -1; xfer += ret; - g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); + if (this_object->extraMap) + g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); key_count = g_list_length (key_list); keys = g_newa (gchar *, key_count); for (iter = g_list_first (key_list); iter; iter = iter->next) @@ -7023,8 +7157,12 @@ tim_m_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error if ((ret = thrift_protocol_write_string (protocol, key52, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_string (protocol, val53, error)) < 0) return -1; + xfer += ret; + } if ((ret = thrift_protocol_write_map_end (protocol, error)) < 0) return -1; @@ -7040,6 +7178,8 @@ tim_m_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error xfer += ret; if ((ret = thrift_protocol_write_i16 (protocol, this_object->readstatus, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -7733,7 +7873,8 @@ tim_iq_bean_read (ThriftStruct *object, ThriftProtocol *protocol, GError **error if ((ret = thrift_protocol_read_string (protocol, &val56, error)) < 0) return -1; xfer += ret; - g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key55, (gpointer) val56); + if (this_object->extraMap && key55) + g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key55, (gpointer) val56); } /* read the map end marker */ @@ -7790,6 +7931,8 @@ tim_iq_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **erro xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->threadId, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -7823,6 +7966,8 @@ tim_iq_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **erro xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->type, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -7834,10 +7979,10 @@ tim_iq_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **erro { guint i57; - if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) this_object->extraList->len, error)) < 0) + if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) (this_object->extraList ? this_object->extraList->len : 0), error)) < 0) return -1; xfer += ret; - for (i57 = 0; i57 < this_object->extraList->len; i57++) + for (i57 = 0; i57 < (this_object->extraList ? this_object->extraList->len : 0); i57++) { if ((ret = thrift_struct_write (THRIFT_STRUCT ((g_ptr_array_index ((GPtrArray *) this_object->extraList, i57))), protocol, error)) < 0) return -1; @@ -7875,10 +8020,11 @@ tim_iq_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **erro gchar ** keys; int i = 0, key_count; - if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap), error)) < 0) + if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, this_object->extraMap ? (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap) : 0, error)) < 0) return -1; xfer += ret; - g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); + if (this_object->extraMap) + g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); key_count = g_list_length (key_list); keys = g_newa (gchar *, key_count); for (iter = g_list_first (key_list); iter; iter = iter->next) @@ -7892,8 +8038,12 @@ tim_iq_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **erro if ((ret = thrift_protocol_write_string (protocol, key58, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_string (protocol, val59, error)) < 0) return -1; + xfer += ret; + } if ((ret = thrift_protocol_write_map_end (protocol, error)) < 0) return -1; @@ -8341,7 +8491,8 @@ tim_roster_read (ThriftStruct *object, ThriftProtocol *protocol, GError **error) if ((ret = thrift_protocol_read_string (protocol, &val61, error)) < 0) return -1; xfer += ret; - g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key60, (gpointer) val61); + if (this_object->extraMap && key60) + g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key60, (gpointer) val61); } /* read the map end marker */ @@ -8406,6 +8557,8 @@ tim_roster_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->subscription, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -8425,6 +8578,8 @@ tim_roster_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->name, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -8440,10 +8595,11 @@ tim_roster_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error gchar ** keys; int i = 0, key_count; - if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap), error)) < 0) + if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, this_object->extraMap ? (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap) : 0, error)) < 0) return -1; xfer += ret; - g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); + if (this_object->extraMap) + g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); key_count = g_list_length (key_list); keys = g_newa (gchar *, key_count); for (iter = g_list_first (key_list); iter; iter = iter->next) @@ -8457,8 +8613,12 @@ tim_roster_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error if ((ret = thrift_protocol_write_string (protocol, key62, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_string (protocol, val63, error)) < 0) return -1; + xfer += ret; + } if ((ret = thrift_protocol_write_map_end (protocol, error)) < 0) return -1; @@ -8797,7 +8957,8 @@ tim_remote_user_bean_read (ThriftStruct *object, ThriftProtocol *protocol, GErro if ((ret = thrift_protocol_read_string (protocol, &val65, error)) < 0) return -1; xfer += ret; - g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key64, (gpointer) val65); + if (this_object->extraMap && key64) + g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key64, (gpointer) val65); } /* read the map end marker */ @@ -8876,10 +9037,11 @@ tim_remote_user_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GErr gchar ** keys; int i = 0, key_count; - if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap), error)) < 0) + if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, this_object->extraMap ? (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap) : 0, error)) < 0) return -1; xfer += ret; - g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); + if (this_object->extraMap) + g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); key_count = g_list_length (key_list); keys = g_newa (gchar *, key_count); for (iter = g_list_first (key_list); iter; iter = iter->next) @@ -8893,8 +9055,12 @@ tim_remote_user_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GErr if ((ret = thrift_protocol_write_string (protocol, key66, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_string (protocol, val67, error)) < 0) return -1; + xfer += ret; + } if ((ret = thrift_protocol_write_map_end (protocol, error)) < 0) return -1; @@ -9210,7 +9376,8 @@ tim_remote_room_read (ThriftStruct *object, ThriftProtocol *protocol, GError **e if ((ret = thrift_protocol_read_string (protocol, &val69, error)) < 0) return -1; xfer += ret; - g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key68, (gpointer) val69); + if (this_object->extraMap && key68) + g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key68, (gpointer) val69); } /* read the map end marker */ @@ -9289,10 +9456,11 @@ tim_remote_room_write (ThriftStruct *object, ThriftProtocol *protocol, GError ** gchar ** keys; int i = 0, key_count; - if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap), error)) < 0) + if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, this_object->extraMap ? (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap) : 0, error)) < 0) return -1; xfer += ret; - g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); + if (this_object->extraMap) + g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); key_count = g_list_length (key_list); keys = g_newa (gchar *, key_count); for (iter = g_list_first (key_list); iter; iter = iter->next) @@ -9306,8 +9474,12 @@ tim_remote_room_write (ThriftStruct *object, ThriftProtocol *protocol, GError ** if ((ret = thrift_protocol_write_string (protocol, key70, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_string (protocol, val71, error)) < 0) return -1; + xfer += ret; + } if ((ret = thrift_protocol_write_map_end (protocol, error)) < 0) return -1; @@ -9668,7 +9840,8 @@ tim_response_bean_read (ThriftStruct *object, ThriftProtocol *protocol, GError * if ((ret = thrift_protocol_read_string (protocol, &val74, error)) < 0) return -1; xfer += ret; - g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key73, (gpointer) val74); + if (this_object->extraMap && key73) + g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key73, (gpointer) val74); } /* read the map end marker */ @@ -9718,6 +9891,8 @@ tim_response_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->threadId, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -9741,10 +9916,10 @@ tim_response_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError { guint i75; - if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) this_object->extraList->len, error)) < 0) + if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) (this_object->extraList ? this_object->extraList->len : 0), error)) < 0) return -1; xfer += ret; - for (i75 = 0; i75 < this_object->extraList->len; i75++) + for (i75 = 0; i75 < (this_object->extraList ? this_object->extraList->len : 0); i75++) { if ((ret = thrift_struct_write (THRIFT_STRUCT ((g_ptr_array_index ((GPtrArray *) this_object->extraList, i75))), protocol, error)) < 0) return -1; @@ -9770,10 +9945,11 @@ tim_response_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError gchar ** keys; int i = 0, key_count; - if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap), error)) < 0) + if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, this_object->extraMap ? (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap) : 0, error)) < 0) return -1; xfer += ret; - g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); + if (this_object->extraMap) + g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); key_count = g_list_length (key_list); keys = g_newa (gchar *, key_count); for (iter = g_list_first (key_list); iter; iter = iter->next) @@ -9787,8 +9963,12 @@ tim_response_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError if ((ret = thrift_protocol_write_string (protocol, key76, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_string (protocol, val77, error)) < 0) return -1; + xfer += ret; + } if ((ret = thrift_protocol_write_map_end (protocol, error)) < 0) return -1; @@ -10205,7 +10385,8 @@ tim_sock5_bean_read (ThriftStruct *object, ThriftProtocol *protocol, GError **er if ((ret = thrift_protocol_read_string (protocol, &val79, error)) < 0) return -1; xfer += ret; - g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key78, (gpointer) val79); + if (this_object->extraMap && key78) + g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key78, (gpointer) val79); } /* read the map end marker */ @@ -10322,6 +10503,8 @@ tim_sock5_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **e xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->addr, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -10330,6 +10513,8 @@ tim_sock5_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **e xfer += ret; if ((ret = thrift_protocol_write_i32 (protocol, this_object->port, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -10338,6 +10523,8 @@ tim_sock5_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **e xfer += ret; if ((ret = thrift_protocol_write_i16 (protocol, this_object->transport, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -10346,6 +10533,8 @@ tim_sock5_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **e xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->pubId, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -10360,10 +10549,11 @@ tim_sock5_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **e gchar ** keys; int i = 0, key_count; - if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap), error)) < 0) + if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, this_object->extraMap ? (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap) : 0, error)) < 0) return -1; xfer += ret; - g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); + if (this_object->extraMap) + g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); key_count = g_list_length (key_list); keys = g_newa (gchar *, key_count); for (iter = g_list_first (key_list); iter; iter = iter->next) @@ -10377,8 +10567,12 @@ tim_sock5_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError **e if ((ret = thrift_protocol_write_string (protocol, key80, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_string (protocol, val81, error)) < 0) return -1; + xfer += ret; + } if ((ret = thrift_protocol_write_map_end (protocol, error)) < 0) return -1; @@ -10827,7 +11021,8 @@ tim_sock5_bytes_read (ThriftStruct *object, ThriftProtocol *protocol, GError **e if ((ret = thrift_protocol_read_string (protocol, &val84, error)) < 0) return -1; xfer += ret; - g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key83, (gpointer) val84); + if (this_object->extraMap && key83) + g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key83, (gpointer) val84); } /* read the map end marker */ @@ -10900,6 +11095,8 @@ tim_sock5_bytes_write (ThriftStruct *object, ThriftProtocol *protocol, GError ** xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->pubId, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -10908,6 +11105,8 @@ tim_sock5_bytes_write (ThriftStruct *object, ThriftProtocol *protocol, GError ** xfer += ret; if ((ret = thrift_protocol_write_i32 (protocol, this_object->index, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -10917,13 +11116,15 @@ tim_sock5_bytes_write (ThriftStruct *object, ThriftProtocol *protocol, GError ** { guint i85; - if ((ret = thrift_protocol_write_list_begin (protocol, T_STRING, (gint32) this_object->bytes->len, error)) < 0) + if ((ret = thrift_protocol_write_list_begin (protocol, T_STRING, (gint32) (this_object->bytes ? this_object->bytes->len : 0), error)) < 0) return -1; xfer += ret; - for (i85 = 0; i85 < this_object->bytes->len; i85++) + for (i85 = 0; i85 < (this_object->bytes ? this_object->bytes->len : 0); i85++) { - if ((ret = thrift_protocol_write_binary (protocol, ((GByteArray *) ((gchar*)g_ptr_array_index ((GPtrArray *) this_object->bytes, i85)))->data, ((GByteArray *) ((gchar*)g_ptr_array_index ((GPtrArray *) this_object->bytes, i85)))->len, error)) < 0) + if ((ret = thrift_protocol_write_binary (protocol, ((gchar*)g_ptr_array_index ((GPtrArray *) this_object->bytes, i85)) ? ((GByteArray *) ((gchar*)g_ptr_array_index ((GPtrArray *) this_object->bytes, i85)))->data : NULL, ((gchar*)g_ptr_array_index ((GPtrArray *) this_object->bytes, i85)) ? ((GByteArray *) ((gchar*)g_ptr_array_index ((GPtrArray *) this_object->bytes, i85)))->len : 0, error)) < 0) return -1; + xfer += ret; + } if ((ret = thrift_protocol_write_list_end (protocol, error)) < 0) return -1; @@ -10943,10 +11144,11 @@ tim_sock5_bytes_write (ThriftStruct *object, ThriftProtocol *protocol, GError ** gchar ** keys; int i = 0, key_count; - if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap), error)) < 0) + if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, this_object->extraMap ? (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap) : 0, error)) < 0) return -1; xfer += ret; - g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); + if (this_object->extraMap) + g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); key_count = g_list_length (key_list); keys = g_newa (gchar *, key_count); for (iter = g_list_first (key_list); iter; iter = iter->next) @@ -10960,8 +11162,12 @@ tim_sock5_bytes_write (ThriftStruct *object, ThriftProtocol *protocol, GError ** if ((ret = thrift_protocol_write_string (protocol, key86, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_string (protocol, val87, error)) < 0) return -1; + xfer += ret; + } if ((ret = thrift_protocol_write_map_end (protocol, error)) < 0) return -1; @@ -11059,7 +11265,7 @@ tim_sock5_bytes_instance_init (TimSock5Bytes * object) THRIFT_UNUSED_VAR (object); object->pubId = NULL; object->index = 0; - object->bytes = g_ptr_array_new_with_free_func (g_free); + object->bytes = g_ptr_array_new_with_free_func (thrift_string_free); object->extraMap = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); object->__isset_extraMap = FALSE; } @@ -11315,7 +11521,8 @@ tim_page_read (ThriftStruct *object, ThriftProtocol *protocol, GError **error) if ((ret = thrift_protocol_read_string (protocol, &val89, error)) < 0) return -1; xfer += ret; - g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key88, (gpointer) val89); + if (this_object->extraMap && key88) + g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key88, (gpointer) val89); } /* read the map end marker */ @@ -11365,6 +11572,8 @@ tim_page_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->fromTimeStamp, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -11375,6 +11584,8 @@ tim_page_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->toTimeStamp, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -11385,6 +11596,8 @@ tim_page_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_i32 (protocol, this_object->limitCount, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -11400,10 +11613,11 @@ tim_page_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) gchar ** keys; int i = 0, key_count; - if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap), error)) < 0) + if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, this_object->extraMap ? (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap) : 0, error)) < 0) return -1; xfer += ret; - g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); + if (this_object->extraMap) + g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); key_count = g_list_length (key_list); keys = g_newa (gchar *, key_count); for (iter = g_list_first (key_list); iter; iter = iter->next) @@ -11417,8 +11631,12 @@ tim_page_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) if ((ret = thrift_protocol_write_string (protocol, key90, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_string (protocol, val91, error)) < 0) return -1; + xfer += ret; + } if ((ret = thrift_protocol_write_map_end (protocol, error)) < 0) return -1; @@ -11818,7 +12036,8 @@ tim_message_iq_read (ThriftStruct *object, ThriftProtocol *protocol, GError **er if ((ret = thrift_protocol_read_string (protocol, &val95, error)) < 0) return -1; xfer += ret; - g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key94, (gpointer) val95); + if (this_object->extraMap && key94) + g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key94, (gpointer) val95); } /* read the map end marker */ @@ -11869,13 +12088,15 @@ tim_message_iq_write (ThriftStruct *object, ThriftProtocol *protocol, GError **e { guint i96; - if ((ret = thrift_protocol_write_list_begin (protocol, T_STRING, (gint32) this_object->tidlist->len, error)) < 0) + if ((ret = thrift_protocol_write_list_begin (protocol, T_STRING, (gint32) (this_object->tidlist ? this_object->tidlist->len : 0), error)) < 0) return -1; xfer += ret; - for (i96 = 0; i96 < this_object->tidlist->len; i96++) + for (i96 = 0; i96 < (this_object->tidlist ? this_object->tidlist->len : 0); i96++) { if ((ret = thrift_protocol_write_string (protocol, ((gchar*)g_ptr_array_index ((GPtrArray *) this_object->tidlist, i96)), error)) < 0) return -1; + xfer += ret; + } if ((ret = thrift_protocol_write_list_end (protocol, error)) < 0) return -1; @@ -11904,13 +12125,15 @@ tim_message_iq_write (ThriftStruct *object, ThriftProtocol *protocol, GError **e { guint i97; - if ((ret = thrift_protocol_write_list_begin (protocol, T_STRING, (gint32) this_object->midlist->len, error)) < 0) + if ((ret = thrift_protocol_write_list_begin (protocol, T_STRING, (gint32) (this_object->midlist ? this_object->midlist->len : 0), error)) < 0) return -1; xfer += ret; - for (i97 = 0; i97 < this_object->midlist->len; i97++) + for (i97 = 0; i97 < (this_object->midlist ? this_object->midlist->len : 0); i97++) { if ((ret = thrift_protocol_write_string (protocol, ((gchar*)g_ptr_array_index ((GPtrArray *) this_object->midlist, i97)), error)) < 0) return -1; + xfer += ret; + } if ((ret = thrift_protocol_write_list_end (protocol, error)) < 0) return -1; @@ -11931,10 +12154,11 @@ tim_message_iq_write (ThriftStruct *object, ThriftProtocol *protocol, GError **e gchar ** keys; int i = 0, key_count; - if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap), error)) < 0) + if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, this_object->extraMap ? (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap) : 0, error)) < 0) return -1; xfer += ret; - g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); + if (this_object->extraMap) + g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); key_count = g_list_length (key_list); keys = g_newa (gchar *, key_count); for (iter = g_list_first (key_list); iter; iter = iter->next) @@ -11948,8 +12172,12 @@ tim_message_iq_write (ThriftStruct *object, ThriftProtocol *protocol, GError **e if ((ret = thrift_protocol_write_string (protocol, key98, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_string (protocol, val99, error)) < 0) return -1; + xfer += ret; + } if ((ret = thrift_protocol_write_map_end (protocol, error)) < 0) return -1; @@ -12317,6 +12545,8 @@ tim_auth_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->domain, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -12327,6 +12557,8 @@ tim_auth_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->username, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -12337,6 +12569,8 @@ tim_auth_write (ThriftStruct *object, ThriftProtocol *protocol, GError **error) xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->pwd, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -12697,7 +12931,8 @@ tim_m_bean_list_read (ThriftStruct *object, ThriftProtocol *protocol, GError **e if ((ret = thrift_protocol_read_string (protocol, &val102, error)) < 0) return -1; xfer += ret; - g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key101, (gpointer) val102); + if (this_object->extraMap && key101) + g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key101, (gpointer) val102); } /* read the map end marker */ @@ -12754,6 +12989,8 @@ tim_m_bean_list_write (ThriftStruct *object, ThriftProtocol *protocol, GError ** xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->threadId, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -12764,10 +13001,10 @@ tim_m_bean_list_write (ThriftStruct *object, ThriftProtocol *protocol, GError ** { guint i103; - if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) this_object->timMBeanList->len, error)) < 0) + if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) (this_object->timMBeanList ? this_object->timMBeanList->len : 0), error)) < 0) return -1; xfer += ret; - for (i103 = 0; i103 < this_object->timMBeanList->len; i103++) + for (i103 = 0; i103 < (this_object->timMBeanList ? this_object->timMBeanList->len : 0); i103++) { if ((ret = thrift_struct_write (THRIFT_STRUCT ((g_ptr_array_index ((GPtrArray *) this_object->timMBeanList, i103))), protocol, error)) < 0) return -1; @@ -12788,6 +13025,8 @@ tim_m_bean_list_write (ThriftStruct *object, ThriftProtocol *protocol, GError ** xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->reqType, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -12803,10 +13042,11 @@ tim_m_bean_list_write (ThriftStruct *object, ThriftProtocol *protocol, GError ** gchar ** keys; int i = 0, key_count; - if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap), error)) < 0) + if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, this_object->extraMap ? (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap) : 0, error)) < 0) return -1; xfer += ret; - g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); + if (this_object->extraMap) + g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); key_count = g_list_length (key_list); keys = g_newa (gchar *, key_count); for (iter = g_list_first (key_list); iter; iter = iter->next) @@ -12820,8 +13060,12 @@ tim_m_bean_list_write (ThriftStruct *object, ThriftProtocol *protocol, GError ** if ((ret = thrift_protocol_write_string (protocol, key104, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_string (protocol, val105, error)) < 0) return -1; + xfer += ret; + } if ((ret = thrift_protocol_write_map_end (protocol, error)) < 0) return -1; @@ -13212,7 +13456,8 @@ tim_p_bean_list_read (ThriftStruct *object, ThriftProtocol *protocol, GError **e if ((ret = thrift_protocol_read_string (protocol, &val108, error)) < 0) return -1; xfer += ret; - g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key107, (gpointer) val108); + if (this_object->extraMap && key107) + g_hash_table_insert ((GHashTable *)this_object->extraMap, (gpointer) key107, (gpointer) val108); } /* read the map end marker */ @@ -13269,6 +13514,8 @@ tim_p_bean_list_write (ThriftStruct *object, ThriftProtocol *protocol, GError ** xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->threadId, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -13279,10 +13526,10 @@ tim_p_bean_list_write (ThriftStruct *object, ThriftProtocol *protocol, GError ** { guint i109; - if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) this_object->timPBeanList->len, error)) < 0) + if ((ret = thrift_protocol_write_list_begin (protocol, T_STRUCT, (gint32) (this_object->timPBeanList ? this_object->timPBeanList->len : 0), error)) < 0) return -1; xfer += ret; - for (i109 = 0; i109 < this_object->timPBeanList->len; i109++) + for (i109 = 0; i109 < (this_object->timPBeanList ? this_object->timPBeanList->len : 0); i109++) { if ((ret = thrift_struct_write (THRIFT_STRUCT ((g_ptr_array_index ((GPtrArray *) this_object->timPBeanList, i109))), protocol, error)) < 0) return -1; @@ -13303,6 +13550,8 @@ tim_p_bean_list_write (ThriftStruct *object, ThriftProtocol *protocol, GError ** xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->reqType, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -13318,10 +13567,11 @@ tim_p_bean_list_write (ThriftStruct *object, ThriftProtocol *protocol, GError ** gchar ** keys; int i = 0, key_count; - if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap), error)) < 0) + if ((ret = thrift_protocol_write_map_begin (protocol, T_STRING, T_STRING, this_object->extraMap ? (gint32) g_hash_table_size ((GHashTable *) this_object->extraMap) : 0, error)) < 0) return -1; xfer += ret; - g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); + if (this_object->extraMap) + g_hash_table_foreach ((GHashTable *) this_object->extraMap, thrift_hash_table_get_keys, &key_list); key_count = g_list_length (key_list); keys = g_newa (gchar *, key_count); for (iter = g_list_first (key_list); iter; iter = iter->next) @@ -13335,8 +13585,12 @@ tim_p_bean_list_write (ThriftStruct *object, ThriftProtocol *protocol, GError ** if ((ret = thrift_protocol_write_string (protocol, key110, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_string (protocol, val111, error)) < 0) return -1; + xfer += ret; + } if ((ret = thrift_protocol_write_map_end (protocol, error)) < 0) return -1; @@ -13702,6 +13956,8 @@ tim_property_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->threadId, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -13712,6 +13968,8 @@ tim_property_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->interflow, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -13722,6 +13980,8 @@ tim_property_bean_write (ThriftStruct *object, ThriftProtocol *protocol, GError xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->tls, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -14426,6 +14686,8 @@ i_tim_tim_login_args_write (ThriftStruct *object, ThriftProtocol *protocol, GErr xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->pwd, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -15403,6 +15665,8 @@ i_tim_tim_ping_args_write (ThriftStruct *object, ThriftProtocol *protocol, GErro xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->threadId, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -16050,6 +16314,8 @@ i_tim_tim_regist_args_write (ThriftStruct *object, ThriftProtocol *protocol, GEr xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->auth, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -17053,6 +17319,8 @@ i_tim_tim_message_iq_args_write (ThriftStruct *object, ThriftProtocol *protocol, xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->iqType, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -17835,6 +18103,8 @@ i_tim_tim_remote_user_auth_args_write (ThriftStruct *object, ThriftProtocol *pro xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->pwd, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; @@ -20588,6 +20858,8 @@ i_tim_tim_response_message_iq_args_write (ThriftStruct *object, ThriftProtocol * xfer += ret; if ((ret = thrift_protocol_write_string (protocol, this_object->iqType, error)) < 0) return -1; + xfer += ret; + if ((ret = thrift_protocol_write_field_end (protocol, error)) < 0) return -1; xfer += ret; diff --git a/protocols/gen-c_glib/tim_types.h b/protocols/gen-c_glib/tim_types.h index 03b8f7e..167ae4b 100644 --- a/protocols/gen-c_glib/tim_types.h +++ b/protocols/gen-c_glib/tim_types.h @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -11,7 +11,6 @@ #include #include #include - /* custom thrift includes */ /* begin types */ diff --git a/protocols/gen-cocoa/tim.h b/protocols/gen-cocoa/tim.h deleted file mode 100644 index 9486fde..0000000 --- a/protocols/gen-cocoa/tim.h +++ /dev/null @@ -1,1689 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ - -#import - -#import "TProtocol.h" -#import "TApplicationException.h" -#import "TProtocolException.h" -#import "TProtocolUtil.h" -#import "TProcessor.h" -#import "TObjective-C.h" -#import "TBase.h" -#import "TAsyncTransport.h" -#import "TProtocolFactory.h" -#import "TBaseClient.h" - - -@interface TimError : NSObject { - int32_t __errCode; - NSString * __errMsg; - - BOOL __errCode_isset; - BOOL __errMsg_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, getter=errCode, setter=setErrCode:) int32_t errCode; -@property (nonatomic, retain, getter=errMsg, setter=setErrMsg:) NSString * errMsg; -#endif - -- (id) init; -- (id) initWithErrCode: (int32_t) errCode errMsg: (NSString *) errMsg; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (int32_t) errCode; -- (void) setErrCode: (int32_t) errCode; -#endif -- (BOOL) errCodeIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) errMsg; -- (void) setErrMsg: (NSString *) errMsg; -#endif -- (BOOL) errMsgIsSet; - -@end - -@interface TimNode : NSObject { - NSString * __key; - NSString * __value; - - BOOL __key_isset; - BOOL __value_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=key, setter=setKey:) NSString * key; -@property (nonatomic, retain, getter=value, setter=setValue:) NSString * value; -#endif - -- (id) init; -- (id) initWithKey: (NSString *) key value: (NSString *) value; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (NSString *) key; -- (void) setKey: (NSString *) key; -#endif -- (BOOL) keyIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) value; -- (void) setValue: (NSString *) value; -#endif -- (BOOL) valueIsSet; - -@end - -@interface TimAckBean : NSObject { - NSString * __id; - NSString * __ackType; - NSString * __ackStatus; - NSMutableArray * __extraList; - TimError * __err; - NSMutableDictionary * __extraMap; - - BOOL __id_isset; - BOOL __ackType_isset; - BOOL __ackStatus_isset; - BOOL __extraList_isset; - BOOL __err_isset; - BOOL __extraMap_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=id, setter=setId:) NSString * id; -@property (nonatomic, retain, getter=ackType, setter=setAckType:) NSString * ackType; -@property (nonatomic, retain, getter=ackStatus, setter=setAckStatus:) NSString * ackStatus; -@property (nonatomic, retain, getter=extraList, setter=setExtraList:) NSMutableArray * extraList; -@property (nonatomic, retain, getter=err, setter=setErr:) TimError * err; -@property (nonatomic, retain, getter=extraMap, setter=setExtraMap:) NSMutableDictionary * extraMap; -#endif - -- (id) init; -- (id) initWithId: (NSString *) id ackType: (NSString *) ackType ackStatus: (NSString *) ackStatus extraList: (NSMutableArray *) extraList err: (TimError *) err extraMap: (NSMutableDictionary *) extraMap; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (NSString *) id; -- (void) setId: (NSString *) id; -#endif -- (BOOL) idIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) ackType; -- (void) setAckType: (NSString *) ackType; -#endif -- (BOOL) ackTypeIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) ackStatus; -- (void) setAckStatus: (NSString *) ackStatus; -#endif -- (BOOL) ackStatusIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableArray *) extraList; -- (void) setExtraList: (NSMutableArray *) extraList; -#endif -- (BOOL) extraListIsSet; - -#if !__has_feature(objc_arc) -- (TimError *) err; -- (void) setErr: (TimError *) err; -#endif -- (BOOL) errIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableDictionary *) extraMap; -- (void) setExtraMap: (NSMutableDictionary *) extraMap; -#endif -- (BOOL) extraMapIsSet; - -@end - -@interface TimHBean : NSObject { - int32_t __chl; - int32_t __platform; - int16_t __version; - - BOOL __chl_isset; - BOOL __platform_isset; - BOOL __version_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, getter=chl, setter=setChl:) int32_t chl; -@property (nonatomic, getter=platform, setter=setPlatform:) int32_t platform; -@property (nonatomic, getter=version, setter=setVersion:) int16_t version; -#endif - -- (id) init; -- (id) initWithChl: (int32_t) chl platform: (int32_t) platform version: (int16_t) version; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (int32_t) chl; -- (void) setChl: (int32_t) chl; -#endif -- (BOOL) chlIsSet; - -#if !__has_feature(objc_arc) -- (int32_t) platform; -- (void) setPlatform: (int32_t) platform; -#endif -- (BOOL) platformIsSet; - -#if !__has_feature(objc_arc) -- (int16_t) version; -- (void) setVersion: (int16_t) version; -#endif -- (BOOL) versionIsSet; - -@end - -@interface TimParam : NSObject { - NSString * __timestamp; - int16_t __version; - NSString * __lang; - NSMutableArray * __extraList; - NSMutableDictionary * __extraMap; - NSString * __interflow; - NSString * __tls; - - BOOL __timestamp_isset; - BOOL __version_isset; - BOOL __lang_isset; - BOOL __extraList_isset; - BOOL __extraMap_isset; - BOOL __interflow_isset; - BOOL __tls_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=timestamp, setter=setTimestamp:) NSString * timestamp; -@property (nonatomic, getter=version, setter=setVersion:) int16_t version; -@property (nonatomic, retain, getter=lang, setter=setLang:) NSString * lang; -@property (nonatomic, retain, getter=extraList, setter=setExtraList:) NSMutableArray * extraList; -@property (nonatomic, retain, getter=extraMap, setter=setExtraMap:) NSMutableDictionary * extraMap; -@property (nonatomic, retain, getter=interflow, setter=setInterflow:) NSString * interflow; -@property (nonatomic, retain, getter=tls, setter=setTls:) NSString * tls; -#endif - -- (id) init; -- (id) initWithTimestamp: (NSString *) timestamp version: (int16_t) version lang: (NSString *) lang extraList: (NSMutableArray *) extraList extraMap: (NSMutableDictionary *) extraMap interflow: (NSString *) interflow tls: (NSString *) tls; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (NSString *) timestamp; -- (void) setTimestamp: (NSString *) timestamp; -#endif -- (BOOL) timestampIsSet; - -#if !__has_feature(objc_arc) -- (int16_t) version; -- (void) setVersion: (int16_t) version; -#endif -- (BOOL) versionIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) lang; -- (void) setLang: (NSString *) lang; -#endif -- (BOOL) langIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableArray *) extraList; -- (void) setExtraList: (NSMutableArray *) extraList; -#endif -- (BOOL) extraListIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableDictionary *) extraMap; -- (void) setExtraMap: (NSMutableDictionary *) extraMap; -#endif -- (BOOL) extraMapIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) interflow; -- (void) setInterflow: (NSString *) interflow; -#endif -- (BOOL) interflowIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) tls; -- (void) setTls: (NSString *) tls; -#endif -- (BOOL) tlsIsSet; - -@end - -@interface TimTime : NSObject { - NSString * __timestamp; - NSString * __formattime; - - BOOL __timestamp_isset; - BOOL __formattime_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=timestamp, setter=setTimestamp:) NSString * timestamp; -@property (nonatomic, retain, getter=formattime, setter=setFormattime:) NSString * formattime; -#endif - -- (id) init; -- (id) initWithTimestamp: (NSString *) timestamp formattime: (NSString *) formattime; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (NSString *) timestamp; -- (void) setTimestamp: (NSString *) timestamp; -#endif -- (BOOL) timestampIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) formattime; -- (void) setFormattime: (NSString *) formattime; -#endif -- (BOOL) formattimeIsSet; - -@end - -@interface TimArea : NSObject { - NSString * __country; - NSString * __province; - NSString * __city; - NSMutableArray * __extraList; - NSMutableDictionary * __extraMap; - - BOOL __country_isset; - BOOL __province_isset; - BOOL __city_isset; - BOOL __extraList_isset; - BOOL __extraMap_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=country, setter=setCountry:) NSString * country; -@property (nonatomic, retain, getter=province, setter=setProvince:) NSString * province; -@property (nonatomic, retain, getter=city, setter=setCity:) NSString * city; -@property (nonatomic, retain, getter=extraList, setter=setExtraList:) NSMutableArray * extraList; -@property (nonatomic, retain, getter=extraMap, setter=setExtraMap:) NSMutableDictionary * extraMap; -#endif - -- (id) init; -- (id) initWithCountry: (NSString *) country province: (NSString *) province city: (NSString *) city extraList: (NSMutableArray *) extraList extraMap: (NSMutableDictionary *) extraMap; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (NSString *) country; -- (void) setCountry: (NSString *) country; -#endif -- (BOOL) countryIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) province; -- (void) setProvince: (NSString *) province; -#endif -- (BOOL) provinceIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) city; -- (void) setCity: (NSString *) city; -#endif -- (BOOL) cityIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableArray *) extraList; -- (void) setExtraList: (NSMutableArray *) extraList; -#endif -- (BOOL) extraListIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableDictionary *) extraMap; -- (void) setExtraMap: (NSMutableDictionary *) extraMap; -#endif -- (BOOL) extraMapIsSet; - -@end - -@interface Tid : NSObject { - NSString * __name; - NSString * __domain; - NSString * __resource; - NSString * __type; - NSMutableArray * __extraList; - NSMutableDictionary * __extraMap; - - BOOL __name_isset; - BOOL __domain_isset; - BOOL __resource_isset; - BOOL __type_isset; - BOOL __extraList_isset; - BOOL __extraMap_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=name, setter=setName:) NSString * name; -@property (nonatomic, retain, getter=domain, setter=setDomain:) NSString * domain; -@property (nonatomic, retain, getter=resource, setter=setResource:) NSString * resource; -@property (nonatomic, retain, getter=type, setter=setType:) NSString * type; -@property (nonatomic, retain, getter=extraList, setter=setExtraList:) NSMutableArray * extraList; -@property (nonatomic, retain, getter=extraMap, setter=setExtraMap:) NSMutableDictionary * extraMap; -#endif - -- (id) init; -- (id) initWithName: (NSString *) name domain: (NSString *) domain resource: (NSString *) resource type: (NSString *) type extraList: (NSMutableArray *) extraList extraMap: (NSMutableDictionary *) extraMap; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (NSString *) name; -- (void) setName: (NSString *) name; -#endif -- (BOOL) nameIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) domain; -- (void) setDomain: (NSString *) domain; -#endif -- (BOOL) domainIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) resource; -- (void) setResource: (NSString *) resource; -#endif -- (BOOL) resourceIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) type; -- (void) setType: (NSString *) type; -#endif -- (BOOL) typeIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableArray *) extraList; -- (void) setExtraList: (NSMutableArray *) extraList; -#endif -- (BOOL) extraListIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableDictionary *) extraMap; -- (void) setExtraMap: (NSMutableDictionary *) extraMap; -#endif -- (BOOL) extraMapIsSet; - -@end - -@interface TimUserBean : NSObject { - Tid * __tid; - NSString * __nickname; - NSString * __remarkname; - NSString * __brithday; - int16_t __gender; - NSString * __headurl; - TimArea * __area; - NSData * __headbyte; - NSMutableArray * __photoBytes; - NSMutableArray * __extraList; - NSMutableDictionary * __extraMap; - - BOOL __tid_isset; - BOOL __nickname_isset; - BOOL __remarkname_isset; - BOOL __brithday_isset; - BOOL __gender_isset; - BOOL __headurl_isset; - BOOL __area_isset; - BOOL __headbyte_isset; - BOOL __photoBytes_isset; - BOOL __extraList_isset; - BOOL __extraMap_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=tid, setter=setTid:) Tid * tid; -@property (nonatomic, retain, getter=nickname, setter=setNickname:) NSString * nickname; -@property (nonatomic, retain, getter=remarkname, setter=setRemarkname:) NSString * remarkname; -@property (nonatomic, retain, getter=brithday, setter=setBrithday:) NSString * brithday; -@property (nonatomic, getter=gender, setter=setGender:) int16_t gender; -@property (nonatomic, retain, getter=headurl, setter=setHeadurl:) NSString * headurl; -@property (nonatomic, retain, getter=area, setter=setArea:) TimArea * area; -@property (nonatomic, retain, getter=headbyte, setter=setHeadbyte:) NSData * headbyte; -@property (nonatomic, retain, getter=photoBytes, setter=setPhotoBytes:) NSMutableArray * photoBytes; -@property (nonatomic, retain, getter=extraList, setter=setExtraList:) NSMutableArray * extraList; -@property (nonatomic, retain, getter=extraMap, setter=setExtraMap:) NSMutableDictionary * extraMap; -#endif - -- (id) init; -- (id) initWithTid: (Tid *) tid nickname: (NSString *) nickname remarkname: (NSString *) remarkname brithday: (NSString *) brithday gender: (int16_t) gender headurl: (NSString *) headurl area: (TimArea *) area headbyte: (NSData *) headbyte photoBytes: (NSMutableArray *) photoBytes extraList: (NSMutableArray *) extraList extraMap: (NSMutableDictionary *) extraMap; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (Tid *) tid; -- (void) setTid: (Tid *) tid; -#endif -- (BOOL) tidIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) nickname; -- (void) setNickname: (NSString *) nickname; -#endif -- (BOOL) nicknameIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) remarkname; -- (void) setRemarkname: (NSString *) remarkname; -#endif -- (BOOL) remarknameIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) brithday; -- (void) setBrithday: (NSString *) brithday; -#endif -- (BOOL) brithdayIsSet; - -#if !__has_feature(objc_arc) -- (int16_t) gender; -- (void) setGender: (int16_t) gender; -#endif -- (BOOL) genderIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) headurl; -- (void) setHeadurl: (NSString *) headurl; -#endif -- (BOOL) headurlIsSet; - -#if !__has_feature(objc_arc) -- (TimArea *) area; -- (void) setArea: (TimArea *) area; -#endif -- (BOOL) areaIsSet; - -#if !__has_feature(objc_arc) -- (NSData *) headbyte; -- (void) setHeadbyte: (NSData *) headbyte; -#endif -- (BOOL) headbyteIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableArray *) photoBytes; -- (void) setPhotoBytes: (NSMutableArray *) photoBytes; -#endif -- (BOOL) photoBytesIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableArray *) extraList; -- (void) setExtraList: (NSMutableArray *) extraList; -#endif -- (BOOL) extraListIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableDictionary *) extraMap; -- (void) setExtraMap: (NSMutableDictionary *) extraMap; -#endif -- (BOOL) extraMapIsSet; - -@end - -@interface TimRoom : NSObject { - Tid * __tid; - Tid * __founderTid; - NSMutableArray * __HostsTid; - NSMutableArray * __membersTid; - NSString * __headurl; - NSString * __roomName; - NSString * __desc; - TimTime * __createTime; - NSMutableArray * __extraList; - NSMutableDictionary * __extraMap; - - BOOL __tid_isset; - BOOL __founderTid_isset; - BOOL __HostsTid_isset; - BOOL __membersTid_isset; - BOOL __headurl_isset; - BOOL __roomName_isset; - BOOL __desc_isset; - BOOL __createTime_isset; - BOOL __extraList_isset; - BOOL __extraMap_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=tid, setter=setTid:) Tid * tid; -@property (nonatomic, retain, getter=founderTid, setter=setFounderTid:) Tid * founderTid; -@property (nonatomic, retain, getter=hostsTid, setter=setHostsTid:) NSMutableArray * HostsTid; -@property (nonatomic, retain, getter=membersTid, setter=setMembersTid:) NSMutableArray * membersTid; -@property (nonatomic, retain, getter=headurl, setter=setHeadurl:) NSString * headurl; -@property (nonatomic, retain, getter=roomName, setter=setRoomName:) NSString * roomName; -@property (nonatomic, retain, getter=desc, setter=setDesc:) NSString * desc; -@property (nonatomic, retain, getter=createTime, setter=setCreateTime:) TimTime * createTime; -@property (nonatomic, retain, getter=extraList, setter=setExtraList:) NSMutableArray * extraList; -@property (nonatomic, retain, getter=extraMap, setter=setExtraMap:) NSMutableDictionary * extraMap; -#endif - -- (id) init; -- (id) initWithTid: (Tid *) tid founderTid: (Tid *) founderTid HostsTid: (NSMutableArray *) HostsTid membersTid: (NSMutableArray *) membersTid headurl: (NSString *) headurl roomName: (NSString *) roomName desc: (NSString *) desc createTime: (TimTime *) createTime extraList: (NSMutableArray *) extraList extraMap: (NSMutableDictionary *) extraMap; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (Tid *) tid; -- (void) setTid: (Tid *) tid; -#endif -- (BOOL) tidIsSet; - -#if !__has_feature(objc_arc) -- (Tid *) founderTid; -- (void) setFounderTid: (Tid *) founderTid; -#endif -- (BOOL) founderTidIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableArray *) hostsTid; -- (void) setHostsTid: (NSMutableArray *) HostsTid; -#endif -- (BOOL) HostsTidIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableArray *) membersTid; -- (void) setMembersTid: (NSMutableArray *) membersTid; -#endif -- (BOOL) membersTidIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) headurl; -- (void) setHeadurl: (NSString *) headurl; -#endif -- (BOOL) headurlIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) roomName; -- (void) setRoomName: (NSString *) roomName; -#endif -- (BOOL) roomNameIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) desc; -- (void) setDesc: (NSString *) desc; -#endif -- (BOOL) descIsSet; - -#if !__has_feature(objc_arc) -- (TimTime *) createTime; -- (void) setCreateTime: (TimTime *) createTime; -#endif -- (BOOL) createTimeIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableArray *) extraList; -- (void) setExtraList: (NSMutableArray *) extraList; -#endif -- (BOOL) extraListIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableDictionary *) extraMap; -- (void) setExtraMap: (NSMutableDictionary *) extraMap; -#endif -- (BOOL) extraMapIsSet; - -@end - -@interface TimPBean : NSObject { - NSString * __threadId; - Tid * __fromTid; - Tid * __toTid; - NSString * __status; - NSString * __type; - int32_t __priority; - NSString * __show; - Tid * __leaguerTid; - NSMutableArray * __extraList; - TimError * __error; - NSMutableDictionary * __extraMap; - - BOOL __threadId_isset; - BOOL __fromTid_isset; - BOOL __toTid_isset; - BOOL __status_isset; - BOOL __type_isset; - BOOL __priority_isset; - BOOL __show_isset; - BOOL __leaguerTid_isset; - BOOL __extraList_isset; - BOOL __error_isset; - BOOL __extraMap_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=threadId, setter=setThreadId:) NSString * threadId; -@property (nonatomic, retain, getter=fromTid, setter=setFromTid:) Tid * fromTid; -@property (nonatomic, retain, getter=toTid, setter=setToTid:) Tid * toTid; -@property (nonatomic, retain, getter=status, setter=setStatus:) NSString * status; -@property (nonatomic, retain, getter=type, setter=setType:) NSString * type; -@property (nonatomic, getter=priority, setter=setPriority:) int32_t priority; -@property (nonatomic, retain, getter=show, setter=setShow:) NSString * show; -@property (nonatomic, retain, getter=leaguerTid, setter=setLeaguerTid:) Tid * leaguerTid; -@property (nonatomic, retain, getter=extraList, setter=setExtraList:) NSMutableArray * extraList; -@property (nonatomic, retain, getter=error, setter=setError:) TimError * error; -@property (nonatomic, retain, getter=extraMap, setter=setExtraMap:) NSMutableDictionary * extraMap; -#endif - -- (id) init; -- (id) initWithThreadId: (NSString *) threadId fromTid: (Tid *) fromTid toTid: (Tid *) toTid status: (NSString *) status type: (NSString *) type priority: (int32_t) priority show: (NSString *) show leaguerTid: (Tid *) leaguerTid extraList: (NSMutableArray *) extraList error: (TimError *) error extraMap: (NSMutableDictionary *) extraMap; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (NSString *) threadId; -- (void) setThreadId: (NSString *) threadId; -#endif -- (BOOL) threadIdIsSet; - -#if !__has_feature(objc_arc) -- (Tid *) fromTid; -- (void) setFromTid: (Tid *) fromTid; -#endif -- (BOOL) fromTidIsSet; - -#if !__has_feature(objc_arc) -- (Tid *) toTid; -- (void) setToTid: (Tid *) toTid; -#endif -- (BOOL) toTidIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) status; -- (void) setStatus: (NSString *) status; -#endif -- (BOOL) statusIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) type; -- (void) setType: (NSString *) type; -#endif -- (BOOL) typeIsSet; - -#if !__has_feature(objc_arc) -- (int32_t) priority; -- (void) setPriority: (int32_t) priority; -#endif -- (BOOL) priorityIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) show; -- (void) setShow: (NSString *) show; -#endif -- (BOOL) showIsSet; - -#if !__has_feature(objc_arc) -- (Tid *) leaguerTid; -- (void) setLeaguerTid: (Tid *) leaguerTid; -#endif -- (BOOL) leaguerTidIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableArray *) extraList; -- (void) setExtraList: (NSMutableArray *) extraList; -#endif -- (BOOL) extraListIsSet; - -#if !__has_feature(objc_arc) -- (TimError *) error; -- (void) setError: (TimError *) error; -#endif -- (BOOL) errorIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableDictionary *) extraMap; -- (void) setExtraMap: (NSMutableDictionary *) extraMap; -#endif -- (BOOL) extraMapIsSet; - -@end - -@interface TimMBean : NSObject { - NSString * __threadId; - NSString * __mid; - Tid * __fromTid; - Tid * __toTid; - NSString * __body; - NSString * __type; - int16_t __msgType; - TimTime * __offline; - Tid * __leaguerTid; - NSMutableArray * __extraList; - NSString * __timestamp; - TimError * __error; - NSMutableDictionary * __extraMap; - int16_t __readstatus; - - BOOL __threadId_isset; - BOOL __mid_isset; - BOOL __fromTid_isset; - BOOL __toTid_isset; - BOOL __body_isset; - BOOL __type_isset; - BOOL __msgType_isset; - BOOL __offline_isset; - BOOL __leaguerTid_isset; - BOOL __extraList_isset; - BOOL __timestamp_isset; - BOOL __error_isset; - BOOL __extraMap_isset; - BOOL __readstatus_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=threadId, setter=setThreadId:) NSString * threadId; -@property (nonatomic, retain, getter=mid, setter=setMid:) NSString * mid; -@property (nonatomic, retain, getter=fromTid, setter=setFromTid:) Tid * fromTid; -@property (nonatomic, retain, getter=toTid, setter=setToTid:) Tid * toTid; -@property (nonatomic, retain, getter=body, setter=setBody:) NSString * body; -@property (nonatomic, retain, getter=type, setter=setType:) NSString * type; -@property (nonatomic, getter=msgType, setter=setMsgType:) int16_t msgType; -@property (nonatomic, retain, getter=offline, setter=setOffline:) TimTime * offline; -@property (nonatomic, retain, getter=leaguerTid, setter=setLeaguerTid:) Tid * leaguerTid; -@property (nonatomic, retain, getter=extraList, setter=setExtraList:) NSMutableArray * extraList; -@property (nonatomic, retain, getter=timestamp, setter=setTimestamp:) NSString * timestamp; -@property (nonatomic, retain, getter=error, setter=setError:) TimError * error; -@property (nonatomic, retain, getter=extraMap, setter=setExtraMap:) NSMutableDictionary * extraMap; -@property (nonatomic, getter=readstatus, setter=setReadstatus:) int16_t readstatus; -#endif - -- (id) init; -- (id) initWithThreadId: (NSString *) threadId mid: (NSString *) mid fromTid: (Tid *) fromTid toTid: (Tid *) toTid body: (NSString *) body type: (NSString *) type msgType: (int16_t) msgType offline: (TimTime *) offline leaguerTid: (Tid *) leaguerTid extraList: (NSMutableArray *) extraList timestamp: (NSString *) timestamp error: (TimError *) error extraMap: (NSMutableDictionary *) extraMap readstatus: (int16_t) readstatus; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (NSString *) threadId; -- (void) setThreadId: (NSString *) threadId; -#endif -- (BOOL) threadIdIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) mid; -- (void) setMid: (NSString *) mid; -#endif -- (BOOL) midIsSet; - -#if !__has_feature(objc_arc) -- (Tid *) fromTid; -- (void) setFromTid: (Tid *) fromTid; -#endif -- (BOOL) fromTidIsSet; - -#if !__has_feature(objc_arc) -- (Tid *) toTid; -- (void) setToTid: (Tid *) toTid; -#endif -- (BOOL) toTidIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) body; -- (void) setBody: (NSString *) body; -#endif -- (BOOL) bodyIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) type; -- (void) setType: (NSString *) type; -#endif -- (BOOL) typeIsSet; - -#if !__has_feature(objc_arc) -- (int16_t) msgType; -- (void) setMsgType: (int16_t) msgType; -#endif -- (BOOL) msgTypeIsSet; - -#if !__has_feature(objc_arc) -- (TimTime *) offline; -- (void) setOffline: (TimTime *) offline; -#endif -- (BOOL) offlineIsSet; - -#if !__has_feature(objc_arc) -- (Tid *) leaguerTid; -- (void) setLeaguerTid: (Tid *) leaguerTid; -#endif -- (BOOL) leaguerTidIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableArray *) extraList; -- (void) setExtraList: (NSMutableArray *) extraList; -#endif -- (BOOL) extraListIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) timestamp; -- (void) setTimestamp: (NSString *) timestamp; -#endif -- (BOOL) timestampIsSet; - -#if !__has_feature(objc_arc) -- (TimError *) error; -- (void) setError: (TimError *) error; -#endif -- (BOOL) errorIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableDictionary *) extraMap; -- (void) setExtraMap: (NSMutableDictionary *) extraMap; -#endif -- (BOOL) extraMapIsSet; - -#if !__has_feature(objc_arc) -- (int16_t) readstatus; -- (void) setReadstatus: (int16_t) readstatus; -#endif -- (BOOL) readstatusIsSet; - -@end - -@interface TimIqBean : NSObject { - NSString * __threadId; - Tid * __fromTid; - Tid * __toTid; - NSString * __type; - NSMutableArray * __extraList; - TimError * __error; - NSMutableDictionary * __extraMap; - - BOOL __threadId_isset; - BOOL __fromTid_isset; - BOOL __toTid_isset; - BOOL __type_isset; - BOOL __extraList_isset; - BOOL __error_isset; - BOOL __extraMap_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=threadId, setter=setThreadId:) NSString * threadId; -@property (nonatomic, retain, getter=fromTid, setter=setFromTid:) Tid * fromTid; -@property (nonatomic, retain, getter=toTid, setter=setToTid:) Tid * toTid; -@property (nonatomic, retain, getter=type, setter=setType:) NSString * type; -@property (nonatomic, retain, getter=extraList, setter=setExtraList:) NSMutableArray * extraList; -@property (nonatomic, retain, getter=error, setter=setError:) TimError * error; -@property (nonatomic, retain, getter=extraMap, setter=setExtraMap:) NSMutableDictionary * extraMap; -#endif - -- (id) init; -- (id) initWithThreadId: (NSString *) threadId fromTid: (Tid *) fromTid toTid: (Tid *) toTid type: (NSString *) type extraList: (NSMutableArray *) extraList error: (TimError *) error extraMap: (NSMutableDictionary *) extraMap; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (NSString *) threadId; -- (void) setThreadId: (NSString *) threadId; -#endif -- (BOOL) threadIdIsSet; - -#if !__has_feature(objc_arc) -- (Tid *) fromTid; -- (void) setFromTid: (Tid *) fromTid; -#endif -- (BOOL) fromTidIsSet; - -#if !__has_feature(objc_arc) -- (Tid *) toTid; -- (void) setToTid: (Tid *) toTid; -#endif -- (BOOL) toTidIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) type; -- (void) setType: (NSString *) type; -#endif -- (BOOL) typeIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableArray *) extraList; -- (void) setExtraList: (NSMutableArray *) extraList; -#endif -- (BOOL) extraListIsSet; - -#if !__has_feature(objc_arc) -- (TimError *) error; -- (void) setError: (TimError *) error; -#endif -- (BOOL) errorIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableDictionary *) extraMap; -- (void) setExtraMap: (NSMutableDictionary *) extraMap; -#endif -- (BOOL) extraMapIsSet; - -@end - -@interface TimRoster : NSObject { - NSString * __subscription; - Tid * __tid; - NSString * __name; - NSMutableDictionary * __extraMap; - - BOOL __subscription_isset; - BOOL __tid_isset; - BOOL __name_isset; - BOOL __extraMap_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=subscription, setter=setSubscription:) NSString * subscription; -@property (nonatomic, retain, getter=tid, setter=setTid:) Tid * tid; -@property (nonatomic, retain, getter=name, setter=setName:) NSString * name; -@property (nonatomic, retain, getter=extraMap, setter=setExtraMap:) NSMutableDictionary * extraMap; -#endif - -- (id) init; -- (id) initWithSubscription: (NSString *) subscription tid: (Tid *) tid name: (NSString *) name extraMap: (NSMutableDictionary *) extraMap; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (NSString *) subscription; -- (void) setSubscription: (NSString *) subscription; -#endif -- (BOOL) subscriptionIsSet; - -#if !__has_feature(objc_arc) -- (Tid *) tid; -- (void) setTid: (Tid *) tid; -#endif -- (BOOL) tidIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) name; -- (void) setName: (NSString *) name; -#endif -- (BOOL) nameIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableDictionary *) extraMap; -- (void) setExtraMap: (NSMutableDictionary *) extraMap; -#endif -- (BOOL) extraMapIsSet; - -@end - -@interface TimRemoteUserBean : NSObject { - TimError * __error; - TimUserBean * __ub; - NSMutableDictionary * __extraMap; - - BOOL __error_isset; - BOOL __ub_isset; - BOOL __extraMap_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=error, setter=setError:) TimError * error; -@property (nonatomic, retain, getter=ub, setter=setUb:) TimUserBean * ub; -@property (nonatomic, retain, getter=extraMap, setter=setExtraMap:) NSMutableDictionary * extraMap; -#endif - -- (id) init; -- (id) initWithError: (TimError *) error ub: (TimUserBean *) ub extraMap: (NSMutableDictionary *) extraMap; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimError *) error; -- (void) setError: (TimError *) error; -#endif -- (BOOL) errorIsSet; - -#if !__has_feature(objc_arc) -- (TimUserBean *) ub; -- (void) setUb: (TimUserBean *) ub; -#endif -- (BOOL) ubIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableDictionary *) extraMap; -- (void) setExtraMap: (NSMutableDictionary *) extraMap; -#endif -- (BOOL) extraMapIsSet; - -@end - -@interface TimRemoteRoom : NSObject { - TimError * __error; - TimRoom * __room; - NSMutableDictionary * __extraMap; - - BOOL __error_isset; - BOOL __room_isset; - BOOL __extraMap_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=error, setter=setError:) TimError * error; -@property (nonatomic, retain, getter=room, setter=setRoom:) TimRoom * room; -@property (nonatomic, retain, getter=extraMap, setter=setExtraMap:) NSMutableDictionary * extraMap; -#endif - -- (id) init; -- (id) initWithError: (TimError *) error room: (TimRoom *) room extraMap: (NSMutableDictionary *) extraMap; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimError *) error; -- (void) setError: (TimError *) error; -#endif -- (BOOL) errorIsSet; - -#if !__has_feature(objc_arc) -- (TimRoom *) room; -- (void) setRoom: (TimRoom *) room; -#endif -- (BOOL) roomIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableDictionary *) extraMap; -- (void) setExtraMap: (NSMutableDictionary *) extraMap; -#endif -- (BOOL) extraMapIsSet; - -@end - -@interface TimResponseBean : NSObject { - NSString * __threadId; - TimError * __error; - NSMutableArray * __extraList; - NSMutableDictionary * __extraMap; - - BOOL __threadId_isset; - BOOL __error_isset; - BOOL __extraList_isset; - BOOL __extraMap_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=threadId, setter=setThreadId:) NSString * threadId; -@property (nonatomic, retain, getter=error, setter=setError:) TimError * error; -@property (nonatomic, retain, getter=extraList, setter=setExtraList:) NSMutableArray * extraList; -@property (nonatomic, retain, getter=extraMap, setter=setExtraMap:) NSMutableDictionary * extraMap; -#endif - -- (id) init; -- (id) initWithThreadId: (NSString *) threadId error: (TimError *) error extraList: (NSMutableArray *) extraList extraMap: (NSMutableDictionary *) extraMap; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (NSString *) threadId; -- (void) setThreadId: (NSString *) threadId; -#endif -- (BOOL) threadIdIsSet; - -#if !__has_feature(objc_arc) -- (TimError *) error; -- (void) setError: (TimError *) error; -#endif -- (BOOL) errorIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableArray *) extraList; -- (void) setExtraList: (NSMutableArray *) extraList; -#endif -- (BOOL) extraListIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableDictionary *) extraMap; -- (void) setExtraMap: (NSMutableDictionary *) extraMap; -#endif -- (BOOL) extraMapIsSet; - -@end - -@interface TimSock5Bean : NSObject { - Tid * __fromTid; - Tid * __toTid; - NSString * __addr; - int32_t __port; - int16_t __transport; - NSString * __pubId; - NSMutableDictionary * __extraMap; - - BOOL __fromTid_isset; - BOOL __toTid_isset; - BOOL __addr_isset; - BOOL __port_isset; - BOOL __transport_isset; - BOOL __pubId_isset; - BOOL __extraMap_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=fromTid, setter=setFromTid:) Tid * fromTid; -@property (nonatomic, retain, getter=toTid, setter=setToTid:) Tid * toTid; -@property (nonatomic, retain, getter=addr, setter=setAddr:) NSString * addr; -@property (nonatomic, getter=port, setter=setPort:) int32_t port; -@property (nonatomic, getter=transport, setter=setTransport:) int16_t transport; -@property (nonatomic, retain, getter=pubId, setter=setPubId:) NSString * pubId; -@property (nonatomic, retain, getter=extraMap, setter=setExtraMap:) NSMutableDictionary * extraMap; -#endif - -- (id) init; -- (id) initWithFromTid: (Tid *) fromTid toTid: (Tid *) toTid addr: (NSString *) addr port: (int32_t) port transport: (int16_t) transport pubId: (NSString *) pubId extraMap: (NSMutableDictionary *) extraMap; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (Tid *) fromTid; -- (void) setFromTid: (Tid *) fromTid; -#endif -- (BOOL) fromTidIsSet; - -#if !__has_feature(objc_arc) -- (Tid *) toTid; -- (void) setToTid: (Tid *) toTid; -#endif -- (BOOL) toTidIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) addr; -- (void) setAddr: (NSString *) addr; -#endif -- (BOOL) addrIsSet; - -#if !__has_feature(objc_arc) -- (int32_t) port; -- (void) setPort: (int32_t) port; -#endif -- (BOOL) portIsSet; - -#if !__has_feature(objc_arc) -- (int16_t) transport; -- (void) setTransport: (int16_t) transport; -#endif -- (BOOL) transportIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) pubId; -- (void) setPubId: (NSString *) pubId; -#endif -- (BOOL) pubIdIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableDictionary *) extraMap; -- (void) setExtraMap: (NSMutableDictionary *) extraMap; -#endif -- (BOOL) extraMapIsSet; - -@end - -@interface TimSock5Bytes : NSObject { - NSString * __pubId; - int32_t __index; - NSMutableArray * __bytes; - NSMutableDictionary * __extraMap; - - BOOL __pubId_isset; - BOOL __index_isset; - BOOL __bytes_isset; - BOOL __extraMap_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=pubId, setter=setPubId:) NSString * pubId; -@property (nonatomic, getter=index, setter=setIndex:) int32_t index; -@property (nonatomic, retain, getter=bytes, setter=setBytes:) NSMutableArray * bytes; -@property (nonatomic, retain, getter=extraMap, setter=setExtraMap:) NSMutableDictionary * extraMap; -#endif - -- (id) init; -- (id) initWithPubId: (NSString *) pubId index: (int32_t) index bytes: (NSMutableArray *) bytes extraMap: (NSMutableDictionary *) extraMap; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (NSString *) pubId; -- (void) setPubId: (NSString *) pubId; -#endif -- (BOOL) pubIdIsSet; - -#if !__has_feature(objc_arc) -- (int32_t) index; -- (void) setIndex: (int32_t) index; -#endif -- (BOOL) indexIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableArray *) bytes; -- (void) setBytes: (NSMutableArray *) bytes; -#endif -- (BOOL) bytesIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableDictionary *) extraMap; -- (void) setExtraMap: (NSMutableDictionary *) extraMap; -#endif -- (BOOL) extraMapIsSet; - -@end - -@interface TimPage : NSObject { - NSString * __fromTimeStamp; - NSString * __toTimeStamp; - int32_t __limitCount; - NSMutableDictionary * __extraMap; - - BOOL __fromTimeStamp_isset; - BOOL __toTimeStamp_isset; - BOOL __limitCount_isset; - BOOL __extraMap_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=fromTimeStamp, setter=setFromTimeStamp:) NSString * fromTimeStamp; -@property (nonatomic, retain, getter=toTimeStamp, setter=setToTimeStamp:) NSString * toTimeStamp; -@property (nonatomic, getter=limitCount, setter=setLimitCount:) int32_t limitCount; -@property (nonatomic, retain, getter=extraMap, setter=setExtraMap:) NSMutableDictionary * extraMap; -#endif - -- (id) init; -- (id) initWithFromTimeStamp: (NSString *) fromTimeStamp toTimeStamp: (NSString *) toTimeStamp limitCount: (int32_t) limitCount extraMap: (NSMutableDictionary *) extraMap; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (NSString *) fromTimeStamp; -- (void) setFromTimeStamp: (NSString *) fromTimeStamp; -#endif -- (BOOL) fromTimeStampIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) toTimeStamp; -- (void) setToTimeStamp: (NSString *) toTimeStamp; -#endif -- (BOOL) toTimeStampIsSet; - -#if !__has_feature(objc_arc) -- (int32_t) limitCount; -- (void) setLimitCount: (int32_t) limitCount; -#endif -- (BOOL) limitCountIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableDictionary *) extraMap; -- (void) setExtraMap: (NSMutableDictionary *) extraMap; -#endif -- (BOOL) extraMapIsSet; - -@end - -@interface TimMessageIq : NSObject { - NSMutableArray * __tidlist; - TimPage * __timPage; - NSMutableArray * __midlist; - NSMutableDictionary * __extraMap; - - BOOL __tidlist_isset; - BOOL __timPage_isset; - BOOL __midlist_isset; - BOOL __extraMap_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=tidlist, setter=setTidlist:) NSMutableArray * tidlist; -@property (nonatomic, retain, getter=timPage, setter=setTimPage:) TimPage * timPage; -@property (nonatomic, retain, getter=midlist, setter=setMidlist:) NSMutableArray * midlist; -@property (nonatomic, retain, getter=extraMap, setter=setExtraMap:) NSMutableDictionary * extraMap; -#endif - -- (id) init; -- (id) initWithTidlist: (NSMutableArray *) tidlist timPage: (TimPage *) timPage midlist: (NSMutableArray *) midlist extraMap: (NSMutableDictionary *) extraMap; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (NSMutableArray *) tidlist; -- (void) setTidlist: (NSMutableArray *) tidlist; -#endif -- (BOOL) tidlistIsSet; - -#if !__has_feature(objc_arc) -- (TimPage *) timPage; -- (void) setTimPage: (TimPage *) timPage; -#endif -- (BOOL) timPageIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableArray *) midlist; -- (void) setMidlist: (NSMutableArray *) midlist; -#endif -- (BOOL) midlistIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableDictionary *) extraMap; -- (void) setExtraMap: (NSMutableDictionary *) extraMap; -#endif -- (BOOL) extraMapIsSet; - -@end - -@interface TimAuth : NSObject { - NSString * __domain; - NSString * __username; - NSString * __pwd; - - BOOL __domain_isset; - BOOL __username_isset; - BOOL __pwd_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=domain, setter=setDomain:) NSString * domain; -@property (nonatomic, retain, getter=username, setter=setUsername:) NSString * username; -@property (nonatomic, retain, getter=pwd, setter=setPwd:) NSString * pwd; -#endif - -- (id) init; -- (id) initWithDomain: (NSString *) domain username: (NSString *) username pwd: (NSString *) pwd; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (NSString *) domain; -- (void) setDomain: (NSString *) domain; -#endif -- (BOOL) domainIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) username; -- (void) setUsername: (NSString *) username; -#endif -- (BOOL) usernameIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) pwd; -- (void) setPwd: (NSString *) pwd; -#endif -- (BOOL) pwdIsSet; - -@end - -@interface TimMBeanList : NSObject { - NSString * __threadId; - NSMutableArray * __timMBeanList; - NSString * __reqType; - NSMutableDictionary * __extraMap; - - BOOL __threadId_isset; - BOOL __timMBeanList_isset; - BOOL __reqType_isset; - BOOL __extraMap_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=threadId, setter=setThreadId:) NSString * threadId; -@property (nonatomic, retain, getter=timMBeanList, setter=setTimMBeanList:) NSMutableArray * timMBeanList; -@property (nonatomic, retain, getter=reqType, setter=setReqType:) NSString * reqType; -@property (nonatomic, retain, getter=extraMap, setter=setExtraMap:) NSMutableDictionary * extraMap; -#endif - -- (id) init; -- (id) initWithThreadId: (NSString *) threadId timMBeanList: (NSMutableArray *) timMBeanList reqType: (NSString *) reqType extraMap: (NSMutableDictionary *) extraMap; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (NSString *) threadId; -- (void) setThreadId: (NSString *) threadId; -#endif -- (BOOL) threadIdIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableArray *) timMBeanList; -- (void) setTimMBeanList: (NSMutableArray *) timMBeanList; -#endif -- (BOOL) timMBeanListIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) reqType; -- (void) setReqType: (NSString *) reqType; -#endif -- (BOOL) reqTypeIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableDictionary *) extraMap; -- (void) setExtraMap: (NSMutableDictionary *) extraMap; -#endif -- (BOOL) extraMapIsSet; - -@end - -@interface TimPBeanList : NSObject { - NSString * __threadId; - NSMutableArray * __timPBeanList; - NSString * __reqType; - NSMutableDictionary * __extraMap; - - BOOL __threadId_isset; - BOOL __timPBeanList_isset; - BOOL __reqType_isset; - BOOL __extraMap_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=threadId, setter=setThreadId:) NSString * threadId; -@property (nonatomic, retain, getter=timPBeanList, setter=setTimPBeanList:) NSMutableArray * timPBeanList; -@property (nonatomic, retain, getter=reqType, setter=setReqType:) NSString * reqType; -@property (nonatomic, retain, getter=extraMap, setter=setExtraMap:) NSMutableDictionary * extraMap; -#endif - -- (id) init; -- (id) initWithThreadId: (NSString *) threadId timPBeanList: (NSMutableArray *) timPBeanList reqType: (NSString *) reqType extraMap: (NSMutableDictionary *) extraMap; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (NSString *) threadId; -- (void) setThreadId: (NSString *) threadId; -#endif -- (BOOL) threadIdIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableArray *) timPBeanList; -- (void) setTimPBeanList: (NSMutableArray *) timPBeanList; -#endif -- (BOOL) timPBeanListIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) reqType; -- (void) setReqType: (NSString *) reqType; -#endif -- (BOOL) reqTypeIsSet; - -#if !__has_feature(objc_arc) -- (NSMutableDictionary *) extraMap; -- (void) setExtraMap: (NSMutableDictionary *) extraMap; -#endif -- (BOOL) extraMapIsSet; - -@end - -@interface TimPropertyBean : NSObject { - NSString * __threadId; - NSString * __interflow; - NSString * __tls; - - BOOL __threadId_isset; - BOOL __interflow_isset; - BOOL __tls_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=threadId, setter=setThreadId:) NSString * threadId; -@property (nonatomic, retain, getter=interflow, setter=setInterflow:) NSString * interflow; -@property (nonatomic, retain, getter=tls, setter=setTls:) NSString * tls; -#endif - -- (id) init; -- (id) initWithThreadId: (NSString *) threadId interflow: (NSString *) interflow tls: (NSString *) tls; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (NSString *) threadId; -- (void) setThreadId: (NSString *) threadId; -#endif -- (BOOL) threadIdIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) interflow; -- (void) setInterflow: (NSString *) interflow; -#endif -- (BOOL) interflowIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) tls; -- (void) setTls: (NSString *) tls; -#endif -- (BOOL) tlsIsSet; - -@end - -@protocol ITim -- (void) timStream: (TimParam *) param; // throws TException -- (void) timStarttls; // throws TException -- (void) timLogin: (Tid *) tid pwd: (NSString *) pwd; // throws TException -- (void) timAck: (TimAckBean *) ab; // throws TException -- (void) timPresence: (TimPBean *) pbean; // throws TException -- (void) timMessage: (TimMBean *) mbean; // throws TException -- (void) timPing: (NSString *) threadId; // throws TException -- (void) timError: (TimError *) e; // throws TException -- (void) timLogout; // throws TException -- (void) timRegist: (Tid *) tid auth: (NSString *) auth; // throws TException -- (void) timRoser: (TimRoster *) roster; // throws TException -- (void) timMessageList: (TimMBeanList *) mbeanList; // throws TException -- (void) timPresenceList: (TimPBeanList *) pbeanList; // throws TException -- (void) timMessageIq: (TimMessageIq *) timMsgIq iqType: (NSString *) iqType; // throws TException -- (void) timMessageResult: (TimMBean *) mbean; // throws TException -- (void) timProperty: (TimPropertyBean *) tpb; // throws TException -- (TimRemoteUserBean *) timRemoteUserAuth: (Tid *) tid pwd: (NSString *) pwd auth: (TimAuth *) auth; // throws TException -- (TimRemoteUserBean *) timRemoteUserGet: (Tid *) tid auth: (TimAuth *) auth; // throws TException -- (TimRemoteUserBean *) timRemoteUserEdit: (Tid *) tid ub: (TimUserBean *) ub auth: (TimAuth *) auth; // throws TException -- (TimResponseBean *) timResponsePresence: (TimPBean *) pbean auth: (TimAuth *) auth; // throws TException -- (TimResponseBean *) timResponseMessage: (TimMBean *) mbean auth: (TimAuth *) auth; // throws TException -- (TimMBeanList *) timResponseMessageIq: (TimMessageIq *) timMsgIq iqType: (NSString *) iqType auth: (TimAuth *) auth; // throws TException -- (TimResponseBean *) timResponsePresenceList: (TimPBeanList *) pbeanList auth: (TimAuth *) auth; // throws TException -- (TimResponseBean *) timResponseMessageList: (TimMBeanList *) mbeanList auth: (TimAuth *) auth; // throws TException -@end - -@interface ITimClient : TBaseClient - (id) initWithProtocol: (id ) protocol; -- (id) initWithInProtocol: (id ) inProtocol outProtocol: (id ) outProtocol; -@end - -@interface ITimProcessor : NSObject { - id mService; - NSDictionary * mMethodMap; -} -- (id) initWithITim: (id ) service; -- (id) service; -@end - -@interface timConstants : NSObject { -} -+ (int32_t) protocolversion; -+ (NSString *) protocolversionName; -+ (NSString *) TIM_SC_SUCCESS; -+ (NSString *) TIM_SC_FAILED; -@end diff --git a/protocols/gen-cocoa/tim.m b/protocols/gen-cocoa/tim.m deleted file mode 100644 index e479c0f..0000000 --- a/protocols/gen-cocoa/tim.m +++ /dev/null @@ -1,18677 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ - -#import - -#import "TProtocol.h" -#import "TApplicationException.h" -#import "TProtocolException.h" -#import "TProtocolUtil.h" -#import "TProcessor.h" -#import "TObjective-C.h" -#import "TBase.h" -#import "TAsyncTransport.h" -#import "TProtocolFactory.h" -#import "TBaseClient.h" - - -#import "tim.h" - -@implementation TimError - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithErrCode: (int32_t) errCode errMsg: (NSString *) errMsg -{ - self = [super init]; - __errCode = errCode; - __errCode_isset = YES; - __errMsg = [errMsg retain_stub]; - __errMsg_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"errCode"]) - { - __errCode = [decoder decodeInt32ForKey: @"errCode"]; - __errCode_isset = YES; - } - if ([decoder containsValueForKey: @"errMsg"]) - { - __errMsg = [[decoder decodeObjectForKey: @"errMsg"] retain_stub]; - __errMsg_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__errCode_isset) - { - [encoder encodeInt32: __errCode forKey: @"errCode"]; - } - if (__errMsg_isset) - { - [encoder encodeObject: __errMsg forKey: @"errMsg"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __errCode_isset ? 2654435761 : 0; - if (__errCode_isset) - { - hash = (hash * 31) ^ [@(__errCode) hash]; - } - hash = (hash * 31) ^ __errMsg_isset ? 2654435761 : 0; - if (__errMsg_isset) - { - hash = (hash * 31) ^ [__errMsg hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimError class]]) { - return NO; - } - TimError *other = (TimError *)anObject; - if ((__errCode_isset != other->__errCode_isset) || - (__errCode_isset && (__errCode != other->__errCode))) { - return NO; - } - if ((__errMsg_isset != other->__errMsg_isset) || - (__errMsg_isset && ((__errMsg || other->__errMsg) && ![__errMsg isEqual:other->__errMsg]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__errMsg release_stub]; - [super dealloc_stub]; -} - -- (int32_t) errCode { - return __errCode; -} - -- (void) setErrCode: (int32_t) errCode { - __errCode = errCode; - __errCode_isset = YES; -} - -- (BOOL) errCodeIsSet { - return __errCode_isset; -} - -- (void) unsetErrCode { - __errCode_isset = NO; -} - -- (NSString *) errMsg { - return [[__errMsg retain_stub] autorelease_stub]; -} - -- (void) setErrMsg: (NSString *) errMsg { - [errMsg retain_stub]; - [__errMsg release_stub]; - __errMsg = errMsg; - __errMsg_isset = YES; -} - -- (BOOL) errMsgIsSet { - return __errMsg_isset; -} - -- (void) unsetErrMsg { - [__errMsg release_stub]; - __errMsg = nil; - __errMsg_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_I32) { - int32_t fieldValue = [inProtocol readI32]; - [self setErrCode: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setErrMsg: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimError"]; - if (__errCode_isset) { - [outProtocol writeFieldBeginWithName: @"errCode" type: TType_I32 fieldID: 1]; - [outProtocol writeI32: __errCode]; - [outProtocol writeFieldEnd]; - } - if (__errMsg_isset) { - if (__errMsg != nil) { - [outProtocol writeFieldBeginWithName: @"errMsg" type: TType_STRING fieldID: 2]; - [outProtocol writeString: __errMsg]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimError("]; - [ms appendString: @"errCode:"]; - [ms appendFormat: @"%i", __errCode]; - [ms appendString: @",errMsg:"]; - [ms appendFormat: @"\"%@\"", __errMsg]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation TimNode - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithKey: (NSString *) key value: (NSString *) value -{ - self = [super init]; - __key = [key retain_stub]; - __key_isset = YES; - __value = [value retain_stub]; - __value_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"key"]) - { - __key = [[decoder decodeObjectForKey: @"key"] retain_stub]; - __key_isset = YES; - } - if ([decoder containsValueForKey: @"value"]) - { - __value = [[decoder decodeObjectForKey: @"value"] retain_stub]; - __value_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__key_isset) - { - [encoder encodeObject: __key forKey: @"key"]; - } - if (__value_isset) - { - [encoder encodeObject: __value forKey: @"value"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __key_isset ? 2654435761 : 0; - if (__key_isset) - { - hash = (hash * 31) ^ [__key hash]; - } - hash = (hash * 31) ^ __value_isset ? 2654435761 : 0; - if (__value_isset) - { - hash = (hash * 31) ^ [__value hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimNode class]]) { - return NO; - } - TimNode *other = (TimNode *)anObject; - if ((__key_isset != other->__key_isset) || - (__key_isset && ((__key || other->__key) && ![__key isEqual:other->__key]))) { - return NO; - } - if ((__value_isset != other->__value_isset) || - (__value_isset && ((__value || other->__value) && ![__value isEqual:other->__value]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__key release_stub]; - [__value release_stub]; - [super dealloc_stub]; -} - -- (NSString *) key { - return [[__key retain_stub] autorelease_stub]; -} - -- (void) setKey: (NSString *) key { - [key retain_stub]; - [__key release_stub]; - __key = key; - __key_isset = YES; -} - -- (BOOL) keyIsSet { - return __key_isset; -} - -- (void) unsetKey { - [__key release_stub]; - __key = nil; - __key_isset = NO; -} - -- (NSString *) value { - return [[__value retain_stub] autorelease_stub]; -} - -- (void) setValue: (NSString *) value { - [value retain_stub]; - [__value release_stub]; - __value = value; - __value_isset = YES; -} - -- (BOOL) valueIsSet { - return __value_isset; -} - -- (void) unsetValue { - [__value release_stub]; - __value = nil; - __value_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setKey: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setValue: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimNode"]; - if (__key_isset) { - if (__key != nil) { - [outProtocol writeFieldBeginWithName: @"key" type: TType_STRING fieldID: 1]; - [outProtocol writeString: __key]; - [outProtocol writeFieldEnd]; - } - } - if (__value_isset) { - if (__value != nil) { - [outProtocol writeFieldBeginWithName: @"value" type: TType_STRING fieldID: 2]; - [outProtocol writeString: __value]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimNode("]; - [ms appendString: @"key:"]; - [ms appendFormat: @"\"%@\"", __key]; - [ms appendString: @",value:"]; - [ms appendFormat: @"\"%@\"", __value]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation TimAckBean - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithId: (NSString *) id ackType: (NSString *) ackType ackStatus: (NSString *) ackStatus extraList: (NSMutableArray *) extraList err: (TimError *) err extraMap: (NSMutableDictionary *) extraMap -{ - self = [super init]; - __id = [id retain_stub]; - __id_isset = YES; - __ackType = [ackType retain_stub]; - __ackType_isset = YES; - __ackStatus = [ackStatus retain_stub]; - __ackStatus_isset = YES; - __extraList = [extraList retain_stub]; - __extraList_isset = YES; - __err = [err retain_stub]; - __err_isset = YES; - __extraMap = [extraMap retain_stub]; - __extraMap_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"id"]) - { - __id = [[decoder decodeObjectForKey: @"id"] retain_stub]; - __id_isset = YES; - } - if ([decoder containsValueForKey: @"ackType"]) - { - __ackType = [[decoder decodeObjectForKey: @"ackType"] retain_stub]; - __ackType_isset = YES; - } - if ([decoder containsValueForKey: @"ackStatus"]) - { - __ackStatus = [[decoder decodeObjectForKey: @"ackStatus"] retain_stub]; - __ackStatus_isset = YES; - } - if ([decoder containsValueForKey: @"extraList"]) - { - __extraList = [[decoder decodeObjectForKey: @"extraList"] retain_stub]; - __extraList_isset = YES; - } - if ([decoder containsValueForKey: @"err"]) - { - __err = [[decoder decodeObjectForKey: @"err"] retain_stub]; - __err_isset = YES; - } - if ([decoder containsValueForKey: @"extraMap"]) - { - __extraMap = [[decoder decodeObjectForKey: @"extraMap"] retain_stub]; - __extraMap_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__id_isset) - { - [encoder encodeObject: __id forKey: @"id"]; - } - if (__ackType_isset) - { - [encoder encodeObject: __ackType forKey: @"ackType"]; - } - if (__ackStatus_isset) - { - [encoder encodeObject: __ackStatus forKey: @"ackStatus"]; - } - if (__extraList_isset) - { - [encoder encodeObject: __extraList forKey: @"extraList"]; - } - if (__err_isset) - { - [encoder encodeObject: __err forKey: @"err"]; - } - if (__extraMap_isset) - { - [encoder encodeObject: __extraMap forKey: @"extraMap"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __id_isset ? 2654435761 : 0; - if (__id_isset) - { - hash = (hash * 31) ^ [__id hash]; - } - hash = (hash * 31) ^ __ackType_isset ? 2654435761 : 0; - if (__ackType_isset) - { - hash = (hash * 31) ^ [__ackType hash]; - } - hash = (hash * 31) ^ __ackStatus_isset ? 2654435761 : 0; - if (__ackStatus_isset) - { - hash = (hash * 31) ^ [__ackStatus hash]; - } - hash = (hash * 31) ^ __extraList_isset ? 2654435761 : 0; - if (__extraList_isset) - { - hash = (hash * 31) ^ [__extraList hash]; - } - hash = (hash * 31) ^ __err_isset ? 2654435761 : 0; - if (__err_isset) - { - hash = (hash * 31) ^ [__err hash]; - } - hash = (hash * 31) ^ __extraMap_isset ? 2654435761 : 0; - if (__extraMap_isset) - { - hash = (hash * 31) ^ [__extraMap hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimAckBean class]]) { - return NO; - } - TimAckBean *other = (TimAckBean *)anObject; - if ((__id_isset != other->__id_isset) || - (__id_isset && ((__id || other->__id) && ![__id isEqual:other->__id]))) { - return NO; - } - if ((__ackType_isset != other->__ackType_isset) || - (__ackType_isset && ((__ackType || other->__ackType) && ![__ackType isEqual:other->__ackType]))) { - return NO; - } - if ((__ackStatus_isset != other->__ackStatus_isset) || - (__ackStatus_isset && ((__ackStatus || other->__ackStatus) && ![__ackStatus isEqual:other->__ackStatus]))) { - return NO; - } - if ((__extraList_isset != other->__extraList_isset) || - (__extraList_isset && ((__extraList || other->__extraList) && ![__extraList isEqual:other->__extraList]))) { - return NO; - } - if ((__err_isset != other->__err_isset) || - (__err_isset && ((__err || other->__err) && ![__err isEqual:other->__err]))) { - return NO; - } - if ((__extraMap_isset != other->__extraMap_isset) || - (__extraMap_isset && ((__extraMap || other->__extraMap) && ![__extraMap isEqual:other->__extraMap]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__id release_stub]; - [__ackType release_stub]; - [__ackStatus release_stub]; - [__extraList release_stub]; - [__err release_stub]; - [__extraMap release_stub]; - [super dealloc_stub]; -} - -- (NSString *) id { - return [[__id retain_stub] autorelease_stub]; -} - -- (void) setId: (NSString *) id { - [id retain_stub]; - [__id release_stub]; - __id = id; - __id_isset = YES; -} - -- (BOOL) idIsSet { - return __id_isset; -} - -- (void) unsetId { - [__id release_stub]; - __id = nil; - __id_isset = NO; -} - -- (NSString *) ackType { - return [[__ackType retain_stub] autorelease_stub]; -} - -- (void) setAckType: (NSString *) ackType { - [ackType retain_stub]; - [__ackType release_stub]; - __ackType = ackType; - __ackType_isset = YES; -} - -- (BOOL) ackTypeIsSet { - return __ackType_isset; -} - -- (void) unsetAckType { - [__ackType release_stub]; - __ackType = nil; - __ackType_isset = NO; -} - -- (NSString *) ackStatus { - return [[__ackStatus retain_stub] autorelease_stub]; -} - -- (void) setAckStatus: (NSString *) ackStatus { - [ackStatus retain_stub]; - [__ackStatus release_stub]; - __ackStatus = ackStatus; - __ackStatus_isset = YES; -} - -- (BOOL) ackStatusIsSet { - return __ackStatus_isset; -} - -- (void) unsetAckStatus { - [__ackStatus release_stub]; - __ackStatus = nil; - __ackStatus_isset = NO; -} - -- (NSMutableArray *) extraList { - return [[__extraList retain_stub] autorelease_stub]; -} - -- (void) setExtraList: (NSMutableArray *) extraList { - [extraList retain_stub]; - [__extraList release_stub]; - __extraList = extraList; - __extraList_isset = YES; -} - -- (BOOL) extraListIsSet { - return __extraList_isset; -} - -- (void) unsetExtraList { - [__extraList release_stub]; - __extraList = nil; - __extraList_isset = NO; -} - -- (TimError *) err { - return [[__err retain_stub] autorelease_stub]; -} - -- (void) setErr: (TimError *) err { - [err retain_stub]; - [__err release_stub]; - __err = err; - __err_isset = YES; -} - -- (BOOL) errIsSet { - return __err_isset; -} - -- (void) unsetErr { - [__err release_stub]; - __err = nil; - __err_isset = NO; -} - -- (NSMutableDictionary *) extraMap { - return [[__extraMap retain_stub] autorelease_stub]; -} - -- (void) setExtraMap: (NSMutableDictionary *) extraMap { - [extraMap retain_stub]; - [__extraMap release_stub]; - __extraMap = extraMap; - __extraMap_isset = YES; -} - -- (BOOL) extraMapIsSet { - return __extraMap_isset; -} - -- (void) unsetExtraMap { - [__extraMap release_stub]; - __extraMap = nil; - __extraMap_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setId: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setAckType: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setAckStatus: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 4: - if (fieldType == TType_LIST) { - int _size0; - [inProtocol readListBeginReturningElementType: NULL size: &_size0]; - NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size0]; - int _i1; - for (_i1 = 0; _i1 < _size0; ++_i1) - { - TimNode *_elem2 = [[TimNode alloc] init]; - [_elem2 read: inProtocol]; - [fieldValue addObject: _elem2]; - [_elem2 release_stub]; - } - [inProtocol readListEnd]; - [self setExtraList: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 5: - if (fieldType == TType_STRUCT) { - TimError *fieldValue = [[TimError alloc] init]; - [fieldValue read: inProtocol]; - [self setErr: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 6: - if (fieldType == TType_MAP) { - int _size3; - [inProtocol readMapBeginReturningKeyType: NULL valueType: NULL size: &_size3]; - NSMutableDictionary * fieldValue = [[NSMutableDictionary alloc] initWithCapacity: _size3]; - int _i4; - for (_i4 = 0; _i4 < _size3; ++_i4) - { - NSString * _key5 = [inProtocol readString]; - NSString * _val6 = [inProtocol readString]; - [fieldValue setObject: _val6 forKey: _key5]; - } - [inProtocol readMapEnd]; - [self setExtraMap: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimAckBean"]; - if (__id_isset) { - if (__id != nil) { - [outProtocol writeFieldBeginWithName: @"id" type: TType_STRING fieldID: 1]; - [outProtocol writeString: __id]; - [outProtocol writeFieldEnd]; - } - } - if (__ackType_isset) { - if (__ackType != nil) { - [outProtocol writeFieldBeginWithName: @"ackType" type: TType_STRING fieldID: 2]; - [outProtocol writeString: __ackType]; - [outProtocol writeFieldEnd]; - } - } - if (__ackStatus_isset) { - if (__ackStatus != nil) { - [outProtocol writeFieldBeginWithName: @"ackStatus" type: TType_STRING fieldID: 3]; - [outProtocol writeString: __ackStatus]; - [outProtocol writeFieldEnd]; - } - } - if (__extraList_isset) { - if (__extraList != nil) { - [outProtocol writeFieldBeginWithName: @"extraList" type: TType_LIST fieldID: 4]; - { - [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__extraList count]]; - int idx8; - for (idx8 = 0; idx8 < [__extraList count]; idx8++) - { - [[__extraList objectAtIndex: idx8] write: outProtocol]; - } - [outProtocol writeListEnd]; - } - [outProtocol writeFieldEnd]; - } - } - if (__err_isset) { - if (__err != nil) { - [outProtocol writeFieldBeginWithName: @"err" type: TType_STRUCT fieldID: 5]; - [__err write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__extraMap_isset) { - if (__extraMap != nil) { - [outProtocol writeFieldBeginWithName: @"extraMap" type: TType_MAP fieldID: 6]; - { - [outProtocol writeMapBeginWithKeyType: TType_STRING valueType: TType_STRING size: [__extraMap count]]; - NSEnumerator * _iter9 = [__extraMap keyEnumerator]; - id key10; - while ((key10 = [_iter9 nextObject])) - { - [outProtocol writeString: key10]; - [outProtocol writeString: [__extraMap objectForKey: key10]]; - } - [outProtocol writeMapEnd]; - } - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimAckBean("]; - [ms appendString: @"id:"]; - [ms appendFormat: @"\"%@\"", __id]; - [ms appendString: @",ackType:"]; - [ms appendFormat: @"\"%@\"", __ackType]; - [ms appendString: @",ackStatus:"]; - [ms appendFormat: @"\"%@\"", __ackStatus]; - [ms appendString: @",extraList:"]; - [ms appendFormat: @"%@", __extraList]; - [ms appendString: @",err:"]; - [ms appendFormat: @"%@", __err]; - [ms appendString: @",extraMap:"]; - [ms appendFormat: @"%@", __extraMap]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation TimHBean - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithChl: (int32_t) chl platform: (int32_t) platform version: (int16_t) version -{ - self = [super init]; - __chl = chl; - __chl_isset = YES; - __platform = platform; - __platform_isset = YES; - __version = version; - __version_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"chl"]) - { - __chl = [decoder decodeInt32ForKey: @"chl"]; - __chl_isset = YES; - } - if ([decoder containsValueForKey: @"platform"]) - { - __platform = [decoder decodeInt32ForKey: @"platform"]; - __platform_isset = YES; - } - if ([decoder containsValueForKey: @"version"]) - { - __version = [decoder decodeIntForKey: @"version"]; - __version_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__chl_isset) - { - [encoder encodeInt32: __chl forKey: @"chl"]; - } - if (__platform_isset) - { - [encoder encodeInt32: __platform forKey: @"platform"]; - } - if (__version_isset) - { - [encoder encodeInt: __version forKey: @"version"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __chl_isset ? 2654435761 : 0; - if (__chl_isset) - { - hash = (hash * 31) ^ [@(__chl) hash]; - } - hash = (hash * 31) ^ __platform_isset ? 2654435761 : 0; - if (__platform_isset) - { - hash = (hash * 31) ^ [@(__platform) hash]; - } - hash = (hash * 31) ^ __version_isset ? 2654435761 : 0; - if (__version_isset) - { - hash = (hash * 31) ^ [@(__version) hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimHBean class]]) { - return NO; - } - TimHBean *other = (TimHBean *)anObject; - if ((__chl_isset != other->__chl_isset) || - (__chl_isset && (__chl != other->__chl))) { - return NO; - } - if ((__platform_isset != other->__platform_isset) || - (__platform_isset && (__platform != other->__platform))) { - return NO; - } - if ((__version_isset != other->__version_isset) || - (__version_isset && (__version != other->__version))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [super dealloc_stub]; -} - -- (int32_t) chl { - return __chl; -} - -- (void) setChl: (int32_t) chl { - __chl = chl; - __chl_isset = YES; -} - -- (BOOL) chlIsSet { - return __chl_isset; -} - -- (void) unsetChl { - __chl_isset = NO; -} - -- (int32_t) platform { - return __platform; -} - -- (void) setPlatform: (int32_t) platform { - __platform = platform; - __platform_isset = YES; -} - -- (BOOL) platformIsSet { - return __platform_isset; -} - -- (void) unsetPlatform { - __platform_isset = NO; -} - -- (int16_t) version { - return __version; -} - -- (void) setVersion: (int16_t) version { - __version = version; - __version_isset = YES; -} - -- (BOOL) versionIsSet { - return __version_isset; -} - -- (void) unsetVersion { - __version_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_I32) { - int32_t fieldValue = [inProtocol readI32]; - [self setChl: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_I32) { - int32_t fieldValue = [inProtocol readI32]; - [self setPlatform: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_I16) { - int16_t fieldValue = [inProtocol readI16]; - [self setVersion: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimHBean"]; - if (__chl_isset) { - [outProtocol writeFieldBeginWithName: @"chl" type: TType_I32 fieldID: 1]; - [outProtocol writeI32: __chl]; - [outProtocol writeFieldEnd]; - } - if (__platform_isset) { - [outProtocol writeFieldBeginWithName: @"platform" type: TType_I32 fieldID: 2]; - [outProtocol writeI32: __platform]; - [outProtocol writeFieldEnd]; - } - if (__version_isset) { - [outProtocol writeFieldBeginWithName: @"version" type: TType_I16 fieldID: 3]; - [outProtocol writeI16: __version]; - [outProtocol writeFieldEnd]; - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields - if (!__chl_isset) { - @throw [TProtocolException exceptionWithName: @"TProtocolException" - reason: @"Required field 'chl' is not set."]; - } - if (!__version_isset) { - @throw [TProtocolException exceptionWithName: @"TProtocolException" - reason: @"Required field 'version' is not set."]; - } -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimHBean("]; - [ms appendString: @"chl:"]; - [ms appendFormat: @"%i", __chl]; - [ms appendString: @",platform:"]; - [ms appendFormat: @"%i", __platform]; - [ms appendString: @",version:"]; - [ms appendFormat: @"%hi", __version]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation TimParam - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithTimestamp: (NSString *) timestamp version: (int16_t) version lang: (NSString *) lang extraList: (NSMutableArray *) extraList extraMap: (NSMutableDictionary *) extraMap interflow: (NSString *) interflow tls: (NSString *) tls -{ - self = [super init]; - __timestamp = [timestamp retain_stub]; - __timestamp_isset = YES; - __version = version; - __version_isset = YES; - __lang = [lang retain_stub]; - __lang_isset = YES; - __extraList = [extraList retain_stub]; - __extraList_isset = YES; - __extraMap = [extraMap retain_stub]; - __extraMap_isset = YES; - __interflow = [interflow retain_stub]; - __interflow_isset = YES; - __tls = [tls retain_stub]; - __tls_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"timestamp"]) - { - __timestamp = [[decoder decodeObjectForKey: @"timestamp"] retain_stub]; - __timestamp_isset = YES; - } - if ([decoder containsValueForKey: @"version"]) - { - __version = [decoder decodeIntForKey: @"version"]; - __version_isset = YES; - } - if ([decoder containsValueForKey: @"lang"]) - { - __lang = [[decoder decodeObjectForKey: @"lang"] retain_stub]; - __lang_isset = YES; - } - if ([decoder containsValueForKey: @"extraList"]) - { - __extraList = [[decoder decodeObjectForKey: @"extraList"] retain_stub]; - __extraList_isset = YES; - } - if ([decoder containsValueForKey: @"extraMap"]) - { - __extraMap = [[decoder decodeObjectForKey: @"extraMap"] retain_stub]; - __extraMap_isset = YES; - } - if ([decoder containsValueForKey: @"interflow"]) - { - __interflow = [[decoder decodeObjectForKey: @"interflow"] retain_stub]; - __interflow_isset = YES; - } - if ([decoder containsValueForKey: @"tls"]) - { - __tls = [[decoder decodeObjectForKey: @"tls"] retain_stub]; - __tls_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__timestamp_isset) - { - [encoder encodeObject: __timestamp forKey: @"timestamp"]; - } - if (__version_isset) - { - [encoder encodeInt: __version forKey: @"version"]; - } - if (__lang_isset) - { - [encoder encodeObject: __lang forKey: @"lang"]; - } - if (__extraList_isset) - { - [encoder encodeObject: __extraList forKey: @"extraList"]; - } - if (__extraMap_isset) - { - [encoder encodeObject: __extraMap forKey: @"extraMap"]; - } - if (__interflow_isset) - { - [encoder encodeObject: __interflow forKey: @"interflow"]; - } - if (__tls_isset) - { - [encoder encodeObject: __tls forKey: @"tls"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __timestamp_isset ? 2654435761 : 0; - if (__timestamp_isset) - { - hash = (hash * 31) ^ [__timestamp hash]; - } - hash = (hash * 31) ^ __version_isset ? 2654435761 : 0; - if (__version_isset) - { - hash = (hash * 31) ^ [@(__version) hash]; - } - hash = (hash * 31) ^ __lang_isset ? 2654435761 : 0; - if (__lang_isset) - { - hash = (hash * 31) ^ [__lang hash]; - } - hash = (hash * 31) ^ __extraList_isset ? 2654435761 : 0; - if (__extraList_isset) - { - hash = (hash * 31) ^ [__extraList hash]; - } - hash = (hash * 31) ^ __extraMap_isset ? 2654435761 : 0; - if (__extraMap_isset) - { - hash = (hash * 31) ^ [__extraMap hash]; - } - hash = (hash * 31) ^ __interflow_isset ? 2654435761 : 0; - if (__interflow_isset) - { - hash = (hash * 31) ^ [__interflow hash]; - } - hash = (hash * 31) ^ __tls_isset ? 2654435761 : 0; - if (__tls_isset) - { - hash = (hash * 31) ^ [__tls hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimParam class]]) { - return NO; - } - TimParam *other = (TimParam *)anObject; - if ((__timestamp_isset != other->__timestamp_isset) || - (__timestamp_isset && ((__timestamp || other->__timestamp) && ![__timestamp isEqual:other->__timestamp]))) { - return NO; - } - if ((__version_isset != other->__version_isset) || - (__version_isset && (__version != other->__version))) { - return NO; - } - if ((__lang_isset != other->__lang_isset) || - (__lang_isset && ((__lang || other->__lang) && ![__lang isEqual:other->__lang]))) { - return NO; - } - if ((__extraList_isset != other->__extraList_isset) || - (__extraList_isset && ((__extraList || other->__extraList) && ![__extraList isEqual:other->__extraList]))) { - return NO; - } - if ((__extraMap_isset != other->__extraMap_isset) || - (__extraMap_isset && ((__extraMap || other->__extraMap) && ![__extraMap isEqual:other->__extraMap]))) { - return NO; - } - if ((__interflow_isset != other->__interflow_isset) || - (__interflow_isset && ((__interflow || other->__interflow) && ![__interflow isEqual:other->__interflow]))) { - return NO; - } - if ((__tls_isset != other->__tls_isset) || - (__tls_isset && ((__tls || other->__tls) && ![__tls isEqual:other->__tls]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__timestamp release_stub]; - [__lang release_stub]; - [__extraList release_stub]; - [__extraMap release_stub]; - [__interflow release_stub]; - [__tls release_stub]; - [super dealloc_stub]; -} - -- (NSString *) timestamp { - return [[__timestamp retain_stub] autorelease_stub]; -} - -- (void) setTimestamp: (NSString *) timestamp { - [timestamp retain_stub]; - [__timestamp release_stub]; - __timestamp = timestamp; - __timestamp_isset = YES; -} - -- (BOOL) timestampIsSet { - return __timestamp_isset; -} - -- (void) unsetTimestamp { - [__timestamp release_stub]; - __timestamp = nil; - __timestamp_isset = NO; -} - -- (int16_t) version { - return __version; -} - -- (void) setVersion: (int16_t) version { - __version = version; - __version_isset = YES; -} - -- (BOOL) versionIsSet { - return __version_isset; -} - -- (void) unsetVersion { - __version_isset = NO; -} - -- (NSString *) lang { - return [[__lang retain_stub] autorelease_stub]; -} - -- (void) setLang: (NSString *) lang { - [lang retain_stub]; - [__lang release_stub]; - __lang = lang; - __lang_isset = YES; -} - -- (BOOL) langIsSet { - return __lang_isset; -} - -- (void) unsetLang { - [__lang release_stub]; - __lang = nil; - __lang_isset = NO; -} - -- (NSMutableArray *) extraList { - return [[__extraList retain_stub] autorelease_stub]; -} - -- (void) setExtraList: (NSMutableArray *) extraList { - [extraList retain_stub]; - [__extraList release_stub]; - __extraList = extraList; - __extraList_isset = YES; -} - -- (BOOL) extraListIsSet { - return __extraList_isset; -} - -- (void) unsetExtraList { - [__extraList release_stub]; - __extraList = nil; - __extraList_isset = NO; -} - -- (NSMutableDictionary *) extraMap { - return [[__extraMap retain_stub] autorelease_stub]; -} - -- (void) setExtraMap: (NSMutableDictionary *) extraMap { - [extraMap retain_stub]; - [__extraMap release_stub]; - __extraMap = extraMap; - __extraMap_isset = YES; -} - -- (BOOL) extraMapIsSet { - return __extraMap_isset; -} - -- (void) unsetExtraMap { - [__extraMap release_stub]; - __extraMap = nil; - __extraMap_isset = NO; -} - -- (NSString *) interflow { - return [[__interflow retain_stub] autorelease_stub]; -} - -- (void) setInterflow: (NSString *) interflow { - [interflow retain_stub]; - [__interflow release_stub]; - __interflow = interflow; - __interflow_isset = YES; -} - -- (BOOL) interflowIsSet { - return __interflow_isset; -} - -- (void) unsetInterflow { - [__interflow release_stub]; - __interflow = nil; - __interflow_isset = NO; -} - -- (NSString *) tls { - return [[__tls retain_stub] autorelease_stub]; -} - -- (void) setTls: (NSString *) tls { - [tls retain_stub]; - [__tls release_stub]; - __tls = tls; - __tls_isset = YES; -} - -- (BOOL) tlsIsSet { - return __tls_isset; -} - -- (void) unsetTls { - [__tls release_stub]; - __tls = nil; - __tls_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setTimestamp: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_I16) { - int16_t fieldValue = [inProtocol readI16]; - [self setVersion: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setLang: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 4: - if (fieldType == TType_LIST) { - int _size11; - [inProtocol readListBeginReturningElementType: NULL size: &_size11]; - NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size11]; - int _i12; - for (_i12 = 0; _i12 < _size11; ++_i12) - { - TimNode *_elem13 = [[TimNode alloc] init]; - [_elem13 read: inProtocol]; - [fieldValue addObject: _elem13]; - [_elem13 release_stub]; - } - [inProtocol readListEnd]; - [self setExtraList: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 5: - if (fieldType == TType_MAP) { - int _size14; - [inProtocol readMapBeginReturningKeyType: NULL valueType: NULL size: &_size14]; - NSMutableDictionary * fieldValue = [[NSMutableDictionary alloc] initWithCapacity: _size14]; - int _i15; - for (_i15 = 0; _i15 < _size14; ++_i15) - { - NSString * _key16 = [inProtocol readString]; - NSString * _val17 = [inProtocol readString]; - [fieldValue setObject: _val17 forKey: _key16]; - } - [inProtocol readMapEnd]; - [self setExtraMap: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 6: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setInterflow: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 7: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setTls: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimParam"]; - if (__timestamp_isset) { - if (__timestamp != nil) { - [outProtocol writeFieldBeginWithName: @"timestamp" type: TType_STRING fieldID: 1]; - [outProtocol writeString: __timestamp]; - [outProtocol writeFieldEnd]; - } - } - if (__version_isset) { - [outProtocol writeFieldBeginWithName: @"version" type: TType_I16 fieldID: 2]; - [outProtocol writeI16: __version]; - [outProtocol writeFieldEnd]; - } - if (__lang_isset) { - if (__lang != nil) { - [outProtocol writeFieldBeginWithName: @"lang" type: TType_STRING fieldID: 3]; - [outProtocol writeString: __lang]; - [outProtocol writeFieldEnd]; - } - } - if (__extraList_isset) { - if (__extraList != nil) { - [outProtocol writeFieldBeginWithName: @"extraList" type: TType_LIST fieldID: 4]; - { - [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__extraList count]]; - int idx19; - for (idx19 = 0; idx19 < [__extraList count]; idx19++) - { - [[__extraList objectAtIndex: idx19] write: outProtocol]; - } - [outProtocol writeListEnd]; - } - [outProtocol writeFieldEnd]; - } - } - if (__extraMap_isset) { - if (__extraMap != nil) { - [outProtocol writeFieldBeginWithName: @"extraMap" type: TType_MAP fieldID: 5]; - { - [outProtocol writeMapBeginWithKeyType: TType_STRING valueType: TType_STRING size: [__extraMap count]]; - NSEnumerator * _iter20 = [__extraMap keyEnumerator]; - id key21; - while ((key21 = [_iter20 nextObject])) - { - [outProtocol writeString: key21]; - [outProtocol writeString: [__extraMap objectForKey: key21]]; - } - [outProtocol writeMapEnd]; - } - [outProtocol writeFieldEnd]; - } - } - if (__interflow_isset) { - if (__interflow != nil) { - [outProtocol writeFieldBeginWithName: @"interflow" type: TType_STRING fieldID: 6]; - [outProtocol writeString: __interflow]; - [outProtocol writeFieldEnd]; - } - } - if (__tls_isset) { - if (__tls != nil) { - [outProtocol writeFieldBeginWithName: @"tls" type: TType_STRING fieldID: 7]; - [outProtocol writeString: __tls]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimParam("]; - [ms appendString: @"timestamp:"]; - [ms appendFormat: @"\"%@\"", __timestamp]; - [ms appendString: @",version:"]; - [ms appendFormat: @"%hi", __version]; - [ms appendString: @",lang:"]; - [ms appendFormat: @"\"%@\"", __lang]; - [ms appendString: @",extraList:"]; - [ms appendFormat: @"%@", __extraList]; - [ms appendString: @",extraMap:"]; - [ms appendFormat: @"%@", __extraMap]; - [ms appendString: @",interflow:"]; - [ms appendFormat: @"\"%@\"", __interflow]; - [ms appendString: @",tls:"]; - [ms appendFormat: @"\"%@\"", __tls]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation TimTime - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithTimestamp: (NSString *) timestamp formattime: (NSString *) formattime -{ - self = [super init]; - __timestamp = [timestamp retain_stub]; - __timestamp_isset = YES; - __formattime = [formattime retain_stub]; - __formattime_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"timestamp"]) - { - __timestamp = [[decoder decodeObjectForKey: @"timestamp"] retain_stub]; - __timestamp_isset = YES; - } - if ([decoder containsValueForKey: @"formattime"]) - { - __formattime = [[decoder decodeObjectForKey: @"formattime"] retain_stub]; - __formattime_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__timestamp_isset) - { - [encoder encodeObject: __timestamp forKey: @"timestamp"]; - } - if (__formattime_isset) - { - [encoder encodeObject: __formattime forKey: @"formattime"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __timestamp_isset ? 2654435761 : 0; - if (__timestamp_isset) - { - hash = (hash * 31) ^ [__timestamp hash]; - } - hash = (hash * 31) ^ __formattime_isset ? 2654435761 : 0; - if (__formattime_isset) - { - hash = (hash * 31) ^ [__formattime hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimTime class]]) { - return NO; - } - TimTime *other = (TimTime *)anObject; - if ((__timestamp_isset != other->__timestamp_isset) || - (__timestamp_isset && ((__timestamp || other->__timestamp) && ![__timestamp isEqual:other->__timestamp]))) { - return NO; - } - if ((__formattime_isset != other->__formattime_isset) || - (__formattime_isset && ((__formattime || other->__formattime) && ![__formattime isEqual:other->__formattime]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__timestamp release_stub]; - [__formattime release_stub]; - [super dealloc_stub]; -} - -- (NSString *) timestamp { - return [[__timestamp retain_stub] autorelease_stub]; -} - -- (void) setTimestamp: (NSString *) timestamp { - [timestamp retain_stub]; - [__timestamp release_stub]; - __timestamp = timestamp; - __timestamp_isset = YES; -} - -- (BOOL) timestampIsSet { - return __timestamp_isset; -} - -- (void) unsetTimestamp { - [__timestamp release_stub]; - __timestamp = nil; - __timestamp_isset = NO; -} - -- (NSString *) formattime { - return [[__formattime retain_stub] autorelease_stub]; -} - -- (void) setFormattime: (NSString *) formattime { - [formattime retain_stub]; - [__formattime release_stub]; - __formattime = formattime; - __formattime_isset = YES; -} - -- (BOOL) formattimeIsSet { - return __formattime_isset; -} - -- (void) unsetFormattime { - [__formattime release_stub]; - __formattime = nil; - __formattime_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setTimestamp: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setFormattime: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimTime"]; - if (__timestamp_isset) { - if (__timestamp != nil) { - [outProtocol writeFieldBeginWithName: @"timestamp" type: TType_STRING fieldID: 1]; - [outProtocol writeString: __timestamp]; - [outProtocol writeFieldEnd]; - } - } - if (__formattime_isset) { - if (__formattime != nil) { - [outProtocol writeFieldBeginWithName: @"formattime" type: TType_STRING fieldID: 2]; - [outProtocol writeString: __formattime]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimTime("]; - [ms appendString: @"timestamp:"]; - [ms appendFormat: @"\"%@\"", __timestamp]; - [ms appendString: @",formattime:"]; - [ms appendFormat: @"\"%@\"", __formattime]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation TimArea - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithCountry: (NSString *) country province: (NSString *) province city: (NSString *) city extraList: (NSMutableArray *) extraList extraMap: (NSMutableDictionary *) extraMap -{ - self = [super init]; - __country = [country retain_stub]; - __country_isset = YES; - __province = [province retain_stub]; - __province_isset = YES; - __city = [city retain_stub]; - __city_isset = YES; - __extraList = [extraList retain_stub]; - __extraList_isset = YES; - __extraMap = [extraMap retain_stub]; - __extraMap_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"country"]) - { - __country = [[decoder decodeObjectForKey: @"country"] retain_stub]; - __country_isset = YES; - } - if ([decoder containsValueForKey: @"province"]) - { - __province = [[decoder decodeObjectForKey: @"province"] retain_stub]; - __province_isset = YES; - } - if ([decoder containsValueForKey: @"city"]) - { - __city = [[decoder decodeObjectForKey: @"city"] retain_stub]; - __city_isset = YES; - } - if ([decoder containsValueForKey: @"extraList"]) - { - __extraList = [[decoder decodeObjectForKey: @"extraList"] retain_stub]; - __extraList_isset = YES; - } - if ([decoder containsValueForKey: @"extraMap"]) - { - __extraMap = [[decoder decodeObjectForKey: @"extraMap"] retain_stub]; - __extraMap_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__country_isset) - { - [encoder encodeObject: __country forKey: @"country"]; - } - if (__province_isset) - { - [encoder encodeObject: __province forKey: @"province"]; - } - if (__city_isset) - { - [encoder encodeObject: __city forKey: @"city"]; - } - if (__extraList_isset) - { - [encoder encodeObject: __extraList forKey: @"extraList"]; - } - if (__extraMap_isset) - { - [encoder encodeObject: __extraMap forKey: @"extraMap"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __country_isset ? 2654435761 : 0; - if (__country_isset) - { - hash = (hash * 31) ^ [__country hash]; - } - hash = (hash * 31) ^ __province_isset ? 2654435761 : 0; - if (__province_isset) - { - hash = (hash * 31) ^ [__province hash]; - } - hash = (hash * 31) ^ __city_isset ? 2654435761 : 0; - if (__city_isset) - { - hash = (hash * 31) ^ [__city hash]; - } - hash = (hash * 31) ^ __extraList_isset ? 2654435761 : 0; - if (__extraList_isset) - { - hash = (hash * 31) ^ [__extraList hash]; - } - hash = (hash * 31) ^ __extraMap_isset ? 2654435761 : 0; - if (__extraMap_isset) - { - hash = (hash * 31) ^ [__extraMap hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimArea class]]) { - return NO; - } - TimArea *other = (TimArea *)anObject; - if ((__country_isset != other->__country_isset) || - (__country_isset && ((__country || other->__country) && ![__country isEqual:other->__country]))) { - return NO; - } - if ((__province_isset != other->__province_isset) || - (__province_isset && ((__province || other->__province) && ![__province isEqual:other->__province]))) { - return NO; - } - if ((__city_isset != other->__city_isset) || - (__city_isset && ((__city || other->__city) && ![__city isEqual:other->__city]))) { - return NO; - } - if ((__extraList_isset != other->__extraList_isset) || - (__extraList_isset && ((__extraList || other->__extraList) && ![__extraList isEqual:other->__extraList]))) { - return NO; - } - if ((__extraMap_isset != other->__extraMap_isset) || - (__extraMap_isset && ((__extraMap || other->__extraMap) && ![__extraMap isEqual:other->__extraMap]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__country release_stub]; - [__province release_stub]; - [__city release_stub]; - [__extraList release_stub]; - [__extraMap release_stub]; - [super dealloc_stub]; -} - -- (NSString *) country { - return [[__country retain_stub] autorelease_stub]; -} - -- (void) setCountry: (NSString *) country { - [country retain_stub]; - [__country release_stub]; - __country = country; - __country_isset = YES; -} - -- (BOOL) countryIsSet { - return __country_isset; -} - -- (void) unsetCountry { - [__country release_stub]; - __country = nil; - __country_isset = NO; -} - -- (NSString *) province { - return [[__province retain_stub] autorelease_stub]; -} - -- (void) setProvince: (NSString *) province { - [province retain_stub]; - [__province release_stub]; - __province = province; - __province_isset = YES; -} - -- (BOOL) provinceIsSet { - return __province_isset; -} - -- (void) unsetProvince { - [__province release_stub]; - __province = nil; - __province_isset = NO; -} - -- (NSString *) city { - return [[__city retain_stub] autorelease_stub]; -} - -- (void) setCity: (NSString *) city { - [city retain_stub]; - [__city release_stub]; - __city = city; - __city_isset = YES; -} - -- (BOOL) cityIsSet { - return __city_isset; -} - -- (void) unsetCity { - [__city release_stub]; - __city = nil; - __city_isset = NO; -} - -- (NSMutableArray *) extraList { - return [[__extraList retain_stub] autorelease_stub]; -} - -- (void) setExtraList: (NSMutableArray *) extraList { - [extraList retain_stub]; - [__extraList release_stub]; - __extraList = extraList; - __extraList_isset = YES; -} - -- (BOOL) extraListIsSet { - return __extraList_isset; -} - -- (void) unsetExtraList { - [__extraList release_stub]; - __extraList = nil; - __extraList_isset = NO; -} - -- (NSMutableDictionary *) extraMap { - return [[__extraMap retain_stub] autorelease_stub]; -} - -- (void) setExtraMap: (NSMutableDictionary *) extraMap { - [extraMap retain_stub]; - [__extraMap release_stub]; - __extraMap = extraMap; - __extraMap_isset = YES; -} - -- (BOOL) extraMapIsSet { - return __extraMap_isset; -} - -- (void) unsetExtraMap { - [__extraMap release_stub]; - __extraMap = nil; - __extraMap_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setCountry: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setProvince: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setCity: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 4: - if (fieldType == TType_LIST) { - int _size22; - [inProtocol readListBeginReturningElementType: NULL size: &_size22]; - NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size22]; - int _i23; - for (_i23 = 0; _i23 < _size22; ++_i23) - { - TimNode *_elem24 = [[TimNode alloc] init]; - [_elem24 read: inProtocol]; - [fieldValue addObject: _elem24]; - [_elem24 release_stub]; - } - [inProtocol readListEnd]; - [self setExtraList: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 5: - if (fieldType == TType_MAP) { - int _size25; - [inProtocol readMapBeginReturningKeyType: NULL valueType: NULL size: &_size25]; - NSMutableDictionary * fieldValue = [[NSMutableDictionary alloc] initWithCapacity: _size25]; - int _i26; - for (_i26 = 0; _i26 < _size25; ++_i26) - { - NSString * _key27 = [inProtocol readString]; - NSString * _val28 = [inProtocol readString]; - [fieldValue setObject: _val28 forKey: _key27]; - } - [inProtocol readMapEnd]; - [self setExtraMap: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimArea"]; - if (__country_isset) { - if (__country != nil) { - [outProtocol writeFieldBeginWithName: @"country" type: TType_STRING fieldID: 1]; - [outProtocol writeString: __country]; - [outProtocol writeFieldEnd]; - } - } - if (__province_isset) { - if (__province != nil) { - [outProtocol writeFieldBeginWithName: @"province" type: TType_STRING fieldID: 2]; - [outProtocol writeString: __province]; - [outProtocol writeFieldEnd]; - } - } - if (__city_isset) { - if (__city != nil) { - [outProtocol writeFieldBeginWithName: @"city" type: TType_STRING fieldID: 3]; - [outProtocol writeString: __city]; - [outProtocol writeFieldEnd]; - } - } - if (__extraList_isset) { - if (__extraList != nil) { - [outProtocol writeFieldBeginWithName: @"extraList" type: TType_LIST fieldID: 4]; - { - [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__extraList count]]; - int idx30; - for (idx30 = 0; idx30 < [__extraList count]; idx30++) - { - [[__extraList objectAtIndex: idx30] write: outProtocol]; - } - [outProtocol writeListEnd]; - } - [outProtocol writeFieldEnd]; - } - } - if (__extraMap_isset) { - if (__extraMap != nil) { - [outProtocol writeFieldBeginWithName: @"extraMap" type: TType_MAP fieldID: 5]; - { - [outProtocol writeMapBeginWithKeyType: TType_STRING valueType: TType_STRING size: [__extraMap count]]; - NSEnumerator * _iter31 = [__extraMap keyEnumerator]; - id key32; - while ((key32 = [_iter31 nextObject])) - { - [outProtocol writeString: key32]; - [outProtocol writeString: [__extraMap objectForKey: key32]]; - } - [outProtocol writeMapEnd]; - } - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimArea("]; - [ms appendString: @"country:"]; - [ms appendFormat: @"\"%@\"", __country]; - [ms appendString: @",province:"]; - [ms appendFormat: @"\"%@\"", __province]; - [ms appendString: @",city:"]; - [ms appendFormat: @"\"%@\"", __city]; - [ms appendString: @",extraList:"]; - [ms appendFormat: @"%@", __extraList]; - [ms appendString: @",extraMap:"]; - [ms appendFormat: @"%@", __extraMap]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation Tid - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithName: (NSString *) name domain: (NSString *) domain resource: (NSString *) resource type: (NSString *) type extraList: (NSMutableArray *) extraList extraMap: (NSMutableDictionary *) extraMap -{ - self = [super init]; - __name = [name retain_stub]; - __name_isset = YES; - __domain = [domain retain_stub]; - __domain_isset = YES; - __resource = [resource retain_stub]; - __resource_isset = YES; - __type = [type retain_stub]; - __type_isset = YES; - __extraList = [extraList retain_stub]; - __extraList_isset = YES; - __extraMap = [extraMap retain_stub]; - __extraMap_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"name"]) - { - __name = [[decoder decodeObjectForKey: @"name"] retain_stub]; - __name_isset = YES; - } - if ([decoder containsValueForKey: @"domain"]) - { - __domain = [[decoder decodeObjectForKey: @"domain"] retain_stub]; - __domain_isset = YES; - } - if ([decoder containsValueForKey: @"resource"]) - { - __resource = [[decoder decodeObjectForKey: @"resource"] retain_stub]; - __resource_isset = YES; - } - if ([decoder containsValueForKey: @"type"]) - { - __type = [[decoder decodeObjectForKey: @"type"] retain_stub]; - __type_isset = YES; - } - if ([decoder containsValueForKey: @"extraList"]) - { - __extraList = [[decoder decodeObjectForKey: @"extraList"] retain_stub]; - __extraList_isset = YES; - } - if ([decoder containsValueForKey: @"extraMap"]) - { - __extraMap = [[decoder decodeObjectForKey: @"extraMap"] retain_stub]; - __extraMap_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__name_isset) - { - [encoder encodeObject: __name forKey: @"name"]; - } - if (__domain_isset) - { - [encoder encodeObject: __domain forKey: @"domain"]; - } - if (__resource_isset) - { - [encoder encodeObject: __resource forKey: @"resource"]; - } - if (__type_isset) - { - [encoder encodeObject: __type forKey: @"type"]; - } - if (__extraList_isset) - { - [encoder encodeObject: __extraList forKey: @"extraList"]; - } - if (__extraMap_isset) - { - [encoder encodeObject: __extraMap forKey: @"extraMap"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __name_isset ? 2654435761 : 0; - if (__name_isset) - { - hash = (hash * 31) ^ [__name hash]; - } - hash = (hash * 31) ^ __domain_isset ? 2654435761 : 0; - if (__domain_isset) - { - hash = (hash * 31) ^ [__domain hash]; - } - hash = (hash * 31) ^ __resource_isset ? 2654435761 : 0; - if (__resource_isset) - { - hash = (hash * 31) ^ [__resource hash]; - } - hash = (hash * 31) ^ __type_isset ? 2654435761 : 0; - if (__type_isset) - { - hash = (hash * 31) ^ [__type hash]; - } - hash = (hash * 31) ^ __extraList_isset ? 2654435761 : 0; - if (__extraList_isset) - { - hash = (hash * 31) ^ [__extraList hash]; - } - hash = (hash * 31) ^ __extraMap_isset ? 2654435761 : 0; - if (__extraMap_isset) - { - hash = (hash * 31) ^ [__extraMap hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[Tid class]]) { - return NO; - } - Tid *other = (Tid *)anObject; - if ((__name_isset != other->__name_isset) || - (__name_isset && ((__name || other->__name) && ![__name isEqual:other->__name]))) { - return NO; - } - if ((__domain_isset != other->__domain_isset) || - (__domain_isset && ((__domain || other->__domain) && ![__domain isEqual:other->__domain]))) { - return NO; - } - if ((__resource_isset != other->__resource_isset) || - (__resource_isset && ((__resource || other->__resource) && ![__resource isEqual:other->__resource]))) { - return NO; - } - if ((__type_isset != other->__type_isset) || - (__type_isset && ((__type || other->__type) && ![__type isEqual:other->__type]))) { - return NO; - } - if ((__extraList_isset != other->__extraList_isset) || - (__extraList_isset && ((__extraList || other->__extraList) && ![__extraList isEqual:other->__extraList]))) { - return NO; - } - if ((__extraMap_isset != other->__extraMap_isset) || - (__extraMap_isset && ((__extraMap || other->__extraMap) && ![__extraMap isEqual:other->__extraMap]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__name release_stub]; - [__domain release_stub]; - [__resource release_stub]; - [__type release_stub]; - [__extraList release_stub]; - [__extraMap release_stub]; - [super dealloc_stub]; -} - -- (NSString *) name { - return [[__name retain_stub] autorelease_stub]; -} - -- (void) setName: (NSString *) name { - [name retain_stub]; - [__name release_stub]; - __name = name; - __name_isset = YES; -} - -- (BOOL) nameIsSet { - return __name_isset; -} - -- (void) unsetName { - [__name release_stub]; - __name = nil; - __name_isset = NO; -} - -- (NSString *) domain { - return [[__domain retain_stub] autorelease_stub]; -} - -- (void) setDomain: (NSString *) domain { - [domain retain_stub]; - [__domain release_stub]; - __domain = domain; - __domain_isset = YES; -} - -- (BOOL) domainIsSet { - return __domain_isset; -} - -- (void) unsetDomain { - [__domain release_stub]; - __domain = nil; - __domain_isset = NO; -} - -- (NSString *) resource { - return [[__resource retain_stub] autorelease_stub]; -} - -- (void) setResource: (NSString *) resource { - [resource retain_stub]; - [__resource release_stub]; - __resource = resource; - __resource_isset = YES; -} - -- (BOOL) resourceIsSet { - return __resource_isset; -} - -- (void) unsetResource { - [__resource release_stub]; - __resource = nil; - __resource_isset = NO; -} - -- (NSString *) type { - return [[__type retain_stub] autorelease_stub]; -} - -- (void) setType: (NSString *) type { - [type retain_stub]; - [__type release_stub]; - __type = type; - __type_isset = YES; -} - -- (BOOL) typeIsSet { - return __type_isset; -} - -- (void) unsetType { - [__type release_stub]; - __type = nil; - __type_isset = NO; -} - -- (NSMutableArray *) extraList { - return [[__extraList retain_stub] autorelease_stub]; -} - -- (void) setExtraList: (NSMutableArray *) extraList { - [extraList retain_stub]; - [__extraList release_stub]; - __extraList = extraList; - __extraList_isset = YES; -} - -- (BOOL) extraListIsSet { - return __extraList_isset; -} - -- (void) unsetExtraList { - [__extraList release_stub]; - __extraList = nil; - __extraList_isset = NO; -} - -- (NSMutableDictionary *) extraMap { - return [[__extraMap retain_stub] autorelease_stub]; -} - -- (void) setExtraMap: (NSMutableDictionary *) extraMap { - [extraMap retain_stub]; - [__extraMap release_stub]; - __extraMap = extraMap; - __extraMap_isset = YES; -} - -- (BOOL) extraMapIsSet { - return __extraMap_isset; -} - -- (void) unsetExtraMap { - [__extraMap release_stub]; - __extraMap = nil; - __extraMap_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setName: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setDomain: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setResource: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 4: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setType: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 5: - if (fieldType == TType_LIST) { - int _size33; - [inProtocol readListBeginReturningElementType: NULL size: &_size33]; - NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size33]; - int _i34; - for (_i34 = 0; _i34 < _size33; ++_i34) - { - TimNode *_elem35 = [[TimNode alloc] init]; - [_elem35 read: inProtocol]; - [fieldValue addObject: _elem35]; - [_elem35 release_stub]; - } - [inProtocol readListEnd]; - [self setExtraList: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 6: - if (fieldType == TType_MAP) { - int _size36; - [inProtocol readMapBeginReturningKeyType: NULL valueType: NULL size: &_size36]; - NSMutableDictionary * fieldValue = [[NSMutableDictionary alloc] initWithCapacity: _size36]; - int _i37; - for (_i37 = 0; _i37 < _size36; ++_i37) - { - NSString * _key38 = [inProtocol readString]; - NSString * _val39 = [inProtocol readString]; - [fieldValue setObject: _val39 forKey: _key38]; - } - [inProtocol readMapEnd]; - [self setExtraMap: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"Tid"]; - if (__name_isset) { - if (__name != nil) { - [outProtocol writeFieldBeginWithName: @"name" type: TType_STRING fieldID: 1]; - [outProtocol writeString: __name]; - [outProtocol writeFieldEnd]; - } - } - if (__domain_isset) { - if (__domain != nil) { - [outProtocol writeFieldBeginWithName: @"domain" type: TType_STRING fieldID: 2]; - [outProtocol writeString: __domain]; - [outProtocol writeFieldEnd]; - } - } - if (__resource_isset) { - if (__resource != nil) { - [outProtocol writeFieldBeginWithName: @"resource" type: TType_STRING fieldID: 3]; - [outProtocol writeString: __resource]; - [outProtocol writeFieldEnd]; - } - } - if (__type_isset) { - if (__type != nil) { - [outProtocol writeFieldBeginWithName: @"type" type: TType_STRING fieldID: 4]; - [outProtocol writeString: __type]; - [outProtocol writeFieldEnd]; - } - } - if (__extraList_isset) { - if (__extraList != nil) { - [outProtocol writeFieldBeginWithName: @"extraList" type: TType_LIST fieldID: 5]; - { - [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__extraList count]]; - int idx41; - for (idx41 = 0; idx41 < [__extraList count]; idx41++) - { - [[__extraList objectAtIndex: idx41] write: outProtocol]; - } - [outProtocol writeListEnd]; - } - [outProtocol writeFieldEnd]; - } - } - if (__extraMap_isset) { - if (__extraMap != nil) { - [outProtocol writeFieldBeginWithName: @"extraMap" type: TType_MAP fieldID: 6]; - { - [outProtocol writeMapBeginWithKeyType: TType_STRING valueType: TType_STRING size: [__extraMap count]]; - NSEnumerator * _iter42 = [__extraMap keyEnumerator]; - id key43; - while ((key43 = [_iter42 nextObject])) - { - [outProtocol writeString: key43]; - [outProtocol writeString: [__extraMap objectForKey: key43]]; - } - [outProtocol writeMapEnd]; - } - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields - if (!__name_isset) { - @throw [TProtocolException exceptionWithName: @"TProtocolException" - reason: @"Required field 'name' is not set."]; - } -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"Tid("]; - [ms appendString: @"name:"]; - [ms appendFormat: @"\"%@\"", __name]; - [ms appendString: @",domain:"]; - [ms appendFormat: @"\"%@\"", __domain]; - [ms appendString: @",resource:"]; - [ms appendFormat: @"\"%@\"", __resource]; - [ms appendString: @",type:"]; - [ms appendFormat: @"\"%@\"", __type]; - [ms appendString: @",extraList:"]; - [ms appendFormat: @"%@", __extraList]; - [ms appendString: @",extraMap:"]; - [ms appendFormat: @"%@", __extraMap]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation TimUserBean - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithTid: (Tid *) tid nickname: (NSString *) nickname remarkname: (NSString *) remarkname brithday: (NSString *) brithday gender: (int16_t) gender headurl: (NSString *) headurl area: (TimArea *) area headbyte: (NSData *) headbyte photoBytes: (NSMutableArray *) photoBytes extraList: (NSMutableArray *) extraList extraMap: (NSMutableDictionary *) extraMap -{ - self = [super init]; - __tid = [tid retain_stub]; - __tid_isset = YES; - __nickname = [nickname retain_stub]; - __nickname_isset = YES; - __remarkname = [remarkname retain_stub]; - __remarkname_isset = YES; - __brithday = [brithday retain_stub]; - __brithday_isset = YES; - __gender = gender; - __gender_isset = YES; - __headurl = [headurl retain_stub]; - __headurl_isset = YES; - __area = [area retain_stub]; - __area_isset = YES; - __headbyte = [headbyte retain_stub]; - __headbyte_isset = YES; - __photoBytes = [photoBytes retain_stub]; - __photoBytes_isset = YES; - __extraList = [extraList retain_stub]; - __extraList_isset = YES; - __extraMap = [extraMap retain_stub]; - __extraMap_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"tid"]) - { - __tid = [[decoder decodeObjectForKey: @"tid"] retain_stub]; - __tid_isset = YES; - } - if ([decoder containsValueForKey: @"nickname"]) - { - __nickname = [[decoder decodeObjectForKey: @"nickname"] retain_stub]; - __nickname_isset = YES; - } - if ([decoder containsValueForKey: @"remarkname"]) - { - __remarkname = [[decoder decodeObjectForKey: @"remarkname"] retain_stub]; - __remarkname_isset = YES; - } - if ([decoder containsValueForKey: @"brithday"]) - { - __brithday = [[decoder decodeObjectForKey: @"brithday"] retain_stub]; - __brithday_isset = YES; - } - if ([decoder containsValueForKey: @"gender"]) - { - __gender = [decoder decodeIntForKey: @"gender"]; - __gender_isset = YES; - } - if ([decoder containsValueForKey: @"headurl"]) - { - __headurl = [[decoder decodeObjectForKey: @"headurl"] retain_stub]; - __headurl_isset = YES; - } - if ([decoder containsValueForKey: @"area"]) - { - __area = [[decoder decodeObjectForKey: @"area"] retain_stub]; - __area_isset = YES; - } - if ([decoder containsValueForKey: @"headbyte"]) - { - __headbyte = [[decoder decodeObjectForKey: @"headbyte"] retain_stub]; - __headbyte_isset = YES; - } - if ([decoder containsValueForKey: @"photoBytes"]) - { - __photoBytes = [[decoder decodeObjectForKey: @"photoBytes"] retain_stub]; - __photoBytes_isset = YES; - } - if ([decoder containsValueForKey: @"extraList"]) - { - __extraList = [[decoder decodeObjectForKey: @"extraList"] retain_stub]; - __extraList_isset = YES; - } - if ([decoder containsValueForKey: @"extraMap"]) - { - __extraMap = [[decoder decodeObjectForKey: @"extraMap"] retain_stub]; - __extraMap_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__tid_isset) - { - [encoder encodeObject: __tid forKey: @"tid"]; - } - if (__nickname_isset) - { - [encoder encodeObject: __nickname forKey: @"nickname"]; - } - if (__remarkname_isset) - { - [encoder encodeObject: __remarkname forKey: @"remarkname"]; - } - if (__brithday_isset) - { - [encoder encodeObject: __brithday forKey: @"brithday"]; - } - if (__gender_isset) - { - [encoder encodeInt: __gender forKey: @"gender"]; - } - if (__headurl_isset) - { - [encoder encodeObject: __headurl forKey: @"headurl"]; - } - if (__area_isset) - { - [encoder encodeObject: __area forKey: @"area"]; - } - if (__headbyte_isset) - { - [encoder encodeObject: __headbyte forKey: @"headbyte"]; - } - if (__photoBytes_isset) - { - [encoder encodeObject: __photoBytes forKey: @"photoBytes"]; - } - if (__extraList_isset) - { - [encoder encodeObject: __extraList forKey: @"extraList"]; - } - if (__extraMap_isset) - { - [encoder encodeObject: __extraMap forKey: @"extraMap"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __tid_isset ? 2654435761 : 0; - if (__tid_isset) - { - hash = (hash * 31) ^ [__tid hash]; - } - hash = (hash * 31) ^ __nickname_isset ? 2654435761 : 0; - if (__nickname_isset) - { - hash = (hash * 31) ^ [__nickname hash]; - } - hash = (hash * 31) ^ __remarkname_isset ? 2654435761 : 0; - if (__remarkname_isset) - { - hash = (hash * 31) ^ [__remarkname hash]; - } - hash = (hash * 31) ^ __brithday_isset ? 2654435761 : 0; - if (__brithday_isset) - { - hash = (hash * 31) ^ [__brithday hash]; - } - hash = (hash * 31) ^ __gender_isset ? 2654435761 : 0; - if (__gender_isset) - { - hash = (hash * 31) ^ [@(__gender) hash]; - } - hash = (hash * 31) ^ __headurl_isset ? 2654435761 : 0; - if (__headurl_isset) - { - hash = (hash * 31) ^ [__headurl hash]; - } - hash = (hash * 31) ^ __area_isset ? 2654435761 : 0; - if (__area_isset) - { - hash = (hash * 31) ^ [__area hash]; - } - hash = (hash * 31) ^ __headbyte_isset ? 2654435761 : 0; - if (__headbyte_isset) - { - hash = (hash * 31) ^ [__headbyte hash]; - } - hash = (hash * 31) ^ __photoBytes_isset ? 2654435761 : 0; - if (__photoBytes_isset) - { - hash = (hash * 31) ^ [__photoBytes hash]; - } - hash = (hash * 31) ^ __extraList_isset ? 2654435761 : 0; - if (__extraList_isset) - { - hash = (hash * 31) ^ [__extraList hash]; - } - hash = (hash * 31) ^ __extraMap_isset ? 2654435761 : 0; - if (__extraMap_isset) - { - hash = (hash * 31) ^ [__extraMap hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimUserBean class]]) { - return NO; - } - TimUserBean *other = (TimUserBean *)anObject; - if ((__tid_isset != other->__tid_isset) || - (__tid_isset && ((__tid || other->__tid) && ![__tid isEqual:other->__tid]))) { - return NO; - } - if ((__nickname_isset != other->__nickname_isset) || - (__nickname_isset && ((__nickname || other->__nickname) && ![__nickname isEqual:other->__nickname]))) { - return NO; - } - if ((__remarkname_isset != other->__remarkname_isset) || - (__remarkname_isset && ((__remarkname || other->__remarkname) && ![__remarkname isEqual:other->__remarkname]))) { - return NO; - } - if ((__brithday_isset != other->__brithday_isset) || - (__brithday_isset && ((__brithday || other->__brithday) && ![__brithday isEqual:other->__brithday]))) { - return NO; - } - if ((__gender_isset != other->__gender_isset) || - (__gender_isset && (__gender != other->__gender))) { - return NO; - } - if ((__headurl_isset != other->__headurl_isset) || - (__headurl_isset && ((__headurl || other->__headurl) && ![__headurl isEqual:other->__headurl]))) { - return NO; - } - if ((__area_isset != other->__area_isset) || - (__area_isset && ((__area || other->__area) && ![__area isEqual:other->__area]))) { - return NO; - } - if ((__headbyte_isset != other->__headbyte_isset) || - (__headbyte_isset && ((__headbyte || other->__headbyte) && ![__headbyte isEqual:other->__headbyte]))) { - return NO; - } - if ((__photoBytes_isset != other->__photoBytes_isset) || - (__photoBytes_isset && ((__photoBytes || other->__photoBytes) && ![__photoBytes isEqual:other->__photoBytes]))) { - return NO; - } - if ((__extraList_isset != other->__extraList_isset) || - (__extraList_isset && ((__extraList || other->__extraList) && ![__extraList isEqual:other->__extraList]))) { - return NO; - } - if ((__extraMap_isset != other->__extraMap_isset) || - (__extraMap_isset && ((__extraMap || other->__extraMap) && ![__extraMap isEqual:other->__extraMap]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__tid release_stub]; - [__nickname release_stub]; - [__remarkname release_stub]; - [__brithday release_stub]; - [__headurl release_stub]; - [__area release_stub]; - [__headbyte release_stub]; - [__photoBytes release_stub]; - [__extraList release_stub]; - [__extraMap release_stub]; - [super dealloc_stub]; -} - -- (Tid *) tid { - return [[__tid retain_stub] autorelease_stub]; -} - -- (void) setTid: (Tid *) tid { - [tid retain_stub]; - [__tid release_stub]; - __tid = tid; - __tid_isset = YES; -} - -- (BOOL) tidIsSet { - return __tid_isset; -} - -- (void) unsetTid { - [__tid release_stub]; - __tid = nil; - __tid_isset = NO; -} - -- (NSString *) nickname { - return [[__nickname retain_stub] autorelease_stub]; -} - -- (void) setNickname: (NSString *) nickname { - [nickname retain_stub]; - [__nickname release_stub]; - __nickname = nickname; - __nickname_isset = YES; -} - -- (BOOL) nicknameIsSet { - return __nickname_isset; -} - -- (void) unsetNickname { - [__nickname release_stub]; - __nickname = nil; - __nickname_isset = NO; -} - -- (NSString *) remarkname { - return [[__remarkname retain_stub] autorelease_stub]; -} - -- (void) setRemarkname: (NSString *) remarkname { - [remarkname retain_stub]; - [__remarkname release_stub]; - __remarkname = remarkname; - __remarkname_isset = YES; -} - -- (BOOL) remarknameIsSet { - return __remarkname_isset; -} - -- (void) unsetRemarkname { - [__remarkname release_stub]; - __remarkname = nil; - __remarkname_isset = NO; -} - -- (NSString *) brithday { - return [[__brithday retain_stub] autorelease_stub]; -} - -- (void) setBrithday: (NSString *) brithday { - [brithday retain_stub]; - [__brithday release_stub]; - __brithday = brithday; - __brithday_isset = YES; -} - -- (BOOL) brithdayIsSet { - return __brithday_isset; -} - -- (void) unsetBrithday { - [__brithday release_stub]; - __brithday = nil; - __brithday_isset = NO; -} - -- (int16_t) gender { - return __gender; -} - -- (void) setGender: (int16_t) gender { - __gender = gender; - __gender_isset = YES; -} - -- (BOOL) genderIsSet { - return __gender_isset; -} - -- (void) unsetGender { - __gender_isset = NO; -} - -- (NSString *) headurl { - return [[__headurl retain_stub] autorelease_stub]; -} - -- (void) setHeadurl: (NSString *) headurl { - [headurl retain_stub]; - [__headurl release_stub]; - __headurl = headurl; - __headurl_isset = YES; -} - -- (BOOL) headurlIsSet { - return __headurl_isset; -} - -- (void) unsetHeadurl { - [__headurl release_stub]; - __headurl = nil; - __headurl_isset = NO; -} - -- (TimArea *) area { - return [[__area retain_stub] autorelease_stub]; -} - -- (void) setArea: (TimArea *) area { - [area retain_stub]; - [__area release_stub]; - __area = area; - __area_isset = YES; -} - -- (BOOL) areaIsSet { - return __area_isset; -} - -- (void) unsetArea { - [__area release_stub]; - __area = nil; - __area_isset = NO; -} - -- (NSData *) headbyte { - return [[__headbyte retain_stub] autorelease_stub]; -} - -- (void) setHeadbyte: (NSData *) headbyte { - [headbyte retain_stub]; - [__headbyte release_stub]; - __headbyte = headbyte; - __headbyte_isset = YES; -} - -- (BOOL) headbyteIsSet { - return __headbyte_isset; -} - -- (void) unsetHeadbyte { - [__headbyte release_stub]; - __headbyte = nil; - __headbyte_isset = NO; -} - -- (NSMutableArray *) photoBytes { - return [[__photoBytes retain_stub] autorelease_stub]; -} - -- (void) setPhotoBytes: (NSMutableArray *) photoBytes { - [photoBytes retain_stub]; - [__photoBytes release_stub]; - __photoBytes = photoBytes; - __photoBytes_isset = YES; -} - -- (BOOL) photoBytesIsSet { - return __photoBytes_isset; -} - -- (void) unsetPhotoBytes { - [__photoBytes release_stub]; - __photoBytes = nil; - __photoBytes_isset = NO; -} - -- (NSMutableArray *) extraList { - return [[__extraList retain_stub] autorelease_stub]; -} - -- (void) setExtraList: (NSMutableArray *) extraList { - [extraList retain_stub]; - [__extraList release_stub]; - __extraList = extraList; - __extraList_isset = YES; -} - -- (BOOL) extraListIsSet { - return __extraList_isset; -} - -- (void) unsetExtraList { - [__extraList release_stub]; - __extraList = nil; - __extraList_isset = NO; -} - -- (NSMutableDictionary *) extraMap { - return [[__extraMap retain_stub] autorelease_stub]; -} - -- (void) setExtraMap: (NSMutableDictionary *) extraMap { - [extraMap retain_stub]; - [__extraMap release_stub]; - __extraMap = extraMap; - __extraMap_isset = YES; -} - -- (BOOL) extraMapIsSet { - return __extraMap_isset; -} - -- (void) unsetExtraMap { - [__extraMap release_stub]; - __extraMap = nil; - __extraMap_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - Tid *fieldValue = [[Tid alloc] init]; - [fieldValue read: inProtocol]; - [self setTid: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setNickname: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setRemarkname: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 4: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setBrithday: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 5: - if (fieldType == TType_I16) { - int16_t fieldValue = [inProtocol readI16]; - [self setGender: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 6: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setHeadurl: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 7: - if (fieldType == TType_STRUCT) { - TimArea *fieldValue = [[TimArea alloc] init]; - [fieldValue read: inProtocol]; - [self setArea: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 8: - if (fieldType == TType_STRING) { - NSData * fieldValue = [inProtocol readBinary]; - [self setHeadbyte: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 9: - if (fieldType == TType_LIST) { - int _size44; - [inProtocol readListBeginReturningElementType: NULL size: &_size44]; - NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size44]; - int _i45; - for (_i45 = 0; _i45 < _size44; ++_i45) - { - NSData * _elem46 = [inProtocol readBinary]; - [fieldValue addObject: _elem46]; - } - [inProtocol readListEnd]; - [self setPhotoBytes: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 10: - if (fieldType == TType_LIST) { - int _size47; - [inProtocol readListBeginReturningElementType: NULL size: &_size47]; - NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size47]; - int _i48; - for (_i48 = 0; _i48 < _size47; ++_i48) - { - TimNode *_elem49 = [[TimNode alloc] init]; - [_elem49 read: inProtocol]; - [fieldValue addObject: _elem49]; - [_elem49 release_stub]; - } - [inProtocol readListEnd]; - [self setExtraList: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 11: - if (fieldType == TType_MAP) { - int _size50; - [inProtocol readMapBeginReturningKeyType: NULL valueType: NULL size: &_size50]; - NSMutableDictionary * fieldValue = [[NSMutableDictionary alloc] initWithCapacity: _size50]; - int _i51; - for (_i51 = 0; _i51 < _size50; ++_i51) - { - NSString * _key52 = [inProtocol readString]; - NSString * _val53 = [inProtocol readString]; - [fieldValue setObject: _val53 forKey: _key52]; - } - [inProtocol readMapEnd]; - [self setExtraMap: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimUserBean"]; - if (__tid_isset) { - if (__tid != nil) { - [outProtocol writeFieldBeginWithName: @"tid" type: TType_STRUCT fieldID: 1]; - [__tid write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__nickname_isset) { - if (__nickname != nil) { - [outProtocol writeFieldBeginWithName: @"nickname" type: TType_STRING fieldID: 2]; - [outProtocol writeString: __nickname]; - [outProtocol writeFieldEnd]; - } - } - if (__remarkname_isset) { - if (__remarkname != nil) { - [outProtocol writeFieldBeginWithName: @"remarkname" type: TType_STRING fieldID: 3]; - [outProtocol writeString: __remarkname]; - [outProtocol writeFieldEnd]; - } - } - if (__brithday_isset) { - if (__brithday != nil) { - [outProtocol writeFieldBeginWithName: @"brithday" type: TType_STRING fieldID: 4]; - [outProtocol writeString: __brithday]; - [outProtocol writeFieldEnd]; - } - } - if (__gender_isset) { - [outProtocol writeFieldBeginWithName: @"gender" type: TType_I16 fieldID: 5]; - [outProtocol writeI16: __gender]; - [outProtocol writeFieldEnd]; - } - if (__headurl_isset) { - if (__headurl != nil) { - [outProtocol writeFieldBeginWithName: @"headurl" type: TType_STRING fieldID: 6]; - [outProtocol writeString: __headurl]; - [outProtocol writeFieldEnd]; - } - } - if (__area_isset) { - if (__area != nil) { - [outProtocol writeFieldBeginWithName: @"area" type: TType_STRUCT fieldID: 7]; - [__area write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__headbyte_isset) { - if (__headbyte != nil) { - [outProtocol writeFieldBeginWithName: @"headbyte" type: TType_STRING fieldID: 8]; - [outProtocol writeBinary: __headbyte]; - [outProtocol writeFieldEnd]; - } - } - if (__photoBytes_isset) { - if (__photoBytes != nil) { - [outProtocol writeFieldBeginWithName: @"photoBytes" type: TType_LIST fieldID: 9]; - { - [outProtocol writeListBeginWithElementType: TType_STRING size: [__photoBytes count]]; - int idx55; - for (idx55 = 0; idx55 < [__photoBytes count]; idx55++) - { - [outProtocol writeBinary: [__photoBytes objectAtIndex: idx55]]; - } - [outProtocol writeListEnd]; - } - [outProtocol writeFieldEnd]; - } - } - if (__extraList_isset) { - if (__extraList != nil) { - [outProtocol writeFieldBeginWithName: @"extraList" type: TType_LIST fieldID: 10]; - { - [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__extraList count]]; - int idx57; - for (idx57 = 0; idx57 < [__extraList count]; idx57++) - { - [[__extraList objectAtIndex: idx57] write: outProtocol]; - } - [outProtocol writeListEnd]; - } - [outProtocol writeFieldEnd]; - } - } - if (__extraMap_isset) { - if (__extraMap != nil) { - [outProtocol writeFieldBeginWithName: @"extraMap" type: TType_MAP fieldID: 11]; - { - [outProtocol writeMapBeginWithKeyType: TType_STRING valueType: TType_STRING size: [__extraMap count]]; - NSEnumerator * _iter58 = [__extraMap keyEnumerator]; - id key59; - while ((key59 = [_iter58 nextObject])) - { - [outProtocol writeString: key59]; - [outProtocol writeString: [__extraMap objectForKey: key59]]; - } - [outProtocol writeMapEnd]; - } - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimUserBean("]; - [ms appendString: @"tid:"]; - [ms appendFormat: @"%@", __tid]; - [ms appendString: @",nickname:"]; - [ms appendFormat: @"\"%@\"", __nickname]; - [ms appendString: @",remarkname:"]; - [ms appendFormat: @"\"%@\"", __remarkname]; - [ms appendString: @",brithday:"]; - [ms appendFormat: @"\"%@\"", __brithday]; - [ms appendString: @",gender:"]; - [ms appendFormat: @"%hi", __gender]; - [ms appendString: @",headurl:"]; - [ms appendFormat: @"\"%@\"", __headurl]; - [ms appendString: @",area:"]; - [ms appendFormat: @"%@", __area]; - [ms appendString: @",headbyte:"]; - [ms appendFormat: @"\"%@\"", __headbyte]; - [ms appendString: @",photoBytes:"]; - [ms appendFormat: @"%@", __photoBytes]; - [ms appendString: @",extraList:"]; - [ms appendFormat: @"%@", __extraList]; - [ms appendString: @",extraMap:"]; - [ms appendFormat: @"%@", __extraMap]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation TimRoom - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithTid: (Tid *) tid founderTid: (Tid *) founderTid HostsTid: (NSMutableArray *) HostsTid membersTid: (NSMutableArray *) membersTid headurl: (NSString *) headurl roomName: (NSString *) roomName desc: (NSString *) desc createTime: (TimTime *) createTime extraList: (NSMutableArray *) extraList extraMap: (NSMutableDictionary *) extraMap -{ - self = [super init]; - __tid = [tid retain_stub]; - __tid_isset = YES; - __founderTid = [founderTid retain_stub]; - __founderTid_isset = YES; - __HostsTid = [HostsTid retain_stub]; - __HostsTid_isset = YES; - __membersTid = [membersTid retain_stub]; - __membersTid_isset = YES; - __headurl = [headurl retain_stub]; - __headurl_isset = YES; - __roomName = [roomName retain_stub]; - __roomName_isset = YES; - __desc = [desc retain_stub]; - __desc_isset = YES; - __createTime = [createTime retain_stub]; - __createTime_isset = YES; - __extraList = [extraList retain_stub]; - __extraList_isset = YES; - __extraMap = [extraMap retain_stub]; - __extraMap_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"tid"]) - { - __tid = [[decoder decodeObjectForKey: @"tid"] retain_stub]; - __tid_isset = YES; - } - if ([decoder containsValueForKey: @"founderTid"]) - { - __founderTid = [[decoder decodeObjectForKey: @"founderTid"] retain_stub]; - __founderTid_isset = YES; - } - if ([decoder containsValueForKey: @"HostsTid"]) - { - __HostsTid = [[decoder decodeObjectForKey: @"HostsTid"] retain_stub]; - __HostsTid_isset = YES; - } - if ([decoder containsValueForKey: @"membersTid"]) - { - __membersTid = [[decoder decodeObjectForKey: @"membersTid"] retain_stub]; - __membersTid_isset = YES; - } - if ([decoder containsValueForKey: @"headurl"]) - { - __headurl = [[decoder decodeObjectForKey: @"headurl"] retain_stub]; - __headurl_isset = YES; - } - if ([decoder containsValueForKey: @"roomName"]) - { - __roomName = [[decoder decodeObjectForKey: @"roomName"] retain_stub]; - __roomName_isset = YES; - } - if ([decoder containsValueForKey: @"desc"]) - { - __desc = [[decoder decodeObjectForKey: @"desc"] retain_stub]; - __desc_isset = YES; - } - if ([decoder containsValueForKey: @"createTime"]) - { - __createTime = [[decoder decodeObjectForKey: @"createTime"] retain_stub]; - __createTime_isset = YES; - } - if ([decoder containsValueForKey: @"extraList"]) - { - __extraList = [[decoder decodeObjectForKey: @"extraList"] retain_stub]; - __extraList_isset = YES; - } - if ([decoder containsValueForKey: @"extraMap"]) - { - __extraMap = [[decoder decodeObjectForKey: @"extraMap"] retain_stub]; - __extraMap_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__tid_isset) - { - [encoder encodeObject: __tid forKey: @"tid"]; - } - if (__founderTid_isset) - { - [encoder encodeObject: __founderTid forKey: @"founderTid"]; - } - if (__HostsTid_isset) - { - [encoder encodeObject: __HostsTid forKey: @"HostsTid"]; - } - if (__membersTid_isset) - { - [encoder encodeObject: __membersTid forKey: @"membersTid"]; - } - if (__headurl_isset) - { - [encoder encodeObject: __headurl forKey: @"headurl"]; - } - if (__roomName_isset) - { - [encoder encodeObject: __roomName forKey: @"roomName"]; - } - if (__desc_isset) - { - [encoder encodeObject: __desc forKey: @"desc"]; - } - if (__createTime_isset) - { - [encoder encodeObject: __createTime forKey: @"createTime"]; - } - if (__extraList_isset) - { - [encoder encodeObject: __extraList forKey: @"extraList"]; - } - if (__extraMap_isset) - { - [encoder encodeObject: __extraMap forKey: @"extraMap"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __tid_isset ? 2654435761 : 0; - if (__tid_isset) - { - hash = (hash * 31) ^ [__tid hash]; - } - hash = (hash * 31) ^ __founderTid_isset ? 2654435761 : 0; - if (__founderTid_isset) - { - hash = (hash * 31) ^ [__founderTid hash]; - } - hash = (hash * 31) ^ __HostsTid_isset ? 2654435761 : 0; - if (__HostsTid_isset) - { - hash = (hash * 31) ^ [__HostsTid hash]; - } - hash = (hash * 31) ^ __membersTid_isset ? 2654435761 : 0; - if (__membersTid_isset) - { - hash = (hash * 31) ^ [__membersTid hash]; - } - hash = (hash * 31) ^ __headurl_isset ? 2654435761 : 0; - if (__headurl_isset) - { - hash = (hash * 31) ^ [__headurl hash]; - } - hash = (hash * 31) ^ __roomName_isset ? 2654435761 : 0; - if (__roomName_isset) - { - hash = (hash * 31) ^ [__roomName hash]; - } - hash = (hash * 31) ^ __desc_isset ? 2654435761 : 0; - if (__desc_isset) - { - hash = (hash * 31) ^ [__desc hash]; - } - hash = (hash * 31) ^ __createTime_isset ? 2654435761 : 0; - if (__createTime_isset) - { - hash = (hash * 31) ^ [__createTime hash]; - } - hash = (hash * 31) ^ __extraList_isset ? 2654435761 : 0; - if (__extraList_isset) - { - hash = (hash * 31) ^ [__extraList hash]; - } - hash = (hash * 31) ^ __extraMap_isset ? 2654435761 : 0; - if (__extraMap_isset) - { - hash = (hash * 31) ^ [__extraMap hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimRoom class]]) { - return NO; - } - TimRoom *other = (TimRoom *)anObject; - if ((__tid_isset != other->__tid_isset) || - (__tid_isset && ((__tid || other->__tid) && ![__tid isEqual:other->__tid]))) { - return NO; - } - if ((__founderTid_isset != other->__founderTid_isset) || - (__founderTid_isset && ((__founderTid || other->__founderTid) && ![__founderTid isEqual:other->__founderTid]))) { - return NO; - } - if ((__HostsTid_isset != other->__HostsTid_isset) || - (__HostsTid_isset && ((__HostsTid || other->__HostsTid) && ![__HostsTid isEqual:other->__HostsTid]))) { - return NO; - } - if ((__membersTid_isset != other->__membersTid_isset) || - (__membersTid_isset && ((__membersTid || other->__membersTid) && ![__membersTid isEqual:other->__membersTid]))) { - return NO; - } - if ((__headurl_isset != other->__headurl_isset) || - (__headurl_isset && ((__headurl || other->__headurl) && ![__headurl isEqual:other->__headurl]))) { - return NO; - } - if ((__roomName_isset != other->__roomName_isset) || - (__roomName_isset && ((__roomName || other->__roomName) && ![__roomName isEqual:other->__roomName]))) { - return NO; - } - if ((__desc_isset != other->__desc_isset) || - (__desc_isset && ((__desc || other->__desc) && ![__desc isEqual:other->__desc]))) { - return NO; - } - if ((__createTime_isset != other->__createTime_isset) || - (__createTime_isset && ((__createTime || other->__createTime) && ![__createTime isEqual:other->__createTime]))) { - return NO; - } - if ((__extraList_isset != other->__extraList_isset) || - (__extraList_isset && ((__extraList || other->__extraList) && ![__extraList isEqual:other->__extraList]))) { - return NO; - } - if ((__extraMap_isset != other->__extraMap_isset) || - (__extraMap_isset && ((__extraMap || other->__extraMap) && ![__extraMap isEqual:other->__extraMap]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__tid release_stub]; - [__founderTid release_stub]; - [__HostsTid release_stub]; - [__membersTid release_stub]; - [__headurl release_stub]; - [__roomName release_stub]; - [__desc release_stub]; - [__createTime release_stub]; - [__extraList release_stub]; - [__extraMap release_stub]; - [super dealloc_stub]; -} - -- (Tid *) tid { - return [[__tid retain_stub] autorelease_stub]; -} - -- (void) setTid: (Tid *) tid { - [tid retain_stub]; - [__tid release_stub]; - __tid = tid; - __tid_isset = YES; -} - -- (BOOL) tidIsSet { - return __tid_isset; -} - -- (void) unsetTid { - [__tid release_stub]; - __tid = nil; - __tid_isset = NO; -} - -- (Tid *) founderTid { - return [[__founderTid retain_stub] autorelease_stub]; -} - -- (void) setFounderTid: (Tid *) founderTid { - [founderTid retain_stub]; - [__founderTid release_stub]; - __founderTid = founderTid; - __founderTid_isset = YES; -} - -- (BOOL) founderTidIsSet { - return __founderTid_isset; -} - -- (void) unsetFounderTid { - [__founderTid release_stub]; - __founderTid = nil; - __founderTid_isset = NO; -} - -- (NSMutableArray *) HostsTid { - return [[__HostsTid retain_stub] autorelease_stub]; -} - -- (void) setHostsTid: (NSMutableArray *) HostsTid { - [HostsTid retain_stub]; - [__HostsTid release_stub]; - __HostsTid = HostsTid; - __HostsTid_isset = YES; -} - -- (BOOL) HostsTidIsSet { - return __HostsTid_isset; -} - -- (void) unsetHostsTid { - [__HostsTid release_stub]; - __HostsTid = nil; - __HostsTid_isset = NO; -} - -- (NSMutableArray *) membersTid { - return [[__membersTid retain_stub] autorelease_stub]; -} - -- (void) setMembersTid: (NSMutableArray *) membersTid { - [membersTid retain_stub]; - [__membersTid release_stub]; - __membersTid = membersTid; - __membersTid_isset = YES; -} - -- (BOOL) membersTidIsSet { - return __membersTid_isset; -} - -- (void) unsetMembersTid { - [__membersTid release_stub]; - __membersTid = nil; - __membersTid_isset = NO; -} - -- (NSString *) headurl { - return [[__headurl retain_stub] autorelease_stub]; -} - -- (void) setHeadurl: (NSString *) headurl { - [headurl retain_stub]; - [__headurl release_stub]; - __headurl = headurl; - __headurl_isset = YES; -} - -- (BOOL) headurlIsSet { - return __headurl_isset; -} - -- (void) unsetHeadurl { - [__headurl release_stub]; - __headurl = nil; - __headurl_isset = NO; -} - -- (NSString *) roomName { - return [[__roomName retain_stub] autorelease_stub]; -} - -- (void) setRoomName: (NSString *) roomName { - [roomName retain_stub]; - [__roomName release_stub]; - __roomName = roomName; - __roomName_isset = YES; -} - -- (BOOL) roomNameIsSet { - return __roomName_isset; -} - -- (void) unsetRoomName { - [__roomName release_stub]; - __roomName = nil; - __roomName_isset = NO; -} - -- (NSString *) desc { - return [[__desc retain_stub] autorelease_stub]; -} - -- (void) setDesc: (NSString *) desc { - [desc retain_stub]; - [__desc release_stub]; - __desc = desc; - __desc_isset = YES; -} - -- (BOOL) descIsSet { - return __desc_isset; -} - -- (void) unsetDesc { - [__desc release_stub]; - __desc = nil; - __desc_isset = NO; -} - -- (TimTime *) createTime { - return [[__createTime retain_stub] autorelease_stub]; -} - -- (void) setCreateTime: (TimTime *) createTime { - [createTime retain_stub]; - [__createTime release_stub]; - __createTime = createTime; - __createTime_isset = YES; -} - -- (BOOL) createTimeIsSet { - return __createTime_isset; -} - -- (void) unsetCreateTime { - [__createTime release_stub]; - __createTime = nil; - __createTime_isset = NO; -} - -- (NSMutableArray *) extraList { - return [[__extraList retain_stub] autorelease_stub]; -} - -- (void) setExtraList: (NSMutableArray *) extraList { - [extraList retain_stub]; - [__extraList release_stub]; - __extraList = extraList; - __extraList_isset = YES; -} - -- (BOOL) extraListIsSet { - return __extraList_isset; -} - -- (void) unsetExtraList { - [__extraList release_stub]; - __extraList = nil; - __extraList_isset = NO; -} - -- (NSMutableDictionary *) extraMap { - return [[__extraMap retain_stub] autorelease_stub]; -} - -- (void) setExtraMap: (NSMutableDictionary *) extraMap { - [extraMap retain_stub]; - [__extraMap release_stub]; - __extraMap = extraMap; - __extraMap_isset = YES; -} - -- (BOOL) extraMapIsSet { - return __extraMap_isset; -} - -- (void) unsetExtraMap { - [__extraMap release_stub]; - __extraMap = nil; - __extraMap_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - Tid *fieldValue = [[Tid alloc] init]; - [fieldValue read: inProtocol]; - [self setTid: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRUCT) { - Tid *fieldValue = [[Tid alloc] init]; - [fieldValue read: inProtocol]; - [self setFounderTid: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_LIST) { - int _size60; - [inProtocol readListBeginReturningElementType: NULL size: &_size60]; - NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size60]; - int _i61; - for (_i61 = 0; _i61 < _size60; ++_i61) - { - Tid *_elem62 = [[Tid alloc] init]; - [_elem62 read: inProtocol]; - [fieldValue addObject: _elem62]; - [_elem62 release_stub]; - } - [inProtocol readListEnd]; - [self setHostsTid: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 4: - if (fieldType == TType_LIST) { - int _size63; - [inProtocol readListBeginReturningElementType: NULL size: &_size63]; - NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size63]; - int _i64; - for (_i64 = 0; _i64 < _size63; ++_i64) - { - Tid *_elem65 = [[Tid alloc] init]; - [_elem65 read: inProtocol]; - [fieldValue addObject: _elem65]; - [_elem65 release_stub]; - } - [inProtocol readListEnd]; - [self setMembersTid: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 5: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setHeadurl: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 6: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setRoomName: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 7: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setDesc: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 8: - if (fieldType == TType_STRUCT) { - TimTime *fieldValue = [[TimTime alloc] init]; - [fieldValue read: inProtocol]; - [self setCreateTime: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 9: - if (fieldType == TType_LIST) { - int _size66; - [inProtocol readListBeginReturningElementType: NULL size: &_size66]; - NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size66]; - int _i67; - for (_i67 = 0; _i67 < _size66; ++_i67) - { - TimNode *_elem68 = [[TimNode alloc] init]; - [_elem68 read: inProtocol]; - [fieldValue addObject: _elem68]; - [_elem68 release_stub]; - } - [inProtocol readListEnd]; - [self setExtraList: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 10: - if (fieldType == TType_MAP) { - int _size69; - [inProtocol readMapBeginReturningKeyType: NULL valueType: NULL size: &_size69]; - NSMutableDictionary * fieldValue = [[NSMutableDictionary alloc] initWithCapacity: _size69]; - int _i70; - for (_i70 = 0; _i70 < _size69; ++_i70) - { - NSString * _key71 = [inProtocol readString]; - NSString * _val72 = [inProtocol readString]; - [fieldValue setObject: _val72 forKey: _key71]; - } - [inProtocol readMapEnd]; - [self setExtraMap: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimRoom"]; - if (__tid_isset) { - if (__tid != nil) { - [outProtocol writeFieldBeginWithName: @"tid" type: TType_STRUCT fieldID: 1]; - [__tid write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__founderTid_isset) { - if (__founderTid != nil) { - [outProtocol writeFieldBeginWithName: @"founderTid" type: TType_STRUCT fieldID: 2]; - [__founderTid write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__HostsTid_isset) { - if (__HostsTid != nil) { - [outProtocol writeFieldBeginWithName: @"HostsTid" type: TType_LIST fieldID: 3]; - { - [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__HostsTid count]]; - int idx74; - for (idx74 = 0; idx74 < [__HostsTid count]; idx74++) - { - [[__HostsTid objectAtIndex: idx74] write: outProtocol]; - } - [outProtocol writeListEnd]; - } - [outProtocol writeFieldEnd]; - } - } - if (__membersTid_isset) { - if (__membersTid != nil) { - [outProtocol writeFieldBeginWithName: @"membersTid" type: TType_LIST fieldID: 4]; - { - [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__membersTid count]]; - int idx76; - for (idx76 = 0; idx76 < [__membersTid count]; idx76++) - { - [[__membersTid objectAtIndex: idx76] write: outProtocol]; - } - [outProtocol writeListEnd]; - } - [outProtocol writeFieldEnd]; - } - } - if (__headurl_isset) { - if (__headurl != nil) { - [outProtocol writeFieldBeginWithName: @"headurl" type: TType_STRING fieldID: 5]; - [outProtocol writeString: __headurl]; - [outProtocol writeFieldEnd]; - } - } - if (__roomName_isset) { - if (__roomName != nil) { - [outProtocol writeFieldBeginWithName: @"roomName" type: TType_STRING fieldID: 6]; - [outProtocol writeString: __roomName]; - [outProtocol writeFieldEnd]; - } - } - if (__desc_isset) { - if (__desc != nil) { - [outProtocol writeFieldBeginWithName: @"desc" type: TType_STRING fieldID: 7]; - [outProtocol writeString: __desc]; - [outProtocol writeFieldEnd]; - } - } - if (__createTime_isset) { - if (__createTime != nil) { - [outProtocol writeFieldBeginWithName: @"createTime" type: TType_STRUCT fieldID: 8]; - [__createTime write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__extraList_isset) { - if (__extraList != nil) { - [outProtocol writeFieldBeginWithName: @"extraList" type: TType_LIST fieldID: 9]; - { - [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__extraList count]]; - int idx78; - for (idx78 = 0; idx78 < [__extraList count]; idx78++) - { - [[__extraList objectAtIndex: idx78] write: outProtocol]; - } - [outProtocol writeListEnd]; - } - [outProtocol writeFieldEnd]; - } - } - if (__extraMap_isset) { - if (__extraMap != nil) { - [outProtocol writeFieldBeginWithName: @"extraMap" type: TType_MAP fieldID: 10]; - { - [outProtocol writeMapBeginWithKeyType: TType_STRING valueType: TType_STRING size: [__extraMap count]]; - NSEnumerator * _iter79 = [__extraMap keyEnumerator]; - id key80; - while ((key80 = [_iter79 nextObject])) - { - [outProtocol writeString: key80]; - [outProtocol writeString: [__extraMap objectForKey: key80]]; - } - [outProtocol writeMapEnd]; - } - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimRoom("]; - [ms appendString: @"tid:"]; - [ms appendFormat: @"%@", __tid]; - [ms appendString: @",founderTid:"]; - [ms appendFormat: @"%@", __founderTid]; - [ms appendString: @",HostsTid:"]; - [ms appendFormat: @"%@", __HostsTid]; - [ms appendString: @",membersTid:"]; - [ms appendFormat: @"%@", __membersTid]; - [ms appendString: @",headurl:"]; - [ms appendFormat: @"\"%@\"", __headurl]; - [ms appendString: @",roomName:"]; - [ms appendFormat: @"\"%@\"", __roomName]; - [ms appendString: @",desc:"]; - [ms appendFormat: @"\"%@\"", __desc]; - [ms appendString: @",createTime:"]; - [ms appendFormat: @"%@", __createTime]; - [ms appendString: @",extraList:"]; - [ms appendFormat: @"%@", __extraList]; - [ms appendString: @",extraMap:"]; - [ms appendFormat: @"%@", __extraMap]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation TimPBean - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithThreadId: (NSString *) threadId fromTid: (Tid *) fromTid toTid: (Tid *) toTid status: (NSString *) status type: (NSString *) type priority: (int32_t) priority show: (NSString *) show leaguerTid: (Tid *) leaguerTid extraList: (NSMutableArray *) extraList error: (TimError *) error extraMap: (NSMutableDictionary *) extraMap -{ - self = [super init]; - __threadId = [threadId retain_stub]; - __threadId_isset = YES; - __fromTid = [fromTid retain_stub]; - __fromTid_isset = YES; - __toTid = [toTid retain_stub]; - __toTid_isset = YES; - __status = [status retain_stub]; - __status_isset = YES; - __type = [type retain_stub]; - __type_isset = YES; - __priority = priority; - __priority_isset = YES; - __show = [show retain_stub]; - __show_isset = YES; - __leaguerTid = [leaguerTid retain_stub]; - __leaguerTid_isset = YES; - __extraList = [extraList retain_stub]; - __extraList_isset = YES; - __error = [error retain_stub]; - __error_isset = YES; - __extraMap = [extraMap retain_stub]; - __extraMap_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"threadId"]) - { - __threadId = [[decoder decodeObjectForKey: @"threadId"] retain_stub]; - __threadId_isset = YES; - } - if ([decoder containsValueForKey: @"fromTid"]) - { - __fromTid = [[decoder decodeObjectForKey: @"fromTid"] retain_stub]; - __fromTid_isset = YES; - } - if ([decoder containsValueForKey: @"toTid"]) - { - __toTid = [[decoder decodeObjectForKey: @"toTid"] retain_stub]; - __toTid_isset = YES; - } - if ([decoder containsValueForKey: @"status"]) - { - __status = [[decoder decodeObjectForKey: @"status"] retain_stub]; - __status_isset = YES; - } - if ([decoder containsValueForKey: @"type"]) - { - __type = [[decoder decodeObjectForKey: @"type"] retain_stub]; - __type_isset = YES; - } - if ([decoder containsValueForKey: @"priority"]) - { - __priority = [decoder decodeInt32ForKey: @"priority"]; - __priority_isset = YES; - } - if ([decoder containsValueForKey: @"show"]) - { - __show = [[decoder decodeObjectForKey: @"show"] retain_stub]; - __show_isset = YES; - } - if ([decoder containsValueForKey: @"leaguerTid"]) - { - __leaguerTid = [[decoder decodeObjectForKey: @"leaguerTid"] retain_stub]; - __leaguerTid_isset = YES; - } - if ([decoder containsValueForKey: @"extraList"]) - { - __extraList = [[decoder decodeObjectForKey: @"extraList"] retain_stub]; - __extraList_isset = YES; - } - if ([decoder containsValueForKey: @"error"]) - { - __error = [[decoder decodeObjectForKey: @"error"] retain_stub]; - __error_isset = YES; - } - if ([decoder containsValueForKey: @"extraMap"]) - { - __extraMap = [[decoder decodeObjectForKey: @"extraMap"] retain_stub]; - __extraMap_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__threadId_isset) - { - [encoder encodeObject: __threadId forKey: @"threadId"]; - } - if (__fromTid_isset) - { - [encoder encodeObject: __fromTid forKey: @"fromTid"]; - } - if (__toTid_isset) - { - [encoder encodeObject: __toTid forKey: @"toTid"]; - } - if (__status_isset) - { - [encoder encodeObject: __status forKey: @"status"]; - } - if (__type_isset) - { - [encoder encodeObject: __type forKey: @"type"]; - } - if (__priority_isset) - { - [encoder encodeInt32: __priority forKey: @"priority"]; - } - if (__show_isset) - { - [encoder encodeObject: __show forKey: @"show"]; - } - if (__leaguerTid_isset) - { - [encoder encodeObject: __leaguerTid forKey: @"leaguerTid"]; - } - if (__extraList_isset) - { - [encoder encodeObject: __extraList forKey: @"extraList"]; - } - if (__error_isset) - { - [encoder encodeObject: __error forKey: @"error"]; - } - if (__extraMap_isset) - { - [encoder encodeObject: __extraMap forKey: @"extraMap"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __threadId_isset ? 2654435761 : 0; - if (__threadId_isset) - { - hash = (hash * 31) ^ [__threadId hash]; - } - hash = (hash * 31) ^ __fromTid_isset ? 2654435761 : 0; - if (__fromTid_isset) - { - hash = (hash * 31) ^ [__fromTid hash]; - } - hash = (hash * 31) ^ __toTid_isset ? 2654435761 : 0; - if (__toTid_isset) - { - hash = (hash * 31) ^ [__toTid hash]; - } - hash = (hash * 31) ^ __status_isset ? 2654435761 : 0; - if (__status_isset) - { - hash = (hash * 31) ^ [__status hash]; - } - hash = (hash * 31) ^ __type_isset ? 2654435761 : 0; - if (__type_isset) - { - hash = (hash * 31) ^ [__type hash]; - } - hash = (hash * 31) ^ __priority_isset ? 2654435761 : 0; - if (__priority_isset) - { - hash = (hash * 31) ^ [@(__priority) hash]; - } - hash = (hash * 31) ^ __show_isset ? 2654435761 : 0; - if (__show_isset) - { - hash = (hash * 31) ^ [__show hash]; - } - hash = (hash * 31) ^ __leaguerTid_isset ? 2654435761 : 0; - if (__leaguerTid_isset) - { - hash = (hash * 31) ^ [__leaguerTid hash]; - } - hash = (hash * 31) ^ __extraList_isset ? 2654435761 : 0; - if (__extraList_isset) - { - hash = (hash * 31) ^ [__extraList hash]; - } - hash = (hash * 31) ^ __error_isset ? 2654435761 : 0; - if (__error_isset) - { - hash = (hash * 31) ^ [__error hash]; - } - hash = (hash * 31) ^ __extraMap_isset ? 2654435761 : 0; - if (__extraMap_isset) - { - hash = (hash * 31) ^ [__extraMap hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimPBean class]]) { - return NO; - } - TimPBean *other = (TimPBean *)anObject; - if ((__threadId_isset != other->__threadId_isset) || - (__threadId_isset && ((__threadId || other->__threadId) && ![__threadId isEqual:other->__threadId]))) { - return NO; - } - if ((__fromTid_isset != other->__fromTid_isset) || - (__fromTid_isset && ((__fromTid || other->__fromTid) && ![__fromTid isEqual:other->__fromTid]))) { - return NO; - } - if ((__toTid_isset != other->__toTid_isset) || - (__toTid_isset && ((__toTid || other->__toTid) && ![__toTid isEqual:other->__toTid]))) { - return NO; - } - if ((__status_isset != other->__status_isset) || - (__status_isset && ((__status || other->__status) && ![__status isEqual:other->__status]))) { - return NO; - } - if ((__type_isset != other->__type_isset) || - (__type_isset && ((__type || other->__type) && ![__type isEqual:other->__type]))) { - return NO; - } - if ((__priority_isset != other->__priority_isset) || - (__priority_isset && (__priority != other->__priority))) { - return NO; - } - if ((__show_isset != other->__show_isset) || - (__show_isset && ((__show || other->__show) && ![__show isEqual:other->__show]))) { - return NO; - } - if ((__leaguerTid_isset != other->__leaguerTid_isset) || - (__leaguerTid_isset && ((__leaguerTid || other->__leaguerTid) && ![__leaguerTid isEqual:other->__leaguerTid]))) { - return NO; - } - if ((__extraList_isset != other->__extraList_isset) || - (__extraList_isset && ((__extraList || other->__extraList) && ![__extraList isEqual:other->__extraList]))) { - return NO; - } - if ((__error_isset != other->__error_isset) || - (__error_isset && ((__error || other->__error) && ![__error isEqual:other->__error]))) { - return NO; - } - if ((__extraMap_isset != other->__extraMap_isset) || - (__extraMap_isset && ((__extraMap || other->__extraMap) && ![__extraMap isEqual:other->__extraMap]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__threadId release_stub]; - [__fromTid release_stub]; - [__toTid release_stub]; - [__status release_stub]; - [__type release_stub]; - [__show release_stub]; - [__leaguerTid release_stub]; - [__extraList release_stub]; - [__error release_stub]; - [__extraMap release_stub]; - [super dealloc_stub]; -} - -- (NSString *) threadId { - return [[__threadId retain_stub] autorelease_stub]; -} - -- (void) setThreadId: (NSString *) threadId { - [threadId retain_stub]; - [__threadId release_stub]; - __threadId = threadId; - __threadId_isset = YES; -} - -- (BOOL) threadIdIsSet { - return __threadId_isset; -} - -- (void) unsetThreadId { - [__threadId release_stub]; - __threadId = nil; - __threadId_isset = NO; -} - -- (Tid *) fromTid { - return [[__fromTid retain_stub] autorelease_stub]; -} - -- (void) setFromTid: (Tid *) fromTid { - [fromTid retain_stub]; - [__fromTid release_stub]; - __fromTid = fromTid; - __fromTid_isset = YES; -} - -- (BOOL) fromTidIsSet { - return __fromTid_isset; -} - -- (void) unsetFromTid { - [__fromTid release_stub]; - __fromTid = nil; - __fromTid_isset = NO; -} - -- (Tid *) toTid { - return [[__toTid retain_stub] autorelease_stub]; -} - -- (void) setToTid: (Tid *) toTid { - [toTid retain_stub]; - [__toTid release_stub]; - __toTid = toTid; - __toTid_isset = YES; -} - -- (BOOL) toTidIsSet { - return __toTid_isset; -} - -- (void) unsetToTid { - [__toTid release_stub]; - __toTid = nil; - __toTid_isset = NO; -} - -- (NSString *) status { - return [[__status retain_stub] autorelease_stub]; -} - -- (void) setStatus: (NSString *) status { - [status retain_stub]; - [__status release_stub]; - __status = status; - __status_isset = YES; -} - -- (BOOL) statusIsSet { - return __status_isset; -} - -- (void) unsetStatus { - [__status release_stub]; - __status = nil; - __status_isset = NO; -} - -- (NSString *) type { - return [[__type retain_stub] autorelease_stub]; -} - -- (void) setType: (NSString *) type { - [type retain_stub]; - [__type release_stub]; - __type = type; - __type_isset = YES; -} - -- (BOOL) typeIsSet { - return __type_isset; -} - -- (void) unsetType { - [__type release_stub]; - __type = nil; - __type_isset = NO; -} - -- (int32_t) priority { - return __priority; -} - -- (void) setPriority: (int32_t) priority { - __priority = priority; - __priority_isset = YES; -} - -- (BOOL) priorityIsSet { - return __priority_isset; -} - -- (void) unsetPriority { - __priority_isset = NO; -} - -- (NSString *) show { - return [[__show retain_stub] autorelease_stub]; -} - -- (void) setShow: (NSString *) show { - [show retain_stub]; - [__show release_stub]; - __show = show; - __show_isset = YES; -} - -- (BOOL) showIsSet { - return __show_isset; -} - -- (void) unsetShow { - [__show release_stub]; - __show = nil; - __show_isset = NO; -} - -- (Tid *) leaguerTid { - return [[__leaguerTid retain_stub] autorelease_stub]; -} - -- (void) setLeaguerTid: (Tid *) leaguerTid { - [leaguerTid retain_stub]; - [__leaguerTid release_stub]; - __leaguerTid = leaguerTid; - __leaguerTid_isset = YES; -} - -- (BOOL) leaguerTidIsSet { - return __leaguerTid_isset; -} - -- (void) unsetLeaguerTid { - [__leaguerTid release_stub]; - __leaguerTid = nil; - __leaguerTid_isset = NO; -} - -- (NSMutableArray *) extraList { - return [[__extraList retain_stub] autorelease_stub]; -} - -- (void) setExtraList: (NSMutableArray *) extraList { - [extraList retain_stub]; - [__extraList release_stub]; - __extraList = extraList; - __extraList_isset = YES; -} - -- (BOOL) extraListIsSet { - return __extraList_isset; -} - -- (void) unsetExtraList { - [__extraList release_stub]; - __extraList = nil; - __extraList_isset = NO; -} - -- (TimError *) error { - return [[__error retain_stub] autorelease_stub]; -} - -- (void) setError: (TimError *) error { - [error retain_stub]; - [__error release_stub]; - __error = error; - __error_isset = YES; -} - -- (BOOL) errorIsSet { - return __error_isset; -} - -- (void) unsetError { - [__error release_stub]; - __error = nil; - __error_isset = NO; -} - -- (NSMutableDictionary *) extraMap { - return [[__extraMap retain_stub] autorelease_stub]; -} - -- (void) setExtraMap: (NSMutableDictionary *) extraMap { - [extraMap retain_stub]; - [__extraMap release_stub]; - __extraMap = extraMap; - __extraMap_isset = YES; -} - -- (BOOL) extraMapIsSet { - return __extraMap_isset; -} - -- (void) unsetExtraMap { - [__extraMap release_stub]; - __extraMap = nil; - __extraMap_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setThreadId: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRUCT) { - Tid *fieldValue = [[Tid alloc] init]; - [fieldValue read: inProtocol]; - [self setFromTid: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_STRUCT) { - Tid *fieldValue = [[Tid alloc] init]; - [fieldValue read: inProtocol]; - [self setToTid: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 4: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setStatus: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 5: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setType: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 6: - if (fieldType == TType_I32) { - int32_t fieldValue = [inProtocol readI32]; - [self setPriority: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 7: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setShow: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 8: - if (fieldType == TType_STRUCT) { - Tid *fieldValue = [[Tid alloc] init]; - [fieldValue read: inProtocol]; - [self setLeaguerTid: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 9: - if (fieldType == TType_LIST) { - int _size81; - [inProtocol readListBeginReturningElementType: NULL size: &_size81]; - NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size81]; - int _i82; - for (_i82 = 0; _i82 < _size81; ++_i82) - { - TimNode *_elem83 = [[TimNode alloc] init]; - [_elem83 read: inProtocol]; - [fieldValue addObject: _elem83]; - [_elem83 release_stub]; - } - [inProtocol readListEnd]; - [self setExtraList: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 10: - if (fieldType == TType_STRUCT) { - TimError *fieldValue = [[TimError alloc] init]; - [fieldValue read: inProtocol]; - [self setError: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 11: - if (fieldType == TType_MAP) { - int _size84; - [inProtocol readMapBeginReturningKeyType: NULL valueType: NULL size: &_size84]; - NSMutableDictionary * fieldValue = [[NSMutableDictionary alloc] initWithCapacity: _size84]; - int _i85; - for (_i85 = 0; _i85 < _size84; ++_i85) - { - NSString * _key86 = [inProtocol readString]; - NSString * _val87 = [inProtocol readString]; - [fieldValue setObject: _val87 forKey: _key86]; - } - [inProtocol readMapEnd]; - [self setExtraMap: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimPBean"]; - if (__threadId_isset) { - if (__threadId != nil) { - [outProtocol writeFieldBeginWithName: @"threadId" type: TType_STRING fieldID: 1]; - [outProtocol writeString: __threadId]; - [outProtocol writeFieldEnd]; - } - } - if (__fromTid_isset) { - if (__fromTid != nil) { - [outProtocol writeFieldBeginWithName: @"fromTid" type: TType_STRUCT fieldID: 2]; - [__fromTid write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__toTid_isset) { - if (__toTid != nil) { - [outProtocol writeFieldBeginWithName: @"toTid" type: TType_STRUCT fieldID: 3]; - [__toTid write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__status_isset) { - if (__status != nil) { - [outProtocol writeFieldBeginWithName: @"status" type: TType_STRING fieldID: 4]; - [outProtocol writeString: __status]; - [outProtocol writeFieldEnd]; - } - } - if (__type_isset) { - if (__type != nil) { - [outProtocol writeFieldBeginWithName: @"type" type: TType_STRING fieldID: 5]; - [outProtocol writeString: __type]; - [outProtocol writeFieldEnd]; - } - } - if (__priority_isset) { - [outProtocol writeFieldBeginWithName: @"priority" type: TType_I32 fieldID: 6]; - [outProtocol writeI32: __priority]; - [outProtocol writeFieldEnd]; - } - if (__show_isset) { - if (__show != nil) { - [outProtocol writeFieldBeginWithName: @"show" type: TType_STRING fieldID: 7]; - [outProtocol writeString: __show]; - [outProtocol writeFieldEnd]; - } - } - if (__leaguerTid_isset) { - if (__leaguerTid != nil) { - [outProtocol writeFieldBeginWithName: @"leaguerTid" type: TType_STRUCT fieldID: 8]; - [__leaguerTid write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__extraList_isset) { - if (__extraList != nil) { - [outProtocol writeFieldBeginWithName: @"extraList" type: TType_LIST fieldID: 9]; - { - [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__extraList count]]; - int idx89; - for (idx89 = 0; idx89 < [__extraList count]; idx89++) - { - [[__extraList objectAtIndex: idx89] write: outProtocol]; - } - [outProtocol writeListEnd]; - } - [outProtocol writeFieldEnd]; - } - } - if (__error_isset) { - if (__error != nil) { - [outProtocol writeFieldBeginWithName: @"error" type: TType_STRUCT fieldID: 10]; - [__error write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__extraMap_isset) { - if (__extraMap != nil) { - [outProtocol writeFieldBeginWithName: @"extraMap" type: TType_MAP fieldID: 11]; - { - [outProtocol writeMapBeginWithKeyType: TType_STRING valueType: TType_STRING size: [__extraMap count]]; - NSEnumerator * _iter90 = [__extraMap keyEnumerator]; - id key91; - while ((key91 = [_iter90 nextObject])) - { - [outProtocol writeString: key91]; - [outProtocol writeString: [__extraMap objectForKey: key91]]; - } - [outProtocol writeMapEnd]; - } - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields - if (!__threadId_isset) { - @throw [TProtocolException exceptionWithName: @"TProtocolException" - reason: @"Required field 'threadId' is not set."]; - } -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimPBean("]; - [ms appendString: @"threadId:"]; - [ms appendFormat: @"\"%@\"", __threadId]; - [ms appendString: @",fromTid:"]; - [ms appendFormat: @"%@", __fromTid]; - [ms appendString: @",toTid:"]; - [ms appendFormat: @"%@", __toTid]; - [ms appendString: @",status:"]; - [ms appendFormat: @"\"%@\"", __status]; - [ms appendString: @",type:"]; - [ms appendFormat: @"\"%@\"", __type]; - [ms appendString: @",priority:"]; - [ms appendFormat: @"%i", __priority]; - [ms appendString: @",show:"]; - [ms appendFormat: @"\"%@\"", __show]; - [ms appendString: @",leaguerTid:"]; - [ms appendFormat: @"%@", __leaguerTid]; - [ms appendString: @",extraList:"]; - [ms appendFormat: @"%@", __extraList]; - [ms appendString: @",error:"]; - [ms appendFormat: @"%@", __error]; - [ms appendString: @",extraMap:"]; - [ms appendFormat: @"%@", __extraMap]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation TimMBean - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithThreadId: (NSString *) threadId mid: (NSString *) mid fromTid: (Tid *) fromTid toTid: (Tid *) toTid body: (NSString *) body type: (NSString *) type msgType: (int16_t) msgType offline: (TimTime *) offline leaguerTid: (Tid *) leaguerTid extraList: (NSMutableArray *) extraList timestamp: (NSString *) timestamp error: (TimError *) error extraMap: (NSMutableDictionary *) extraMap readstatus: (int16_t) readstatus -{ - self = [super init]; - __threadId = [threadId retain_stub]; - __threadId_isset = YES; - __mid = [mid retain_stub]; - __mid_isset = YES; - __fromTid = [fromTid retain_stub]; - __fromTid_isset = YES; - __toTid = [toTid retain_stub]; - __toTid_isset = YES; - __body = [body retain_stub]; - __body_isset = YES; - __type = [type retain_stub]; - __type_isset = YES; - __msgType = msgType; - __msgType_isset = YES; - __offline = [offline retain_stub]; - __offline_isset = YES; - __leaguerTid = [leaguerTid retain_stub]; - __leaguerTid_isset = YES; - __extraList = [extraList retain_stub]; - __extraList_isset = YES; - __timestamp = [timestamp retain_stub]; - __timestamp_isset = YES; - __error = [error retain_stub]; - __error_isset = YES; - __extraMap = [extraMap retain_stub]; - __extraMap_isset = YES; - __readstatus = readstatus; - __readstatus_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"threadId"]) - { - __threadId = [[decoder decodeObjectForKey: @"threadId"] retain_stub]; - __threadId_isset = YES; - } - if ([decoder containsValueForKey: @"mid"]) - { - __mid = [[decoder decodeObjectForKey: @"mid"] retain_stub]; - __mid_isset = YES; - } - if ([decoder containsValueForKey: @"fromTid"]) - { - __fromTid = [[decoder decodeObjectForKey: @"fromTid"] retain_stub]; - __fromTid_isset = YES; - } - if ([decoder containsValueForKey: @"toTid"]) - { - __toTid = [[decoder decodeObjectForKey: @"toTid"] retain_stub]; - __toTid_isset = YES; - } - if ([decoder containsValueForKey: @"body"]) - { - __body = [[decoder decodeObjectForKey: @"body"] retain_stub]; - __body_isset = YES; - } - if ([decoder containsValueForKey: @"type"]) - { - __type = [[decoder decodeObjectForKey: @"type"] retain_stub]; - __type_isset = YES; - } - if ([decoder containsValueForKey: @"msgType"]) - { - __msgType = [decoder decodeIntForKey: @"msgType"]; - __msgType_isset = YES; - } - if ([decoder containsValueForKey: @"offline"]) - { - __offline = [[decoder decodeObjectForKey: @"offline"] retain_stub]; - __offline_isset = YES; - } - if ([decoder containsValueForKey: @"leaguerTid"]) - { - __leaguerTid = [[decoder decodeObjectForKey: @"leaguerTid"] retain_stub]; - __leaguerTid_isset = YES; - } - if ([decoder containsValueForKey: @"extraList"]) - { - __extraList = [[decoder decodeObjectForKey: @"extraList"] retain_stub]; - __extraList_isset = YES; - } - if ([decoder containsValueForKey: @"timestamp"]) - { - __timestamp = [[decoder decodeObjectForKey: @"timestamp"] retain_stub]; - __timestamp_isset = YES; - } - if ([decoder containsValueForKey: @"error"]) - { - __error = [[decoder decodeObjectForKey: @"error"] retain_stub]; - __error_isset = YES; - } - if ([decoder containsValueForKey: @"extraMap"]) - { - __extraMap = [[decoder decodeObjectForKey: @"extraMap"] retain_stub]; - __extraMap_isset = YES; - } - if ([decoder containsValueForKey: @"readstatus"]) - { - __readstatus = [decoder decodeIntForKey: @"readstatus"]; - __readstatus_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__threadId_isset) - { - [encoder encodeObject: __threadId forKey: @"threadId"]; - } - if (__mid_isset) - { - [encoder encodeObject: __mid forKey: @"mid"]; - } - if (__fromTid_isset) - { - [encoder encodeObject: __fromTid forKey: @"fromTid"]; - } - if (__toTid_isset) - { - [encoder encodeObject: __toTid forKey: @"toTid"]; - } - if (__body_isset) - { - [encoder encodeObject: __body forKey: @"body"]; - } - if (__type_isset) - { - [encoder encodeObject: __type forKey: @"type"]; - } - if (__msgType_isset) - { - [encoder encodeInt: __msgType forKey: @"msgType"]; - } - if (__offline_isset) - { - [encoder encodeObject: __offline forKey: @"offline"]; - } - if (__leaguerTid_isset) - { - [encoder encodeObject: __leaguerTid forKey: @"leaguerTid"]; - } - if (__extraList_isset) - { - [encoder encodeObject: __extraList forKey: @"extraList"]; - } - if (__timestamp_isset) - { - [encoder encodeObject: __timestamp forKey: @"timestamp"]; - } - if (__error_isset) - { - [encoder encodeObject: __error forKey: @"error"]; - } - if (__extraMap_isset) - { - [encoder encodeObject: __extraMap forKey: @"extraMap"]; - } - if (__readstatus_isset) - { - [encoder encodeInt: __readstatus forKey: @"readstatus"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __threadId_isset ? 2654435761 : 0; - if (__threadId_isset) - { - hash = (hash * 31) ^ [__threadId hash]; - } - hash = (hash * 31) ^ __mid_isset ? 2654435761 : 0; - if (__mid_isset) - { - hash = (hash * 31) ^ [__mid hash]; - } - hash = (hash * 31) ^ __fromTid_isset ? 2654435761 : 0; - if (__fromTid_isset) - { - hash = (hash * 31) ^ [__fromTid hash]; - } - hash = (hash * 31) ^ __toTid_isset ? 2654435761 : 0; - if (__toTid_isset) - { - hash = (hash * 31) ^ [__toTid hash]; - } - hash = (hash * 31) ^ __body_isset ? 2654435761 : 0; - if (__body_isset) - { - hash = (hash * 31) ^ [__body hash]; - } - hash = (hash * 31) ^ __type_isset ? 2654435761 : 0; - if (__type_isset) - { - hash = (hash * 31) ^ [__type hash]; - } - hash = (hash * 31) ^ __msgType_isset ? 2654435761 : 0; - if (__msgType_isset) - { - hash = (hash * 31) ^ [@(__msgType) hash]; - } - hash = (hash * 31) ^ __offline_isset ? 2654435761 : 0; - if (__offline_isset) - { - hash = (hash * 31) ^ [__offline hash]; - } - hash = (hash * 31) ^ __leaguerTid_isset ? 2654435761 : 0; - if (__leaguerTid_isset) - { - hash = (hash * 31) ^ [__leaguerTid hash]; - } - hash = (hash * 31) ^ __extraList_isset ? 2654435761 : 0; - if (__extraList_isset) - { - hash = (hash * 31) ^ [__extraList hash]; - } - hash = (hash * 31) ^ __timestamp_isset ? 2654435761 : 0; - if (__timestamp_isset) - { - hash = (hash * 31) ^ [__timestamp hash]; - } - hash = (hash * 31) ^ __error_isset ? 2654435761 : 0; - if (__error_isset) - { - hash = (hash * 31) ^ [__error hash]; - } - hash = (hash * 31) ^ __extraMap_isset ? 2654435761 : 0; - if (__extraMap_isset) - { - hash = (hash * 31) ^ [__extraMap hash]; - } - hash = (hash * 31) ^ __readstatus_isset ? 2654435761 : 0; - if (__readstatus_isset) - { - hash = (hash * 31) ^ [@(__readstatus) hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimMBean class]]) { - return NO; - } - TimMBean *other = (TimMBean *)anObject; - if ((__threadId_isset != other->__threadId_isset) || - (__threadId_isset && ((__threadId || other->__threadId) && ![__threadId isEqual:other->__threadId]))) { - return NO; - } - if ((__mid_isset != other->__mid_isset) || - (__mid_isset && ((__mid || other->__mid) && ![__mid isEqual:other->__mid]))) { - return NO; - } - if ((__fromTid_isset != other->__fromTid_isset) || - (__fromTid_isset && ((__fromTid || other->__fromTid) && ![__fromTid isEqual:other->__fromTid]))) { - return NO; - } - if ((__toTid_isset != other->__toTid_isset) || - (__toTid_isset && ((__toTid || other->__toTid) && ![__toTid isEqual:other->__toTid]))) { - return NO; - } - if ((__body_isset != other->__body_isset) || - (__body_isset && ((__body || other->__body) && ![__body isEqual:other->__body]))) { - return NO; - } - if ((__type_isset != other->__type_isset) || - (__type_isset && ((__type || other->__type) && ![__type isEqual:other->__type]))) { - return NO; - } - if ((__msgType_isset != other->__msgType_isset) || - (__msgType_isset && (__msgType != other->__msgType))) { - return NO; - } - if ((__offline_isset != other->__offline_isset) || - (__offline_isset && ((__offline || other->__offline) && ![__offline isEqual:other->__offline]))) { - return NO; - } - if ((__leaguerTid_isset != other->__leaguerTid_isset) || - (__leaguerTid_isset && ((__leaguerTid || other->__leaguerTid) && ![__leaguerTid isEqual:other->__leaguerTid]))) { - return NO; - } - if ((__extraList_isset != other->__extraList_isset) || - (__extraList_isset && ((__extraList || other->__extraList) && ![__extraList isEqual:other->__extraList]))) { - return NO; - } - if ((__timestamp_isset != other->__timestamp_isset) || - (__timestamp_isset && ((__timestamp || other->__timestamp) && ![__timestamp isEqual:other->__timestamp]))) { - return NO; - } - if ((__error_isset != other->__error_isset) || - (__error_isset && ((__error || other->__error) && ![__error isEqual:other->__error]))) { - return NO; - } - if ((__extraMap_isset != other->__extraMap_isset) || - (__extraMap_isset && ((__extraMap || other->__extraMap) && ![__extraMap isEqual:other->__extraMap]))) { - return NO; - } - if ((__readstatus_isset != other->__readstatus_isset) || - (__readstatus_isset && (__readstatus != other->__readstatus))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__threadId release_stub]; - [__mid release_stub]; - [__fromTid release_stub]; - [__toTid release_stub]; - [__body release_stub]; - [__type release_stub]; - [__offline release_stub]; - [__leaguerTid release_stub]; - [__extraList release_stub]; - [__timestamp release_stub]; - [__error release_stub]; - [__extraMap release_stub]; - [super dealloc_stub]; -} - -- (NSString *) threadId { - return [[__threadId retain_stub] autorelease_stub]; -} - -- (void) setThreadId: (NSString *) threadId { - [threadId retain_stub]; - [__threadId release_stub]; - __threadId = threadId; - __threadId_isset = YES; -} - -- (BOOL) threadIdIsSet { - return __threadId_isset; -} - -- (void) unsetThreadId { - [__threadId release_stub]; - __threadId = nil; - __threadId_isset = NO; -} - -- (NSString *) mid { - return [[__mid retain_stub] autorelease_stub]; -} - -- (void) setMid: (NSString *) mid { - [mid retain_stub]; - [__mid release_stub]; - __mid = mid; - __mid_isset = YES; -} - -- (BOOL) midIsSet { - return __mid_isset; -} - -- (void) unsetMid { - [__mid release_stub]; - __mid = nil; - __mid_isset = NO; -} - -- (Tid *) fromTid { - return [[__fromTid retain_stub] autorelease_stub]; -} - -- (void) setFromTid: (Tid *) fromTid { - [fromTid retain_stub]; - [__fromTid release_stub]; - __fromTid = fromTid; - __fromTid_isset = YES; -} - -- (BOOL) fromTidIsSet { - return __fromTid_isset; -} - -- (void) unsetFromTid { - [__fromTid release_stub]; - __fromTid = nil; - __fromTid_isset = NO; -} - -- (Tid *) toTid { - return [[__toTid retain_stub] autorelease_stub]; -} - -- (void) setToTid: (Tid *) toTid { - [toTid retain_stub]; - [__toTid release_stub]; - __toTid = toTid; - __toTid_isset = YES; -} - -- (BOOL) toTidIsSet { - return __toTid_isset; -} - -- (void) unsetToTid { - [__toTid release_stub]; - __toTid = nil; - __toTid_isset = NO; -} - -- (NSString *) body { - return [[__body retain_stub] autorelease_stub]; -} - -- (void) setBody: (NSString *) body { - [body retain_stub]; - [__body release_stub]; - __body = body; - __body_isset = YES; -} - -- (BOOL) bodyIsSet { - return __body_isset; -} - -- (void) unsetBody { - [__body release_stub]; - __body = nil; - __body_isset = NO; -} - -- (NSString *) type { - return [[__type retain_stub] autorelease_stub]; -} - -- (void) setType: (NSString *) type { - [type retain_stub]; - [__type release_stub]; - __type = type; - __type_isset = YES; -} - -- (BOOL) typeIsSet { - return __type_isset; -} - -- (void) unsetType { - [__type release_stub]; - __type = nil; - __type_isset = NO; -} - -- (int16_t) msgType { - return __msgType; -} - -- (void) setMsgType: (int16_t) msgType { - __msgType = msgType; - __msgType_isset = YES; -} - -- (BOOL) msgTypeIsSet { - return __msgType_isset; -} - -- (void) unsetMsgType { - __msgType_isset = NO; -} - -- (TimTime *) offline { - return [[__offline retain_stub] autorelease_stub]; -} - -- (void) setOffline: (TimTime *) offline { - [offline retain_stub]; - [__offline release_stub]; - __offline = offline; - __offline_isset = YES; -} - -- (BOOL) offlineIsSet { - return __offline_isset; -} - -- (void) unsetOffline { - [__offline release_stub]; - __offline = nil; - __offline_isset = NO; -} - -- (Tid *) leaguerTid { - return [[__leaguerTid retain_stub] autorelease_stub]; -} - -- (void) setLeaguerTid: (Tid *) leaguerTid { - [leaguerTid retain_stub]; - [__leaguerTid release_stub]; - __leaguerTid = leaguerTid; - __leaguerTid_isset = YES; -} - -- (BOOL) leaguerTidIsSet { - return __leaguerTid_isset; -} - -- (void) unsetLeaguerTid { - [__leaguerTid release_stub]; - __leaguerTid = nil; - __leaguerTid_isset = NO; -} - -- (NSMutableArray *) extraList { - return [[__extraList retain_stub] autorelease_stub]; -} - -- (void) setExtraList: (NSMutableArray *) extraList { - [extraList retain_stub]; - [__extraList release_stub]; - __extraList = extraList; - __extraList_isset = YES; -} - -- (BOOL) extraListIsSet { - return __extraList_isset; -} - -- (void) unsetExtraList { - [__extraList release_stub]; - __extraList = nil; - __extraList_isset = NO; -} - -- (NSString *) timestamp { - return [[__timestamp retain_stub] autorelease_stub]; -} - -- (void) setTimestamp: (NSString *) timestamp { - [timestamp retain_stub]; - [__timestamp release_stub]; - __timestamp = timestamp; - __timestamp_isset = YES; -} - -- (BOOL) timestampIsSet { - return __timestamp_isset; -} - -- (void) unsetTimestamp { - [__timestamp release_stub]; - __timestamp = nil; - __timestamp_isset = NO; -} - -- (TimError *) error { - return [[__error retain_stub] autorelease_stub]; -} - -- (void) setError: (TimError *) error { - [error retain_stub]; - [__error release_stub]; - __error = error; - __error_isset = YES; -} - -- (BOOL) errorIsSet { - return __error_isset; -} - -- (void) unsetError { - [__error release_stub]; - __error = nil; - __error_isset = NO; -} - -- (NSMutableDictionary *) extraMap { - return [[__extraMap retain_stub] autorelease_stub]; -} - -- (void) setExtraMap: (NSMutableDictionary *) extraMap { - [extraMap retain_stub]; - [__extraMap release_stub]; - __extraMap = extraMap; - __extraMap_isset = YES; -} - -- (BOOL) extraMapIsSet { - return __extraMap_isset; -} - -- (void) unsetExtraMap { - [__extraMap release_stub]; - __extraMap = nil; - __extraMap_isset = NO; -} - -- (int16_t) readstatus { - return __readstatus; -} - -- (void) setReadstatus: (int16_t) readstatus { - __readstatus = readstatus; - __readstatus_isset = YES; -} - -- (BOOL) readstatusIsSet { - return __readstatus_isset; -} - -- (void) unsetReadstatus { - __readstatus_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setThreadId: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setMid: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_STRUCT) { - Tid *fieldValue = [[Tid alloc] init]; - [fieldValue read: inProtocol]; - [self setFromTid: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 4: - if (fieldType == TType_STRUCT) { - Tid *fieldValue = [[Tid alloc] init]; - [fieldValue read: inProtocol]; - [self setToTid: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 5: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setBody: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 6: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setType: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 7: - if (fieldType == TType_I16) { - int16_t fieldValue = [inProtocol readI16]; - [self setMsgType: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 8: - if (fieldType == TType_STRUCT) { - TimTime *fieldValue = [[TimTime alloc] init]; - [fieldValue read: inProtocol]; - [self setOffline: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 9: - if (fieldType == TType_STRUCT) { - Tid *fieldValue = [[Tid alloc] init]; - [fieldValue read: inProtocol]; - [self setLeaguerTid: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 10: - if (fieldType == TType_LIST) { - int _size92; - [inProtocol readListBeginReturningElementType: NULL size: &_size92]; - NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size92]; - int _i93; - for (_i93 = 0; _i93 < _size92; ++_i93) - { - TimNode *_elem94 = [[TimNode alloc] init]; - [_elem94 read: inProtocol]; - [fieldValue addObject: _elem94]; - [_elem94 release_stub]; - } - [inProtocol readListEnd]; - [self setExtraList: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 11: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setTimestamp: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 12: - if (fieldType == TType_STRUCT) { - TimError *fieldValue = [[TimError alloc] init]; - [fieldValue read: inProtocol]; - [self setError: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 13: - if (fieldType == TType_MAP) { - int _size95; - [inProtocol readMapBeginReturningKeyType: NULL valueType: NULL size: &_size95]; - NSMutableDictionary * fieldValue = [[NSMutableDictionary alloc] initWithCapacity: _size95]; - int _i96; - for (_i96 = 0; _i96 < _size95; ++_i96) - { - NSString * _key97 = [inProtocol readString]; - NSString * _val98 = [inProtocol readString]; - [fieldValue setObject: _val98 forKey: _key97]; - } - [inProtocol readMapEnd]; - [self setExtraMap: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 14: - if (fieldType == TType_I16) { - int16_t fieldValue = [inProtocol readI16]; - [self setReadstatus: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimMBean"]; - if (__threadId_isset) { - if (__threadId != nil) { - [outProtocol writeFieldBeginWithName: @"threadId" type: TType_STRING fieldID: 1]; - [outProtocol writeString: __threadId]; - [outProtocol writeFieldEnd]; - } - } - if (__mid_isset) { - if (__mid != nil) { - [outProtocol writeFieldBeginWithName: @"mid" type: TType_STRING fieldID: 2]; - [outProtocol writeString: __mid]; - [outProtocol writeFieldEnd]; - } - } - if (__fromTid_isset) { - if (__fromTid != nil) { - [outProtocol writeFieldBeginWithName: @"fromTid" type: TType_STRUCT fieldID: 3]; - [__fromTid write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__toTid_isset) { - if (__toTid != nil) { - [outProtocol writeFieldBeginWithName: @"toTid" type: TType_STRUCT fieldID: 4]; - [__toTid write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__body_isset) { - if (__body != nil) { - [outProtocol writeFieldBeginWithName: @"body" type: TType_STRING fieldID: 5]; - [outProtocol writeString: __body]; - [outProtocol writeFieldEnd]; - } - } - if (__type_isset) { - if (__type != nil) { - [outProtocol writeFieldBeginWithName: @"type" type: TType_STRING fieldID: 6]; - [outProtocol writeString: __type]; - [outProtocol writeFieldEnd]; - } - } - if (__msgType_isset) { - [outProtocol writeFieldBeginWithName: @"msgType" type: TType_I16 fieldID: 7]; - [outProtocol writeI16: __msgType]; - [outProtocol writeFieldEnd]; - } - if (__offline_isset) { - if (__offline != nil) { - [outProtocol writeFieldBeginWithName: @"offline" type: TType_STRUCT fieldID: 8]; - [__offline write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__leaguerTid_isset) { - if (__leaguerTid != nil) { - [outProtocol writeFieldBeginWithName: @"leaguerTid" type: TType_STRUCT fieldID: 9]; - [__leaguerTid write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__extraList_isset) { - if (__extraList != nil) { - [outProtocol writeFieldBeginWithName: @"extraList" type: TType_LIST fieldID: 10]; - { - [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__extraList count]]; - int idx100; - for (idx100 = 0; idx100 < [__extraList count]; idx100++) - { - [[__extraList objectAtIndex: idx100] write: outProtocol]; - } - [outProtocol writeListEnd]; - } - [outProtocol writeFieldEnd]; - } - } - if (__timestamp_isset) { - if (__timestamp != nil) { - [outProtocol writeFieldBeginWithName: @"timestamp" type: TType_STRING fieldID: 11]; - [outProtocol writeString: __timestamp]; - [outProtocol writeFieldEnd]; - } - } - if (__error_isset) { - if (__error != nil) { - [outProtocol writeFieldBeginWithName: @"error" type: TType_STRUCT fieldID: 12]; - [__error write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__extraMap_isset) { - if (__extraMap != nil) { - [outProtocol writeFieldBeginWithName: @"extraMap" type: TType_MAP fieldID: 13]; - { - [outProtocol writeMapBeginWithKeyType: TType_STRING valueType: TType_STRING size: [__extraMap count]]; - NSEnumerator * _iter101 = [__extraMap keyEnumerator]; - id key102; - while ((key102 = [_iter101 nextObject])) - { - [outProtocol writeString: key102]; - [outProtocol writeString: [__extraMap objectForKey: key102]]; - } - [outProtocol writeMapEnd]; - } - [outProtocol writeFieldEnd]; - } - } - if (__readstatus_isset) { - [outProtocol writeFieldBeginWithName: @"readstatus" type: TType_I16 fieldID: 14]; - [outProtocol writeI16: __readstatus]; - [outProtocol writeFieldEnd]; - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields - if (!__threadId_isset) { - @throw [TProtocolException exceptionWithName: @"TProtocolException" - reason: @"Required field 'threadId' is not set."]; - } -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimMBean("]; - [ms appendString: @"threadId:"]; - [ms appendFormat: @"\"%@\"", __threadId]; - [ms appendString: @",mid:"]; - [ms appendFormat: @"\"%@\"", __mid]; - [ms appendString: @",fromTid:"]; - [ms appendFormat: @"%@", __fromTid]; - [ms appendString: @",toTid:"]; - [ms appendFormat: @"%@", __toTid]; - [ms appendString: @",body:"]; - [ms appendFormat: @"\"%@\"", __body]; - [ms appendString: @",type:"]; - [ms appendFormat: @"\"%@\"", __type]; - [ms appendString: @",msgType:"]; - [ms appendFormat: @"%hi", __msgType]; - [ms appendString: @",offline:"]; - [ms appendFormat: @"%@", __offline]; - [ms appendString: @",leaguerTid:"]; - [ms appendFormat: @"%@", __leaguerTid]; - [ms appendString: @",extraList:"]; - [ms appendFormat: @"%@", __extraList]; - [ms appendString: @",timestamp:"]; - [ms appendFormat: @"\"%@\"", __timestamp]; - [ms appendString: @",error:"]; - [ms appendFormat: @"%@", __error]; - [ms appendString: @",extraMap:"]; - [ms appendFormat: @"%@", __extraMap]; - [ms appendString: @",readstatus:"]; - [ms appendFormat: @"%hi", __readstatus]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation TimIqBean - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithThreadId: (NSString *) threadId fromTid: (Tid *) fromTid toTid: (Tid *) toTid type: (NSString *) type extraList: (NSMutableArray *) extraList error: (TimError *) error extraMap: (NSMutableDictionary *) extraMap -{ - self = [super init]; - __threadId = [threadId retain_stub]; - __threadId_isset = YES; - __fromTid = [fromTid retain_stub]; - __fromTid_isset = YES; - __toTid = [toTid retain_stub]; - __toTid_isset = YES; - __type = [type retain_stub]; - __type_isset = YES; - __extraList = [extraList retain_stub]; - __extraList_isset = YES; - __error = [error retain_stub]; - __error_isset = YES; - __extraMap = [extraMap retain_stub]; - __extraMap_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"threadId"]) - { - __threadId = [[decoder decodeObjectForKey: @"threadId"] retain_stub]; - __threadId_isset = YES; - } - if ([decoder containsValueForKey: @"fromTid"]) - { - __fromTid = [[decoder decodeObjectForKey: @"fromTid"] retain_stub]; - __fromTid_isset = YES; - } - if ([decoder containsValueForKey: @"toTid"]) - { - __toTid = [[decoder decodeObjectForKey: @"toTid"] retain_stub]; - __toTid_isset = YES; - } - if ([decoder containsValueForKey: @"type"]) - { - __type = [[decoder decodeObjectForKey: @"type"] retain_stub]; - __type_isset = YES; - } - if ([decoder containsValueForKey: @"extraList"]) - { - __extraList = [[decoder decodeObjectForKey: @"extraList"] retain_stub]; - __extraList_isset = YES; - } - if ([decoder containsValueForKey: @"error"]) - { - __error = [[decoder decodeObjectForKey: @"error"] retain_stub]; - __error_isset = YES; - } - if ([decoder containsValueForKey: @"extraMap"]) - { - __extraMap = [[decoder decodeObjectForKey: @"extraMap"] retain_stub]; - __extraMap_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__threadId_isset) - { - [encoder encodeObject: __threadId forKey: @"threadId"]; - } - if (__fromTid_isset) - { - [encoder encodeObject: __fromTid forKey: @"fromTid"]; - } - if (__toTid_isset) - { - [encoder encodeObject: __toTid forKey: @"toTid"]; - } - if (__type_isset) - { - [encoder encodeObject: __type forKey: @"type"]; - } - if (__extraList_isset) - { - [encoder encodeObject: __extraList forKey: @"extraList"]; - } - if (__error_isset) - { - [encoder encodeObject: __error forKey: @"error"]; - } - if (__extraMap_isset) - { - [encoder encodeObject: __extraMap forKey: @"extraMap"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __threadId_isset ? 2654435761 : 0; - if (__threadId_isset) - { - hash = (hash * 31) ^ [__threadId hash]; - } - hash = (hash * 31) ^ __fromTid_isset ? 2654435761 : 0; - if (__fromTid_isset) - { - hash = (hash * 31) ^ [__fromTid hash]; - } - hash = (hash * 31) ^ __toTid_isset ? 2654435761 : 0; - if (__toTid_isset) - { - hash = (hash * 31) ^ [__toTid hash]; - } - hash = (hash * 31) ^ __type_isset ? 2654435761 : 0; - if (__type_isset) - { - hash = (hash * 31) ^ [__type hash]; - } - hash = (hash * 31) ^ __extraList_isset ? 2654435761 : 0; - if (__extraList_isset) - { - hash = (hash * 31) ^ [__extraList hash]; - } - hash = (hash * 31) ^ __error_isset ? 2654435761 : 0; - if (__error_isset) - { - hash = (hash * 31) ^ [__error hash]; - } - hash = (hash * 31) ^ __extraMap_isset ? 2654435761 : 0; - if (__extraMap_isset) - { - hash = (hash * 31) ^ [__extraMap hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimIqBean class]]) { - return NO; - } - TimIqBean *other = (TimIqBean *)anObject; - if ((__threadId_isset != other->__threadId_isset) || - (__threadId_isset && ((__threadId || other->__threadId) && ![__threadId isEqual:other->__threadId]))) { - return NO; - } - if ((__fromTid_isset != other->__fromTid_isset) || - (__fromTid_isset && ((__fromTid || other->__fromTid) && ![__fromTid isEqual:other->__fromTid]))) { - return NO; - } - if ((__toTid_isset != other->__toTid_isset) || - (__toTid_isset && ((__toTid || other->__toTid) && ![__toTid isEqual:other->__toTid]))) { - return NO; - } - if ((__type_isset != other->__type_isset) || - (__type_isset && ((__type || other->__type) && ![__type isEqual:other->__type]))) { - return NO; - } - if ((__extraList_isset != other->__extraList_isset) || - (__extraList_isset && ((__extraList || other->__extraList) && ![__extraList isEqual:other->__extraList]))) { - return NO; - } - if ((__error_isset != other->__error_isset) || - (__error_isset && ((__error || other->__error) && ![__error isEqual:other->__error]))) { - return NO; - } - if ((__extraMap_isset != other->__extraMap_isset) || - (__extraMap_isset && ((__extraMap || other->__extraMap) && ![__extraMap isEqual:other->__extraMap]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__threadId release_stub]; - [__fromTid release_stub]; - [__toTid release_stub]; - [__type release_stub]; - [__extraList release_stub]; - [__error release_stub]; - [__extraMap release_stub]; - [super dealloc_stub]; -} - -- (NSString *) threadId { - return [[__threadId retain_stub] autorelease_stub]; -} - -- (void) setThreadId: (NSString *) threadId { - [threadId retain_stub]; - [__threadId release_stub]; - __threadId = threadId; - __threadId_isset = YES; -} - -- (BOOL) threadIdIsSet { - return __threadId_isset; -} - -- (void) unsetThreadId { - [__threadId release_stub]; - __threadId = nil; - __threadId_isset = NO; -} - -- (Tid *) fromTid { - return [[__fromTid retain_stub] autorelease_stub]; -} - -- (void) setFromTid: (Tid *) fromTid { - [fromTid retain_stub]; - [__fromTid release_stub]; - __fromTid = fromTid; - __fromTid_isset = YES; -} - -- (BOOL) fromTidIsSet { - return __fromTid_isset; -} - -- (void) unsetFromTid { - [__fromTid release_stub]; - __fromTid = nil; - __fromTid_isset = NO; -} - -- (Tid *) toTid { - return [[__toTid retain_stub] autorelease_stub]; -} - -- (void) setToTid: (Tid *) toTid { - [toTid retain_stub]; - [__toTid release_stub]; - __toTid = toTid; - __toTid_isset = YES; -} - -- (BOOL) toTidIsSet { - return __toTid_isset; -} - -- (void) unsetToTid { - [__toTid release_stub]; - __toTid = nil; - __toTid_isset = NO; -} - -- (NSString *) type { - return [[__type retain_stub] autorelease_stub]; -} - -- (void) setType: (NSString *) type { - [type retain_stub]; - [__type release_stub]; - __type = type; - __type_isset = YES; -} - -- (BOOL) typeIsSet { - return __type_isset; -} - -- (void) unsetType { - [__type release_stub]; - __type = nil; - __type_isset = NO; -} - -- (NSMutableArray *) extraList { - return [[__extraList retain_stub] autorelease_stub]; -} - -- (void) setExtraList: (NSMutableArray *) extraList { - [extraList retain_stub]; - [__extraList release_stub]; - __extraList = extraList; - __extraList_isset = YES; -} - -- (BOOL) extraListIsSet { - return __extraList_isset; -} - -- (void) unsetExtraList { - [__extraList release_stub]; - __extraList = nil; - __extraList_isset = NO; -} - -- (TimError *) error { - return [[__error retain_stub] autorelease_stub]; -} - -- (void) setError: (TimError *) error { - [error retain_stub]; - [__error release_stub]; - __error = error; - __error_isset = YES; -} - -- (BOOL) errorIsSet { - return __error_isset; -} - -- (void) unsetError { - [__error release_stub]; - __error = nil; - __error_isset = NO; -} - -- (NSMutableDictionary *) extraMap { - return [[__extraMap retain_stub] autorelease_stub]; -} - -- (void) setExtraMap: (NSMutableDictionary *) extraMap { - [extraMap retain_stub]; - [__extraMap release_stub]; - __extraMap = extraMap; - __extraMap_isset = YES; -} - -- (BOOL) extraMapIsSet { - return __extraMap_isset; -} - -- (void) unsetExtraMap { - [__extraMap release_stub]; - __extraMap = nil; - __extraMap_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setThreadId: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRUCT) { - Tid *fieldValue = [[Tid alloc] init]; - [fieldValue read: inProtocol]; - [self setFromTid: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_STRUCT) { - Tid *fieldValue = [[Tid alloc] init]; - [fieldValue read: inProtocol]; - [self setToTid: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 4: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setType: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 5: - if (fieldType == TType_LIST) { - int _size103; - [inProtocol readListBeginReturningElementType: NULL size: &_size103]; - NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size103]; - int _i104; - for (_i104 = 0; _i104 < _size103; ++_i104) - { - TimNode *_elem105 = [[TimNode alloc] init]; - [_elem105 read: inProtocol]; - [fieldValue addObject: _elem105]; - [_elem105 release_stub]; - } - [inProtocol readListEnd]; - [self setExtraList: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 6: - if (fieldType == TType_STRUCT) { - TimError *fieldValue = [[TimError alloc] init]; - [fieldValue read: inProtocol]; - [self setError: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 7: - if (fieldType == TType_MAP) { - int _size106; - [inProtocol readMapBeginReturningKeyType: NULL valueType: NULL size: &_size106]; - NSMutableDictionary * fieldValue = [[NSMutableDictionary alloc] initWithCapacity: _size106]; - int _i107; - for (_i107 = 0; _i107 < _size106; ++_i107) - { - NSString * _key108 = [inProtocol readString]; - NSString * _val109 = [inProtocol readString]; - [fieldValue setObject: _val109 forKey: _key108]; - } - [inProtocol readMapEnd]; - [self setExtraMap: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimIqBean"]; - if (__threadId_isset) { - if (__threadId != nil) { - [outProtocol writeFieldBeginWithName: @"threadId" type: TType_STRING fieldID: 1]; - [outProtocol writeString: __threadId]; - [outProtocol writeFieldEnd]; - } - } - if (__fromTid_isset) { - if (__fromTid != nil) { - [outProtocol writeFieldBeginWithName: @"fromTid" type: TType_STRUCT fieldID: 2]; - [__fromTid write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__toTid_isset) { - if (__toTid != nil) { - [outProtocol writeFieldBeginWithName: @"toTid" type: TType_STRUCT fieldID: 3]; - [__toTid write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__type_isset) { - if (__type != nil) { - [outProtocol writeFieldBeginWithName: @"type" type: TType_STRING fieldID: 4]; - [outProtocol writeString: __type]; - [outProtocol writeFieldEnd]; - } - } - if (__extraList_isset) { - if (__extraList != nil) { - [outProtocol writeFieldBeginWithName: @"extraList" type: TType_LIST fieldID: 5]; - { - [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__extraList count]]; - int idx111; - for (idx111 = 0; idx111 < [__extraList count]; idx111++) - { - [[__extraList objectAtIndex: idx111] write: outProtocol]; - } - [outProtocol writeListEnd]; - } - [outProtocol writeFieldEnd]; - } - } - if (__error_isset) { - if (__error != nil) { - [outProtocol writeFieldBeginWithName: @"error" type: TType_STRUCT fieldID: 6]; - [__error write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__extraMap_isset) { - if (__extraMap != nil) { - [outProtocol writeFieldBeginWithName: @"extraMap" type: TType_MAP fieldID: 7]; - { - [outProtocol writeMapBeginWithKeyType: TType_STRING valueType: TType_STRING size: [__extraMap count]]; - NSEnumerator * _iter112 = [__extraMap keyEnumerator]; - id key113; - while ((key113 = [_iter112 nextObject])) - { - [outProtocol writeString: key113]; - [outProtocol writeString: [__extraMap objectForKey: key113]]; - } - [outProtocol writeMapEnd]; - } - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields - if (!__threadId_isset) { - @throw [TProtocolException exceptionWithName: @"TProtocolException" - reason: @"Required field 'threadId' is not set."]; - } -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimIqBean("]; - [ms appendString: @"threadId:"]; - [ms appendFormat: @"\"%@\"", __threadId]; - [ms appendString: @",fromTid:"]; - [ms appendFormat: @"%@", __fromTid]; - [ms appendString: @",toTid:"]; - [ms appendFormat: @"%@", __toTid]; - [ms appendString: @",type:"]; - [ms appendFormat: @"\"%@\"", __type]; - [ms appendString: @",extraList:"]; - [ms appendFormat: @"%@", __extraList]; - [ms appendString: @",error:"]; - [ms appendFormat: @"%@", __error]; - [ms appendString: @",extraMap:"]; - [ms appendFormat: @"%@", __extraMap]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation TimRoster - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithSubscription: (NSString *) subscription tid: (Tid *) tid name: (NSString *) name extraMap: (NSMutableDictionary *) extraMap -{ - self = [super init]; - __subscription = [subscription retain_stub]; - __subscription_isset = YES; - __tid = [tid retain_stub]; - __tid_isset = YES; - __name = [name retain_stub]; - __name_isset = YES; - __extraMap = [extraMap retain_stub]; - __extraMap_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"subscription"]) - { - __subscription = [[decoder decodeObjectForKey: @"subscription"] retain_stub]; - __subscription_isset = YES; - } - if ([decoder containsValueForKey: @"tid"]) - { - __tid = [[decoder decodeObjectForKey: @"tid"] retain_stub]; - __tid_isset = YES; - } - if ([decoder containsValueForKey: @"name"]) - { - __name = [[decoder decodeObjectForKey: @"name"] retain_stub]; - __name_isset = YES; - } - if ([decoder containsValueForKey: @"extraMap"]) - { - __extraMap = [[decoder decodeObjectForKey: @"extraMap"] retain_stub]; - __extraMap_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__subscription_isset) - { - [encoder encodeObject: __subscription forKey: @"subscription"]; - } - if (__tid_isset) - { - [encoder encodeObject: __tid forKey: @"tid"]; - } - if (__name_isset) - { - [encoder encodeObject: __name forKey: @"name"]; - } - if (__extraMap_isset) - { - [encoder encodeObject: __extraMap forKey: @"extraMap"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __subscription_isset ? 2654435761 : 0; - if (__subscription_isset) - { - hash = (hash * 31) ^ [__subscription hash]; - } - hash = (hash * 31) ^ __tid_isset ? 2654435761 : 0; - if (__tid_isset) - { - hash = (hash * 31) ^ [__tid hash]; - } - hash = (hash * 31) ^ __name_isset ? 2654435761 : 0; - if (__name_isset) - { - hash = (hash * 31) ^ [__name hash]; - } - hash = (hash * 31) ^ __extraMap_isset ? 2654435761 : 0; - if (__extraMap_isset) - { - hash = (hash * 31) ^ [__extraMap hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimRoster class]]) { - return NO; - } - TimRoster *other = (TimRoster *)anObject; - if ((__subscription_isset != other->__subscription_isset) || - (__subscription_isset && ((__subscription || other->__subscription) && ![__subscription isEqual:other->__subscription]))) { - return NO; - } - if ((__tid_isset != other->__tid_isset) || - (__tid_isset && ((__tid || other->__tid) && ![__tid isEqual:other->__tid]))) { - return NO; - } - if ((__name_isset != other->__name_isset) || - (__name_isset && ((__name || other->__name) && ![__name isEqual:other->__name]))) { - return NO; - } - if ((__extraMap_isset != other->__extraMap_isset) || - (__extraMap_isset && ((__extraMap || other->__extraMap) && ![__extraMap isEqual:other->__extraMap]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__subscription release_stub]; - [__tid release_stub]; - [__name release_stub]; - [__extraMap release_stub]; - [super dealloc_stub]; -} - -- (NSString *) subscription { - return [[__subscription retain_stub] autorelease_stub]; -} - -- (void) setSubscription: (NSString *) subscription { - [subscription retain_stub]; - [__subscription release_stub]; - __subscription = subscription; - __subscription_isset = YES; -} - -- (BOOL) subscriptionIsSet { - return __subscription_isset; -} - -- (void) unsetSubscription { - [__subscription release_stub]; - __subscription = nil; - __subscription_isset = NO; -} - -- (Tid *) tid { - return [[__tid retain_stub] autorelease_stub]; -} - -- (void) setTid: (Tid *) tid { - [tid retain_stub]; - [__tid release_stub]; - __tid = tid; - __tid_isset = YES; -} - -- (BOOL) tidIsSet { - return __tid_isset; -} - -- (void) unsetTid { - [__tid release_stub]; - __tid = nil; - __tid_isset = NO; -} - -- (NSString *) name { - return [[__name retain_stub] autorelease_stub]; -} - -- (void) setName: (NSString *) name { - [name retain_stub]; - [__name release_stub]; - __name = name; - __name_isset = YES; -} - -- (BOOL) nameIsSet { - return __name_isset; -} - -- (void) unsetName { - [__name release_stub]; - __name = nil; - __name_isset = NO; -} - -- (NSMutableDictionary *) extraMap { - return [[__extraMap retain_stub] autorelease_stub]; -} - -- (void) setExtraMap: (NSMutableDictionary *) extraMap { - [extraMap retain_stub]; - [__extraMap release_stub]; - __extraMap = extraMap; - __extraMap_isset = YES; -} - -- (BOOL) extraMapIsSet { - return __extraMap_isset; -} - -- (void) unsetExtraMap { - [__extraMap release_stub]; - __extraMap = nil; - __extraMap_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setSubscription: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRUCT) { - Tid *fieldValue = [[Tid alloc] init]; - [fieldValue read: inProtocol]; - [self setTid: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setName: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 4: - if (fieldType == TType_MAP) { - int _size114; - [inProtocol readMapBeginReturningKeyType: NULL valueType: NULL size: &_size114]; - NSMutableDictionary * fieldValue = [[NSMutableDictionary alloc] initWithCapacity: _size114]; - int _i115; - for (_i115 = 0; _i115 < _size114; ++_i115) - { - NSString * _key116 = [inProtocol readString]; - NSString * _val117 = [inProtocol readString]; - [fieldValue setObject: _val117 forKey: _key116]; - } - [inProtocol readMapEnd]; - [self setExtraMap: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimRoster"]; - if (__subscription_isset) { - if (__subscription != nil) { - [outProtocol writeFieldBeginWithName: @"subscription" type: TType_STRING fieldID: 1]; - [outProtocol writeString: __subscription]; - [outProtocol writeFieldEnd]; - } - } - if (__tid_isset) { - if (__tid != nil) { - [outProtocol writeFieldBeginWithName: @"tid" type: TType_STRUCT fieldID: 2]; - [__tid write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__name_isset) { - if (__name != nil) { - [outProtocol writeFieldBeginWithName: @"name" type: TType_STRING fieldID: 3]; - [outProtocol writeString: __name]; - [outProtocol writeFieldEnd]; - } - } - if (__extraMap_isset) { - if (__extraMap != nil) { - [outProtocol writeFieldBeginWithName: @"extraMap" type: TType_MAP fieldID: 4]; - { - [outProtocol writeMapBeginWithKeyType: TType_STRING valueType: TType_STRING size: [__extraMap count]]; - NSEnumerator * _iter118 = [__extraMap keyEnumerator]; - id key119; - while ((key119 = [_iter118 nextObject])) - { - [outProtocol writeString: key119]; - [outProtocol writeString: [__extraMap objectForKey: key119]]; - } - [outProtocol writeMapEnd]; - } - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields - if (!__subscription_isset) { - @throw [TProtocolException exceptionWithName: @"TProtocolException" - reason: @"Required field 'subscription' is not set."]; - } - if (!__tid_isset) { - @throw [TProtocolException exceptionWithName: @"TProtocolException" - reason: @"Required field 'tid' is not set."]; - } -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimRoster("]; - [ms appendString: @"subscription:"]; - [ms appendFormat: @"\"%@\"", __subscription]; - [ms appendString: @",tid:"]; - [ms appendFormat: @"%@", __tid]; - [ms appendString: @",name:"]; - [ms appendFormat: @"\"%@\"", __name]; - [ms appendString: @",extraMap:"]; - [ms appendFormat: @"%@", __extraMap]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation TimRemoteUserBean - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithError: (TimError *) error ub: (TimUserBean *) ub extraMap: (NSMutableDictionary *) extraMap -{ - self = [super init]; - __error = [error retain_stub]; - __error_isset = YES; - __ub = [ub retain_stub]; - __ub_isset = YES; - __extraMap = [extraMap retain_stub]; - __extraMap_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"error"]) - { - __error = [[decoder decodeObjectForKey: @"error"] retain_stub]; - __error_isset = YES; - } - if ([decoder containsValueForKey: @"ub"]) - { - __ub = [[decoder decodeObjectForKey: @"ub"] retain_stub]; - __ub_isset = YES; - } - if ([decoder containsValueForKey: @"extraMap"]) - { - __extraMap = [[decoder decodeObjectForKey: @"extraMap"] retain_stub]; - __extraMap_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__error_isset) - { - [encoder encodeObject: __error forKey: @"error"]; - } - if (__ub_isset) - { - [encoder encodeObject: __ub forKey: @"ub"]; - } - if (__extraMap_isset) - { - [encoder encodeObject: __extraMap forKey: @"extraMap"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __error_isset ? 2654435761 : 0; - if (__error_isset) - { - hash = (hash * 31) ^ [__error hash]; - } - hash = (hash * 31) ^ __ub_isset ? 2654435761 : 0; - if (__ub_isset) - { - hash = (hash * 31) ^ [__ub hash]; - } - hash = (hash * 31) ^ __extraMap_isset ? 2654435761 : 0; - if (__extraMap_isset) - { - hash = (hash * 31) ^ [__extraMap hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimRemoteUserBean class]]) { - return NO; - } - TimRemoteUserBean *other = (TimRemoteUserBean *)anObject; - if ((__error_isset != other->__error_isset) || - (__error_isset && ((__error || other->__error) && ![__error isEqual:other->__error]))) { - return NO; - } - if ((__ub_isset != other->__ub_isset) || - (__ub_isset && ((__ub || other->__ub) && ![__ub isEqual:other->__ub]))) { - return NO; - } - if ((__extraMap_isset != other->__extraMap_isset) || - (__extraMap_isset && ((__extraMap || other->__extraMap) && ![__extraMap isEqual:other->__extraMap]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__error release_stub]; - [__ub release_stub]; - [__extraMap release_stub]; - [super dealloc_stub]; -} - -- (TimError *) error { - return [[__error retain_stub] autorelease_stub]; -} - -- (void) setError: (TimError *) error { - [error retain_stub]; - [__error release_stub]; - __error = error; - __error_isset = YES; -} - -- (BOOL) errorIsSet { - return __error_isset; -} - -- (void) unsetError { - [__error release_stub]; - __error = nil; - __error_isset = NO; -} - -- (TimUserBean *) ub { - return [[__ub retain_stub] autorelease_stub]; -} - -- (void) setUb: (TimUserBean *) ub { - [ub retain_stub]; - [__ub release_stub]; - __ub = ub; - __ub_isset = YES; -} - -- (BOOL) ubIsSet { - return __ub_isset; -} - -- (void) unsetUb { - [__ub release_stub]; - __ub = nil; - __ub_isset = NO; -} - -- (NSMutableDictionary *) extraMap { - return [[__extraMap retain_stub] autorelease_stub]; -} - -- (void) setExtraMap: (NSMutableDictionary *) extraMap { - [extraMap retain_stub]; - [__extraMap release_stub]; - __extraMap = extraMap; - __extraMap_isset = YES; -} - -- (BOOL) extraMapIsSet { - return __extraMap_isset; -} - -- (void) unsetExtraMap { - [__extraMap release_stub]; - __extraMap = nil; - __extraMap_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - TimError *fieldValue = [[TimError alloc] init]; - [fieldValue read: inProtocol]; - [self setError: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRUCT) { - TimUserBean *fieldValue = [[TimUserBean alloc] init]; - [fieldValue read: inProtocol]; - [self setUb: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_MAP) { - int _size120; - [inProtocol readMapBeginReturningKeyType: NULL valueType: NULL size: &_size120]; - NSMutableDictionary * fieldValue = [[NSMutableDictionary alloc] initWithCapacity: _size120]; - int _i121; - for (_i121 = 0; _i121 < _size120; ++_i121) - { - NSString * _key122 = [inProtocol readString]; - NSString * _val123 = [inProtocol readString]; - [fieldValue setObject: _val123 forKey: _key122]; - } - [inProtocol readMapEnd]; - [self setExtraMap: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimRemoteUserBean"]; - if (__error_isset) { - if (__error != nil) { - [outProtocol writeFieldBeginWithName: @"error" type: TType_STRUCT fieldID: 1]; - [__error write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__ub_isset) { - if (__ub != nil) { - [outProtocol writeFieldBeginWithName: @"ub" type: TType_STRUCT fieldID: 2]; - [__ub write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__extraMap_isset) { - if (__extraMap != nil) { - [outProtocol writeFieldBeginWithName: @"extraMap" type: TType_MAP fieldID: 3]; - { - [outProtocol writeMapBeginWithKeyType: TType_STRING valueType: TType_STRING size: [__extraMap count]]; - NSEnumerator * _iter124 = [__extraMap keyEnumerator]; - id key125; - while ((key125 = [_iter124 nextObject])) - { - [outProtocol writeString: key125]; - [outProtocol writeString: [__extraMap objectForKey: key125]]; - } - [outProtocol writeMapEnd]; - } - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimRemoteUserBean("]; - [ms appendString: @"error:"]; - [ms appendFormat: @"%@", __error]; - [ms appendString: @",ub:"]; - [ms appendFormat: @"%@", __ub]; - [ms appendString: @",extraMap:"]; - [ms appendFormat: @"%@", __extraMap]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation TimRemoteRoom - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithError: (TimError *) error room: (TimRoom *) room extraMap: (NSMutableDictionary *) extraMap -{ - self = [super init]; - __error = [error retain_stub]; - __error_isset = YES; - __room = [room retain_stub]; - __room_isset = YES; - __extraMap = [extraMap retain_stub]; - __extraMap_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"error"]) - { - __error = [[decoder decodeObjectForKey: @"error"] retain_stub]; - __error_isset = YES; - } - if ([decoder containsValueForKey: @"room"]) - { - __room = [[decoder decodeObjectForKey: @"room"] retain_stub]; - __room_isset = YES; - } - if ([decoder containsValueForKey: @"extraMap"]) - { - __extraMap = [[decoder decodeObjectForKey: @"extraMap"] retain_stub]; - __extraMap_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__error_isset) - { - [encoder encodeObject: __error forKey: @"error"]; - } - if (__room_isset) - { - [encoder encodeObject: __room forKey: @"room"]; - } - if (__extraMap_isset) - { - [encoder encodeObject: __extraMap forKey: @"extraMap"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __error_isset ? 2654435761 : 0; - if (__error_isset) - { - hash = (hash * 31) ^ [__error hash]; - } - hash = (hash * 31) ^ __room_isset ? 2654435761 : 0; - if (__room_isset) - { - hash = (hash * 31) ^ [__room hash]; - } - hash = (hash * 31) ^ __extraMap_isset ? 2654435761 : 0; - if (__extraMap_isset) - { - hash = (hash * 31) ^ [__extraMap hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimRemoteRoom class]]) { - return NO; - } - TimRemoteRoom *other = (TimRemoteRoom *)anObject; - if ((__error_isset != other->__error_isset) || - (__error_isset && ((__error || other->__error) && ![__error isEqual:other->__error]))) { - return NO; - } - if ((__room_isset != other->__room_isset) || - (__room_isset && ((__room || other->__room) && ![__room isEqual:other->__room]))) { - return NO; - } - if ((__extraMap_isset != other->__extraMap_isset) || - (__extraMap_isset && ((__extraMap || other->__extraMap) && ![__extraMap isEqual:other->__extraMap]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__error release_stub]; - [__room release_stub]; - [__extraMap release_stub]; - [super dealloc_stub]; -} - -- (TimError *) error { - return [[__error retain_stub] autorelease_stub]; -} - -- (void) setError: (TimError *) error { - [error retain_stub]; - [__error release_stub]; - __error = error; - __error_isset = YES; -} - -- (BOOL) errorIsSet { - return __error_isset; -} - -- (void) unsetError { - [__error release_stub]; - __error = nil; - __error_isset = NO; -} - -- (TimRoom *) room { - return [[__room retain_stub] autorelease_stub]; -} - -- (void) setRoom: (TimRoom *) room { - [room retain_stub]; - [__room release_stub]; - __room = room; - __room_isset = YES; -} - -- (BOOL) roomIsSet { - return __room_isset; -} - -- (void) unsetRoom { - [__room release_stub]; - __room = nil; - __room_isset = NO; -} - -- (NSMutableDictionary *) extraMap { - return [[__extraMap retain_stub] autorelease_stub]; -} - -- (void) setExtraMap: (NSMutableDictionary *) extraMap { - [extraMap retain_stub]; - [__extraMap release_stub]; - __extraMap = extraMap; - __extraMap_isset = YES; -} - -- (BOOL) extraMapIsSet { - return __extraMap_isset; -} - -- (void) unsetExtraMap { - [__extraMap release_stub]; - __extraMap = nil; - __extraMap_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - TimError *fieldValue = [[TimError alloc] init]; - [fieldValue read: inProtocol]; - [self setError: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRUCT) { - TimRoom *fieldValue = [[TimRoom alloc] init]; - [fieldValue read: inProtocol]; - [self setRoom: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_MAP) { - int _size126; - [inProtocol readMapBeginReturningKeyType: NULL valueType: NULL size: &_size126]; - NSMutableDictionary * fieldValue = [[NSMutableDictionary alloc] initWithCapacity: _size126]; - int _i127; - for (_i127 = 0; _i127 < _size126; ++_i127) - { - NSString * _key128 = [inProtocol readString]; - NSString * _val129 = [inProtocol readString]; - [fieldValue setObject: _val129 forKey: _key128]; - } - [inProtocol readMapEnd]; - [self setExtraMap: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimRemoteRoom"]; - if (__error_isset) { - if (__error != nil) { - [outProtocol writeFieldBeginWithName: @"error" type: TType_STRUCT fieldID: 1]; - [__error write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__room_isset) { - if (__room != nil) { - [outProtocol writeFieldBeginWithName: @"room" type: TType_STRUCT fieldID: 2]; - [__room write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__extraMap_isset) { - if (__extraMap != nil) { - [outProtocol writeFieldBeginWithName: @"extraMap" type: TType_MAP fieldID: 3]; - { - [outProtocol writeMapBeginWithKeyType: TType_STRING valueType: TType_STRING size: [__extraMap count]]; - NSEnumerator * _iter130 = [__extraMap keyEnumerator]; - id key131; - while ((key131 = [_iter130 nextObject])) - { - [outProtocol writeString: key131]; - [outProtocol writeString: [__extraMap objectForKey: key131]]; - } - [outProtocol writeMapEnd]; - } - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimRemoteRoom("]; - [ms appendString: @"error:"]; - [ms appendFormat: @"%@", __error]; - [ms appendString: @",room:"]; - [ms appendFormat: @"%@", __room]; - [ms appendString: @",extraMap:"]; - [ms appendFormat: @"%@", __extraMap]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation TimResponseBean - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithThreadId: (NSString *) threadId error: (TimError *) error extraList: (NSMutableArray *) extraList extraMap: (NSMutableDictionary *) extraMap -{ - self = [super init]; - __threadId = [threadId retain_stub]; - __threadId_isset = YES; - __error = [error retain_stub]; - __error_isset = YES; - __extraList = [extraList retain_stub]; - __extraList_isset = YES; - __extraMap = [extraMap retain_stub]; - __extraMap_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"threadId"]) - { - __threadId = [[decoder decodeObjectForKey: @"threadId"] retain_stub]; - __threadId_isset = YES; - } - if ([decoder containsValueForKey: @"error"]) - { - __error = [[decoder decodeObjectForKey: @"error"] retain_stub]; - __error_isset = YES; - } - if ([decoder containsValueForKey: @"extraList"]) - { - __extraList = [[decoder decodeObjectForKey: @"extraList"] retain_stub]; - __extraList_isset = YES; - } - if ([decoder containsValueForKey: @"extraMap"]) - { - __extraMap = [[decoder decodeObjectForKey: @"extraMap"] retain_stub]; - __extraMap_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__threadId_isset) - { - [encoder encodeObject: __threadId forKey: @"threadId"]; - } - if (__error_isset) - { - [encoder encodeObject: __error forKey: @"error"]; - } - if (__extraList_isset) - { - [encoder encodeObject: __extraList forKey: @"extraList"]; - } - if (__extraMap_isset) - { - [encoder encodeObject: __extraMap forKey: @"extraMap"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __threadId_isset ? 2654435761 : 0; - if (__threadId_isset) - { - hash = (hash * 31) ^ [__threadId hash]; - } - hash = (hash * 31) ^ __error_isset ? 2654435761 : 0; - if (__error_isset) - { - hash = (hash * 31) ^ [__error hash]; - } - hash = (hash * 31) ^ __extraList_isset ? 2654435761 : 0; - if (__extraList_isset) - { - hash = (hash * 31) ^ [__extraList hash]; - } - hash = (hash * 31) ^ __extraMap_isset ? 2654435761 : 0; - if (__extraMap_isset) - { - hash = (hash * 31) ^ [__extraMap hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimResponseBean class]]) { - return NO; - } - TimResponseBean *other = (TimResponseBean *)anObject; - if ((__threadId_isset != other->__threadId_isset) || - (__threadId_isset && ((__threadId || other->__threadId) && ![__threadId isEqual:other->__threadId]))) { - return NO; - } - if ((__error_isset != other->__error_isset) || - (__error_isset && ((__error || other->__error) && ![__error isEqual:other->__error]))) { - return NO; - } - if ((__extraList_isset != other->__extraList_isset) || - (__extraList_isset && ((__extraList || other->__extraList) && ![__extraList isEqual:other->__extraList]))) { - return NO; - } - if ((__extraMap_isset != other->__extraMap_isset) || - (__extraMap_isset && ((__extraMap || other->__extraMap) && ![__extraMap isEqual:other->__extraMap]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__threadId release_stub]; - [__error release_stub]; - [__extraList release_stub]; - [__extraMap release_stub]; - [super dealloc_stub]; -} - -- (NSString *) threadId { - return [[__threadId retain_stub] autorelease_stub]; -} - -- (void) setThreadId: (NSString *) threadId { - [threadId retain_stub]; - [__threadId release_stub]; - __threadId = threadId; - __threadId_isset = YES; -} - -- (BOOL) threadIdIsSet { - return __threadId_isset; -} - -- (void) unsetThreadId { - [__threadId release_stub]; - __threadId = nil; - __threadId_isset = NO; -} - -- (TimError *) error { - return [[__error retain_stub] autorelease_stub]; -} - -- (void) setError: (TimError *) error { - [error retain_stub]; - [__error release_stub]; - __error = error; - __error_isset = YES; -} - -- (BOOL) errorIsSet { - return __error_isset; -} - -- (void) unsetError { - [__error release_stub]; - __error = nil; - __error_isset = NO; -} - -- (NSMutableArray *) extraList { - return [[__extraList retain_stub] autorelease_stub]; -} - -- (void) setExtraList: (NSMutableArray *) extraList { - [extraList retain_stub]; - [__extraList release_stub]; - __extraList = extraList; - __extraList_isset = YES; -} - -- (BOOL) extraListIsSet { - return __extraList_isset; -} - -- (void) unsetExtraList { - [__extraList release_stub]; - __extraList = nil; - __extraList_isset = NO; -} - -- (NSMutableDictionary *) extraMap { - return [[__extraMap retain_stub] autorelease_stub]; -} - -- (void) setExtraMap: (NSMutableDictionary *) extraMap { - [extraMap retain_stub]; - [__extraMap release_stub]; - __extraMap = extraMap; - __extraMap_isset = YES; -} - -- (BOOL) extraMapIsSet { - return __extraMap_isset; -} - -- (void) unsetExtraMap { - [__extraMap release_stub]; - __extraMap = nil; - __extraMap_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setThreadId: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRUCT) { - TimError *fieldValue = [[TimError alloc] init]; - [fieldValue read: inProtocol]; - [self setError: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_LIST) { - int _size132; - [inProtocol readListBeginReturningElementType: NULL size: &_size132]; - NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size132]; - int _i133; - for (_i133 = 0; _i133 < _size132; ++_i133) - { - TimNode *_elem134 = [[TimNode alloc] init]; - [_elem134 read: inProtocol]; - [fieldValue addObject: _elem134]; - [_elem134 release_stub]; - } - [inProtocol readListEnd]; - [self setExtraList: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 4: - if (fieldType == TType_MAP) { - int _size135; - [inProtocol readMapBeginReturningKeyType: NULL valueType: NULL size: &_size135]; - NSMutableDictionary * fieldValue = [[NSMutableDictionary alloc] initWithCapacity: _size135]; - int _i136; - for (_i136 = 0; _i136 < _size135; ++_i136) - { - NSString * _key137 = [inProtocol readString]; - NSString * _val138 = [inProtocol readString]; - [fieldValue setObject: _val138 forKey: _key137]; - } - [inProtocol readMapEnd]; - [self setExtraMap: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimResponseBean"]; - if (__threadId_isset) { - if (__threadId != nil) { - [outProtocol writeFieldBeginWithName: @"threadId" type: TType_STRING fieldID: 1]; - [outProtocol writeString: __threadId]; - [outProtocol writeFieldEnd]; - } - } - if (__error_isset) { - if (__error != nil) { - [outProtocol writeFieldBeginWithName: @"error" type: TType_STRUCT fieldID: 2]; - [__error write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__extraList_isset) { - if (__extraList != nil) { - [outProtocol writeFieldBeginWithName: @"extraList" type: TType_LIST fieldID: 3]; - { - [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__extraList count]]; - int idx140; - for (idx140 = 0; idx140 < [__extraList count]; idx140++) - { - [[__extraList objectAtIndex: idx140] write: outProtocol]; - } - [outProtocol writeListEnd]; - } - [outProtocol writeFieldEnd]; - } - } - if (__extraMap_isset) { - if (__extraMap != nil) { - [outProtocol writeFieldBeginWithName: @"extraMap" type: TType_MAP fieldID: 4]; - { - [outProtocol writeMapBeginWithKeyType: TType_STRING valueType: TType_STRING size: [__extraMap count]]; - NSEnumerator * _iter141 = [__extraMap keyEnumerator]; - id key142; - while ((key142 = [_iter141 nextObject])) - { - [outProtocol writeString: key142]; - [outProtocol writeString: [__extraMap objectForKey: key142]]; - } - [outProtocol writeMapEnd]; - } - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimResponseBean("]; - [ms appendString: @"threadId:"]; - [ms appendFormat: @"\"%@\"", __threadId]; - [ms appendString: @",error:"]; - [ms appendFormat: @"%@", __error]; - [ms appendString: @",extraList:"]; - [ms appendFormat: @"%@", __extraList]; - [ms appendString: @",extraMap:"]; - [ms appendFormat: @"%@", __extraMap]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation TimSock5Bean - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithFromTid: (Tid *) fromTid toTid: (Tid *) toTid addr: (NSString *) addr port: (int32_t) port transport: (int16_t) transport pubId: (NSString *) pubId extraMap: (NSMutableDictionary *) extraMap -{ - self = [super init]; - __fromTid = [fromTid retain_stub]; - __fromTid_isset = YES; - __toTid = [toTid retain_stub]; - __toTid_isset = YES; - __addr = [addr retain_stub]; - __addr_isset = YES; - __port = port; - __port_isset = YES; - __transport = transport; - __transport_isset = YES; - __pubId = [pubId retain_stub]; - __pubId_isset = YES; - __extraMap = [extraMap retain_stub]; - __extraMap_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"fromTid"]) - { - __fromTid = [[decoder decodeObjectForKey: @"fromTid"] retain_stub]; - __fromTid_isset = YES; - } - if ([decoder containsValueForKey: @"toTid"]) - { - __toTid = [[decoder decodeObjectForKey: @"toTid"] retain_stub]; - __toTid_isset = YES; - } - if ([decoder containsValueForKey: @"addr"]) - { - __addr = [[decoder decodeObjectForKey: @"addr"] retain_stub]; - __addr_isset = YES; - } - if ([decoder containsValueForKey: @"port"]) - { - __port = [decoder decodeInt32ForKey: @"port"]; - __port_isset = YES; - } - if ([decoder containsValueForKey: @"transport"]) - { - __transport = [decoder decodeIntForKey: @"transport"]; - __transport_isset = YES; - } - if ([decoder containsValueForKey: @"pubId"]) - { - __pubId = [[decoder decodeObjectForKey: @"pubId"] retain_stub]; - __pubId_isset = YES; - } - if ([decoder containsValueForKey: @"extraMap"]) - { - __extraMap = [[decoder decodeObjectForKey: @"extraMap"] retain_stub]; - __extraMap_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__fromTid_isset) - { - [encoder encodeObject: __fromTid forKey: @"fromTid"]; - } - if (__toTid_isset) - { - [encoder encodeObject: __toTid forKey: @"toTid"]; - } - if (__addr_isset) - { - [encoder encodeObject: __addr forKey: @"addr"]; - } - if (__port_isset) - { - [encoder encodeInt32: __port forKey: @"port"]; - } - if (__transport_isset) - { - [encoder encodeInt: __transport forKey: @"transport"]; - } - if (__pubId_isset) - { - [encoder encodeObject: __pubId forKey: @"pubId"]; - } - if (__extraMap_isset) - { - [encoder encodeObject: __extraMap forKey: @"extraMap"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __fromTid_isset ? 2654435761 : 0; - if (__fromTid_isset) - { - hash = (hash * 31) ^ [__fromTid hash]; - } - hash = (hash * 31) ^ __toTid_isset ? 2654435761 : 0; - if (__toTid_isset) - { - hash = (hash * 31) ^ [__toTid hash]; - } - hash = (hash * 31) ^ __addr_isset ? 2654435761 : 0; - if (__addr_isset) - { - hash = (hash * 31) ^ [__addr hash]; - } - hash = (hash * 31) ^ __port_isset ? 2654435761 : 0; - if (__port_isset) - { - hash = (hash * 31) ^ [@(__port) hash]; - } - hash = (hash * 31) ^ __transport_isset ? 2654435761 : 0; - if (__transport_isset) - { - hash = (hash * 31) ^ [@(__transport) hash]; - } - hash = (hash * 31) ^ __pubId_isset ? 2654435761 : 0; - if (__pubId_isset) - { - hash = (hash * 31) ^ [__pubId hash]; - } - hash = (hash * 31) ^ __extraMap_isset ? 2654435761 : 0; - if (__extraMap_isset) - { - hash = (hash * 31) ^ [__extraMap hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimSock5Bean class]]) { - return NO; - } - TimSock5Bean *other = (TimSock5Bean *)anObject; - if ((__fromTid_isset != other->__fromTid_isset) || - (__fromTid_isset && ((__fromTid || other->__fromTid) && ![__fromTid isEqual:other->__fromTid]))) { - return NO; - } - if ((__toTid_isset != other->__toTid_isset) || - (__toTid_isset && ((__toTid || other->__toTid) && ![__toTid isEqual:other->__toTid]))) { - return NO; - } - if ((__addr_isset != other->__addr_isset) || - (__addr_isset && ((__addr || other->__addr) && ![__addr isEqual:other->__addr]))) { - return NO; - } - if ((__port_isset != other->__port_isset) || - (__port_isset && (__port != other->__port))) { - return NO; - } - if ((__transport_isset != other->__transport_isset) || - (__transport_isset && (__transport != other->__transport))) { - return NO; - } - if ((__pubId_isset != other->__pubId_isset) || - (__pubId_isset && ((__pubId || other->__pubId) && ![__pubId isEqual:other->__pubId]))) { - return NO; - } - if ((__extraMap_isset != other->__extraMap_isset) || - (__extraMap_isset && ((__extraMap || other->__extraMap) && ![__extraMap isEqual:other->__extraMap]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__fromTid release_stub]; - [__toTid release_stub]; - [__addr release_stub]; - [__pubId release_stub]; - [__extraMap release_stub]; - [super dealloc_stub]; -} - -- (Tid *) fromTid { - return [[__fromTid retain_stub] autorelease_stub]; -} - -- (void) setFromTid: (Tid *) fromTid { - [fromTid retain_stub]; - [__fromTid release_stub]; - __fromTid = fromTid; - __fromTid_isset = YES; -} - -- (BOOL) fromTidIsSet { - return __fromTid_isset; -} - -- (void) unsetFromTid { - [__fromTid release_stub]; - __fromTid = nil; - __fromTid_isset = NO; -} - -- (Tid *) toTid { - return [[__toTid retain_stub] autorelease_stub]; -} - -- (void) setToTid: (Tid *) toTid { - [toTid retain_stub]; - [__toTid release_stub]; - __toTid = toTid; - __toTid_isset = YES; -} - -- (BOOL) toTidIsSet { - return __toTid_isset; -} - -- (void) unsetToTid { - [__toTid release_stub]; - __toTid = nil; - __toTid_isset = NO; -} - -- (NSString *) addr { - return [[__addr retain_stub] autorelease_stub]; -} - -- (void) setAddr: (NSString *) addr { - [addr retain_stub]; - [__addr release_stub]; - __addr = addr; - __addr_isset = YES; -} - -- (BOOL) addrIsSet { - return __addr_isset; -} - -- (void) unsetAddr { - [__addr release_stub]; - __addr = nil; - __addr_isset = NO; -} - -- (int32_t) port { - return __port; -} - -- (void) setPort: (int32_t) port { - __port = port; - __port_isset = YES; -} - -- (BOOL) portIsSet { - return __port_isset; -} - -- (void) unsetPort { - __port_isset = NO; -} - -- (int16_t) transport { - return __transport; -} - -- (void) setTransport: (int16_t) transport { - __transport = transport; - __transport_isset = YES; -} - -- (BOOL) transportIsSet { - return __transport_isset; -} - -- (void) unsetTransport { - __transport_isset = NO; -} - -- (NSString *) pubId { - return [[__pubId retain_stub] autorelease_stub]; -} - -- (void) setPubId: (NSString *) pubId { - [pubId retain_stub]; - [__pubId release_stub]; - __pubId = pubId; - __pubId_isset = YES; -} - -- (BOOL) pubIdIsSet { - return __pubId_isset; -} - -- (void) unsetPubId { - [__pubId release_stub]; - __pubId = nil; - __pubId_isset = NO; -} - -- (NSMutableDictionary *) extraMap { - return [[__extraMap retain_stub] autorelease_stub]; -} - -- (void) setExtraMap: (NSMutableDictionary *) extraMap { - [extraMap retain_stub]; - [__extraMap release_stub]; - __extraMap = extraMap; - __extraMap_isset = YES; -} - -- (BOOL) extraMapIsSet { - return __extraMap_isset; -} - -- (void) unsetExtraMap { - [__extraMap release_stub]; - __extraMap = nil; - __extraMap_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - Tid *fieldValue = [[Tid alloc] init]; - [fieldValue read: inProtocol]; - [self setFromTid: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRUCT) { - Tid *fieldValue = [[Tid alloc] init]; - [fieldValue read: inProtocol]; - [self setToTid: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setAddr: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 4: - if (fieldType == TType_I32) { - int32_t fieldValue = [inProtocol readI32]; - [self setPort: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 5: - if (fieldType == TType_I16) { - int16_t fieldValue = [inProtocol readI16]; - [self setTransport: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 6: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setPubId: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 7: - if (fieldType == TType_MAP) { - int _size143; - [inProtocol readMapBeginReturningKeyType: NULL valueType: NULL size: &_size143]; - NSMutableDictionary * fieldValue = [[NSMutableDictionary alloc] initWithCapacity: _size143]; - int _i144; - for (_i144 = 0; _i144 < _size143; ++_i144) - { - NSString * _key145 = [inProtocol readString]; - NSString * _val146 = [inProtocol readString]; - [fieldValue setObject: _val146 forKey: _key145]; - } - [inProtocol readMapEnd]; - [self setExtraMap: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimSock5Bean"]; - if (__fromTid_isset) { - if (__fromTid != nil) { - [outProtocol writeFieldBeginWithName: @"fromTid" type: TType_STRUCT fieldID: 1]; - [__fromTid write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__toTid_isset) { - if (__toTid != nil) { - [outProtocol writeFieldBeginWithName: @"toTid" type: TType_STRUCT fieldID: 2]; - [__toTid write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__addr_isset) { - if (__addr != nil) { - [outProtocol writeFieldBeginWithName: @"addr" type: TType_STRING fieldID: 3]; - [outProtocol writeString: __addr]; - [outProtocol writeFieldEnd]; - } - } - if (__port_isset) { - [outProtocol writeFieldBeginWithName: @"port" type: TType_I32 fieldID: 4]; - [outProtocol writeI32: __port]; - [outProtocol writeFieldEnd]; - } - if (__transport_isset) { - [outProtocol writeFieldBeginWithName: @"transport" type: TType_I16 fieldID: 5]; - [outProtocol writeI16: __transport]; - [outProtocol writeFieldEnd]; - } - if (__pubId_isset) { - if (__pubId != nil) { - [outProtocol writeFieldBeginWithName: @"pubId" type: TType_STRING fieldID: 6]; - [outProtocol writeString: __pubId]; - [outProtocol writeFieldEnd]; - } - } - if (__extraMap_isset) { - if (__extraMap != nil) { - [outProtocol writeFieldBeginWithName: @"extraMap" type: TType_MAP fieldID: 7]; - { - [outProtocol writeMapBeginWithKeyType: TType_STRING valueType: TType_STRING size: [__extraMap count]]; - NSEnumerator * _iter147 = [__extraMap keyEnumerator]; - id key148; - while ((key148 = [_iter147 nextObject])) - { - [outProtocol writeString: key148]; - [outProtocol writeString: [__extraMap objectForKey: key148]]; - } - [outProtocol writeMapEnd]; - } - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields - if (!__fromTid_isset) { - @throw [TProtocolException exceptionWithName: @"TProtocolException" - reason: @"Required field 'fromTid' is not set."]; - } - if (!__toTid_isset) { - @throw [TProtocolException exceptionWithName: @"TProtocolException" - reason: @"Required field 'toTid' is not set."]; - } - if (!__addr_isset) { - @throw [TProtocolException exceptionWithName: @"TProtocolException" - reason: @"Required field 'addr' is not set."]; - } - if (!__port_isset) { - @throw [TProtocolException exceptionWithName: @"TProtocolException" - reason: @"Required field 'port' is not set."]; - } - if (!__transport_isset) { - @throw [TProtocolException exceptionWithName: @"TProtocolException" - reason: @"Required field 'transport' is not set."]; - } - if (!__pubId_isset) { - @throw [TProtocolException exceptionWithName: @"TProtocolException" - reason: @"Required field 'pubId' is not set."]; - } -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimSock5Bean("]; - [ms appendString: @"fromTid:"]; - [ms appendFormat: @"%@", __fromTid]; - [ms appendString: @",toTid:"]; - [ms appendFormat: @"%@", __toTid]; - [ms appendString: @",addr:"]; - [ms appendFormat: @"\"%@\"", __addr]; - [ms appendString: @",port:"]; - [ms appendFormat: @"%i", __port]; - [ms appendString: @",transport:"]; - [ms appendFormat: @"%hi", __transport]; - [ms appendString: @",pubId:"]; - [ms appendFormat: @"\"%@\"", __pubId]; - [ms appendString: @",extraMap:"]; - [ms appendFormat: @"%@", __extraMap]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation TimSock5Bytes - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithPubId: (NSString *) pubId index: (int32_t) index bytes: (NSMutableArray *) bytes extraMap: (NSMutableDictionary *) extraMap -{ - self = [super init]; - __pubId = [pubId retain_stub]; - __pubId_isset = YES; - __index = index; - __index_isset = YES; - __bytes = [bytes retain_stub]; - __bytes_isset = YES; - __extraMap = [extraMap retain_stub]; - __extraMap_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"pubId"]) - { - __pubId = [[decoder decodeObjectForKey: @"pubId"] retain_stub]; - __pubId_isset = YES; - } - if ([decoder containsValueForKey: @"index"]) - { - __index = [decoder decodeInt32ForKey: @"index"]; - __index_isset = YES; - } - if ([decoder containsValueForKey: @"bytes"]) - { - __bytes = [[decoder decodeObjectForKey: @"bytes"] retain_stub]; - __bytes_isset = YES; - } - if ([decoder containsValueForKey: @"extraMap"]) - { - __extraMap = [[decoder decodeObjectForKey: @"extraMap"] retain_stub]; - __extraMap_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__pubId_isset) - { - [encoder encodeObject: __pubId forKey: @"pubId"]; - } - if (__index_isset) - { - [encoder encodeInt32: __index forKey: @"index"]; - } - if (__bytes_isset) - { - [encoder encodeObject: __bytes forKey: @"bytes"]; - } - if (__extraMap_isset) - { - [encoder encodeObject: __extraMap forKey: @"extraMap"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __pubId_isset ? 2654435761 : 0; - if (__pubId_isset) - { - hash = (hash * 31) ^ [__pubId hash]; - } - hash = (hash * 31) ^ __index_isset ? 2654435761 : 0; - if (__index_isset) - { - hash = (hash * 31) ^ [@(__index) hash]; - } - hash = (hash * 31) ^ __bytes_isset ? 2654435761 : 0; - if (__bytes_isset) - { - hash = (hash * 31) ^ [__bytes hash]; - } - hash = (hash * 31) ^ __extraMap_isset ? 2654435761 : 0; - if (__extraMap_isset) - { - hash = (hash * 31) ^ [__extraMap hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimSock5Bytes class]]) { - return NO; - } - TimSock5Bytes *other = (TimSock5Bytes *)anObject; - if ((__pubId_isset != other->__pubId_isset) || - (__pubId_isset && ((__pubId || other->__pubId) && ![__pubId isEqual:other->__pubId]))) { - return NO; - } - if ((__index_isset != other->__index_isset) || - (__index_isset && (__index != other->__index))) { - return NO; - } - if ((__bytes_isset != other->__bytes_isset) || - (__bytes_isset && ((__bytes || other->__bytes) && ![__bytes isEqual:other->__bytes]))) { - return NO; - } - if ((__extraMap_isset != other->__extraMap_isset) || - (__extraMap_isset && ((__extraMap || other->__extraMap) && ![__extraMap isEqual:other->__extraMap]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__pubId release_stub]; - [__bytes release_stub]; - [__extraMap release_stub]; - [super dealloc_stub]; -} - -- (NSString *) pubId { - return [[__pubId retain_stub] autorelease_stub]; -} - -- (void) setPubId: (NSString *) pubId { - [pubId retain_stub]; - [__pubId release_stub]; - __pubId = pubId; - __pubId_isset = YES; -} - -- (BOOL) pubIdIsSet { - return __pubId_isset; -} - -- (void) unsetPubId { - [__pubId release_stub]; - __pubId = nil; - __pubId_isset = NO; -} - -- (int32_t) index { - return __index; -} - -- (void) setIndex: (int32_t) index { - __index = index; - __index_isset = YES; -} - -- (BOOL) indexIsSet { - return __index_isset; -} - -- (void) unsetIndex { - __index_isset = NO; -} - -- (NSMutableArray *) bytes { - return [[__bytes retain_stub] autorelease_stub]; -} - -- (void) setBytes: (NSMutableArray *) bytes { - [bytes retain_stub]; - [__bytes release_stub]; - __bytes = bytes; - __bytes_isset = YES; -} - -- (BOOL) bytesIsSet { - return __bytes_isset; -} - -- (void) unsetBytes { - [__bytes release_stub]; - __bytes = nil; - __bytes_isset = NO; -} - -- (NSMutableDictionary *) extraMap { - return [[__extraMap retain_stub] autorelease_stub]; -} - -- (void) setExtraMap: (NSMutableDictionary *) extraMap { - [extraMap retain_stub]; - [__extraMap release_stub]; - __extraMap = extraMap; - __extraMap_isset = YES; -} - -- (BOOL) extraMapIsSet { - return __extraMap_isset; -} - -- (void) unsetExtraMap { - [__extraMap release_stub]; - __extraMap = nil; - __extraMap_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setPubId: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_I32) { - int32_t fieldValue = [inProtocol readI32]; - [self setIndex: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_LIST) { - int _size149; - [inProtocol readListBeginReturningElementType: NULL size: &_size149]; - NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size149]; - int _i150; - for (_i150 = 0; _i150 < _size149; ++_i150) - { - NSData * _elem151 = [inProtocol readBinary]; - [fieldValue addObject: _elem151]; - } - [inProtocol readListEnd]; - [self setBytes: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 4: - if (fieldType == TType_MAP) { - int _size152; - [inProtocol readMapBeginReturningKeyType: NULL valueType: NULL size: &_size152]; - NSMutableDictionary * fieldValue = [[NSMutableDictionary alloc] initWithCapacity: _size152]; - int _i153; - for (_i153 = 0; _i153 < _size152; ++_i153) - { - NSString * _key154 = [inProtocol readString]; - NSString * _val155 = [inProtocol readString]; - [fieldValue setObject: _val155 forKey: _key154]; - } - [inProtocol readMapEnd]; - [self setExtraMap: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimSock5Bytes"]; - if (__pubId_isset) { - if (__pubId != nil) { - [outProtocol writeFieldBeginWithName: @"pubId" type: TType_STRING fieldID: 1]; - [outProtocol writeString: __pubId]; - [outProtocol writeFieldEnd]; - } - } - if (__index_isset) { - [outProtocol writeFieldBeginWithName: @"index" type: TType_I32 fieldID: 2]; - [outProtocol writeI32: __index]; - [outProtocol writeFieldEnd]; - } - if (__bytes_isset) { - if (__bytes != nil) { - [outProtocol writeFieldBeginWithName: @"bytes" type: TType_LIST fieldID: 3]; - { - [outProtocol writeListBeginWithElementType: TType_STRING size: [__bytes count]]; - int idx157; - for (idx157 = 0; idx157 < [__bytes count]; idx157++) - { - [outProtocol writeBinary: [__bytes objectAtIndex: idx157]]; - } - [outProtocol writeListEnd]; - } - [outProtocol writeFieldEnd]; - } - } - if (__extraMap_isset) { - if (__extraMap != nil) { - [outProtocol writeFieldBeginWithName: @"extraMap" type: TType_MAP fieldID: 4]; - { - [outProtocol writeMapBeginWithKeyType: TType_STRING valueType: TType_STRING size: [__extraMap count]]; - NSEnumerator * _iter158 = [__extraMap keyEnumerator]; - id key159; - while ((key159 = [_iter158 nextObject])) - { - [outProtocol writeString: key159]; - [outProtocol writeString: [__extraMap objectForKey: key159]]; - } - [outProtocol writeMapEnd]; - } - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields - if (!__pubId_isset) { - @throw [TProtocolException exceptionWithName: @"TProtocolException" - reason: @"Required field 'pubId' is not set."]; - } - if (!__index_isset) { - @throw [TProtocolException exceptionWithName: @"TProtocolException" - reason: @"Required field 'index' is not set."]; - } - if (!__bytes_isset) { - @throw [TProtocolException exceptionWithName: @"TProtocolException" - reason: @"Required field 'bytes' is not set."]; - } -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimSock5Bytes("]; - [ms appendString: @"pubId:"]; - [ms appendFormat: @"\"%@\"", __pubId]; - [ms appendString: @",index:"]; - [ms appendFormat: @"%i", __index]; - [ms appendString: @",bytes:"]; - [ms appendFormat: @"%@", __bytes]; - [ms appendString: @",extraMap:"]; - [ms appendFormat: @"%@", __extraMap]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation TimPage - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithFromTimeStamp: (NSString *) fromTimeStamp toTimeStamp: (NSString *) toTimeStamp limitCount: (int32_t) limitCount extraMap: (NSMutableDictionary *) extraMap -{ - self = [super init]; - __fromTimeStamp = [fromTimeStamp retain_stub]; - __fromTimeStamp_isset = YES; - __toTimeStamp = [toTimeStamp retain_stub]; - __toTimeStamp_isset = YES; - __limitCount = limitCount; - __limitCount_isset = YES; - __extraMap = [extraMap retain_stub]; - __extraMap_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"fromTimeStamp"]) - { - __fromTimeStamp = [[decoder decodeObjectForKey: @"fromTimeStamp"] retain_stub]; - __fromTimeStamp_isset = YES; - } - if ([decoder containsValueForKey: @"toTimeStamp"]) - { - __toTimeStamp = [[decoder decodeObjectForKey: @"toTimeStamp"] retain_stub]; - __toTimeStamp_isset = YES; - } - if ([decoder containsValueForKey: @"limitCount"]) - { - __limitCount = [decoder decodeInt32ForKey: @"limitCount"]; - __limitCount_isset = YES; - } - if ([decoder containsValueForKey: @"extraMap"]) - { - __extraMap = [[decoder decodeObjectForKey: @"extraMap"] retain_stub]; - __extraMap_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__fromTimeStamp_isset) - { - [encoder encodeObject: __fromTimeStamp forKey: @"fromTimeStamp"]; - } - if (__toTimeStamp_isset) - { - [encoder encodeObject: __toTimeStamp forKey: @"toTimeStamp"]; - } - if (__limitCount_isset) - { - [encoder encodeInt32: __limitCount forKey: @"limitCount"]; - } - if (__extraMap_isset) - { - [encoder encodeObject: __extraMap forKey: @"extraMap"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __fromTimeStamp_isset ? 2654435761 : 0; - if (__fromTimeStamp_isset) - { - hash = (hash * 31) ^ [__fromTimeStamp hash]; - } - hash = (hash * 31) ^ __toTimeStamp_isset ? 2654435761 : 0; - if (__toTimeStamp_isset) - { - hash = (hash * 31) ^ [__toTimeStamp hash]; - } - hash = (hash * 31) ^ __limitCount_isset ? 2654435761 : 0; - if (__limitCount_isset) - { - hash = (hash * 31) ^ [@(__limitCount) hash]; - } - hash = (hash * 31) ^ __extraMap_isset ? 2654435761 : 0; - if (__extraMap_isset) - { - hash = (hash * 31) ^ [__extraMap hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimPage class]]) { - return NO; - } - TimPage *other = (TimPage *)anObject; - if ((__fromTimeStamp_isset != other->__fromTimeStamp_isset) || - (__fromTimeStamp_isset && ((__fromTimeStamp || other->__fromTimeStamp) && ![__fromTimeStamp isEqual:other->__fromTimeStamp]))) { - return NO; - } - if ((__toTimeStamp_isset != other->__toTimeStamp_isset) || - (__toTimeStamp_isset && ((__toTimeStamp || other->__toTimeStamp) && ![__toTimeStamp isEqual:other->__toTimeStamp]))) { - return NO; - } - if ((__limitCount_isset != other->__limitCount_isset) || - (__limitCount_isset && (__limitCount != other->__limitCount))) { - return NO; - } - if ((__extraMap_isset != other->__extraMap_isset) || - (__extraMap_isset && ((__extraMap || other->__extraMap) && ![__extraMap isEqual:other->__extraMap]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__fromTimeStamp release_stub]; - [__toTimeStamp release_stub]; - [__extraMap release_stub]; - [super dealloc_stub]; -} - -- (NSString *) fromTimeStamp { - return [[__fromTimeStamp retain_stub] autorelease_stub]; -} - -- (void) setFromTimeStamp: (NSString *) fromTimeStamp { - [fromTimeStamp retain_stub]; - [__fromTimeStamp release_stub]; - __fromTimeStamp = fromTimeStamp; - __fromTimeStamp_isset = YES; -} - -- (BOOL) fromTimeStampIsSet { - return __fromTimeStamp_isset; -} - -- (void) unsetFromTimeStamp { - [__fromTimeStamp release_stub]; - __fromTimeStamp = nil; - __fromTimeStamp_isset = NO; -} - -- (NSString *) toTimeStamp { - return [[__toTimeStamp retain_stub] autorelease_stub]; -} - -- (void) setToTimeStamp: (NSString *) toTimeStamp { - [toTimeStamp retain_stub]; - [__toTimeStamp release_stub]; - __toTimeStamp = toTimeStamp; - __toTimeStamp_isset = YES; -} - -- (BOOL) toTimeStampIsSet { - return __toTimeStamp_isset; -} - -- (void) unsetToTimeStamp { - [__toTimeStamp release_stub]; - __toTimeStamp = nil; - __toTimeStamp_isset = NO; -} - -- (int32_t) limitCount { - return __limitCount; -} - -- (void) setLimitCount: (int32_t) limitCount { - __limitCount = limitCount; - __limitCount_isset = YES; -} - -- (BOOL) limitCountIsSet { - return __limitCount_isset; -} - -- (void) unsetLimitCount { - __limitCount_isset = NO; -} - -- (NSMutableDictionary *) extraMap { - return [[__extraMap retain_stub] autorelease_stub]; -} - -- (void) setExtraMap: (NSMutableDictionary *) extraMap { - [extraMap retain_stub]; - [__extraMap release_stub]; - __extraMap = extraMap; - __extraMap_isset = YES; -} - -- (BOOL) extraMapIsSet { - return __extraMap_isset; -} - -- (void) unsetExtraMap { - [__extraMap release_stub]; - __extraMap = nil; - __extraMap_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setFromTimeStamp: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setToTimeStamp: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_I32) { - int32_t fieldValue = [inProtocol readI32]; - [self setLimitCount: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 4: - if (fieldType == TType_MAP) { - int _size160; - [inProtocol readMapBeginReturningKeyType: NULL valueType: NULL size: &_size160]; - NSMutableDictionary * fieldValue = [[NSMutableDictionary alloc] initWithCapacity: _size160]; - int _i161; - for (_i161 = 0; _i161 < _size160; ++_i161) - { - NSString * _key162 = [inProtocol readString]; - NSString * _val163 = [inProtocol readString]; - [fieldValue setObject: _val163 forKey: _key162]; - } - [inProtocol readMapEnd]; - [self setExtraMap: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimPage"]; - if (__fromTimeStamp_isset) { - if (__fromTimeStamp != nil) { - [outProtocol writeFieldBeginWithName: @"fromTimeStamp" type: TType_STRING fieldID: 1]; - [outProtocol writeString: __fromTimeStamp]; - [outProtocol writeFieldEnd]; - } - } - if (__toTimeStamp_isset) { - if (__toTimeStamp != nil) { - [outProtocol writeFieldBeginWithName: @"toTimeStamp" type: TType_STRING fieldID: 2]; - [outProtocol writeString: __toTimeStamp]; - [outProtocol writeFieldEnd]; - } - } - if (__limitCount_isset) { - [outProtocol writeFieldBeginWithName: @"limitCount" type: TType_I32 fieldID: 3]; - [outProtocol writeI32: __limitCount]; - [outProtocol writeFieldEnd]; - } - if (__extraMap_isset) { - if (__extraMap != nil) { - [outProtocol writeFieldBeginWithName: @"extraMap" type: TType_MAP fieldID: 4]; - { - [outProtocol writeMapBeginWithKeyType: TType_STRING valueType: TType_STRING size: [__extraMap count]]; - NSEnumerator * _iter164 = [__extraMap keyEnumerator]; - id key165; - while ((key165 = [_iter164 nextObject])) - { - [outProtocol writeString: key165]; - [outProtocol writeString: [__extraMap objectForKey: key165]]; - } - [outProtocol writeMapEnd]; - } - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimPage("]; - [ms appendString: @"fromTimeStamp:"]; - [ms appendFormat: @"\"%@\"", __fromTimeStamp]; - [ms appendString: @",toTimeStamp:"]; - [ms appendFormat: @"\"%@\"", __toTimeStamp]; - [ms appendString: @",limitCount:"]; - [ms appendFormat: @"%i", __limitCount]; - [ms appendString: @",extraMap:"]; - [ms appendFormat: @"%@", __extraMap]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation TimMessageIq - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithTidlist: (NSMutableArray *) tidlist timPage: (TimPage *) timPage midlist: (NSMutableArray *) midlist extraMap: (NSMutableDictionary *) extraMap -{ - self = [super init]; - __tidlist = [tidlist retain_stub]; - __tidlist_isset = YES; - __timPage = [timPage retain_stub]; - __timPage_isset = YES; - __midlist = [midlist retain_stub]; - __midlist_isset = YES; - __extraMap = [extraMap retain_stub]; - __extraMap_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"tidlist"]) - { - __tidlist = [[decoder decodeObjectForKey: @"tidlist"] retain_stub]; - __tidlist_isset = YES; - } - if ([decoder containsValueForKey: @"timPage"]) - { - __timPage = [[decoder decodeObjectForKey: @"timPage"] retain_stub]; - __timPage_isset = YES; - } - if ([decoder containsValueForKey: @"midlist"]) - { - __midlist = [[decoder decodeObjectForKey: @"midlist"] retain_stub]; - __midlist_isset = YES; - } - if ([decoder containsValueForKey: @"extraMap"]) - { - __extraMap = [[decoder decodeObjectForKey: @"extraMap"] retain_stub]; - __extraMap_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__tidlist_isset) - { - [encoder encodeObject: __tidlist forKey: @"tidlist"]; - } - if (__timPage_isset) - { - [encoder encodeObject: __timPage forKey: @"timPage"]; - } - if (__midlist_isset) - { - [encoder encodeObject: __midlist forKey: @"midlist"]; - } - if (__extraMap_isset) - { - [encoder encodeObject: __extraMap forKey: @"extraMap"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __tidlist_isset ? 2654435761 : 0; - if (__tidlist_isset) - { - hash = (hash * 31) ^ [__tidlist hash]; - } - hash = (hash * 31) ^ __timPage_isset ? 2654435761 : 0; - if (__timPage_isset) - { - hash = (hash * 31) ^ [__timPage hash]; - } - hash = (hash * 31) ^ __midlist_isset ? 2654435761 : 0; - if (__midlist_isset) - { - hash = (hash * 31) ^ [__midlist hash]; - } - hash = (hash * 31) ^ __extraMap_isset ? 2654435761 : 0; - if (__extraMap_isset) - { - hash = (hash * 31) ^ [__extraMap hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimMessageIq class]]) { - return NO; - } - TimMessageIq *other = (TimMessageIq *)anObject; - if ((__tidlist_isset != other->__tidlist_isset) || - (__tidlist_isset && ((__tidlist || other->__tidlist) && ![__tidlist isEqual:other->__tidlist]))) { - return NO; - } - if ((__timPage_isset != other->__timPage_isset) || - (__timPage_isset && ((__timPage || other->__timPage) && ![__timPage isEqual:other->__timPage]))) { - return NO; - } - if ((__midlist_isset != other->__midlist_isset) || - (__midlist_isset && ((__midlist || other->__midlist) && ![__midlist isEqual:other->__midlist]))) { - return NO; - } - if ((__extraMap_isset != other->__extraMap_isset) || - (__extraMap_isset && ((__extraMap || other->__extraMap) && ![__extraMap isEqual:other->__extraMap]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__tidlist release_stub]; - [__timPage release_stub]; - [__midlist release_stub]; - [__extraMap release_stub]; - [super dealloc_stub]; -} - -- (NSMutableArray *) tidlist { - return [[__tidlist retain_stub] autorelease_stub]; -} - -- (void) setTidlist: (NSMutableArray *) tidlist { - [tidlist retain_stub]; - [__tidlist release_stub]; - __tidlist = tidlist; - __tidlist_isset = YES; -} - -- (BOOL) tidlistIsSet { - return __tidlist_isset; -} - -- (void) unsetTidlist { - [__tidlist release_stub]; - __tidlist = nil; - __tidlist_isset = NO; -} - -- (TimPage *) timPage { - return [[__timPage retain_stub] autorelease_stub]; -} - -- (void) setTimPage: (TimPage *) timPage { - [timPage retain_stub]; - [__timPage release_stub]; - __timPage = timPage; - __timPage_isset = YES; -} - -- (BOOL) timPageIsSet { - return __timPage_isset; -} - -- (void) unsetTimPage { - [__timPage release_stub]; - __timPage = nil; - __timPage_isset = NO; -} - -- (NSMutableArray *) midlist { - return [[__midlist retain_stub] autorelease_stub]; -} - -- (void) setMidlist: (NSMutableArray *) midlist { - [midlist retain_stub]; - [__midlist release_stub]; - __midlist = midlist; - __midlist_isset = YES; -} - -- (BOOL) midlistIsSet { - return __midlist_isset; -} - -- (void) unsetMidlist { - [__midlist release_stub]; - __midlist = nil; - __midlist_isset = NO; -} - -- (NSMutableDictionary *) extraMap { - return [[__extraMap retain_stub] autorelease_stub]; -} - -- (void) setExtraMap: (NSMutableDictionary *) extraMap { - [extraMap retain_stub]; - [__extraMap release_stub]; - __extraMap = extraMap; - __extraMap_isset = YES; -} - -- (BOOL) extraMapIsSet { - return __extraMap_isset; -} - -- (void) unsetExtraMap { - [__extraMap release_stub]; - __extraMap = nil; - __extraMap_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_LIST) { - int _size166; - [inProtocol readListBeginReturningElementType: NULL size: &_size166]; - NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size166]; - int _i167; - for (_i167 = 0; _i167 < _size166; ++_i167) - { - NSString * _elem168 = [inProtocol readString]; - [fieldValue addObject: _elem168]; - } - [inProtocol readListEnd]; - [self setTidlist: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRUCT) { - TimPage *fieldValue = [[TimPage alloc] init]; - [fieldValue read: inProtocol]; - [self setTimPage: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_LIST) { - int _size169; - [inProtocol readListBeginReturningElementType: NULL size: &_size169]; - NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size169]; - int _i170; - for (_i170 = 0; _i170 < _size169; ++_i170) - { - NSString * _elem171 = [inProtocol readString]; - [fieldValue addObject: _elem171]; - } - [inProtocol readListEnd]; - [self setMidlist: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 4: - if (fieldType == TType_MAP) { - int _size172; - [inProtocol readMapBeginReturningKeyType: NULL valueType: NULL size: &_size172]; - NSMutableDictionary * fieldValue = [[NSMutableDictionary alloc] initWithCapacity: _size172]; - int _i173; - for (_i173 = 0; _i173 < _size172; ++_i173) - { - NSString * _key174 = [inProtocol readString]; - NSString * _val175 = [inProtocol readString]; - [fieldValue setObject: _val175 forKey: _key174]; - } - [inProtocol readMapEnd]; - [self setExtraMap: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimMessageIq"]; - if (__tidlist_isset) { - if (__tidlist != nil) { - [outProtocol writeFieldBeginWithName: @"tidlist" type: TType_LIST fieldID: 1]; - { - [outProtocol writeListBeginWithElementType: TType_STRING size: [__tidlist count]]; - int idx177; - for (idx177 = 0; idx177 < [__tidlist count]; idx177++) - { - [outProtocol writeString: [__tidlist objectAtIndex: idx177]]; - } - [outProtocol writeListEnd]; - } - [outProtocol writeFieldEnd]; - } - } - if (__timPage_isset) { - if (__timPage != nil) { - [outProtocol writeFieldBeginWithName: @"timPage" type: TType_STRUCT fieldID: 2]; - [__timPage write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__midlist_isset) { - if (__midlist != nil) { - [outProtocol writeFieldBeginWithName: @"midlist" type: TType_LIST fieldID: 3]; - { - [outProtocol writeListBeginWithElementType: TType_STRING size: [__midlist count]]; - int idx179; - for (idx179 = 0; idx179 < [__midlist count]; idx179++) - { - [outProtocol writeString: [__midlist objectAtIndex: idx179]]; - } - [outProtocol writeListEnd]; - } - [outProtocol writeFieldEnd]; - } - } - if (__extraMap_isset) { - if (__extraMap != nil) { - [outProtocol writeFieldBeginWithName: @"extraMap" type: TType_MAP fieldID: 4]; - { - [outProtocol writeMapBeginWithKeyType: TType_STRING valueType: TType_STRING size: [__extraMap count]]; - NSEnumerator * _iter180 = [__extraMap keyEnumerator]; - id key181; - while ((key181 = [_iter180 nextObject])) - { - [outProtocol writeString: key181]; - [outProtocol writeString: [__extraMap objectForKey: key181]]; - } - [outProtocol writeMapEnd]; - } - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimMessageIq("]; - [ms appendString: @"tidlist:"]; - [ms appendFormat: @"%@", __tidlist]; - [ms appendString: @",timPage:"]; - [ms appendFormat: @"%@", __timPage]; - [ms appendString: @",midlist:"]; - [ms appendFormat: @"%@", __midlist]; - [ms appendString: @",extraMap:"]; - [ms appendFormat: @"%@", __extraMap]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation TimAuth - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithDomain: (NSString *) domain username: (NSString *) username pwd: (NSString *) pwd -{ - self = [super init]; - __domain = [domain retain_stub]; - __domain_isset = YES; - __username = [username retain_stub]; - __username_isset = YES; - __pwd = [pwd retain_stub]; - __pwd_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"domain"]) - { - __domain = [[decoder decodeObjectForKey: @"domain"] retain_stub]; - __domain_isset = YES; - } - if ([decoder containsValueForKey: @"username"]) - { - __username = [[decoder decodeObjectForKey: @"username"] retain_stub]; - __username_isset = YES; - } - if ([decoder containsValueForKey: @"pwd"]) - { - __pwd = [[decoder decodeObjectForKey: @"pwd"] retain_stub]; - __pwd_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__domain_isset) - { - [encoder encodeObject: __domain forKey: @"domain"]; - } - if (__username_isset) - { - [encoder encodeObject: __username forKey: @"username"]; - } - if (__pwd_isset) - { - [encoder encodeObject: __pwd forKey: @"pwd"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __domain_isset ? 2654435761 : 0; - if (__domain_isset) - { - hash = (hash * 31) ^ [__domain hash]; - } - hash = (hash * 31) ^ __username_isset ? 2654435761 : 0; - if (__username_isset) - { - hash = (hash * 31) ^ [__username hash]; - } - hash = (hash * 31) ^ __pwd_isset ? 2654435761 : 0; - if (__pwd_isset) - { - hash = (hash * 31) ^ [__pwd hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimAuth class]]) { - return NO; - } - TimAuth *other = (TimAuth *)anObject; - if ((__domain_isset != other->__domain_isset) || - (__domain_isset && ((__domain || other->__domain) && ![__domain isEqual:other->__domain]))) { - return NO; - } - if ((__username_isset != other->__username_isset) || - (__username_isset && ((__username || other->__username) && ![__username isEqual:other->__username]))) { - return NO; - } - if ((__pwd_isset != other->__pwd_isset) || - (__pwd_isset && ((__pwd || other->__pwd) && ![__pwd isEqual:other->__pwd]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__domain release_stub]; - [__username release_stub]; - [__pwd release_stub]; - [super dealloc_stub]; -} - -- (NSString *) domain { - return [[__domain retain_stub] autorelease_stub]; -} - -- (void) setDomain: (NSString *) domain { - [domain retain_stub]; - [__domain release_stub]; - __domain = domain; - __domain_isset = YES; -} - -- (BOOL) domainIsSet { - return __domain_isset; -} - -- (void) unsetDomain { - [__domain release_stub]; - __domain = nil; - __domain_isset = NO; -} - -- (NSString *) username { - return [[__username retain_stub] autorelease_stub]; -} - -- (void) setUsername: (NSString *) username { - [username retain_stub]; - [__username release_stub]; - __username = username; - __username_isset = YES; -} - -- (BOOL) usernameIsSet { - return __username_isset; -} - -- (void) unsetUsername { - [__username release_stub]; - __username = nil; - __username_isset = NO; -} - -- (NSString *) pwd { - return [[__pwd retain_stub] autorelease_stub]; -} - -- (void) setPwd: (NSString *) pwd { - [pwd retain_stub]; - [__pwd release_stub]; - __pwd = pwd; - __pwd_isset = YES; -} - -- (BOOL) pwdIsSet { - return __pwd_isset; -} - -- (void) unsetPwd { - [__pwd release_stub]; - __pwd = nil; - __pwd_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setDomain: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setUsername: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setPwd: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimAuth"]; - if (__domain_isset) { - if (__domain != nil) { - [outProtocol writeFieldBeginWithName: @"domain" type: TType_STRING fieldID: 1]; - [outProtocol writeString: __domain]; - [outProtocol writeFieldEnd]; - } - } - if (__username_isset) { - if (__username != nil) { - [outProtocol writeFieldBeginWithName: @"username" type: TType_STRING fieldID: 2]; - [outProtocol writeString: __username]; - [outProtocol writeFieldEnd]; - } - } - if (__pwd_isset) { - if (__pwd != nil) { - [outProtocol writeFieldBeginWithName: @"pwd" type: TType_STRING fieldID: 3]; - [outProtocol writeString: __pwd]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimAuth("]; - [ms appendString: @"domain:"]; - [ms appendFormat: @"\"%@\"", __domain]; - [ms appendString: @",username:"]; - [ms appendFormat: @"\"%@\"", __username]; - [ms appendString: @",pwd:"]; - [ms appendFormat: @"\"%@\"", __pwd]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation TimMBeanList - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithThreadId: (NSString *) threadId timMBeanList: (NSMutableArray *) timMBeanList reqType: (NSString *) reqType extraMap: (NSMutableDictionary *) extraMap -{ - self = [super init]; - __threadId = [threadId retain_stub]; - __threadId_isset = YES; - __timMBeanList = [timMBeanList retain_stub]; - __timMBeanList_isset = YES; - __reqType = [reqType retain_stub]; - __reqType_isset = YES; - __extraMap = [extraMap retain_stub]; - __extraMap_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"threadId"]) - { - __threadId = [[decoder decodeObjectForKey: @"threadId"] retain_stub]; - __threadId_isset = YES; - } - if ([decoder containsValueForKey: @"timMBeanList"]) - { - __timMBeanList = [[decoder decodeObjectForKey: @"timMBeanList"] retain_stub]; - __timMBeanList_isset = YES; - } - if ([decoder containsValueForKey: @"reqType"]) - { - __reqType = [[decoder decodeObjectForKey: @"reqType"] retain_stub]; - __reqType_isset = YES; - } - if ([decoder containsValueForKey: @"extraMap"]) - { - __extraMap = [[decoder decodeObjectForKey: @"extraMap"] retain_stub]; - __extraMap_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__threadId_isset) - { - [encoder encodeObject: __threadId forKey: @"threadId"]; - } - if (__timMBeanList_isset) - { - [encoder encodeObject: __timMBeanList forKey: @"timMBeanList"]; - } - if (__reqType_isset) - { - [encoder encodeObject: __reqType forKey: @"reqType"]; - } - if (__extraMap_isset) - { - [encoder encodeObject: __extraMap forKey: @"extraMap"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __threadId_isset ? 2654435761 : 0; - if (__threadId_isset) - { - hash = (hash * 31) ^ [__threadId hash]; - } - hash = (hash * 31) ^ __timMBeanList_isset ? 2654435761 : 0; - if (__timMBeanList_isset) - { - hash = (hash * 31) ^ [__timMBeanList hash]; - } - hash = (hash * 31) ^ __reqType_isset ? 2654435761 : 0; - if (__reqType_isset) - { - hash = (hash * 31) ^ [__reqType hash]; - } - hash = (hash * 31) ^ __extraMap_isset ? 2654435761 : 0; - if (__extraMap_isset) - { - hash = (hash * 31) ^ [__extraMap hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimMBeanList class]]) { - return NO; - } - TimMBeanList *other = (TimMBeanList *)anObject; - if ((__threadId_isset != other->__threadId_isset) || - (__threadId_isset && ((__threadId || other->__threadId) && ![__threadId isEqual:other->__threadId]))) { - return NO; - } - if ((__timMBeanList_isset != other->__timMBeanList_isset) || - (__timMBeanList_isset && ((__timMBeanList || other->__timMBeanList) && ![__timMBeanList isEqual:other->__timMBeanList]))) { - return NO; - } - if ((__reqType_isset != other->__reqType_isset) || - (__reqType_isset && ((__reqType || other->__reqType) && ![__reqType isEqual:other->__reqType]))) { - return NO; - } - if ((__extraMap_isset != other->__extraMap_isset) || - (__extraMap_isset && ((__extraMap || other->__extraMap) && ![__extraMap isEqual:other->__extraMap]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__threadId release_stub]; - [__timMBeanList release_stub]; - [__reqType release_stub]; - [__extraMap release_stub]; - [super dealloc_stub]; -} - -- (NSString *) threadId { - return [[__threadId retain_stub] autorelease_stub]; -} - -- (void) setThreadId: (NSString *) threadId { - [threadId retain_stub]; - [__threadId release_stub]; - __threadId = threadId; - __threadId_isset = YES; -} - -- (BOOL) threadIdIsSet { - return __threadId_isset; -} - -- (void) unsetThreadId { - [__threadId release_stub]; - __threadId = nil; - __threadId_isset = NO; -} - -- (NSMutableArray *) timMBeanList { - return [[__timMBeanList retain_stub] autorelease_stub]; -} - -- (void) setTimMBeanList: (NSMutableArray *) timMBeanList { - [timMBeanList retain_stub]; - [__timMBeanList release_stub]; - __timMBeanList = timMBeanList; - __timMBeanList_isset = YES; -} - -- (BOOL) timMBeanListIsSet { - return __timMBeanList_isset; -} - -- (void) unsetTimMBeanList { - [__timMBeanList release_stub]; - __timMBeanList = nil; - __timMBeanList_isset = NO; -} - -- (NSString *) reqType { - return [[__reqType retain_stub] autorelease_stub]; -} - -- (void) setReqType: (NSString *) reqType { - [reqType retain_stub]; - [__reqType release_stub]; - __reqType = reqType; - __reqType_isset = YES; -} - -- (BOOL) reqTypeIsSet { - return __reqType_isset; -} - -- (void) unsetReqType { - [__reqType release_stub]; - __reqType = nil; - __reqType_isset = NO; -} - -- (NSMutableDictionary *) extraMap { - return [[__extraMap retain_stub] autorelease_stub]; -} - -- (void) setExtraMap: (NSMutableDictionary *) extraMap { - [extraMap retain_stub]; - [__extraMap release_stub]; - __extraMap = extraMap; - __extraMap_isset = YES; -} - -- (BOOL) extraMapIsSet { - return __extraMap_isset; -} - -- (void) unsetExtraMap { - [__extraMap release_stub]; - __extraMap = nil; - __extraMap_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setThreadId: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_LIST) { - int _size182; - [inProtocol readListBeginReturningElementType: NULL size: &_size182]; - NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size182]; - int _i183; - for (_i183 = 0; _i183 < _size182; ++_i183) - { - TimMBean *_elem184 = [[TimMBean alloc] init]; - [_elem184 read: inProtocol]; - [fieldValue addObject: _elem184]; - [_elem184 release_stub]; - } - [inProtocol readListEnd]; - [self setTimMBeanList: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setReqType: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 4: - if (fieldType == TType_MAP) { - int _size185; - [inProtocol readMapBeginReturningKeyType: NULL valueType: NULL size: &_size185]; - NSMutableDictionary * fieldValue = [[NSMutableDictionary alloc] initWithCapacity: _size185]; - int _i186; - for (_i186 = 0; _i186 < _size185; ++_i186) - { - NSString * _key187 = [inProtocol readString]; - NSString * _val188 = [inProtocol readString]; - [fieldValue setObject: _val188 forKey: _key187]; - } - [inProtocol readMapEnd]; - [self setExtraMap: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimMBeanList"]; - if (__threadId_isset) { - if (__threadId != nil) { - [outProtocol writeFieldBeginWithName: @"threadId" type: TType_STRING fieldID: 1]; - [outProtocol writeString: __threadId]; - [outProtocol writeFieldEnd]; - } - } - if (__timMBeanList_isset) { - if (__timMBeanList != nil) { - [outProtocol writeFieldBeginWithName: @"timMBeanList" type: TType_LIST fieldID: 2]; - { - [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__timMBeanList count]]; - int idx190; - for (idx190 = 0; idx190 < [__timMBeanList count]; idx190++) - { - [[__timMBeanList objectAtIndex: idx190] write: outProtocol]; - } - [outProtocol writeListEnd]; - } - [outProtocol writeFieldEnd]; - } - } - if (__reqType_isset) { - if (__reqType != nil) { - [outProtocol writeFieldBeginWithName: @"reqType" type: TType_STRING fieldID: 3]; - [outProtocol writeString: __reqType]; - [outProtocol writeFieldEnd]; - } - } - if (__extraMap_isset) { - if (__extraMap != nil) { - [outProtocol writeFieldBeginWithName: @"extraMap" type: TType_MAP fieldID: 4]; - { - [outProtocol writeMapBeginWithKeyType: TType_STRING valueType: TType_STRING size: [__extraMap count]]; - NSEnumerator * _iter191 = [__extraMap keyEnumerator]; - id key192; - while ((key192 = [_iter191 nextObject])) - { - [outProtocol writeString: key192]; - [outProtocol writeString: [__extraMap objectForKey: key192]]; - } - [outProtocol writeMapEnd]; - } - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields - if (!__threadId_isset) { - @throw [TProtocolException exceptionWithName: @"TProtocolException" - reason: @"Required field 'threadId' is not set."]; - } -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimMBeanList("]; - [ms appendString: @"threadId:"]; - [ms appendFormat: @"\"%@\"", __threadId]; - [ms appendString: @",timMBeanList:"]; - [ms appendFormat: @"%@", __timMBeanList]; - [ms appendString: @",reqType:"]; - [ms appendFormat: @"\"%@\"", __reqType]; - [ms appendString: @",extraMap:"]; - [ms appendFormat: @"%@", __extraMap]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation TimPBeanList - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithThreadId: (NSString *) threadId timPBeanList: (NSMutableArray *) timPBeanList reqType: (NSString *) reqType extraMap: (NSMutableDictionary *) extraMap -{ - self = [super init]; - __threadId = [threadId retain_stub]; - __threadId_isset = YES; - __timPBeanList = [timPBeanList retain_stub]; - __timPBeanList_isset = YES; - __reqType = [reqType retain_stub]; - __reqType_isset = YES; - __extraMap = [extraMap retain_stub]; - __extraMap_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"threadId"]) - { - __threadId = [[decoder decodeObjectForKey: @"threadId"] retain_stub]; - __threadId_isset = YES; - } - if ([decoder containsValueForKey: @"timPBeanList"]) - { - __timPBeanList = [[decoder decodeObjectForKey: @"timPBeanList"] retain_stub]; - __timPBeanList_isset = YES; - } - if ([decoder containsValueForKey: @"reqType"]) - { - __reqType = [[decoder decodeObjectForKey: @"reqType"] retain_stub]; - __reqType_isset = YES; - } - if ([decoder containsValueForKey: @"extraMap"]) - { - __extraMap = [[decoder decodeObjectForKey: @"extraMap"] retain_stub]; - __extraMap_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__threadId_isset) - { - [encoder encodeObject: __threadId forKey: @"threadId"]; - } - if (__timPBeanList_isset) - { - [encoder encodeObject: __timPBeanList forKey: @"timPBeanList"]; - } - if (__reqType_isset) - { - [encoder encodeObject: __reqType forKey: @"reqType"]; - } - if (__extraMap_isset) - { - [encoder encodeObject: __extraMap forKey: @"extraMap"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __threadId_isset ? 2654435761 : 0; - if (__threadId_isset) - { - hash = (hash * 31) ^ [__threadId hash]; - } - hash = (hash * 31) ^ __timPBeanList_isset ? 2654435761 : 0; - if (__timPBeanList_isset) - { - hash = (hash * 31) ^ [__timPBeanList hash]; - } - hash = (hash * 31) ^ __reqType_isset ? 2654435761 : 0; - if (__reqType_isset) - { - hash = (hash * 31) ^ [__reqType hash]; - } - hash = (hash * 31) ^ __extraMap_isset ? 2654435761 : 0; - if (__extraMap_isset) - { - hash = (hash * 31) ^ [__extraMap hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimPBeanList class]]) { - return NO; - } - TimPBeanList *other = (TimPBeanList *)anObject; - if ((__threadId_isset != other->__threadId_isset) || - (__threadId_isset && ((__threadId || other->__threadId) && ![__threadId isEqual:other->__threadId]))) { - return NO; - } - if ((__timPBeanList_isset != other->__timPBeanList_isset) || - (__timPBeanList_isset && ((__timPBeanList || other->__timPBeanList) && ![__timPBeanList isEqual:other->__timPBeanList]))) { - return NO; - } - if ((__reqType_isset != other->__reqType_isset) || - (__reqType_isset && ((__reqType || other->__reqType) && ![__reqType isEqual:other->__reqType]))) { - return NO; - } - if ((__extraMap_isset != other->__extraMap_isset) || - (__extraMap_isset && ((__extraMap || other->__extraMap) && ![__extraMap isEqual:other->__extraMap]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__threadId release_stub]; - [__timPBeanList release_stub]; - [__reqType release_stub]; - [__extraMap release_stub]; - [super dealloc_stub]; -} - -- (NSString *) threadId { - return [[__threadId retain_stub] autorelease_stub]; -} - -- (void) setThreadId: (NSString *) threadId { - [threadId retain_stub]; - [__threadId release_stub]; - __threadId = threadId; - __threadId_isset = YES; -} - -- (BOOL) threadIdIsSet { - return __threadId_isset; -} - -- (void) unsetThreadId { - [__threadId release_stub]; - __threadId = nil; - __threadId_isset = NO; -} - -- (NSMutableArray *) timPBeanList { - return [[__timPBeanList retain_stub] autorelease_stub]; -} - -- (void) setTimPBeanList: (NSMutableArray *) timPBeanList { - [timPBeanList retain_stub]; - [__timPBeanList release_stub]; - __timPBeanList = timPBeanList; - __timPBeanList_isset = YES; -} - -- (BOOL) timPBeanListIsSet { - return __timPBeanList_isset; -} - -- (void) unsetTimPBeanList { - [__timPBeanList release_stub]; - __timPBeanList = nil; - __timPBeanList_isset = NO; -} - -- (NSString *) reqType { - return [[__reqType retain_stub] autorelease_stub]; -} - -- (void) setReqType: (NSString *) reqType { - [reqType retain_stub]; - [__reqType release_stub]; - __reqType = reqType; - __reqType_isset = YES; -} - -- (BOOL) reqTypeIsSet { - return __reqType_isset; -} - -- (void) unsetReqType { - [__reqType release_stub]; - __reqType = nil; - __reqType_isset = NO; -} - -- (NSMutableDictionary *) extraMap { - return [[__extraMap retain_stub] autorelease_stub]; -} - -- (void) setExtraMap: (NSMutableDictionary *) extraMap { - [extraMap retain_stub]; - [__extraMap release_stub]; - __extraMap = extraMap; - __extraMap_isset = YES; -} - -- (BOOL) extraMapIsSet { - return __extraMap_isset; -} - -- (void) unsetExtraMap { - [__extraMap release_stub]; - __extraMap = nil; - __extraMap_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setThreadId: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_LIST) { - int _size193; - [inProtocol readListBeginReturningElementType: NULL size: &_size193]; - NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size193]; - int _i194; - for (_i194 = 0; _i194 < _size193; ++_i194) - { - TimPBean *_elem195 = [[TimPBean alloc] init]; - [_elem195 read: inProtocol]; - [fieldValue addObject: _elem195]; - [_elem195 release_stub]; - } - [inProtocol readListEnd]; - [self setTimPBeanList: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setReqType: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 4: - if (fieldType == TType_MAP) { - int _size196; - [inProtocol readMapBeginReturningKeyType: NULL valueType: NULL size: &_size196]; - NSMutableDictionary * fieldValue = [[NSMutableDictionary alloc] initWithCapacity: _size196]; - int _i197; - for (_i197 = 0; _i197 < _size196; ++_i197) - { - NSString * _key198 = [inProtocol readString]; - NSString * _val199 = [inProtocol readString]; - [fieldValue setObject: _val199 forKey: _key198]; - } - [inProtocol readMapEnd]; - [self setExtraMap: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimPBeanList"]; - if (__threadId_isset) { - if (__threadId != nil) { - [outProtocol writeFieldBeginWithName: @"threadId" type: TType_STRING fieldID: 1]; - [outProtocol writeString: __threadId]; - [outProtocol writeFieldEnd]; - } - } - if (__timPBeanList_isset) { - if (__timPBeanList != nil) { - [outProtocol writeFieldBeginWithName: @"timPBeanList" type: TType_LIST fieldID: 2]; - { - [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__timPBeanList count]]; - int idx201; - for (idx201 = 0; idx201 < [__timPBeanList count]; idx201++) - { - [[__timPBeanList objectAtIndex: idx201] write: outProtocol]; - } - [outProtocol writeListEnd]; - } - [outProtocol writeFieldEnd]; - } - } - if (__reqType_isset) { - if (__reqType != nil) { - [outProtocol writeFieldBeginWithName: @"reqType" type: TType_STRING fieldID: 3]; - [outProtocol writeString: __reqType]; - [outProtocol writeFieldEnd]; - } - } - if (__extraMap_isset) { - if (__extraMap != nil) { - [outProtocol writeFieldBeginWithName: @"extraMap" type: TType_MAP fieldID: 4]; - { - [outProtocol writeMapBeginWithKeyType: TType_STRING valueType: TType_STRING size: [__extraMap count]]; - NSEnumerator * _iter202 = [__extraMap keyEnumerator]; - id key203; - while ((key203 = [_iter202 nextObject])) - { - [outProtocol writeString: key203]; - [outProtocol writeString: [__extraMap objectForKey: key203]]; - } - [outProtocol writeMapEnd]; - } - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields - if (!__threadId_isset) { - @throw [TProtocolException exceptionWithName: @"TProtocolException" - reason: @"Required field 'threadId' is not set."]; - } -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimPBeanList("]; - [ms appendString: @"threadId:"]; - [ms appendFormat: @"\"%@\"", __threadId]; - [ms appendString: @",timPBeanList:"]; - [ms appendFormat: @"%@", __timPBeanList]; - [ms appendString: @",reqType:"]; - [ms appendFormat: @"\"%@\"", __reqType]; - [ms appendString: @",extraMap:"]; - [ms appendFormat: @"%@", __extraMap]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation TimPropertyBean - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithThreadId: (NSString *) threadId interflow: (NSString *) interflow tls: (NSString *) tls -{ - self = [super init]; - __threadId = [threadId retain_stub]; - __threadId_isset = YES; - __interflow = [interflow retain_stub]; - __interflow_isset = YES; - __tls = [tls retain_stub]; - __tls_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"threadId"]) - { - __threadId = [[decoder decodeObjectForKey: @"threadId"] retain_stub]; - __threadId_isset = YES; - } - if ([decoder containsValueForKey: @"interflow"]) - { - __interflow = [[decoder decodeObjectForKey: @"interflow"] retain_stub]; - __interflow_isset = YES; - } - if ([decoder containsValueForKey: @"tls"]) - { - __tls = [[decoder decodeObjectForKey: @"tls"] retain_stub]; - __tls_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__threadId_isset) - { - [encoder encodeObject: __threadId forKey: @"threadId"]; - } - if (__interflow_isset) - { - [encoder encodeObject: __interflow forKey: @"interflow"]; - } - if (__tls_isset) - { - [encoder encodeObject: __tls forKey: @"tls"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __threadId_isset ? 2654435761 : 0; - if (__threadId_isset) - { - hash = (hash * 31) ^ [__threadId hash]; - } - hash = (hash * 31) ^ __interflow_isset ? 2654435761 : 0; - if (__interflow_isset) - { - hash = (hash * 31) ^ [__interflow hash]; - } - hash = (hash * 31) ^ __tls_isset ? 2654435761 : 0; - if (__tls_isset) - { - hash = (hash * 31) ^ [__tls hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimPropertyBean class]]) { - return NO; - } - TimPropertyBean *other = (TimPropertyBean *)anObject; - if ((__threadId_isset != other->__threadId_isset) || - (__threadId_isset && ((__threadId || other->__threadId) && ![__threadId isEqual:other->__threadId]))) { - return NO; - } - if ((__interflow_isset != other->__interflow_isset) || - (__interflow_isset && ((__interflow || other->__interflow) && ![__interflow isEqual:other->__interflow]))) { - return NO; - } - if ((__tls_isset != other->__tls_isset) || - (__tls_isset && ((__tls || other->__tls) && ![__tls isEqual:other->__tls]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__threadId release_stub]; - [__interflow release_stub]; - [__tls release_stub]; - [super dealloc_stub]; -} - -- (NSString *) threadId { - return [[__threadId retain_stub] autorelease_stub]; -} - -- (void) setThreadId: (NSString *) threadId { - [threadId retain_stub]; - [__threadId release_stub]; - __threadId = threadId; - __threadId_isset = YES; -} - -- (BOOL) threadIdIsSet { - return __threadId_isset; -} - -- (void) unsetThreadId { - [__threadId release_stub]; - __threadId = nil; - __threadId_isset = NO; -} - -- (NSString *) interflow { - return [[__interflow retain_stub] autorelease_stub]; -} - -- (void) setInterflow: (NSString *) interflow { - [interflow retain_stub]; - [__interflow release_stub]; - __interflow = interflow; - __interflow_isset = YES; -} - -- (BOOL) interflowIsSet { - return __interflow_isset; -} - -- (void) unsetInterflow { - [__interflow release_stub]; - __interflow = nil; - __interflow_isset = NO; -} - -- (NSString *) tls { - return [[__tls retain_stub] autorelease_stub]; -} - -- (void) setTls: (NSString *) tls { - [tls retain_stub]; - [__tls release_stub]; - __tls = tls; - __tls_isset = YES; -} - -- (BOOL) tlsIsSet { - return __tls_isset; -} - -- (void) unsetTls { - [__tls release_stub]; - __tls = nil; - __tls_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setThreadId: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setInterflow: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setTls: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimPropertyBean"]; - if (__threadId_isset) { - if (__threadId != nil) { - [outProtocol writeFieldBeginWithName: @"threadId" type: TType_STRING fieldID: 1]; - [outProtocol writeString: __threadId]; - [outProtocol writeFieldEnd]; - } - } - if (__interflow_isset) { - if (__interflow != nil) { - [outProtocol writeFieldBeginWithName: @"interflow" type: TType_STRING fieldID: 2]; - [outProtocol writeString: __interflow]; - [outProtocol writeFieldEnd]; - } - } - if (__tls_isset) { - if (__tls != nil) { - [outProtocol writeFieldBeginWithName: @"tls" type: TType_STRING fieldID: 3]; - [outProtocol writeString: __tls]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimPropertyBean("]; - [ms appendString: @"threadId:"]; - [ms appendFormat: @"\"%@\"", __threadId]; - [ms appendString: @",interflow:"]; - [ms appendFormat: @"\"%@\"", __interflow]; - [ms appendString: @",tls:"]; - [ms appendFormat: @"\"%@\"", __tls]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -static int32_t protocolversion = 4; -static NSString * protocolversionName = @"1.1.0"; -static NSString * TIM_SC_SUCCESS = @"200"; -static NSString * TIM_SC_FAILED = @"400"; - -@implementation timConstants -+ (void) initialize { -} -+ (int32_t) protocolversion{ - return protocolversion; -} -+ (NSString *) protocolversionName{ - return protocolversionName; -} -+ (NSString *) TIM_SC_SUCCESS{ - return TIM_SC_SUCCESS; -} -+ (NSString *) TIM_SC_FAILED{ - return TIM_SC_FAILED; -} -@end - -@interface timStream_args : NSObject { - TimParam * __param; - - BOOL __param_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=param, setter=setParam:) TimParam * param; -#endif - -- (id) init; -- (id) initWithParam: (TimParam *) param; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimParam *) param; -- (void) setParam: (TimParam *) param; -#endif -- (BOOL) paramIsSet; - -@end - -@implementation timStream_args - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithParam: (TimParam *) param -{ - self = [super init]; - __param = [param retain_stub]; - __param_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"param"]) - { - __param = [[decoder decodeObjectForKey: @"param"] retain_stub]; - __param_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__param_isset) - { - [encoder encodeObject: __param forKey: @"param"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __param_isset ? 2654435761 : 0; - if (__param_isset) - { - hash = (hash * 31) ^ [__param hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[timStream_args class]]) { - return NO; - } - timStream_args *other = (timStream_args *)anObject; - if ((__param_isset != other->__param_isset) || - (__param_isset && ((__param || other->__param) && ![__param isEqual:other->__param]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__param release_stub]; - [super dealloc_stub]; -} - -- (TimParam *) param { - return [[__param retain_stub] autorelease_stub]; -} - -- (void) setParam: (TimParam *) param { - [param retain_stub]; - [__param release_stub]; - __param = param; - __param_isset = YES; -} - -- (BOOL) paramIsSet { - return __param_isset; -} - -- (void) unsetParam { - [__param release_stub]; - __param = nil; - __param_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - TimParam *fieldValue = [[TimParam alloc] init]; - [fieldValue read: inProtocol]; - [self setParam: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"timStream_args"]; - if (__param_isset) { - if (__param != nil) { - [outProtocol writeFieldBeginWithName: @"param" type: TType_STRUCT fieldID: 1]; - [__param write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"timStream_args("]; - [ms appendString: @"param:"]; - [ms appendFormat: @"%@", __param]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface timStarttls_args : NSObject { -} - -- (id) init; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -@end - -@implementation timStarttls_args - -- (id) init -{ - self = [super init]; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[timStarttls_args class]]) { - return NO; - } - timStarttls_args *other = (timStarttls_args *)anObject; - return YES; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"timStarttls_args"]; - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"timStarttls_args("]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface timLogin_args : NSObject { - Tid * __tid; - NSString * __pwd; - - BOOL __tid_isset; - BOOL __pwd_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=tid, setter=setTid:) Tid * tid; -@property (nonatomic, retain, getter=pwd, setter=setPwd:) NSString * pwd; -#endif - -- (id) init; -- (id) initWithTid: (Tid *) tid pwd: (NSString *) pwd; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (Tid *) tid; -- (void) setTid: (Tid *) tid; -#endif -- (BOOL) tidIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) pwd; -- (void) setPwd: (NSString *) pwd; -#endif -- (BOOL) pwdIsSet; - -@end - -@implementation timLogin_args - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithTid: (Tid *) tid pwd: (NSString *) pwd -{ - self = [super init]; - __tid = [tid retain_stub]; - __tid_isset = YES; - __pwd = [pwd retain_stub]; - __pwd_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"tid"]) - { - __tid = [[decoder decodeObjectForKey: @"tid"] retain_stub]; - __tid_isset = YES; - } - if ([decoder containsValueForKey: @"pwd"]) - { - __pwd = [[decoder decodeObjectForKey: @"pwd"] retain_stub]; - __pwd_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__tid_isset) - { - [encoder encodeObject: __tid forKey: @"tid"]; - } - if (__pwd_isset) - { - [encoder encodeObject: __pwd forKey: @"pwd"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __tid_isset ? 2654435761 : 0; - if (__tid_isset) - { - hash = (hash * 31) ^ [__tid hash]; - } - hash = (hash * 31) ^ __pwd_isset ? 2654435761 : 0; - if (__pwd_isset) - { - hash = (hash * 31) ^ [__pwd hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[timLogin_args class]]) { - return NO; - } - timLogin_args *other = (timLogin_args *)anObject; - if ((__tid_isset != other->__tid_isset) || - (__tid_isset && ((__tid || other->__tid) && ![__tid isEqual:other->__tid]))) { - return NO; - } - if ((__pwd_isset != other->__pwd_isset) || - (__pwd_isset && ((__pwd || other->__pwd) && ![__pwd isEqual:other->__pwd]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__tid release_stub]; - [__pwd release_stub]; - [super dealloc_stub]; -} - -- (Tid *) tid { - return [[__tid retain_stub] autorelease_stub]; -} - -- (void) setTid: (Tid *) tid { - [tid retain_stub]; - [__tid release_stub]; - __tid = tid; - __tid_isset = YES; -} - -- (BOOL) tidIsSet { - return __tid_isset; -} - -- (void) unsetTid { - [__tid release_stub]; - __tid = nil; - __tid_isset = NO; -} - -- (NSString *) pwd { - return [[__pwd retain_stub] autorelease_stub]; -} - -- (void) setPwd: (NSString *) pwd { - [pwd retain_stub]; - [__pwd release_stub]; - __pwd = pwd; - __pwd_isset = YES; -} - -- (BOOL) pwdIsSet { - return __pwd_isset; -} - -- (void) unsetPwd { - [__pwd release_stub]; - __pwd = nil; - __pwd_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - Tid *fieldValue = [[Tid alloc] init]; - [fieldValue read: inProtocol]; - [self setTid: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setPwd: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"timLogin_args"]; - if (__tid_isset) { - if (__tid != nil) { - [outProtocol writeFieldBeginWithName: @"tid" type: TType_STRUCT fieldID: 1]; - [__tid write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__pwd_isset) { - if (__pwd != nil) { - [outProtocol writeFieldBeginWithName: @"pwd" type: TType_STRING fieldID: 2]; - [outProtocol writeString: __pwd]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"timLogin_args("]; - [ms appendString: @"tid:"]; - [ms appendFormat: @"%@", __tid]; - [ms appendString: @",pwd:"]; - [ms appendFormat: @"\"%@\"", __pwd]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface timAck_args : NSObject { - TimAckBean * __ab; - - BOOL __ab_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=ab, setter=setAb:) TimAckBean * ab; -#endif - -- (id) init; -- (id) initWithAb: (TimAckBean *) ab; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimAckBean *) ab; -- (void) setAb: (TimAckBean *) ab; -#endif -- (BOOL) abIsSet; - -@end - -@implementation timAck_args - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithAb: (TimAckBean *) ab -{ - self = [super init]; - __ab = [ab retain_stub]; - __ab_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"ab"]) - { - __ab = [[decoder decodeObjectForKey: @"ab"] retain_stub]; - __ab_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__ab_isset) - { - [encoder encodeObject: __ab forKey: @"ab"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __ab_isset ? 2654435761 : 0; - if (__ab_isset) - { - hash = (hash * 31) ^ [__ab hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[timAck_args class]]) { - return NO; - } - timAck_args *other = (timAck_args *)anObject; - if ((__ab_isset != other->__ab_isset) || - (__ab_isset && ((__ab || other->__ab) && ![__ab isEqual:other->__ab]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__ab release_stub]; - [super dealloc_stub]; -} - -- (TimAckBean *) ab { - return [[__ab retain_stub] autorelease_stub]; -} - -- (void) setAb: (TimAckBean *) ab { - [ab retain_stub]; - [__ab release_stub]; - __ab = ab; - __ab_isset = YES; -} - -- (BOOL) abIsSet { - return __ab_isset; -} - -- (void) unsetAb { - [__ab release_stub]; - __ab = nil; - __ab_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - TimAckBean *fieldValue = [[TimAckBean alloc] init]; - [fieldValue read: inProtocol]; - [self setAb: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"timAck_args"]; - if (__ab_isset) { - if (__ab != nil) { - [outProtocol writeFieldBeginWithName: @"ab" type: TType_STRUCT fieldID: 1]; - [__ab write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"timAck_args("]; - [ms appendString: @"ab:"]; - [ms appendFormat: @"%@", __ab]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface timPresence_args : NSObject { - TimPBean * __pbean; - - BOOL __pbean_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=pbean, setter=setPbean:) TimPBean * pbean; -#endif - -- (id) init; -- (id) initWithPbean: (TimPBean *) pbean; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimPBean *) pbean; -- (void) setPbean: (TimPBean *) pbean; -#endif -- (BOOL) pbeanIsSet; - -@end - -@implementation timPresence_args - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithPbean: (TimPBean *) pbean -{ - self = [super init]; - __pbean = [pbean retain_stub]; - __pbean_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"pbean"]) - { - __pbean = [[decoder decodeObjectForKey: @"pbean"] retain_stub]; - __pbean_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__pbean_isset) - { - [encoder encodeObject: __pbean forKey: @"pbean"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __pbean_isset ? 2654435761 : 0; - if (__pbean_isset) - { - hash = (hash * 31) ^ [__pbean hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[timPresence_args class]]) { - return NO; - } - timPresence_args *other = (timPresence_args *)anObject; - if ((__pbean_isset != other->__pbean_isset) || - (__pbean_isset && ((__pbean || other->__pbean) && ![__pbean isEqual:other->__pbean]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__pbean release_stub]; - [super dealloc_stub]; -} - -- (TimPBean *) pbean { - return [[__pbean retain_stub] autorelease_stub]; -} - -- (void) setPbean: (TimPBean *) pbean { - [pbean retain_stub]; - [__pbean release_stub]; - __pbean = pbean; - __pbean_isset = YES; -} - -- (BOOL) pbeanIsSet { - return __pbean_isset; -} - -- (void) unsetPbean { - [__pbean release_stub]; - __pbean = nil; - __pbean_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - TimPBean *fieldValue = [[TimPBean alloc] init]; - [fieldValue read: inProtocol]; - [self setPbean: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"timPresence_args"]; - if (__pbean_isset) { - if (__pbean != nil) { - [outProtocol writeFieldBeginWithName: @"pbean" type: TType_STRUCT fieldID: 1]; - [__pbean write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"timPresence_args("]; - [ms appendString: @"pbean:"]; - [ms appendFormat: @"%@", __pbean]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface timMessage_args : NSObject { - TimMBean * __mbean; - - BOOL __mbean_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=mbean, setter=setMbean:) TimMBean * mbean; -#endif - -- (id) init; -- (id) initWithMbean: (TimMBean *) mbean; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimMBean *) mbean; -- (void) setMbean: (TimMBean *) mbean; -#endif -- (BOOL) mbeanIsSet; - -@end - -@implementation timMessage_args - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithMbean: (TimMBean *) mbean -{ - self = [super init]; - __mbean = [mbean retain_stub]; - __mbean_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"mbean"]) - { - __mbean = [[decoder decodeObjectForKey: @"mbean"] retain_stub]; - __mbean_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__mbean_isset) - { - [encoder encodeObject: __mbean forKey: @"mbean"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __mbean_isset ? 2654435761 : 0; - if (__mbean_isset) - { - hash = (hash * 31) ^ [__mbean hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[timMessage_args class]]) { - return NO; - } - timMessage_args *other = (timMessage_args *)anObject; - if ((__mbean_isset != other->__mbean_isset) || - (__mbean_isset && ((__mbean || other->__mbean) && ![__mbean isEqual:other->__mbean]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__mbean release_stub]; - [super dealloc_stub]; -} - -- (TimMBean *) mbean { - return [[__mbean retain_stub] autorelease_stub]; -} - -- (void) setMbean: (TimMBean *) mbean { - [mbean retain_stub]; - [__mbean release_stub]; - __mbean = mbean; - __mbean_isset = YES; -} - -- (BOOL) mbeanIsSet { - return __mbean_isset; -} - -- (void) unsetMbean { - [__mbean release_stub]; - __mbean = nil; - __mbean_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - TimMBean *fieldValue = [[TimMBean alloc] init]; - [fieldValue read: inProtocol]; - [self setMbean: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"timMessage_args"]; - if (__mbean_isset) { - if (__mbean != nil) { - [outProtocol writeFieldBeginWithName: @"mbean" type: TType_STRUCT fieldID: 1]; - [__mbean write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"timMessage_args("]; - [ms appendString: @"mbean:"]; - [ms appendFormat: @"%@", __mbean]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface timPing_args : NSObject { - NSString * __threadId; - - BOOL __threadId_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=threadId, setter=setThreadId:) NSString * threadId; -#endif - -- (id) init; -- (id) initWithThreadId: (NSString *) threadId; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (NSString *) threadId; -- (void) setThreadId: (NSString *) threadId; -#endif -- (BOOL) threadIdIsSet; - -@end - -@implementation timPing_args - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithThreadId: (NSString *) threadId -{ - self = [super init]; - __threadId = [threadId retain_stub]; - __threadId_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"threadId"]) - { - __threadId = [[decoder decodeObjectForKey: @"threadId"] retain_stub]; - __threadId_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__threadId_isset) - { - [encoder encodeObject: __threadId forKey: @"threadId"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __threadId_isset ? 2654435761 : 0; - if (__threadId_isset) - { - hash = (hash * 31) ^ [__threadId hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[timPing_args class]]) { - return NO; - } - timPing_args *other = (timPing_args *)anObject; - if ((__threadId_isset != other->__threadId_isset) || - (__threadId_isset && ((__threadId || other->__threadId) && ![__threadId isEqual:other->__threadId]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__threadId release_stub]; - [super dealloc_stub]; -} - -- (NSString *) threadId { - return [[__threadId retain_stub] autorelease_stub]; -} - -- (void) setThreadId: (NSString *) threadId { - [threadId retain_stub]; - [__threadId release_stub]; - __threadId = threadId; - __threadId_isset = YES; -} - -- (BOOL) threadIdIsSet { - return __threadId_isset; -} - -- (void) unsetThreadId { - [__threadId release_stub]; - __threadId = nil; - __threadId_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setThreadId: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"timPing_args"]; - if (__threadId_isset) { - if (__threadId != nil) { - [outProtocol writeFieldBeginWithName: @"threadId" type: TType_STRING fieldID: 1]; - [outProtocol writeString: __threadId]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"timPing_args("]; - [ms appendString: @"threadId:"]; - [ms appendFormat: @"\"%@\"", __threadId]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface timError_args : NSObject { - TimError * __e; - - BOOL __e_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=e, setter=setE:) TimError * e; -#endif - -- (id) init; -- (id) initWithE: (TimError *) e; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimError *) e; -- (void) setE: (TimError *) e; -#endif -- (BOOL) eIsSet; - -@end - -@implementation timError_args - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithE: (TimError *) e -{ - self = [super init]; - __e = [e retain_stub]; - __e_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"e"]) - { - __e = [[decoder decodeObjectForKey: @"e"] retain_stub]; - __e_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__e_isset) - { - [encoder encodeObject: __e forKey: @"e"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __e_isset ? 2654435761 : 0; - if (__e_isset) - { - hash = (hash * 31) ^ [__e hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[timError_args class]]) { - return NO; - } - timError_args *other = (timError_args *)anObject; - if ((__e_isset != other->__e_isset) || - (__e_isset && ((__e || other->__e) && ![__e isEqual:other->__e]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__e release_stub]; - [super dealloc_stub]; -} - -- (TimError *) e { - return [[__e retain_stub] autorelease_stub]; -} - -- (void) setE: (TimError *) e { - [e retain_stub]; - [__e release_stub]; - __e = e; - __e_isset = YES; -} - -- (BOOL) eIsSet { - return __e_isset; -} - -- (void) unsetE { - [__e release_stub]; - __e = nil; - __e_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - TimError *fieldValue = [[TimError alloc] init]; - [fieldValue read: inProtocol]; - [self setE: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"timError_args"]; - if (__e_isset) { - if (__e != nil) { - [outProtocol writeFieldBeginWithName: @"e" type: TType_STRUCT fieldID: 1]; - [__e write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"timError_args("]; - [ms appendString: @"e:"]; - [ms appendFormat: @"%@", __e]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface timLogout_args : NSObject { -} - -- (id) init; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -@end - -@implementation timLogout_args - -- (id) init -{ - self = [super init]; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[timLogout_args class]]) { - return NO; - } - timLogout_args *other = (timLogout_args *)anObject; - return YES; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"timLogout_args"]; - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"timLogout_args("]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface timRegist_args : NSObject { - Tid * __tid; - NSString * __auth; - - BOOL __tid_isset; - BOOL __auth_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=tid, setter=setTid:) Tid * tid; -@property (nonatomic, retain, getter=auth, setter=setAuth:) NSString * auth; -#endif - -- (id) init; -- (id) initWithTid: (Tid *) tid auth: (NSString *) auth; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (Tid *) tid; -- (void) setTid: (Tid *) tid; -#endif -- (BOOL) tidIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) auth; -- (void) setAuth: (NSString *) auth; -#endif -- (BOOL) authIsSet; - -@end - -@implementation timRegist_args - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithTid: (Tid *) tid auth: (NSString *) auth -{ - self = [super init]; - __tid = [tid retain_stub]; - __tid_isset = YES; - __auth = [auth retain_stub]; - __auth_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"tid"]) - { - __tid = [[decoder decodeObjectForKey: @"tid"] retain_stub]; - __tid_isset = YES; - } - if ([decoder containsValueForKey: @"auth"]) - { - __auth = [[decoder decodeObjectForKey: @"auth"] retain_stub]; - __auth_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__tid_isset) - { - [encoder encodeObject: __tid forKey: @"tid"]; - } - if (__auth_isset) - { - [encoder encodeObject: __auth forKey: @"auth"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __tid_isset ? 2654435761 : 0; - if (__tid_isset) - { - hash = (hash * 31) ^ [__tid hash]; - } - hash = (hash * 31) ^ __auth_isset ? 2654435761 : 0; - if (__auth_isset) - { - hash = (hash * 31) ^ [__auth hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[timRegist_args class]]) { - return NO; - } - timRegist_args *other = (timRegist_args *)anObject; - if ((__tid_isset != other->__tid_isset) || - (__tid_isset && ((__tid || other->__tid) && ![__tid isEqual:other->__tid]))) { - return NO; - } - if ((__auth_isset != other->__auth_isset) || - (__auth_isset && ((__auth || other->__auth) && ![__auth isEqual:other->__auth]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__tid release_stub]; - [__auth release_stub]; - [super dealloc_stub]; -} - -- (Tid *) tid { - return [[__tid retain_stub] autorelease_stub]; -} - -- (void) setTid: (Tid *) tid { - [tid retain_stub]; - [__tid release_stub]; - __tid = tid; - __tid_isset = YES; -} - -- (BOOL) tidIsSet { - return __tid_isset; -} - -- (void) unsetTid { - [__tid release_stub]; - __tid = nil; - __tid_isset = NO; -} - -- (NSString *) auth { - return [[__auth retain_stub] autorelease_stub]; -} - -- (void) setAuth: (NSString *) auth { - [auth retain_stub]; - [__auth release_stub]; - __auth = auth; - __auth_isset = YES; -} - -- (BOOL) authIsSet { - return __auth_isset; -} - -- (void) unsetAuth { - [__auth release_stub]; - __auth = nil; - __auth_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - Tid *fieldValue = [[Tid alloc] init]; - [fieldValue read: inProtocol]; - [self setTid: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setAuth: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"timRegist_args"]; - if (__tid_isset) { - if (__tid != nil) { - [outProtocol writeFieldBeginWithName: @"tid" type: TType_STRUCT fieldID: 1]; - [__tid write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__auth_isset) { - if (__auth != nil) { - [outProtocol writeFieldBeginWithName: @"auth" type: TType_STRING fieldID: 2]; - [outProtocol writeString: __auth]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"timRegist_args("]; - [ms appendString: @"tid:"]; - [ms appendFormat: @"%@", __tid]; - [ms appendString: @",auth:"]; - [ms appendFormat: @"\"%@\"", __auth]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface timRoser_args : NSObject { - TimRoster * __roster; - - BOOL __roster_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=roster, setter=setRoster:) TimRoster * roster; -#endif - -- (id) init; -- (id) initWithRoster: (TimRoster *) roster; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimRoster *) roster; -- (void) setRoster: (TimRoster *) roster; -#endif -- (BOOL) rosterIsSet; - -@end - -@implementation timRoser_args - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithRoster: (TimRoster *) roster -{ - self = [super init]; - __roster = [roster retain_stub]; - __roster_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"roster"]) - { - __roster = [[decoder decodeObjectForKey: @"roster"] retain_stub]; - __roster_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__roster_isset) - { - [encoder encodeObject: __roster forKey: @"roster"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __roster_isset ? 2654435761 : 0; - if (__roster_isset) - { - hash = (hash * 31) ^ [__roster hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[timRoser_args class]]) { - return NO; - } - timRoser_args *other = (timRoser_args *)anObject; - if ((__roster_isset != other->__roster_isset) || - (__roster_isset && ((__roster || other->__roster) && ![__roster isEqual:other->__roster]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__roster release_stub]; - [super dealloc_stub]; -} - -- (TimRoster *) roster { - return [[__roster retain_stub] autorelease_stub]; -} - -- (void) setRoster: (TimRoster *) roster { - [roster retain_stub]; - [__roster release_stub]; - __roster = roster; - __roster_isset = YES; -} - -- (BOOL) rosterIsSet { - return __roster_isset; -} - -- (void) unsetRoster { - [__roster release_stub]; - __roster = nil; - __roster_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - TimRoster *fieldValue = [[TimRoster alloc] init]; - [fieldValue read: inProtocol]; - [self setRoster: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"timRoser_args"]; - if (__roster_isset) { - if (__roster != nil) { - [outProtocol writeFieldBeginWithName: @"roster" type: TType_STRUCT fieldID: 1]; - [__roster write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"timRoser_args("]; - [ms appendString: @"roster:"]; - [ms appendFormat: @"%@", __roster]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface timMessageList_args : NSObject { - TimMBeanList * __mbeanList; - - BOOL __mbeanList_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=mbeanList, setter=setMbeanList:) TimMBeanList * mbeanList; -#endif - -- (id) init; -- (id) initWithMbeanList: (TimMBeanList *) mbeanList; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimMBeanList *) mbeanList; -- (void) setMbeanList: (TimMBeanList *) mbeanList; -#endif -- (BOOL) mbeanListIsSet; - -@end - -@implementation timMessageList_args - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithMbeanList: (TimMBeanList *) mbeanList -{ - self = [super init]; - __mbeanList = [mbeanList retain_stub]; - __mbeanList_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"mbeanList"]) - { - __mbeanList = [[decoder decodeObjectForKey: @"mbeanList"] retain_stub]; - __mbeanList_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__mbeanList_isset) - { - [encoder encodeObject: __mbeanList forKey: @"mbeanList"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __mbeanList_isset ? 2654435761 : 0; - if (__mbeanList_isset) - { - hash = (hash * 31) ^ [__mbeanList hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[timMessageList_args class]]) { - return NO; - } - timMessageList_args *other = (timMessageList_args *)anObject; - if ((__mbeanList_isset != other->__mbeanList_isset) || - (__mbeanList_isset && ((__mbeanList || other->__mbeanList) && ![__mbeanList isEqual:other->__mbeanList]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__mbeanList release_stub]; - [super dealloc_stub]; -} - -- (TimMBeanList *) mbeanList { - return [[__mbeanList retain_stub] autorelease_stub]; -} - -- (void) setMbeanList: (TimMBeanList *) mbeanList { - [mbeanList retain_stub]; - [__mbeanList release_stub]; - __mbeanList = mbeanList; - __mbeanList_isset = YES; -} - -- (BOOL) mbeanListIsSet { - return __mbeanList_isset; -} - -- (void) unsetMbeanList { - [__mbeanList release_stub]; - __mbeanList = nil; - __mbeanList_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - TimMBeanList *fieldValue = [[TimMBeanList alloc] init]; - [fieldValue read: inProtocol]; - [self setMbeanList: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"timMessageList_args"]; - if (__mbeanList_isset) { - if (__mbeanList != nil) { - [outProtocol writeFieldBeginWithName: @"mbeanList" type: TType_STRUCT fieldID: 1]; - [__mbeanList write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"timMessageList_args("]; - [ms appendString: @"mbeanList:"]; - [ms appendFormat: @"%@", __mbeanList]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface timPresenceList_args : NSObject { - TimPBeanList * __pbeanList; - - BOOL __pbeanList_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=pbeanList, setter=setPbeanList:) TimPBeanList * pbeanList; -#endif - -- (id) init; -- (id) initWithPbeanList: (TimPBeanList *) pbeanList; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimPBeanList *) pbeanList; -- (void) setPbeanList: (TimPBeanList *) pbeanList; -#endif -- (BOOL) pbeanListIsSet; - -@end - -@implementation timPresenceList_args - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithPbeanList: (TimPBeanList *) pbeanList -{ - self = [super init]; - __pbeanList = [pbeanList retain_stub]; - __pbeanList_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"pbeanList"]) - { - __pbeanList = [[decoder decodeObjectForKey: @"pbeanList"] retain_stub]; - __pbeanList_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__pbeanList_isset) - { - [encoder encodeObject: __pbeanList forKey: @"pbeanList"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __pbeanList_isset ? 2654435761 : 0; - if (__pbeanList_isset) - { - hash = (hash * 31) ^ [__pbeanList hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[timPresenceList_args class]]) { - return NO; - } - timPresenceList_args *other = (timPresenceList_args *)anObject; - if ((__pbeanList_isset != other->__pbeanList_isset) || - (__pbeanList_isset && ((__pbeanList || other->__pbeanList) && ![__pbeanList isEqual:other->__pbeanList]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__pbeanList release_stub]; - [super dealloc_stub]; -} - -- (TimPBeanList *) pbeanList { - return [[__pbeanList retain_stub] autorelease_stub]; -} - -- (void) setPbeanList: (TimPBeanList *) pbeanList { - [pbeanList retain_stub]; - [__pbeanList release_stub]; - __pbeanList = pbeanList; - __pbeanList_isset = YES; -} - -- (BOOL) pbeanListIsSet { - return __pbeanList_isset; -} - -- (void) unsetPbeanList { - [__pbeanList release_stub]; - __pbeanList = nil; - __pbeanList_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - TimPBeanList *fieldValue = [[TimPBeanList alloc] init]; - [fieldValue read: inProtocol]; - [self setPbeanList: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"timPresenceList_args"]; - if (__pbeanList_isset) { - if (__pbeanList != nil) { - [outProtocol writeFieldBeginWithName: @"pbeanList" type: TType_STRUCT fieldID: 1]; - [__pbeanList write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"timPresenceList_args("]; - [ms appendString: @"pbeanList:"]; - [ms appendFormat: @"%@", __pbeanList]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface timMessageIq_args : NSObject { - TimMessageIq * __timMsgIq; - NSString * __iqType; - - BOOL __timMsgIq_isset; - BOOL __iqType_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=timMsgIq, setter=setTimMsgIq:) TimMessageIq * timMsgIq; -@property (nonatomic, retain, getter=iqType, setter=setIqType:) NSString * iqType; -#endif - -- (id) init; -- (id) initWithTimMsgIq: (TimMessageIq *) timMsgIq iqType: (NSString *) iqType; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimMessageIq *) timMsgIq; -- (void) setTimMsgIq: (TimMessageIq *) timMsgIq; -#endif -- (BOOL) timMsgIqIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) iqType; -- (void) setIqType: (NSString *) iqType; -#endif -- (BOOL) iqTypeIsSet; - -@end - -@implementation timMessageIq_args - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithTimMsgIq: (TimMessageIq *) timMsgIq iqType: (NSString *) iqType -{ - self = [super init]; - __timMsgIq = [timMsgIq retain_stub]; - __timMsgIq_isset = YES; - __iqType = [iqType retain_stub]; - __iqType_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"timMsgIq"]) - { - __timMsgIq = [[decoder decodeObjectForKey: @"timMsgIq"] retain_stub]; - __timMsgIq_isset = YES; - } - if ([decoder containsValueForKey: @"iqType"]) - { - __iqType = [[decoder decodeObjectForKey: @"iqType"] retain_stub]; - __iqType_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__timMsgIq_isset) - { - [encoder encodeObject: __timMsgIq forKey: @"timMsgIq"]; - } - if (__iqType_isset) - { - [encoder encodeObject: __iqType forKey: @"iqType"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __timMsgIq_isset ? 2654435761 : 0; - if (__timMsgIq_isset) - { - hash = (hash * 31) ^ [__timMsgIq hash]; - } - hash = (hash * 31) ^ __iqType_isset ? 2654435761 : 0; - if (__iqType_isset) - { - hash = (hash * 31) ^ [__iqType hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[timMessageIq_args class]]) { - return NO; - } - timMessageIq_args *other = (timMessageIq_args *)anObject; - if ((__timMsgIq_isset != other->__timMsgIq_isset) || - (__timMsgIq_isset && ((__timMsgIq || other->__timMsgIq) && ![__timMsgIq isEqual:other->__timMsgIq]))) { - return NO; - } - if ((__iqType_isset != other->__iqType_isset) || - (__iqType_isset && ((__iqType || other->__iqType) && ![__iqType isEqual:other->__iqType]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__timMsgIq release_stub]; - [__iqType release_stub]; - [super dealloc_stub]; -} - -- (TimMessageIq *) timMsgIq { - return [[__timMsgIq retain_stub] autorelease_stub]; -} - -- (void) setTimMsgIq: (TimMessageIq *) timMsgIq { - [timMsgIq retain_stub]; - [__timMsgIq release_stub]; - __timMsgIq = timMsgIq; - __timMsgIq_isset = YES; -} - -- (BOOL) timMsgIqIsSet { - return __timMsgIq_isset; -} - -- (void) unsetTimMsgIq { - [__timMsgIq release_stub]; - __timMsgIq = nil; - __timMsgIq_isset = NO; -} - -- (NSString *) iqType { - return [[__iqType retain_stub] autorelease_stub]; -} - -- (void) setIqType: (NSString *) iqType { - [iqType retain_stub]; - [__iqType release_stub]; - __iqType = iqType; - __iqType_isset = YES; -} - -- (BOOL) iqTypeIsSet { - return __iqType_isset; -} - -- (void) unsetIqType { - [__iqType release_stub]; - __iqType = nil; - __iqType_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - TimMessageIq *fieldValue = [[TimMessageIq alloc] init]; - [fieldValue read: inProtocol]; - [self setTimMsgIq: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setIqType: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"timMessageIq_args"]; - if (__timMsgIq_isset) { - if (__timMsgIq != nil) { - [outProtocol writeFieldBeginWithName: @"timMsgIq" type: TType_STRUCT fieldID: 1]; - [__timMsgIq write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__iqType_isset) { - if (__iqType != nil) { - [outProtocol writeFieldBeginWithName: @"iqType" type: TType_STRING fieldID: 2]; - [outProtocol writeString: __iqType]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"timMessageIq_args("]; - [ms appendString: @"timMsgIq:"]; - [ms appendFormat: @"%@", __timMsgIq]; - [ms appendString: @",iqType:"]; - [ms appendFormat: @"\"%@\"", __iqType]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface timMessageResult_args : NSObject { - TimMBean * __mbean; - - BOOL __mbean_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=mbean, setter=setMbean:) TimMBean * mbean; -#endif - -- (id) init; -- (id) initWithMbean: (TimMBean *) mbean; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimMBean *) mbean; -- (void) setMbean: (TimMBean *) mbean; -#endif -- (BOOL) mbeanIsSet; - -@end - -@implementation timMessageResult_args - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithMbean: (TimMBean *) mbean -{ - self = [super init]; - __mbean = [mbean retain_stub]; - __mbean_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"mbean"]) - { - __mbean = [[decoder decodeObjectForKey: @"mbean"] retain_stub]; - __mbean_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__mbean_isset) - { - [encoder encodeObject: __mbean forKey: @"mbean"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __mbean_isset ? 2654435761 : 0; - if (__mbean_isset) - { - hash = (hash * 31) ^ [__mbean hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[timMessageResult_args class]]) { - return NO; - } - timMessageResult_args *other = (timMessageResult_args *)anObject; - if ((__mbean_isset != other->__mbean_isset) || - (__mbean_isset && ((__mbean || other->__mbean) && ![__mbean isEqual:other->__mbean]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__mbean release_stub]; - [super dealloc_stub]; -} - -- (TimMBean *) mbean { - return [[__mbean retain_stub] autorelease_stub]; -} - -- (void) setMbean: (TimMBean *) mbean { - [mbean retain_stub]; - [__mbean release_stub]; - __mbean = mbean; - __mbean_isset = YES; -} - -- (BOOL) mbeanIsSet { - return __mbean_isset; -} - -- (void) unsetMbean { - [__mbean release_stub]; - __mbean = nil; - __mbean_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - TimMBean *fieldValue = [[TimMBean alloc] init]; - [fieldValue read: inProtocol]; - [self setMbean: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"timMessageResult_args"]; - if (__mbean_isset) { - if (__mbean != nil) { - [outProtocol writeFieldBeginWithName: @"mbean" type: TType_STRUCT fieldID: 1]; - [__mbean write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"timMessageResult_args("]; - [ms appendString: @"mbean:"]; - [ms appendFormat: @"%@", __mbean]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface timProperty_args : NSObject { - TimPropertyBean * __tpb; - - BOOL __tpb_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=tpb, setter=setTpb:) TimPropertyBean * tpb; -#endif - -- (id) init; -- (id) initWithTpb: (TimPropertyBean *) tpb; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimPropertyBean *) tpb; -- (void) setTpb: (TimPropertyBean *) tpb; -#endif -- (BOOL) tpbIsSet; - -@end - -@implementation timProperty_args - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithTpb: (TimPropertyBean *) tpb -{ - self = [super init]; - __tpb = [tpb retain_stub]; - __tpb_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"tpb"]) - { - __tpb = [[decoder decodeObjectForKey: @"tpb"] retain_stub]; - __tpb_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__tpb_isset) - { - [encoder encodeObject: __tpb forKey: @"tpb"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __tpb_isset ? 2654435761 : 0; - if (__tpb_isset) - { - hash = (hash * 31) ^ [__tpb hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[timProperty_args class]]) { - return NO; - } - timProperty_args *other = (timProperty_args *)anObject; - if ((__tpb_isset != other->__tpb_isset) || - (__tpb_isset && ((__tpb || other->__tpb) && ![__tpb isEqual:other->__tpb]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__tpb release_stub]; - [super dealloc_stub]; -} - -- (TimPropertyBean *) tpb { - return [[__tpb retain_stub] autorelease_stub]; -} - -- (void) setTpb: (TimPropertyBean *) tpb { - [tpb retain_stub]; - [__tpb release_stub]; - __tpb = tpb; - __tpb_isset = YES; -} - -- (BOOL) tpbIsSet { - return __tpb_isset; -} - -- (void) unsetTpb { - [__tpb release_stub]; - __tpb = nil; - __tpb_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - TimPropertyBean *fieldValue = [[TimPropertyBean alloc] init]; - [fieldValue read: inProtocol]; - [self setTpb: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"timProperty_args"]; - if (__tpb_isset) { - if (__tpb != nil) { - [outProtocol writeFieldBeginWithName: @"tpb" type: TType_STRUCT fieldID: 1]; - [__tpb write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"timProperty_args("]; - [ms appendString: @"tpb:"]; - [ms appendFormat: @"%@", __tpb]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface timRemoteUserAuth_args : NSObject { - Tid * __tid; - NSString * __pwd; - TimAuth * __auth; - - BOOL __tid_isset; - BOOL __pwd_isset; - BOOL __auth_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=tid, setter=setTid:) Tid * tid; -@property (nonatomic, retain, getter=pwd, setter=setPwd:) NSString * pwd; -@property (nonatomic, retain, getter=auth, setter=setAuth:) TimAuth * auth; -#endif - -- (id) init; -- (id) initWithTid: (Tid *) tid pwd: (NSString *) pwd auth: (TimAuth *) auth; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (Tid *) tid; -- (void) setTid: (Tid *) tid; -#endif -- (BOOL) tidIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) pwd; -- (void) setPwd: (NSString *) pwd; -#endif -- (BOOL) pwdIsSet; - -#if !__has_feature(objc_arc) -- (TimAuth *) auth; -- (void) setAuth: (TimAuth *) auth; -#endif -- (BOOL) authIsSet; - -@end - -@implementation timRemoteUserAuth_args - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithTid: (Tid *) tid pwd: (NSString *) pwd auth: (TimAuth *) auth -{ - self = [super init]; - __tid = [tid retain_stub]; - __tid_isset = YES; - __pwd = [pwd retain_stub]; - __pwd_isset = YES; - __auth = [auth retain_stub]; - __auth_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"tid"]) - { - __tid = [[decoder decodeObjectForKey: @"tid"] retain_stub]; - __tid_isset = YES; - } - if ([decoder containsValueForKey: @"pwd"]) - { - __pwd = [[decoder decodeObjectForKey: @"pwd"] retain_stub]; - __pwd_isset = YES; - } - if ([decoder containsValueForKey: @"auth"]) - { - __auth = [[decoder decodeObjectForKey: @"auth"] retain_stub]; - __auth_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__tid_isset) - { - [encoder encodeObject: __tid forKey: @"tid"]; - } - if (__pwd_isset) - { - [encoder encodeObject: __pwd forKey: @"pwd"]; - } - if (__auth_isset) - { - [encoder encodeObject: __auth forKey: @"auth"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __tid_isset ? 2654435761 : 0; - if (__tid_isset) - { - hash = (hash * 31) ^ [__tid hash]; - } - hash = (hash * 31) ^ __pwd_isset ? 2654435761 : 0; - if (__pwd_isset) - { - hash = (hash * 31) ^ [__pwd hash]; - } - hash = (hash * 31) ^ __auth_isset ? 2654435761 : 0; - if (__auth_isset) - { - hash = (hash * 31) ^ [__auth hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[timRemoteUserAuth_args class]]) { - return NO; - } - timRemoteUserAuth_args *other = (timRemoteUserAuth_args *)anObject; - if ((__tid_isset != other->__tid_isset) || - (__tid_isset && ((__tid || other->__tid) && ![__tid isEqual:other->__tid]))) { - return NO; - } - if ((__pwd_isset != other->__pwd_isset) || - (__pwd_isset && ((__pwd || other->__pwd) && ![__pwd isEqual:other->__pwd]))) { - return NO; - } - if ((__auth_isset != other->__auth_isset) || - (__auth_isset && ((__auth || other->__auth) && ![__auth isEqual:other->__auth]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__tid release_stub]; - [__pwd release_stub]; - [__auth release_stub]; - [super dealloc_stub]; -} - -- (Tid *) tid { - return [[__tid retain_stub] autorelease_stub]; -} - -- (void) setTid: (Tid *) tid { - [tid retain_stub]; - [__tid release_stub]; - __tid = tid; - __tid_isset = YES; -} - -- (BOOL) tidIsSet { - return __tid_isset; -} - -- (void) unsetTid { - [__tid release_stub]; - __tid = nil; - __tid_isset = NO; -} - -- (NSString *) pwd { - return [[__pwd retain_stub] autorelease_stub]; -} - -- (void) setPwd: (NSString *) pwd { - [pwd retain_stub]; - [__pwd release_stub]; - __pwd = pwd; - __pwd_isset = YES; -} - -- (BOOL) pwdIsSet { - return __pwd_isset; -} - -- (void) unsetPwd { - [__pwd release_stub]; - __pwd = nil; - __pwd_isset = NO; -} - -- (TimAuth *) auth { - return [[__auth retain_stub] autorelease_stub]; -} - -- (void) setAuth: (TimAuth *) auth { - [auth retain_stub]; - [__auth release_stub]; - __auth = auth; - __auth_isset = YES; -} - -- (BOOL) authIsSet { - return __auth_isset; -} - -- (void) unsetAuth { - [__auth release_stub]; - __auth = nil; - __auth_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - Tid *fieldValue = [[Tid alloc] init]; - [fieldValue read: inProtocol]; - [self setTid: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setPwd: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_STRUCT) { - TimAuth *fieldValue = [[TimAuth alloc] init]; - [fieldValue read: inProtocol]; - [self setAuth: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"timRemoteUserAuth_args"]; - if (__tid_isset) { - if (__tid != nil) { - [outProtocol writeFieldBeginWithName: @"tid" type: TType_STRUCT fieldID: 1]; - [__tid write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__pwd_isset) { - if (__pwd != nil) { - [outProtocol writeFieldBeginWithName: @"pwd" type: TType_STRING fieldID: 2]; - [outProtocol writeString: __pwd]; - [outProtocol writeFieldEnd]; - } - } - if (__auth_isset) { - if (__auth != nil) { - [outProtocol writeFieldBeginWithName: @"auth" type: TType_STRUCT fieldID: 3]; - [__auth write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"timRemoteUserAuth_args("]; - [ms appendString: @"tid:"]; - [ms appendFormat: @"%@", __tid]; - [ms appendString: @",pwd:"]; - [ms appendFormat: @"\"%@\"", __pwd]; - [ms appendString: @",auth:"]; - [ms appendFormat: @"%@", __auth]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface TimRemoteUserAuth_result : NSObject { - TimRemoteUserBean * __success; - - BOOL __success_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=success, setter=setSuccess:) TimRemoteUserBean * success; -#endif - -- (id) init; -- (id) initWithSuccess: (TimRemoteUserBean *) success; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimRemoteUserBean *) success; -- (void) setSuccess: (TimRemoteUserBean *) success; -#endif -- (BOOL) successIsSet; - -@end - -@implementation TimRemoteUserAuth_result - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithSuccess: (TimRemoteUserBean *) success -{ - self = [super init]; - __success = [success retain_stub]; - __success_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"success"]) - { - __success = [[decoder decodeObjectForKey: @"success"] retain_stub]; - __success_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__success_isset) - { - [encoder encodeObject: __success forKey: @"success"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __success_isset ? 2654435761 : 0; - if (__success_isset) - { - hash = (hash * 31) ^ [__success hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimRemoteUserAuth_result class]]) { - return NO; - } - TimRemoteUserAuth_result *other = (TimRemoteUserAuth_result *)anObject; - if ((__success_isset != other->__success_isset) || - (__success_isset && ((__success || other->__success) && ![__success isEqual:other->__success]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__success release_stub]; - [super dealloc_stub]; -} - -- (TimRemoteUserBean *) success { - return [[__success retain_stub] autorelease_stub]; -} - -- (void) setSuccess: (TimRemoteUserBean *) success { - [success retain_stub]; - [__success release_stub]; - __success = success; - __success_isset = YES; -} - -- (BOOL) successIsSet { - return __success_isset; -} - -- (void) unsetSuccess { - [__success release_stub]; - __success = nil; - __success_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 0: - if (fieldType == TType_STRUCT) { - TimRemoteUserBean *fieldValue = [[TimRemoteUserBean alloc] init]; - [fieldValue read: inProtocol]; - [self setSuccess: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimRemoteUserAuth_result"]; - - if (__success_isset) { - if (__success != nil) { - [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0]; - [__success write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimRemoteUserAuth_result("]; - [ms appendString: @"success:"]; - [ms appendFormat: @"%@", __success]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface timRemoteUserGet_args : NSObject { - Tid * __tid; - TimAuth * __auth; - - BOOL __tid_isset; - BOOL __auth_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=tid, setter=setTid:) Tid * tid; -@property (nonatomic, retain, getter=auth, setter=setAuth:) TimAuth * auth; -#endif - -- (id) init; -- (id) initWithTid: (Tid *) tid auth: (TimAuth *) auth; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (Tid *) tid; -- (void) setTid: (Tid *) tid; -#endif -- (BOOL) tidIsSet; - -#if !__has_feature(objc_arc) -- (TimAuth *) auth; -- (void) setAuth: (TimAuth *) auth; -#endif -- (BOOL) authIsSet; - -@end - -@implementation timRemoteUserGet_args - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithTid: (Tid *) tid auth: (TimAuth *) auth -{ - self = [super init]; - __tid = [tid retain_stub]; - __tid_isset = YES; - __auth = [auth retain_stub]; - __auth_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"tid"]) - { - __tid = [[decoder decodeObjectForKey: @"tid"] retain_stub]; - __tid_isset = YES; - } - if ([decoder containsValueForKey: @"auth"]) - { - __auth = [[decoder decodeObjectForKey: @"auth"] retain_stub]; - __auth_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__tid_isset) - { - [encoder encodeObject: __tid forKey: @"tid"]; - } - if (__auth_isset) - { - [encoder encodeObject: __auth forKey: @"auth"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __tid_isset ? 2654435761 : 0; - if (__tid_isset) - { - hash = (hash * 31) ^ [__tid hash]; - } - hash = (hash * 31) ^ __auth_isset ? 2654435761 : 0; - if (__auth_isset) - { - hash = (hash * 31) ^ [__auth hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[timRemoteUserGet_args class]]) { - return NO; - } - timRemoteUserGet_args *other = (timRemoteUserGet_args *)anObject; - if ((__tid_isset != other->__tid_isset) || - (__tid_isset && ((__tid || other->__tid) && ![__tid isEqual:other->__tid]))) { - return NO; - } - if ((__auth_isset != other->__auth_isset) || - (__auth_isset && ((__auth || other->__auth) && ![__auth isEqual:other->__auth]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__tid release_stub]; - [__auth release_stub]; - [super dealloc_stub]; -} - -- (Tid *) tid { - return [[__tid retain_stub] autorelease_stub]; -} - -- (void) setTid: (Tid *) tid { - [tid retain_stub]; - [__tid release_stub]; - __tid = tid; - __tid_isset = YES; -} - -- (BOOL) tidIsSet { - return __tid_isset; -} - -- (void) unsetTid { - [__tid release_stub]; - __tid = nil; - __tid_isset = NO; -} - -- (TimAuth *) auth { - return [[__auth retain_stub] autorelease_stub]; -} - -- (void) setAuth: (TimAuth *) auth { - [auth retain_stub]; - [__auth release_stub]; - __auth = auth; - __auth_isset = YES; -} - -- (BOOL) authIsSet { - return __auth_isset; -} - -- (void) unsetAuth { - [__auth release_stub]; - __auth = nil; - __auth_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - Tid *fieldValue = [[Tid alloc] init]; - [fieldValue read: inProtocol]; - [self setTid: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRUCT) { - TimAuth *fieldValue = [[TimAuth alloc] init]; - [fieldValue read: inProtocol]; - [self setAuth: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"timRemoteUserGet_args"]; - if (__tid_isset) { - if (__tid != nil) { - [outProtocol writeFieldBeginWithName: @"tid" type: TType_STRUCT fieldID: 1]; - [__tid write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__auth_isset) { - if (__auth != nil) { - [outProtocol writeFieldBeginWithName: @"auth" type: TType_STRUCT fieldID: 2]; - [__auth write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"timRemoteUserGet_args("]; - [ms appendString: @"tid:"]; - [ms appendFormat: @"%@", __tid]; - [ms appendString: @",auth:"]; - [ms appendFormat: @"%@", __auth]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface TimRemoteUserGet_result : NSObject { - TimRemoteUserBean * __success; - - BOOL __success_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=success, setter=setSuccess:) TimRemoteUserBean * success; -#endif - -- (id) init; -- (id) initWithSuccess: (TimRemoteUserBean *) success; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimRemoteUserBean *) success; -- (void) setSuccess: (TimRemoteUserBean *) success; -#endif -- (BOOL) successIsSet; - -@end - -@implementation TimRemoteUserGet_result - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithSuccess: (TimRemoteUserBean *) success -{ - self = [super init]; - __success = [success retain_stub]; - __success_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"success"]) - { - __success = [[decoder decodeObjectForKey: @"success"] retain_stub]; - __success_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__success_isset) - { - [encoder encodeObject: __success forKey: @"success"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __success_isset ? 2654435761 : 0; - if (__success_isset) - { - hash = (hash * 31) ^ [__success hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimRemoteUserGet_result class]]) { - return NO; - } - TimRemoteUserGet_result *other = (TimRemoteUserGet_result *)anObject; - if ((__success_isset != other->__success_isset) || - (__success_isset && ((__success || other->__success) && ![__success isEqual:other->__success]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__success release_stub]; - [super dealloc_stub]; -} - -- (TimRemoteUserBean *) success { - return [[__success retain_stub] autorelease_stub]; -} - -- (void) setSuccess: (TimRemoteUserBean *) success { - [success retain_stub]; - [__success release_stub]; - __success = success; - __success_isset = YES; -} - -- (BOOL) successIsSet { - return __success_isset; -} - -- (void) unsetSuccess { - [__success release_stub]; - __success = nil; - __success_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 0: - if (fieldType == TType_STRUCT) { - TimRemoteUserBean *fieldValue = [[TimRemoteUserBean alloc] init]; - [fieldValue read: inProtocol]; - [self setSuccess: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimRemoteUserGet_result"]; - - if (__success_isset) { - if (__success != nil) { - [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0]; - [__success write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimRemoteUserGet_result("]; - [ms appendString: @"success:"]; - [ms appendFormat: @"%@", __success]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface timRemoteUserEdit_args : NSObject { - Tid * __tid; - TimUserBean * __ub; - TimAuth * __auth; - - BOOL __tid_isset; - BOOL __ub_isset; - BOOL __auth_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=tid, setter=setTid:) Tid * tid; -@property (nonatomic, retain, getter=ub, setter=setUb:) TimUserBean * ub; -@property (nonatomic, retain, getter=auth, setter=setAuth:) TimAuth * auth; -#endif - -- (id) init; -- (id) initWithTid: (Tid *) tid ub: (TimUserBean *) ub auth: (TimAuth *) auth; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (Tid *) tid; -- (void) setTid: (Tid *) tid; -#endif -- (BOOL) tidIsSet; - -#if !__has_feature(objc_arc) -- (TimUserBean *) ub; -- (void) setUb: (TimUserBean *) ub; -#endif -- (BOOL) ubIsSet; - -#if !__has_feature(objc_arc) -- (TimAuth *) auth; -- (void) setAuth: (TimAuth *) auth; -#endif -- (BOOL) authIsSet; - -@end - -@implementation timRemoteUserEdit_args - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithTid: (Tid *) tid ub: (TimUserBean *) ub auth: (TimAuth *) auth -{ - self = [super init]; - __tid = [tid retain_stub]; - __tid_isset = YES; - __ub = [ub retain_stub]; - __ub_isset = YES; - __auth = [auth retain_stub]; - __auth_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"tid"]) - { - __tid = [[decoder decodeObjectForKey: @"tid"] retain_stub]; - __tid_isset = YES; - } - if ([decoder containsValueForKey: @"ub"]) - { - __ub = [[decoder decodeObjectForKey: @"ub"] retain_stub]; - __ub_isset = YES; - } - if ([decoder containsValueForKey: @"auth"]) - { - __auth = [[decoder decodeObjectForKey: @"auth"] retain_stub]; - __auth_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__tid_isset) - { - [encoder encodeObject: __tid forKey: @"tid"]; - } - if (__ub_isset) - { - [encoder encodeObject: __ub forKey: @"ub"]; - } - if (__auth_isset) - { - [encoder encodeObject: __auth forKey: @"auth"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __tid_isset ? 2654435761 : 0; - if (__tid_isset) - { - hash = (hash * 31) ^ [__tid hash]; - } - hash = (hash * 31) ^ __ub_isset ? 2654435761 : 0; - if (__ub_isset) - { - hash = (hash * 31) ^ [__ub hash]; - } - hash = (hash * 31) ^ __auth_isset ? 2654435761 : 0; - if (__auth_isset) - { - hash = (hash * 31) ^ [__auth hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[timRemoteUserEdit_args class]]) { - return NO; - } - timRemoteUserEdit_args *other = (timRemoteUserEdit_args *)anObject; - if ((__tid_isset != other->__tid_isset) || - (__tid_isset && ((__tid || other->__tid) && ![__tid isEqual:other->__tid]))) { - return NO; - } - if ((__ub_isset != other->__ub_isset) || - (__ub_isset && ((__ub || other->__ub) && ![__ub isEqual:other->__ub]))) { - return NO; - } - if ((__auth_isset != other->__auth_isset) || - (__auth_isset && ((__auth || other->__auth) && ![__auth isEqual:other->__auth]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__tid release_stub]; - [__ub release_stub]; - [__auth release_stub]; - [super dealloc_stub]; -} - -- (Tid *) tid { - return [[__tid retain_stub] autorelease_stub]; -} - -- (void) setTid: (Tid *) tid { - [tid retain_stub]; - [__tid release_stub]; - __tid = tid; - __tid_isset = YES; -} - -- (BOOL) tidIsSet { - return __tid_isset; -} - -- (void) unsetTid { - [__tid release_stub]; - __tid = nil; - __tid_isset = NO; -} - -- (TimUserBean *) ub { - return [[__ub retain_stub] autorelease_stub]; -} - -- (void) setUb: (TimUserBean *) ub { - [ub retain_stub]; - [__ub release_stub]; - __ub = ub; - __ub_isset = YES; -} - -- (BOOL) ubIsSet { - return __ub_isset; -} - -- (void) unsetUb { - [__ub release_stub]; - __ub = nil; - __ub_isset = NO; -} - -- (TimAuth *) auth { - return [[__auth retain_stub] autorelease_stub]; -} - -- (void) setAuth: (TimAuth *) auth { - [auth retain_stub]; - [__auth release_stub]; - __auth = auth; - __auth_isset = YES; -} - -- (BOOL) authIsSet { - return __auth_isset; -} - -- (void) unsetAuth { - [__auth release_stub]; - __auth = nil; - __auth_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - Tid *fieldValue = [[Tid alloc] init]; - [fieldValue read: inProtocol]; - [self setTid: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRUCT) { - TimUserBean *fieldValue = [[TimUserBean alloc] init]; - [fieldValue read: inProtocol]; - [self setUb: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_STRUCT) { - TimAuth *fieldValue = [[TimAuth alloc] init]; - [fieldValue read: inProtocol]; - [self setAuth: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"timRemoteUserEdit_args"]; - if (__tid_isset) { - if (__tid != nil) { - [outProtocol writeFieldBeginWithName: @"tid" type: TType_STRUCT fieldID: 1]; - [__tid write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__ub_isset) { - if (__ub != nil) { - [outProtocol writeFieldBeginWithName: @"ub" type: TType_STRUCT fieldID: 2]; - [__ub write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__auth_isset) { - if (__auth != nil) { - [outProtocol writeFieldBeginWithName: @"auth" type: TType_STRUCT fieldID: 3]; - [__auth write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"timRemoteUserEdit_args("]; - [ms appendString: @"tid:"]; - [ms appendFormat: @"%@", __tid]; - [ms appendString: @",ub:"]; - [ms appendFormat: @"%@", __ub]; - [ms appendString: @",auth:"]; - [ms appendFormat: @"%@", __auth]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface TimRemoteUserEdit_result : NSObject { - TimRemoteUserBean * __success; - - BOOL __success_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=success, setter=setSuccess:) TimRemoteUserBean * success; -#endif - -- (id) init; -- (id) initWithSuccess: (TimRemoteUserBean *) success; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimRemoteUserBean *) success; -- (void) setSuccess: (TimRemoteUserBean *) success; -#endif -- (BOOL) successIsSet; - -@end - -@implementation TimRemoteUserEdit_result - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithSuccess: (TimRemoteUserBean *) success -{ - self = [super init]; - __success = [success retain_stub]; - __success_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"success"]) - { - __success = [[decoder decodeObjectForKey: @"success"] retain_stub]; - __success_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__success_isset) - { - [encoder encodeObject: __success forKey: @"success"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __success_isset ? 2654435761 : 0; - if (__success_isset) - { - hash = (hash * 31) ^ [__success hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimRemoteUserEdit_result class]]) { - return NO; - } - TimRemoteUserEdit_result *other = (TimRemoteUserEdit_result *)anObject; - if ((__success_isset != other->__success_isset) || - (__success_isset && ((__success || other->__success) && ![__success isEqual:other->__success]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__success release_stub]; - [super dealloc_stub]; -} - -- (TimRemoteUserBean *) success { - return [[__success retain_stub] autorelease_stub]; -} - -- (void) setSuccess: (TimRemoteUserBean *) success { - [success retain_stub]; - [__success release_stub]; - __success = success; - __success_isset = YES; -} - -- (BOOL) successIsSet { - return __success_isset; -} - -- (void) unsetSuccess { - [__success release_stub]; - __success = nil; - __success_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 0: - if (fieldType == TType_STRUCT) { - TimRemoteUserBean *fieldValue = [[TimRemoteUserBean alloc] init]; - [fieldValue read: inProtocol]; - [self setSuccess: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimRemoteUserEdit_result"]; - - if (__success_isset) { - if (__success != nil) { - [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0]; - [__success write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimRemoteUserEdit_result("]; - [ms appendString: @"success:"]; - [ms appendFormat: @"%@", __success]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface timResponsePresence_args : NSObject { - TimPBean * __pbean; - TimAuth * __auth; - - BOOL __pbean_isset; - BOOL __auth_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=pbean, setter=setPbean:) TimPBean * pbean; -@property (nonatomic, retain, getter=auth, setter=setAuth:) TimAuth * auth; -#endif - -- (id) init; -- (id) initWithPbean: (TimPBean *) pbean auth: (TimAuth *) auth; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimPBean *) pbean; -- (void) setPbean: (TimPBean *) pbean; -#endif -- (BOOL) pbeanIsSet; - -#if !__has_feature(objc_arc) -- (TimAuth *) auth; -- (void) setAuth: (TimAuth *) auth; -#endif -- (BOOL) authIsSet; - -@end - -@implementation timResponsePresence_args - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithPbean: (TimPBean *) pbean auth: (TimAuth *) auth -{ - self = [super init]; - __pbean = [pbean retain_stub]; - __pbean_isset = YES; - __auth = [auth retain_stub]; - __auth_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"pbean"]) - { - __pbean = [[decoder decodeObjectForKey: @"pbean"] retain_stub]; - __pbean_isset = YES; - } - if ([decoder containsValueForKey: @"auth"]) - { - __auth = [[decoder decodeObjectForKey: @"auth"] retain_stub]; - __auth_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__pbean_isset) - { - [encoder encodeObject: __pbean forKey: @"pbean"]; - } - if (__auth_isset) - { - [encoder encodeObject: __auth forKey: @"auth"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __pbean_isset ? 2654435761 : 0; - if (__pbean_isset) - { - hash = (hash * 31) ^ [__pbean hash]; - } - hash = (hash * 31) ^ __auth_isset ? 2654435761 : 0; - if (__auth_isset) - { - hash = (hash * 31) ^ [__auth hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[timResponsePresence_args class]]) { - return NO; - } - timResponsePresence_args *other = (timResponsePresence_args *)anObject; - if ((__pbean_isset != other->__pbean_isset) || - (__pbean_isset && ((__pbean || other->__pbean) && ![__pbean isEqual:other->__pbean]))) { - return NO; - } - if ((__auth_isset != other->__auth_isset) || - (__auth_isset && ((__auth || other->__auth) && ![__auth isEqual:other->__auth]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__pbean release_stub]; - [__auth release_stub]; - [super dealloc_stub]; -} - -- (TimPBean *) pbean { - return [[__pbean retain_stub] autorelease_stub]; -} - -- (void) setPbean: (TimPBean *) pbean { - [pbean retain_stub]; - [__pbean release_stub]; - __pbean = pbean; - __pbean_isset = YES; -} - -- (BOOL) pbeanIsSet { - return __pbean_isset; -} - -- (void) unsetPbean { - [__pbean release_stub]; - __pbean = nil; - __pbean_isset = NO; -} - -- (TimAuth *) auth { - return [[__auth retain_stub] autorelease_stub]; -} - -- (void) setAuth: (TimAuth *) auth { - [auth retain_stub]; - [__auth release_stub]; - __auth = auth; - __auth_isset = YES; -} - -- (BOOL) authIsSet { - return __auth_isset; -} - -- (void) unsetAuth { - [__auth release_stub]; - __auth = nil; - __auth_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - TimPBean *fieldValue = [[TimPBean alloc] init]; - [fieldValue read: inProtocol]; - [self setPbean: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRUCT) { - TimAuth *fieldValue = [[TimAuth alloc] init]; - [fieldValue read: inProtocol]; - [self setAuth: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"timResponsePresence_args"]; - if (__pbean_isset) { - if (__pbean != nil) { - [outProtocol writeFieldBeginWithName: @"pbean" type: TType_STRUCT fieldID: 1]; - [__pbean write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__auth_isset) { - if (__auth != nil) { - [outProtocol writeFieldBeginWithName: @"auth" type: TType_STRUCT fieldID: 2]; - [__auth write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"timResponsePresence_args("]; - [ms appendString: @"pbean:"]; - [ms appendFormat: @"%@", __pbean]; - [ms appendString: @",auth:"]; - [ms appendFormat: @"%@", __auth]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface TimResponsePresence_result : NSObject { - TimResponseBean * __success; - - BOOL __success_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=success, setter=setSuccess:) TimResponseBean * success; -#endif - -- (id) init; -- (id) initWithSuccess: (TimResponseBean *) success; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimResponseBean *) success; -- (void) setSuccess: (TimResponseBean *) success; -#endif -- (BOOL) successIsSet; - -@end - -@implementation TimResponsePresence_result - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithSuccess: (TimResponseBean *) success -{ - self = [super init]; - __success = [success retain_stub]; - __success_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"success"]) - { - __success = [[decoder decodeObjectForKey: @"success"] retain_stub]; - __success_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__success_isset) - { - [encoder encodeObject: __success forKey: @"success"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __success_isset ? 2654435761 : 0; - if (__success_isset) - { - hash = (hash * 31) ^ [__success hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimResponsePresence_result class]]) { - return NO; - } - TimResponsePresence_result *other = (TimResponsePresence_result *)anObject; - if ((__success_isset != other->__success_isset) || - (__success_isset && ((__success || other->__success) && ![__success isEqual:other->__success]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__success release_stub]; - [super dealloc_stub]; -} - -- (TimResponseBean *) success { - return [[__success retain_stub] autorelease_stub]; -} - -- (void) setSuccess: (TimResponseBean *) success { - [success retain_stub]; - [__success release_stub]; - __success = success; - __success_isset = YES; -} - -- (BOOL) successIsSet { - return __success_isset; -} - -- (void) unsetSuccess { - [__success release_stub]; - __success = nil; - __success_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 0: - if (fieldType == TType_STRUCT) { - TimResponseBean *fieldValue = [[TimResponseBean alloc] init]; - [fieldValue read: inProtocol]; - [self setSuccess: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimResponsePresence_result"]; - - if (__success_isset) { - if (__success != nil) { - [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0]; - [__success write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimResponsePresence_result("]; - [ms appendString: @"success:"]; - [ms appendFormat: @"%@", __success]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface timResponseMessage_args : NSObject { - TimMBean * __mbean; - TimAuth * __auth; - - BOOL __mbean_isset; - BOOL __auth_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=mbean, setter=setMbean:) TimMBean * mbean; -@property (nonatomic, retain, getter=auth, setter=setAuth:) TimAuth * auth; -#endif - -- (id) init; -- (id) initWithMbean: (TimMBean *) mbean auth: (TimAuth *) auth; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimMBean *) mbean; -- (void) setMbean: (TimMBean *) mbean; -#endif -- (BOOL) mbeanIsSet; - -#if !__has_feature(objc_arc) -- (TimAuth *) auth; -- (void) setAuth: (TimAuth *) auth; -#endif -- (BOOL) authIsSet; - -@end - -@implementation timResponseMessage_args - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithMbean: (TimMBean *) mbean auth: (TimAuth *) auth -{ - self = [super init]; - __mbean = [mbean retain_stub]; - __mbean_isset = YES; - __auth = [auth retain_stub]; - __auth_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"mbean"]) - { - __mbean = [[decoder decodeObjectForKey: @"mbean"] retain_stub]; - __mbean_isset = YES; - } - if ([decoder containsValueForKey: @"auth"]) - { - __auth = [[decoder decodeObjectForKey: @"auth"] retain_stub]; - __auth_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__mbean_isset) - { - [encoder encodeObject: __mbean forKey: @"mbean"]; - } - if (__auth_isset) - { - [encoder encodeObject: __auth forKey: @"auth"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __mbean_isset ? 2654435761 : 0; - if (__mbean_isset) - { - hash = (hash * 31) ^ [__mbean hash]; - } - hash = (hash * 31) ^ __auth_isset ? 2654435761 : 0; - if (__auth_isset) - { - hash = (hash * 31) ^ [__auth hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[timResponseMessage_args class]]) { - return NO; - } - timResponseMessage_args *other = (timResponseMessage_args *)anObject; - if ((__mbean_isset != other->__mbean_isset) || - (__mbean_isset && ((__mbean || other->__mbean) && ![__mbean isEqual:other->__mbean]))) { - return NO; - } - if ((__auth_isset != other->__auth_isset) || - (__auth_isset && ((__auth || other->__auth) && ![__auth isEqual:other->__auth]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__mbean release_stub]; - [__auth release_stub]; - [super dealloc_stub]; -} - -- (TimMBean *) mbean { - return [[__mbean retain_stub] autorelease_stub]; -} - -- (void) setMbean: (TimMBean *) mbean { - [mbean retain_stub]; - [__mbean release_stub]; - __mbean = mbean; - __mbean_isset = YES; -} - -- (BOOL) mbeanIsSet { - return __mbean_isset; -} - -- (void) unsetMbean { - [__mbean release_stub]; - __mbean = nil; - __mbean_isset = NO; -} - -- (TimAuth *) auth { - return [[__auth retain_stub] autorelease_stub]; -} - -- (void) setAuth: (TimAuth *) auth { - [auth retain_stub]; - [__auth release_stub]; - __auth = auth; - __auth_isset = YES; -} - -- (BOOL) authIsSet { - return __auth_isset; -} - -- (void) unsetAuth { - [__auth release_stub]; - __auth = nil; - __auth_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - TimMBean *fieldValue = [[TimMBean alloc] init]; - [fieldValue read: inProtocol]; - [self setMbean: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRUCT) { - TimAuth *fieldValue = [[TimAuth alloc] init]; - [fieldValue read: inProtocol]; - [self setAuth: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"timResponseMessage_args"]; - if (__mbean_isset) { - if (__mbean != nil) { - [outProtocol writeFieldBeginWithName: @"mbean" type: TType_STRUCT fieldID: 1]; - [__mbean write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__auth_isset) { - if (__auth != nil) { - [outProtocol writeFieldBeginWithName: @"auth" type: TType_STRUCT fieldID: 2]; - [__auth write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"timResponseMessage_args("]; - [ms appendString: @"mbean:"]; - [ms appendFormat: @"%@", __mbean]; - [ms appendString: @",auth:"]; - [ms appendFormat: @"%@", __auth]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface TimResponseMessage_result : NSObject { - TimResponseBean * __success; - - BOOL __success_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=success, setter=setSuccess:) TimResponseBean * success; -#endif - -- (id) init; -- (id) initWithSuccess: (TimResponseBean *) success; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimResponseBean *) success; -- (void) setSuccess: (TimResponseBean *) success; -#endif -- (BOOL) successIsSet; - -@end - -@implementation TimResponseMessage_result - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithSuccess: (TimResponseBean *) success -{ - self = [super init]; - __success = [success retain_stub]; - __success_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"success"]) - { - __success = [[decoder decodeObjectForKey: @"success"] retain_stub]; - __success_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__success_isset) - { - [encoder encodeObject: __success forKey: @"success"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __success_isset ? 2654435761 : 0; - if (__success_isset) - { - hash = (hash * 31) ^ [__success hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimResponseMessage_result class]]) { - return NO; - } - TimResponseMessage_result *other = (TimResponseMessage_result *)anObject; - if ((__success_isset != other->__success_isset) || - (__success_isset && ((__success || other->__success) && ![__success isEqual:other->__success]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__success release_stub]; - [super dealloc_stub]; -} - -- (TimResponseBean *) success { - return [[__success retain_stub] autorelease_stub]; -} - -- (void) setSuccess: (TimResponseBean *) success { - [success retain_stub]; - [__success release_stub]; - __success = success; - __success_isset = YES; -} - -- (BOOL) successIsSet { - return __success_isset; -} - -- (void) unsetSuccess { - [__success release_stub]; - __success = nil; - __success_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 0: - if (fieldType == TType_STRUCT) { - TimResponseBean *fieldValue = [[TimResponseBean alloc] init]; - [fieldValue read: inProtocol]; - [self setSuccess: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimResponseMessage_result"]; - - if (__success_isset) { - if (__success != nil) { - [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0]; - [__success write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimResponseMessage_result("]; - [ms appendString: @"success:"]; - [ms appendFormat: @"%@", __success]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface timResponseMessageIq_args : NSObject { - TimMessageIq * __timMsgIq; - NSString * __iqType; - TimAuth * __auth; - - BOOL __timMsgIq_isset; - BOOL __iqType_isset; - BOOL __auth_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=timMsgIq, setter=setTimMsgIq:) TimMessageIq * timMsgIq; -@property (nonatomic, retain, getter=iqType, setter=setIqType:) NSString * iqType; -@property (nonatomic, retain, getter=auth, setter=setAuth:) TimAuth * auth; -#endif - -- (id) init; -- (id) initWithTimMsgIq: (TimMessageIq *) timMsgIq iqType: (NSString *) iqType auth: (TimAuth *) auth; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimMessageIq *) timMsgIq; -- (void) setTimMsgIq: (TimMessageIq *) timMsgIq; -#endif -- (BOOL) timMsgIqIsSet; - -#if !__has_feature(objc_arc) -- (NSString *) iqType; -- (void) setIqType: (NSString *) iqType; -#endif -- (BOOL) iqTypeIsSet; - -#if !__has_feature(objc_arc) -- (TimAuth *) auth; -- (void) setAuth: (TimAuth *) auth; -#endif -- (BOOL) authIsSet; - -@end - -@implementation timResponseMessageIq_args - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithTimMsgIq: (TimMessageIq *) timMsgIq iqType: (NSString *) iqType auth: (TimAuth *) auth -{ - self = [super init]; - __timMsgIq = [timMsgIq retain_stub]; - __timMsgIq_isset = YES; - __iqType = [iqType retain_stub]; - __iqType_isset = YES; - __auth = [auth retain_stub]; - __auth_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"timMsgIq"]) - { - __timMsgIq = [[decoder decodeObjectForKey: @"timMsgIq"] retain_stub]; - __timMsgIq_isset = YES; - } - if ([decoder containsValueForKey: @"iqType"]) - { - __iqType = [[decoder decodeObjectForKey: @"iqType"] retain_stub]; - __iqType_isset = YES; - } - if ([decoder containsValueForKey: @"auth"]) - { - __auth = [[decoder decodeObjectForKey: @"auth"] retain_stub]; - __auth_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__timMsgIq_isset) - { - [encoder encodeObject: __timMsgIq forKey: @"timMsgIq"]; - } - if (__iqType_isset) - { - [encoder encodeObject: __iqType forKey: @"iqType"]; - } - if (__auth_isset) - { - [encoder encodeObject: __auth forKey: @"auth"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __timMsgIq_isset ? 2654435761 : 0; - if (__timMsgIq_isset) - { - hash = (hash * 31) ^ [__timMsgIq hash]; - } - hash = (hash * 31) ^ __iqType_isset ? 2654435761 : 0; - if (__iqType_isset) - { - hash = (hash * 31) ^ [__iqType hash]; - } - hash = (hash * 31) ^ __auth_isset ? 2654435761 : 0; - if (__auth_isset) - { - hash = (hash * 31) ^ [__auth hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[timResponseMessageIq_args class]]) { - return NO; - } - timResponseMessageIq_args *other = (timResponseMessageIq_args *)anObject; - if ((__timMsgIq_isset != other->__timMsgIq_isset) || - (__timMsgIq_isset && ((__timMsgIq || other->__timMsgIq) && ![__timMsgIq isEqual:other->__timMsgIq]))) { - return NO; - } - if ((__iqType_isset != other->__iqType_isset) || - (__iqType_isset && ((__iqType || other->__iqType) && ![__iqType isEqual:other->__iqType]))) { - return NO; - } - if ((__auth_isset != other->__auth_isset) || - (__auth_isset && ((__auth || other->__auth) && ![__auth isEqual:other->__auth]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__timMsgIq release_stub]; - [__iqType release_stub]; - [__auth release_stub]; - [super dealloc_stub]; -} - -- (TimMessageIq *) timMsgIq { - return [[__timMsgIq retain_stub] autorelease_stub]; -} - -- (void) setTimMsgIq: (TimMessageIq *) timMsgIq { - [timMsgIq retain_stub]; - [__timMsgIq release_stub]; - __timMsgIq = timMsgIq; - __timMsgIq_isset = YES; -} - -- (BOOL) timMsgIqIsSet { - return __timMsgIq_isset; -} - -- (void) unsetTimMsgIq { - [__timMsgIq release_stub]; - __timMsgIq = nil; - __timMsgIq_isset = NO; -} - -- (NSString *) iqType { - return [[__iqType retain_stub] autorelease_stub]; -} - -- (void) setIqType: (NSString *) iqType { - [iqType retain_stub]; - [__iqType release_stub]; - __iqType = iqType; - __iqType_isset = YES; -} - -- (BOOL) iqTypeIsSet { - return __iqType_isset; -} - -- (void) unsetIqType { - [__iqType release_stub]; - __iqType = nil; - __iqType_isset = NO; -} - -- (TimAuth *) auth { - return [[__auth retain_stub] autorelease_stub]; -} - -- (void) setAuth: (TimAuth *) auth { - [auth retain_stub]; - [__auth release_stub]; - __auth = auth; - __auth_isset = YES; -} - -- (BOOL) authIsSet { - return __auth_isset; -} - -- (void) unsetAuth { - [__auth release_stub]; - __auth = nil; - __auth_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - TimMessageIq *fieldValue = [[TimMessageIq alloc] init]; - [fieldValue read: inProtocol]; - [self setTimMsgIq: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRING) { - NSString * fieldValue = [inProtocol readString]; - [self setIqType: fieldValue]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 3: - if (fieldType == TType_STRUCT) { - TimAuth *fieldValue = [[TimAuth alloc] init]; - [fieldValue read: inProtocol]; - [self setAuth: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"timResponseMessageIq_args"]; - if (__timMsgIq_isset) { - if (__timMsgIq != nil) { - [outProtocol writeFieldBeginWithName: @"timMsgIq" type: TType_STRUCT fieldID: 1]; - [__timMsgIq write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__iqType_isset) { - if (__iqType != nil) { - [outProtocol writeFieldBeginWithName: @"iqType" type: TType_STRING fieldID: 2]; - [outProtocol writeString: __iqType]; - [outProtocol writeFieldEnd]; - } - } - if (__auth_isset) { - if (__auth != nil) { - [outProtocol writeFieldBeginWithName: @"auth" type: TType_STRUCT fieldID: 3]; - [__auth write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"timResponseMessageIq_args("]; - [ms appendString: @"timMsgIq:"]; - [ms appendFormat: @"%@", __timMsgIq]; - [ms appendString: @",iqType:"]; - [ms appendFormat: @"\"%@\"", __iqType]; - [ms appendString: @",auth:"]; - [ms appendFormat: @"%@", __auth]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface TimResponseMessageIq_result : NSObject { - TimMBeanList * __success; - - BOOL __success_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=success, setter=setSuccess:) TimMBeanList * success; -#endif - -- (id) init; -- (id) initWithSuccess: (TimMBeanList *) success; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimMBeanList *) success; -- (void) setSuccess: (TimMBeanList *) success; -#endif -- (BOOL) successIsSet; - -@end - -@implementation TimResponseMessageIq_result - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithSuccess: (TimMBeanList *) success -{ - self = [super init]; - __success = [success retain_stub]; - __success_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"success"]) - { - __success = [[decoder decodeObjectForKey: @"success"] retain_stub]; - __success_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__success_isset) - { - [encoder encodeObject: __success forKey: @"success"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __success_isset ? 2654435761 : 0; - if (__success_isset) - { - hash = (hash * 31) ^ [__success hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimResponseMessageIq_result class]]) { - return NO; - } - TimResponseMessageIq_result *other = (TimResponseMessageIq_result *)anObject; - if ((__success_isset != other->__success_isset) || - (__success_isset && ((__success || other->__success) && ![__success isEqual:other->__success]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__success release_stub]; - [super dealloc_stub]; -} - -- (TimMBeanList *) success { - return [[__success retain_stub] autorelease_stub]; -} - -- (void) setSuccess: (TimMBeanList *) success { - [success retain_stub]; - [__success release_stub]; - __success = success; - __success_isset = YES; -} - -- (BOOL) successIsSet { - return __success_isset; -} - -- (void) unsetSuccess { - [__success release_stub]; - __success = nil; - __success_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 0: - if (fieldType == TType_STRUCT) { - TimMBeanList *fieldValue = [[TimMBeanList alloc] init]; - [fieldValue read: inProtocol]; - [self setSuccess: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimResponseMessageIq_result"]; - - if (__success_isset) { - if (__success != nil) { - [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0]; - [__success write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimResponseMessageIq_result("]; - [ms appendString: @"success:"]; - [ms appendFormat: @"%@", __success]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface timResponsePresenceList_args : NSObject { - TimPBeanList * __pbeanList; - TimAuth * __auth; - - BOOL __pbeanList_isset; - BOOL __auth_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=pbeanList, setter=setPbeanList:) TimPBeanList * pbeanList; -@property (nonatomic, retain, getter=auth, setter=setAuth:) TimAuth * auth; -#endif - -- (id) init; -- (id) initWithPbeanList: (TimPBeanList *) pbeanList auth: (TimAuth *) auth; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimPBeanList *) pbeanList; -- (void) setPbeanList: (TimPBeanList *) pbeanList; -#endif -- (BOOL) pbeanListIsSet; - -#if !__has_feature(objc_arc) -- (TimAuth *) auth; -- (void) setAuth: (TimAuth *) auth; -#endif -- (BOOL) authIsSet; - -@end - -@implementation timResponsePresenceList_args - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithPbeanList: (TimPBeanList *) pbeanList auth: (TimAuth *) auth -{ - self = [super init]; - __pbeanList = [pbeanList retain_stub]; - __pbeanList_isset = YES; - __auth = [auth retain_stub]; - __auth_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"pbeanList"]) - { - __pbeanList = [[decoder decodeObjectForKey: @"pbeanList"] retain_stub]; - __pbeanList_isset = YES; - } - if ([decoder containsValueForKey: @"auth"]) - { - __auth = [[decoder decodeObjectForKey: @"auth"] retain_stub]; - __auth_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__pbeanList_isset) - { - [encoder encodeObject: __pbeanList forKey: @"pbeanList"]; - } - if (__auth_isset) - { - [encoder encodeObject: __auth forKey: @"auth"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __pbeanList_isset ? 2654435761 : 0; - if (__pbeanList_isset) - { - hash = (hash * 31) ^ [__pbeanList hash]; - } - hash = (hash * 31) ^ __auth_isset ? 2654435761 : 0; - if (__auth_isset) - { - hash = (hash * 31) ^ [__auth hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[timResponsePresenceList_args class]]) { - return NO; - } - timResponsePresenceList_args *other = (timResponsePresenceList_args *)anObject; - if ((__pbeanList_isset != other->__pbeanList_isset) || - (__pbeanList_isset && ((__pbeanList || other->__pbeanList) && ![__pbeanList isEqual:other->__pbeanList]))) { - return NO; - } - if ((__auth_isset != other->__auth_isset) || - (__auth_isset && ((__auth || other->__auth) && ![__auth isEqual:other->__auth]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__pbeanList release_stub]; - [__auth release_stub]; - [super dealloc_stub]; -} - -- (TimPBeanList *) pbeanList { - return [[__pbeanList retain_stub] autorelease_stub]; -} - -- (void) setPbeanList: (TimPBeanList *) pbeanList { - [pbeanList retain_stub]; - [__pbeanList release_stub]; - __pbeanList = pbeanList; - __pbeanList_isset = YES; -} - -- (BOOL) pbeanListIsSet { - return __pbeanList_isset; -} - -- (void) unsetPbeanList { - [__pbeanList release_stub]; - __pbeanList = nil; - __pbeanList_isset = NO; -} - -- (TimAuth *) auth { - return [[__auth retain_stub] autorelease_stub]; -} - -- (void) setAuth: (TimAuth *) auth { - [auth retain_stub]; - [__auth release_stub]; - __auth = auth; - __auth_isset = YES; -} - -- (BOOL) authIsSet { - return __auth_isset; -} - -- (void) unsetAuth { - [__auth release_stub]; - __auth = nil; - __auth_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - TimPBeanList *fieldValue = [[TimPBeanList alloc] init]; - [fieldValue read: inProtocol]; - [self setPbeanList: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRUCT) { - TimAuth *fieldValue = [[TimAuth alloc] init]; - [fieldValue read: inProtocol]; - [self setAuth: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"timResponsePresenceList_args"]; - if (__pbeanList_isset) { - if (__pbeanList != nil) { - [outProtocol writeFieldBeginWithName: @"pbeanList" type: TType_STRUCT fieldID: 1]; - [__pbeanList write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__auth_isset) { - if (__auth != nil) { - [outProtocol writeFieldBeginWithName: @"auth" type: TType_STRUCT fieldID: 2]; - [__auth write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"timResponsePresenceList_args("]; - [ms appendString: @"pbeanList:"]; - [ms appendFormat: @"%@", __pbeanList]; - [ms appendString: @",auth:"]; - [ms appendFormat: @"%@", __auth]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface TimResponsePresenceList_result : NSObject { - TimResponseBean * __success; - - BOOL __success_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=success, setter=setSuccess:) TimResponseBean * success; -#endif - -- (id) init; -- (id) initWithSuccess: (TimResponseBean *) success; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimResponseBean *) success; -- (void) setSuccess: (TimResponseBean *) success; -#endif -- (BOOL) successIsSet; - -@end - -@implementation TimResponsePresenceList_result - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithSuccess: (TimResponseBean *) success -{ - self = [super init]; - __success = [success retain_stub]; - __success_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"success"]) - { - __success = [[decoder decodeObjectForKey: @"success"] retain_stub]; - __success_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__success_isset) - { - [encoder encodeObject: __success forKey: @"success"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __success_isset ? 2654435761 : 0; - if (__success_isset) - { - hash = (hash * 31) ^ [__success hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimResponsePresenceList_result class]]) { - return NO; - } - TimResponsePresenceList_result *other = (TimResponsePresenceList_result *)anObject; - if ((__success_isset != other->__success_isset) || - (__success_isset && ((__success || other->__success) && ![__success isEqual:other->__success]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__success release_stub]; - [super dealloc_stub]; -} - -- (TimResponseBean *) success { - return [[__success retain_stub] autorelease_stub]; -} - -- (void) setSuccess: (TimResponseBean *) success { - [success retain_stub]; - [__success release_stub]; - __success = success; - __success_isset = YES; -} - -- (BOOL) successIsSet { - return __success_isset; -} - -- (void) unsetSuccess { - [__success release_stub]; - __success = nil; - __success_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 0: - if (fieldType == TType_STRUCT) { - TimResponseBean *fieldValue = [[TimResponseBean alloc] init]; - [fieldValue read: inProtocol]; - [self setSuccess: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimResponsePresenceList_result"]; - - if (__success_isset) { - if (__success != nil) { - [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0]; - [__success write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimResponsePresenceList_result("]; - [ms appendString: @"success:"]; - [ms appendFormat: @"%@", __success]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface timResponseMessageList_args : NSObject { - TimMBeanList * __mbeanList; - TimAuth * __auth; - - BOOL __mbeanList_isset; - BOOL __auth_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=mbeanList, setter=setMbeanList:) TimMBeanList * mbeanList; -@property (nonatomic, retain, getter=auth, setter=setAuth:) TimAuth * auth; -#endif - -- (id) init; -- (id) initWithMbeanList: (TimMBeanList *) mbeanList auth: (TimAuth *) auth; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimMBeanList *) mbeanList; -- (void) setMbeanList: (TimMBeanList *) mbeanList; -#endif -- (BOOL) mbeanListIsSet; - -#if !__has_feature(objc_arc) -- (TimAuth *) auth; -- (void) setAuth: (TimAuth *) auth; -#endif -- (BOOL) authIsSet; - -@end - -@implementation timResponseMessageList_args - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithMbeanList: (TimMBeanList *) mbeanList auth: (TimAuth *) auth -{ - self = [super init]; - __mbeanList = [mbeanList retain_stub]; - __mbeanList_isset = YES; - __auth = [auth retain_stub]; - __auth_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"mbeanList"]) - { - __mbeanList = [[decoder decodeObjectForKey: @"mbeanList"] retain_stub]; - __mbeanList_isset = YES; - } - if ([decoder containsValueForKey: @"auth"]) - { - __auth = [[decoder decodeObjectForKey: @"auth"] retain_stub]; - __auth_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__mbeanList_isset) - { - [encoder encodeObject: __mbeanList forKey: @"mbeanList"]; - } - if (__auth_isset) - { - [encoder encodeObject: __auth forKey: @"auth"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __mbeanList_isset ? 2654435761 : 0; - if (__mbeanList_isset) - { - hash = (hash * 31) ^ [__mbeanList hash]; - } - hash = (hash * 31) ^ __auth_isset ? 2654435761 : 0; - if (__auth_isset) - { - hash = (hash * 31) ^ [__auth hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[timResponseMessageList_args class]]) { - return NO; - } - timResponseMessageList_args *other = (timResponseMessageList_args *)anObject; - if ((__mbeanList_isset != other->__mbeanList_isset) || - (__mbeanList_isset && ((__mbeanList || other->__mbeanList) && ![__mbeanList isEqual:other->__mbeanList]))) { - return NO; - } - if ((__auth_isset != other->__auth_isset) || - (__auth_isset && ((__auth || other->__auth) && ![__auth isEqual:other->__auth]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__mbeanList release_stub]; - [__auth release_stub]; - [super dealloc_stub]; -} - -- (TimMBeanList *) mbeanList { - return [[__mbeanList retain_stub] autorelease_stub]; -} - -- (void) setMbeanList: (TimMBeanList *) mbeanList { - [mbeanList retain_stub]; - [__mbeanList release_stub]; - __mbeanList = mbeanList; - __mbeanList_isset = YES; -} - -- (BOOL) mbeanListIsSet { - return __mbeanList_isset; -} - -- (void) unsetMbeanList { - [__mbeanList release_stub]; - __mbeanList = nil; - __mbeanList_isset = NO; -} - -- (TimAuth *) auth { - return [[__auth retain_stub] autorelease_stub]; -} - -- (void) setAuth: (TimAuth *) auth { - [auth retain_stub]; - [__auth release_stub]; - __auth = auth; - __auth_isset = YES; -} - -- (BOOL) authIsSet { - return __auth_isset; -} - -- (void) unsetAuth { - [__auth release_stub]; - __auth = nil; - __auth_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 1: - if (fieldType == TType_STRUCT) { - TimMBeanList *fieldValue = [[TimMBeanList alloc] init]; - [fieldValue read: inProtocol]; - [self setMbeanList: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - case 2: - if (fieldType == TType_STRUCT) { - TimAuth *fieldValue = [[TimAuth alloc] init]; - [fieldValue read: inProtocol]; - [self setAuth: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"timResponseMessageList_args"]; - if (__mbeanList_isset) { - if (__mbeanList != nil) { - [outProtocol writeFieldBeginWithName: @"mbeanList" type: TType_STRUCT fieldID: 1]; - [__mbeanList write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - if (__auth_isset) { - if (__auth != nil) { - [outProtocol writeFieldBeginWithName: @"auth" type: TType_STRUCT fieldID: 2]; - [__auth write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"timResponseMessageList_args("]; - [ms appendString: @"mbeanList:"]; - [ms appendFormat: @"%@", __mbeanList]; - [ms appendString: @",auth:"]; - [ms appendFormat: @"%@", __auth]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@interface TimResponseMessageList_result : NSObject { - TimResponseBean * __success; - - BOOL __success_isset; -} - -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -@property (nonatomic, retain, getter=success, setter=setSuccess:) TimResponseBean * success; -#endif - -- (id) init; -- (id) initWithSuccess: (TimResponseBean *) success; - -- (void) read: (id ) inProtocol; -- (void) write: (id ) outProtocol; - -- (void) validate; - -#if !__has_feature(objc_arc) -- (TimResponseBean *) success; -- (void) setSuccess: (TimResponseBean *) success; -#endif -- (BOOL) successIsSet; - -@end - -@implementation TimResponseMessageList_result - -- (id) init -{ - self = [super init]; -#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) -#endif - return self; -} - -- (id) initWithSuccess: (TimResponseBean *) success -{ - self = [super init]; - __success = [success retain_stub]; - __success_isset = YES; - return self; -} - -- (id) initWithCoder: (NSCoder *) decoder -{ - self = [super init]; - if ([decoder containsValueForKey: @"success"]) - { - __success = [[decoder decodeObjectForKey: @"success"] retain_stub]; - __success_isset = YES; - } - return self; -} - -- (void) encodeWithCoder: (NSCoder *) encoder -{ - if (__success_isset) - { - [encoder encodeObject: __success forKey: @"success"]; - } -} - -- (NSUInteger) hash -{ - NSUInteger hash = 17; - hash = (hash * 31) ^ __success_isset ? 2654435761 : 0; - if (__success_isset) - { - hash = (hash * 31) ^ [__success hash]; - } - return hash; -} - -- (BOOL) isEqual: (id) anObject -{ - if (self == anObject) { - return YES; - } - if (![anObject isKindOfClass:[TimResponseMessageList_result class]]) { - return NO; - } - TimResponseMessageList_result *other = (TimResponseMessageList_result *)anObject; - if ((__success_isset != other->__success_isset) || - (__success_isset && ((__success || other->__success) && ![__success isEqual:other->__success]))) { - return NO; - } - return YES; -} - -- (void) dealloc -{ - [__success release_stub]; - [super dealloc_stub]; -} - -- (TimResponseBean *) success { - return [[__success retain_stub] autorelease_stub]; -} - -- (void) setSuccess: (TimResponseBean *) success { - [success retain_stub]; - [__success release_stub]; - __success = success; - __success_isset = YES; -} - -- (BOOL) successIsSet { - return __success_isset; -} - -- (void) unsetSuccess { - [__success release_stub]; - __success = nil; - __success_isset = NO; -} - -- (void) read: (id ) inProtocol -{ - NSString * fieldName; - int fieldType; - int fieldID; - - [inProtocol readStructBeginReturningName: NULL]; - while (true) - { - [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; - if (fieldType == TType_STOP) { - break; - } - switch (fieldID) - { - case 0: - if (fieldType == TType_STRUCT) { - TimResponseBean *fieldValue = [[TimResponseBean alloc] init]; - [fieldValue read: inProtocol]; - [self setSuccess: fieldValue]; - [fieldValue release_stub]; - } else { - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - } - break; - default: - [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; - break; - } - [inProtocol readFieldEnd]; - } - [inProtocol readStructEnd]; -} - -- (void) write: (id ) outProtocol { - [outProtocol writeStructBeginWithName: @"TimResponseMessageList_result"]; - - if (__success_isset) { - if (__success != nil) { - [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0]; - [__success write: outProtocol]; - [outProtocol writeFieldEnd]; - } - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; -} - -- (void) validate { - // check for required fields -} - -- (NSString *) description { - NSMutableString * ms = [NSMutableString stringWithString: @"TimResponseMessageList_result("]; - [ms appendString: @"success:"]; - [ms appendFormat: @"%@", __success]; - [ms appendString: @")"]; - return [NSString stringWithString: ms]; -} - -@end - -@implementation ITimClient -- (id) initWithProtocol: (id ) protocol -{ - return [self initWithInProtocol: protocol outProtocol: protocol]; -} - -- (id) initWithInProtocol: (id ) anInProtocol outProtocol: (id ) anOutProtocol -{ - self = [super init]; - inProtocol = [anInProtocol retain_stub]; - outProtocol = [anOutProtocol retain_stub]; - return self; -} - -- (void) send_timStream: (TimParam *) param -{ - [outProtocol writeMessageBeginWithName: @"timStream" type: TMessageType_ONEWAY sequenceID: 0]; - [outProtocol writeStructBeginWithName: @"timStream_args"]; - if (param != nil) { - [outProtocol writeFieldBeginWithName: @"param" type: TType_STRUCT fieldID: 1]; - [param write: outProtocol]; - [outProtocol writeFieldEnd]; - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; - [outProtocol writeMessageEnd]; -} - -- (void) timStream: (TimParam *) param -{ - [self send_timStream : param]; - [[outProtocol transport] flush]; -} - -- (void) send_timStarttls -{ - [outProtocol writeMessageBeginWithName: @"timStarttls" type: TMessageType_ONEWAY sequenceID: 0]; - [outProtocol writeStructBeginWithName: @"timStarttls_args"]; - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; - [outProtocol writeMessageEnd]; -} - -- (void) timStarttls -{ - [self send_timStarttls]; - [[outProtocol transport] flush]; -} - -- (void) send_timLogin: (Tid *) tid pwd: (NSString *) pwd -{ - [outProtocol writeMessageBeginWithName: @"timLogin" type: TMessageType_ONEWAY sequenceID: 0]; - [outProtocol writeStructBeginWithName: @"timLogin_args"]; - if (tid != nil) { - [outProtocol writeFieldBeginWithName: @"tid" type: TType_STRUCT fieldID: 1]; - [tid write: outProtocol]; - [outProtocol writeFieldEnd]; - } - if (pwd != nil) { - [outProtocol writeFieldBeginWithName: @"pwd" type: TType_STRING fieldID: 2]; - [outProtocol writeString: pwd]; - [outProtocol writeFieldEnd]; - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; - [outProtocol writeMessageEnd]; -} - -- (void) timLogin: (Tid *) tid pwd: (NSString *) pwd -{ - [self send_timLogin : tid pwd: pwd]; - [[outProtocol transport] flush]; -} - -- (void) send_timAck: (TimAckBean *) ab -{ - [outProtocol writeMessageBeginWithName: @"timAck" type: TMessageType_ONEWAY sequenceID: 0]; - [outProtocol writeStructBeginWithName: @"timAck_args"]; - if (ab != nil) { - [outProtocol writeFieldBeginWithName: @"ab" type: TType_STRUCT fieldID: 1]; - [ab write: outProtocol]; - [outProtocol writeFieldEnd]; - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; - [outProtocol writeMessageEnd]; -} - -- (void) timAck: (TimAckBean *) ab -{ - [self send_timAck : ab]; - [[outProtocol transport] flush]; -} - -- (void) send_timPresence: (TimPBean *) pbean -{ - [outProtocol writeMessageBeginWithName: @"timPresence" type: TMessageType_ONEWAY sequenceID: 0]; - [outProtocol writeStructBeginWithName: @"timPresence_args"]; - if (pbean != nil) { - [outProtocol writeFieldBeginWithName: @"pbean" type: TType_STRUCT fieldID: 1]; - [pbean write: outProtocol]; - [outProtocol writeFieldEnd]; - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; - [outProtocol writeMessageEnd]; -} - -- (void) timPresence: (TimPBean *) pbean -{ - [self send_timPresence : pbean]; - [[outProtocol transport] flush]; -} - -- (void) send_timMessage: (TimMBean *) mbean -{ - [outProtocol writeMessageBeginWithName: @"timMessage" type: TMessageType_ONEWAY sequenceID: 0]; - [outProtocol writeStructBeginWithName: @"timMessage_args"]; - if (mbean != nil) { - [outProtocol writeFieldBeginWithName: @"mbean" type: TType_STRUCT fieldID: 1]; - [mbean write: outProtocol]; - [outProtocol writeFieldEnd]; - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; - [outProtocol writeMessageEnd]; -} - -- (void) timMessage: (TimMBean *) mbean -{ - [self send_timMessage : mbean]; - [[outProtocol transport] flush]; -} - -- (void) send_timPing: (NSString *) threadId -{ - [outProtocol writeMessageBeginWithName: @"timPing" type: TMessageType_ONEWAY sequenceID: 0]; - [outProtocol writeStructBeginWithName: @"timPing_args"]; - if (threadId != nil) { - [outProtocol writeFieldBeginWithName: @"threadId" type: TType_STRING fieldID: 1]; - [outProtocol writeString: threadId]; - [outProtocol writeFieldEnd]; - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; - [outProtocol writeMessageEnd]; -} - -- (void) timPing: (NSString *) threadId -{ - [self send_timPing : threadId]; - [[outProtocol transport] flush]; -} - -- (void) send_timError: (TimError *) e -{ - [outProtocol writeMessageBeginWithName: @"timError" type: TMessageType_ONEWAY sequenceID: 0]; - [outProtocol writeStructBeginWithName: @"timError_args"]; - if (e != nil) { - [outProtocol writeFieldBeginWithName: @"e" type: TType_STRUCT fieldID: 1]; - [e write: outProtocol]; - [outProtocol writeFieldEnd]; - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; - [outProtocol writeMessageEnd]; -} - -- (void) timError: (TimError *) e -{ - [self send_timError : e]; - [[outProtocol transport] flush]; -} - -- (void) send_timLogout -{ - [outProtocol writeMessageBeginWithName: @"timLogout" type: TMessageType_ONEWAY sequenceID: 0]; - [outProtocol writeStructBeginWithName: @"timLogout_args"]; - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; - [outProtocol writeMessageEnd]; -} - -- (void) timLogout -{ - [self send_timLogout]; - [[outProtocol transport] flush]; -} - -- (void) send_timRegist: (Tid *) tid auth: (NSString *) auth -{ - [outProtocol writeMessageBeginWithName: @"timRegist" type: TMessageType_ONEWAY sequenceID: 0]; - [outProtocol writeStructBeginWithName: @"timRegist_args"]; - if (tid != nil) { - [outProtocol writeFieldBeginWithName: @"tid" type: TType_STRUCT fieldID: 1]; - [tid write: outProtocol]; - [outProtocol writeFieldEnd]; - } - if (auth != nil) { - [outProtocol writeFieldBeginWithName: @"auth" type: TType_STRING fieldID: 2]; - [outProtocol writeString: auth]; - [outProtocol writeFieldEnd]; - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; - [outProtocol writeMessageEnd]; -} - -- (void) timRegist: (Tid *) tid auth: (NSString *) auth -{ - [self send_timRegist : tid auth: auth]; - [[outProtocol transport] flush]; -} - -- (void) send_timRoser: (TimRoster *) roster -{ - [outProtocol writeMessageBeginWithName: @"timRoser" type: TMessageType_ONEWAY sequenceID: 0]; - [outProtocol writeStructBeginWithName: @"timRoser_args"]; - if (roster != nil) { - [outProtocol writeFieldBeginWithName: @"roster" type: TType_STRUCT fieldID: 1]; - [roster write: outProtocol]; - [outProtocol writeFieldEnd]; - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; - [outProtocol writeMessageEnd]; -} - -- (void) timRoser: (TimRoster *) roster -{ - [self send_timRoser : roster]; - [[outProtocol transport] flush]; -} - -- (void) send_timMessageList: (TimMBeanList *) mbeanList -{ - [outProtocol writeMessageBeginWithName: @"timMessageList" type: TMessageType_ONEWAY sequenceID: 0]; - [outProtocol writeStructBeginWithName: @"timMessageList_args"]; - if (mbeanList != nil) { - [outProtocol writeFieldBeginWithName: @"mbeanList" type: TType_STRUCT fieldID: 1]; - [mbeanList write: outProtocol]; - [outProtocol writeFieldEnd]; - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; - [outProtocol writeMessageEnd]; -} - -- (void) timMessageList: (TimMBeanList *) mbeanList -{ - [self send_timMessageList : mbeanList]; - [[outProtocol transport] flush]; -} - -- (void) send_timPresenceList: (TimPBeanList *) pbeanList -{ - [outProtocol writeMessageBeginWithName: @"timPresenceList" type: TMessageType_ONEWAY sequenceID: 0]; - [outProtocol writeStructBeginWithName: @"timPresenceList_args"]; - if (pbeanList != nil) { - [outProtocol writeFieldBeginWithName: @"pbeanList" type: TType_STRUCT fieldID: 1]; - [pbeanList write: outProtocol]; - [outProtocol writeFieldEnd]; - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; - [outProtocol writeMessageEnd]; -} - -- (void) timPresenceList: (TimPBeanList *) pbeanList -{ - [self send_timPresenceList : pbeanList]; - [[outProtocol transport] flush]; -} - -- (void) send_timMessageIq: (TimMessageIq *) timMsgIq iqType: (NSString *) iqType -{ - [outProtocol writeMessageBeginWithName: @"timMessageIq" type: TMessageType_ONEWAY sequenceID: 0]; - [outProtocol writeStructBeginWithName: @"timMessageIq_args"]; - if (timMsgIq != nil) { - [outProtocol writeFieldBeginWithName: @"timMsgIq" type: TType_STRUCT fieldID: 1]; - [timMsgIq write: outProtocol]; - [outProtocol writeFieldEnd]; - } - if (iqType != nil) { - [outProtocol writeFieldBeginWithName: @"iqType" type: TType_STRING fieldID: 2]; - [outProtocol writeString: iqType]; - [outProtocol writeFieldEnd]; - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; - [outProtocol writeMessageEnd]; -} - -- (void) timMessageIq: (TimMessageIq *) timMsgIq iqType: (NSString *) iqType -{ - [self send_timMessageIq : timMsgIq iqType: iqType]; - [[outProtocol transport] flush]; -} - -- (void) send_timMessageResult: (TimMBean *) mbean -{ - [outProtocol writeMessageBeginWithName: @"timMessageResult" type: TMessageType_ONEWAY sequenceID: 0]; - [outProtocol writeStructBeginWithName: @"timMessageResult_args"]; - if (mbean != nil) { - [outProtocol writeFieldBeginWithName: @"mbean" type: TType_STRUCT fieldID: 1]; - [mbean write: outProtocol]; - [outProtocol writeFieldEnd]; - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; - [outProtocol writeMessageEnd]; -} - -- (void) timMessageResult: (TimMBean *) mbean -{ - [self send_timMessageResult : mbean]; - [[outProtocol transport] flush]; -} - -- (void) send_timProperty: (TimPropertyBean *) tpb -{ - [outProtocol writeMessageBeginWithName: @"timProperty" type: TMessageType_ONEWAY sequenceID: 0]; - [outProtocol writeStructBeginWithName: @"timProperty_args"]; - if (tpb != nil) { - [outProtocol writeFieldBeginWithName: @"tpb" type: TType_STRUCT fieldID: 1]; - [tpb write: outProtocol]; - [outProtocol writeFieldEnd]; - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; - [outProtocol writeMessageEnd]; -} - -- (void) timProperty: (TimPropertyBean *) tpb -{ - [self send_timProperty : tpb]; - [[outProtocol transport] flush]; -} - -- (void) send_timRemoteUserAuth: (Tid *) tid pwd: (NSString *) pwd auth: (TimAuth *) auth -{ - [outProtocol writeMessageBeginWithName: @"timRemoteUserAuth" type: TMessageType_CALL sequenceID: 0]; - [outProtocol writeStructBeginWithName: @"timRemoteUserAuth_args"]; - if (tid != nil) { - [outProtocol writeFieldBeginWithName: @"tid" type: TType_STRUCT fieldID: 1]; - [tid write: outProtocol]; - [outProtocol writeFieldEnd]; - } - if (pwd != nil) { - [outProtocol writeFieldBeginWithName: @"pwd" type: TType_STRING fieldID: 2]; - [outProtocol writeString: pwd]; - [outProtocol writeFieldEnd]; - } - if (auth != nil) { - [outProtocol writeFieldBeginWithName: @"auth" type: TType_STRUCT fieldID: 3]; - [auth write: outProtocol]; - [outProtocol writeFieldEnd]; - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; - [outProtocol writeMessageEnd]; -} - -- (TimRemoteUserBean *) recv_timRemoteUserAuth -{ - TApplicationException * x = [self checkIncomingMessageException]; - if (x != nil) { - @throw x; - } - TimRemoteUserAuth_result * result = [[[TimRemoteUserAuth_result alloc] init] autorelease_stub]; - [result read: inProtocol]; - [inProtocol readMessageEnd]; - if ([result successIsSet]) { - return [result success]; - } - @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT - reason: @"timRemoteUserAuth failed: unknown result"]; -} - -- (TimRemoteUserBean *) timRemoteUserAuth: (Tid *) tid pwd: (NSString *) pwd auth: (TimAuth *) auth -{ - [self send_timRemoteUserAuth : tid pwd: pwd auth: auth]; - [[outProtocol transport] flush]; - return [self recv_timRemoteUserAuth]; -} - -- (void) send_timRemoteUserGet: (Tid *) tid auth: (TimAuth *) auth -{ - [outProtocol writeMessageBeginWithName: @"timRemoteUserGet" type: TMessageType_CALL sequenceID: 0]; - [outProtocol writeStructBeginWithName: @"timRemoteUserGet_args"]; - if (tid != nil) { - [outProtocol writeFieldBeginWithName: @"tid" type: TType_STRUCT fieldID: 1]; - [tid write: outProtocol]; - [outProtocol writeFieldEnd]; - } - if (auth != nil) { - [outProtocol writeFieldBeginWithName: @"auth" type: TType_STRUCT fieldID: 2]; - [auth write: outProtocol]; - [outProtocol writeFieldEnd]; - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; - [outProtocol writeMessageEnd]; -} - -- (TimRemoteUserBean *) recv_timRemoteUserGet -{ - TApplicationException * x = [self checkIncomingMessageException]; - if (x != nil) { - @throw x; - } - TimRemoteUserGet_result * result = [[[TimRemoteUserGet_result alloc] init] autorelease_stub]; - [result read: inProtocol]; - [inProtocol readMessageEnd]; - if ([result successIsSet]) { - return [result success]; - } - @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT - reason: @"timRemoteUserGet failed: unknown result"]; -} - -- (TimRemoteUserBean *) timRemoteUserGet: (Tid *) tid auth: (TimAuth *) auth -{ - [self send_timRemoteUserGet : tid auth: auth]; - [[outProtocol transport] flush]; - return [self recv_timRemoteUserGet]; -} - -- (void) send_timRemoteUserEdit: (Tid *) tid ub: (TimUserBean *) ub auth: (TimAuth *) auth -{ - [outProtocol writeMessageBeginWithName: @"timRemoteUserEdit" type: TMessageType_CALL sequenceID: 0]; - [outProtocol writeStructBeginWithName: @"timRemoteUserEdit_args"]; - if (tid != nil) { - [outProtocol writeFieldBeginWithName: @"tid" type: TType_STRUCT fieldID: 1]; - [tid write: outProtocol]; - [outProtocol writeFieldEnd]; - } - if (ub != nil) { - [outProtocol writeFieldBeginWithName: @"ub" type: TType_STRUCT fieldID: 2]; - [ub write: outProtocol]; - [outProtocol writeFieldEnd]; - } - if (auth != nil) { - [outProtocol writeFieldBeginWithName: @"auth" type: TType_STRUCT fieldID: 3]; - [auth write: outProtocol]; - [outProtocol writeFieldEnd]; - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; - [outProtocol writeMessageEnd]; -} - -- (TimRemoteUserBean *) recv_timRemoteUserEdit -{ - TApplicationException * x = [self checkIncomingMessageException]; - if (x != nil) { - @throw x; - } - TimRemoteUserEdit_result * result = [[[TimRemoteUserEdit_result alloc] init] autorelease_stub]; - [result read: inProtocol]; - [inProtocol readMessageEnd]; - if ([result successIsSet]) { - return [result success]; - } - @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT - reason: @"timRemoteUserEdit failed: unknown result"]; -} - -- (TimRemoteUserBean *) timRemoteUserEdit: (Tid *) tid ub: (TimUserBean *) ub auth: (TimAuth *) auth -{ - [self send_timRemoteUserEdit : tid ub: ub auth: auth]; - [[outProtocol transport] flush]; - return [self recv_timRemoteUserEdit]; -} - -- (void) send_timResponsePresence: (TimPBean *) pbean auth: (TimAuth *) auth -{ - [outProtocol writeMessageBeginWithName: @"timResponsePresence" type: TMessageType_CALL sequenceID: 0]; - [outProtocol writeStructBeginWithName: @"timResponsePresence_args"]; - if (pbean != nil) { - [outProtocol writeFieldBeginWithName: @"pbean" type: TType_STRUCT fieldID: 1]; - [pbean write: outProtocol]; - [outProtocol writeFieldEnd]; - } - if (auth != nil) { - [outProtocol writeFieldBeginWithName: @"auth" type: TType_STRUCT fieldID: 2]; - [auth write: outProtocol]; - [outProtocol writeFieldEnd]; - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; - [outProtocol writeMessageEnd]; -} - -- (TimResponseBean *) recv_timResponsePresence -{ - TApplicationException * x = [self checkIncomingMessageException]; - if (x != nil) { - @throw x; - } - TimResponsePresence_result * result = [[[TimResponsePresence_result alloc] init] autorelease_stub]; - [result read: inProtocol]; - [inProtocol readMessageEnd]; - if ([result successIsSet]) { - return [result success]; - } - @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT - reason: @"timResponsePresence failed: unknown result"]; -} - -- (TimResponseBean *) timResponsePresence: (TimPBean *) pbean auth: (TimAuth *) auth -{ - [self send_timResponsePresence : pbean auth: auth]; - [[outProtocol transport] flush]; - return [self recv_timResponsePresence]; -} - -- (void) send_timResponseMessage: (TimMBean *) mbean auth: (TimAuth *) auth -{ - [outProtocol writeMessageBeginWithName: @"timResponseMessage" type: TMessageType_CALL sequenceID: 0]; - [outProtocol writeStructBeginWithName: @"timResponseMessage_args"]; - if (mbean != nil) { - [outProtocol writeFieldBeginWithName: @"mbean" type: TType_STRUCT fieldID: 1]; - [mbean write: outProtocol]; - [outProtocol writeFieldEnd]; - } - if (auth != nil) { - [outProtocol writeFieldBeginWithName: @"auth" type: TType_STRUCT fieldID: 2]; - [auth write: outProtocol]; - [outProtocol writeFieldEnd]; - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; - [outProtocol writeMessageEnd]; -} - -- (TimResponseBean *) recv_timResponseMessage -{ - TApplicationException * x = [self checkIncomingMessageException]; - if (x != nil) { - @throw x; - } - TimResponseMessage_result * result = [[[TimResponseMessage_result alloc] init] autorelease_stub]; - [result read: inProtocol]; - [inProtocol readMessageEnd]; - if ([result successIsSet]) { - return [result success]; - } - @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT - reason: @"timResponseMessage failed: unknown result"]; -} - -- (TimResponseBean *) timResponseMessage: (TimMBean *) mbean auth: (TimAuth *) auth -{ - [self send_timResponseMessage : mbean auth: auth]; - [[outProtocol transport] flush]; - return [self recv_timResponseMessage]; -} - -- (void) send_timResponseMessageIq: (TimMessageIq *) timMsgIq iqType: (NSString *) iqType auth: (TimAuth *) auth -{ - [outProtocol writeMessageBeginWithName: @"timResponseMessageIq" type: TMessageType_CALL sequenceID: 0]; - [outProtocol writeStructBeginWithName: @"timResponseMessageIq_args"]; - if (timMsgIq != nil) { - [outProtocol writeFieldBeginWithName: @"timMsgIq" type: TType_STRUCT fieldID: 1]; - [timMsgIq write: outProtocol]; - [outProtocol writeFieldEnd]; - } - if (iqType != nil) { - [outProtocol writeFieldBeginWithName: @"iqType" type: TType_STRING fieldID: 2]; - [outProtocol writeString: iqType]; - [outProtocol writeFieldEnd]; - } - if (auth != nil) { - [outProtocol writeFieldBeginWithName: @"auth" type: TType_STRUCT fieldID: 3]; - [auth write: outProtocol]; - [outProtocol writeFieldEnd]; - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; - [outProtocol writeMessageEnd]; -} - -- (TimMBeanList *) recv_timResponseMessageIq -{ - TApplicationException * x = [self checkIncomingMessageException]; - if (x != nil) { - @throw x; - } - TimResponseMessageIq_result * result = [[[TimResponseMessageIq_result alloc] init] autorelease_stub]; - [result read: inProtocol]; - [inProtocol readMessageEnd]; - if ([result successIsSet]) { - return [result success]; - } - @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT - reason: @"timResponseMessageIq failed: unknown result"]; -} - -- (TimMBeanList *) timResponseMessageIq: (TimMessageIq *) timMsgIq iqType: (NSString *) iqType auth: (TimAuth *) auth -{ - [self send_timResponseMessageIq : timMsgIq iqType: iqType auth: auth]; - [[outProtocol transport] flush]; - return [self recv_timResponseMessageIq]; -} - -- (void) send_timResponsePresenceList: (TimPBeanList *) pbeanList auth: (TimAuth *) auth -{ - [outProtocol writeMessageBeginWithName: @"timResponsePresenceList" type: TMessageType_CALL sequenceID: 0]; - [outProtocol writeStructBeginWithName: @"timResponsePresenceList_args"]; - if (pbeanList != nil) { - [outProtocol writeFieldBeginWithName: @"pbeanList" type: TType_STRUCT fieldID: 1]; - [pbeanList write: outProtocol]; - [outProtocol writeFieldEnd]; - } - if (auth != nil) { - [outProtocol writeFieldBeginWithName: @"auth" type: TType_STRUCT fieldID: 2]; - [auth write: outProtocol]; - [outProtocol writeFieldEnd]; - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; - [outProtocol writeMessageEnd]; -} - -- (TimResponseBean *) recv_timResponsePresenceList -{ - TApplicationException * x = [self checkIncomingMessageException]; - if (x != nil) { - @throw x; - } - TimResponsePresenceList_result * result = [[[TimResponsePresenceList_result alloc] init] autorelease_stub]; - [result read: inProtocol]; - [inProtocol readMessageEnd]; - if ([result successIsSet]) { - return [result success]; - } - @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT - reason: @"timResponsePresenceList failed: unknown result"]; -} - -- (TimResponseBean *) timResponsePresenceList: (TimPBeanList *) pbeanList auth: (TimAuth *) auth -{ - [self send_timResponsePresenceList : pbeanList auth: auth]; - [[outProtocol transport] flush]; - return [self recv_timResponsePresenceList]; -} - -- (void) send_timResponseMessageList: (TimMBeanList *) mbeanList auth: (TimAuth *) auth -{ - [outProtocol writeMessageBeginWithName: @"timResponseMessageList" type: TMessageType_CALL sequenceID: 0]; - [outProtocol writeStructBeginWithName: @"timResponseMessageList_args"]; - if (mbeanList != nil) { - [outProtocol writeFieldBeginWithName: @"mbeanList" type: TType_STRUCT fieldID: 1]; - [mbeanList write: outProtocol]; - [outProtocol writeFieldEnd]; - } - if (auth != nil) { - [outProtocol writeFieldBeginWithName: @"auth" type: TType_STRUCT fieldID: 2]; - [auth write: outProtocol]; - [outProtocol writeFieldEnd]; - } - [outProtocol writeFieldStop]; - [outProtocol writeStructEnd]; - [outProtocol writeMessageEnd]; -} - -- (TimResponseBean *) recv_timResponseMessageList -{ - TApplicationException * x = [self checkIncomingMessageException]; - if (x != nil) { - @throw x; - } - TimResponseMessageList_result * result = [[[TimResponseMessageList_result alloc] init] autorelease_stub]; - [result read: inProtocol]; - [inProtocol readMessageEnd]; - if ([result successIsSet]) { - return [result success]; - } - @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT - reason: @"timResponseMessageList failed: unknown result"]; -} - -- (TimResponseBean *) timResponseMessageList: (TimMBeanList *) mbeanList auth: (TimAuth *) auth -{ - [self send_timResponseMessageList : mbeanList auth: auth]; - [[outProtocol transport] flush]; - return [self recv_timResponseMessageList]; -} - -@end - -@implementation ITimProcessor - -- (id) initWithITim: (id ) service -{ -self = [super init]; -if (!self) { - return nil; -} -mService = [service retain_stub]; -mMethodMap = [[NSMutableDictionary dictionary] retain_stub]; -{ - SEL s = @selector(process_timStream_withSequenceID:inProtocol:outProtocol:); - NSMethodSignature * sig = [self methodSignatureForSelector: s]; - NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig]; - [invocation setSelector: s]; - [invocation retainArguments]; - [mMethodMap setValue: invocation forKey: @"timStream"]; -} -{ - SEL s = @selector(process_timStarttls_withSequenceID:inProtocol:outProtocol:); - NSMethodSignature * sig = [self methodSignatureForSelector: s]; - NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig]; - [invocation setSelector: s]; - [invocation retainArguments]; - [mMethodMap setValue: invocation forKey: @"timStarttls"]; -} -{ - SEL s = @selector(process_timLogin_withSequenceID:inProtocol:outProtocol:); - NSMethodSignature * sig = [self methodSignatureForSelector: s]; - NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig]; - [invocation setSelector: s]; - [invocation retainArguments]; - [mMethodMap setValue: invocation forKey: @"timLogin"]; -} -{ - SEL s = @selector(process_timAck_withSequenceID:inProtocol:outProtocol:); - NSMethodSignature * sig = [self methodSignatureForSelector: s]; - NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig]; - [invocation setSelector: s]; - [invocation retainArguments]; - [mMethodMap setValue: invocation forKey: @"timAck"]; -} -{ - SEL s = @selector(process_timPresence_withSequenceID:inProtocol:outProtocol:); - NSMethodSignature * sig = [self methodSignatureForSelector: s]; - NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig]; - [invocation setSelector: s]; - [invocation retainArguments]; - [mMethodMap setValue: invocation forKey: @"timPresence"]; -} -{ - SEL s = @selector(process_timMessage_withSequenceID:inProtocol:outProtocol:); - NSMethodSignature * sig = [self methodSignatureForSelector: s]; - NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig]; - [invocation setSelector: s]; - [invocation retainArguments]; - [mMethodMap setValue: invocation forKey: @"timMessage"]; -} -{ - SEL s = @selector(process_timPing_withSequenceID:inProtocol:outProtocol:); - NSMethodSignature * sig = [self methodSignatureForSelector: s]; - NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig]; - [invocation setSelector: s]; - [invocation retainArguments]; - [mMethodMap setValue: invocation forKey: @"timPing"]; -} -{ - SEL s = @selector(process_timError_withSequenceID:inProtocol:outProtocol:); - NSMethodSignature * sig = [self methodSignatureForSelector: s]; - NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig]; - [invocation setSelector: s]; - [invocation retainArguments]; - [mMethodMap setValue: invocation forKey: @"timError"]; -} -{ - SEL s = @selector(process_timLogout_withSequenceID:inProtocol:outProtocol:); - NSMethodSignature * sig = [self methodSignatureForSelector: s]; - NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig]; - [invocation setSelector: s]; - [invocation retainArguments]; - [mMethodMap setValue: invocation forKey: @"timLogout"]; -} -{ - SEL s = @selector(process_timRegist_withSequenceID:inProtocol:outProtocol:); - NSMethodSignature * sig = [self methodSignatureForSelector: s]; - NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig]; - [invocation setSelector: s]; - [invocation retainArguments]; - [mMethodMap setValue: invocation forKey: @"timRegist"]; -} -{ - SEL s = @selector(process_timRoser_withSequenceID:inProtocol:outProtocol:); - NSMethodSignature * sig = [self methodSignatureForSelector: s]; - NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig]; - [invocation setSelector: s]; - [invocation retainArguments]; - [mMethodMap setValue: invocation forKey: @"timRoser"]; -} -{ - SEL s = @selector(process_timMessageList_withSequenceID:inProtocol:outProtocol:); - NSMethodSignature * sig = [self methodSignatureForSelector: s]; - NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig]; - [invocation setSelector: s]; - [invocation retainArguments]; - [mMethodMap setValue: invocation forKey: @"timMessageList"]; -} -{ - SEL s = @selector(process_timPresenceList_withSequenceID:inProtocol:outProtocol:); - NSMethodSignature * sig = [self methodSignatureForSelector: s]; - NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig]; - [invocation setSelector: s]; - [invocation retainArguments]; - [mMethodMap setValue: invocation forKey: @"timPresenceList"]; -} -{ - SEL s = @selector(process_timMessageIq_withSequenceID:inProtocol:outProtocol:); - NSMethodSignature * sig = [self methodSignatureForSelector: s]; - NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig]; - [invocation setSelector: s]; - [invocation retainArguments]; - [mMethodMap setValue: invocation forKey: @"timMessageIq"]; -} -{ - SEL s = @selector(process_timMessageResult_withSequenceID:inProtocol:outProtocol:); - NSMethodSignature * sig = [self methodSignatureForSelector: s]; - NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig]; - [invocation setSelector: s]; - [invocation retainArguments]; - [mMethodMap setValue: invocation forKey: @"timMessageResult"]; -} -{ - SEL s = @selector(process_timProperty_withSequenceID:inProtocol:outProtocol:); - NSMethodSignature * sig = [self methodSignatureForSelector: s]; - NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig]; - [invocation setSelector: s]; - [invocation retainArguments]; - [mMethodMap setValue: invocation forKey: @"timProperty"]; -} -{ - SEL s = @selector(process_timRemoteUserAuth_withSequenceID:inProtocol:outProtocol:); - NSMethodSignature * sig = [self methodSignatureForSelector: s]; - NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig]; - [invocation setSelector: s]; - [invocation retainArguments]; - [mMethodMap setValue: invocation forKey: @"timRemoteUserAuth"]; -} -{ - SEL s = @selector(process_timRemoteUserGet_withSequenceID:inProtocol:outProtocol:); - NSMethodSignature * sig = [self methodSignatureForSelector: s]; - NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig]; - [invocation setSelector: s]; - [invocation retainArguments]; - [mMethodMap setValue: invocation forKey: @"timRemoteUserGet"]; -} -{ - SEL s = @selector(process_timRemoteUserEdit_withSequenceID:inProtocol:outProtocol:); - NSMethodSignature * sig = [self methodSignatureForSelector: s]; - NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig]; - [invocation setSelector: s]; - [invocation retainArguments]; - [mMethodMap setValue: invocation forKey: @"timRemoteUserEdit"]; -} -{ - SEL s = @selector(process_timResponsePresence_withSequenceID:inProtocol:outProtocol:); - NSMethodSignature * sig = [self methodSignatureForSelector: s]; - NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig]; - [invocation setSelector: s]; - [invocation retainArguments]; - [mMethodMap setValue: invocation forKey: @"timResponsePresence"]; -} -{ - SEL s = @selector(process_timResponseMessage_withSequenceID:inProtocol:outProtocol:); - NSMethodSignature * sig = [self methodSignatureForSelector: s]; - NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig]; - [invocation setSelector: s]; - [invocation retainArguments]; - [mMethodMap setValue: invocation forKey: @"timResponseMessage"]; -} -{ - SEL s = @selector(process_timResponseMessageIq_withSequenceID:inProtocol:outProtocol:); - NSMethodSignature * sig = [self methodSignatureForSelector: s]; - NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig]; - [invocation setSelector: s]; - [invocation retainArguments]; - [mMethodMap setValue: invocation forKey: @"timResponseMessageIq"]; -} -{ - SEL s = @selector(process_timResponsePresenceList_withSequenceID:inProtocol:outProtocol:); - NSMethodSignature * sig = [self methodSignatureForSelector: s]; - NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig]; - [invocation setSelector: s]; - [invocation retainArguments]; - [mMethodMap setValue: invocation forKey: @"timResponsePresenceList"]; -} -{ - SEL s = @selector(process_timResponseMessageList_withSequenceID:inProtocol:outProtocol:); - NSMethodSignature * sig = [self methodSignatureForSelector: s]; - NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig]; - [invocation setSelector: s]; - [invocation retainArguments]; - [mMethodMap setValue: invocation forKey: @"timResponseMessageList"]; -} -return self; -} - -- (id) service -{ - return [[mService retain_stub] autorelease_stub]; -} - -- (BOOL) processOnInputProtocol: (id ) inProtocol - outputProtocol: (id ) outProtocol -{ - NSString * messageName; - int messageType; - int seqID; - [inProtocol readMessageBeginReturningName: &messageName - type: &messageType - sequenceID: &seqID]; - NSInvocation * invocation = [mMethodMap valueForKey: messageName]; - if (invocation == nil) { - [TProtocolUtil skipType: TType_STRUCT onProtocol: inProtocol]; - [inProtocol readMessageEnd]; - TApplicationException * x = [TApplicationException exceptionWithType: TApplicationException_UNKNOWN_METHOD reason: [NSString stringWithFormat: @"Invalid method name: '%@'", messageName]]; - [outProtocol writeMessageBeginWithName: messageName - type: TMessageType_EXCEPTION - sequenceID: seqID]; - [x write: outProtocol]; - [outProtocol writeMessageEnd]; - [[outProtocol transport] flush]; - return YES; - } - // NSInvocation does not conform to NSCopying protocol - NSInvocation * i = [NSInvocation invocationWithMethodSignature: [invocation methodSignature]]; - [i setSelector: [invocation selector]]; - [i setArgument: &seqID atIndex: 2]; - [i setArgument: &inProtocol atIndex: 3]; - [i setArgument: &outProtocol atIndex: 4]; - [i setTarget: self]; - [i invoke]; - return YES; -} - -- (void) process_timStream_withSequenceID: (int32_t) seqID inProtocol: (id) inProtocol outProtocol: (id) outProtocol -{ -timStream_args * args = [[timStream_args alloc] init]; -[args read: inProtocol]; -[inProtocol readMessageEnd]; -[mService timStream: [args param]]; -[args release_stub]; -} - -- (void) process_timStarttls_withSequenceID: (int32_t) seqID inProtocol: (id) inProtocol outProtocol: (id) outProtocol -{ -timStarttls_args * args = [[timStarttls_args alloc] init]; -[args read: inProtocol]; -[inProtocol readMessageEnd]; -[mService timStarttls]; -[args release_stub]; -} - -- (void) process_timLogin_withSequenceID: (int32_t) seqID inProtocol: (id) inProtocol outProtocol: (id) outProtocol -{ -timLogin_args * args = [[timLogin_args alloc] init]; -[args read: inProtocol]; -[inProtocol readMessageEnd]; -[mService timLogin: [args tid] pwd: [args pwd]]; -[args release_stub]; -} - -- (void) process_timAck_withSequenceID: (int32_t) seqID inProtocol: (id) inProtocol outProtocol: (id) outProtocol -{ -timAck_args * args = [[timAck_args alloc] init]; -[args read: inProtocol]; -[inProtocol readMessageEnd]; -[mService timAck: [args ab]]; -[args release_stub]; -} - -- (void) process_timPresence_withSequenceID: (int32_t) seqID inProtocol: (id) inProtocol outProtocol: (id) outProtocol -{ -timPresence_args * args = [[timPresence_args alloc] init]; -[args read: inProtocol]; -[inProtocol readMessageEnd]; -[mService timPresence: [args pbean]]; -[args release_stub]; -} - -- (void) process_timMessage_withSequenceID: (int32_t) seqID inProtocol: (id) inProtocol outProtocol: (id) outProtocol -{ -timMessage_args * args = [[timMessage_args alloc] init]; -[args read: inProtocol]; -[inProtocol readMessageEnd]; -[mService timMessage: [args mbean]]; -[args release_stub]; -} - -- (void) process_timPing_withSequenceID: (int32_t) seqID inProtocol: (id) inProtocol outProtocol: (id) outProtocol -{ -timPing_args * args = [[timPing_args alloc] init]; -[args read: inProtocol]; -[inProtocol readMessageEnd]; -[mService timPing: [args threadId]]; -[args release_stub]; -} - -- (void) process_timError_withSequenceID: (int32_t) seqID inProtocol: (id) inProtocol outProtocol: (id) outProtocol -{ -timError_args * args = [[timError_args alloc] init]; -[args read: inProtocol]; -[inProtocol readMessageEnd]; -[mService timError: [args e]]; -[args release_stub]; -} - -- (void) process_timLogout_withSequenceID: (int32_t) seqID inProtocol: (id) inProtocol outProtocol: (id) outProtocol -{ -timLogout_args * args = [[timLogout_args alloc] init]; -[args read: inProtocol]; -[inProtocol readMessageEnd]; -[mService timLogout]; -[args release_stub]; -} - -- (void) process_timRegist_withSequenceID: (int32_t) seqID inProtocol: (id) inProtocol outProtocol: (id) outProtocol -{ -timRegist_args * args = [[timRegist_args alloc] init]; -[args read: inProtocol]; -[inProtocol readMessageEnd]; -[mService timRegist: [args tid] auth: [args auth]]; -[args release_stub]; -} - -- (void) process_timRoser_withSequenceID: (int32_t) seqID inProtocol: (id) inProtocol outProtocol: (id) outProtocol -{ -timRoser_args * args = [[timRoser_args alloc] init]; -[args read: inProtocol]; -[inProtocol readMessageEnd]; -[mService timRoser: [args roster]]; -[args release_stub]; -} - -- (void) process_timMessageList_withSequenceID: (int32_t) seqID inProtocol: (id) inProtocol outProtocol: (id) outProtocol -{ -timMessageList_args * args = [[timMessageList_args alloc] init]; -[args read: inProtocol]; -[inProtocol readMessageEnd]; -[mService timMessageList: [args mbeanList]]; -[args release_stub]; -} - -- (void) process_timPresenceList_withSequenceID: (int32_t) seqID inProtocol: (id) inProtocol outProtocol: (id) outProtocol -{ -timPresenceList_args * args = [[timPresenceList_args alloc] init]; -[args read: inProtocol]; -[inProtocol readMessageEnd]; -[mService timPresenceList: [args pbeanList]]; -[args release_stub]; -} - -- (void) process_timMessageIq_withSequenceID: (int32_t) seqID inProtocol: (id) inProtocol outProtocol: (id) outProtocol -{ -timMessageIq_args * args = [[timMessageIq_args alloc] init]; -[args read: inProtocol]; -[inProtocol readMessageEnd]; -[mService timMessageIq: [args timMsgIq] iqType: [args iqType]]; -[args release_stub]; -} - -- (void) process_timMessageResult_withSequenceID: (int32_t) seqID inProtocol: (id) inProtocol outProtocol: (id) outProtocol -{ -timMessageResult_args * args = [[timMessageResult_args alloc] init]; -[args read: inProtocol]; -[inProtocol readMessageEnd]; -[mService timMessageResult: [args mbean]]; -[args release_stub]; -} - -- (void) process_timProperty_withSequenceID: (int32_t) seqID inProtocol: (id) inProtocol outProtocol: (id) outProtocol -{ -timProperty_args * args = [[timProperty_args alloc] init]; -[args read: inProtocol]; -[inProtocol readMessageEnd]; -[mService timProperty: [args tpb]]; -[args release_stub]; -} - -- (void) process_timRemoteUserAuth_withSequenceID: (int32_t) seqID inProtocol: (id) inProtocol outProtocol: (id) outProtocol -{ -timRemoteUserAuth_args * args = [[timRemoteUserAuth_args alloc] init]; -[args read: inProtocol]; -[inProtocol readMessageEnd]; -TimRemoteUserAuth_result * result = [[TimRemoteUserAuth_result alloc] init]; -[result setSuccess: [mService timRemoteUserAuth: [args tid] pwd: [args pwd] auth: [args auth]]]; -[outProtocol writeMessageBeginWithName: @"timRemoteUserAuth" - type: TMessageType_REPLY - sequenceID: seqID]; -[result write: outProtocol]; -[outProtocol writeMessageEnd]; -[[outProtocol transport] flush]; -[result release_stub]; -[args release_stub]; -} - -- (void) process_timRemoteUserGet_withSequenceID: (int32_t) seqID inProtocol: (id) inProtocol outProtocol: (id) outProtocol -{ -timRemoteUserGet_args * args = [[timRemoteUserGet_args alloc] init]; -[args read: inProtocol]; -[inProtocol readMessageEnd]; -TimRemoteUserGet_result * result = [[TimRemoteUserGet_result alloc] init]; -[result setSuccess: [mService timRemoteUserGet: [args tid] auth: [args auth]]]; -[outProtocol writeMessageBeginWithName: @"timRemoteUserGet" - type: TMessageType_REPLY - sequenceID: seqID]; -[result write: outProtocol]; -[outProtocol writeMessageEnd]; -[[outProtocol transport] flush]; -[result release_stub]; -[args release_stub]; -} - -- (void) process_timRemoteUserEdit_withSequenceID: (int32_t) seqID inProtocol: (id) inProtocol outProtocol: (id) outProtocol -{ -timRemoteUserEdit_args * args = [[timRemoteUserEdit_args alloc] init]; -[args read: inProtocol]; -[inProtocol readMessageEnd]; -TimRemoteUserEdit_result * result = [[TimRemoteUserEdit_result alloc] init]; -[result setSuccess: [mService timRemoteUserEdit: [args tid] ub: [args ub] auth: [args auth]]]; -[outProtocol writeMessageBeginWithName: @"timRemoteUserEdit" - type: TMessageType_REPLY - sequenceID: seqID]; -[result write: outProtocol]; -[outProtocol writeMessageEnd]; -[[outProtocol transport] flush]; -[result release_stub]; -[args release_stub]; -} - -- (void) process_timResponsePresence_withSequenceID: (int32_t) seqID inProtocol: (id) inProtocol outProtocol: (id) outProtocol -{ -timResponsePresence_args * args = [[timResponsePresence_args alloc] init]; -[args read: inProtocol]; -[inProtocol readMessageEnd]; -TimResponsePresence_result * result = [[TimResponsePresence_result alloc] init]; -[result setSuccess: [mService timResponsePresence: [args pbean] auth: [args auth]]]; -[outProtocol writeMessageBeginWithName: @"timResponsePresence" - type: TMessageType_REPLY - sequenceID: seqID]; -[result write: outProtocol]; -[outProtocol writeMessageEnd]; -[[outProtocol transport] flush]; -[result release_stub]; -[args release_stub]; -} - -- (void) process_timResponseMessage_withSequenceID: (int32_t) seqID inProtocol: (id) inProtocol outProtocol: (id) outProtocol -{ -timResponseMessage_args * args = [[timResponseMessage_args alloc] init]; -[args read: inProtocol]; -[inProtocol readMessageEnd]; -TimResponseMessage_result * result = [[TimResponseMessage_result alloc] init]; -[result setSuccess: [mService timResponseMessage: [args mbean] auth: [args auth]]]; -[outProtocol writeMessageBeginWithName: @"timResponseMessage" - type: TMessageType_REPLY - sequenceID: seqID]; -[result write: outProtocol]; -[outProtocol writeMessageEnd]; -[[outProtocol transport] flush]; -[result release_stub]; -[args release_stub]; -} - -- (void) process_timResponseMessageIq_withSequenceID: (int32_t) seqID inProtocol: (id) inProtocol outProtocol: (id) outProtocol -{ -timResponseMessageIq_args * args = [[timResponseMessageIq_args alloc] init]; -[args read: inProtocol]; -[inProtocol readMessageEnd]; -TimResponseMessageIq_result * result = [[TimResponseMessageIq_result alloc] init]; -[result setSuccess: [mService timResponseMessageIq: [args timMsgIq] iqType: [args iqType] auth: [args auth]]]; -[outProtocol writeMessageBeginWithName: @"timResponseMessageIq" - type: TMessageType_REPLY - sequenceID: seqID]; -[result write: outProtocol]; -[outProtocol writeMessageEnd]; -[[outProtocol transport] flush]; -[result release_stub]; -[args release_stub]; -} - -- (void) process_timResponsePresenceList_withSequenceID: (int32_t) seqID inProtocol: (id) inProtocol outProtocol: (id) outProtocol -{ -timResponsePresenceList_args * args = [[timResponsePresenceList_args alloc] init]; -[args read: inProtocol]; -[inProtocol readMessageEnd]; -TimResponsePresenceList_result * result = [[TimResponsePresenceList_result alloc] init]; -[result setSuccess: [mService timResponsePresenceList: [args pbeanList] auth: [args auth]]]; -[outProtocol writeMessageBeginWithName: @"timResponsePresenceList" - type: TMessageType_REPLY - sequenceID: seqID]; -[result write: outProtocol]; -[outProtocol writeMessageEnd]; -[[outProtocol transport] flush]; -[result release_stub]; -[args release_stub]; -} - -- (void) process_timResponseMessageList_withSequenceID: (int32_t) seqID inProtocol: (id) inProtocol outProtocol: (id) outProtocol -{ -timResponseMessageList_args * args = [[timResponseMessageList_args alloc] init]; -[args read: inProtocol]; -[inProtocol readMessageEnd]; -TimResponseMessageList_result * result = [[TimResponseMessageList_result alloc] init]; -[result setSuccess: [mService timResponseMessageList: [args mbeanList] auth: [args auth]]]; -[outProtocol writeMessageBeginWithName: @"timResponseMessageList" - type: TMessageType_REPLY - sequenceID: seqID]; -[result write: outProtocol]; -[outProtocol writeMessageEnd]; -[[outProtocol transport] flush]; -[result release_stub]; -[args release_stub]; -} - -- (void) dealloc -{ -[mService release_stub]; -[mMethodMap release_stub]; -[super dealloc_stub]; -} - -@end - diff --git a/protocols/gen-cpp/ITim.cpp b/protocols/gen-cpp/ITim.cpp index a7fdc25..cb060cf 100644 --- a/protocols/gen-cpp/ITim.cpp +++ b/protocols/gen-cpp/ITim.cpp @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -9,13 +9,13 @@ -ITim_timStream_args::~ITim_timStream_args() throw() { +ITim_timStream_args::~ITim_timStream_args() noexcept { } uint32_t ITim_timStream_args::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -56,7 +56,7 @@ uint32_t ITim_timStream_args::read(::apache::thrift::protocol::TProtocol* iprot) uint32_t ITim_timStream_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timStream_args"); xfer += oprot->writeFieldBegin("param", ::apache::thrift::protocol::T_STRUCT, 1); @@ -69,13 +69,13 @@ uint32_t ITim_timStream_args::write(::apache::thrift::protocol::TProtocol* oprot } -ITim_timStream_pargs::~ITim_timStream_pargs() throw() { +ITim_timStream_pargs::~ITim_timStream_pargs() noexcept { } uint32_t ITim_timStream_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timStream_pargs"); xfer += oprot->writeFieldBegin("param", ::apache::thrift::protocol::T_STRUCT, 1); @@ -88,13 +88,13 @@ uint32_t ITim_timStream_pargs::write(::apache::thrift::protocol::TProtocol* opro } -ITim_timStarttls_args::~ITim_timStarttls_args() throw() { +ITim_timStarttls_args::~ITim_timStarttls_args() noexcept { } uint32_t ITim_timStarttls_args::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -122,7 +122,7 @@ uint32_t ITim_timStarttls_args::read(::apache::thrift::protocol::TProtocol* ipro uint32_t ITim_timStarttls_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timStarttls_args"); xfer += oprot->writeFieldStop(); @@ -131,13 +131,13 @@ uint32_t ITim_timStarttls_args::write(::apache::thrift::protocol::TProtocol* opr } -ITim_timStarttls_pargs::~ITim_timStarttls_pargs() throw() { +ITim_timStarttls_pargs::~ITim_timStarttls_pargs() noexcept { } uint32_t ITim_timStarttls_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timStarttls_pargs"); xfer += oprot->writeFieldStop(); @@ -146,13 +146,13 @@ uint32_t ITim_timStarttls_pargs::write(::apache::thrift::protocol::TProtocol* op } -ITim_timLogin_args::~ITim_timLogin_args() throw() { +ITim_timLogin_args::~ITim_timLogin_args() noexcept { } uint32_t ITim_timLogin_args::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -201,7 +201,7 @@ uint32_t ITim_timLogin_args::read(::apache::thrift::protocol::TProtocol* iprot) uint32_t ITim_timLogin_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timLogin_args"); xfer += oprot->writeFieldBegin("tid", ::apache::thrift::protocol::T_STRUCT, 1); @@ -218,13 +218,13 @@ uint32_t ITim_timLogin_args::write(::apache::thrift::protocol::TProtocol* oprot) } -ITim_timLogin_pargs::~ITim_timLogin_pargs() throw() { +ITim_timLogin_pargs::~ITim_timLogin_pargs() noexcept { } uint32_t ITim_timLogin_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timLogin_pargs"); xfer += oprot->writeFieldBegin("tid", ::apache::thrift::protocol::T_STRUCT, 1); @@ -241,13 +241,13 @@ uint32_t ITim_timLogin_pargs::write(::apache::thrift::protocol::TProtocol* oprot } -ITim_timAck_args::~ITim_timAck_args() throw() { +ITim_timAck_args::~ITim_timAck_args() noexcept { } uint32_t ITim_timAck_args::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -288,7 +288,7 @@ uint32_t ITim_timAck_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t ITim_timAck_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timAck_args"); xfer += oprot->writeFieldBegin("ab", ::apache::thrift::protocol::T_STRUCT, 1); @@ -301,13 +301,13 @@ uint32_t ITim_timAck_args::write(::apache::thrift::protocol::TProtocol* oprot) c } -ITim_timAck_pargs::~ITim_timAck_pargs() throw() { +ITim_timAck_pargs::~ITim_timAck_pargs() noexcept { } uint32_t ITim_timAck_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timAck_pargs"); xfer += oprot->writeFieldBegin("ab", ::apache::thrift::protocol::T_STRUCT, 1); @@ -320,13 +320,13 @@ uint32_t ITim_timAck_pargs::write(::apache::thrift::protocol::TProtocol* oprot) } -ITim_timPresence_args::~ITim_timPresence_args() throw() { +ITim_timPresence_args::~ITim_timPresence_args() noexcept { } uint32_t ITim_timPresence_args::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -367,7 +367,7 @@ uint32_t ITim_timPresence_args::read(::apache::thrift::protocol::TProtocol* ipro uint32_t ITim_timPresence_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timPresence_args"); xfer += oprot->writeFieldBegin("pbean", ::apache::thrift::protocol::T_STRUCT, 1); @@ -380,13 +380,13 @@ uint32_t ITim_timPresence_args::write(::apache::thrift::protocol::TProtocol* opr } -ITim_timPresence_pargs::~ITim_timPresence_pargs() throw() { +ITim_timPresence_pargs::~ITim_timPresence_pargs() noexcept { } uint32_t ITim_timPresence_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timPresence_pargs"); xfer += oprot->writeFieldBegin("pbean", ::apache::thrift::protocol::T_STRUCT, 1); @@ -399,13 +399,13 @@ uint32_t ITim_timPresence_pargs::write(::apache::thrift::protocol::TProtocol* op } -ITim_timMessage_args::~ITim_timMessage_args() throw() { +ITim_timMessage_args::~ITim_timMessage_args() noexcept { } uint32_t ITim_timMessage_args::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -446,7 +446,7 @@ uint32_t ITim_timMessage_args::read(::apache::thrift::protocol::TProtocol* iprot uint32_t ITim_timMessage_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timMessage_args"); xfer += oprot->writeFieldBegin("mbean", ::apache::thrift::protocol::T_STRUCT, 1); @@ -459,13 +459,13 @@ uint32_t ITim_timMessage_args::write(::apache::thrift::protocol::TProtocol* opro } -ITim_timMessage_pargs::~ITim_timMessage_pargs() throw() { +ITim_timMessage_pargs::~ITim_timMessage_pargs() noexcept { } uint32_t ITim_timMessage_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timMessage_pargs"); xfer += oprot->writeFieldBegin("mbean", ::apache::thrift::protocol::T_STRUCT, 1); @@ -478,13 +478,13 @@ uint32_t ITim_timMessage_pargs::write(::apache::thrift::protocol::TProtocol* opr } -ITim_timPing_args::~ITim_timPing_args() throw() { +ITim_timPing_args::~ITim_timPing_args() noexcept { } uint32_t ITim_timPing_args::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -525,7 +525,7 @@ uint32_t ITim_timPing_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t ITim_timPing_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timPing_args"); xfer += oprot->writeFieldBegin("threadId", ::apache::thrift::protocol::T_STRING, 1); @@ -538,13 +538,13 @@ uint32_t ITim_timPing_args::write(::apache::thrift::protocol::TProtocol* oprot) } -ITim_timPing_pargs::~ITim_timPing_pargs() throw() { +ITim_timPing_pargs::~ITim_timPing_pargs() noexcept { } uint32_t ITim_timPing_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timPing_pargs"); xfer += oprot->writeFieldBegin("threadId", ::apache::thrift::protocol::T_STRING, 1); @@ -557,13 +557,13 @@ uint32_t ITim_timPing_pargs::write(::apache::thrift::protocol::TProtocol* oprot) } -ITim_timError_args::~ITim_timError_args() throw() { +ITim_timError_args::~ITim_timError_args() noexcept { } uint32_t ITim_timError_args::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -604,7 +604,7 @@ uint32_t ITim_timError_args::read(::apache::thrift::protocol::TProtocol* iprot) uint32_t ITim_timError_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timError_args"); xfer += oprot->writeFieldBegin("e", ::apache::thrift::protocol::T_STRUCT, 1); @@ -617,13 +617,13 @@ uint32_t ITim_timError_args::write(::apache::thrift::protocol::TProtocol* oprot) } -ITim_timError_pargs::~ITim_timError_pargs() throw() { +ITim_timError_pargs::~ITim_timError_pargs() noexcept { } uint32_t ITim_timError_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timError_pargs"); xfer += oprot->writeFieldBegin("e", ::apache::thrift::protocol::T_STRUCT, 1); @@ -636,13 +636,13 @@ uint32_t ITim_timError_pargs::write(::apache::thrift::protocol::TProtocol* oprot } -ITim_timLogout_args::~ITim_timLogout_args() throw() { +ITim_timLogout_args::~ITim_timLogout_args() noexcept { } uint32_t ITim_timLogout_args::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -670,7 +670,7 @@ uint32_t ITim_timLogout_args::read(::apache::thrift::protocol::TProtocol* iprot) uint32_t ITim_timLogout_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timLogout_args"); xfer += oprot->writeFieldStop(); @@ -679,13 +679,13 @@ uint32_t ITim_timLogout_args::write(::apache::thrift::protocol::TProtocol* oprot } -ITim_timLogout_pargs::~ITim_timLogout_pargs() throw() { +ITim_timLogout_pargs::~ITim_timLogout_pargs() noexcept { } uint32_t ITim_timLogout_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timLogout_pargs"); xfer += oprot->writeFieldStop(); @@ -694,13 +694,13 @@ uint32_t ITim_timLogout_pargs::write(::apache::thrift::protocol::TProtocol* opro } -ITim_timRegist_args::~ITim_timRegist_args() throw() { +ITim_timRegist_args::~ITim_timRegist_args() noexcept { } uint32_t ITim_timRegist_args::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -749,7 +749,7 @@ uint32_t ITim_timRegist_args::read(::apache::thrift::protocol::TProtocol* iprot) uint32_t ITim_timRegist_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timRegist_args"); xfer += oprot->writeFieldBegin("tid", ::apache::thrift::protocol::T_STRUCT, 1); @@ -766,13 +766,13 @@ uint32_t ITim_timRegist_args::write(::apache::thrift::protocol::TProtocol* oprot } -ITim_timRegist_pargs::~ITim_timRegist_pargs() throw() { +ITim_timRegist_pargs::~ITim_timRegist_pargs() noexcept { } uint32_t ITim_timRegist_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timRegist_pargs"); xfer += oprot->writeFieldBegin("tid", ::apache::thrift::protocol::T_STRUCT, 1); @@ -789,13 +789,13 @@ uint32_t ITim_timRegist_pargs::write(::apache::thrift::protocol::TProtocol* opro } -ITim_timRoser_args::~ITim_timRoser_args() throw() { +ITim_timRoser_args::~ITim_timRoser_args() noexcept { } uint32_t ITim_timRoser_args::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -836,7 +836,7 @@ uint32_t ITim_timRoser_args::read(::apache::thrift::protocol::TProtocol* iprot) uint32_t ITim_timRoser_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timRoser_args"); xfer += oprot->writeFieldBegin("roster", ::apache::thrift::protocol::T_STRUCT, 1); @@ -849,13 +849,13 @@ uint32_t ITim_timRoser_args::write(::apache::thrift::protocol::TProtocol* oprot) } -ITim_timRoser_pargs::~ITim_timRoser_pargs() throw() { +ITim_timRoser_pargs::~ITim_timRoser_pargs() noexcept { } uint32_t ITim_timRoser_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timRoser_pargs"); xfer += oprot->writeFieldBegin("roster", ::apache::thrift::protocol::T_STRUCT, 1); @@ -868,13 +868,13 @@ uint32_t ITim_timRoser_pargs::write(::apache::thrift::protocol::TProtocol* oprot } -ITim_timMessageList_args::~ITim_timMessageList_args() throw() { +ITim_timMessageList_args::~ITim_timMessageList_args() noexcept { } uint32_t ITim_timMessageList_args::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -915,7 +915,7 @@ uint32_t ITim_timMessageList_args::read(::apache::thrift::protocol::TProtocol* i uint32_t ITim_timMessageList_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timMessageList_args"); xfer += oprot->writeFieldBegin("mbeanList", ::apache::thrift::protocol::T_STRUCT, 1); @@ -928,13 +928,13 @@ uint32_t ITim_timMessageList_args::write(::apache::thrift::protocol::TProtocol* } -ITim_timMessageList_pargs::~ITim_timMessageList_pargs() throw() { +ITim_timMessageList_pargs::~ITim_timMessageList_pargs() noexcept { } uint32_t ITim_timMessageList_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timMessageList_pargs"); xfer += oprot->writeFieldBegin("mbeanList", ::apache::thrift::protocol::T_STRUCT, 1); @@ -947,13 +947,13 @@ uint32_t ITim_timMessageList_pargs::write(::apache::thrift::protocol::TProtocol* } -ITim_timPresenceList_args::~ITim_timPresenceList_args() throw() { +ITim_timPresenceList_args::~ITim_timPresenceList_args() noexcept { } uint32_t ITim_timPresenceList_args::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -994,7 +994,7 @@ uint32_t ITim_timPresenceList_args::read(::apache::thrift::protocol::TProtocol* uint32_t ITim_timPresenceList_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timPresenceList_args"); xfer += oprot->writeFieldBegin("pbeanList", ::apache::thrift::protocol::T_STRUCT, 1); @@ -1007,13 +1007,13 @@ uint32_t ITim_timPresenceList_args::write(::apache::thrift::protocol::TProtocol* } -ITim_timPresenceList_pargs::~ITim_timPresenceList_pargs() throw() { +ITim_timPresenceList_pargs::~ITim_timPresenceList_pargs() noexcept { } uint32_t ITim_timPresenceList_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timPresenceList_pargs"); xfer += oprot->writeFieldBegin("pbeanList", ::apache::thrift::protocol::T_STRUCT, 1); @@ -1026,13 +1026,13 @@ uint32_t ITim_timPresenceList_pargs::write(::apache::thrift::protocol::TProtocol } -ITim_timMessageIq_args::~ITim_timMessageIq_args() throw() { +ITim_timMessageIq_args::~ITim_timMessageIq_args() noexcept { } uint32_t ITim_timMessageIq_args::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -1081,7 +1081,7 @@ uint32_t ITim_timMessageIq_args::read(::apache::thrift::protocol::TProtocol* ipr uint32_t ITim_timMessageIq_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timMessageIq_args"); xfer += oprot->writeFieldBegin("timMsgIq", ::apache::thrift::protocol::T_STRUCT, 1); @@ -1098,13 +1098,13 @@ uint32_t ITim_timMessageIq_args::write(::apache::thrift::protocol::TProtocol* op } -ITim_timMessageIq_pargs::~ITim_timMessageIq_pargs() throw() { +ITim_timMessageIq_pargs::~ITim_timMessageIq_pargs() noexcept { } uint32_t ITim_timMessageIq_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timMessageIq_pargs"); xfer += oprot->writeFieldBegin("timMsgIq", ::apache::thrift::protocol::T_STRUCT, 1); @@ -1121,13 +1121,13 @@ uint32_t ITim_timMessageIq_pargs::write(::apache::thrift::protocol::TProtocol* o } -ITim_timMessageResult_args::~ITim_timMessageResult_args() throw() { +ITim_timMessageResult_args::~ITim_timMessageResult_args() noexcept { } uint32_t ITim_timMessageResult_args::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -1168,7 +1168,7 @@ uint32_t ITim_timMessageResult_args::read(::apache::thrift::protocol::TProtocol* uint32_t ITim_timMessageResult_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timMessageResult_args"); xfer += oprot->writeFieldBegin("mbean", ::apache::thrift::protocol::T_STRUCT, 1); @@ -1181,13 +1181,13 @@ uint32_t ITim_timMessageResult_args::write(::apache::thrift::protocol::TProtocol } -ITim_timMessageResult_pargs::~ITim_timMessageResult_pargs() throw() { +ITim_timMessageResult_pargs::~ITim_timMessageResult_pargs() noexcept { } uint32_t ITim_timMessageResult_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timMessageResult_pargs"); xfer += oprot->writeFieldBegin("mbean", ::apache::thrift::protocol::T_STRUCT, 1); @@ -1200,13 +1200,13 @@ uint32_t ITim_timMessageResult_pargs::write(::apache::thrift::protocol::TProtoco } -ITim_timProperty_args::~ITim_timProperty_args() throw() { +ITim_timProperty_args::~ITim_timProperty_args() noexcept { } uint32_t ITim_timProperty_args::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -1247,7 +1247,7 @@ uint32_t ITim_timProperty_args::read(::apache::thrift::protocol::TProtocol* ipro uint32_t ITim_timProperty_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timProperty_args"); xfer += oprot->writeFieldBegin("tpb", ::apache::thrift::protocol::T_STRUCT, 1); @@ -1260,13 +1260,13 @@ uint32_t ITim_timProperty_args::write(::apache::thrift::protocol::TProtocol* opr } -ITim_timProperty_pargs::~ITim_timProperty_pargs() throw() { +ITim_timProperty_pargs::~ITim_timProperty_pargs() noexcept { } uint32_t ITim_timProperty_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timProperty_pargs"); xfer += oprot->writeFieldBegin("tpb", ::apache::thrift::protocol::T_STRUCT, 1); @@ -1279,13 +1279,13 @@ uint32_t ITim_timProperty_pargs::write(::apache::thrift::protocol::TProtocol* op } -ITim_timRemoteUserAuth_args::~ITim_timRemoteUserAuth_args() throw() { +ITim_timRemoteUserAuth_args::~ITim_timRemoteUserAuth_args() noexcept { } uint32_t ITim_timRemoteUserAuth_args::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -1342,7 +1342,7 @@ uint32_t ITim_timRemoteUserAuth_args::read(::apache::thrift::protocol::TProtocol uint32_t ITim_timRemoteUserAuth_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timRemoteUserAuth_args"); xfer += oprot->writeFieldBegin("tid", ::apache::thrift::protocol::T_STRUCT, 1); @@ -1363,13 +1363,13 @@ uint32_t ITim_timRemoteUserAuth_args::write(::apache::thrift::protocol::TProtoco } -ITim_timRemoteUserAuth_pargs::~ITim_timRemoteUserAuth_pargs() throw() { +ITim_timRemoteUserAuth_pargs::~ITim_timRemoteUserAuth_pargs() noexcept { } uint32_t ITim_timRemoteUserAuth_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timRemoteUserAuth_pargs"); xfer += oprot->writeFieldBegin("tid", ::apache::thrift::protocol::T_STRUCT, 1); @@ -1390,13 +1390,13 @@ uint32_t ITim_timRemoteUserAuth_pargs::write(::apache::thrift::protocol::TProtoc } -ITim_timRemoteUserAuth_result::~ITim_timRemoteUserAuth_result() throw() { +ITim_timRemoteUserAuth_result::~ITim_timRemoteUserAuth_result() noexcept { } uint32_t ITim_timRemoteUserAuth_result::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -1452,13 +1452,13 @@ uint32_t ITim_timRemoteUserAuth_result::write(::apache::thrift::protocol::TProto } -ITim_timRemoteUserAuth_presult::~ITim_timRemoteUserAuth_presult() throw() { +ITim_timRemoteUserAuth_presult::~ITim_timRemoteUserAuth_presult() noexcept { } uint32_t ITim_timRemoteUserAuth_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -1498,13 +1498,13 @@ uint32_t ITim_timRemoteUserAuth_presult::read(::apache::thrift::protocol::TProto } -ITim_timRemoteUserGet_args::~ITim_timRemoteUserGet_args() throw() { +ITim_timRemoteUserGet_args::~ITim_timRemoteUserGet_args() noexcept { } uint32_t ITim_timRemoteUserGet_args::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -1553,7 +1553,7 @@ uint32_t ITim_timRemoteUserGet_args::read(::apache::thrift::protocol::TProtocol* uint32_t ITim_timRemoteUserGet_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timRemoteUserGet_args"); xfer += oprot->writeFieldBegin("tid", ::apache::thrift::protocol::T_STRUCT, 1); @@ -1570,13 +1570,13 @@ uint32_t ITim_timRemoteUserGet_args::write(::apache::thrift::protocol::TProtocol } -ITim_timRemoteUserGet_pargs::~ITim_timRemoteUserGet_pargs() throw() { +ITim_timRemoteUserGet_pargs::~ITim_timRemoteUserGet_pargs() noexcept { } uint32_t ITim_timRemoteUserGet_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timRemoteUserGet_pargs"); xfer += oprot->writeFieldBegin("tid", ::apache::thrift::protocol::T_STRUCT, 1); @@ -1593,13 +1593,13 @@ uint32_t ITim_timRemoteUserGet_pargs::write(::apache::thrift::protocol::TProtoco } -ITim_timRemoteUserGet_result::~ITim_timRemoteUserGet_result() throw() { +ITim_timRemoteUserGet_result::~ITim_timRemoteUserGet_result() noexcept { } uint32_t ITim_timRemoteUserGet_result::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -1655,13 +1655,13 @@ uint32_t ITim_timRemoteUserGet_result::write(::apache::thrift::protocol::TProtoc } -ITim_timRemoteUserGet_presult::~ITim_timRemoteUserGet_presult() throw() { +ITim_timRemoteUserGet_presult::~ITim_timRemoteUserGet_presult() noexcept { } uint32_t ITim_timRemoteUserGet_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -1701,13 +1701,13 @@ uint32_t ITim_timRemoteUserGet_presult::read(::apache::thrift::protocol::TProtoc } -ITim_timRemoteUserEdit_args::~ITim_timRemoteUserEdit_args() throw() { +ITim_timRemoteUserEdit_args::~ITim_timRemoteUserEdit_args() noexcept { } uint32_t ITim_timRemoteUserEdit_args::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -1764,7 +1764,7 @@ uint32_t ITim_timRemoteUserEdit_args::read(::apache::thrift::protocol::TProtocol uint32_t ITim_timRemoteUserEdit_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timRemoteUserEdit_args"); xfer += oprot->writeFieldBegin("tid", ::apache::thrift::protocol::T_STRUCT, 1); @@ -1785,13 +1785,13 @@ uint32_t ITim_timRemoteUserEdit_args::write(::apache::thrift::protocol::TProtoco } -ITim_timRemoteUserEdit_pargs::~ITim_timRemoteUserEdit_pargs() throw() { +ITim_timRemoteUserEdit_pargs::~ITim_timRemoteUserEdit_pargs() noexcept { } uint32_t ITim_timRemoteUserEdit_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timRemoteUserEdit_pargs"); xfer += oprot->writeFieldBegin("tid", ::apache::thrift::protocol::T_STRUCT, 1); @@ -1812,13 +1812,13 @@ uint32_t ITim_timRemoteUserEdit_pargs::write(::apache::thrift::protocol::TProtoc } -ITim_timRemoteUserEdit_result::~ITim_timRemoteUserEdit_result() throw() { +ITim_timRemoteUserEdit_result::~ITim_timRemoteUserEdit_result() noexcept { } uint32_t ITim_timRemoteUserEdit_result::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -1874,13 +1874,13 @@ uint32_t ITim_timRemoteUserEdit_result::write(::apache::thrift::protocol::TProto } -ITim_timRemoteUserEdit_presult::~ITim_timRemoteUserEdit_presult() throw() { +ITim_timRemoteUserEdit_presult::~ITim_timRemoteUserEdit_presult() noexcept { } uint32_t ITim_timRemoteUserEdit_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -1920,13 +1920,13 @@ uint32_t ITim_timRemoteUserEdit_presult::read(::apache::thrift::protocol::TProto } -ITim_timResponsePresence_args::~ITim_timResponsePresence_args() throw() { +ITim_timResponsePresence_args::~ITim_timResponsePresence_args() noexcept { } uint32_t ITim_timResponsePresence_args::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -1975,7 +1975,7 @@ uint32_t ITim_timResponsePresence_args::read(::apache::thrift::protocol::TProtoc uint32_t ITim_timResponsePresence_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timResponsePresence_args"); xfer += oprot->writeFieldBegin("pbean", ::apache::thrift::protocol::T_STRUCT, 1); @@ -1992,13 +1992,13 @@ uint32_t ITim_timResponsePresence_args::write(::apache::thrift::protocol::TProto } -ITim_timResponsePresence_pargs::~ITim_timResponsePresence_pargs() throw() { +ITim_timResponsePresence_pargs::~ITim_timResponsePresence_pargs() noexcept { } uint32_t ITim_timResponsePresence_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timResponsePresence_pargs"); xfer += oprot->writeFieldBegin("pbean", ::apache::thrift::protocol::T_STRUCT, 1); @@ -2015,13 +2015,13 @@ uint32_t ITim_timResponsePresence_pargs::write(::apache::thrift::protocol::TProt } -ITim_timResponsePresence_result::~ITim_timResponsePresence_result() throw() { +ITim_timResponsePresence_result::~ITim_timResponsePresence_result() noexcept { } uint32_t ITim_timResponsePresence_result::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -2077,13 +2077,13 @@ uint32_t ITim_timResponsePresence_result::write(::apache::thrift::protocol::TPro } -ITim_timResponsePresence_presult::~ITim_timResponsePresence_presult() throw() { +ITim_timResponsePresence_presult::~ITim_timResponsePresence_presult() noexcept { } uint32_t ITim_timResponsePresence_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -2123,13 +2123,13 @@ uint32_t ITim_timResponsePresence_presult::read(::apache::thrift::protocol::TPro } -ITim_timResponseMessage_args::~ITim_timResponseMessage_args() throw() { +ITim_timResponseMessage_args::~ITim_timResponseMessage_args() noexcept { } uint32_t ITim_timResponseMessage_args::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -2178,7 +2178,7 @@ uint32_t ITim_timResponseMessage_args::read(::apache::thrift::protocol::TProtoco uint32_t ITim_timResponseMessage_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timResponseMessage_args"); xfer += oprot->writeFieldBegin("mbean", ::apache::thrift::protocol::T_STRUCT, 1); @@ -2195,13 +2195,13 @@ uint32_t ITim_timResponseMessage_args::write(::apache::thrift::protocol::TProtoc } -ITim_timResponseMessage_pargs::~ITim_timResponseMessage_pargs() throw() { +ITim_timResponseMessage_pargs::~ITim_timResponseMessage_pargs() noexcept { } uint32_t ITim_timResponseMessage_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timResponseMessage_pargs"); xfer += oprot->writeFieldBegin("mbean", ::apache::thrift::protocol::T_STRUCT, 1); @@ -2218,13 +2218,13 @@ uint32_t ITim_timResponseMessage_pargs::write(::apache::thrift::protocol::TProto } -ITim_timResponseMessage_result::~ITim_timResponseMessage_result() throw() { +ITim_timResponseMessage_result::~ITim_timResponseMessage_result() noexcept { } uint32_t ITim_timResponseMessage_result::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -2280,13 +2280,13 @@ uint32_t ITim_timResponseMessage_result::write(::apache::thrift::protocol::TProt } -ITim_timResponseMessage_presult::~ITim_timResponseMessage_presult() throw() { +ITim_timResponseMessage_presult::~ITim_timResponseMessage_presult() noexcept { } uint32_t ITim_timResponseMessage_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -2326,13 +2326,13 @@ uint32_t ITim_timResponseMessage_presult::read(::apache::thrift::protocol::TProt } -ITim_timResponseMessageIq_args::~ITim_timResponseMessageIq_args() throw() { +ITim_timResponseMessageIq_args::~ITim_timResponseMessageIq_args() noexcept { } uint32_t ITim_timResponseMessageIq_args::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -2389,7 +2389,7 @@ uint32_t ITim_timResponseMessageIq_args::read(::apache::thrift::protocol::TProto uint32_t ITim_timResponseMessageIq_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timResponseMessageIq_args"); xfer += oprot->writeFieldBegin("timMsgIq", ::apache::thrift::protocol::T_STRUCT, 1); @@ -2410,13 +2410,13 @@ uint32_t ITim_timResponseMessageIq_args::write(::apache::thrift::protocol::TProt } -ITim_timResponseMessageIq_pargs::~ITim_timResponseMessageIq_pargs() throw() { +ITim_timResponseMessageIq_pargs::~ITim_timResponseMessageIq_pargs() noexcept { } uint32_t ITim_timResponseMessageIq_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timResponseMessageIq_pargs"); xfer += oprot->writeFieldBegin("timMsgIq", ::apache::thrift::protocol::T_STRUCT, 1); @@ -2437,13 +2437,13 @@ uint32_t ITim_timResponseMessageIq_pargs::write(::apache::thrift::protocol::TPro } -ITim_timResponseMessageIq_result::~ITim_timResponseMessageIq_result() throw() { +ITim_timResponseMessageIq_result::~ITim_timResponseMessageIq_result() noexcept { } uint32_t ITim_timResponseMessageIq_result::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -2499,13 +2499,13 @@ uint32_t ITim_timResponseMessageIq_result::write(::apache::thrift::protocol::TPr } -ITim_timResponseMessageIq_presult::~ITim_timResponseMessageIq_presult() throw() { +ITim_timResponseMessageIq_presult::~ITim_timResponseMessageIq_presult() noexcept { } uint32_t ITim_timResponseMessageIq_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -2545,13 +2545,13 @@ uint32_t ITim_timResponseMessageIq_presult::read(::apache::thrift::protocol::TPr } -ITim_timResponsePresenceList_args::~ITim_timResponsePresenceList_args() throw() { +ITim_timResponsePresenceList_args::~ITim_timResponsePresenceList_args() noexcept { } uint32_t ITim_timResponsePresenceList_args::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -2600,7 +2600,7 @@ uint32_t ITim_timResponsePresenceList_args::read(::apache::thrift::protocol::TPr uint32_t ITim_timResponsePresenceList_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timResponsePresenceList_args"); xfer += oprot->writeFieldBegin("pbeanList", ::apache::thrift::protocol::T_STRUCT, 1); @@ -2617,13 +2617,13 @@ uint32_t ITim_timResponsePresenceList_args::write(::apache::thrift::protocol::TP } -ITim_timResponsePresenceList_pargs::~ITim_timResponsePresenceList_pargs() throw() { +ITim_timResponsePresenceList_pargs::~ITim_timResponsePresenceList_pargs() noexcept { } uint32_t ITim_timResponsePresenceList_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timResponsePresenceList_pargs"); xfer += oprot->writeFieldBegin("pbeanList", ::apache::thrift::protocol::T_STRUCT, 1); @@ -2640,13 +2640,13 @@ uint32_t ITim_timResponsePresenceList_pargs::write(::apache::thrift::protocol::T } -ITim_timResponsePresenceList_result::~ITim_timResponsePresenceList_result() throw() { +ITim_timResponsePresenceList_result::~ITim_timResponsePresenceList_result() noexcept { } uint32_t ITim_timResponsePresenceList_result::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -2702,13 +2702,13 @@ uint32_t ITim_timResponsePresenceList_result::write(::apache::thrift::protocol:: } -ITim_timResponsePresenceList_presult::~ITim_timResponsePresenceList_presult() throw() { +ITim_timResponsePresenceList_presult::~ITim_timResponsePresenceList_presult() noexcept { } uint32_t ITim_timResponsePresenceList_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -2748,13 +2748,13 @@ uint32_t ITim_timResponsePresenceList_presult::read(::apache::thrift::protocol:: } -ITim_timResponseMessageList_args::~ITim_timResponseMessageList_args() throw() { +ITim_timResponseMessageList_args::~ITim_timResponseMessageList_args() noexcept { } uint32_t ITim_timResponseMessageList_args::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -2803,7 +2803,7 @@ uint32_t ITim_timResponseMessageList_args::read(::apache::thrift::protocol::TPro uint32_t ITim_timResponseMessageList_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timResponseMessageList_args"); xfer += oprot->writeFieldBegin("mbeanList", ::apache::thrift::protocol::T_STRUCT, 1); @@ -2820,13 +2820,13 @@ uint32_t ITim_timResponseMessageList_args::write(::apache::thrift::protocol::TPr } -ITim_timResponseMessageList_pargs::~ITim_timResponseMessageList_pargs() throw() { +ITim_timResponseMessageList_pargs::~ITim_timResponseMessageList_pargs() noexcept { } uint32_t ITim_timResponseMessageList_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ITim_timResponseMessageList_pargs"); xfer += oprot->writeFieldBegin("mbeanList", ::apache::thrift::protocol::T_STRUCT, 1); @@ -2843,13 +2843,13 @@ uint32_t ITim_timResponseMessageList_pargs::write(::apache::thrift::protocol::TP } -ITim_timResponseMessageList_result::~ITim_timResponseMessageList_result() throw() { +ITim_timResponseMessageList_result::~ITim_timResponseMessageList_result() noexcept { } uint32_t ITim_timResponseMessageList_result::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -2905,13 +2905,13 @@ uint32_t ITim_timResponseMessageList_result::write(::apache::thrift::protocol::T } -ITim_timResponseMessageList_presult::~ITim_timResponseMessageList_presult() throw() { +ITim_timResponseMessageList_presult::~ITim_timResponseMessageList_presult() noexcept { } uint32_t ITim_timResponseMessageList_presult::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -3751,13 +3751,13 @@ bool ITimProcessor::dispatchCall(::apache::thrift::protocol::TProtocol* iprot, : void ITimProcessor::process_timStream(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) { - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { ctx = this->eventHandler_->getContext("ITim.timStream", callContext); } ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ITim.timStream"); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preRead(ctx, "ITim.timStream"); } @@ -3766,20 +3766,20 @@ void ITimProcessor::process_timStream(int32_t, ::apache::thrift::protocol::TProt iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postRead(ctx, "ITim.timStream", bytes); } try { iface_->timStream(args.param); } catch (const std::exception&) { - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->handlerError(ctx, "ITim.timStream"); } return; } - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->asyncComplete(ctx, "ITim.timStream"); } @@ -3788,13 +3788,13 @@ void ITimProcessor::process_timStream(int32_t, ::apache::thrift::protocol::TProt void ITimProcessor::process_timStarttls(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) { - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { ctx = this->eventHandler_->getContext("ITim.timStarttls", callContext); } ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ITim.timStarttls"); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preRead(ctx, "ITim.timStarttls"); } @@ -3803,20 +3803,20 @@ void ITimProcessor::process_timStarttls(int32_t, ::apache::thrift::protocol::TPr iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postRead(ctx, "ITim.timStarttls", bytes); } try { iface_->timStarttls(); } catch (const std::exception&) { - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->handlerError(ctx, "ITim.timStarttls"); } return; } - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->asyncComplete(ctx, "ITim.timStarttls"); } @@ -3825,13 +3825,13 @@ void ITimProcessor::process_timStarttls(int32_t, ::apache::thrift::protocol::TPr void ITimProcessor::process_timLogin(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) { - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { ctx = this->eventHandler_->getContext("ITim.timLogin", callContext); } ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ITim.timLogin"); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preRead(ctx, "ITim.timLogin"); } @@ -3840,20 +3840,20 @@ void ITimProcessor::process_timLogin(int32_t, ::apache::thrift::protocol::TProto iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postRead(ctx, "ITim.timLogin", bytes); } try { iface_->timLogin(args.tid, args.pwd); } catch (const std::exception&) { - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->handlerError(ctx, "ITim.timLogin"); } return; } - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->asyncComplete(ctx, "ITim.timLogin"); } @@ -3862,13 +3862,13 @@ void ITimProcessor::process_timLogin(int32_t, ::apache::thrift::protocol::TProto void ITimProcessor::process_timAck(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) { - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { ctx = this->eventHandler_->getContext("ITim.timAck", callContext); } ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ITim.timAck"); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preRead(ctx, "ITim.timAck"); } @@ -3877,20 +3877,20 @@ void ITimProcessor::process_timAck(int32_t, ::apache::thrift::protocol::TProtoco iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postRead(ctx, "ITim.timAck", bytes); } try { iface_->timAck(args.ab); } catch (const std::exception&) { - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->handlerError(ctx, "ITim.timAck"); } return; } - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->asyncComplete(ctx, "ITim.timAck"); } @@ -3899,13 +3899,13 @@ void ITimProcessor::process_timAck(int32_t, ::apache::thrift::protocol::TProtoco void ITimProcessor::process_timPresence(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) { - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { ctx = this->eventHandler_->getContext("ITim.timPresence", callContext); } ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ITim.timPresence"); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preRead(ctx, "ITim.timPresence"); } @@ -3914,20 +3914,20 @@ void ITimProcessor::process_timPresence(int32_t, ::apache::thrift::protocol::TPr iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postRead(ctx, "ITim.timPresence", bytes); } try { iface_->timPresence(args.pbean); } catch (const std::exception&) { - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->handlerError(ctx, "ITim.timPresence"); } return; } - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->asyncComplete(ctx, "ITim.timPresence"); } @@ -3936,13 +3936,13 @@ void ITimProcessor::process_timPresence(int32_t, ::apache::thrift::protocol::TPr void ITimProcessor::process_timMessage(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) { - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { ctx = this->eventHandler_->getContext("ITim.timMessage", callContext); } ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ITim.timMessage"); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preRead(ctx, "ITim.timMessage"); } @@ -3951,20 +3951,20 @@ void ITimProcessor::process_timMessage(int32_t, ::apache::thrift::protocol::TPro iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postRead(ctx, "ITim.timMessage", bytes); } try { iface_->timMessage(args.mbean); } catch (const std::exception&) { - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->handlerError(ctx, "ITim.timMessage"); } return; } - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->asyncComplete(ctx, "ITim.timMessage"); } @@ -3973,13 +3973,13 @@ void ITimProcessor::process_timMessage(int32_t, ::apache::thrift::protocol::TPro void ITimProcessor::process_timPing(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) { - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { ctx = this->eventHandler_->getContext("ITim.timPing", callContext); } ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ITim.timPing"); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preRead(ctx, "ITim.timPing"); } @@ -3988,20 +3988,20 @@ void ITimProcessor::process_timPing(int32_t, ::apache::thrift::protocol::TProtoc iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postRead(ctx, "ITim.timPing", bytes); } try { iface_->timPing(args.threadId); } catch (const std::exception&) { - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->handlerError(ctx, "ITim.timPing"); } return; } - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->asyncComplete(ctx, "ITim.timPing"); } @@ -4010,13 +4010,13 @@ void ITimProcessor::process_timPing(int32_t, ::apache::thrift::protocol::TProtoc void ITimProcessor::process_timError(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) { - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { ctx = this->eventHandler_->getContext("ITim.timError", callContext); } ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ITim.timError"); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preRead(ctx, "ITim.timError"); } @@ -4025,20 +4025,20 @@ void ITimProcessor::process_timError(int32_t, ::apache::thrift::protocol::TProto iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postRead(ctx, "ITim.timError", bytes); } try { iface_->timError(args.e); } catch (const std::exception&) { - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->handlerError(ctx, "ITim.timError"); } return; } - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->asyncComplete(ctx, "ITim.timError"); } @@ -4047,13 +4047,13 @@ void ITimProcessor::process_timError(int32_t, ::apache::thrift::protocol::TProto void ITimProcessor::process_timLogout(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) { - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { ctx = this->eventHandler_->getContext("ITim.timLogout", callContext); } ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ITim.timLogout"); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preRead(ctx, "ITim.timLogout"); } @@ -4062,20 +4062,20 @@ void ITimProcessor::process_timLogout(int32_t, ::apache::thrift::protocol::TProt iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postRead(ctx, "ITim.timLogout", bytes); } try { iface_->timLogout(); } catch (const std::exception&) { - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->handlerError(ctx, "ITim.timLogout"); } return; } - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->asyncComplete(ctx, "ITim.timLogout"); } @@ -4084,13 +4084,13 @@ void ITimProcessor::process_timLogout(int32_t, ::apache::thrift::protocol::TProt void ITimProcessor::process_timRegist(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) { - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { ctx = this->eventHandler_->getContext("ITim.timRegist", callContext); } ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ITim.timRegist"); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preRead(ctx, "ITim.timRegist"); } @@ -4099,20 +4099,20 @@ void ITimProcessor::process_timRegist(int32_t, ::apache::thrift::protocol::TProt iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postRead(ctx, "ITim.timRegist", bytes); } try { iface_->timRegist(args.tid, args.auth); } catch (const std::exception&) { - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->handlerError(ctx, "ITim.timRegist"); } return; } - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->asyncComplete(ctx, "ITim.timRegist"); } @@ -4121,13 +4121,13 @@ void ITimProcessor::process_timRegist(int32_t, ::apache::thrift::protocol::TProt void ITimProcessor::process_timRoser(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) { - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { ctx = this->eventHandler_->getContext("ITim.timRoser", callContext); } ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ITim.timRoser"); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preRead(ctx, "ITim.timRoser"); } @@ -4136,20 +4136,20 @@ void ITimProcessor::process_timRoser(int32_t, ::apache::thrift::protocol::TProto iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postRead(ctx, "ITim.timRoser", bytes); } try { iface_->timRoser(args.roster); } catch (const std::exception&) { - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->handlerError(ctx, "ITim.timRoser"); } return; } - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->asyncComplete(ctx, "ITim.timRoser"); } @@ -4158,13 +4158,13 @@ void ITimProcessor::process_timRoser(int32_t, ::apache::thrift::protocol::TProto void ITimProcessor::process_timMessageList(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) { - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { ctx = this->eventHandler_->getContext("ITim.timMessageList", callContext); } ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ITim.timMessageList"); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preRead(ctx, "ITim.timMessageList"); } @@ -4173,20 +4173,20 @@ void ITimProcessor::process_timMessageList(int32_t, ::apache::thrift::protocol:: iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postRead(ctx, "ITim.timMessageList", bytes); } try { iface_->timMessageList(args.mbeanList); } catch (const std::exception&) { - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->handlerError(ctx, "ITim.timMessageList"); } return; } - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->asyncComplete(ctx, "ITim.timMessageList"); } @@ -4195,13 +4195,13 @@ void ITimProcessor::process_timMessageList(int32_t, ::apache::thrift::protocol:: void ITimProcessor::process_timPresenceList(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) { - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { ctx = this->eventHandler_->getContext("ITim.timPresenceList", callContext); } ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ITim.timPresenceList"); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preRead(ctx, "ITim.timPresenceList"); } @@ -4210,20 +4210,20 @@ void ITimProcessor::process_timPresenceList(int32_t, ::apache::thrift::protocol: iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postRead(ctx, "ITim.timPresenceList", bytes); } try { iface_->timPresenceList(args.pbeanList); } catch (const std::exception&) { - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->handlerError(ctx, "ITim.timPresenceList"); } return; } - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->asyncComplete(ctx, "ITim.timPresenceList"); } @@ -4232,13 +4232,13 @@ void ITimProcessor::process_timPresenceList(int32_t, ::apache::thrift::protocol: void ITimProcessor::process_timMessageIq(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) { - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { ctx = this->eventHandler_->getContext("ITim.timMessageIq", callContext); } ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ITim.timMessageIq"); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preRead(ctx, "ITim.timMessageIq"); } @@ -4247,20 +4247,20 @@ void ITimProcessor::process_timMessageIq(int32_t, ::apache::thrift::protocol::TP iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postRead(ctx, "ITim.timMessageIq", bytes); } try { iface_->timMessageIq(args.timMsgIq, args.iqType); } catch (const std::exception&) { - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->handlerError(ctx, "ITim.timMessageIq"); } return; } - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->asyncComplete(ctx, "ITim.timMessageIq"); } @@ -4269,13 +4269,13 @@ void ITimProcessor::process_timMessageIq(int32_t, ::apache::thrift::protocol::TP void ITimProcessor::process_timMessageResult(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) { - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { ctx = this->eventHandler_->getContext("ITim.timMessageResult", callContext); } ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ITim.timMessageResult"); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preRead(ctx, "ITim.timMessageResult"); } @@ -4284,20 +4284,20 @@ void ITimProcessor::process_timMessageResult(int32_t, ::apache::thrift::protocol iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postRead(ctx, "ITim.timMessageResult", bytes); } try { iface_->timMessageResult(args.mbean); } catch (const std::exception&) { - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->handlerError(ctx, "ITim.timMessageResult"); } return; } - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->asyncComplete(ctx, "ITim.timMessageResult"); } @@ -4306,13 +4306,13 @@ void ITimProcessor::process_timMessageResult(int32_t, ::apache::thrift::protocol void ITimProcessor::process_timProperty(int32_t, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol*, void* callContext) { - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { ctx = this->eventHandler_->getContext("ITim.timProperty", callContext); } ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ITim.timProperty"); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preRead(ctx, "ITim.timProperty"); } @@ -4321,20 +4321,20 @@ void ITimProcessor::process_timProperty(int32_t, ::apache::thrift::protocol::TPr iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postRead(ctx, "ITim.timProperty", bytes); } try { iface_->timProperty(args.tpb); } catch (const std::exception&) { - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->handlerError(ctx, "ITim.timProperty"); } return; } - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->asyncComplete(ctx, "ITim.timProperty"); } @@ -4343,13 +4343,13 @@ void ITimProcessor::process_timProperty(int32_t, ::apache::thrift::protocol::TPr void ITimProcessor::process_timRemoteUserAuth(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { ctx = this->eventHandler_->getContext("ITim.timRemoteUserAuth", callContext); } ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ITim.timRemoteUserAuth"); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preRead(ctx, "ITim.timRemoteUserAuth"); } @@ -4358,7 +4358,7 @@ void ITimProcessor::process_timRemoteUserAuth(int32_t seqid, ::apache::thrift::p iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postRead(ctx, "ITim.timRemoteUserAuth", bytes); } @@ -4367,7 +4367,7 @@ void ITimProcessor::process_timRemoteUserAuth(int32_t seqid, ::apache::thrift::p iface_->timRemoteUserAuth(result.success, args.tid, args.pwd, args.auth); result.__isset.success = true; } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->handlerError(ctx, "ITim.timRemoteUserAuth"); } @@ -4380,7 +4380,7 @@ void ITimProcessor::process_timRemoteUserAuth(int32_t seqid, ::apache::thrift::p return; } - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preWrite(ctx, "ITim.timRemoteUserAuth"); } @@ -4390,20 +4390,20 @@ void ITimProcessor::process_timRemoteUserAuth(int32_t seqid, ::apache::thrift::p bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postWrite(ctx, "ITim.timRemoteUserAuth", bytes); } } void ITimProcessor::process_timRemoteUserGet(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { ctx = this->eventHandler_->getContext("ITim.timRemoteUserGet", callContext); } ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ITim.timRemoteUserGet"); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preRead(ctx, "ITim.timRemoteUserGet"); } @@ -4412,7 +4412,7 @@ void ITimProcessor::process_timRemoteUserGet(int32_t seqid, ::apache::thrift::pr iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postRead(ctx, "ITim.timRemoteUserGet", bytes); } @@ -4421,7 +4421,7 @@ void ITimProcessor::process_timRemoteUserGet(int32_t seqid, ::apache::thrift::pr iface_->timRemoteUserGet(result.success, args.tid, args.auth); result.__isset.success = true; } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->handlerError(ctx, "ITim.timRemoteUserGet"); } @@ -4434,7 +4434,7 @@ void ITimProcessor::process_timRemoteUserGet(int32_t seqid, ::apache::thrift::pr return; } - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preWrite(ctx, "ITim.timRemoteUserGet"); } @@ -4444,20 +4444,20 @@ void ITimProcessor::process_timRemoteUserGet(int32_t seqid, ::apache::thrift::pr bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postWrite(ctx, "ITim.timRemoteUserGet", bytes); } } void ITimProcessor::process_timRemoteUserEdit(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { ctx = this->eventHandler_->getContext("ITim.timRemoteUserEdit", callContext); } ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ITim.timRemoteUserEdit"); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preRead(ctx, "ITim.timRemoteUserEdit"); } @@ -4466,7 +4466,7 @@ void ITimProcessor::process_timRemoteUserEdit(int32_t seqid, ::apache::thrift::p iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postRead(ctx, "ITim.timRemoteUserEdit", bytes); } @@ -4475,7 +4475,7 @@ void ITimProcessor::process_timRemoteUserEdit(int32_t seqid, ::apache::thrift::p iface_->timRemoteUserEdit(result.success, args.tid, args.ub, args.auth); result.__isset.success = true; } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->handlerError(ctx, "ITim.timRemoteUserEdit"); } @@ -4488,7 +4488,7 @@ void ITimProcessor::process_timRemoteUserEdit(int32_t seqid, ::apache::thrift::p return; } - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preWrite(ctx, "ITim.timRemoteUserEdit"); } @@ -4498,20 +4498,20 @@ void ITimProcessor::process_timRemoteUserEdit(int32_t seqid, ::apache::thrift::p bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postWrite(ctx, "ITim.timRemoteUserEdit", bytes); } } void ITimProcessor::process_timResponsePresence(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { ctx = this->eventHandler_->getContext("ITim.timResponsePresence", callContext); } ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ITim.timResponsePresence"); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preRead(ctx, "ITim.timResponsePresence"); } @@ -4520,7 +4520,7 @@ void ITimProcessor::process_timResponsePresence(int32_t seqid, ::apache::thrift: iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postRead(ctx, "ITim.timResponsePresence", bytes); } @@ -4529,7 +4529,7 @@ void ITimProcessor::process_timResponsePresence(int32_t seqid, ::apache::thrift: iface_->timResponsePresence(result.success, args.pbean, args.auth); result.__isset.success = true; } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->handlerError(ctx, "ITim.timResponsePresence"); } @@ -4542,7 +4542,7 @@ void ITimProcessor::process_timResponsePresence(int32_t seqid, ::apache::thrift: return; } - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preWrite(ctx, "ITim.timResponsePresence"); } @@ -4552,20 +4552,20 @@ void ITimProcessor::process_timResponsePresence(int32_t seqid, ::apache::thrift: bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postWrite(ctx, "ITim.timResponsePresence", bytes); } } void ITimProcessor::process_timResponseMessage(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { ctx = this->eventHandler_->getContext("ITim.timResponseMessage", callContext); } ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ITim.timResponseMessage"); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preRead(ctx, "ITim.timResponseMessage"); } @@ -4574,7 +4574,7 @@ void ITimProcessor::process_timResponseMessage(int32_t seqid, ::apache::thrift:: iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postRead(ctx, "ITim.timResponseMessage", bytes); } @@ -4583,7 +4583,7 @@ void ITimProcessor::process_timResponseMessage(int32_t seqid, ::apache::thrift:: iface_->timResponseMessage(result.success, args.mbean, args.auth); result.__isset.success = true; } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->handlerError(ctx, "ITim.timResponseMessage"); } @@ -4596,7 +4596,7 @@ void ITimProcessor::process_timResponseMessage(int32_t seqid, ::apache::thrift:: return; } - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preWrite(ctx, "ITim.timResponseMessage"); } @@ -4606,20 +4606,20 @@ void ITimProcessor::process_timResponseMessage(int32_t seqid, ::apache::thrift:: bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postWrite(ctx, "ITim.timResponseMessage", bytes); } } void ITimProcessor::process_timResponseMessageIq(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { ctx = this->eventHandler_->getContext("ITim.timResponseMessageIq", callContext); } ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ITim.timResponseMessageIq"); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preRead(ctx, "ITim.timResponseMessageIq"); } @@ -4628,7 +4628,7 @@ void ITimProcessor::process_timResponseMessageIq(int32_t seqid, ::apache::thrift iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postRead(ctx, "ITim.timResponseMessageIq", bytes); } @@ -4637,7 +4637,7 @@ void ITimProcessor::process_timResponseMessageIq(int32_t seqid, ::apache::thrift iface_->timResponseMessageIq(result.success, args.timMsgIq, args.iqType, args.auth); result.__isset.success = true; } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->handlerError(ctx, "ITim.timResponseMessageIq"); } @@ -4650,7 +4650,7 @@ void ITimProcessor::process_timResponseMessageIq(int32_t seqid, ::apache::thrift return; } - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preWrite(ctx, "ITim.timResponseMessageIq"); } @@ -4660,20 +4660,20 @@ void ITimProcessor::process_timResponseMessageIq(int32_t seqid, ::apache::thrift bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postWrite(ctx, "ITim.timResponseMessageIq", bytes); } } void ITimProcessor::process_timResponsePresenceList(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { ctx = this->eventHandler_->getContext("ITim.timResponsePresenceList", callContext); } ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ITim.timResponsePresenceList"); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preRead(ctx, "ITim.timResponsePresenceList"); } @@ -4682,7 +4682,7 @@ void ITimProcessor::process_timResponsePresenceList(int32_t seqid, ::apache::thr iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postRead(ctx, "ITim.timResponsePresenceList", bytes); } @@ -4691,7 +4691,7 @@ void ITimProcessor::process_timResponsePresenceList(int32_t seqid, ::apache::thr iface_->timResponsePresenceList(result.success, args.pbeanList, args.auth); result.__isset.success = true; } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->handlerError(ctx, "ITim.timResponsePresenceList"); } @@ -4704,7 +4704,7 @@ void ITimProcessor::process_timResponsePresenceList(int32_t seqid, ::apache::thr return; } - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preWrite(ctx, "ITim.timResponsePresenceList"); } @@ -4714,20 +4714,20 @@ void ITimProcessor::process_timResponsePresenceList(int32_t seqid, ::apache::thr bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postWrite(ctx, "ITim.timResponsePresenceList", bytes); } } void ITimProcessor::process_timResponseMessageList(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) { - void* ctx = NULL; - if (this->eventHandler_.get() != NULL) { + void* ctx = nullptr; + if (this->eventHandler_.get() != nullptr) { ctx = this->eventHandler_->getContext("ITim.timResponseMessageList", callContext); } ::apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "ITim.timResponseMessageList"); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preRead(ctx, "ITim.timResponseMessageList"); } @@ -4736,7 +4736,7 @@ void ITimProcessor::process_timResponseMessageList(int32_t seqid, ::apache::thri iprot->readMessageEnd(); uint32_t bytes = iprot->getTransport()->readEnd(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postRead(ctx, "ITim.timResponseMessageList", bytes); } @@ -4745,7 +4745,7 @@ void ITimProcessor::process_timResponseMessageList(int32_t seqid, ::apache::thri iface_->timResponseMessageList(result.success, args.mbeanList, args.auth); result.__isset.success = true; } catch (const std::exception& e) { - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->handlerError(ctx, "ITim.timResponseMessageList"); } @@ -4758,7 +4758,7 @@ void ITimProcessor::process_timResponseMessageList(int32_t seqid, ::apache::thri return; } - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->preWrite(ctx, "ITim.timResponseMessageList"); } @@ -4768,15 +4768,15 @@ void ITimProcessor::process_timResponseMessageList(int32_t seqid, ::apache::thri bytes = oprot->getTransport()->writeEnd(); oprot->getTransport()->flush(); - if (this->eventHandler_.get() != NULL) { + if (this->eventHandler_.get() != nullptr) { this->eventHandler_->postWrite(ctx, "ITim.timResponseMessageList", bytes); } } -::boost::shared_ptr< ::apache::thrift::TProcessor > ITimProcessorFactory::getProcessor(const ::apache::thrift::TConnectionInfo& connInfo) { +::std::shared_ptr< ::apache::thrift::TProcessor > ITimProcessorFactory::getProcessor(const ::apache::thrift::TConnectionInfo& connInfo) { ::apache::thrift::ReleaseHandler< ITimIfFactory > cleanup(handlerFactory_); - ::boost::shared_ptr< ITimIf > handler(handlerFactory_->getHandler(connInfo), cleanup); - ::boost::shared_ptr< ::apache::thrift::TProcessor > processor(new ITimProcessor(handler)); + ::std::shared_ptr< ITimIf > handler(handlerFactory_->getHandler(connInfo), cleanup); + ::std::shared_ptr< ::apache::thrift::TProcessor > processor(new ITimProcessor(handler)); return processor; } @@ -4788,7 +4788,7 @@ void ITimConcurrentClient::timStream(const TimParam& param) void ITimConcurrentClient::send_timStream(const TimParam& param) { int32_t cseqid = 0; - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); oprot_->writeMessageBegin("timStream", ::apache::thrift::protocol::T_ONEWAY, cseqid); ITim_timStream_pargs args; @@ -4810,7 +4810,7 @@ void ITimConcurrentClient::timStarttls() void ITimConcurrentClient::send_timStarttls() { int32_t cseqid = 0; - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); oprot_->writeMessageBegin("timStarttls", ::apache::thrift::protocol::T_ONEWAY, cseqid); ITim_timStarttls_pargs args; @@ -4831,7 +4831,7 @@ void ITimConcurrentClient::timLogin(const Tid& tid, const std::string& pwd) void ITimConcurrentClient::send_timLogin(const Tid& tid, const std::string& pwd) { int32_t cseqid = 0; - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); oprot_->writeMessageBegin("timLogin", ::apache::thrift::protocol::T_ONEWAY, cseqid); ITim_timLogin_pargs args; @@ -4854,7 +4854,7 @@ void ITimConcurrentClient::timAck(const TimAckBean& ab) void ITimConcurrentClient::send_timAck(const TimAckBean& ab) { int32_t cseqid = 0; - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); oprot_->writeMessageBegin("timAck", ::apache::thrift::protocol::T_ONEWAY, cseqid); ITim_timAck_pargs args; @@ -4876,7 +4876,7 @@ void ITimConcurrentClient::timPresence(const TimPBean& pbean) void ITimConcurrentClient::send_timPresence(const TimPBean& pbean) { int32_t cseqid = 0; - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); oprot_->writeMessageBegin("timPresence", ::apache::thrift::protocol::T_ONEWAY, cseqid); ITim_timPresence_pargs args; @@ -4898,7 +4898,7 @@ void ITimConcurrentClient::timMessage(const TimMBean& mbean) void ITimConcurrentClient::send_timMessage(const TimMBean& mbean) { int32_t cseqid = 0; - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); oprot_->writeMessageBegin("timMessage", ::apache::thrift::protocol::T_ONEWAY, cseqid); ITim_timMessage_pargs args; @@ -4920,7 +4920,7 @@ void ITimConcurrentClient::timPing(const std::string& threadId) void ITimConcurrentClient::send_timPing(const std::string& threadId) { int32_t cseqid = 0; - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); oprot_->writeMessageBegin("timPing", ::apache::thrift::protocol::T_ONEWAY, cseqid); ITim_timPing_pargs args; @@ -4942,7 +4942,7 @@ void ITimConcurrentClient::timError(const TimError& e) void ITimConcurrentClient::send_timError(const TimError& e) { int32_t cseqid = 0; - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); oprot_->writeMessageBegin("timError", ::apache::thrift::protocol::T_ONEWAY, cseqid); ITim_timError_pargs args; @@ -4964,7 +4964,7 @@ void ITimConcurrentClient::timLogout() void ITimConcurrentClient::send_timLogout() { int32_t cseqid = 0; - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); oprot_->writeMessageBegin("timLogout", ::apache::thrift::protocol::T_ONEWAY, cseqid); ITim_timLogout_pargs args; @@ -4985,7 +4985,7 @@ void ITimConcurrentClient::timRegist(const Tid& tid, const std::string& auth) void ITimConcurrentClient::send_timRegist(const Tid& tid, const std::string& auth) { int32_t cseqid = 0; - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); oprot_->writeMessageBegin("timRegist", ::apache::thrift::protocol::T_ONEWAY, cseqid); ITim_timRegist_pargs args; @@ -5008,7 +5008,7 @@ void ITimConcurrentClient::timRoser(const TimRoster& roster) void ITimConcurrentClient::send_timRoser(const TimRoster& roster) { int32_t cseqid = 0; - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); oprot_->writeMessageBegin("timRoser", ::apache::thrift::protocol::T_ONEWAY, cseqid); ITim_timRoser_pargs args; @@ -5030,7 +5030,7 @@ void ITimConcurrentClient::timMessageList(const TimMBeanList& mbeanList) void ITimConcurrentClient::send_timMessageList(const TimMBeanList& mbeanList) { int32_t cseqid = 0; - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); oprot_->writeMessageBegin("timMessageList", ::apache::thrift::protocol::T_ONEWAY, cseqid); ITim_timMessageList_pargs args; @@ -5052,7 +5052,7 @@ void ITimConcurrentClient::timPresenceList(const TimPBeanList& pbeanList) void ITimConcurrentClient::send_timPresenceList(const TimPBeanList& pbeanList) { int32_t cseqid = 0; - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); oprot_->writeMessageBegin("timPresenceList", ::apache::thrift::protocol::T_ONEWAY, cseqid); ITim_timPresenceList_pargs args; @@ -5074,7 +5074,7 @@ void ITimConcurrentClient::timMessageIq(const TimMessageIq& timMsgIq, const std: void ITimConcurrentClient::send_timMessageIq(const TimMessageIq& timMsgIq, const std::string& iqType) { int32_t cseqid = 0; - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); oprot_->writeMessageBegin("timMessageIq", ::apache::thrift::protocol::T_ONEWAY, cseqid); ITim_timMessageIq_pargs args; @@ -5097,7 +5097,7 @@ void ITimConcurrentClient::timMessageResult(const TimMBean& mbean) void ITimConcurrentClient::send_timMessageResult(const TimMBean& mbean) { int32_t cseqid = 0; - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); oprot_->writeMessageBegin("timMessageResult", ::apache::thrift::protocol::T_ONEWAY, cseqid); ITim_timMessageResult_pargs args; @@ -5119,7 +5119,7 @@ void ITimConcurrentClient::timProperty(const TimPropertyBean& tpb) void ITimConcurrentClient::send_timProperty(const TimPropertyBean& tpb) { int32_t cseqid = 0; - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); oprot_->writeMessageBegin("timProperty", ::apache::thrift::protocol::T_ONEWAY, cseqid); ITim_timProperty_pargs args; @@ -5141,8 +5141,8 @@ void ITimConcurrentClient::timRemoteUserAuth(TimRemoteUserBean& _return, const T int32_t ITimConcurrentClient::send_timRemoteUserAuth(const Tid& tid, const std::string& pwd, const TimAuth& auth) { - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + int32_t cseqid = this->sync_->generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); oprot_->writeMessageBegin("timRemoteUserAuth", ::apache::thrift::protocol::T_CALL, cseqid); ITim_timRemoteUserAuth_pargs args; @@ -5168,10 +5168,10 @@ void ITimConcurrentClient::recv_timRemoteUserAuth(TimRemoteUserBean& _return, co // the read mutex gets dropped and reacquired as part of waitForWork() // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + ::apache::thrift::async::TConcurrentRecvSentry sentry(this->sync_.get(), seqid); while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { + if(!this->sync_->getPending(fname, mtype, rseqid)) { iprot_->readMessageBegin(fname, mtype, rseqid); } if(seqid == rseqid) { @@ -5212,10 +5212,10 @@ void ITimConcurrentClient::recv_timRemoteUserAuth(TimRemoteUserBean& _return, co throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "timRemoteUserAuth failed: unknown result"); } // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); + this->sync_->updatePending(fname, mtype, rseqid); // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); + this->sync_->waitForWork(seqid); } // end while(true) } @@ -5227,8 +5227,8 @@ void ITimConcurrentClient::timRemoteUserGet(TimRemoteUserBean& _return, const Ti int32_t ITimConcurrentClient::send_timRemoteUserGet(const Tid& tid, const TimAuth& auth) { - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + int32_t cseqid = this->sync_->generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); oprot_->writeMessageBegin("timRemoteUserGet", ::apache::thrift::protocol::T_CALL, cseqid); ITim_timRemoteUserGet_pargs args; @@ -5253,10 +5253,10 @@ void ITimConcurrentClient::recv_timRemoteUserGet(TimRemoteUserBean& _return, con // the read mutex gets dropped and reacquired as part of waitForWork() // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + ::apache::thrift::async::TConcurrentRecvSentry sentry(this->sync_.get(), seqid); while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { + if(!this->sync_->getPending(fname, mtype, rseqid)) { iprot_->readMessageBegin(fname, mtype, rseqid); } if(seqid == rseqid) { @@ -5297,10 +5297,10 @@ void ITimConcurrentClient::recv_timRemoteUserGet(TimRemoteUserBean& _return, con throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "timRemoteUserGet failed: unknown result"); } // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); + this->sync_->updatePending(fname, mtype, rseqid); // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); + this->sync_->waitForWork(seqid); } // end while(true) } @@ -5312,8 +5312,8 @@ void ITimConcurrentClient::timRemoteUserEdit(TimRemoteUserBean& _return, const T int32_t ITimConcurrentClient::send_timRemoteUserEdit(const Tid& tid, const TimUserBean& ub, const TimAuth& auth) { - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + int32_t cseqid = this->sync_->generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); oprot_->writeMessageBegin("timRemoteUserEdit", ::apache::thrift::protocol::T_CALL, cseqid); ITim_timRemoteUserEdit_pargs args; @@ -5339,10 +5339,10 @@ void ITimConcurrentClient::recv_timRemoteUserEdit(TimRemoteUserBean& _return, co // the read mutex gets dropped and reacquired as part of waitForWork() // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + ::apache::thrift::async::TConcurrentRecvSentry sentry(this->sync_.get(), seqid); while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { + if(!this->sync_->getPending(fname, mtype, rseqid)) { iprot_->readMessageBegin(fname, mtype, rseqid); } if(seqid == rseqid) { @@ -5383,10 +5383,10 @@ void ITimConcurrentClient::recv_timRemoteUserEdit(TimRemoteUserBean& _return, co throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "timRemoteUserEdit failed: unknown result"); } // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); + this->sync_->updatePending(fname, mtype, rseqid); // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); + this->sync_->waitForWork(seqid); } // end while(true) } @@ -5398,8 +5398,8 @@ void ITimConcurrentClient::timResponsePresence(TimResponseBean& _return, const T int32_t ITimConcurrentClient::send_timResponsePresence(const TimPBean& pbean, const TimAuth& auth) { - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + int32_t cseqid = this->sync_->generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); oprot_->writeMessageBegin("timResponsePresence", ::apache::thrift::protocol::T_CALL, cseqid); ITim_timResponsePresence_pargs args; @@ -5424,10 +5424,10 @@ void ITimConcurrentClient::recv_timResponsePresence(TimResponseBean& _return, co // the read mutex gets dropped and reacquired as part of waitForWork() // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + ::apache::thrift::async::TConcurrentRecvSentry sentry(this->sync_.get(), seqid); while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { + if(!this->sync_->getPending(fname, mtype, rseqid)) { iprot_->readMessageBegin(fname, mtype, rseqid); } if(seqid == rseqid) { @@ -5468,10 +5468,10 @@ void ITimConcurrentClient::recv_timResponsePresence(TimResponseBean& _return, co throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "timResponsePresence failed: unknown result"); } // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); + this->sync_->updatePending(fname, mtype, rseqid); // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); + this->sync_->waitForWork(seqid); } // end while(true) } @@ -5483,8 +5483,8 @@ void ITimConcurrentClient::timResponseMessage(TimResponseBean& _return, const Ti int32_t ITimConcurrentClient::send_timResponseMessage(const TimMBean& mbean, const TimAuth& auth) { - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + int32_t cseqid = this->sync_->generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); oprot_->writeMessageBegin("timResponseMessage", ::apache::thrift::protocol::T_CALL, cseqid); ITim_timResponseMessage_pargs args; @@ -5509,10 +5509,10 @@ void ITimConcurrentClient::recv_timResponseMessage(TimResponseBean& _return, con // the read mutex gets dropped and reacquired as part of waitForWork() // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + ::apache::thrift::async::TConcurrentRecvSentry sentry(this->sync_.get(), seqid); while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { + if(!this->sync_->getPending(fname, mtype, rseqid)) { iprot_->readMessageBegin(fname, mtype, rseqid); } if(seqid == rseqid) { @@ -5553,10 +5553,10 @@ void ITimConcurrentClient::recv_timResponseMessage(TimResponseBean& _return, con throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "timResponseMessage failed: unknown result"); } // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); + this->sync_->updatePending(fname, mtype, rseqid); // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); + this->sync_->waitForWork(seqid); } // end while(true) } @@ -5568,8 +5568,8 @@ void ITimConcurrentClient::timResponseMessageIq(TimMBeanList& _return, const Tim int32_t ITimConcurrentClient::send_timResponseMessageIq(const TimMessageIq& timMsgIq, const std::string& iqType, const TimAuth& auth) { - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + int32_t cseqid = this->sync_->generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); oprot_->writeMessageBegin("timResponseMessageIq", ::apache::thrift::protocol::T_CALL, cseqid); ITim_timResponseMessageIq_pargs args; @@ -5595,10 +5595,10 @@ void ITimConcurrentClient::recv_timResponseMessageIq(TimMBeanList& _return, cons // the read mutex gets dropped and reacquired as part of waitForWork() // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + ::apache::thrift::async::TConcurrentRecvSentry sentry(this->sync_.get(), seqid); while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { + if(!this->sync_->getPending(fname, mtype, rseqid)) { iprot_->readMessageBegin(fname, mtype, rseqid); } if(seqid == rseqid) { @@ -5639,10 +5639,10 @@ void ITimConcurrentClient::recv_timResponseMessageIq(TimMBeanList& _return, cons throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "timResponseMessageIq failed: unknown result"); } // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); + this->sync_->updatePending(fname, mtype, rseqid); // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); + this->sync_->waitForWork(seqid); } // end while(true) } @@ -5654,8 +5654,8 @@ void ITimConcurrentClient::timResponsePresenceList(TimResponseBean& _return, con int32_t ITimConcurrentClient::send_timResponsePresenceList(const TimPBeanList& pbeanList, const TimAuth& auth) { - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + int32_t cseqid = this->sync_->generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); oprot_->writeMessageBegin("timResponsePresenceList", ::apache::thrift::protocol::T_CALL, cseqid); ITim_timResponsePresenceList_pargs args; @@ -5680,10 +5680,10 @@ void ITimConcurrentClient::recv_timResponsePresenceList(TimResponseBean& _return // the read mutex gets dropped and reacquired as part of waitForWork() // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + ::apache::thrift::async::TConcurrentRecvSentry sentry(this->sync_.get(), seqid); while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { + if(!this->sync_->getPending(fname, mtype, rseqid)) { iprot_->readMessageBegin(fname, mtype, rseqid); } if(seqid == rseqid) { @@ -5724,10 +5724,10 @@ void ITimConcurrentClient::recv_timResponsePresenceList(TimResponseBean& _return throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "timResponsePresenceList failed: unknown result"); } // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); + this->sync_->updatePending(fname, mtype, rseqid); // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); + this->sync_->waitForWork(seqid); } // end while(true) } @@ -5739,8 +5739,8 @@ void ITimConcurrentClient::timResponseMessageList(TimResponseBean& _return, cons int32_t ITimConcurrentClient::send_timResponseMessageList(const TimMBeanList& mbeanList, const TimAuth& auth) { - int32_t cseqid = this->sync_.generateSeqId(); - ::apache::thrift::async::TConcurrentSendSentry sentry(&this->sync_); + int32_t cseqid = this->sync_->generateSeqId(); + ::apache::thrift::async::TConcurrentSendSentry sentry(this->sync_.get()); oprot_->writeMessageBegin("timResponseMessageList", ::apache::thrift::protocol::T_CALL, cseqid); ITim_timResponseMessageList_pargs args; @@ -5765,10 +5765,10 @@ void ITimConcurrentClient::recv_timResponseMessageList(TimResponseBean& _return, // the read mutex gets dropped and reacquired as part of waitForWork() // The destructor of this sentry wakes up other clients - ::apache::thrift::async::TConcurrentRecvSentry sentry(&this->sync_, seqid); + ::apache::thrift::async::TConcurrentRecvSentry sentry(this->sync_.get(), seqid); while(true) { - if(!this->sync_.getPending(fname, mtype, rseqid)) { + if(!this->sync_->getPending(fname, mtype, rseqid)) { iprot_->readMessageBegin(fname, mtype, rseqid); } if(seqid == rseqid) { @@ -5809,10 +5809,10 @@ void ITimConcurrentClient::recv_timResponseMessageList(TimResponseBean& _return, throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "timResponseMessageList failed: unknown result"); } // seqid != rseqid - this->sync_.updatePending(fname, mtype, rseqid); + this->sync_->updatePending(fname, mtype, rseqid); // this will temporarily unlock the readMutex, and let other clients get work done - this->sync_.waitForWork(seqid); + this->sync_->waitForWork(seqid); } // end while(true) } diff --git a/protocols/gen-cpp/ITim.h b/protocols/gen-cpp/ITim.h index b718dc3..8cbab53 100644 --- a/protocols/gen-cpp/ITim.h +++ b/protocols/gen-cpp/ITim.h @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -9,11 +9,12 @@ #include #include +#include #include "tim_types.h" -#ifdef _WIN32 +#ifdef _MSC_VER #pragma warning( push ) #pragma warning (disable : 4250 ) //inheriting methods via dominance #endif @@ -209,95 +210,95 @@ class ITimIfFactory { virtual ITimIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0; virtual void releaseHandler(ITimIf* /* handler */) = 0; -}; + }; class ITimIfSingletonFactory : virtual public ITimIfFactory { public: - ITimIfSingletonFactory(const boost::shared_ptr& iface) : iface_(iface) {} + ITimIfSingletonFactory(const ::std::shared_ptr& iface) : iface_(iface) {} virtual ~ITimIfSingletonFactory() {} - virtual ITimIf* getHandler(const ::apache::thrift::TConnectionInfo&) { + virtual ITimIf* getHandler(const ::apache::thrift::TConnectionInfo&) override { return iface_.get(); } - virtual void releaseHandler(ITimIf* /* handler */) {} + virtual void releaseHandler(ITimIf* /* handler */) override {} protected: - boost::shared_ptr iface_; + ::std::shared_ptr iface_; }; class ITimNull : virtual public ITimIf { public: virtual ~ITimNull() {} - void timStream(const TimParam& /* param */) { + void timStream(const TimParam& /* param */) override { return; } - void timStarttls() { + void timStarttls() override { return; } - void timLogin(const Tid& /* tid */, const std::string& /* pwd */) { + void timLogin(const Tid& /* tid */, const std::string& /* pwd */) override { return; } - void timAck(const TimAckBean& /* ab */) { + void timAck(const TimAckBean& /* ab */) override { return; } - void timPresence(const TimPBean& /* pbean */) { + void timPresence(const TimPBean& /* pbean */) override { return; } - void timMessage(const TimMBean& /* mbean */) { + void timMessage(const TimMBean& /* mbean */) override { return; } - void timPing(const std::string& /* threadId */) { + void timPing(const std::string& /* threadId */) override { return; } - void timError(const TimError& /* e */) { + void timError(const TimError& /* e */) override { return; } - void timLogout() { + void timLogout() override { return; } - void timRegist(const Tid& /* tid */, const std::string& /* auth */) { + void timRegist(const Tid& /* tid */, const std::string& /* auth */) override { return; } - void timRoser(const TimRoster& /* roster */) { + void timRoser(const TimRoster& /* roster */) override { return; } - void timMessageList(const TimMBeanList& /* mbeanList */) { + void timMessageList(const TimMBeanList& /* mbeanList */) override { return; } - void timPresenceList(const TimPBeanList& /* pbeanList */) { + void timPresenceList(const TimPBeanList& /* pbeanList */) override { return; } - void timMessageIq(const TimMessageIq& /* timMsgIq */, const std::string& /* iqType */) { + void timMessageIq(const TimMessageIq& /* timMsgIq */, const std::string& /* iqType */) override { return; } - void timMessageResult(const TimMBean& /* mbean */) { + void timMessageResult(const TimMBean& /* mbean */) override { return; } - void timProperty(const TimPropertyBean& /* tpb */) { + void timProperty(const TimPropertyBean& /* tpb */) override { return; } - void timRemoteUserAuth(TimRemoteUserBean& /* _return */, const Tid& /* tid */, const std::string& /* pwd */, const TimAuth& /* auth */) { + void timRemoteUserAuth(TimRemoteUserBean& /* _return */, const Tid& /* tid */, const std::string& /* pwd */, const TimAuth& /* auth */) override { return; } - void timRemoteUserGet(TimRemoteUserBean& /* _return */, const Tid& /* tid */, const TimAuth& /* auth */) { + void timRemoteUserGet(TimRemoteUserBean& /* _return */, const Tid& /* tid */, const TimAuth& /* auth */) override { return; } - void timRemoteUserEdit(TimRemoteUserBean& /* _return */, const Tid& /* tid */, const TimUserBean& /* ub */, const TimAuth& /* auth */) { + void timRemoteUserEdit(TimRemoteUserBean& /* _return */, const Tid& /* tid */, const TimUserBean& /* ub */, const TimAuth& /* auth */) override { return; } - void timResponsePresence(TimResponseBean& /* _return */, const TimPBean& /* pbean */, const TimAuth& /* auth */) { + void timResponsePresence(TimResponseBean& /* _return */, const TimPBean& /* pbean */, const TimAuth& /* auth */) override { return; } - void timResponseMessage(TimResponseBean& /* _return */, const TimMBean& /* mbean */, const TimAuth& /* auth */) { + void timResponseMessage(TimResponseBean& /* _return */, const TimMBean& /* mbean */, const TimAuth& /* auth */) override { return; } - void timResponseMessageIq(TimMBeanList& /* _return */, const TimMessageIq& /* timMsgIq */, const std::string& /* iqType */, const TimAuth& /* auth */) { + void timResponseMessageIq(TimMBeanList& /* _return */, const TimMessageIq& /* timMsgIq */, const std::string& /* iqType */, const TimAuth& /* auth */) override { return; } - void timResponsePresenceList(TimResponseBean& /* _return */, const TimPBeanList& /* pbeanList */, const TimAuth& /* auth */) { + void timResponsePresenceList(TimResponseBean& /* _return */, const TimPBeanList& /* pbeanList */, const TimAuth& /* auth */) override { return; } - void timResponseMessageList(TimResponseBean& /* _return */, const TimMBeanList& /* mbeanList */, const TimAuth& /* auth */) { + void timResponseMessageList(TimResponseBean& /* _return */, const TimMBeanList& /* mbeanList */, const TimAuth& /* auth */) override { return; } }; @@ -312,10 +313,10 @@ class ITim_timStream_args { ITim_timStream_args(const ITim_timStream_args&); ITim_timStream_args& operator=(const ITim_timStream_args&); - ITim_timStream_args() { + ITim_timStream_args() noexcept { } - virtual ~ITim_timStream_args() throw(); + virtual ~ITim_timStream_args() noexcept; TimParam param; _ITim_timStream_args__isset __isset; @@ -344,7 +345,7 @@ class ITim_timStream_pargs { public: - virtual ~ITim_timStream_pargs() throw(); + virtual ~ITim_timStream_pargs() noexcept; const TimParam* param; uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -355,12 +356,12 @@ class ITim_timStream_pargs { class ITim_timStarttls_args { public: - ITim_timStarttls_args(const ITim_timStarttls_args&); - ITim_timStarttls_args& operator=(const ITim_timStarttls_args&); - ITim_timStarttls_args() { + ITim_timStarttls_args(const ITim_timStarttls_args&) noexcept; + ITim_timStarttls_args& operator=(const ITim_timStarttls_args&) noexcept; + ITim_timStarttls_args() noexcept { } - virtual ~ITim_timStarttls_args() throw(); + virtual ~ITim_timStarttls_args() noexcept; bool operator == (const ITim_timStarttls_args & /* rhs */) const { @@ -382,7 +383,7 @@ class ITim_timStarttls_pargs { public: - virtual ~ITim_timStarttls_pargs() throw(); + virtual ~ITim_timStarttls_pargs() noexcept; uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -399,10 +400,11 @@ class ITim_timLogin_args { ITim_timLogin_args(const ITim_timLogin_args&); ITim_timLogin_args& operator=(const ITim_timLogin_args&); - ITim_timLogin_args() : pwd() { + ITim_timLogin_args() noexcept + : pwd() { } - virtual ~ITim_timLogin_args() throw(); + virtual ~ITim_timLogin_args() noexcept; Tid tid; std::string pwd; @@ -436,7 +438,7 @@ class ITim_timLogin_pargs { public: - virtual ~ITim_timLogin_pargs() throw(); + virtual ~ITim_timLogin_pargs() noexcept; const Tid* tid; const std::string* pwd; @@ -454,10 +456,10 @@ class ITim_timAck_args { ITim_timAck_args(const ITim_timAck_args&); ITim_timAck_args& operator=(const ITim_timAck_args&); - ITim_timAck_args() { + ITim_timAck_args() noexcept { } - virtual ~ITim_timAck_args() throw(); + virtual ~ITim_timAck_args() noexcept; TimAckBean ab; _ITim_timAck_args__isset __isset; @@ -486,7 +488,7 @@ class ITim_timAck_pargs { public: - virtual ~ITim_timAck_pargs() throw(); + virtual ~ITim_timAck_pargs() noexcept; const TimAckBean* ab; uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -503,10 +505,10 @@ class ITim_timPresence_args { ITim_timPresence_args(const ITim_timPresence_args&); ITim_timPresence_args& operator=(const ITim_timPresence_args&); - ITim_timPresence_args() { + ITim_timPresence_args() noexcept { } - virtual ~ITim_timPresence_args() throw(); + virtual ~ITim_timPresence_args() noexcept; TimPBean pbean; _ITim_timPresence_args__isset __isset; @@ -535,7 +537,7 @@ class ITim_timPresence_pargs { public: - virtual ~ITim_timPresence_pargs() throw(); + virtual ~ITim_timPresence_pargs() noexcept; const TimPBean* pbean; uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -552,10 +554,10 @@ class ITim_timMessage_args { ITim_timMessage_args(const ITim_timMessage_args&); ITim_timMessage_args& operator=(const ITim_timMessage_args&); - ITim_timMessage_args() { + ITim_timMessage_args() noexcept { } - virtual ~ITim_timMessage_args() throw(); + virtual ~ITim_timMessage_args() noexcept; TimMBean mbean; _ITim_timMessage_args__isset __isset; @@ -584,7 +586,7 @@ class ITim_timMessage_pargs { public: - virtual ~ITim_timMessage_pargs() throw(); + virtual ~ITim_timMessage_pargs() noexcept; const TimMBean* mbean; uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -601,10 +603,11 @@ class ITim_timPing_args { ITim_timPing_args(const ITim_timPing_args&); ITim_timPing_args& operator=(const ITim_timPing_args&); - ITim_timPing_args() : threadId() { + ITim_timPing_args() noexcept + : threadId() { } - virtual ~ITim_timPing_args() throw(); + virtual ~ITim_timPing_args() noexcept; std::string threadId; _ITim_timPing_args__isset __isset; @@ -633,7 +636,7 @@ class ITim_timPing_pargs { public: - virtual ~ITim_timPing_pargs() throw(); + virtual ~ITim_timPing_pargs() noexcept; const std::string* threadId; uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -650,10 +653,10 @@ class ITim_timError_args { ITim_timError_args(const ITim_timError_args&); ITim_timError_args& operator=(const ITim_timError_args&); - ITim_timError_args() { + ITim_timError_args() noexcept { } - virtual ~ITim_timError_args() throw(); + virtual ~ITim_timError_args() noexcept; TimError e; _ITim_timError_args__isset __isset; @@ -682,7 +685,7 @@ class ITim_timError_pargs { public: - virtual ~ITim_timError_pargs() throw(); + virtual ~ITim_timError_pargs() noexcept; const TimError* e; uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -693,12 +696,12 @@ class ITim_timError_pargs { class ITim_timLogout_args { public: - ITim_timLogout_args(const ITim_timLogout_args&); - ITim_timLogout_args& operator=(const ITim_timLogout_args&); - ITim_timLogout_args() { + ITim_timLogout_args(const ITim_timLogout_args&) noexcept; + ITim_timLogout_args& operator=(const ITim_timLogout_args&) noexcept; + ITim_timLogout_args() noexcept { } - virtual ~ITim_timLogout_args() throw(); + virtual ~ITim_timLogout_args() noexcept; bool operator == (const ITim_timLogout_args & /* rhs */) const { @@ -720,7 +723,7 @@ class ITim_timLogout_pargs { public: - virtual ~ITim_timLogout_pargs() throw(); + virtual ~ITim_timLogout_pargs() noexcept; uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -737,10 +740,11 @@ class ITim_timRegist_args { ITim_timRegist_args(const ITim_timRegist_args&); ITim_timRegist_args& operator=(const ITim_timRegist_args&); - ITim_timRegist_args() : auth() { + ITim_timRegist_args() noexcept + : auth() { } - virtual ~ITim_timRegist_args() throw(); + virtual ~ITim_timRegist_args() noexcept; Tid tid; std::string auth; @@ -774,7 +778,7 @@ class ITim_timRegist_pargs { public: - virtual ~ITim_timRegist_pargs() throw(); + virtual ~ITim_timRegist_pargs() noexcept; const Tid* tid; const std::string* auth; @@ -792,10 +796,10 @@ class ITim_timRoser_args { ITim_timRoser_args(const ITim_timRoser_args&); ITim_timRoser_args& operator=(const ITim_timRoser_args&); - ITim_timRoser_args() { + ITim_timRoser_args() noexcept { } - virtual ~ITim_timRoser_args() throw(); + virtual ~ITim_timRoser_args() noexcept; TimRoster roster; _ITim_timRoser_args__isset __isset; @@ -824,7 +828,7 @@ class ITim_timRoser_pargs { public: - virtual ~ITim_timRoser_pargs() throw(); + virtual ~ITim_timRoser_pargs() noexcept; const TimRoster* roster; uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -841,10 +845,10 @@ class ITim_timMessageList_args { ITim_timMessageList_args(const ITim_timMessageList_args&); ITim_timMessageList_args& operator=(const ITim_timMessageList_args&); - ITim_timMessageList_args() { + ITim_timMessageList_args() noexcept { } - virtual ~ITim_timMessageList_args() throw(); + virtual ~ITim_timMessageList_args() noexcept; TimMBeanList mbeanList; _ITim_timMessageList_args__isset __isset; @@ -873,7 +877,7 @@ class ITim_timMessageList_pargs { public: - virtual ~ITim_timMessageList_pargs() throw(); + virtual ~ITim_timMessageList_pargs() noexcept; const TimMBeanList* mbeanList; uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -890,10 +894,10 @@ class ITim_timPresenceList_args { ITim_timPresenceList_args(const ITim_timPresenceList_args&); ITim_timPresenceList_args& operator=(const ITim_timPresenceList_args&); - ITim_timPresenceList_args() { + ITim_timPresenceList_args() noexcept { } - virtual ~ITim_timPresenceList_args() throw(); + virtual ~ITim_timPresenceList_args() noexcept; TimPBeanList pbeanList; _ITim_timPresenceList_args__isset __isset; @@ -922,7 +926,7 @@ class ITim_timPresenceList_pargs { public: - virtual ~ITim_timPresenceList_pargs() throw(); + virtual ~ITim_timPresenceList_pargs() noexcept; const TimPBeanList* pbeanList; uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -940,10 +944,11 @@ class ITim_timMessageIq_args { ITim_timMessageIq_args(const ITim_timMessageIq_args&); ITim_timMessageIq_args& operator=(const ITim_timMessageIq_args&); - ITim_timMessageIq_args() : iqType() { + ITim_timMessageIq_args() noexcept + : iqType() { } - virtual ~ITim_timMessageIq_args() throw(); + virtual ~ITim_timMessageIq_args() noexcept; TimMessageIq timMsgIq; std::string iqType; @@ -977,7 +982,7 @@ class ITim_timMessageIq_pargs { public: - virtual ~ITim_timMessageIq_pargs() throw(); + virtual ~ITim_timMessageIq_pargs() noexcept; const TimMessageIq* timMsgIq; const std::string* iqType; @@ -995,10 +1000,10 @@ class ITim_timMessageResult_args { ITim_timMessageResult_args(const ITim_timMessageResult_args&); ITim_timMessageResult_args& operator=(const ITim_timMessageResult_args&); - ITim_timMessageResult_args() { + ITim_timMessageResult_args() noexcept { } - virtual ~ITim_timMessageResult_args() throw(); + virtual ~ITim_timMessageResult_args() noexcept; TimMBean mbean; _ITim_timMessageResult_args__isset __isset; @@ -1027,7 +1032,7 @@ class ITim_timMessageResult_pargs { public: - virtual ~ITim_timMessageResult_pargs() throw(); + virtual ~ITim_timMessageResult_pargs() noexcept; const TimMBean* mbean; uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -1044,10 +1049,10 @@ class ITim_timProperty_args { ITim_timProperty_args(const ITim_timProperty_args&); ITim_timProperty_args& operator=(const ITim_timProperty_args&); - ITim_timProperty_args() { + ITim_timProperty_args() noexcept { } - virtual ~ITim_timProperty_args() throw(); + virtual ~ITim_timProperty_args() noexcept; TimPropertyBean tpb; _ITim_timProperty_args__isset __isset; @@ -1076,7 +1081,7 @@ class ITim_timProperty_pargs { public: - virtual ~ITim_timProperty_pargs() throw(); + virtual ~ITim_timProperty_pargs() noexcept; const TimPropertyBean* tpb; uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; @@ -1095,10 +1100,11 @@ class ITim_timRemoteUserAuth_args { ITim_timRemoteUserAuth_args(const ITim_timRemoteUserAuth_args&); ITim_timRemoteUserAuth_args& operator=(const ITim_timRemoteUserAuth_args&); - ITim_timRemoteUserAuth_args() : pwd() { + ITim_timRemoteUserAuth_args() noexcept + : pwd() { } - virtual ~ITim_timRemoteUserAuth_args() throw(); + virtual ~ITim_timRemoteUserAuth_args() noexcept; Tid tid; std::string pwd; TimAuth auth; @@ -1137,7 +1143,7 @@ class ITim_timRemoteUserAuth_pargs { public: - virtual ~ITim_timRemoteUserAuth_pargs() throw(); + virtual ~ITim_timRemoteUserAuth_pargs() noexcept; const Tid* tid; const std::string* pwd; const TimAuth* auth; @@ -1156,10 +1162,10 @@ class ITim_timRemoteUserAuth_result { ITim_timRemoteUserAuth_result(const ITim_timRemoteUserAuth_result&); ITim_timRemoteUserAuth_result& operator=(const ITim_timRemoteUserAuth_result&); - ITim_timRemoteUserAuth_result() { + ITim_timRemoteUserAuth_result() noexcept { } - virtual ~ITim_timRemoteUserAuth_result() throw(); + virtual ~ITim_timRemoteUserAuth_result() noexcept; TimRemoteUserBean success; _ITim_timRemoteUserAuth_result__isset __isset; @@ -1192,7 +1198,7 @@ class ITim_timRemoteUserAuth_presult { public: - virtual ~ITim_timRemoteUserAuth_presult() throw(); + virtual ~ITim_timRemoteUserAuth_presult() noexcept; TimRemoteUserBean* success; _ITim_timRemoteUserAuth_presult__isset __isset; @@ -1212,10 +1218,10 @@ class ITim_timRemoteUserGet_args { ITim_timRemoteUserGet_args(const ITim_timRemoteUserGet_args&); ITim_timRemoteUserGet_args& operator=(const ITim_timRemoteUserGet_args&); - ITim_timRemoteUserGet_args() { + ITim_timRemoteUserGet_args() noexcept { } - virtual ~ITim_timRemoteUserGet_args() throw(); + virtual ~ITim_timRemoteUserGet_args() noexcept; Tid tid; TimAuth auth; @@ -1249,7 +1255,7 @@ class ITim_timRemoteUserGet_pargs { public: - virtual ~ITim_timRemoteUserGet_pargs() throw(); + virtual ~ITim_timRemoteUserGet_pargs() noexcept; const Tid* tid; const TimAuth* auth; @@ -1267,10 +1273,10 @@ class ITim_timRemoteUserGet_result { ITim_timRemoteUserGet_result(const ITim_timRemoteUserGet_result&); ITim_timRemoteUserGet_result& operator=(const ITim_timRemoteUserGet_result&); - ITim_timRemoteUserGet_result() { + ITim_timRemoteUserGet_result() noexcept { } - virtual ~ITim_timRemoteUserGet_result() throw(); + virtual ~ITim_timRemoteUserGet_result() noexcept; TimRemoteUserBean success; _ITim_timRemoteUserGet_result__isset __isset; @@ -1303,7 +1309,7 @@ class ITim_timRemoteUserGet_presult { public: - virtual ~ITim_timRemoteUserGet_presult() throw(); + virtual ~ITim_timRemoteUserGet_presult() noexcept; TimRemoteUserBean* success; _ITim_timRemoteUserGet_presult__isset __isset; @@ -1324,10 +1330,10 @@ class ITim_timRemoteUserEdit_args { ITim_timRemoteUserEdit_args(const ITim_timRemoteUserEdit_args&); ITim_timRemoteUserEdit_args& operator=(const ITim_timRemoteUserEdit_args&); - ITim_timRemoteUserEdit_args() { + ITim_timRemoteUserEdit_args() noexcept { } - virtual ~ITim_timRemoteUserEdit_args() throw(); + virtual ~ITim_timRemoteUserEdit_args() noexcept; Tid tid; TimUserBean ub; TimAuth auth; @@ -1366,7 +1372,7 @@ class ITim_timRemoteUserEdit_pargs { public: - virtual ~ITim_timRemoteUserEdit_pargs() throw(); + virtual ~ITim_timRemoteUserEdit_pargs() noexcept; const Tid* tid; const TimUserBean* ub; const TimAuth* auth; @@ -1385,10 +1391,10 @@ class ITim_timRemoteUserEdit_result { ITim_timRemoteUserEdit_result(const ITim_timRemoteUserEdit_result&); ITim_timRemoteUserEdit_result& operator=(const ITim_timRemoteUserEdit_result&); - ITim_timRemoteUserEdit_result() { + ITim_timRemoteUserEdit_result() noexcept { } - virtual ~ITim_timRemoteUserEdit_result() throw(); + virtual ~ITim_timRemoteUserEdit_result() noexcept; TimRemoteUserBean success; _ITim_timRemoteUserEdit_result__isset __isset; @@ -1421,7 +1427,7 @@ class ITim_timRemoteUserEdit_presult { public: - virtual ~ITim_timRemoteUserEdit_presult() throw(); + virtual ~ITim_timRemoteUserEdit_presult() noexcept; TimRemoteUserBean* success; _ITim_timRemoteUserEdit_presult__isset __isset; @@ -1441,10 +1447,10 @@ class ITim_timResponsePresence_args { ITim_timResponsePresence_args(const ITim_timResponsePresence_args&); ITim_timResponsePresence_args& operator=(const ITim_timResponsePresence_args&); - ITim_timResponsePresence_args() { + ITim_timResponsePresence_args() noexcept { } - virtual ~ITim_timResponsePresence_args() throw(); + virtual ~ITim_timResponsePresence_args() noexcept; TimPBean pbean; TimAuth auth; @@ -1478,7 +1484,7 @@ class ITim_timResponsePresence_pargs { public: - virtual ~ITim_timResponsePresence_pargs() throw(); + virtual ~ITim_timResponsePresence_pargs() noexcept; const TimPBean* pbean; const TimAuth* auth; @@ -1496,10 +1502,10 @@ class ITim_timResponsePresence_result { ITim_timResponsePresence_result(const ITim_timResponsePresence_result&); ITim_timResponsePresence_result& operator=(const ITim_timResponsePresence_result&); - ITim_timResponsePresence_result() { + ITim_timResponsePresence_result() noexcept { } - virtual ~ITim_timResponsePresence_result() throw(); + virtual ~ITim_timResponsePresence_result() noexcept; TimResponseBean success; _ITim_timResponsePresence_result__isset __isset; @@ -1532,7 +1538,7 @@ class ITim_timResponsePresence_presult { public: - virtual ~ITim_timResponsePresence_presult() throw(); + virtual ~ITim_timResponsePresence_presult() noexcept; TimResponseBean* success; _ITim_timResponsePresence_presult__isset __isset; @@ -1552,10 +1558,10 @@ class ITim_timResponseMessage_args { ITim_timResponseMessage_args(const ITim_timResponseMessage_args&); ITim_timResponseMessage_args& operator=(const ITim_timResponseMessage_args&); - ITim_timResponseMessage_args() { + ITim_timResponseMessage_args() noexcept { } - virtual ~ITim_timResponseMessage_args() throw(); + virtual ~ITim_timResponseMessage_args() noexcept; TimMBean mbean; TimAuth auth; @@ -1589,7 +1595,7 @@ class ITim_timResponseMessage_pargs { public: - virtual ~ITim_timResponseMessage_pargs() throw(); + virtual ~ITim_timResponseMessage_pargs() noexcept; const TimMBean* mbean; const TimAuth* auth; @@ -1607,10 +1613,10 @@ class ITim_timResponseMessage_result { ITim_timResponseMessage_result(const ITim_timResponseMessage_result&); ITim_timResponseMessage_result& operator=(const ITim_timResponseMessage_result&); - ITim_timResponseMessage_result() { + ITim_timResponseMessage_result() noexcept { } - virtual ~ITim_timResponseMessage_result() throw(); + virtual ~ITim_timResponseMessage_result() noexcept; TimResponseBean success; _ITim_timResponseMessage_result__isset __isset; @@ -1643,7 +1649,7 @@ class ITim_timResponseMessage_presult { public: - virtual ~ITim_timResponseMessage_presult() throw(); + virtual ~ITim_timResponseMessage_presult() noexcept; TimResponseBean* success; _ITim_timResponseMessage_presult__isset __isset; @@ -1664,10 +1670,11 @@ class ITim_timResponseMessageIq_args { ITim_timResponseMessageIq_args(const ITim_timResponseMessageIq_args&); ITim_timResponseMessageIq_args& operator=(const ITim_timResponseMessageIq_args&); - ITim_timResponseMessageIq_args() : iqType() { + ITim_timResponseMessageIq_args() noexcept + : iqType() { } - virtual ~ITim_timResponseMessageIq_args() throw(); + virtual ~ITim_timResponseMessageIq_args() noexcept; TimMessageIq timMsgIq; std::string iqType; TimAuth auth; @@ -1706,7 +1713,7 @@ class ITim_timResponseMessageIq_pargs { public: - virtual ~ITim_timResponseMessageIq_pargs() throw(); + virtual ~ITim_timResponseMessageIq_pargs() noexcept; const TimMessageIq* timMsgIq; const std::string* iqType; const TimAuth* auth; @@ -1725,10 +1732,10 @@ class ITim_timResponseMessageIq_result { ITim_timResponseMessageIq_result(const ITim_timResponseMessageIq_result&); ITim_timResponseMessageIq_result& operator=(const ITim_timResponseMessageIq_result&); - ITim_timResponseMessageIq_result() { + ITim_timResponseMessageIq_result() noexcept { } - virtual ~ITim_timResponseMessageIq_result() throw(); + virtual ~ITim_timResponseMessageIq_result() noexcept; TimMBeanList success; _ITim_timResponseMessageIq_result__isset __isset; @@ -1761,7 +1768,7 @@ class ITim_timResponseMessageIq_presult { public: - virtual ~ITim_timResponseMessageIq_presult() throw(); + virtual ~ITim_timResponseMessageIq_presult() noexcept; TimMBeanList* success; _ITim_timResponseMessageIq_presult__isset __isset; @@ -1781,10 +1788,10 @@ class ITim_timResponsePresenceList_args { ITim_timResponsePresenceList_args(const ITim_timResponsePresenceList_args&); ITim_timResponsePresenceList_args& operator=(const ITim_timResponsePresenceList_args&); - ITim_timResponsePresenceList_args() { + ITim_timResponsePresenceList_args() noexcept { } - virtual ~ITim_timResponsePresenceList_args() throw(); + virtual ~ITim_timResponsePresenceList_args() noexcept; TimPBeanList pbeanList; TimAuth auth; @@ -1818,7 +1825,7 @@ class ITim_timResponsePresenceList_pargs { public: - virtual ~ITim_timResponsePresenceList_pargs() throw(); + virtual ~ITim_timResponsePresenceList_pargs() noexcept; const TimPBeanList* pbeanList; const TimAuth* auth; @@ -1836,10 +1843,10 @@ class ITim_timResponsePresenceList_result { ITim_timResponsePresenceList_result(const ITim_timResponsePresenceList_result&); ITim_timResponsePresenceList_result& operator=(const ITim_timResponsePresenceList_result&); - ITim_timResponsePresenceList_result() { + ITim_timResponsePresenceList_result() noexcept { } - virtual ~ITim_timResponsePresenceList_result() throw(); + virtual ~ITim_timResponsePresenceList_result() noexcept; TimResponseBean success; _ITim_timResponsePresenceList_result__isset __isset; @@ -1872,7 +1879,7 @@ class ITim_timResponsePresenceList_presult { public: - virtual ~ITim_timResponsePresenceList_presult() throw(); + virtual ~ITim_timResponsePresenceList_presult() noexcept; TimResponseBean* success; _ITim_timResponsePresenceList_presult__isset __isset; @@ -1892,10 +1899,10 @@ class ITim_timResponseMessageList_args { ITim_timResponseMessageList_args(const ITim_timResponseMessageList_args&); ITim_timResponseMessageList_args& operator=(const ITim_timResponseMessageList_args&); - ITim_timResponseMessageList_args() { + ITim_timResponseMessageList_args() noexcept { } - virtual ~ITim_timResponseMessageList_args() throw(); + virtual ~ITim_timResponseMessageList_args() noexcept; TimMBeanList mbeanList; TimAuth auth; @@ -1929,7 +1936,7 @@ class ITim_timResponseMessageList_pargs { public: - virtual ~ITim_timResponseMessageList_pargs() throw(); + virtual ~ITim_timResponseMessageList_pargs() noexcept; const TimMBeanList* mbeanList; const TimAuth* auth; @@ -1947,10 +1954,10 @@ class ITim_timResponseMessageList_result { ITim_timResponseMessageList_result(const ITim_timResponseMessageList_result&); ITim_timResponseMessageList_result& operator=(const ITim_timResponseMessageList_result&); - ITim_timResponseMessageList_result() { + ITim_timResponseMessageList_result() noexcept { } - virtual ~ITim_timResponseMessageList_result() throw(); + virtual ~ITim_timResponseMessageList_result() noexcept; TimResponseBean success; _ITim_timResponseMessageList_result__isset __isset; @@ -1983,7 +1990,7 @@ class ITim_timResponseMessageList_presult { public: - virtual ~ITim_timResponseMessageList_presult() throw(); + virtual ~ITim_timResponseMessageList_presult() noexcept; TimResponseBean* success; _ITim_timResponseMessageList_presult__isset __isset; @@ -1994,96 +2001,226 @@ class ITim_timResponseMessageList_presult { class ITimClient : virtual public ITimIf { public: - ITimClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + ITimClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { setProtocol(prot); } - ITimClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + ITimClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { setProtocol(iprot,oprot); } private: - void setProtocol(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { setProtocol(prot,prot); } - void setProtocol(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { piprot_=iprot; poprot_=oprot; iprot_ = iprot.get(); oprot_ = oprot.get(); } public: - boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { return piprot_; } - boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { return poprot_; } - void timStream(const TimParam& param); + /** + * 流程开始 + * + * @param param + */ + void timStream(const TimParam& param) override; void send_timStream(const TimParam& param); - void timStarttls(); + /** + * tls协议 + */ + void timStarttls() override; void send_timStarttls(); - void timLogin(const Tid& tid, const std::string& pwd); + /** + * 登陆协议 + * + * @param tid + * @param pwd + */ + void timLogin(const Tid& tid, const std::string& pwd) override; void send_timLogin(const Tid& tid, const std::string& pwd); - void timAck(const TimAckBean& ab); + /** + * 回执信息 + * + * @param ab + */ + void timAck(const TimAckBean& ab) override; void send_timAck(const TimAckBean& ab); - void timPresence(const TimPBean& pbean); + /** + * 广播出席协议或接收广播协议 + * + * @param pbean + */ + void timPresence(const TimPBean& pbean) override; void send_timPresence(const TimPBean& pbean); - void timMessage(const TimMBean& mbean); + /** + * 发送信息或接收信息 + * + * @param mbean + */ + void timMessage(const TimMBean& mbean) override; void send_timMessage(const TimMBean& mbean); - void timPing(const std::string& threadId); + /** + * ping 心跳协议 + * + * @param threadId + */ + void timPing(const std::string& threadId) override; void send_timPing(const std::string& threadId); - void timError(const TimError& e); + /** + * 错误通知 + * + * @param e + */ + void timError(const TimError& e) override; void send_timError(const TimError& e); - void timLogout(); + /** + * 登出协议 + */ + void timLogout() override; void send_timLogout(); - void timRegist(const Tid& tid, const std::string& auth); + /** + * 注册协议 + * + * @param tid + * @param auth + */ + void timRegist(const Tid& tid, const std::string& auth) override; void send_timRegist(const Tid& tid, const std::string& auth); - void timRoser(const TimRoster& roster); + /** + * 花名册 + * + * @param roster + */ + void timRoser(const TimRoster& roster) override; void send_timRoser(const TimRoster& roster); - void timMessageList(const TimMBeanList& mbeanList); + /** + * 发送信息或接收信息列表(合流) + * + * @param mbeanList + */ + void timMessageList(const TimMBeanList& mbeanList) override; void send_timMessageList(const TimMBeanList& mbeanList); - void timPresenceList(const TimPBeanList& pbeanList); + /** + * 发送状态信息列表(合流) + * + * @param pbeanList + */ + void timPresenceList(const TimPBeanList& pbeanList) override; void send_timPresenceList(const TimPBeanList& pbeanList); - void timMessageIq(const TimMessageIq& timMsgIq, const std::string& iqType); + /** + * 信息请求 get请求数据 del删除 + * + * @param timMsgIq + * @param iqType + */ + void timMessageIq(const TimMessageIq& timMsgIq, const std::string& iqType) override; void send_timMessageIq(const TimMessageIq& timMsgIq, const std::string& iqType); - void timMessageResult(const TimMBean& mbean); + /** + * 信息请求 + * + * @param mbean + */ + void timMessageResult(const TimMBean& mbean) override; void send_timMessageResult(const TimMBean& mbean); - void timProperty(const TimPropertyBean& tpb); + /** + * 用户协议属性请求 + * + * @param tpb + */ + void timProperty(const TimPropertyBean& tpb) override; void send_timProperty(const TimPropertyBean& tpb); - void timRemoteUserAuth(TimRemoteUserBean& _return, const Tid& tid, const std::string& pwd, const TimAuth& auth); + /** + * 请求远程验证信息 + * + * @param tid + * @param pwd + * @param auth + */ + void timRemoteUserAuth(TimRemoteUserBean& _return, const Tid& tid, const std::string& pwd, const TimAuth& auth) override; void send_timRemoteUserAuth(const Tid& tid, const std::string& pwd, const TimAuth& auth); void recv_timRemoteUserAuth(TimRemoteUserBean& _return); - void timRemoteUserGet(TimRemoteUserBean& _return, const Tid& tid, const TimAuth& auth); + /** + * 请求远程用户信息 + * + * @param tid + * @param auth + */ + void timRemoteUserGet(TimRemoteUserBean& _return, const Tid& tid, const TimAuth& auth) override; void send_timRemoteUserGet(const Tid& tid, const TimAuth& auth); void recv_timRemoteUserGet(TimRemoteUserBean& _return); - void timRemoteUserEdit(TimRemoteUserBean& _return, const Tid& tid, const TimUserBean& ub, const TimAuth& auth); + /** + * 编辑远程用户信息 + * + * @param tid + * @param ub + * @param auth + */ + void timRemoteUserEdit(TimRemoteUserBean& _return, const Tid& tid, const TimUserBean& ub, const TimAuth& auth) override; void send_timRemoteUserEdit(const Tid& tid, const TimUserBean& ub, const TimAuth& auth); void recv_timRemoteUserEdit(TimRemoteUserBean& _return); - void timResponsePresence(TimResponseBean& _return, const TimPBean& pbean, const TimAuth& auth); + /** + * 广播出席协议或接收广播协议 + * + * @param pbean + * @param auth + */ + void timResponsePresence(TimResponseBean& _return, const TimPBean& pbean, const TimAuth& auth) override; void send_timResponsePresence(const TimPBean& pbean, const TimAuth& auth); void recv_timResponsePresence(TimResponseBean& _return); - void timResponseMessage(TimResponseBean& _return, const TimMBean& mbean, const TimAuth& auth); + /** + * 发送信息或接收信息 + * + * @param mbean + * @param auth + */ + void timResponseMessage(TimResponseBean& _return, const TimMBean& mbean, const TimAuth& auth) override; void send_timResponseMessage(const TimMBean& mbean, const TimAuth& auth); void recv_timResponseMessage(TimResponseBean& _return); - void timResponseMessageIq(TimMBeanList& _return, const TimMessageIq& timMsgIq, const std::string& iqType, const TimAuth& auth); + /** + * 信息请求 get请求数据 del删除(辅助接口) + * + * @param timMsgIq + * @param iqType + * @param auth + */ + void timResponseMessageIq(TimMBeanList& _return, const TimMessageIq& timMsgIq, const std::string& iqType, const TimAuth& auth) override; void send_timResponseMessageIq(const TimMessageIq& timMsgIq, const std::string& iqType, const TimAuth& auth); void recv_timResponseMessageIq(TimMBeanList& _return); - void timResponsePresenceList(TimResponseBean& _return, const TimPBeanList& pbeanList, const TimAuth& auth); + /** + * 广播出席协议或接收广播协议 + * + * @param pbeanList + * @param auth + */ + void timResponsePresenceList(TimResponseBean& _return, const TimPBeanList& pbeanList, const TimAuth& auth) override; void send_timResponsePresenceList(const TimPBeanList& pbeanList, const TimAuth& auth); void recv_timResponsePresenceList(TimResponseBean& _return); - void timResponseMessageList(TimResponseBean& _return, const TimMBeanList& mbeanList, const TimAuth& auth); + /** + * 发送信息或接收信息 + * + * @param mbeanList + * @param auth + */ + void timResponseMessageList(TimResponseBean& _return, const TimMBeanList& mbeanList, const TimAuth& auth) override; void send_timResponseMessageList(const TimMBeanList& mbeanList, const TimAuth& auth); void recv_timResponseMessageList(TimResponseBean& _return); protected: - boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_; - boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_; + std::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_; + std::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_; ::apache::thrift::protocol::TProtocol* iprot_; ::apache::thrift::protocol::TProtocol* oprot_; }; class ITimProcessor : public ::apache::thrift::TDispatchProcessor { protected: - boost::shared_ptr iface_; - virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext); + ::std::shared_ptr iface_; + virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext) override; private: typedef void (ITimProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*); typedef std::map ProcessMap; @@ -2113,7 +2250,7 @@ class ITimProcessor : public ::apache::thrift::TDispatchProcessor { void process_timResponsePresenceList(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); void process_timResponseMessageList(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext); public: - ITimProcessor(boost::shared_ptr iface) : + ITimProcessor(::std::shared_ptr iface) : iface_(iface) { processMap_["timStream"] = &ITimProcessor::process_timStream; processMap_["timStarttls"] = &ITimProcessor::process_timStarttls; @@ -2146,28 +2283,33 @@ class ITimProcessor : public ::apache::thrift::TDispatchProcessor { class ITimProcessorFactory : public ::apache::thrift::TProcessorFactory { public: - ITimProcessorFactory(const ::boost::shared_ptr< ITimIfFactory >& handlerFactory) : + ITimProcessorFactory(const ::std::shared_ptr< ITimIfFactory >& handlerFactory) noexcept : handlerFactory_(handlerFactory) {} - ::boost::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo); + ::std::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo) override; protected: - ::boost::shared_ptr< ITimIfFactory > handlerFactory_; + ::std::shared_ptr< ITimIfFactory > handlerFactory_; }; class ITimMultiface : virtual public ITimIf { public: - ITimMultiface(std::vector >& ifaces) : ifaces_(ifaces) { + ITimMultiface(std::vector >& ifaces) : ifaces_(ifaces) { } virtual ~ITimMultiface() {} protected: - std::vector > ifaces_; + std::vector > ifaces_; ITimMultiface() {} - void add(boost::shared_ptr iface) { + void add(::std::shared_ptr iface) { ifaces_.push_back(iface); } public: - void timStream(const TimParam& param) { + /** + * 流程开始 + * + * @param param + */ + void timStream(const TimParam& param) override { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { @@ -2176,7 +2318,10 @@ class ITimMultiface : virtual public ITimIf { ifaces_[i]->timStream(param); } - void timStarttls() { + /** + * tls协议 + */ + void timStarttls() override { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { @@ -2185,7 +2330,13 @@ class ITimMultiface : virtual public ITimIf { ifaces_[i]->timStarttls(); } - void timLogin(const Tid& tid, const std::string& pwd) { + /** + * 登陆协议 + * + * @param tid + * @param pwd + */ + void timLogin(const Tid& tid, const std::string& pwd) override { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { @@ -2194,7 +2345,12 @@ class ITimMultiface : virtual public ITimIf { ifaces_[i]->timLogin(tid, pwd); } - void timAck(const TimAckBean& ab) { + /** + * 回执信息 + * + * @param ab + */ + void timAck(const TimAckBean& ab) override { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { @@ -2203,7 +2359,12 @@ class ITimMultiface : virtual public ITimIf { ifaces_[i]->timAck(ab); } - void timPresence(const TimPBean& pbean) { + /** + * 广播出席协议或接收广播协议 + * + * @param pbean + */ + void timPresence(const TimPBean& pbean) override { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { @@ -2212,7 +2373,12 @@ class ITimMultiface : virtual public ITimIf { ifaces_[i]->timPresence(pbean); } - void timMessage(const TimMBean& mbean) { + /** + * 发送信息或接收信息 + * + * @param mbean + */ + void timMessage(const TimMBean& mbean) override { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { @@ -2221,7 +2387,12 @@ class ITimMultiface : virtual public ITimIf { ifaces_[i]->timMessage(mbean); } - void timPing(const std::string& threadId) { + /** + * ping 心跳协议 + * + * @param threadId + */ + void timPing(const std::string& threadId) override { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { @@ -2230,7 +2401,12 @@ class ITimMultiface : virtual public ITimIf { ifaces_[i]->timPing(threadId); } - void timError(const TimError& e) { + /** + * 错误通知 + * + * @param e + */ + void timError(const TimError& e) override { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { @@ -2239,7 +2415,10 @@ class ITimMultiface : virtual public ITimIf { ifaces_[i]->timError(e); } - void timLogout() { + /** + * 登出协议 + */ + void timLogout() override { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { @@ -2248,7 +2427,13 @@ class ITimMultiface : virtual public ITimIf { ifaces_[i]->timLogout(); } - void timRegist(const Tid& tid, const std::string& auth) { + /** + * 注册协议 + * + * @param tid + * @param auth + */ + void timRegist(const Tid& tid, const std::string& auth) override { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { @@ -2257,7 +2442,12 @@ class ITimMultiface : virtual public ITimIf { ifaces_[i]->timRegist(tid, auth); } - void timRoser(const TimRoster& roster) { + /** + * 花名册 + * + * @param roster + */ + void timRoser(const TimRoster& roster) override { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { @@ -2266,7 +2456,12 @@ class ITimMultiface : virtual public ITimIf { ifaces_[i]->timRoser(roster); } - void timMessageList(const TimMBeanList& mbeanList) { + /** + * 发送信息或接收信息列表(合流) + * + * @param mbeanList + */ + void timMessageList(const TimMBeanList& mbeanList) override { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { @@ -2275,7 +2470,12 @@ class ITimMultiface : virtual public ITimIf { ifaces_[i]->timMessageList(mbeanList); } - void timPresenceList(const TimPBeanList& pbeanList) { + /** + * 发送状态信息列表(合流) + * + * @param pbeanList + */ + void timPresenceList(const TimPBeanList& pbeanList) override { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { @@ -2284,7 +2484,13 @@ class ITimMultiface : virtual public ITimIf { ifaces_[i]->timPresenceList(pbeanList); } - void timMessageIq(const TimMessageIq& timMsgIq, const std::string& iqType) { + /** + * 信息请求 get请求数据 del删除 + * + * @param timMsgIq + * @param iqType + */ + void timMessageIq(const TimMessageIq& timMsgIq, const std::string& iqType) override { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { @@ -2293,7 +2499,12 @@ class ITimMultiface : virtual public ITimIf { ifaces_[i]->timMessageIq(timMsgIq, iqType); } - void timMessageResult(const TimMBean& mbean) { + /** + * 信息请求 + * + * @param mbean + */ + void timMessageResult(const TimMBean& mbean) override { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { @@ -2302,7 +2513,12 @@ class ITimMultiface : virtual public ITimIf { ifaces_[i]->timMessageResult(mbean); } - void timProperty(const TimPropertyBean& tpb) { + /** + * 用户协议属性请求 + * + * @param tpb + */ + void timProperty(const TimPropertyBean& tpb) override { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { @@ -2311,7 +2527,14 @@ class ITimMultiface : virtual public ITimIf { ifaces_[i]->timProperty(tpb); } - void timRemoteUserAuth(TimRemoteUserBean& _return, const Tid& tid, const std::string& pwd, const TimAuth& auth) { + /** + * 请求远程验证信息 + * + * @param tid + * @param pwd + * @param auth + */ + void timRemoteUserAuth(TimRemoteUserBean& _return, const Tid& tid, const std::string& pwd, const TimAuth& auth) override { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { @@ -2321,7 +2544,13 @@ class ITimMultiface : virtual public ITimIf { return; } - void timRemoteUserGet(TimRemoteUserBean& _return, const Tid& tid, const TimAuth& auth) { + /** + * 请求远程用户信息 + * + * @param tid + * @param auth + */ + void timRemoteUserGet(TimRemoteUserBean& _return, const Tid& tid, const TimAuth& auth) override { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { @@ -2331,7 +2560,14 @@ class ITimMultiface : virtual public ITimIf { return; } - void timRemoteUserEdit(TimRemoteUserBean& _return, const Tid& tid, const TimUserBean& ub, const TimAuth& auth) { + /** + * 编辑远程用户信息 + * + * @param tid + * @param ub + * @param auth + */ + void timRemoteUserEdit(TimRemoteUserBean& _return, const Tid& tid, const TimUserBean& ub, const TimAuth& auth) override { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { @@ -2341,7 +2577,13 @@ class ITimMultiface : virtual public ITimIf { return; } - void timResponsePresence(TimResponseBean& _return, const TimPBean& pbean, const TimAuth& auth) { + /** + * 广播出席协议或接收广播协议 + * + * @param pbean + * @param auth + */ + void timResponsePresence(TimResponseBean& _return, const TimPBean& pbean, const TimAuth& auth) override { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { @@ -2351,7 +2593,13 @@ class ITimMultiface : virtual public ITimIf { return; } - void timResponseMessage(TimResponseBean& _return, const TimMBean& mbean, const TimAuth& auth) { + /** + * 发送信息或接收信息 + * + * @param mbean + * @param auth + */ + void timResponseMessage(TimResponseBean& _return, const TimMBean& mbean, const TimAuth& auth) override { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { @@ -2361,7 +2609,14 @@ class ITimMultiface : virtual public ITimIf { return; } - void timResponseMessageIq(TimMBeanList& _return, const TimMessageIq& timMsgIq, const std::string& iqType, const TimAuth& auth) { + /** + * 信息请求 get请求数据 del删除(辅助接口) + * + * @param timMsgIq + * @param iqType + * @param auth + */ + void timResponseMessageIq(TimMBeanList& _return, const TimMessageIq& timMsgIq, const std::string& iqType, const TimAuth& auth) override { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { @@ -2371,7 +2626,13 @@ class ITimMultiface : virtual public ITimIf { return; } - void timResponsePresenceList(TimResponseBean& _return, const TimPBeanList& pbeanList, const TimAuth& auth) { + /** + * 广播出席协议或接收广播协议 + * + * @param pbeanList + * @param auth + */ + void timResponsePresenceList(TimResponseBean& _return, const TimPBeanList& pbeanList, const TimAuth& auth) override { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { @@ -2381,7 +2642,13 @@ class ITimMultiface : virtual public ITimIf { return; } - void timResponseMessageList(TimResponseBean& _return, const TimMBeanList& mbeanList, const TimAuth& auth) { + /** + * 发送信息或接收信息 + * + * @param mbeanList + * @param auth + */ + void timResponseMessageList(TimResponseBean& _return, const TimMBeanList& mbeanList, const TimAuth& auth) override { size_t sz = ifaces_.size(); size_t i = 0; for (; i < (sz - 1); ++i) { @@ -2398,94 +2665,226 @@ class ITimMultiface : virtual public ITimIf { // only be used when you need to share a connection among multiple threads class ITimConcurrentClient : virtual public ITimIf { public: - ITimConcurrentClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + ITimConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot, std::shared_ptr< ::apache::thrift::async::TConcurrentClientSyncInfo> sync) : sync_(sync) +{ setProtocol(prot); } - ITimConcurrentClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + ITimConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot, std::shared_ptr< ::apache::thrift::async::TConcurrentClientSyncInfo> sync) : sync_(sync) +{ setProtocol(iprot,oprot); } private: - void setProtocol(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) { setProtocol(prot,prot); } - void setProtocol(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { + void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) { piprot_=iprot; poprot_=oprot; iprot_ = iprot.get(); oprot_ = oprot.get(); } public: - boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { return piprot_; } - boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { return poprot_; } - void timStream(const TimParam& param); + /** + * 流程开始 + * + * @param param + */ + void timStream(const TimParam& param) override; void send_timStream(const TimParam& param); - void timStarttls(); + /** + * tls协议 + */ + void timStarttls() override; void send_timStarttls(); - void timLogin(const Tid& tid, const std::string& pwd); + /** + * 登陆协议 + * + * @param tid + * @param pwd + */ + void timLogin(const Tid& tid, const std::string& pwd) override; void send_timLogin(const Tid& tid, const std::string& pwd); - void timAck(const TimAckBean& ab); + /** + * 回执信息 + * + * @param ab + */ + void timAck(const TimAckBean& ab) override; void send_timAck(const TimAckBean& ab); - void timPresence(const TimPBean& pbean); + /** + * 广播出席协议或接收广播协议 + * + * @param pbean + */ + void timPresence(const TimPBean& pbean) override; void send_timPresence(const TimPBean& pbean); - void timMessage(const TimMBean& mbean); + /** + * 发送信息或接收信息 + * + * @param mbean + */ + void timMessage(const TimMBean& mbean) override; void send_timMessage(const TimMBean& mbean); - void timPing(const std::string& threadId); + /** + * ping 心跳协议 + * + * @param threadId + */ + void timPing(const std::string& threadId) override; void send_timPing(const std::string& threadId); - void timError(const TimError& e); + /** + * 错误通知 + * + * @param e + */ + void timError(const TimError& e) override; void send_timError(const TimError& e); - void timLogout(); + /** + * 登出协议 + */ + void timLogout() override; void send_timLogout(); - void timRegist(const Tid& tid, const std::string& auth); + /** + * 注册协议 + * + * @param tid + * @param auth + */ + void timRegist(const Tid& tid, const std::string& auth) override; void send_timRegist(const Tid& tid, const std::string& auth); - void timRoser(const TimRoster& roster); + /** + * 花名册 + * + * @param roster + */ + void timRoser(const TimRoster& roster) override; void send_timRoser(const TimRoster& roster); - void timMessageList(const TimMBeanList& mbeanList); + /** + * 发送信息或接收信息列表(合流) + * + * @param mbeanList + */ + void timMessageList(const TimMBeanList& mbeanList) override; void send_timMessageList(const TimMBeanList& mbeanList); - void timPresenceList(const TimPBeanList& pbeanList); + /** + * 发送状态信息列表(合流) + * + * @param pbeanList + */ + void timPresenceList(const TimPBeanList& pbeanList) override; void send_timPresenceList(const TimPBeanList& pbeanList); - void timMessageIq(const TimMessageIq& timMsgIq, const std::string& iqType); + /** + * 信息请求 get请求数据 del删除 + * + * @param timMsgIq + * @param iqType + */ + void timMessageIq(const TimMessageIq& timMsgIq, const std::string& iqType) override; void send_timMessageIq(const TimMessageIq& timMsgIq, const std::string& iqType); - void timMessageResult(const TimMBean& mbean); + /** + * 信息请求 + * + * @param mbean + */ + void timMessageResult(const TimMBean& mbean) override; void send_timMessageResult(const TimMBean& mbean); - void timProperty(const TimPropertyBean& tpb); + /** + * 用户协议属性请求 + * + * @param tpb + */ + void timProperty(const TimPropertyBean& tpb) override; void send_timProperty(const TimPropertyBean& tpb); - void timRemoteUserAuth(TimRemoteUserBean& _return, const Tid& tid, const std::string& pwd, const TimAuth& auth); + /** + * 请求远程验证信息 + * + * @param tid + * @param pwd + * @param auth + */ + void timRemoteUserAuth(TimRemoteUserBean& _return, const Tid& tid, const std::string& pwd, const TimAuth& auth) override; int32_t send_timRemoteUserAuth(const Tid& tid, const std::string& pwd, const TimAuth& auth); void recv_timRemoteUserAuth(TimRemoteUserBean& _return, const int32_t seqid); - void timRemoteUserGet(TimRemoteUserBean& _return, const Tid& tid, const TimAuth& auth); + /** + * 请求远程用户信息 + * + * @param tid + * @param auth + */ + void timRemoteUserGet(TimRemoteUserBean& _return, const Tid& tid, const TimAuth& auth) override; int32_t send_timRemoteUserGet(const Tid& tid, const TimAuth& auth); void recv_timRemoteUserGet(TimRemoteUserBean& _return, const int32_t seqid); - void timRemoteUserEdit(TimRemoteUserBean& _return, const Tid& tid, const TimUserBean& ub, const TimAuth& auth); + /** + * 编辑远程用户信息 + * + * @param tid + * @param ub + * @param auth + */ + void timRemoteUserEdit(TimRemoteUserBean& _return, const Tid& tid, const TimUserBean& ub, const TimAuth& auth) override; int32_t send_timRemoteUserEdit(const Tid& tid, const TimUserBean& ub, const TimAuth& auth); void recv_timRemoteUserEdit(TimRemoteUserBean& _return, const int32_t seqid); - void timResponsePresence(TimResponseBean& _return, const TimPBean& pbean, const TimAuth& auth); + /** + * 广播出席协议或接收广播协议 + * + * @param pbean + * @param auth + */ + void timResponsePresence(TimResponseBean& _return, const TimPBean& pbean, const TimAuth& auth) override; int32_t send_timResponsePresence(const TimPBean& pbean, const TimAuth& auth); void recv_timResponsePresence(TimResponseBean& _return, const int32_t seqid); - void timResponseMessage(TimResponseBean& _return, const TimMBean& mbean, const TimAuth& auth); + /** + * 发送信息或接收信息 + * + * @param mbean + * @param auth + */ + void timResponseMessage(TimResponseBean& _return, const TimMBean& mbean, const TimAuth& auth) override; int32_t send_timResponseMessage(const TimMBean& mbean, const TimAuth& auth); void recv_timResponseMessage(TimResponseBean& _return, const int32_t seqid); - void timResponseMessageIq(TimMBeanList& _return, const TimMessageIq& timMsgIq, const std::string& iqType, const TimAuth& auth); + /** + * 信息请求 get请求数据 del删除(辅助接口) + * + * @param timMsgIq + * @param iqType + * @param auth + */ + void timResponseMessageIq(TimMBeanList& _return, const TimMessageIq& timMsgIq, const std::string& iqType, const TimAuth& auth) override; int32_t send_timResponseMessageIq(const TimMessageIq& timMsgIq, const std::string& iqType, const TimAuth& auth); void recv_timResponseMessageIq(TimMBeanList& _return, const int32_t seqid); - void timResponsePresenceList(TimResponseBean& _return, const TimPBeanList& pbeanList, const TimAuth& auth); + /** + * 广播出席协议或接收广播协议 + * + * @param pbeanList + * @param auth + */ + void timResponsePresenceList(TimResponseBean& _return, const TimPBeanList& pbeanList, const TimAuth& auth) override; int32_t send_timResponsePresenceList(const TimPBeanList& pbeanList, const TimAuth& auth); void recv_timResponsePresenceList(TimResponseBean& _return, const int32_t seqid); - void timResponseMessageList(TimResponseBean& _return, const TimMBeanList& mbeanList, const TimAuth& auth); + /** + * 发送信息或接收信息 + * + * @param mbeanList + * @param auth + */ + void timResponseMessageList(TimResponseBean& _return, const TimMBeanList& mbeanList, const TimAuth& auth) override; int32_t send_timResponseMessageList(const TimMBeanList& mbeanList, const TimAuth& auth); void recv_timResponseMessageList(TimResponseBean& _return, const int32_t seqid); protected: - boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_; - boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_; + std::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_; + std::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_; ::apache::thrift::protocol::TProtocol* iprot_; ::apache::thrift::protocol::TProtocol* oprot_; - ::apache::thrift::async::TConcurrentClientSyncInfo sync_; + std::shared_ptr< ::apache::thrift::async::TConcurrentClientSyncInfo> sync_; }; -#ifdef _WIN32 +#ifdef _MSC_VER #pragma warning( pop ) #endif diff --git a/protocols/gen-cpp/ITim_server.skeleton.cpp b/protocols/gen-cpp/ITim_server.skeleton.cpp index 344cc32..92f4863 100644 --- a/protocols/gen-cpp/ITim_server.skeleton.cpp +++ b/protocols/gen-cpp/ITim_server.skeleton.cpp @@ -12,8 +12,6 @@ using namespace ::apache::thrift::protocol; using namespace ::apache::thrift::transport; using namespace ::apache::thrift::server; -using boost::shared_ptr; - class ITimHandler : virtual public ITimIf { public: ITimHandler() { @@ -274,11 +272,11 @@ class ITimHandler : virtual public ITimIf { int main(int argc, char **argv) { int port = 9090; - shared_ptr handler(new ITimHandler()); - shared_ptr processor(new ITimProcessor(handler)); - shared_ptr serverTransport(new TServerSocket(port)); - shared_ptr transportFactory(new TBufferedTransportFactory()); - shared_ptr protocolFactory(new TBinaryProtocolFactory()); + ::std::shared_ptr handler(new ITimHandler()); + ::std::shared_ptr processor(new ITimProcessor(handler)); + ::std::shared_ptr serverTransport(new TServerSocket(port)); + ::std::shared_ptr transportFactory(new TBufferedTransportFactory()); + ::std::shared_ptr protocolFactory(new TBinaryProtocolFactory()); TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory); server.serve(); diff --git a/protocols/gen-cpp/tim_constants.cpp b/protocols/gen-cpp/tim_constants.cpp index b531855..1e5766b 100644 --- a/protocols/gen-cpp/tim_constants.cpp +++ b/protocols/gen-cpp/tim_constants.cpp @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated diff --git a/protocols/gen-cpp/tim_constants.h b/protocols/gen-cpp/tim_constants.h index e1c7e40..f8bef54 100644 --- a/protocols/gen-cpp/tim_constants.h +++ b/protocols/gen-cpp/tim_constants.h @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated diff --git a/protocols/gen-cpp/tim_types.cpp b/protocols/gen-cpp/tim_types.cpp index 0c45222..ad9a779 100644 --- a/protocols/gen-cpp/tim_types.cpp +++ b/protocols/gen-cpp/tim_types.cpp @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -14,7 +14,7 @@ -TimError::~TimError() throw() { +TimError::~TimError() noexcept { } @@ -27,10 +27,16 @@ void TimError::__set_errMsg(const std::string& val) { this->errMsg = val; __isset.errMsg = true; } +std::ostream& operator<<(std::ostream& out, const TimError& obj) +{ + obj.printTo(out); + return out; +} + uint32_t TimError::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -79,7 +85,7 @@ uint32_t TimError::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t TimError::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TimError"); if (this->__isset.errCode) { @@ -124,7 +130,7 @@ void TimError::printTo(std::ostream& out) const { } -TimNode::~TimNode() throw() { +TimNode::~TimNode() noexcept { } @@ -137,10 +143,16 @@ void TimNode::__set_value(const std::string& val) { this->value = val; __isset.value = true; } +std::ostream& operator<<(std::ostream& out, const TimNode& obj) +{ + obj.printTo(out); + return out; +} + uint32_t TimNode::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -189,7 +201,7 @@ uint32_t TimNode::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t TimNode::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TimNode"); if (this->__isset.key) { @@ -234,7 +246,7 @@ void TimNode::printTo(std::ostream& out) const { } -TimAckBean::~TimAckBean() throw() { +TimAckBean::~TimAckBean() noexcept { } @@ -267,10 +279,16 @@ void TimAckBean::__set_extraMap(const std::map & val) this->extraMap = val; __isset.extraMap = true; } +std::ostream& operator<<(std::ostream& out, const TimAckBean& obj) +{ + obj.printTo(out); + return out; +} + uint32_t TimAckBean::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -378,7 +396,7 @@ uint32_t TimAckBean::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t TimAckBean::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TimAckBean"); if (this->__isset.id) { @@ -476,7 +494,7 @@ void TimAckBean::printTo(std::ostream& out) const { } -TimHBean::~TimHBean() throw() { +TimHBean::~TimHBean() noexcept { } @@ -492,10 +510,16 @@ __isset.platform = true; void TimHBean::__set_version(const int16_t val) { this->version = val; } +std::ostream& operator<<(std::ostream& out, const TimHBean& obj) +{ + obj.printTo(out); + return out; +} + uint32_t TimHBean::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -558,7 +582,7 @@ uint32_t TimHBean::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t TimHBean::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TimHBean"); xfer += oprot->writeFieldBegin("chl", ::apache::thrift::protocol::T_I32, 1); @@ -587,13 +611,13 @@ void swap(TimHBean &a, TimHBean &b) { swap(a.__isset, b.__isset); } -TimHBean::TimHBean(const TimHBean& other20) { +TimHBean::TimHBean(const TimHBean& other20) noexcept { chl = other20.chl; platform = other20.platform; version = other20.version; __isset = other20.__isset; } -TimHBean& TimHBean::operator=(const TimHBean& other21) { +TimHBean& TimHBean::operator=(const TimHBean& other21) noexcept { chl = other21.chl; platform = other21.platform; version = other21.version; @@ -610,7 +634,7 @@ void TimHBean::printTo(std::ostream& out) const { } -TimParam::~TimParam() throw() { +TimParam::~TimParam() noexcept { } @@ -648,10 +672,16 @@ void TimParam::__set_tls(const std::string& val) { this->tls = val; __isset.tls = true; } +std::ostream& operator<<(std::ostream& out, const TimParam& obj) +{ + obj.printTo(out); + return out; +} + uint32_t TimParam::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -767,7 +797,7 @@ uint32_t TimParam::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t TimParam::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TimParam"); if (this->__isset.timestamp) { @@ -874,7 +904,7 @@ void TimParam::printTo(std::ostream& out) const { } -TimTime::~TimTime() throw() { +TimTime::~TimTime() noexcept { } @@ -887,10 +917,16 @@ void TimTime::__set_formattime(const std::string& val) { this->formattime = val; __isset.formattime = true; } +std::ostream& operator<<(std::ostream& out, const TimTime& obj) +{ + obj.printTo(out); + return out; +} + uint32_t TimTime::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -939,7 +975,7 @@ uint32_t TimTime::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t TimTime::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TimTime"); if (this->__isset.timestamp) { @@ -984,7 +1020,7 @@ void TimTime::printTo(std::ostream& out) const { } -TimArea::~TimArea() throw() { +TimArea::~TimArea() noexcept { } @@ -1012,10 +1048,16 @@ void TimArea::__set_extraMap(const std::map & val) { this->extraMap = val; __isset.extraMap = true; } +std::ostream& operator<<(std::ostream& out, const TimArea& obj) +{ + obj.printTo(out); + return out; +} + uint32_t TimArea::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -1115,7 +1157,7 @@ uint32_t TimArea::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t TimArea::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TimArea"); if (this->__isset.country) { @@ -1204,7 +1246,7 @@ void TimArea::printTo(std::ostream& out) const { } -Tid::~Tid() throw() { +Tid::~Tid() noexcept { } @@ -1236,10 +1278,16 @@ void Tid::__set_extraMap(const std::map & val) { this->extraMap = val; __isset.extraMap = true; } +std::ostream& operator<<(std::ostream& out, const Tid& obj) +{ + obj.printTo(out); + return out; +} + uint32_t Tid::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -1350,7 +1398,7 @@ uint32_t Tid::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t Tid::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("Tid"); xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); @@ -1447,7 +1495,7 @@ void Tid::printTo(std::ostream& out) const { } -TimUserBean::~TimUserBean() throw() { +TimUserBean::~TimUserBean() noexcept { } @@ -1505,10 +1553,16 @@ void TimUserBean::__set_extraMap(const std::map & val) this->extraMap = val; __isset.extraMap = true; } +std::ostream& operator<<(std::ostream& out, const TimUserBean& obj) +{ + obj.printTo(out); + return out; +} + uint32_t TimUserBean::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -1668,7 +1722,7 @@ uint32_t TimUserBean::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t TimUserBean::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TimUserBean"); if (this->__isset.tid) { @@ -1819,7 +1873,7 @@ void TimUserBean::printTo(std::ostream& out) const { } -TimRoom::~TimRoom() throw() { +TimRoom::~TimRoom() noexcept { } @@ -1872,10 +1926,16 @@ void TimRoom::__set_extraMap(const std::map & val) { this->extraMap = val; __isset.extraMap = true; } +std::ostream& operator<<(std::ostream& out, const TimRoom& obj) +{ + obj.printTo(out); + return out; +} + uint32_t TimRoom::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -2039,7 +2099,7 @@ uint32_t TimRoom::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t TimRoom::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TimRoom"); if (this->__isset.tid) { @@ -2189,7 +2249,7 @@ void TimRoom::printTo(std::ostream& out) const { } -TimPBean::~TimPBean() throw() { +TimPBean::~TimPBean() noexcept { } @@ -2246,10 +2306,16 @@ void TimPBean::__set_extraMap(const std::map & val) { this->extraMap = val; __isset.extraMap = true; } +std::ostream& operator<<(std::ostream& out, const TimPBean& obj) +{ + obj.printTo(out); + return out; +} + uint32_t TimPBean::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -2400,7 +2466,7 @@ uint32_t TimPBean::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t TimPBean::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TimPBean"); xfer += oprot->writeFieldBegin("threadId", ::apache::thrift::protocol::T_STRING, 1); @@ -2542,7 +2608,7 @@ void TimPBean::printTo(std::ostream& out) const { } -TimMBean::~TimMBean() throw() { +TimMBean::~TimMBean() noexcept { } @@ -2614,10 +2680,16 @@ void TimMBean::__set_readstatus(const int16_t val) { this->readstatus = val; __isset.readstatus = true; } +std::ostream& operator<<(std::ostream& out, const TimMBean& obj) +{ + obj.printTo(out); + return out; +} + uint32_t TimMBean::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -2792,7 +2864,7 @@ uint32_t TimMBean::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t TimMBean::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TimMBean"); xfer += oprot->writeFieldBegin("threadId", ::apache::thrift::protocol::T_STRING, 1); @@ -2961,7 +3033,7 @@ void TimMBean::printTo(std::ostream& out) const { } -TimIqBean::~TimIqBean() throw() { +TimIqBean::~TimIqBean() noexcept { } @@ -2998,10 +3070,16 @@ void TimIqBean::__set_extraMap(const std::map & val) { this->extraMap = val; __isset.extraMap = true; } +std::ostream& operator<<(std::ostream& out, const TimIqBean& obj) +{ + obj.printTo(out); + return out; +} + uint32_t TimIqBean::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -3120,7 +3198,7 @@ uint32_t TimIqBean::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t TimIqBean::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TimIqBean"); xfer += oprot->writeFieldBegin("threadId", ::apache::thrift::protocol::T_STRING, 1); @@ -3226,7 +3304,7 @@ void TimIqBean::printTo(std::ostream& out) const { } -TimRoster::~TimRoster() throw() { +TimRoster::~TimRoster() noexcept { } @@ -3247,10 +3325,16 @@ void TimRoster::__set_extraMap(const std::map & val) { this->extraMap = val; __isset.extraMap = true; } +std::ostream& operator<<(std::ostream& out, const TimRoster& obj) +{ + obj.printTo(out); + return out; +} + uint32_t TimRoster::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -3336,7 +3420,7 @@ uint32_t TimRoster::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t TimRoster::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TimRoster"); xfer += oprot->writeFieldBegin("subscription", ::apache::thrift::protocol::T_STRING, 1); @@ -3406,7 +3490,7 @@ void TimRoster::printTo(std::ostream& out) const { } -TimRemoteUserBean::~TimRemoteUserBean() throw() { +TimRemoteUserBean::~TimRemoteUserBean() noexcept { } @@ -3424,10 +3508,16 @@ void TimRemoteUserBean::__set_extraMap(const std::map this->extraMap = val; __isset.extraMap = true; } +std::ostream& operator<<(std::ostream& out, const TimRemoteUserBean& obj) +{ + obj.printTo(out); + return out; +} + uint32_t TimRemoteUserBean::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -3499,7 +3589,7 @@ uint32_t TimRemoteUserBean::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t TimRemoteUserBean::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TimRemoteUserBean"); if (this->__isset.error) { @@ -3562,7 +3652,7 @@ void TimRemoteUserBean::printTo(std::ostream& out) const { } -TimRemoteRoom::~TimRemoteRoom() throw() { +TimRemoteRoom::~TimRemoteRoom() noexcept { } @@ -3580,10 +3670,16 @@ void TimRemoteRoom::__set_extraMap(const std::map & va this->extraMap = val; __isset.extraMap = true; } +std::ostream& operator<<(std::ostream& out, const TimRemoteRoom& obj) +{ + obj.printTo(out); + return out; +} + uint32_t TimRemoteRoom::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -3655,7 +3751,7 @@ uint32_t TimRemoteRoom::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t TimRemoteRoom::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TimRemoteRoom"); if (this->__isset.error) { @@ -3718,7 +3814,7 @@ void TimRemoteRoom::printTo(std::ostream& out) const { } -TimResponseBean::~TimResponseBean() throw() { +TimResponseBean::~TimResponseBean() noexcept { } @@ -3741,10 +3837,16 @@ void TimResponseBean::__set_extraMap(const std::map & this->extraMap = val; __isset.extraMap = true; } +std::ostream& operator<<(std::ostream& out, const TimResponseBean& obj) +{ + obj.printTo(out); + return out; +} + uint32_t TimResponseBean::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -3836,7 +3938,7 @@ uint32_t TimResponseBean::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t TimResponseBean::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TimResponseBean"); if (this->__isset.threadId) { @@ -3916,7 +4018,7 @@ void TimResponseBean::printTo(std::ostream& out) const { } -TimSock5Bean::~TimSock5Bean() throw() { +TimSock5Bean::~TimSock5Bean() noexcept { } @@ -3948,10 +4050,16 @@ void TimSock5Bean::__set_extraMap(const std::map & val this->extraMap = val; __isset.extraMap = true; } +std::ostream& operator<<(std::ostream& out, const TimSock5Bean& obj) +{ + obj.printTo(out); + return out; +} + uint32_t TimSock5Bean::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -4073,7 +4181,7 @@ uint32_t TimSock5Bean::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t TimSock5Bean::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TimSock5Bean"); xfer += oprot->writeFieldBegin("fromTid", ::apache::thrift::protocol::T_STRUCT, 1); @@ -4166,7 +4274,7 @@ void TimSock5Bean::printTo(std::ostream& out) const { } -TimSock5Bytes::~TimSock5Bytes() throw() { +TimSock5Bytes::~TimSock5Bytes() noexcept { } @@ -4186,10 +4294,16 @@ void TimSock5Bytes::__set_extraMap(const std::map & va this->extraMap = val; __isset.extraMap = true; } +std::ostream& operator<<(std::ostream& out, const TimSock5Bytes& obj) +{ + obj.printTo(out); + return out; +} + uint32_t TimSock5Bytes::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -4290,7 +4404,7 @@ uint32_t TimSock5Bytes::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t TimSock5Bytes::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TimSock5Bytes"); xfer += oprot->writeFieldBegin("pubId", ::apache::thrift::protocol::T_STRING, 1); @@ -4367,7 +4481,7 @@ void TimSock5Bytes::printTo(std::ostream& out) const { } -TimPage::~TimPage() throw() { +TimPage::~TimPage() noexcept { } @@ -4390,10 +4504,16 @@ void TimPage::__set_extraMap(const std::map & val) { this->extraMap = val; __isset.extraMap = true; } +std::ostream& operator<<(std::ostream& out, const TimPage& obj) +{ + obj.printTo(out); + return out; +} + uint32_t TimPage::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -4473,7 +4593,7 @@ uint32_t TimPage::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t TimPage::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TimPage"); if (this->__isset.fromTimeStamp) { @@ -4545,7 +4665,7 @@ void TimPage::printTo(std::ostream& out) const { } -TimMessageIq::~TimMessageIq() throw() { +TimMessageIq::~TimMessageIq() noexcept { } @@ -4568,10 +4688,16 @@ void TimMessageIq::__set_extraMap(const std::map & val this->extraMap = val; __isset.extraMap = true; } +std::ostream& operator<<(std::ostream& out, const TimMessageIq& obj) +{ + obj.printTo(out); + return out; +} + uint32_t TimMessageIq::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -4675,7 +4801,7 @@ uint32_t TimMessageIq::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t TimMessageIq::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TimMessageIq"); if (this->__isset.tidlist) { @@ -4763,7 +4889,7 @@ void TimMessageIq::printTo(std::ostream& out) const { } -TimAuth::~TimAuth() throw() { +TimAuth::~TimAuth() noexcept { } @@ -4781,10 +4907,16 @@ void TimAuth::__set_pwd(const std::string& val) { this->pwd = val; __isset.pwd = true; } +std::ostream& operator<<(std::ostream& out, const TimAuth& obj) +{ + obj.printTo(out); + return out; +} + uint32_t TimAuth::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -4841,7 +4973,7 @@ uint32_t TimAuth::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t TimAuth::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TimAuth"); if (this->__isset.domain) { @@ -4895,7 +5027,7 @@ void TimAuth::printTo(std::ostream& out) const { } -TimMBeanList::~TimMBeanList() throw() { +TimMBeanList::~TimMBeanList() noexcept { } @@ -4917,10 +5049,16 @@ void TimMBeanList::__set_extraMap(const std::map & val this->extraMap = val; __isset.extraMap = true; } +std::ostream& operator<<(std::ostream& out, const TimMBeanList& obj) +{ + obj.printTo(out); + return out; +} + uint32_t TimMBeanList::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -5015,7 +5153,7 @@ uint32_t TimMBeanList::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t TimMBeanList::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TimMBeanList"); xfer += oprot->writeFieldBegin("threadId", ::apache::thrift::protocol::T_STRING, 1); @@ -5094,7 +5232,7 @@ void TimMBeanList::printTo(std::ostream& out) const { } -TimPBeanList::~TimPBeanList() throw() { +TimPBeanList::~TimPBeanList() noexcept { } @@ -5116,10 +5254,16 @@ void TimPBeanList::__set_extraMap(const std::map & val this->extraMap = val; __isset.extraMap = true; } +std::ostream& operator<<(std::ostream& out, const TimPBeanList& obj) +{ + obj.printTo(out); + return out; +} + uint32_t TimPBeanList::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -5214,7 +5358,7 @@ uint32_t TimPBeanList::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t TimPBeanList::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TimPBeanList"); xfer += oprot->writeFieldBegin("threadId", ::apache::thrift::protocol::T_STRING, 1); @@ -5293,7 +5437,7 @@ void TimPBeanList::printTo(std::ostream& out) const { } -TimPropertyBean::~TimPropertyBean() throw() { +TimPropertyBean::~TimPropertyBean() noexcept { } @@ -5311,10 +5455,16 @@ void TimPropertyBean::__set_tls(const std::string& val) { this->tls = val; __isset.tls = true; } +std::ostream& operator<<(std::ostream& out, const TimPropertyBean& obj) +{ + obj.printTo(out); + return out; +} + uint32_t TimPropertyBean::read(::apache::thrift::protocol::TProtocol* iprot) { - apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -5371,7 +5521,7 @@ uint32_t TimPropertyBean::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t TimPropertyBean::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("TimPropertyBean"); if (this->__isset.threadId) { diff --git a/protocols/gen-cpp/tim_types.h b/protocols/gen-cpp/tim_types.h index 53eae56..60c590a 100644 --- a/protocols/gen-cpp/tim_types.h +++ b/protocols/gen-cpp/tim_types.h @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -11,10 +11,12 @@ #include #include +#include #include #include -#include +#include +#include @@ -75,16 +77,24 @@ typedef struct _TimError__isset { bool errMsg :1; } _TimError__isset; -class TimError { +class TimError : public virtual ::apache::thrift::TBase { public: TimError(const TimError&); TimError& operator=(const TimError&); - TimError() : errCode(0), errMsg() { + TimError() noexcept + : errCode(0), + errMsg() { } - virtual ~TimError() throw(); + virtual ~TimError() noexcept; + /** + * 错误码 + */ int32_t errCode; + /** + * 错误内容 + */ std::string errMsg; _TimError__isset __isset; @@ -111,19 +121,15 @@ class TimError { bool operator < (const TimError & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(TimError &a, TimError &b); -inline std::ostream& operator<<(std::ostream& out, const TimError& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const TimError& obj); typedef struct _TimNode__isset { _TimNode__isset() : key(false), value(false) {} @@ -131,16 +137,24 @@ typedef struct _TimNode__isset { bool value :1; } _TimNode__isset; -class TimNode { +class TimNode : public virtual ::apache::thrift::TBase { public: TimNode(const TimNode&); TimNode& operator=(const TimNode&); - TimNode() : key(), value() { + TimNode() noexcept + : key(), + value() { } - virtual ~TimNode() throw(); + virtual ~TimNode() noexcept; + /** + * 键 + */ std::string key; + /** + * 值 + */ std::string value; _TimNode__isset __isset; @@ -167,19 +181,15 @@ class TimNode { bool operator < (const TimNode & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(TimNode &a, TimNode &b); -inline std::ostream& operator<<(std::ostream& out, const TimNode& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const TimNode& obj); typedef struct _TimAckBean__isset { _TimAckBean__isset() : id(false), ackType(false), ackStatus(false), extraList(false), err(false), extraMap(false) {} @@ -191,19 +201,37 @@ typedef struct _TimAckBean__isset { bool extraMap :1; } _TimAckBean__isset; -class TimAckBean { +class TimAckBean : public virtual ::apache::thrift::TBase { public: TimAckBean(const TimAckBean&); TimAckBean& operator=(const TimAckBean&); - TimAckBean() : id(), ackType(), ackStatus() { + TimAckBean() noexcept + : id(), + ackType(), + ackStatus() { } - virtual ~TimAckBean() throw(); + virtual ~TimAckBean() noexcept; + /** + * id,返回所要回执协议的线程id + */ std::string id; + /** + * 类型,自定义 如:ping,message等 + */ std::string ackType; + /** + * 状态,如成功,失败等 + */ std::string ackStatus; + /** + * 附加信息 + */ std::vector extraList; + /** + * 错误信息 + */ TimError err; std::map extraMap; @@ -255,36 +283,44 @@ class TimAckBean { bool operator < (const TimAckBean & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(TimAckBean &a, TimAckBean &b); -inline std::ostream& operator<<(std::ostream& out, const TimAckBean& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const TimAckBean& obj); typedef struct _TimHBean__isset { _TimHBean__isset() : platform(false) {} bool platform :1; } _TimHBean__isset; -class TimHBean { +class TimHBean : public virtual ::apache::thrift::TBase { public: - TimHBean(const TimHBean&); - TimHBean& operator=(const TimHBean&); - TimHBean() : chl(0), platform(0), version(0) { + TimHBean(const TimHBean&) noexcept; + TimHBean& operator=(const TimHBean&) noexcept; + TimHBean() noexcept + : chl(0), + platform(0), + version(0) { } - virtual ~TimHBean() throw(); + virtual ~TimHBean() noexcept; + /** + * 渠道 + */ int32_t chl; + /** + * 平台 + */ int32_t platform; + /** + * version 客户端协议版本 + */ int16_t version; _TimHBean__isset __isset; @@ -313,19 +349,15 @@ class TimHBean { bool operator < (const TimHBean & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(TimHBean &a, TimHBean &b); -inline std::ostream& operator<<(std::ostream& out, const TimHBean& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const TimHBean& obj); typedef struct _TimParam__isset { _TimParam__isset() : timestamp(false), version(false), lang(false), extraList(false), extraMap(false), interflow(false), tls(false) {} @@ -338,21 +370,44 @@ typedef struct _TimParam__isset { bool tls :1; } _TimParam__isset; -class TimParam { +class TimParam : public virtual ::apache::thrift::TBase { public: TimParam(const TimParam&); TimParam& operator=(const TimParam&); - TimParam() : timestamp(), version(0), lang(), interflow(), tls() { - } - - virtual ~TimParam() throw(); + TimParam() noexcept + : timestamp(), + version(0), + lang(), + interflow(), + tls() { + } + + virtual ~TimParam() noexcept; + /** + * 服务器时间 + */ std::string timestamp; + /** + * 版本 + */ int16_t version; + /** + * 语言 + */ std::string lang; + /** + * 附加信息 + */ std::vector extraList; std::map extraMap; + /** + * 消息合流 + */ std::string interflow; + /** + * tls + */ std::string tls; _TimParam__isset __isset; @@ -409,19 +464,15 @@ class TimParam { bool operator < (const TimParam & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(TimParam &a, TimParam &b); -inline std::ostream& operator<<(std::ostream& out, const TimParam& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const TimParam& obj); typedef struct _TimTime__isset { _TimTime__isset() : timestamp(false), formattime(false) {} @@ -429,16 +480,24 @@ typedef struct _TimTime__isset { bool formattime :1; } _TimTime__isset; -class TimTime { +class TimTime : public virtual ::apache::thrift::TBase { public: TimTime(const TimTime&); TimTime& operator=(const TimTime&); - TimTime() : timestamp(), formattime() { + TimTime() noexcept + : timestamp(), + formattime() { } - virtual ~TimTime() throw(); + virtual ~TimTime() noexcept; + /** + * 时间戳 (毫秒) + */ std::string timestamp; + /** + * 格式化时间 + */ std::string formattime; _TimTime__isset __isset; @@ -465,19 +524,15 @@ class TimTime { bool operator < (const TimTime & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(TimTime &a, TimTime &b); -inline std::ostream& operator<<(std::ostream& out, const TimTime& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const TimTime& obj); typedef struct _TimArea__isset { _TimArea__isset() : country(false), province(false), city(false), extraList(false), extraMap(false) {} @@ -488,18 +543,33 @@ typedef struct _TimArea__isset { bool extraMap :1; } _TimArea__isset; -class TimArea { +class TimArea : public virtual ::apache::thrift::TBase { public: TimArea(const TimArea&); TimArea& operator=(const TimArea&); - TimArea() : country(), province(), city() { + TimArea() noexcept + : country(), + province(), + city() { } - virtual ~TimArea() throw(); + virtual ~TimArea() noexcept; + /** + * 国家 + */ std::string country; + /** + * 省 + */ std::string province; + /** + * 市 + */ std::string city; + /** + * 附加信息:如区,镇,乡等 + */ std::vector extraList; std::map extraMap; @@ -545,19 +615,15 @@ class TimArea { bool operator < (const TimArea & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(TimArea &a, TimArea &b); -inline std::ostream& operator<<(std::ostream& out, const TimArea& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const TimArea& obj); typedef struct _Tid__isset { _Tid__isset() : domain(false), resource(false), type(false), extraList(false), extraMap(false) {} @@ -568,19 +634,38 @@ typedef struct _Tid__isset { bool extraMap :1; } _Tid__isset; -class Tid { +class Tid : public virtual ::apache::thrift::TBase { public: Tid(const Tid&); Tid& operator=(const Tid&); - Tid() : name(), domain(), resource(), type() { + Tid() noexcept + : name(), + domain(), + resource(), + type() { } - virtual ~Tid() throw(); + virtual ~Tid() noexcept; + /** + * 登陆名 用户登录号,房间号等 + */ std::string name; + /** + * 域名 用于区分渠道等 appid,appsecret + */ std::string domain; + /** + * 系统 自行约定 如 : 1IOS,2android,3H5,4WEB 等 + */ std::string resource; + /** + * normal,group + */ std::string type; + /** + * 附加信息:如传递客户端信息 iphone6,xiaomi,huawei等 + */ std::vector extraList; std::map extraMap; @@ -630,19 +715,15 @@ class Tid { bool operator < (const Tid & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(Tid &a, Tid &b); -inline std::ostream& operator<<(std::ostream& out, const Tid& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const Tid& obj); typedef struct _TimUserBean__isset { _TimUserBean__isset() : tid(false), nickname(false), remarkname(false), brithday(false), gender(false), headurl(false), area(false), headbyte(false), photoBytes(false), extraList(false), extraMap(false) {} @@ -659,24 +740,60 @@ typedef struct _TimUserBean__isset { bool extraMap :1; } _TimUserBean__isset; -class TimUserBean { +class TimUserBean : public virtual ::apache::thrift::TBase { public: TimUserBean(const TimUserBean&); TimUserBean& operator=(const TimUserBean&); - TimUserBean() : nickname(), remarkname(), brithday(), gender(0), headurl(), headbyte() { - } - - virtual ~TimUserBean() throw(); + TimUserBean() noexcept + : nickname(), + remarkname(), + brithday(), + gender(0), + headurl(), + headbyte() { + } + + virtual ~TimUserBean() noexcept; + /** + * 用户bean + */ Tid tid; + /** + * 昵称 + */ std::string nickname; + /** + * 备注名称 + */ std::string remarkname; + /** + * 生日 2000-01-01 + */ std::string brithday; + /** + * 性别 自行约定 如 : 0不知,1男,2女 + */ int16_t gender; + /** + * 头像地址 http://xxx.jpg + */ std::string headurl; + /** + * 地区 + */ TimArea area; + /** + * 头像 + */ std::string headbyte; + /** + * 其他图片 + */ std::vector photoBytes; + /** + * 扩展字段 + */ std::vector extraList; std::map extraMap; @@ -758,19 +875,15 @@ class TimUserBean { bool operator < (const TimUserBean & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(TimUserBean &a, TimUserBean &b); -inline std::ostream& operator<<(std::ostream& out, const TimUserBean& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const TimUserBean& obj); typedef struct _TimRoom__isset { _TimRoom__isset() : tid(false), founderTid(false), HostsTid(false), membersTid(false), headurl(false), roomName(false), desc(false), createTime(false), extraList(false), extraMap(false) {} @@ -786,23 +899,53 @@ typedef struct _TimRoom__isset { bool extraMap :1; } _TimRoom__isset; -class TimRoom { +class TimRoom : public virtual ::apache::thrift::TBase { public: TimRoom(const TimRoom&); TimRoom& operator=(const TimRoom&); - TimRoom() : headurl(), roomName(), desc() { + TimRoom() noexcept + : headurl(), + roomName(), + desc() { } - virtual ~TimRoom() throw(); + virtual ~TimRoom() noexcept; + /** + * 房间Tid + */ Tid tid; + /** + * 创建人Tid + */ Tid founderTid; + /** + * 主持人Tid + */ std::vector HostsTid; + /** + * memberTid + */ std::vector membersTid; + /** + * 头像地址 http://xxx.jpg + */ std::string headurl; + /** + * 房间名称 + */ std::string roomName; + /** + * 房间说明 + */ std::string desc; + /** + * 房间创建时间 + */ TimTime createTime; + /** + * 扩展字段 + */ std::vector extraList; std::map extraMap; @@ -878,19 +1021,15 @@ class TimRoom { bool operator < (const TimRoom & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(TimRoom &a, TimRoom &b); -inline std::ostream& operator<<(std::ostream& out, const TimRoom& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const TimRoom& obj); typedef struct _TimPBean__isset { _TimPBean__isset() : fromTid(false), toTid(false), status(false), type(false), priority(false), show(false), leaguerTid(false), extraList(false), error(false), extraMap(false) {} @@ -906,24 +1045,57 @@ typedef struct _TimPBean__isset { bool extraMap :1; } _TimPBean__isset; -class TimPBean { +class TimPBean : public virtual ::apache::thrift::TBase { public: TimPBean(const TimPBean&); TimPBean& operator=(const TimPBean&); - TimPBean() : threadId(), status(), type(), priority(0), show() { - } - - virtual ~TimPBean() throw(); + TimPBean() noexcept + : threadId(), + status(), + type(), + priority(0), + show() { + } + + virtual ~TimPBean() noexcept; + /** + * 标识 + */ std::string threadId; Tid fromTid; Tid toTid; + /** + * subscribe:订阅其他用户的状态 probe:请求获取其他用户的状态 unavailable:不可用,离线(offline)状态 + */ std::string status; + /** + * normal:类似于email,主要特点是不要求响应; + * chat:类似于qq里的好友即时聊天,主要特点是实时通讯; + * groupchat:类似于聊天室里的群聊; + * headline:用于发送alert和notification; + * error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; + */ std::string type; + /** + * 优先权 0 。高优先级的resource能接受发送到bare JID的消息,低优先级的resource不能 + */ int32_t priority; + /** + * chat:聊天中 away:暂时离开 xa:eXtend Away,长时间离开 dnd:勿打扰 online:在线 offline:离线 + */ std::string show; + /** + * 成员Tid 群聊时信息发送者Tid + */ Tid leaguerTid; + /** + * 扩展字段 + */ std::vector extraList; + /** + * 错误码 + */ TimError error; std::map extraMap; @@ -1003,19 +1175,15 @@ class TimPBean { bool operator < (const TimPBean & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(TimPBean &a, TimPBean &b); -inline std::ostream& operator<<(std::ostream& out, const TimPBean& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const TimPBean& obj); typedef struct _TimMBean__isset { _TimMBean__isset() : mid(false), fromTid(false), toTid(false), body(false), type(false), msgType(false), offline(false), leaguerTid(false), extraList(false), timestamp(false), error(false), extraMap(false), readstatus(false) {} @@ -1034,28 +1202,78 @@ typedef struct _TimMBean__isset { bool readstatus :1; } _TimMBean__isset; -class TimMBean { +class TimMBean : public virtual ::apache::thrift::TBase { public: TimMBean(const TimMBean&); TimMBean& operator=(const TimMBean&); - TimMBean() : threadId(), mid(), body(), type(), msgType(0), timestamp(), readstatus(0) { - } - - virtual ~TimMBean() throw(); + TimMBean() noexcept + : threadId(), + mid(), + body(), + type(), + msgType(0), + timestamp(), + readstatus(0) { + } + + virtual ~TimMBean() noexcept; + /** + * 线程id + */ std::string threadId; + /** + * 消息id号 + */ std::string mid; + /** + * 来源Tid + */ Tid fromTid; + /** + * 目标Tid + */ Tid toTid; + /** + * 信息内容 + */ std::string body; + /** + * normal:类似于email,主要特点是不要求响应; + * chat:类似于qq里的好友即时聊天,主要特点是实时通讯; + * groupchat:类似于聊天室里的群聊; + * headline:用于发送alert和notification; + * error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; + */ std::string type; + /** + * 消息类型 1 文字 2 图片 3 语音 4视频 5混合 + */ int16_t msgType; + /** + * 是否离线信息 + */ TimTime offline; + /** + * 成员Tid 群聊时信息发送者Tid + */ Tid leaguerTid; + /** + * 扩展字段 + */ std::vector extraList; + /** + * 服务器发送信息时间戳(毫秒) + */ std::string timestamp; + /** + * 错误码 + */ TimError error; std::map extraMap; + /** + * 0未读 1已读 + */ int16_t readstatus; _TimMBean__isset __isset; @@ -1152,19 +1370,15 @@ class TimMBean { bool operator < (const TimMBean & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(TimMBean &a, TimMBean &b); -inline std::ostream& operator<<(std::ostream& out, const TimMBean& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const TimMBean& obj); typedef struct _TimIqBean__isset { _TimIqBean__isset() : fromTid(false), toTid(false), type(false), extraList(false), error(false), extraMap(false) {} @@ -1176,20 +1390,37 @@ typedef struct _TimIqBean__isset { bool extraMap :1; } _TimIqBean__isset; -class TimIqBean { +class TimIqBean : public virtual ::apache::thrift::TBase { public: TimIqBean(const TimIqBean&); TimIqBean& operator=(const TimIqBean&); - TimIqBean() : threadId(), type() { + TimIqBean() noexcept + : threadId(), + type() { } - virtual ~TimIqBean() throw(); + virtual ~TimIqBean() noexcept; + /** + * 线程id + */ std::string threadId; Tid fromTid; Tid toTid; + /** + * Get :获取当前域值。类似于http get方法 + * Set :设置或替换get查询的值。类似于http put方法。 + * Result :说明成功的响应了先前的查询。类似于http状态码200。 + * Error: 查询和响应中出现的错误。 + */ std::string type; + /** + * 扩展字段 + */ std::vector extraList; + /** + * 错误码 + */ TimError error; std::map extraMap; @@ -1245,19 +1476,15 @@ class TimIqBean { bool operator < (const TimIqBean & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(TimIqBean &a, TimIqBean &b); -inline std::ostream& operator<<(std::ostream& out, const TimIqBean& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const TimIqBean& obj); typedef struct _TimRoster__isset { _TimRoster__isset() : name(false), extraMap(false) {} @@ -1265,17 +1492,28 @@ typedef struct _TimRoster__isset { bool extraMap :1; } _TimRoster__isset; -class TimRoster { +class TimRoster : public virtual ::apache::thrift::TBase { public: TimRoster(const TimRoster&); TimRoster& operator=(const TimRoster&); - TimRoster() : subscription(), name() { - } - - virtual ~TimRoster() throw(); + TimRoster() noexcept + : subscription(), + name() { + } + + virtual ~TimRoster() noexcept; + /** + * none表示用户和contact之前没有任何的关系(虽然在server的buddy list中存在) + * to表示用户能看到contact的presence,但是contact看不到用户的Presence + * from和to的含义相反,指用户看不到contact的presence,但是contact可以看到 + * both表示相关之间都能看到对方的presence + */ std::string subscription; Tid tid; + /** + * 用户名 + */ std::string name; std::map extraMap; @@ -1311,19 +1549,15 @@ class TimRoster { bool operator < (const TimRoster & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(TimRoster &a, TimRoster &b); -inline std::ostream& operator<<(std::ostream& out, const TimRoster& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const TimRoster& obj); typedef struct _TimRemoteUserBean__isset { _TimRemoteUserBean__isset() : error(false), ub(false), extraMap(false) {} @@ -1332,16 +1566,22 @@ typedef struct _TimRemoteUserBean__isset { bool extraMap :1; } _TimRemoteUserBean__isset; -class TimRemoteUserBean { +class TimRemoteUserBean : public virtual ::apache::thrift::TBase { public: TimRemoteUserBean(const TimRemoteUserBean&); TimRemoteUserBean& operator=(const TimRemoteUserBean&); - TimRemoteUserBean() { + TimRemoteUserBean() noexcept { } - virtual ~TimRemoteUserBean() throw(); + virtual ~TimRemoteUserBean() noexcept; + /** + * 错误码 + */ TimError error; + /** + * 远程用户信息 + */ TimUserBean ub; std::map extraMap; @@ -1375,19 +1615,15 @@ class TimRemoteUserBean { bool operator < (const TimRemoteUserBean & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(TimRemoteUserBean &a, TimRemoteUserBean &b); -inline std::ostream& operator<<(std::ostream& out, const TimRemoteUserBean& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const TimRemoteUserBean& obj); typedef struct _TimRemoteRoom__isset { _TimRemoteRoom__isset() : error(false), room(false), extraMap(false) {} @@ -1396,16 +1632,22 @@ typedef struct _TimRemoteRoom__isset { bool extraMap :1; } _TimRemoteRoom__isset; -class TimRemoteRoom { +class TimRemoteRoom : public virtual ::apache::thrift::TBase { public: TimRemoteRoom(const TimRemoteRoom&); TimRemoteRoom& operator=(const TimRemoteRoom&); - TimRemoteRoom() { + TimRemoteRoom() noexcept { } - virtual ~TimRemoteRoom() throw(); + virtual ~TimRemoteRoom() noexcept; + /** + * 错误码 + */ TimError error; + /** + * 远程房间信息 + */ TimRoom room; std::map extraMap; @@ -1439,19 +1681,15 @@ class TimRemoteRoom { bool operator < (const TimRemoteRoom & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(TimRemoteRoom &a, TimRemoteRoom &b); -inline std::ostream& operator<<(std::ostream& out, const TimRemoteRoom& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const TimRemoteRoom& obj); typedef struct _TimResponseBean__isset { _TimResponseBean__isset() : threadId(false), error(false), extraList(false), extraMap(false) {} @@ -1461,17 +1699,24 @@ typedef struct _TimResponseBean__isset { bool extraMap :1; } _TimResponseBean__isset; -class TimResponseBean { +class TimResponseBean : public virtual ::apache::thrift::TBase { public: TimResponseBean(const TimResponseBean&); TimResponseBean& operator=(const TimResponseBean&); - TimResponseBean() : threadId() { + TimResponseBean() noexcept + : threadId() { } - virtual ~TimResponseBean() throw(); + virtual ~TimResponseBean() noexcept; std::string threadId; + /** + * 错误码 + */ TimError error; + /** + * 附加信息 + */ std::vector extraList; std::map extraMap; @@ -1511,39 +1756,51 @@ class TimResponseBean { bool operator < (const TimResponseBean & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(TimResponseBean &a, TimResponseBean &b); -inline std::ostream& operator<<(std::ostream& out, const TimResponseBean& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const TimResponseBean& obj); typedef struct _TimSock5Bean__isset { _TimSock5Bean__isset() : extraMap(false) {} bool extraMap :1; } _TimSock5Bean__isset; -class TimSock5Bean { +class TimSock5Bean : public virtual ::apache::thrift::TBase { public: TimSock5Bean(const TimSock5Bean&); TimSock5Bean& operator=(const TimSock5Bean&); - TimSock5Bean() : addr(), port(0), transport(0), pubId() { + TimSock5Bean() noexcept + : addr(), + port(0), + transport(0), + pubId() { } - virtual ~TimSock5Bean() throw(); + virtual ~TimSock5Bean() noexcept; Tid fromTid; Tid toTid; + /** + * ip地址 + */ std::string addr; + /** + * 端口 + */ int32_t port; + /** + * 传输类型 1:tcp 2:udp + */ int16_t transport; + /** + * 发布id 通过发布id 可以连接两个发布id相同的用户 + */ std::string pubId; std::map extraMap; @@ -1589,36 +1846,43 @@ class TimSock5Bean { bool operator < (const TimSock5Bean & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(TimSock5Bean &a, TimSock5Bean &b); -inline std::ostream& operator<<(std::ostream& out, const TimSock5Bean& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const TimSock5Bean& obj); typedef struct _TimSock5Bytes__isset { _TimSock5Bytes__isset() : extraMap(false) {} bool extraMap :1; } _TimSock5Bytes__isset; -class TimSock5Bytes { +class TimSock5Bytes : public virtual ::apache::thrift::TBase { public: TimSock5Bytes(const TimSock5Bytes&); TimSock5Bytes& operator=(const TimSock5Bytes&); - TimSock5Bytes() : pubId(), index(0) { + TimSock5Bytes() noexcept + : pubId(), + index(0) { } - virtual ~TimSock5Bytes() throw(); + virtual ~TimSock5Bytes() noexcept; + /** + * 发布id + */ std::string pubId; + /** + * 序号数据块 + */ int32_t index; + /** + * 数据块 + */ std::vector bytes; std::map extraMap; @@ -1652,19 +1916,15 @@ class TimSock5Bytes { bool operator < (const TimSock5Bytes & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(TimSock5Bytes &a, TimSock5Bytes &b); -inline std::ostream& operator<<(std::ostream& out, const TimSock5Bytes& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const TimSock5Bytes& obj); typedef struct _TimPage__isset { _TimPage__isset() : fromTimeStamp(false), toTimeStamp(false), limitCount(false), extraMap(false) {} @@ -1674,17 +1934,29 @@ typedef struct _TimPage__isset { bool extraMap :1; } _TimPage__isset; -class TimPage { +class TimPage : public virtual ::apache::thrift::TBase { public: TimPage(const TimPage&); TimPage& operator=(const TimPage&); - TimPage() : fromTimeStamp(), toTimeStamp(), limitCount(0) { + TimPage() noexcept + : fromTimeStamp(), + toTimeStamp(), + limitCount(0) { } - virtual ~TimPage() throw(); + virtual ~TimPage() noexcept; + /** + * 时间上 + */ std::string fromTimeStamp; + /** + * 时间下 + */ std::string toTimeStamp; + /** + * 条数 + */ int32_t limitCount; std::map extraMap; @@ -1724,19 +1996,15 @@ class TimPage { bool operator < (const TimPage & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(TimPage &a, TimPage &b); -inline std::ostream& operator<<(std::ostream& out, const TimPage& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const TimPage& obj); typedef struct _TimMessageIq__isset { _TimMessageIq__isset() : tidlist(false), timPage(false), midlist(false), extraMap(false) {} @@ -1746,17 +2014,26 @@ typedef struct _TimMessageIq__isset { bool extraMap :1; } _TimMessageIq__isset; -class TimMessageIq { +class TimMessageIq : public virtual ::apache::thrift::TBase { public: TimMessageIq(const TimMessageIq&); TimMessageIq& operator=(const TimMessageIq&); - TimMessageIq() { + TimMessageIq() noexcept { } - virtual ~TimMessageIq() throw(); + virtual ~TimMessageIq() noexcept; + /** + * tid集合 + */ std::vector tidlist; + /** + * 分页 + */ TimPage timPage; + /** + * mid集合 + */ std::vector midlist; std::map extraMap; @@ -1796,19 +2073,15 @@ class TimMessageIq { bool operator < (const TimMessageIq & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(TimMessageIq &a, TimMessageIq &b); -inline std::ostream& operator<<(std::ostream& out, const TimMessageIq& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const TimMessageIq& obj); typedef struct _TimAuth__isset { _TimAuth__isset() : domain(false), username(false), pwd(false) {} @@ -1817,17 +2090,29 @@ typedef struct _TimAuth__isset { bool pwd :1; } _TimAuth__isset; -class TimAuth { +class TimAuth : public virtual ::apache::thrift::TBase { public: TimAuth(const TimAuth&); TimAuth& operator=(const TimAuth&); - TimAuth() : domain(), username(), pwd() { + TimAuth() noexcept + : domain(), + username(), + pwd() { } - virtual ~TimAuth() throw(); + virtual ~TimAuth() noexcept; + /** + * 域名 + */ std::string domain; + /** + * 用户名 + */ std::string username; + /** + * 密码 + */ std::string pwd; _TimAuth__isset __isset; @@ -1860,19 +2145,15 @@ class TimAuth { bool operator < (const TimAuth & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(TimAuth &a, TimAuth &b); -inline std::ostream& operator<<(std::ostream& out, const TimAuth& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const TimAuth& obj); typedef struct _TimMBeanList__isset { _TimMBeanList__isset() : timMBeanList(false), reqType(false), extraMap(false) {} @@ -1881,17 +2162,25 @@ typedef struct _TimMBeanList__isset { bool extraMap :1; } _TimMBeanList__isset; -class TimMBeanList { +class TimMBeanList : public virtual ::apache::thrift::TBase { public: TimMBeanList(const TimMBeanList&); TimMBeanList& operator=(const TimMBeanList&); - TimMBeanList() : threadId(), reqType() { + TimMBeanList() noexcept + : threadId(), + reqType() { } - virtual ~TimMBeanList() throw(); + virtual ~TimMBeanList() noexcept; std::string threadId; + /** + * 信息列表 + */ std::vector timMBeanList; + /** + * 类型 + */ std::string reqType; std::map extraMap; @@ -1929,19 +2218,15 @@ class TimMBeanList { bool operator < (const TimMBeanList & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(TimMBeanList &a, TimMBeanList &b); -inline std::ostream& operator<<(std::ostream& out, const TimMBeanList& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const TimMBeanList& obj); typedef struct _TimPBeanList__isset { _TimPBeanList__isset() : timPBeanList(false), reqType(false), extraMap(false) {} @@ -1950,17 +2235,25 @@ typedef struct _TimPBeanList__isset { bool extraMap :1; } _TimPBeanList__isset; -class TimPBeanList { +class TimPBeanList : public virtual ::apache::thrift::TBase { public: TimPBeanList(const TimPBeanList&); TimPBeanList& operator=(const TimPBeanList&); - TimPBeanList() : threadId(), reqType() { + TimPBeanList() noexcept + : threadId(), + reqType() { } - virtual ~TimPBeanList() throw(); + virtual ~TimPBeanList() noexcept; std::string threadId; + /** + * 状态信息列表 + */ std::vector timPBeanList; + /** + * 类型 + */ std::string reqType; std::map extraMap; @@ -1998,19 +2291,15 @@ class TimPBeanList { bool operator < (const TimPBeanList & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(TimPBeanList &a, TimPBeanList &b); -inline std::ostream& operator<<(std::ostream& out, const TimPBeanList& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const TimPBeanList& obj); typedef struct _TimPropertyBean__isset { _TimPropertyBean__isset() : threadId(false), interflow(false), tls(false) {} @@ -2019,17 +2308,26 @@ typedef struct _TimPropertyBean__isset { bool tls :1; } _TimPropertyBean__isset; -class TimPropertyBean { +class TimPropertyBean : public virtual ::apache::thrift::TBase { public: TimPropertyBean(const TimPropertyBean&); TimPropertyBean& operator=(const TimPropertyBean&); - TimPropertyBean() : threadId(), interflow(), tls() { + TimPropertyBean() noexcept + : threadId(), + interflow(), + tls() { } - virtual ~TimPropertyBean() throw(); + virtual ~TimPropertyBean() noexcept; std::string threadId; + /** + * 消息合流 + */ std::string interflow; + /** + * tls + */ std::string tls; _TimPropertyBean__isset __isset; @@ -2062,19 +2360,15 @@ class TimPropertyBean { bool operator < (const TimPropertyBean & ) const; - uint32_t read(::apache::thrift::protocol::TProtocol* iprot); - uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot) override; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const override; virtual void printTo(std::ostream& out) const; }; void swap(TimPropertyBean &a, TimPropertyBean &b); -inline std::ostream& operator<<(std::ostream& out, const TimPropertyBean& obj) -{ - obj.printTo(out); - return out; -} +std::ostream& operator<<(std::ostream& out, const TimPropertyBean& obj); diff --git a/protocols/gen-csharp/ITim.cs b/protocols/gen-csharp/ITim.cs deleted file mode 100644 index 5b0d0c8..0000000 --- a/protocols/gen-csharp/ITim.cs +++ /dev/null @@ -1,5819 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - -public partial class ITim { - public interface Iface { - /// - /// 流程开始 - /// - /// - void timStream(TimParam param); - #if SILVERLIGHT - IAsyncResult Begin_timStream(AsyncCallback callback, object state, TimParam param); - void End_timStream(IAsyncResult asyncResult); - #endif - /// - /// tls协议 - /// - void timStarttls(); - #if SILVERLIGHT - IAsyncResult Begin_timStarttls(AsyncCallback callback, object state); - void End_timStarttls(IAsyncResult asyncResult); - #endif - /// - /// 登陆协议 - /// - /// - /// - void timLogin(Tid tid, string pwd); - #if SILVERLIGHT - IAsyncResult Begin_timLogin(AsyncCallback callback, object state, Tid tid, string pwd); - void End_timLogin(IAsyncResult asyncResult); - #endif - /// - /// 回执信息 - /// - /// - void timAck(TimAckBean ab); - #if SILVERLIGHT - IAsyncResult Begin_timAck(AsyncCallback callback, object state, TimAckBean ab); - void End_timAck(IAsyncResult asyncResult); - #endif - /// - /// 广播出席协议或接收广播协议 - /// - /// - void timPresence(TimPBean pbean); - #if SILVERLIGHT - IAsyncResult Begin_timPresence(AsyncCallback callback, object state, TimPBean pbean); - void End_timPresence(IAsyncResult asyncResult); - #endif - /// - /// 发送信息或接收信息 - /// - /// - void timMessage(TimMBean mbean); - #if SILVERLIGHT - IAsyncResult Begin_timMessage(AsyncCallback callback, object state, TimMBean mbean); - void End_timMessage(IAsyncResult asyncResult); - #endif - /// - /// ping 心跳协议 - /// - /// - void timPing(string threadId); - #if SILVERLIGHT - IAsyncResult Begin_timPing(AsyncCallback callback, object state, string threadId); - void End_timPing(IAsyncResult asyncResult); - #endif - /// - /// 错误通知 - /// - /// - void timError(TimError e); - #if SILVERLIGHT - IAsyncResult Begin_timError(AsyncCallback callback, object state, TimError e); - void End_timError(IAsyncResult asyncResult); - #endif - /// - /// 登出协议 - /// - void timLogout(); - #if SILVERLIGHT - IAsyncResult Begin_timLogout(AsyncCallback callback, object state); - void End_timLogout(IAsyncResult asyncResult); - #endif - /// - /// 注册协议 - /// - /// - /// - void timRegist(Tid tid, string auth); - #if SILVERLIGHT - IAsyncResult Begin_timRegist(AsyncCallback callback, object state, Tid tid, string auth); - void End_timRegist(IAsyncResult asyncResult); - #endif - /// - /// 花名册 - /// - /// - void timRoser(TimRoster roster); - #if SILVERLIGHT - IAsyncResult Begin_timRoser(AsyncCallback callback, object state, TimRoster roster); - void End_timRoser(IAsyncResult asyncResult); - #endif - /// - /// 发送信息或接收信息列表(合流) - /// - /// - void timMessageList(TimMBeanList mbeanList); - #if SILVERLIGHT - IAsyncResult Begin_timMessageList(AsyncCallback callback, object state, TimMBeanList mbeanList); - void End_timMessageList(IAsyncResult asyncResult); - #endif - /// - /// 发送状态信息列表(合流) - /// - /// - void timPresenceList(TimPBeanList pbeanList); - #if SILVERLIGHT - IAsyncResult Begin_timPresenceList(AsyncCallback callback, object state, TimPBeanList pbeanList); - void End_timPresenceList(IAsyncResult asyncResult); - #endif - /// - /// 信息请求 get请求数据 del删除 - /// - /// - /// - void timMessageIq(TimMessageIq timMsgIq, string iqType); - #if SILVERLIGHT - IAsyncResult Begin_timMessageIq(AsyncCallback callback, object state, TimMessageIq timMsgIq, string iqType); - void End_timMessageIq(IAsyncResult asyncResult); - #endif - /// - /// 信息请求 - /// - /// - void timMessageResult(TimMBean mbean); - #if SILVERLIGHT - IAsyncResult Begin_timMessageResult(AsyncCallback callback, object state, TimMBean mbean); - void End_timMessageResult(IAsyncResult asyncResult); - #endif - /// - /// 用户协议属性请求 - /// - /// - void timProperty(TimPropertyBean tpb); - #if SILVERLIGHT - IAsyncResult Begin_timProperty(AsyncCallback callback, object state, TimPropertyBean tpb); - void End_timProperty(IAsyncResult asyncResult); - #endif - /// - /// 请求远程验证信息 - /// - /// - /// - /// - TimRemoteUserBean timRemoteUserAuth(Tid tid, string pwd, TimAuth auth); - #if SILVERLIGHT - IAsyncResult Begin_timRemoteUserAuth(AsyncCallback callback, object state, Tid tid, string pwd, TimAuth auth); - TimRemoteUserBean End_timRemoteUserAuth(IAsyncResult asyncResult); - #endif - /// - /// 请求远程用户信息 - /// - /// - /// - TimRemoteUserBean timRemoteUserGet(Tid tid, TimAuth auth); - #if SILVERLIGHT - IAsyncResult Begin_timRemoteUserGet(AsyncCallback callback, object state, Tid tid, TimAuth auth); - TimRemoteUserBean End_timRemoteUserGet(IAsyncResult asyncResult); - #endif - /// - /// 编辑远程用户信息 - /// - /// - /// - /// - TimRemoteUserBean timRemoteUserEdit(Tid tid, TimUserBean ub, TimAuth auth); - #if SILVERLIGHT - IAsyncResult Begin_timRemoteUserEdit(AsyncCallback callback, object state, Tid tid, TimUserBean ub, TimAuth auth); - TimRemoteUserBean End_timRemoteUserEdit(IAsyncResult asyncResult); - #endif - /// - /// 广播出席协议或接收广播协议 - /// - /// - /// - TimResponseBean timResponsePresence(TimPBean pbean, TimAuth auth); - #if SILVERLIGHT - IAsyncResult Begin_timResponsePresence(AsyncCallback callback, object state, TimPBean pbean, TimAuth auth); - TimResponseBean End_timResponsePresence(IAsyncResult asyncResult); - #endif - /// - /// 发送信息或接收信息 - /// - /// - /// - TimResponseBean timResponseMessage(TimMBean mbean, TimAuth auth); - #if SILVERLIGHT - IAsyncResult Begin_timResponseMessage(AsyncCallback callback, object state, TimMBean mbean, TimAuth auth); - TimResponseBean End_timResponseMessage(IAsyncResult asyncResult); - #endif - /// - /// 信息请求 get请求数据 del删除(辅助接口) - /// - /// - /// - /// - TimMBeanList timResponseMessageIq(TimMessageIq timMsgIq, string iqType, TimAuth auth); - #if SILVERLIGHT - IAsyncResult Begin_timResponseMessageIq(AsyncCallback callback, object state, TimMessageIq timMsgIq, string iqType, TimAuth auth); - TimMBeanList End_timResponseMessageIq(IAsyncResult asyncResult); - #endif - /// - /// 广播出席协议或接收广播协议 - /// - /// - /// - TimResponseBean timResponsePresenceList(TimPBeanList pbeanList, TimAuth auth); - #if SILVERLIGHT - IAsyncResult Begin_timResponsePresenceList(AsyncCallback callback, object state, TimPBeanList pbeanList, TimAuth auth); - TimResponseBean End_timResponsePresenceList(IAsyncResult asyncResult); - #endif - /// - /// 发送信息或接收信息 - /// - /// - /// - TimResponseBean timResponseMessageList(TimMBeanList mbeanList, TimAuth auth); - #if SILVERLIGHT - IAsyncResult Begin_timResponseMessageList(AsyncCallback callback, object state, TimMBeanList mbeanList, TimAuth auth); - TimResponseBean End_timResponseMessageList(IAsyncResult asyncResult); - #endif - } - - public class Client : IDisposable, Iface { - public Client(TProtocol prot) : this(prot, prot) - { - } - - public Client(TProtocol iprot, TProtocol oprot) - { - iprot_ = iprot; - oprot_ = oprot; - } - - protected TProtocol iprot_; - protected TProtocol oprot_; - protected int seqid_; - - public TProtocol InputProtocol - { - get { return iprot_; } - } - public TProtocol OutputProtocol - { - get { return oprot_; } - } - - - #region " IDisposable Support " - private bool _IsDisposed; - - // IDisposable - public void Dispose() - { - Dispose(true); - } - - - protected virtual void Dispose(bool disposing) - { - if (!_IsDisposed) - { - if (disposing) - { - if (iprot_ != null) - { - ((IDisposable)iprot_).Dispose(); - } - if (oprot_ != null) - { - ((IDisposable)oprot_).Dispose(); - } - } - } - _IsDisposed = true; - } - #endregion - - - - #if SILVERLIGHT - public IAsyncResult Begin_timStream(AsyncCallback callback, object state, TimParam param) - { - return send_timStream(callback, state, param); - } - - public void End_timStream(IAsyncResult asyncResult) - { - oprot_.Transport.EndFlush(asyncResult); - } - - #endif - - /// - /// 流程开始 - /// - /// - public void timStream(TimParam param) - { - #if !SILVERLIGHT - send_timStream(param); - - #else - var asyncResult = Begin_timStream(null, null, param); - - #endif - } - #if SILVERLIGHT - public IAsyncResult send_timStream(AsyncCallback callback, object state, TimParam param) - #else - public void send_timStream(TimParam param) - #endif - { - oprot_.WriteMessageBegin(new TMessage("timStream", TMessageType.Oneway, seqid_)); - timStream_args args = new timStream_args(); - args.Param = param; - args.Write(oprot_); - oprot_.WriteMessageEnd(); - #if SILVERLIGHT - return oprot_.Transport.BeginFlush(callback, state); - #else - oprot_.Transport.Flush(); - #endif - } - - - #if SILVERLIGHT - public IAsyncResult Begin_timStarttls(AsyncCallback callback, object state) - { - return send_timStarttls(callback, state); - } - - public void End_timStarttls(IAsyncResult asyncResult) - { - oprot_.Transport.EndFlush(asyncResult); - } - - #endif - - /// - /// tls协议 - /// - public void timStarttls() - { - #if !SILVERLIGHT - send_timStarttls(); - - #else - var asyncResult = Begin_timStarttls(null, null); - - #endif - } - #if SILVERLIGHT - public IAsyncResult send_timStarttls(AsyncCallback callback, object state) - #else - public void send_timStarttls() - #endif - { - oprot_.WriteMessageBegin(new TMessage("timStarttls", TMessageType.Oneway, seqid_)); - timStarttls_args args = new timStarttls_args(); - args.Write(oprot_); - oprot_.WriteMessageEnd(); - #if SILVERLIGHT - return oprot_.Transport.BeginFlush(callback, state); - #else - oprot_.Transport.Flush(); - #endif - } - - - #if SILVERLIGHT - public IAsyncResult Begin_timLogin(AsyncCallback callback, object state, Tid tid, string pwd) - { - return send_timLogin(callback, state, tid, pwd); - } - - public void End_timLogin(IAsyncResult asyncResult) - { - oprot_.Transport.EndFlush(asyncResult); - } - - #endif - - /// - /// 登陆协议 - /// - /// - /// - public void timLogin(Tid tid, string pwd) - { - #if !SILVERLIGHT - send_timLogin(tid, pwd); - - #else - var asyncResult = Begin_timLogin(null, null, tid, pwd); - - #endif - } - #if SILVERLIGHT - public IAsyncResult send_timLogin(AsyncCallback callback, object state, Tid tid, string pwd) - #else - public void send_timLogin(Tid tid, string pwd) - #endif - { - oprot_.WriteMessageBegin(new TMessage("timLogin", TMessageType.Oneway, seqid_)); - timLogin_args args = new timLogin_args(); - args.Tid = tid; - args.Pwd = pwd; - args.Write(oprot_); - oprot_.WriteMessageEnd(); - #if SILVERLIGHT - return oprot_.Transport.BeginFlush(callback, state); - #else - oprot_.Transport.Flush(); - #endif - } - - - #if SILVERLIGHT - public IAsyncResult Begin_timAck(AsyncCallback callback, object state, TimAckBean ab) - { - return send_timAck(callback, state, ab); - } - - public void End_timAck(IAsyncResult asyncResult) - { - oprot_.Transport.EndFlush(asyncResult); - } - - #endif - - /// - /// 回执信息 - /// - /// - public void timAck(TimAckBean ab) - { - #if !SILVERLIGHT - send_timAck(ab); - - #else - var asyncResult = Begin_timAck(null, null, ab); - - #endif - } - #if SILVERLIGHT - public IAsyncResult send_timAck(AsyncCallback callback, object state, TimAckBean ab) - #else - public void send_timAck(TimAckBean ab) - #endif - { - oprot_.WriteMessageBegin(new TMessage("timAck", TMessageType.Oneway, seqid_)); - timAck_args args = new timAck_args(); - args.Ab = ab; - args.Write(oprot_); - oprot_.WriteMessageEnd(); - #if SILVERLIGHT - return oprot_.Transport.BeginFlush(callback, state); - #else - oprot_.Transport.Flush(); - #endif - } - - - #if SILVERLIGHT - public IAsyncResult Begin_timPresence(AsyncCallback callback, object state, TimPBean pbean) - { - return send_timPresence(callback, state, pbean); - } - - public void End_timPresence(IAsyncResult asyncResult) - { - oprot_.Transport.EndFlush(asyncResult); - } - - #endif - - /// - /// 广播出席协议或接收广播协议 - /// - /// - public void timPresence(TimPBean pbean) - { - #if !SILVERLIGHT - send_timPresence(pbean); - - #else - var asyncResult = Begin_timPresence(null, null, pbean); - - #endif - } - #if SILVERLIGHT - public IAsyncResult send_timPresence(AsyncCallback callback, object state, TimPBean pbean) - #else - public void send_timPresence(TimPBean pbean) - #endif - { - oprot_.WriteMessageBegin(new TMessage("timPresence", TMessageType.Oneway, seqid_)); - timPresence_args args = new timPresence_args(); - args.Pbean = pbean; - args.Write(oprot_); - oprot_.WriteMessageEnd(); - #if SILVERLIGHT - return oprot_.Transport.BeginFlush(callback, state); - #else - oprot_.Transport.Flush(); - #endif - } - - - #if SILVERLIGHT - public IAsyncResult Begin_timMessage(AsyncCallback callback, object state, TimMBean mbean) - { - return send_timMessage(callback, state, mbean); - } - - public void End_timMessage(IAsyncResult asyncResult) - { - oprot_.Transport.EndFlush(asyncResult); - } - - #endif - - /// - /// 发送信息或接收信息 - /// - /// - public void timMessage(TimMBean mbean) - { - #if !SILVERLIGHT - send_timMessage(mbean); - - #else - var asyncResult = Begin_timMessage(null, null, mbean); - - #endif - } - #if SILVERLIGHT - public IAsyncResult send_timMessage(AsyncCallback callback, object state, TimMBean mbean) - #else - public void send_timMessage(TimMBean mbean) - #endif - { - oprot_.WriteMessageBegin(new TMessage("timMessage", TMessageType.Oneway, seqid_)); - timMessage_args args = new timMessage_args(); - args.Mbean = mbean; - args.Write(oprot_); - oprot_.WriteMessageEnd(); - #if SILVERLIGHT - return oprot_.Transport.BeginFlush(callback, state); - #else - oprot_.Transport.Flush(); - #endif - } - - - #if SILVERLIGHT - public IAsyncResult Begin_timPing(AsyncCallback callback, object state, string threadId) - { - return send_timPing(callback, state, threadId); - } - - public void End_timPing(IAsyncResult asyncResult) - { - oprot_.Transport.EndFlush(asyncResult); - } - - #endif - - /// - /// ping 心跳协议 - /// - /// - public void timPing(string threadId) - { - #if !SILVERLIGHT - send_timPing(threadId); - - #else - var asyncResult = Begin_timPing(null, null, threadId); - - #endif - } - #if SILVERLIGHT - public IAsyncResult send_timPing(AsyncCallback callback, object state, string threadId) - #else - public void send_timPing(string threadId) - #endif - { - oprot_.WriteMessageBegin(new TMessage("timPing", TMessageType.Oneway, seqid_)); - timPing_args args = new timPing_args(); - args.ThreadId = threadId; - args.Write(oprot_); - oprot_.WriteMessageEnd(); - #if SILVERLIGHT - return oprot_.Transport.BeginFlush(callback, state); - #else - oprot_.Transport.Flush(); - #endif - } - - - #if SILVERLIGHT - public IAsyncResult Begin_timError(AsyncCallback callback, object state, TimError e) - { - return send_timError(callback, state, e); - } - - public void End_timError(IAsyncResult asyncResult) - { - oprot_.Transport.EndFlush(asyncResult); - } - - #endif - - /// - /// 错误通知 - /// - /// - public void timError(TimError e) - { - #if !SILVERLIGHT - send_timError(e); - - #else - var asyncResult = Begin_timError(null, null, e); - - #endif - } - #if SILVERLIGHT - public IAsyncResult send_timError(AsyncCallback callback, object state, TimError e) - #else - public void send_timError(TimError e) - #endif - { - oprot_.WriteMessageBegin(new TMessage("timError", TMessageType.Oneway, seqid_)); - timError_args args = new timError_args(); - args.E = e; - args.Write(oprot_); - oprot_.WriteMessageEnd(); - #if SILVERLIGHT - return oprot_.Transport.BeginFlush(callback, state); - #else - oprot_.Transport.Flush(); - #endif - } - - - #if SILVERLIGHT - public IAsyncResult Begin_timLogout(AsyncCallback callback, object state) - { - return send_timLogout(callback, state); - } - - public void End_timLogout(IAsyncResult asyncResult) - { - oprot_.Transport.EndFlush(asyncResult); - } - - #endif - - /// - /// 登出协议 - /// - public void timLogout() - { - #if !SILVERLIGHT - send_timLogout(); - - #else - var asyncResult = Begin_timLogout(null, null); - - #endif - } - #if SILVERLIGHT - public IAsyncResult send_timLogout(AsyncCallback callback, object state) - #else - public void send_timLogout() - #endif - { - oprot_.WriteMessageBegin(new TMessage("timLogout", TMessageType.Oneway, seqid_)); - timLogout_args args = new timLogout_args(); - args.Write(oprot_); - oprot_.WriteMessageEnd(); - #if SILVERLIGHT - return oprot_.Transport.BeginFlush(callback, state); - #else - oprot_.Transport.Flush(); - #endif - } - - - #if SILVERLIGHT - public IAsyncResult Begin_timRegist(AsyncCallback callback, object state, Tid tid, string auth) - { - return send_timRegist(callback, state, tid, auth); - } - - public void End_timRegist(IAsyncResult asyncResult) - { - oprot_.Transport.EndFlush(asyncResult); - } - - #endif - - /// - /// 注册协议 - /// - /// - /// - public void timRegist(Tid tid, string auth) - { - #if !SILVERLIGHT - send_timRegist(tid, auth); - - #else - var asyncResult = Begin_timRegist(null, null, tid, auth); - - #endif - } - #if SILVERLIGHT - public IAsyncResult send_timRegist(AsyncCallback callback, object state, Tid tid, string auth) - #else - public void send_timRegist(Tid tid, string auth) - #endif - { - oprot_.WriteMessageBegin(new TMessage("timRegist", TMessageType.Oneway, seqid_)); - timRegist_args args = new timRegist_args(); - args.Tid = tid; - args.Auth = auth; - args.Write(oprot_); - oprot_.WriteMessageEnd(); - #if SILVERLIGHT - return oprot_.Transport.BeginFlush(callback, state); - #else - oprot_.Transport.Flush(); - #endif - } - - - #if SILVERLIGHT - public IAsyncResult Begin_timRoser(AsyncCallback callback, object state, TimRoster roster) - { - return send_timRoser(callback, state, roster); - } - - public void End_timRoser(IAsyncResult asyncResult) - { - oprot_.Transport.EndFlush(asyncResult); - } - - #endif - - /// - /// 花名册 - /// - /// - public void timRoser(TimRoster roster) - { - #if !SILVERLIGHT - send_timRoser(roster); - - #else - var asyncResult = Begin_timRoser(null, null, roster); - - #endif - } - #if SILVERLIGHT - public IAsyncResult send_timRoser(AsyncCallback callback, object state, TimRoster roster) - #else - public void send_timRoser(TimRoster roster) - #endif - { - oprot_.WriteMessageBegin(new TMessage("timRoser", TMessageType.Oneway, seqid_)); - timRoser_args args = new timRoser_args(); - args.Roster = roster; - args.Write(oprot_); - oprot_.WriteMessageEnd(); - #if SILVERLIGHT - return oprot_.Transport.BeginFlush(callback, state); - #else - oprot_.Transport.Flush(); - #endif - } - - - #if SILVERLIGHT - public IAsyncResult Begin_timMessageList(AsyncCallback callback, object state, TimMBeanList mbeanList) - { - return send_timMessageList(callback, state, mbeanList); - } - - public void End_timMessageList(IAsyncResult asyncResult) - { - oprot_.Transport.EndFlush(asyncResult); - } - - #endif - - /// - /// 发送信息或接收信息列表(合流) - /// - /// - public void timMessageList(TimMBeanList mbeanList) - { - #if !SILVERLIGHT - send_timMessageList(mbeanList); - - #else - var asyncResult = Begin_timMessageList(null, null, mbeanList); - - #endif - } - #if SILVERLIGHT - public IAsyncResult send_timMessageList(AsyncCallback callback, object state, TimMBeanList mbeanList) - #else - public void send_timMessageList(TimMBeanList mbeanList) - #endif - { - oprot_.WriteMessageBegin(new TMessage("timMessageList", TMessageType.Oneway, seqid_)); - timMessageList_args args = new timMessageList_args(); - args.MbeanList = mbeanList; - args.Write(oprot_); - oprot_.WriteMessageEnd(); - #if SILVERLIGHT - return oprot_.Transport.BeginFlush(callback, state); - #else - oprot_.Transport.Flush(); - #endif - } - - - #if SILVERLIGHT - public IAsyncResult Begin_timPresenceList(AsyncCallback callback, object state, TimPBeanList pbeanList) - { - return send_timPresenceList(callback, state, pbeanList); - } - - public void End_timPresenceList(IAsyncResult asyncResult) - { - oprot_.Transport.EndFlush(asyncResult); - } - - #endif - - /// - /// 发送状态信息列表(合流) - /// - /// - public void timPresenceList(TimPBeanList pbeanList) - { - #if !SILVERLIGHT - send_timPresenceList(pbeanList); - - #else - var asyncResult = Begin_timPresenceList(null, null, pbeanList); - - #endif - } - #if SILVERLIGHT - public IAsyncResult send_timPresenceList(AsyncCallback callback, object state, TimPBeanList pbeanList) - #else - public void send_timPresenceList(TimPBeanList pbeanList) - #endif - { - oprot_.WriteMessageBegin(new TMessage("timPresenceList", TMessageType.Oneway, seqid_)); - timPresenceList_args args = new timPresenceList_args(); - args.PbeanList = pbeanList; - args.Write(oprot_); - oprot_.WriteMessageEnd(); - #if SILVERLIGHT - return oprot_.Transport.BeginFlush(callback, state); - #else - oprot_.Transport.Flush(); - #endif - } - - - #if SILVERLIGHT - public IAsyncResult Begin_timMessageIq(AsyncCallback callback, object state, TimMessageIq timMsgIq, string iqType) - { - return send_timMessageIq(callback, state, timMsgIq, iqType); - } - - public void End_timMessageIq(IAsyncResult asyncResult) - { - oprot_.Transport.EndFlush(asyncResult); - } - - #endif - - /// - /// 信息请求 get请求数据 del删除 - /// - /// - /// - public void timMessageIq(TimMessageIq timMsgIq, string iqType) - { - #if !SILVERLIGHT - send_timMessageIq(timMsgIq, iqType); - - #else - var asyncResult = Begin_timMessageIq(null, null, timMsgIq, iqType); - - #endif - } - #if SILVERLIGHT - public IAsyncResult send_timMessageIq(AsyncCallback callback, object state, TimMessageIq timMsgIq, string iqType) - #else - public void send_timMessageIq(TimMessageIq timMsgIq, string iqType) - #endif - { - oprot_.WriteMessageBegin(new TMessage("timMessageIq", TMessageType.Oneway, seqid_)); - timMessageIq_args args = new timMessageIq_args(); - args.TimMsgIq = timMsgIq; - args.IqType = iqType; - args.Write(oprot_); - oprot_.WriteMessageEnd(); - #if SILVERLIGHT - return oprot_.Transport.BeginFlush(callback, state); - #else - oprot_.Transport.Flush(); - #endif - } - - - #if SILVERLIGHT - public IAsyncResult Begin_timMessageResult(AsyncCallback callback, object state, TimMBean mbean) - { - return send_timMessageResult(callback, state, mbean); - } - - public void End_timMessageResult(IAsyncResult asyncResult) - { - oprot_.Transport.EndFlush(asyncResult); - } - - #endif - - /// - /// 信息请求 - /// - /// - public void timMessageResult(TimMBean mbean) - { - #if !SILVERLIGHT - send_timMessageResult(mbean); - - #else - var asyncResult = Begin_timMessageResult(null, null, mbean); - - #endif - } - #if SILVERLIGHT - public IAsyncResult send_timMessageResult(AsyncCallback callback, object state, TimMBean mbean) - #else - public void send_timMessageResult(TimMBean mbean) - #endif - { - oprot_.WriteMessageBegin(new TMessage("timMessageResult", TMessageType.Oneway, seqid_)); - timMessageResult_args args = new timMessageResult_args(); - args.Mbean = mbean; - args.Write(oprot_); - oprot_.WriteMessageEnd(); - #if SILVERLIGHT - return oprot_.Transport.BeginFlush(callback, state); - #else - oprot_.Transport.Flush(); - #endif - } - - - #if SILVERLIGHT - public IAsyncResult Begin_timProperty(AsyncCallback callback, object state, TimPropertyBean tpb) - { - return send_timProperty(callback, state, tpb); - } - - public void End_timProperty(IAsyncResult asyncResult) - { - oprot_.Transport.EndFlush(asyncResult); - } - - #endif - - /// - /// 用户协议属性请求 - /// - /// - public void timProperty(TimPropertyBean tpb) - { - #if !SILVERLIGHT - send_timProperty(tpb); - - #else - var asyncResult = Begin_timProperty(null, null, tpb); - - #endif - } - #if SILVERLIGHT - public IAsyncResult send_timProperty(AsyncCallback callback, object state, TimPropertyBean tpb) - #else - public void send_timProperty(TimPropertyBean tpb) - #endif - { - oprot_.WriteMessageBegin(new TMessage("timProperty", TMessageType.Oneway, seqid_)); - timProperty_args args = new timProperty_args(); - args.Tpb = tpb; - args.Write(oprot_); - oprot_.WriteMessageEnd(); - #if SILVERLIGHT - return oprot_.Transport.BeginFlush(callback, state); - #else - oprot_.Transport.Flush(); - #endif - } - - - #if SILVERLIGHT - public IAsyncResult Begin_timRemoteUserAuth(AsyncCallback callback, object state, Tid tid, string pwd, TimAuth auth) - { - return send_timRemoteUserAuth(callback, state, tid, pwd, auth); - } - - public TimRemoteUserBean End_timRemoteUserAuth(IAsyncResult asyncResult) - { - oprot_.Transport.EndFlush(asyncResult); - return recv_timRemoteUserAuth(); - } - - #endif - - /// - /// 请求远程验证信息 - /// - /// - /// - /// - public TimRemoteUserBean timRemoteUserAuth(Tid tid, string pwd, TimAuth auth) - { - #if !SILVERLIGHT - send_timRemoteUserAuth(tid, pwd, auth); - return recv_timRemoteUserAuth(); - - #else - var asyncResult = Begin_timRemoteUserAuth(null, null, tid, pwd, auth); - return End_timRemoteUserAuth(asyncResult); - - #endif - } - #if SILVERLIGHT - public IAsyncResult send_timRemoteUserAuth(AsyncCallback callback, object state, Tid tid, string pwd, TimAuth auth) - #else - public void send_timRemoteUserAuth(Tid tid, string pwd, TimAuth auth) - #endif - { - oprot_.WriteMessageBegin(new TMessage("timRemoteUserAuth", TMessageType.Call, seqid_)); - timRemoteUserAuth_args args = new timRemoteUserAuth_args(); - args.Tid = tid; - args.Pwd = pwd; - args.Auth = auth; - args.Write(oprot_); - oprot_.WriteMessageEnd(); - #if SILVERLIGHT - return oprot_.Transport.BeginFlush(callback, state); - #else - oprot_.Transport.Flush(); - #endif - } - - public TimRemoteUserBean recv_timRemoteUserAuth() - { - TMessage msg = iprot_.ReadMessageBegin(); - if (msg.Type == TMessageType.Exception) { - TApplicationException x = TApplicationException.Read(iprot_); - iprot_.ReadMessageEnd(); - throw x; - } - timRemoteUserAuth_result result = new timRemoteUserAuth_result(); - result.Read(iprot_); - iprot_.ReadMessageEnd(); - if (result.__isset.success) { - return result.Success; - } - throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "timRemoteUserAuth failed: unknown result"); - } - - - #if SILVERLIGHT - public IAsyncResult Begin_timRemoteUserGet(AsyncCallback callback, object state, Tid tid, TimAuth auth) - { - return send_timRemoteUserGet(callback, state, tid, auth); - } - - public TimRemoteUserBean End_timRemoteUserGet(IAsyncResult asyncResult) - { - oprot_.Transport.EndFlush(asyncResult); - return recv_timRemoteUserGet(); - } - - #endif - - /// - /// 请求远程用户信息 - /// - /// - /// - public TimRemoteUserBean timRemoteUserGet(Tid tid, TimAuth auth) - { - #if !SILVERLIGHT - send_timRemoteUserGet(tid, auth); - return recv_timRemoteUserGet(); - - #else - var asyncResult = Begin_timRemoteUserGet(null, null, tid, auth); - return End_timRemoteUserGet(asyncResult); - - #endif - } - #if SILVERLIGHT - public IAsyncResult send_timRemoteUserGet(AsyncCallback callback, object state, Tid tid, TimAuth auth) - #else - public void send_timRemoteUserGet(Tid tid, TimAuth auth) - #endif - { - oprot_.WriteMessageBegin(new TMessage("timRemoteUserGet", TMessageType.Call, seqid_)); - timRemoteUserGet_args args = new timRemoteUserGet_args(); - args.Tid = tid; - args.Auth = auth; - args.Write(oprot_); - oprot_.WriteMessageEnd(); - #if SILVERLIGHT - return oprot_.Transport.BeginFlush(callback, state); - #else - oprot_.Transport.Flush(); - #endif - } - - public TimRemoteUserBean recv_timRemoteUserGet() - { - TMessage msg = iprot_.ReadMessageBegin(); - if (msg.Type == TMessageType.Exception) { - TApplicationException x = TApplicationException.Read(iprot_); - iprot_.ReadMessageEnd(); - throw x; - } - timRemoteUserGet_result result = new timRemoteUserGet_result(); - result.Read(iprot_); - iprot_.ReadMessageEnd(); - if (result.__isset.success) { - return result.Success; - } - throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "timRemoteUserGet failed: unknown result"); - } - - - #if SILVERLIGHT - public IAsyncResult Begin_timRemoteUserEdit(AsyncCallback callback, object state, Tid tid, TimUserBean ub, TimAuth auth) - { - return send_timRemoteUserEdit(callback, state, tid, ub, auth); - } - - public TimRemoteUserBean End_timRemoteUserEdit(IAsyncResult asyncResult) - { - oprot_.Transport.EndFlush(asyncResult); - return recv_timRemoteUserEdit(); - } - - #endif - - /// - /// 编辑远程用户信息 - /// - /// - /// - /// - public TimRemoteUserBean timRemoteUserEdit(Tid tid, TimUserBean ub, TimAuth auth) - { - #if !SILVERLIGHT - send_timRemoteUserEdit(tid, ub, auth); - return recv_timRemoteUserEdit(); - - #else - var asyncResult = Begin_timRemoteUserEdit(null, null, tid, ub, auth); - return End_timRemoteUserEdit(asyncResult); - - #endif - } - #if SILVERLIGHT - public IAsyncResult send_timRemoteUserEdit(AsyncCallback callback, object state, Tid tid, TimUserBean ub, TimAuth auth) - #else - public void send_timRemoteUserEdit(Tid tid, TimUserBean ub, TimAuth auth) - #endif - { - oprot_.WriteMessageBegin(new TMessage("timRemoteUserEdit", TMessageType.Call, seqid_)); - timRemoteUserEdit_args args = new timRemoteUserEdit_args(); - args.Tid = tid; - args.Ub = ub; - args.Auth = auth; - args.Write(oprot_); - oprot_.WriteMessageEnd(); - #if SILVERLIGHT - return oprot_.Transport.BeginFlush(callback, state); - #else - oprot_.Transport.Flush(); - #endif - } - - public TimRemoteUserBean recv_timRemoteUserEdit() - { - TMessage msg = iprot_.ReadMessageBegin(); - if (msg.Type == TMessageType.Exception) { - TApplicationException x = TApplicationException.Read(iprot_); - iprot_.ReadMessageEnd(); - throw x; - } - timRemoteUserEdit_result result = new timRemoteUserEdit_result(); - result.Read(iprot_); - iprot_.ReadMessageEnd(); - if (result.__isset.success) { - return result.Success; - } - throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "timRemoteUserEdit failed: unknown result"); - } - - - #if SILVERLIGHT - public IAsyncResult Begin_timResponsePresence(AsyncCallback callback, object state, TimPBean pbean, TimAuth auth) - { - return send_timResponsePresence(callback, state, pbean, auth); - } - - public TimResponseBean End_timResponsePresence(IAsyncResult asyncResult) - { - oprot_.Transport.EndFlush(asyncResult); - return recv_timResponsePresence(); - } - - #endif - - /// - /// 广播出席协议或接收广播协议 - /// - /// - /// - public TimResponseBean timResponsePresence(TimPBean pbean, TimAuth auth) - { - #if !SILVERLIGHT - send_timResponsePresence(pbean, auth); - return recv_timResponsePresence(); - - #else - var asyncResult = Begin_timResponsePresence(null, null, pbean, auth); - return End_timResponsePresence(asyncResult); - - #endif - } - #if SILVERLIGHT - public IAsyncResult send_timResponsePresence(AsyncCallback callback, object state, TimPBean pbean, TimAuth auth) - #else - public void send_timResponsePresence(TimPBean pbean, TimAuth auth) - #endif - { - oprot_.WriteMessageBegin(new TMessage("timResponsePresence", TMessageType.Call, seqid_)); - timResponsePresence_args args = new timResponsePresence_args(); - args.Pbean = pbean; - args.Auth = auth; - args.Write(oprot_); - oprot_.WriteMessageEnd(); - #if SILVERLIGHT - return oprot_.Transport.BeginFlush(callback, state); - #else - oprot_.Transport.Flush(); - #endif - } - - public TimResponseBean recv_timResponsePresence() - { - TMessage msg = iprot_.ReadMessageBegin(); - if (msg.Type == TMessageType.Exception) { - TApplicationException x = TApplicationException.Read(iprot_); - iprot_.ReadMessageEnd(); - throw x; - } - timResponsePresence_result result = new timResponsePresence_result(); - result.Read(iprot_); - iprot_.ReadMessageEnd(); - if (result.__isset.success) { - return result.Success; - } - throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "timResponsePresence failed: unknown result"); - } - - - #if SILVERLIGHT - public IAsyncResult Begin_timResponseMessage(AsyncCallback callback, object state, TimMBean mbean, TimAuth auth) - { - return send_timResponseMessage(callback, state, mbean, auth); - } - - public TimResponseBean End_timResponseMessage(IAsyncResult asyncResult) - { - oprot_.Transport.EndFlush(asyncResult); - return recv_timResponseMessage(); - } - - #endif - - /// - /// 发送信息或接收信息 - /// - /// - /// - public TimResponseBean timResponseMessage(TimMBean mbean, TimAuth auth) - { - #if !SILVERLIGHT - send_timResponseMessage(mbean, auth); - return recv_timResponseMessage(); - - #else - var asyncResult = Begin_timResponseMessage(null, null, mbean, auth); - return End_timResponseMessage(asyncResult); - - #endif - } - #if SILVERLIGHT - public IAsyncResult send_timResponseMessage(AsyncCallback callback, object state, TimMBean mbean, TimAuth auth) - #else - public void send_timResponseMessage(TimMBean mbean, TimAuth auth) - #endif - { - oprot_.WriteMessageBegin(new TMessage("timResponseMessage", TMessageType.Call, seqid_)); - timResponseMessage_args args = new timResponseMessage_args(); - args.Mbean = mbean; - args.Auth = auth; - args.Write(oprot_); - oprot_.WriteMessageEnd(); - #if SILVERLIGHT - return oprot_.Transport.BeginFlush(callback, state); - #else - oprot_.Transport.Flush(); - #endif - } - - public TimResponseBean recv_timResponseMessage() - { - TMessage msg = iprot_.ReadMessageBegin(); - if (msg.Type == TMessageType.Exception) { - TApplicationException x = TApplicationException.Read(iprot_); - iprot_.ReadMessageEnd(); - throw x; - } - timResponseMessage_result result = new timResponseMessage_result(); - result.Read(iprot_); - iprot_.ReadMessageEnd(); - if (result.__isset.success) { - return result.Success; - } - throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "timResponseMessage failed: unknown result"); - } - - - #if SILVERLIGHT - public IAsyncResult Begin_timResponseMessageIq(AsyncCallback callback, object state, TimMessageIq timMsgIq, string iqType, TimAuth auth) - { - return send_timResponseMessageIq(callback, state, timMsgIq, iqType, auth); - } - - public TimMBeanList End_timResponseMessageIq(IAsyncResult asyncResult) - { - oprot_.Transport.EndFlush(asyncResult); - return recv_timResponseMessageIq(); - } - - #endif - - /// - /// 信息请求 get请求数据 del删除(辅助接口) - /// - /// - /// - /// - public TimMBeanList timResponseMessageIq(TimMessageIq timMsgIq, string iqType, TimAuth auth) - { - #if !SILVERLIGHT - send_timResponseMessageIq(timMsgIq, iqType, auth); - return recv_timResponseMessageIq(); - - #else - var asyncResult = Begin_timResponseMessageIq(null, null, timMsgIq, iqType, auth); - return End_timResponseMessageIq(asyncResult); - - #endif - } - #if SILVERLIGHT - public IAsyncResult send_timResponseMessageIq(AsyncCallback callback, object state, TimMessageIq timMsgIq, string iqType, TimAuth auth) - #else - public void send_timResponseMessageIq(TimMessageIq timMsgIq, string iqType, TimAuth auth) - #endif - { - oprot_.WriteMessageBegin(new TMessage("timResponseMessageIq", TMessageType.Call, seqid_)); - timResponseMessageIq_args args = new timResponseMessageIq_args(); - args.TimMsgIq = timMsgIq; - args.IqType = iqType; - args.Auth = auth; - args.Write(oprot_); - oprot_.WriteMessageEnd(); - #if SILVERLIGHT - return oprot_.Transport.BeginFlush(callback, state); - #else - oprot_.Transport.Flush(); - #endif - } - - public TimMBeanList recv_timResponseMessageIq() - { - TMessage msg = iprot_.ReadMessageBegin(); - if (msg.Type == TMessageType.Exception) { - TApplicationException x = TApplicationException.Read(iprot_); - iprot_.ReadMessageEnd(); - throw x; - } - timResponseMessageIq_result result = new timResponseMessageIq_result(); - result.Read(iprot_); - iprot_.ReadMessageEnd(); - if (result.__isset.success) { - return result.Success; - } - throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "timResponseMessageIq failed: unknown result"); - } - - - #if SILVERLIGHT - public IAsyncResult Begin_timResponsePresenceList(AsyncCallback callback, object state, TimPBeanList pbeanList, TimAuth auth) - { - return send_timResponsePresenceList(callback, state, pbeanList, auth); - } - - public TimResponseBean End_timResponsePresenceList(IAsyncResult asyncResult) - { - oprot_.Transport.EndFlush(asyncResult); - return recv_timResponsePresenceList(); - } - - #endif - - /// - /// 广播出席协议或接收广播协议 - /// - /// - /// - public TimResponseBean timResponsePresenceList(TimPBeanList pbeanList, TimAuth auth) - { - #if !SILVERLIGHT - send_timResponsePresenceList(pbeanList, auth); - return recv_timResponsePresenceList(); - - #else - var asyncResult = Begin_timResponsePresenceList(null, null, pbeanList, auth); - return End_timResponsePresenceList(asyncResult); - - #endif - } - #if SILVERLIGHT - public IAsyncResult send_timResponsePresenceList(AsyncCallback callback, object state, TimPBeanList pbeanList, TimAuth auth) - #else - public void send_timResponsePresenceList(TimPBeanList pbeanList, TimAuth auth) - #endif - { - oprot_.WriteMessageBegin(new TMessage("timResponsePresenceList", TMessageType.Call, seqid_)); - timResponsePresenceList_args args = new timResponsePresenceList_args(); - args.PbeanList = pbeanList; - args.Auth = auth; - args.Write(oprot_); - oprot_.WriteMessageEnd(); - #if SILVERLIGHT - return oprot_.Transport.BeginFlush(callback, state); - #else - oprot_.Transport.Flush(); - #endif - } - - public TimResponseBean recv_timResponsePresenceList() - { - TMessage msg = iprot_.ReadMessageBegin(); - if (msg.Type == TMessageType.Exception) { - TApplicationException x = TApplicationException.Read(iprot_); - iprot_.ReadMessageEnd(); - throw x; - } - timResponsePresenceList_result result = new timResponsePresenceList_result(); - result.Read(iprot_); - iprot_.ReadMessageEnd(); - if (result.__isset.success) { - return result.Success; - } - throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "timResponsePresenceList failed: unknown result"); - } - - - #if SILVERLIGHT - public IAsyncResult Begin_timResponseMessageList(AsyncCallback callback, object state, TimMBeanList mbeanList, TimAuth auth) - { - return send_timResponseMessageList(callback, state, mbeanList, auth); - } - - public TimResponseBean End_timResponseMessageList(IAsyncResult asyncResult) - { - oprot_.Transport.EndFlush(asyncResult); - return recv_timResponseMessageList(); - } - - #endif - - /// - /// 发送信息或接收信息 - /// - /// - /// - public TimResponseBean timResponseMessageList(TimMBeanList mbeanList, TimAuth auth) - { - #if !SILVERLIGHT - send_timResponseMessageList(mbeanList, auth); - return recv_timResponseMessageList(); - - #else - var asyncResult = Begin_timResponseMessageList(null, null, mbeanList, auth); - return End_timResponseMessageList(asyncResult); - - #endif - } - #if SILVERLIGHT - public IAsyncResult send_timResponseMessageList(AsyncCallback callback, object state, TimMBeanList mbeanList, TimAuth auth) - #else - public void send_timResponseMessageList(TimMBeanList mbeanList, TimAuth auth) - #endif - { - oprot_.WriteMessageBegin(new TMessage("timResponseMessageList", TMessageType.Call, seqid_)); - timResponseMessageList_args args = new timResponseMessageList_args(); - args.MbeanList = mbeanList; - args.Auth = auth; - args.Write(oprot_); - oprot_.WriteMessageEnd(); - #if SILVERLIGHT - return oprot_.Transport.BeginFlush(callback, state); - #else - oprot_.Transport.Flush(); - #endif - } - - public TimResponseBean recv_timResponseMessageList() - { - TMessage msg = iprot_.ReadMessageBegin(); - if (msg.Type == TMessageType.Exception) { - TApplicationException x = TApplicationException.Read(iprot_); - iprot_.ReadMessageEnd(); - throw x; - } - timResponseMessageList_result result = new timResponseMessageList_result(); - result.Read(iprot_); - iprot_.ReadMessageEnd(); - if (result.__isset.success) { - return result.Success; - } - throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "timResponseMessageList failed: unknown result"); - } - - } - public class Processor : TProcessor { - public Processor(Iface iface) - { - iface_ = iface; - processMap_["timStream"] = timStream_Process; - processMap_["timStarttls"] = timStarttls_Process; - processMap_["timLogin"] = timLogin_Process; - processMap_["timAck"] = timAck_Process; - processMap_["timPresence"] = timPresence_Process; - processMap_["timMessage"] = timMessage_Process; - processMap_["timPing"] = timPing_Process; - processMap_["timError"] = timError_Process; - processMap_["timLogout"] = timLogout_Process; - processMap_["timRegist"] = timRegist_Process; - processMap_["timRoser"] = timRoser_Process; - processMap_["timMessageList"] = timMessageList_Process; - processMap_["timPresenceList"] = timPresenceList_Process; - processMap_["timMessageIq"] = timMessageIq_Process; - processMap_["timMessageResult"] = timMessageResult_Process; - processMap_["timProperty"] = timProperty_Process; - processMap_["timRemoteUserAuth"] = timRemoteUserAuth_Process; - processMap_["timRemoteUserGet"] = timRemoteUserGet_Process; - processMap_["timRemoteUserEdit"] = timRemoteUserEdit_Process; - processMap_["timResponsePresence"] = timResponsePresence_Process; - processMap_["timResponseMessage"] = timResponseMessage_Process; - processMap_["timResponseMessageIq"] = timResponseMessageIq_Process; - processMap_["timResponsePresenceList"] = timResponsePresenceList_Process; - processMap_["timResponseMessageList"] = timResponseMessageList_Process; - } - - protected delegate void ProcessFunction(int seqid, TProtocol iprot, TProtocol oprot); - private Iface iface_; - protected Dictionary processMap_ = new Dictionary(); - - public bool Process(TProtocol iprot, TProtocol oprot) - { - try - { - TMessage msg = iprot.ReadMessageBegin(); - ProcessFunction fn; - processMap_.TryGetValue(msg.Name, out fn); - if (fn == null) { - TProtocolUtil.Skip(iprot, TType.Struct); - iprot.ReadMessageEnd(); - TApplicationException x = new TApplicationException (TApplicationException.ExceptionType.UnknownMethod, "Invalid method name: '" + msg.Name + "'"); - oprot.WriteMessageBegin(new TMessage(msg.Name, TMessageType.Exception, msg.SeqID)); - x.Write(oprot); - oprot.WriteMessageEnd(); - oprot.Transport.Flush(); - return true; - } - fn(msg.SeqID, iprot, oprot); - } - catch (IOException) - { - return false; - } - return true; - } - - public void timStream_Process(int seqid, TProtocol iprot, TProtocol oprot) - { - timStream_args args = new timStream_args(); - args.Read(iprot); - iprot.ReadMessageEnd(); - iface_.timStream(args.Param); - return; - } - public void timStarttls_Process(int seqid, TProtocol iprot, TProtocol oprot) - { - timStarttls_args args = new timStarttls_args(); - args.Read(iprot); - iprot.ReadMessageEnd(); - iface_.timStarttls(); - return; - } - public void timLogin_Process(int seqid, TProtocol iprot, TProtocol oprot) - { - timLogin_args args = new timLogin_args(); - args.Read(iprot); - iprot.ReadMessageEnd(); - iface_.timLogin(args.Tid, args.Pwd); - return; - } - public void timAck_Process(int seqid, TProtocol iprot, TProtocol oprot) - { - timAck_args args = new timAck_args(); - args.Read(iprot); - iprot.ReadMessageEnd(); - iface_.timAck(args.Ab); - return; - } - public void timPresence_Process(int seqid, TProtocol iprot, TProtocol oprot) - { - timPresence_args args = new timPresence_args(); - args.Read(iprot); - iprot.ReadMessageEnd(); - iface_.timPresence(args.Pbean); - return; - } - public void timMessage_Process(int seqid, TProtocol iprot, TProtocol oprot) - { - timMessage_args args = new timMessage_args(); - args.Read(iprot); - iprot.ReadMessageEnd(); - iface_.timMessage(args.Mbean); - return; - } - public void timPing_Process(int seqid, TProtocol iprot, TProtocol oprot) - { - timPing_args args = new timPing_args(); - args.Read(iprot); - iprot.ReadMessageEnd(); - iface_.timPing(args.ThreadId); - return; - } - public void timError_Process(int seqid, TProtocol iprot, TProtocol oprot) - { - timError_args args = new timError_args(); - args.Read(iprot); - iprot.ReadMessageEnd(); - iface_.timError(args.E); - return; - } - public void timLogout_Process(int seqid, TProtocol iprot, TProtocol oprot) - { - timLogout_args args = new timLogout_args(); - args.Read(iprot); - iprot.ReadMessageEnd(); - iface_.timLogout(); - return; - } - public void timRegist_Process(int seqid, TProtocol iprot, TProtocol oprot) - { - timRegist_args args = new timRegist_args(); - args.Read(iprot); - iprot.ReadMessageEnd(); - iface_.timRegist(args.Tid, args.Auth); - return; - } - public void timRoser_Process(int seqid, TProtocol iprot, TProtocol oprot) - { - timRoser_args args = new timRoser_args(); - args.Read(iprot); - iprot.ReadMessageEnd(); - iface_.timRoser(args.Roster); - return; - } - public void timMessageList_Process(int seqid, TProtocol iprot, TProtocol oprot) - { - timMessageList_args args = new timMessageList_args(); - args.Read(iprot); - iprot.ReadMessageEnd(); - iface_.timMessageList(args.MbeanList); - return; - } - public void timPresenceList_Process(int seqid, TProtocol iprot, TProtocol oprot) - { - timPresenceList_args args = new timPresenceList_args(); - args.Read(iprot); - iprot.ReadMessageEnd(); - iface_.timPresenceList(args.PbeanList); - return; - } - public void timMessageIq_Process(int seqid, TProtocol iprot, TProtocol oprot) - { - timMessageIq_args args = new timMessageIq_args(); - args.Read(iprot); - iprot.ReadMessageEnd(); - iface_.timMessageIq(args.TimMsgIq, args.IqType); - return; - } - public void timMessageResult_Process(int seqid, TProtocol iprot, TProtocol oprot) - { - timMessageResult_args args = new timMessageResult_args(); - args.Read(iprot); - iprot.ReadMessageEnd(); - iface_.timMessageResult(args.Mbean); - return; - } - public void timProperty_Process(int seqid, TProtocol iprot, TProtocol oprot) - { - timProperty_args args = new timProperty_args(); - args.Read(iprot); - iprot.ReadMessageEnd(); - iface_.timProperty(args.Tpb); - return; - } - public void timRemoteUserAuth_Process(int seqid, TProtocol iprot, TProtocol oprot) - { - timRemoteUserAuth_args args = new timRemoteUserAuth_args(); - args.Read(iprot); - iprot.ReadMessageEnd(); - timRemoteUserAuth_result result = new timRemoteUserAuth_result(); - result.Success = iface_.timRemoteUserAuth(args.Tid, args.Pwd, args.Auth); - oprot.WriteMessageBegin(new TMessage("timRemoteUserAuth", TMessageType.Reply, seqid)); - result.Write(oprot); - oprot.WriteMessageEnd(); - oprot.Transport.Flush(); - } - - public void timRemoteUserGet_Process(int seqid, TProtocol iprot, TProtocol oprot) - { - timRemoteUserGet_args args = new timRemoteUserGet_args(); - args.Read(iprot); - iprot.ReadMessageEnd(); - timRemoteUserGet_result result = new timRemoteUserGet_result(); - result.Success = iface_.timRemoteUserGet(args.Tid, args.Auth); - oprot.WriteMessageBegin(new TMessage("timRemoteUserGet", TMessageType.Reply, seqid)); - result.Write(oprot); - oprot.WriteMessageEnd(); - oprot.Transport.Flush(); - } - - public void timRemoteUserEdit_Process(int seqid, TProtocol iprot, TProtocol oprot) - { - timRemoteUserEdit_args args = new timRemoteUserEdit_args(); - args.Read(iprot); - iprot.ReadMessageEnd(); - timRemoteUserEdit_result result = new timRemoteUserEdit_result(); - result.Success = iface_.timRemoteUserEdit(args.Tid, args.Ub, args.Auth); - oprot.WriteMessageBegin(new TMessage("timRemoteUserEdit", TMessageType.Reply, seqid)); - result.Write(oprot); - oprot.WriteMessageEnd(); - oprot.Transport.Flush(); - } - - public void timResponsePresence_Process(int seqid, TProtocol iprot, TProtocol oprot) - { - timResponsePresence_args args = new timResponsePresence_args(); - args.Read(iprot); - iprot.ReadMessageEnd(); - timResponsePresence_result result = new timResponsePresence_result(); - result.Success = iface_.timResponsePresence(args.Pbean, args.Auth); - oprot.WriteMessageBegin(new TMessage("timResponsePresence", TMessageType.Reply, seqid)); - result.Write(oprot); - oprot.WriteMessageEnd(); - oprot.Transport.Flush(); - } - - public void timResponseMessage_Process(int seqid, TProtocol iprot, TProtocol oprot) - { - timResponseMessage_args args = new timResponseMessage_args(); - args.Read(iprot); - iprot.ReadMessageEnd(); - timResponseMessage_result result = new timResponseMessage_result(); - result.Success = iface_.timResponseMessage(args.Mbean, args.Auth); - oprot.WriteMessageBegin(new TMessage("timResponseMessage", TMessageType.Reply, seqid)); - result.Write(oprot); - oprot.WriteMessageEnd(); - oprot.Transport.Flush(); - } - - public void timResponseMessageIq_Process(int seqid, TProtocol iprot, TProtocol oprot) - { - timResponseMessageIq_args args = new timResponseMessageIq_args(); - args.Read(iprot); - iprot.ReadMessageEnd(); - timResponseMessageIq_result result = new timResponseMessageIq_result(); - result.Success = iface_.timResponseMessageIq(args.TimMsgIq, args.IqType, args.Auth); - oprot.WriteMessageBegin(new TMessage("timResponseMessageIq", TMessageType.Reply, seqid)); - result.Write(oprot); - oprot.WriteMessageEnd(); - oprot.Transport.Flush(); - } - - public void timResponsePresenceList_Process(int seqid, TProtocol iprot, TProtocol oprot) - { - timResponsePresenceList_args args = new timResponsePresenceList_args(); - args.Read(iprot); - iprot.ReadMessageEnd(); - timResponsePresenceList_result result = new timResponsePresenceList_result(); - result.Success = iface_.timResponsePresenceList(args.PbeanList, args.Auth); - oprot.WriteMessageBegin(new TMessage("timResponsePresenceList", TMessageType.Reply, seqid)); - result.Write(oprot); - oprot.WriteMessageEnd(); - oprot.Transport.Flush(); - } - - public void timResponseMessageList_Process(int seqid, TProtocol iprot, TProtocol oprot) - { - timResponseMessageList_args args = new timResponseMessageList_args(); - args.Read(iprot); - iprot.ReadMessageEnd(); - timResponseMessageList_result result = new timResponseMessageList_result(); - result.Success = iface_.timResponseMessageList(args.MbeanList, args.Auth); - oprot.WriteMessageBegin(new TMessage("timResponseMessageList", TMessageType.Reply, seqid)); - result.Write(oprot); - oprot.WriteMessageEnd(); - oprot.Transport.Flush(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timStream_args : TBase - { - private TimParam _param; - - public TimParam Param - { - get - { - return _param; - } - set - { - __isset.param = true; - this._param = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool param; - } - - public timStream_args() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - Param = new TimParam(); - Param.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timStream_args"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Param != null && __isset.param) { - field.Name = "param"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - Param.Write(oprot); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timStream_args("); - bool __first = true; - if (Param != null && __isset.param) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Param: "); - __sb.Append(Param== null ? "" : Param.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timStarttls_args : TBase - { - - public timStarttls_args() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timStarttls_args"); - oprot.WriteStructBegin(struc); - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timStarttls_args("); - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timLogin_args : TBase - { - private Tid _tid; - private string _pwd; - - public Tid Tid - { - get - { - return _tid; - } - set - { - __isset.tid = true; - this._tid = value; - } - } - - public string Pwd - { - get - { - return _pwd; - } - set - { - __isset.pwd = true; - this._pwd = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool tid; - public bool pwd; - } - - public timLogin_args() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - Tid = new Tid(); - Tid.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.String) { - Pwd = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timLogin_args"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Tid != null && __isset.tid) { - field.Name = "tid"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - Tid.Write(oprot); - oprot.WriteFieldEnd(); - } - if (Pwd != null && __isset.pwd) { - field.Name = "pwd"; - field.Type = TType.String; - field.ID = 2; - oprot.WriteFieldBegin(field); - oprot.WriteString(Pwd); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timLogin_args("); - bool __first = true; - if (Tid != null && __isset.tid) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Tid: "); - __sb.Append(Tid== null ? "" : Tid.ToString()); - } - if (Pwd != null && __isset.pwd) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Pwd: "); - __sb.Append(Pwd); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timAck_args : TBase - { - private TimAckBean _ab; - - public TimAckBean Ab - { - get - { - return _ab; - } - set - { - __isset.ab = true; - this._ab = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool ab; - } - - public timAck_args() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - Ab = new TimAckBean(); - Ab.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timAck_args"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Ab != null && __isset.ab) { - field.Name = "ab"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - Ab.Write(oprot); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timAck_args("); - bool __first = true; - if (Ab != null && __isset.ab) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Ab: "); - __sb.Append(Ab== null ? "" : Ab.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timPresence_args : TBase - { - private TimPBean _pbean; - - public TimPBean Pbean - { - get - { - return _pbean; - } - set - { - __isset.pbean = true; - this._pbean = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool pbean; - } - - public timPresence_args() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - Pbean = new TimPBean(); - Pbean.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timPresence_args"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Pbean != null && __isset.pbean) { - field.Name = "pbean"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - Pbean.Write(oprot); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timPresence_args("); - bool __first = true; - if (Pbean != null && __isset.pbean) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Pbean: "); - __sb.Append(Pbean== null ? "" : Pbean.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timMessage_args : TBase - { - private TimMBean _mbean; - - public TimMBean Mbean - { - get - { - return _mbean; - } - set - { - __isset.mbean = true; - this._mbean = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool mbean; - } - - public timMessage_args() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - Mbean = new TimMBean(); - Mbean.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timMessage_args"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Mbean != null && __isset.mbean) { - field.Name = "mbean"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - Mbean.Write(oprot); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timMessage_args("); - bool __first = true; - if (Mbean != null && __isset.mbean) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Mbean: "); - __sb.Append(Mbean== null ? "" : Mbean.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timPing_args : TBase - { - private string _threadId; - - public string ThreadId - { - get - { - return _threadId; - } - set - { - __isset.threadId = true; - this._threadId = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool threadId; - } - - public timPing_args() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.String) { - ThreadId = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timPing_args"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (ThreadId != null && __isset.threadId) { - field.Name = "threadId"; - field.Type = TType.String; - field.ID = 1; - oprot.WriteFieldBegin(field); - oprot.WriteString(ThreadId); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timPing_args("); - bool __first = true; - if (ThreadId != null && __isset.threadId) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("ThreadId: "); - __sb.Append(ThreadId); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timError_args : TBase - { - private TimError _e; - - public TimError E - { - get - { - return _e; - } - set - { - __isset.e = true; - this._e = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool e; - } - - public timError_args() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - E = new TimError(); - E.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timError_args"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (E != null && __isset.e) { - field.Name = "e"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - E.Write(oprot); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timError_args("); - bool __first = true; - if (E != null && __isset.e) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("E: "); - __sb.Append(E== null ? "" : E.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timLogout_args : TBase - { - - public timLogout_args() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timLogout_args"); - oprot.WriteStructBegin(struc); - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timLogout_args("); - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timRegist_args : TBase - { - private Tid _tid; - private string _auth; - - public Tid Tid - { - get - { - return _tid; - } - set - { - __isset.tid = true; - this._tid = value; - } - } - - public string Auth - { - get - { - return _auth; - } - set - { - __isset.auth = true; - this._auth = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool tid; - public bool auth; - } - - public timRegist_args() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - Tid = new Tid(); - Tid.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.String) { - Auth = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timRegist_args"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Tid != null && __isset.tid) { - field.Name = "tid"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - Tid.Write(oprot); - oprot.WriteFieldEnd(); - } - if (Auth != null && __isset.auth) { - field.Name = "auth"; - field.Type = TType.String; - field.ID = 2; - oprot.WriteFieldBegin(field); - oprot.WriteString(Auth); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timRegist_args("); - bool __first = true; - if (Tid != null && __isset.tid) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Tid: "); - __sb.Append(Tid== null ? "" : Tid.ToString()); - } - if (Auth != null && __isset.auth) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Auth: "); - __sb.Append(Auth); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timRoser_args : TBase - { - private TimRoster _roster; - - public TimRoster Roster - { - get - { - return _roster; - } - set - { - __isset.roster = true; - this._roster = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool roster; - } - - public timRoser_args() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - Roster = new TimRoster(); - Roster.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timRoser_args"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Roster != null && __isset.roster) { - field.Name = "roster"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - Roster.Write(oprot); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timRoser_args("); - bool __first = true; - if (Roster != null && __isset.roster) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Roster: "); - __sb.Append(Roster== null ? "" : Roster.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timMessageList_args : TBase - { - private TimMBeanList _mbeanList; - - public TimMBeanList MbeanList - { - get - { - return _mbeanList; - } - set - { - __isset.mbeanList = true; - this._mbeanList = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool mbeanList; - } - - public timMessageList_args() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - MbeanList = new TimMBeanList(); - MbeanList.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timMessageList_args"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (MbeanList != null && __isset.mbeanList) { - field.Name = "mbeanList"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - MbeanList.Write(oprot); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timMessageList_args("); - bool __first = true; - if (MbeanList != null && __isset.mbeanList) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("MbeanList: "); - __sb.Append(MbeanList== null ? "" : MbeanList.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timPresenceList_args : TBase - { - private TimPBeanList _pbeanList; - - public TimPBeanList PbeanList - { - get - { - return _pbeanList; - } - set - { - __isset.pbeanList = true; - this._pbeanList = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool pbeanList; - } - - public timPresenceList_args() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - PbeanList = new TimPBeanList(); - PbeanList.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timPresenceList_args"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (PbeanList != null && __isset.pbeanList) { - field.Name = "pbeanList"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - PbeanList.Write(oprot); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timPresenceList_args("); - bool __first = true; - if (PbeanList != null && __isset.pbeanList) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("PbeanList: "); - __sb.Append(PbeanList== null ? "" : PbeanList.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timMessageIq_args : TBase - { - private TimMessageIq _timMsgIq; - private string _iqType; - - public TimMessageIq TimMsgIq - { - get - { - return _timMsgIq; - } - set - { - __isset.timMsgIq = true; - this._timMsgIq = value; - } - } - - public string IqType - { - get - { - return _iqType; - } - set - { - __isset.iqType = true; - this._iqType = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool timMsgIq; - public bool iqType; - } - - public timMessageIq_args() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - TimMsgIq = new TimMessageIq(); - TimMsgIq.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.String) { - IqType = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timMessageIq_args"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (TimMsgIq != null && __isset.timMsgIq) { - field.Name = "timMsgIq"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - TimMsgIq.Write(oprot); - oprot.WriteFieldEnd(); - } - if (IqType != null && __isset.iqType) { - field.Name = "iqType"; - field.Type = TType.String; - field.ID = 2; - oprot.WriteFieldBegin(field); - oprot.WriteString(IqType); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timMessageIq_args("); - bool __first = true; - if (TimMsgIq != null && __isset.timMsgIq) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("TimMsgIq: "); - __sb.Append(TimMsgIq== null ? "" : TimMsgIq.ToString()); - } - if (IqType != null && __isset.iqType) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("IqType: "); - __sb.Append(IqType); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timMessageResult_args : TBase - { - private TimMBean _mbean; - - public TimMBean Mbean - { - get - { - return _mbean; - } - set - { - __isset.mbean = true; - this._mbean = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool mbean; - } - - public timMessageResult_args() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - Mbean = new TimMBean(); - Mbean.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timMessageResult_args"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Mbean != null && __isset.mbean) { - field.Name = "mbean"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - Mbean.Write(oprot); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timMessageResult_args("); - bool __first = true; - if (Mbean != null && __isset.mbean) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Mbean: "); - __sb.Append(Mbean== null ? "" : Mbean.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timProperty_args : TBase - { - private TimPropertyBean _tpb; - - public TimPropertyBean Tpb - { - get - { - return _tpb; - } - set - { - __isset.tpb = true; - this._tpb = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool tpb; - } - - public timProperty_args() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - Tpb = new TimPropertyBean(); - Tpb.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timProperty_args"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Tpb != null && __isset.tpb) { - field.Name = "tpb"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - Tpb.Write(oprot); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timProperty_args("); - bool __first = true; - if (Tpb != null && __isset.tpb) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Tpb: "); - __sb.Append(Tpb== null ? "" : Tpb.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timRemoteUserAuth_args : TBase - { - private Tid _tid; - private string _pwd; - private TimAuth _auth; - - public Tid Tid - { - get - { - return _tid; - } - set - { - __isset.tid = true; - this._tid = value; - } - } - - public string Pwd - { - get - { - return _pwd; - } - set - { - __isset.pwd = true; - this._pwd = value; - } - } - - public TimAuth Auth - { - get - { - return _auth; - } - set - { - __isset.auth = true; - this._auth = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool tid; - public bool pwd; - public bool auth; - } - - public timRemoteUserAuth_args() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - Tid = new Tid(); - Tid.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.String) { - Pwd = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.Struct) { - Auth = new TimAuth(); - Auth.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timRemoteUserAuth_args"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Tid != null && __isset.tid) { - field.Name = "tid"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - Tid.Write(oprot); - oprot.WriteFieldEnd(); - } - if (Pwd != null && __isset.pwd) { - field.Name = "pwd"; - field.Type = TType.String; - field.ID = 2; - oprot.WriteFieldBegin(field); - oprot.WriteString(Pwd); - oprot.WriteFieldEnd(); - } - if (Auth != null && __isset.auth) { - field.Name = "auth"; - field.Type = TType.Struct; - field.ID = 3; - oprot.WriteFieldBegin(field); - Auth.Write(oprot); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timRemoteUserAuth_args("); - bool __first = true; - if (Tid != null && __isset.tid) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Tid: "); - __sb.Append(Tid== null ? "" : Tid.ToString()); - } - if (Pwd != null && __isset.pwd) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Pwd: "); - __sb.Append(Pwd); - } - if (Auth != null && __isset.auth) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Auth: "); - __sb.Append(Auth== null ? "" : Auth.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timRemoteUserAuth_result : TBase - { - private TimRemoteUserBean _success; - - public TimRemoteUserBean Success - { - get - { - return _success; - } - set - { - __isset.success = true; - this._success = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool success; - } - - public timRemoteUserAuth_result() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 0: - if (field.Type == TType.Struct) { - Success = new TimRemoteUserBean(); - Success.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timRemoteUserAuth_result"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - - if (this.__isset.success) { - if (Success != null) { - field.Name = "Success"; - field.Type = TType.Struct; - field.ID = 0; - oprot.WriteFieldBegin(field); - Success.Write(oprot); - oprot.WriteFieldEnd(); - } - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timRemoteUserAuth_result("); - bool __first = true; - if (Success != null && __isset.success) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Success: "); - __sb.Append(Success== null ? "" : Success.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timRemoteUserGet_args : TBase - { - private Tid _tid; - private TimAuth _auth; - - public Tid Tid - { - get - { - return _tid; - } - set - { - __isset.tid = true; - this._tid = value; - } - } - - public TimAuth Auth - { - get - { - return _auth; - } - set - { - __isset.auth = true; - this._auth = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool tid; - public bool auth; - } - - public timRemoteUserGet_args() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - Tid = new Tid(); - Tid.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.Struct) { - Auth = new TimAuth(); - Auth.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timRemoteUserGet_args"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Tid != null && __isset.tid) { - field.Name = "tid"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - Tid.Write(oprot); - oprot.WriteFieldEnd(); - } - if (Auth != null && __isset.auth) { - field.Name = "auth"; - field.Type = TType.Struct; - field.ID = 2; - oprot.WriteFieldBegin(field); - Auth.Write(oprot); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timRemoteUserGet_args("); - bool __first = true; - if (Tid != null && __isset.tid) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Tid: "); - __sb.Append(Tid== null ? "" : Tid.ToString()); - } - if (Auth != null && __isset.auth) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Auth: "); - __sb.Append(Auth== null ? "" : Auth.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timRemoteUserGet_result : TBase - { - private TimRemoteUserBean _success; - - public TimRemoteUserBean Success - { - get - { - return _success; - } - set - { - __isset.success = true; - this._success = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool success; - } - - public timRemoteUserGet_result() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 0: - if (field.Type == TType.Struct) { - Success = new TimRemoteUserBean(); - Success.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timRemoteUserGet_result"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - - if (this.__isset.success) { - if (Success != null) { - field.Name = "Success"; - field.Type = TType.Struct; - field.ID = 0; - oprot.WriteFieldBegin(field); - Success.Write(oprot); - oprot.WriteFieldEnd(); - } - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timRemoteUserGet_result("); - bool __first = true; - if (Success != null && __isset.success) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Success: "); - __sb.Append(Success== null ? "" : Success.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timRemoteUserEdit_args : TBase - { - private Tid _tid; - private TimUserBean _ub; - private TimAuth _auth; - - public Tid Tid - { - get - { - return _tid; - } - set - { - __isset.tid = true; - this._tid = value; - } - } - - public TimUserBean Ub - { - get - { - return _ub; - } - set - { - __isset.ub = true; - this._ub = value; - } - } - - public TimAuth Auth - { - get - { - return _auth; - } - set - { - __isset.auth = true; - this._auth = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool tid; - public bool ub; - public bool auth; - } - - public timRemoteUserEdit_args() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - Tid = new Tid(); - Tid.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.Struct) { - Ub = new TimUserBean(); - Ub.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.Struct) { - Auth = new TimAuth(); - Auth.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timRemoteUserEdit_args"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Tid != null && __isset.tid) { - field.Name = "tid"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - Tid.Write(oprot); - oprot.WriteFieldEnd(); - } - if (Ub != null && __isset.ub) { - field.Name = "ub"; - field.Type = TType.Struct; - field.ID = 2; - oprot.WriteFieldBegin(field); - Ub.Write(oprot); - oprot.WriteFieldEnd(); - } - if (Auth != null && __isset.auth) { - field.Name = "auth"; - field.Type = TType.Struct; - field.ID = 3; - oprot.WriteFieldBegin(field); - Auth.Write(oprot); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timRemoteUserEdit_args("); - bool __first = true; - if (Tid != null && __isset.tid) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Tid: "); - __sb.Append(Tid== null ? "" : Tid.ToString()); - } - if (Ub != null && __isset.ub) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Ub: "); - __sb.Append(Ub== null ? "" : Ub.ToString()); - } - if (Auth != null && __isset.auth) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Auth: "); - __sb.Append(Auth== null ? "" : Auth.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timRemoteUserEdit_result : TBase - { - private TimRemoteUserBean _success; - - public TimRemoteUserBean Success - { - get - { - return _success; - } - set - { - __isset.success = true; - this._success = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool success; - } - - public timRemoteUserEdit_result() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 0: - if (field.Type == TType.Struct) { - Success = new TimRemoteUserBean(); - Success.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timRemoteUserEdit_result"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - - if (this.__isset.success) { - if (Success != null) { - field.Name = "Success"; - field.Type = TType.Struct; - field.ID = 0; - oprot.WriteFieldBegin(field); - Success.Write(oprot); - oprot.WriteFieldEnd(); - } - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timRemoteUserEdit_result("); - bool __first = true; - if (Success != null && __isset.success) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Success: "); - __sb.Append(Success== null ? "" : Success.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timResponsePresence_args : TBase - { - private TimPBean _pbean; - private TimAuth _auth; - - public TimPBean Pbean - { - get - { - return _pbean; - } - set - { - __isset.pbean = true; - this._pbean = value; - } - } - - public TimAuth Auth - { - get - { - return _auth; - } - set - { - __isset.auth = true; - this._auth = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool pbean; - public bool auth; - } - - public timResponsePresence_args() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - Pbean = new TimPBean(); - Pbean.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.Struct) { - Auth = new TimAuth(); - Auth.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timResponsePresence_args"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Pbean != null && __isset.pbean) { - field.Name = "pbean"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - Pbean.Write(oprot); - oprot.WriteFieldEnd(); - } - if (Auth != null && __isset.auth) { - field.Name = "auth"; - field.Type = TType.Struct; - field.ID = 2; - oprot.WriteFieldBegin(field); - Auth.Write(oprot); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timResponsePresence_args("); - bool __first = true; - if (Pbean != null && __isset.pbean) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Pbean: "); - __sb.Append(Pbean== null ? "" : Pbean.ToString()); - } - if (Auth != null && __isset.auth) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Auth: "); - __sb.Append(Auth== null ? "" : Auth.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timResponsePresence_result : TBase - { - private TimResponseBean _success; - - public TimResponseBean Success - { - get - { - return _success; - } - set - { - __isset.success = true; - this._success = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool success; - } - - public timResponsePresence_result() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 0: - if (field.Type == TType.Struct) { - Success = new TimResponseBean(); - Success.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timResponsePresence_result"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - - if (this.__isset.success) { - if (Success != null) { - field.Name = "Success"; - field.Type = TType.Struct; - field.ID = 0; - oprot.WriteFieldBegin(field); - Success.Write(oprot); - oprot.WriteFieldEnd(); - } - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timResponsePresence_result("); - bool __first = true; - if (Success != null && __isset.success) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Success: "); - __sb.Append(Success== null ? "" : Success.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timResponseMessage_args : TBase - { - private TimMBean _mbean; - private TimAuth _auth; - - public TimMBean Mbean - { - get - { - return _mbean; - } - set - { - __isset.mbean = true; - this._mbean = value; - } - } - - public TimAuth Auth - { - get - { - return _auth; - } - set - { - __isset.auth = true; - this._auth = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool mbean; - public bool auth; - } - - public timResponseMessage_args() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - Mbean = new TimMBean(); - Mbean.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.Struct) { - Auth = new TimAuth(); - Auth.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timResponseMessage_args"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Mbean != null && __isset.mbean) { - field.Name = "mbean"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - Mbean.Write(oprot); - oprot.WriteFieldEnd(); - } - if (Auth != null && __isset.auth) { - field.Name = "auth"; - field.Type = TType.Struct; - field.ID = 2; - oprot.WriteFieldBegin(field); - Auth.Write(oprot); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timResponseMessage_args("); - bool __first = true; - if (Mbean != null && __isset.mbean) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Mbean: "); - __sb.Append(Mbean== null ? "" : Mbean.ToString()); - } - if (Auth != null && __isset.auth) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Auth: "); - __sb.Append(Auth== null ? "" : Auth.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timResponseMessage_result : TBase - { - private TimResponseBean _success; - - public TimResponseBean Success - { - get - { - return _success; - } - set - { - __isset.success = true; - this._success = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool success; - } - - public timResponseMessage_result() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 0: - if (field.Type == TType.Struct) { - Success = new TimResponseBean(); - Success.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timResponseMessage_result"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - - if (this.__isset.success) { - if (Success != null) { - field.Name = "Success"; - field.Type = TType.Struct; - field.ID = 0; - oprot.WriteFieldBegin(field); - Success.Write(oprot); - oprot.WriteFieldEnd(); - } - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timResponseMessage_result("); - bool __first = true; - if (Success != null && __isset.success) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Success: "); - __sb.Append(Success== null ? "" : Success.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timResponseMessageIq_args : TBase - { - private TimMessageIq _timMsgIq; - private string _iqType; - private TimAuth _auth; - - public TimMessageIq TimMsgIq - { - get - { - return _timMsgIq; - } - set - { - __isset.timMsgIq = true; - this._timMsgIq = value; - } - } - - public string IqType - { - get - { - return _iqType; - } - set - { - __isset.iqType = true; - this._iqType = value; - } - } - - public TimAuth Auth - { - get - { - return _auth; - } - set - { - __isset.auth = true; - this._auth = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool timMsgIq; - public bool iqType; - public bool auth; - } - - public timResponseMessageIq_args() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - TimMsgIq = new TimMessageIq(); - TimMsgIq.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.String) { - IqType = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.Struct) { - Auth = new TimAuth(); - Auth.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timResponseMessageIq_args"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (TimMsgIq != null && __isset.timMsgIq) { - field.Name = "timMsgIq"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - TimMsgIq.Write(oprot); - oprot.WriteFieldEnd(); - } - if (IqType != null && __isset.iqType) { - field.Name = "iqType"; - field.Type = TType.String; - field.ID = 2; - oprot.WriteFieldBegin(field); - oprot.WriteString(IqType); - oprot.WriteFieldEnd(); - } - if (Auth != null && __isset.auth) { - field.Name = "auth"; - field.Type = TType.Struct; - field.ID = 3; - oprot.WriteFieldBegin(field); - Auth.Write(oprot); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timResponseMessageIq_args("); - bool __first = true; - if (TimMsgIq != null && __isset.timMsgIq) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("TimMsgIq: "); - __sb.Append(TimMsgIq== null ? "" : TimMsgIq.ToString()); - } - if (IqType != null && __isset.iqType) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("IqType: "); - __sb.Append(IqType); - } - if (Auth != null && __isset.auth) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Auth: "); - __sb.Append(Auth== null ? "" : Auth.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timResponseMessageIq_result : TBase - { - private TimMBeanList _success; - - public TimMBeanList Success - { - get - { - return _success; - } - set - { - __isset.success = true; - this._success = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool success; - } - - public timResponseMessageIq_result() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 0: - if (field.Type == TType.Struct) { - Success = new TimMBeanList(); - Success.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timResponseMessageIq_result"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - - if (this.__isset.success) { - if (Success != null) { - field.Name = "Success"; - field.Type = TType.Struct; - field.ID = 0; - oprot.WriteFieldBegin(field); - Success.Write(oprot); - oprot.WriteFieldEnd(); - } - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timResponseMessageIq_result("); - bool __first = true; - if (Success != null && __isset.success) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Success: "); - __sb.Append(Success== null ? "" : Success.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timResponsePresenceList_args : TBase - { - private TimPBeanList _pbeanList; - private TimAuth _auth; - - public TimPBeanList PbeanList - { - get - { - return _pbeanList; - } - set - { - __isset.pbeanList = true; - this._pbeanList = value; - } - } - - public TimAuth Auth - { - get - { - return _auth; - } - set - { - __isset.auth = true; - this._auth = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool pbeanList; - public bool auth; - } - - public timResponsePresenceList_args() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - PbeanList = new TimPBeanList(); - PbeanList.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.Struct) { - Auth = new TimAuth(); - Auth.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timResponsePresenceList_args"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (PbeanList != null && __isset.pbeanList) { - field.Name = "pbeanList"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - PbeanList.Write(oprot); - oprot.WriteFieldEnd(); - } - if (Auth != null && __isset.auth) { - field.Name = "auth"; - field.Type = TType.Struct; - field.ID = 2; - oprot.WriteFieldBegin(field); - Auth.Write(oprot); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timResponsePresenceList_args("); - bool __first = true; - if (PbeanList != null && __isset.pbeanList) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("PbeanList: "); - __sb.Append(PbeanList== null ? "" : PbeanList.ToString()); - } - if (Auth != null && __isset.auth) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Auth: "); - __sb.Append(Auth== null ? "" : Auth.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timResponsePresenceList_result : TBase - { - private TimResponseBean _success; - - public TimResponseBean Success - { - get - { - return _success; - } - set - { - __isset.success = true; - this._success = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool success; - } - - public timResponsePresenceList_result() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 0: - if (field.Type == TType.Struct) { - Success = new TimResponseBean(); - Success.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timResponsePresenceList_result"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - - if (this.__isset.success) { - if (Success != null) { - field.Name = "Success"; - field.Type = TType.Struct; - field.ID = 0; - oprot.WriteFieldBegin(field); - Success.Write(oprot); - oprot.WriteFieldEnd(); - } - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timResponsePresenceList_result("); - bool __first = true; - if (Success != null && __isset.success) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Success: "); - __sb.Append(Success== null ? "" : Success.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timResponseMessageList_args : TBase - { - private TimMBeanList _mbeanList; - private TimAuth _auth; - - public TimMBeanList MbeanList - { - get - { - return _mbeanList; - } - set - { - __isset.mbeanList = true; - this._mbeanList = value; - } - } - - public TimAuth Auth - { - get - { - return _auth; - } - set - { - __isset.auth = true; - this._auth = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool mbeanList; - public bool auth; - } - - public timResponseMessageList_args() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - MbeanList = new TimMBeanList(); - MbeanList.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.Struct) { - Auth = new TimAuth(); - Auth.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timResponseMessageList_args"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (MbeanList != null && __isset.mbeanList) { - field.Name = "mbeanList"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - MbeanList.Write(oprot); - oprot.WriteFieldEnd(); - } - if (Auth != null && __isset.auth) { - field.Name = "auth"; - field.Type = TType.Struct; - field.ID = 2; - oprot.WriteFieldBegin(field); - Auth.Write(oprot); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timResponseMessageList_args("); - bool __first = true; - if (MbeanList != null && __isset.mbeanList) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("MbeanList: "); - __sb.Append(MbeanList== null ? "" : MbeanList.ToString()); - } - if (Auth != null && __isset.auth) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Auth: "); - __sb.Append(Auth== null ? "" : Auth.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - - - #if !SILVERLIGHT - [Serializable] - #endif - public partial class timResponseMessageList_result : TBase - { - private TimResponseBean _success; - - public TimResponseBean Success - { - get - { - return _success; - } - set - { - __isset.success = true; - this._success = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool success; - } - - public timResponseMessageList_result() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 0: - if (field.Type == TType.Struct) { - Success = new TimResponseBean(); - Success.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("timResponseMessageList_result"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - - if (this.__isset.success) { - if (Success != null) { - field.Name = "Success"; - field.Type = TType.Struct; - field.ID = 0; - oprot.WriteFieldBegin(field); - Success.Write(oprot); - oprot.WriteFieldEnd(); - } - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("timResponseMessageList_result("); - bool __first = true; - if (Success != null && __isset.success) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Success: "); - __sb.Append(Success== null ? "" : Success.ToString()); - } - __sb.Append(")"); - return __sb.ToString(); - } - - } - -} diff --git a/protocols/gen-csharp/Tid.cs b/protocols/gen-csharp/Tid.cs deleted file mode 100644 index 397539c..0000000 --- a/protocols/gen-csharp/Tid.cs +++ /dev/null @@ -1,336 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class Tid : TBase -{ - private string _domain; - private string _resource; - private string _type; - private List _extraList; - private Dictionary _extraMap; - - /// - /// 登陆名 用户登录号,房间号等 - /// - public string Name { get; set; } - - /// - /// 域名 用于区分渠道等 appid,appsecret - /// - public string Domain - { - get - { - return _domain; - } - set - { - __isset.domain = true; - this._domain = value; - } - } - - /// - /// 系统 自行约定 如 : 1IOS,2android,3H5,4WEB 等 - /// - public string Resource - { - get - { - return _resource; - } - set - { - __isset.resource = true; - this._resource = value; - } - } - - /// - /// normal,group - /// - public string Type - { - get - { - return _type; - } - set - { - __isset.type = true; - this._type = value; - } - } - - /// - /// 附加信息:如传递客户端信息 iphone6,xiaomi,huawei等 - /// - public List ExtraList - { - get - { - return _extraList; - } - set - { - __isset.extraList = true; - this._extraList = value; - } - } - - public Dictionary ExtraMap - { - get - { - return _extraMap; - } - set - { - __isset.extraMap = true; - this._extraMap = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool domain; - public bool resource; - public bool type; - public bool extraList; - public bool extraMap; - } - - public Tid() { - } - - public Tid(string name) : this() { - this.Name = name; - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - bool isset_name = false; - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.String) { - Name = iprot.ReadString(); - isset_name = true; - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.String) { - Domain = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.String) { - Resource = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 4: - if (field.Type == TType.String) { - Type = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 5: - if (field.Type == TType.List) { - { - ExtraList = new List(); - TList _list27 = iprot.ReadListBegin(); - for( int _i28 = 0; _i28 < _list27.Count; ++_i28) - { - TimNode _elem29; - _elem29 = new TimNode(); - _elem29.Read(iprot); - ExtraList.Add(_elem29); - } - iprot.ReadListEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 6: - if (field.Type == TType.Map) { - { - ExtraMap = new Dictionary(); - TMap _map30 = iprot.ReadMapBegin(); - for( int _i31 = 0; _i31 < _map30.Count; ++_i31) - { - string _key32; - string _val33; - _key32 = iprot.ReadString(); - _val33 = iprot.ReadString(); - ExtraMap[_key32] = _val33; - } - iprot.ReadMapEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - if (!isset_name) - throw new TProtocolException(TProtocolException.INVALID_DATA); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("Tid"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - field.Name = "name"; - field.Type = TType.String; - field.ID = 1; - oprot.WriteFieldBegin(field); - oprot.WriteString(Name); - oprot.WriteFieldEnd(); - if (Domain != null && __isset.domain) { - field.Name = "domain"; - field.Type = TType.String; - field.ID = 2; - oprot.WriteFieldBegin(field); - oprot.WriteString(Domain); - oprot.WriteFieldEnd(); - } - if (Resource != null && __isset.resource) { - field.Name = "resource"; - field.Type = TType.String; - field.ID = 3; - oprot.WriteFieldBegin(field); - oprot.WriteString(Resource); - oprot.WriteFieldEnd(); - } - if (Type != null && __isset.type) { - field.Name = "type"; - field.Type = TType.String; - field.ID = 4; - oprot.WriteFieldBegin(field); - oprot.WriteString(Type); - oprot.WriteFieldEnd(); - } - if (ExtraList != null && __isset.extraList) { - field.Name = "extraList"; - field.Type = TType.List; - field.ID = 5; - oprot.WriteFieldBegin(field); - { - oprot.WriteListBegin(new TList(TType.Struct, ExtraList.Count)); - foreach (TimNode _iter34 in ExtraList) - { - _iter34.Write(oprot); - } - oprot.WriteListEnd(); - } - oprot.WriteFieldEnd(); - } - if (ExtraMap != null && __isset.extraMap) { - field.Name = "extraMap"; - field.Type = TType.Map; - field.ID = 6; - oprot.WriteFieldBegin(field); - { - oprot.WriteMapBegin(new TMap(TType.String, TType.String, ExtraMap.Count)); - foreach (string _iter35 in ExtraMap.Keys) - { - oprot.WriteString(_iter35); - oprot.WriteString(ExtraMap[_iter35]); - } - oprot.WriteMapEnd(); - } - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("Tid("); - __sb.Append(", Name: "); - __sb.Append(Name); - if (Domain != null && __isset.domain) { - __sb.Append(", Domain: "); - __sb.Append(Domain); - } - if (Resource != null && __isset.resource) { - __sb.Append(", Resource: "); - __sb.Append(Resource); - } - if (Type != null && __isset.type) { - __sb.Append(", Type: "); - __sb.Append(Type); - } - if (ExtraList != null && __isset.extraList) { - __sb.Append(", ExtraList: "); - __sb.Append(ExtraList); - } - if (ExtraMap != null && __isset.extraMap) { - __sb.Append(", ExtraMap: "); - __sb.Append(ExtraMap); - } - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/TimAckBean.cs b/protocols/gen-csharp/TimAckBean.cs deleted file mode 100644 index 336011e..0000000 --- a/protocols/gen-csharp/TimAckBean.cs +++ /dev/null @@ -1,359 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class TimAckBean : TBase -{ - private string _id; - private string _ackType; - private string _ackStatus; - private List _extraList; - private TimError _err; - private Dictionary _extraMap; - - /// - /// id,返回所要回执协议的线程id - /// - public string Id - { - get - { - return _id; - } - set - { - __isset.id = true; - this._id = value; - } - } - - /// - /// 类型,自定义 如:ping,message等 - /// - public string AckType - { - get - { - return _ackType; - } - set - { - __isset.ackType = true; - this._ackType = value; - } - } - - /// - /// 状态,如成功,失败等 - /// - public string AckStatus - { - get - { - return _ackStatus; - } - set - { - __isset.ackStatus = true; - this._ackStatus = value; - } - } - - /// - /// 附加信息 - /// - public List ExtraList - { - get - { - return _extraList; - } - set - { - __isset.extraList = true; - this._extraList = value; - } - } - - /// - /// 错误信息 - /// - public TimError Err - { - get - { - return _err; - } - set - { - __isset.err = true; - this._err = value; - } - } - - public Dictionary ExtraMap - { - get - { - return _extraMap; - } - set - { - __isset.extraMap = true; - this._extraMap = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool id; - public bool ackType; - public bool ackStatus; - public bool extraList; - public bool err; - public bool extraMap; - } - - public TimAckBean() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.String) { - Id = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.String) { - AckType = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.String) { - AckStatus = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 4: - if (field.Type == TType.List) { - { - ExtraList = new List(); - TList _list0 = iprot.ReadListBegin(); - for( int _i1 = 0; _i1 < _list0.Count; ++_i1) - { - TimNode _elem2; - _elem2 = new TimNode(); - _elem2.Read(iprot); - ExtraList.Add(_elem2); - } - iprot.ReadListEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 5: - if (field.Type == TType.Struct) { - Err = new TimError(); - Err.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 6: - if (field.Type == TType.Map) { - { - ExtraMap = new Dictionary(); - TMap _map3 = iprot.ReadMapBegin(); - for( int _i4 = 0; _i4 < _map3.Count; ++_i4) - { - string _key5; - string _val6; - _key5 = iprot.ReadString(); - _val6 = iprot.ReadString(); - ExtraMap[_key5] = _val6; - } - iprot.ReadMapEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("TimAckBean"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Id != null && __isset.id) { - field.Name = "id"; - field.Type = TType.String; - field.ID = 1; - oprot.WriteFieldBegin(field); - oprot.WriteString(Id); - oprot.WriteFieldEnd(); - } - if (AckType != null && __isset.ackType) { - field.Name = "ackType"; - field.Type = TType.String; - field.ID = 2; - oprot.WriteFieldBegin(field); - oprot.WriteString(AckType); - oprot.WriteFieldEnd(); - } - if (AckStatus != null && __isset.ackStatus) { - field.Name = "ackStatus"; - field.Type = TType.String; - field.ID = 3; - oprot.WriteFieldBegin(field); - oprot.WriteString(AckStatus); - oprot.WriteFieldEnd(); - } - if (ExtraList != null && __isset.extraList) { - field.Name = "extraList"; - field.Type = TType.List; - field.ID = 4; - oprot.WriteFieldBegin(field); - { - oprot.WriteListBegin(new TList(TType.Struct, ExtraList.Count)); - foreach (TimNode _iter7 in ExtraList) - { - _iter7.Write(oprot); - } - oprot.WriteListEnd(); - } - oprot.WriteFieldEnd(); - } - if (Err != null && __isset.err) { - field.Name = "err"; - field.Type = TType.Struct; - field.ID = 5; - oprot.WriteFieldBegin(field); - Err.Write(oprot); - oprot.WriteFieldEnd(); - } - if (ExtraMap != null && __isset.extraMap) { - field.Name = "extraMap"; - field.Type = TType.Map; - field.ID = 6; - oprot.WriteFieldBegin(field); - { - oprot.WriteMapBegin(new TMap(TType.String, TType.String, ExtraMap.Count)); - foreach (string _iter8 in ExtraMap.Keys) - { - oprot.WriteString(_iter8); - oprot.WriteString(ExtraMap[_iter8]); - } - oprot.WriteMapEnd(); - } - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("TimAckBean("); - bool __first = true; - if (Id != null && __isset.id) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Id: "); - __sb.Append(Id); - } - if (AckType != null && __isset.ackType) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("AckType: "); - __sb.Append(AckType); - } - if (AckStatus != null && __isset.ackStatus) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("AckStatus: "); - __sb.Append(AckStatus); - } - if (ExtraList != null && __isset.extraList) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("ExtraList: "); - __sb.Append(ExtraList); - } - if (Err != null && __isset.err) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Err: "); - __sb.Append(Err== null ? "" : Err.ToString()); - } - if (ExtraMap != null && __isset.extraMap) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("ExtraMap: "); - __sb.Append(ExtraMap); - } - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/TimArea.cs b/protocols/gen-csharp/TimArea.cs deleted file mode 100644 index b2bd442..0000000 --- a/protocols/gen-csharp/TimArea.cs +++ /dev/null @@ -1,319 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class TimArea : TBase -{ - private string _country; - private string _province; - private string _city; - private List _extraList; - private Dictionary _extraMap; - - /// - /// 国家 - /// - public string Country - { - get - { - return _country; - } - set - { - __isset.country = true; - this._country = value; - } - } - - /// - /// 省 - /// - public string Province - { - get - { - return _province; - } - set - { - __isset.province = true; - this._province = value; - } - } - - /// - /// 市 - /// - public string City - { - get - { - return _city; - } - set - { - __isset.city = true; - this._city = value; - } - } - - /// - /// 附加信息:如区,镇,乡等 - /// - public List ExtraList - { - get - { - return _extraList; - } - set - { - __isset.extraList = true; - this._extraList = value; - } - } - - public Dictionary ExtraMap - { - get - { - return _extraMap; - } - set - { - __isset.extraMap = true; - this._extraMap = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool country; - public bool province; - public bool city; - public bool extraList; - public bool extraMap; - } - - public TimArea() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.String) { - Country = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.String) { - Province = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.String) { - City = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 4: - if (field.Type == TType.List) { - { - ExtraList = new List(); - TList _list18 = iprot.ReadListBegin(); - for( int _i19 = 0; _i19 < _list18.Count; ++_i19) - { - TimNode _elem20; - _elem20 = new TimNode(); - _elem20.Read(iprot); - ExtraList.Add(_elem20); - } - iprot.ReadListEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 5: - if (field.Type == TType.Map) { - { - ExtraMap = new Dictionary(); - TMap _map21 = iprot.ReadMapBegin(); - for( int _i22 = 0; _i22 < _map21.Count; ++_i22) - { - string _key23; - string _val24; - _key23 = iprot.ReadString(); - _val24 = iprot.ReadString(); - ExtraMap[_key23] = _val24; - } - iprot.ReadMapEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("TimArea"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Country != null && __isset.country) { - field.Name = "country"; - field.Type = TType.String; - field.ID = 1; - oprot.WriteFieldBegin(field); - oprot.WriteString(Country); - oprot.WriteFieldEnd(); - } - if (Province != null && __isset.province) { - field.Name = "province"; - field.Type = TType.String; - field.ID = 2; - oprot.WriteFieldBegin(field); - oprot.WriteString(Province); - oprot.WriteFieldEnd(); - } - if (City != null && __isset.city) { - field.Name = "city"; - field.Type = TType.String; - field.ID = 3; - oprot.WriteFieldBegin(field); - oprot.WriteString(City); - oprot.WriteFieldEnd(); - } - if (ExtraList != null && __isset.extraList) { - field.Name = "extraList"; - field.Type = TType.List; - field.ID = 4; - oprot.WriteFieldBegin(field); - { - oprot.WriteListBegin(new TList(TType.Struct, ExtraList.Count)); - foreach (TimNode _iter25 in ExtraList) - { - _iter25.Write(oprot); - } - oprot.WriteListEnd(); - } - oprot.WriteFieldEnd(); - } - if (ExtraMap != null && __isset.extraMap) { - field.Name = "extraMap"; - field.Type = TType.Map; - field.ID = 5; - oprot.WriteFieldBegin(field); - { - oprot.WriteMapBegin(new TMap(TType.String, TType.String, ExtraMap.Count)); - foreach (string _iter26 in ExtraMap.Keys) - { - oprot.WriteString(_iter26); - oprot.WriteString(ExtraMap[_iter26]); - } - oprot.WriteMapEnd(); - } - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("TimArea("); - bool __first = true; - if (Country != null && __isset.country) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Country: "); - __sb.Append(Country); - } - if (Province != null && __isset.province) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Province: "); - __sb.Append(Province); - } - if (City != null && __isset.city) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("City: "); - __sb.Append(City); - } - if (ExtraList != null && __isset.extraList) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("ExtraList: "); - __sb.Append(ExtraList); - } - if (ExtraMap != null && __isset.extraMap) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("ExtraMap: "); - __sb.Append(ExtraMap); - } - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/TimAuth.cs b/protocols/gen-csharp/TimAuth.cs deleted file mode 100644 index 77dd1ee..0000000 --- a/protocols/gen-csharp/TimAuth.cs +++ /dev/null @@ -1,206 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class TimAuth : TBase -{ - private string _domain; - private string _username; - private string _pwd; - - /// - /// 域名 - /// - public string Domain - { - get - { - return _domain; - } - set - { - __isset.domain = true; - this._domain = value; - } - } - - /// - /// 用户名 - /// - public string Username - { - get - { - return _username; - } - set - { - __isset.username = true; - this._username = value; - } - } - - /// - /// 密码 - /// - public string Pwd - { - get - { - return _pwd; - } - set - { - __isset.pwd = true; - this._pwd = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool domain; - public bool username; - public bool pwd; - } - - public TimAuth() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.String) { - Domain = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.String) { - Username = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.String) { - Pwd = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("TimAuth"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Domain != null && __isset.domain) { - field.Name = "domain"; - field.Type = TType.String; - field.ID = 1; - oprot.WriteFieldBegin(field); - oprot.WriteString(Domain); - oprot.WriteFieldEnd(); - } - if (Username != null && __isset.username) { - field.Name = "username"; - field.Type = TType.String; - field.ID = 2; - oprot.WriteFieldBegin(field); - oprot.WriteString(Username); - oprot.WriteFieldEnd(); - } - if (Pwd != null && __isset.pwd) { - field.Name = "pwd"; - field.Type = TType.String; - field.ID = 3; - oprot.WriteFieldBegin(field); - oprot.WriteString(Pwd); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("TimAuth("); - bool __first = true; - if (Domain != null && __isset.domain) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Domain: "); - __sb.Append(Domain); - } - if (Username != null && __isset.username) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Username: "); - __sb.Append(Username); - } - if (Pwd != null && __isset.pwd) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Pwd: "); - __sb.Append(Pwd); - } - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/TimError.cs b/protocols/gen-csharp/TimError.cs deleted file mode 100644 index 412a36f..0000000 --- a/protocols/gen-csharp/TimError.cs +++ /dev/null @@ -1,167 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class TimError : TBase -{ - private int _errCode; - private string _errMsg; - - /// - /// 错误码 - /// - public int ErrCode - { - get - { - return _errCode; - } - set - { - __isset.errCode = true; - this._errCode = value; - } - } - - /// - /// 错误内容 - /// - public string ErrMsg - { - get - { - return _errMsg; - } - set - { - __isset.errMsg = true; - this._errMsg = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool errCode; - public bool errMsg; - } - - public TimError() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.I32) { - ErrCode = iprot.ReadI32(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.String) { - ErrMsg = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("TimError"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (__isset.errCode) { - field.Name = "errCode"; - field.Type = TType.I32; - field.ID = 1; - oprot.WriteFieldBegin(field); - oprot.WriteI32(ErrCode); - oprot.WriteFieldEnd(); - } - if (ErrMsg != null && __isset.errMsg) { - field.Name = "errMsg"; - field.Type = TType.String; - field.ID = 2; - oprot.WriteFieldBegin(field); - oprot.WriteString(ErrMsg); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("TimError("); - bool __first = true; - if (__isset.errCode) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("ErrCode: "); - __sb.Append(ErrCode); - } - if (ErrMsg != null && __isset.errMsg) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("ErrMsg: "); - __sb.Append(ErrMsg); - } - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/TimHBean.cs b/protocols/gen-csharp/TimHBean.cs deleted file mode 100644 index 8c46414..0000000 --- a/protocols/gen-csharp/TimHBean.cs +++ /dev/null @@ -1,178 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class TimHBean : TBase -{ - private int _platform; - - /// - /// 渠道 - /// - public int Chl { get; set; } - - /// - /// 平台 - /// - public int Platform - { - get - { - return _platform; - } - set - { - __isset.platform = true; - this._platform = value; - } - } - - /// - /// version 客户端协议版本 - /// - public short Version { get; set; } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool platform; - } - - public TimHBean() { - } - - public TimHBean(int chl, short version) : this() { - this.Chl = chl; - this.Version = version; - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - bool isset_chl = false; - bool isset_version = false; - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.I32) { - Chl = iprot.ReadI32(); - isset_chl = true; - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.I32) { - Platform = iprot.ReadI32(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.I16) { - Version = iprot.ReadI16(); - isset_version = true; - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - if (!isset_chl) - throw new TProtocolException(TProtocolException.INVALID_DATA); - if (!isset_version) - throw new TProtocolException(TProtocolException.INVALID_DATA); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("TimHBean"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - field.Name = "chl"; - field.Type = TType.I32; - field.ID = 1; - oprot.WriteFieldBegin(field); - oprot.WriteI32(Chl); - oprot.WriteFieldEnd(); - if (__isset.platform) { - field.Name = "platform"; - field.Type = TType.I32; - field.ID = 2; - oprot.WriteFieldBegin(field); - oprot.WriteI32(Platform); - oprot.WriteFieldEnd(); - } - field.Name = "version"; - field.Type = TType.I16; - field.ID = 3; - oprot.WriteFieldBegin(field); - oprot.WriteI16(Version); - oprot.WriteFieldEnd(); - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("TimHBean("); - __sb.Append(", Chl: "); - __sb.Append(Chl); - if (__isset.platform) { - __sb.Append(", Platform: "); - __sb.Append(Platform); - } - __sb.Append(", Version: "); - __sb.Append(Version); - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/TimIqBean.cs b/protocols/gen-csharp/TimIqBean.cs deleted file mode 100644 index e1c47e9..0000000 --- a/protocols/gen-csharp/TimIqBean.cs +++ /dev/null @@ -1,373 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class TimIqBean : TBase -{ - private Tid _fromTid; - private Tid _toTid; - private string _type; - private List _extraList; - private TimError _error; - private Dictionary _extraMap; - - /// - /// 线程id - /// - public string ThreadId { get; set; } - - public Tid FromTid - { - get - { - return _fromTid; - } - set - { - __isset.fromTid = true; - this._fromTid = value; - } - } - - public Tid ToTid - { - get - { - return _toTid; - } - set - { - __isset.toTid = true; - this._toTid = value; - } - } - - /// - /// Get :获取当前域值。类似于http get方法 - /// Set :设置或替换get查询的值。类似于http put方法。 - /// Result :说明成功的响应了先前的查询。类似于http状态码200。 - /// Error: 查询和响应中出现的错误。 - /// - public string Type - { - get - { - return _type; - } - set - { - __isset.type = true; - this._type = value; - } - } - - /// - /// 扩展字段 - /// - public List ExtraList - { - get - { - return _extraList; - } - set - { - __isset.extraList = true; - this._extraList = value; - } - } - - /// - /// 错误码 - /// - public TimError Error - { - get - { - return _error; - } - set - { - __isset.error = true; - this._error = value; - } - } - - public Dictionary ExtraMap - { - get - { - return _extraMap; - } - set - { - __isset.extraMap = true; - this._extraMap = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool fromTid; - public bool toTid; - public bool type; - public bool extraList; - public bool error; - public bool extraMap; - } - - public TimIqBean() { - } - - public TimIqBean(string threadId) : this() { - this.ThreadId = threadId; - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - bool isset_threadId = false; - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.String) { - ThreadId = iprot.ReadString(); - isset_threadId = true; - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.Struct) { - FromTid = new Tid(); - FromTid.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.Struct) { - ToTid = new Tid(); - ToTid.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 4: - if (field.Type == TType.String) { - Type = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 5: - if (field.Type == TType.List) { - { - ExtraList = new List(); - TList _list84 = iprot.ReadListBegin(); - for( int _i85 = 0; _i85 < _list84.Count; ++_i85) - { - TimNode _elem86; - _elem86 = new TimNode(); - _elem86.Read(iprot); - ExtraList.Add(_elem86); - } - iprot.ReadListEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 6: - if (field.Type == TType.Struct) { - Error = new TimError(); - Error.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 7: - if (field.Type == TType.Map) { - { - ExtraMap = new Dictionary(); - TMap _map87 = iprot.ReadMapBegin(); - for( int _i88 = 0; _i88 < _map87.Count; ++_i88) - { - string _key89; - string _val90; - _key89 = iprot.ReadString(); - _val90 = iprot.ReadString(); - ExtraMap[_key89] = _val90; - } - iprot.ReadMapEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - if (!isset_threadId) - throw new TProtocolException(TProtocolException.INVALID_DATA); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("TimIqBean"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - field.Name = "threadId"; - field.Type = TType.String; - field.ID = 1; - oprot.WriteFieldBegin(field); - oprot.WriteString(ThreadId); - oprot.WriteFieldEnd(); - if (FromTid != null && __isset.fromTid) { - field.Name = "fromTid"; - field.Type = TType.Struct; - field.ID = 2; - oprot.WriteFieldBegin(field); - FromTid.Write(oprot); - oprot.WriteFieldEnd(); - } - if (ToTid != null && __isset.toTid) { - field.Name = "toTid"; - field.Type = TType.Struct; - field.ID = 3; - oprot.WriteFieldBegin(field); - ToTid.Write(oprot); - oprot.WriteFieldEnd(); - } - if (Type != null && __isset.type) { - field.Name = "type"; - field.Type = TType.String; - field.ID = 4; - oprot.WriteFieldBegin(field); - oprot.WriteString(Type); - oprot.WriteFieldEnd(); - } - if (ExtraList != null && __isset.extraList) { - field.Name = "extraList"; - field.Type = TType.List; - field.ID = 5; - oprot.WriteFieldBegin(field); - { - oprot.WriteListBegin(new TList(TType.Struct, ExtraList.Count)); - foreach (TimNode _iter91 in ExtraList) - { - _iter91.Write(oprot); - } - oprot.WriteListEnd(); - } - oprot.WriteFieldEnd(); - } - if (Error != null && __isset.error) { - field.Name = "error"; - field.Type = TType.Struct; - field.ID = 6; - oprot.WriteFieldBegin(field); - Error.Write(oprot); - oprot.WriteFieldEnd(); - } - if (ExtraMap != null && __isset.extraMap) { - field.Name = "extraMap"; - field.Type = TType.Map; - field.ID = 7; - oprot.WriteFieldBegin(field); - { - oprot.WriteMapBegin(new TMap(TType.String, TType.String, ExtraMap.Count)); - foreach (string _iter92 in ExtraMap.Keys) - { - oprot.WriteString(_iter92); - oprot.WriteString(ExtraMap[_iter92]); - } - oprot.WriteMapEnd(); - } - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("TimIqBean("); - __sb.Append(", ThreadId: "); - __sb.Append(ThreadId); - if (FromTid != null && __isset.fromTid) { - __sb.Append(", FromTid: "); - __sb.Append(FromTid== null ? "" : FromTid.ToString()); - } - if (ToTid != null && __isset.toTid) { - __sb.Append(", ToTid: "); - __sb.Append(ToTid== null ? "" : ToTid.ToString()); - } - if (Type != null && __isset.type) { - __sb.Append(", Type: "); - __sb.Append(Type); - } - if (ExtraList != null && __isset.extraList) { - __sb.Append(", ExtraList: "); - __sb.Append(ExtraList); - } - if (Error != null && __isset.error) { - __sb.Append(", Error: "); - __sb.Append(Error== null ? "" : Error.ToString()); - } - if (ExtraMap != null && __isset.extraMap) { - __sb.Append(", ExtraMap: "); - __sb.Append(ExtraMap); - } - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/TimMBean.cs b/protocols/gen-csharp/TimMBean.cs deleted file mode 100644 index 07b2e3f..0000000 --- a/protocols/gen-csharp/TimMBean.cs +++ /dev/null @@ -1,641 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class TimMBean : TBase -{ - private string _mid; - private Tid _fromTid; - private Tid _toTid; - private string _body; - private string _type; - private short _msgType; - private TimTime _offline; - private Tid _leaguerTid; - private List _extraList; - private string _timestamp; - private TimError _error; - private Dictionary _extraMap; - private short _readstatus; - - /// - /// 线程id - /// - public string ThreadId { get; set; } - - /// - /// 消息id号 - /// - public string Mid - { - get - { - return _mid; - } - set - { - __isset.mid = true; - this._mid = value; - } - } - - /// - /// 来源Tid - /// - public Tid FromTid - { - get - { - return _fromTid; - } - set - { - __isset.fromTid = true; - this._fromTid = value; - } - } - - /// - /// 目标Tid - /// - public Tid ToTid - { - get - { - return _toTid; - } - set - { - __isset.toTid = true; - this._toTid = value; - } - } - - /// - /// 信息内容 - /// - public string Body - { - get - { - return _body; - } - set - { - __isset.body = true; - this._body = value; - } - } - - /// - /// normal:类似于email,主要特点是不要求响应; - /// chat:类似于qq里的好友即时聊天,主要特点是实时通讯; - /// groupchat:类似于聊天室里的群聊; - /// headline:用于发送alert和notification; - /// error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; - /// - public string Type - { - get - { - return _type; - } - set - { - __isset.type = true; - this._type = value; - } - } - - /// - /// 消息类型 1 文字 2 图片 3 语音 4视频 5混合 - /// - public short MsgType - { - get - { - return _msgType; - } - set - { - __isset.msgType = true; - this._msgType = value; - } - } - - /// - /// 是否离线信息 - /// - public TimTime Offline - { - get - { - return _offline; - } - set - { - __isset.offline = true; - this._offline = value; - } - } - - /// - /// 成员Tid 群聊时信息发送者Tid - /// - public Tid LeaguerTid - { - get - { - return _leaguerTid; - } - set - { - __isset.leaguerTid = true; - this._leaguerTid = value; - } - } - - /// - /// 扩展字段 - /// - public List ExtraList - { - get - { - return _extraList; - } - set - { - __isset.extraList = true; - this._extraList = value; - } - } - - /// - /// 服务器发送信息时间戳(毫秒) - /// - public string Timestamp - { - get - { - return _timestamp; - } - set - { - __isset.timestamp = true; - this._timestamp = value; - } - } - - /// - /// 错误码 - /// - public TimError Error - { - get - { - return _error; - } - set - { - __isset.error = true; - this._error = value; - } - } - - public Dictionary ExtraMap - { - get - { - return _extraMap; - } - set - { - __isset.extraMap = true; - this._extraMap = value; - } - } - - /// - /// 0未读 1已读 - /// - public short Readstatus - { - get - { - return _readstatus; - } - set - { - __isset.readstatus = true; - this._readstatus = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool mid; - public bool fromTid; - public bool toTid; - public bool body; - public bool type; - public bool msgType; - public bool offline; - public bool leaguerTid; - public bool extraList; - public bool timestamp; - public bool error; - public bool extraMap; - public bool readstatus; - } - - public TimMBean() { - } - - public TimMBean(string threadId) : this() { - this.ThreadId = threadId; - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - bool isset_threadId = false; - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.String) { - ThreadId = iprot.ReadString(); - isset_threadId = true; - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.String) { - Mid = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.Struct) { - FromTid = new Tid(); - FromTid.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 4: - if (field.Type == TType.Struct) { - ToTid = new Tid(); - ToTid.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 5: - if (field.Type == TType.String) { - Body = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 6: - if (field.Type == TType.String) { - Type = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 7: - if (field.Type == TType.I16) { - MsgType = iprot.ReadI16(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 8: - if (field.Type == TType.Struct) { - Offline = new TimTime(); - Offline.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 9: - if (field.Type == TType.Struct) { - LeaguerTid = new Tid(); - LeaguerTid.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 10: - if (field.Type == TType.List) { - { - ExtraList = new List(); - TList _list75 = iprot.ReadListBegin(); - for( int _i76 = 0; _i76 < _list75.Count; ++_i76) - { - TimNode _elem77; - _elem77 = new TimNode(); - _elem77.Read(iprot); - ExtraList.Add(_elem77); - } - iprot.ReadListEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 11: - if (field.Type == TType.String) { - Timestamp = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 12: - if (field.Type == TType.Struct) { - Error = new TimError(); - Error.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 13: - if (field.Type == TType.Map) { - { - ExtraMap = new Dictionary(); - TMap _map78 = iprot.ReadMapBegin(); - for( int _i79 = 0; _i79 < _map78.Count; ++_i79) - { - string _key80; - string _val81; - _key80 = iprot.ReadString(); - _val81 = iprot.ReadString(); - ExtraMap[_key80] = _val81; - } - iprot.ReadMapEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 14: - if (field.Type == TType.I16) { - Readstatus = iprot.ReadI16(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - if (!isset_threadId) - throw new TProtocolException(TProtocolException.INVALID_DATA); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("TimMBean"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - field.Name = "threadId"; - field.Type = TType.String; - field.ID = 1; - oprot.WriteFieldBegin(field); - oprot.WriteString(ThreadId); - oprot.WriteFieldEnd(); - if (Mid != null && __isset.mid) { - field.Name = "mid"; - field.Type = TType.String; - field.ID = 2; - oprot.WriteFieldBegin(field); - oprot.WriteString(Mid); - oprot.WriteFieldEnd(); - } - if (FromTid != null && __isset.fromTid) { - field.Name = "fromTid"; - field.Type = TType.Struct; - field.ID = 3; - oprot.WriteFieldBegin(field); - FromTid.Write(oprot); - oprot.WriteFieldEnd(); - } - if (ToTid != null && __isset.toTid) { - field.Name = "toTid"; - field.Type = TType.Struct; - field.ID = 4; - oprot.WriteFieldBegin(field); - ToTid.Write(oprot); - oprot.WriteFieldEnd(); - } - if (Body != null && __isset.body) { - field.Name = "body"; - field.Type = TType.String; - field.ID = 5; - oprot.WriteFieldBegin(field); - oprot.WriteString(Body); - oprot.WriteFieldEnd(); - } - if (Type != null && __isset.type) { - field.Name = "type"; - field.Type = TType.String; - field.ID = 6; - oprot.WriteFieldBegin(field); - oprot.WriteString(Type); - oprot.WriteFieldEnd(); - } - if (__isset.msgType) { - field.Name = "msgType"; - field.Type = TType.I16; - field.ID = 7; - oprot.WriteFieldBegin(field); - oprot.WriteI16(MsgType); - oprot.WriteFieldEnd(); - } - if (Offline != null && __isset.offline) { - field.Name = "offline"; - field.Type = TType.Struct; - field.ID = 8; - oprot.WriteFieldBegin(field); - Offline.Write(oprot); - oprot.WriteFieldEnd(); - } - if (LeaguerTid != null && __isset.leaguerTid) { - field.Name = "leaguerTid"; - field.Type = TType.Struct; - field.ID = 9; - oprot.WriteFieldBegin(field); - LeaguerTid.Write(oprot); - oprot.WriteFieldEnd(); - } - if (ExtraList != null && __isset.extraList) { - field.Name = "extraList"; - field.Type = TType.List; - field.ID = 10; - oprot.WriteFieldBegin(field); - { - oprot.WriteListBegin(new TList(TType.Struct, ExtraList.Count)); - foreach (TimNode _iter82 in ExtraList) - { - _iter82.Write(oprot); - } - oprot.WriteListEnd(); - } - oprot.WriteFieldEnd(); - } - if (Timestamp != null && __isset.timestamp) { - field.Name = "timestamp"; - field.Type = TType.String; - field.ID = 11; - oprot.WriteFieldBegin(field); - oprot.WriteString(Timestamp); - oprot.WriteFieldEnd(); - } - if (Error != null && __isset.error) { - field.Name = "error"; - field.Type = TType.Struct; - field.ID = 12; - oprot.WriteFieldBegin(field); - Error.Write(oprot); - oprot.WriteFieldEnd(); - } - if (ExtraMap != null && __isset.extraMap) { - field.Name = "extraMap"; - field.Type = TType.Map; - field.ID = 13; - oprot.WriteFieldBegin(field); - { - oprot.WriteMapBegin(new TMap(TType.String, TType.String, ExtraMap.Count)); - foreach (string _iter83 in ExtraMap.Keys) - { - oprot.WriteString(_iter83); - oprot.WriteString(ExtraMap[_iter83]); - } - oprot.WriteMapEnd(); - } - oprot.WriteFieldEnd(); - } - if (__isset.readstatus) { - field.Name = "readstatus"; - field.Type = TType.I16; - field.ID = 14; - oprot.WriteFieldBegin(field); - oprot.WriteI16(Readstatus); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("TimMBean("); - __sb.Append(", ThreadId: "); - __sb.Append(ThreadId); - if (Mid != null && __isset.mid) { - __sb.Append(", Mid: "); - __sb.Append(Mid); - } - if (FromTid != null && __isset.fromTid) { - __sb.Append(", FromTid: "); - __sb.Append(FromTid== null ? "" : FromTid.ToString()); - } - if (ToTid != null && __isset.toTid) { - __sb.Append(", ToTid: "); - __sb.Append(ToTid== null ? "" : ToTid.ToString()); - } - if (Body != null && __isset.body) { - __sb.Append(", Body: "); - __sb.Append(Body); - } - if (Type != null && __isset.type) { - __sb.Append(", Type: "); - __sb.Append(Type); - } - if (__isset.msgType) { - __sb.Append(", MsgType: "); - __sb.Append(MsgType); - } - if (Offline != null && __isset.offline) { - __sb.Append(", Offline: "); - __sb.Append(Offline== null ? "" : Offline.ToString()); - } - if (LeaguerTid != null && __isset.leaguerTid) { - __sb.Append(", LeaguerTid: "); - __sb.Append(LeaguerTid== null ? "" : LeaguerTid.ToString()); - } - if (ExtraList != null && __isset.extraList) { - __sb.Append(", ExtraList: "); - __sb.Append(ExtraList); - } - if (Timestamp != null && __isset.timestamp) { - __sb.Append(", Timestamp: "); - __sb.Append(Timestamp); - } - if (Error != null && __isset.error) { - __sb.Append(", Error: "); - __sb.Append(Error== null ? "" : Error.ToString()); - } - if (ExtraMap != null && __isset.extraMap) { - __sb.Append(", ExtraMap: "); - __sb.Append(ExtraMap); - } - if (__isset.readstatus) { - __sb.Append(", Readstatus: "); - __sb.Append(Readstatus); - } - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/TimMBeanList.cs b/protocols/gen-csharp/TimMBeanList.cs deleted file mode 100644 index 139b639..0000000 --- a/protocols/gen-csharp/TimMBeanList.cs +++ /dev/null @@ -1,259 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class TimMBeanList : TBase -{ - private List _timMBeanList; - private string _reqType; - private Dictionary _extraMap; - - public string ThreadId { get; set; } - - /// - /// 信息列表 - /// - public List TimMBeanList_ - { - get - { - return _timMBeanList; - } - set - { - __isset.timMBeanList = true; - this._timMBeanList = value; - } - } - - /// - /// 类型 - /// - public string ReqType - { - get - { - return _reqType; - } - set - { - __isset.reqType = true; - this._reqType = value; - } - } - - public Dictionary ExtraMap - { - get - { - return _extraMap; - } - set - { - __isset.extraMap = true; - this._extraMap = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool timMBeanList; - public bool reqType; - public bool extraMap; - } - - public TimMBeanList() { - } - - public TimMBeanList(string threadId) : this() { - this.ThreadId = threadId; - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - bool isset_threadId = false; - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.String) { - ThreadId = iprot.ReadString(); - isset_threadId = true; - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.List) { - { - TimMBeanList_ = new List(); - TList _list149 = iprot.ReadListBegin(); - for( int _i150 = 0; _i150 < _list149.Count; ++_i150) - { - TimMBean _elem151; - _elem151 = new TimMBean(); - _elem151.Read(iprot); - TimMBeanList_.Add(_elem151); - } - iprot.ReadListEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.String) { - ReqType = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 4: - if (field.Type == TType.Map) { - { - ExtraMap = new Dictionary(); - TMap _map152 = iprot.ReadMapBegin(); - for( int _i153 = 0; _i153 < _map152.Count; ++_i153) - { - string _key154; - string _val155; - _key154 = iprot.ReadString(); - _val155 = iprot.ReadString(); - ExtraMap[_key154] = _val155; - } - iprot.ReadMapEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - if (!isset_threadId) - throw new TProtocolException(TProtocolException.INVALID_DATA); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("TimMBeanList"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - field.Name = "threadId"; - field.Type = TType.String; - field.ID = 1; - oprot.WriteFieldBegin(field); - oprot.WriteString(ThreadId); - oprot.WriteFieldEnd(); - if (TimMBeanList_ != null && __isset.timMBeanList) { - field.Name = "timMBeanList"; - field.Type = TType.List; - field.ID = 2; - oprot.WriteFieldBegin(field); - { - oprot.WriteListBegin(new TList(TType.Struct, TimMBeanList_.Count)); - foreach (TimMBean _iter156 in TimMBeanList_) - { - _iter156.Write(oprot); - } - oprot.WriteListEnd(); - } - oprot.WriteFieldEnd(); - } - if (ReqType != null && __isset.reqType) { - field.Name = "reqType"; - field.Type = TType.String; - field.ID = 3; - oprot.WriteFieldBegin(field); - oprot.WriteString(ReqType); - oprot.WriteFieldEnd(); - } - if (ExtraMap != null && __isset.extraMap) { - field.Name = "extraMap"; - field.Type = TType.Map; - field.ID = 4; - oprot.WriteFieldBegin(field); - { - oprot.WriteMapBegin(new TMap(TType.String, TType.String, ExtraMap.Count)); - foreach (string _iter157 in ExtraMap.Keys) - { - oprot.WriteString(_iter157); - oprot.WriteString(ExtraMap[_iter157]); - } - oprot.WriteMapEnd(); - } - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("TimMBeanList("); - __sb.Append(", ThreadId: "); - __sb.Append(ThreadId); - if (TimMBeanList_ != null && __isset.timMBeanList) { - __sb.Append(", TimMBeanList_: "); - __sb.Append(TimMBeanList_); - } - if (ReqType != null && __isset.reqType) { - __sb.Append(", ReqType: "); - __sb.Append(ReqType); - } - if (ExtraMap != null && __isset.extraMap) { - __sb.Append(", ExtraMap: "); - __sb.Append(ExtraMap); - } - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/TimMessageIq.cs b/protocols/gen-csharp/TimMessageIq.cs deleted file mode 100644 index 65ccee9..0000000 --- a/protocols/gen-csharp/TimMessageIq.cs +++ /dev/null @@ -1,297 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class TimMessageIq : TBase -{ - private List _tidlist; - private TimPage _timPage; - private List _midlist; - private Dictionary _extraMap; - - /// - /// tid集合 - /// - public List Tidlist - { - get - { - return _tidlist; - } - set - { - __isset.tidlist = true; - this._tidlist = value; - } - } - - /// - /// 分页 - /// - public TimPage TimPage - { - get - { - return _timPage; - } - set - { - __isset.timPage = true; - this._timPage = value; - } - } - - /// - /// mid集合 - /// - public List Midlist - { - get - { - return _midlist; - } - set - { - __isset.midlist = true; - this._midlist = value; - } - } - - public Dictionary ExtraMap - { - get - { - return _extraMap; - } - set - { - __isset.extraMap = true; - this._extraMap = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool tidlist; - public bool timPage; - public bool midlist; - public bool extraMap; - } - - public TimMessageIq() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.List) { - { - Tidlist = new List(); - TList _list136 = iprot.ReadListBegin(); - for( int _i137 = 0; _i137 < _list136.Count; ++_i137) - { - string _elem138; - _elem138 = iprot.ReadString(); - Tidlist.Add(_elem138); - } - iprot.ReadListEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.Struct) { - TimPage = new TimPage(); - TimPage.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.List) { - { - Midlist = new List(); - TList _list139 = iprot.ReadListBegin(); - for( int _i140 = 0; _i140 < _list139.Count; ++_i140) - { - string _elem141; - _elem141 = iprot.ReadString(); - Midlist.Add(_elem141); - } - iprot.ReadListEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 4: - if (field.Type == TType.Map) { - { - ExtraMap = new Dictionary(); - TMap _map142 = iprot.ReadMapBegin(); - for( int _i143 = 0; _i143 < _map142.Count; ++_i143) - { - string _key144; - string _val145; - _key144 = iprot.ReadString(); - _val145 = iprot.ReadString(); - ExtraMap[_key144] = _val145; - } - iprot.ReadMapEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("TimMessageIq"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Tidlist != null && __isset.tidlist) { - field.Name = "tidlist"; - field.Type = TType.List; - field.ID = 1; - oprot.WriteFieldBegin(field); - { - oprot.WriteListBegin(new TList(TType.String, Tidlist.Count)); - foreach (string _iter146 in Tidlist) - { - oprot.WriteString(_iter146); - } - oprot.WriteListEnd(); - } - oprot.WriteFieldEnd(); - } - if (TimPage != null && __isset.timPage) { - field.Name = "timPage"; - field.Type = TType.Struct; - field.ID = 2; - oprot.WriteFieldBegin(field); - TimPage.Write(oprot); - oprot.WriteFieldEnd(); - } - if (Midlist != null && __isset.midlist) { - field.Name = "midlist"; - field.Type = TType.List; - field.ID = 3; - oprot.WriteFieldBegin(field); - { - oprot.WriteListBegin(new TList(TType.String, Midlist.Count)); - foreach (string _iter147 in Midlist) - { - oprot.WriteString(_iter147); - } - oprot.WriteListEnd(); - } - oprot.WriteFieldEnd(); - } - if (ExtraMap != null && __isset.extraMap) { - field.Name = "extraMap"; - field.Type = TType.Map; - field.ID = 4; - oprot.WriteFieldBegin(field); - { - oprot.WriteMapBegin(new TMap(TType.String, TType.String, ExtraMap.Count)); - foreach (string _iter148 in ExtraMap.Keys) - { - oprot.WriteString(_iter148); - oprot.WriteString(ExtraMap[_iter148]); - } - oprot.WriteMapEnd(); - } - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("TimMessageIq("); - bool __first = true; - if (Tidlist != null && __isset.tidlist) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Tidlist: "); - __sb.Append(Tidlist); - } - if (TimPage != null && __isset.timPage) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("TimPage: "); - __sb.Append(TimPage== null ? "" : TimPage.ToString()); - } - if (Midlist != null && __isset.midlist) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Midlist: "); - __sb.Append(Midlist); - } - if (ExtraMap != null && __isset.extraMap) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("ExtraMap: "); - __sb.Append(ExtraMap); - } - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/TimNode.cs b/protocols/gen-csharp/TimNode.cs deleted file mode 100644 index 34cb40d..0000000 --- a/protocols/gen-csharp/TimNode.cs +++ /dev/null @@ -1,167 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class TimNode : TBase -{ - private string _key; - private string _value; - - /// - /// 键 - /// - public string Key - { - get - { - return _key; - } - set - { - __isset.key = true; - this._key = value; - } - } - - /// - /// 值 - /// - public string Value - { - get - { - return _value; - } - set - { - __isset.@value = true; - this._value = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool key; - public bool @value; - } - - public TimNode() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.String) { - Key = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.String) { - Value = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("TimNode"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Key != null && __isset.key) { - field.Name = "key"; - field.Type = TType.String; - field.ID = 1; - oprot.WriteFieldBegin(field); - oprot.WriteString(Key); - oprot.WriteFieldEnd(); - } - if (Value != null && __isset.@value) { - field.Name = "value"; - field.Type = TType.String; - field.ID = 2; - oprot.WriteFieldBegin(field); - oprot.WriteString(Value); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("TimNode("); - bool __first = true; - if (Key != null && __isset.key) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Key: "); - __sb.Append(Key); - } - if (Value != null && __isset.@value) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Value: "); - __sb.Append(Value); - } - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/TimPBean.cs b/protocols/gen-csharp/TimPBean.cs deleted file mode 100644 index b6aba0d..0000000 --- a/protocols/gen-csharp/TimPBean.cs +++ /dev/null @@ -1,523 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class TimPBean : TBase -{ - private Tid _fromTid; - private Tid _toTid; - private string _status; - private string _type; - private int _priority; - private string _show; - private Tid _leaguerTid; - private List _extraList; - private TimError _error; - private Dictionary _extraMap; - - /// - /// 标识 - /// - public string ThreadId { get; set; } - - public Tid FromTid - { - get - { - return _fromTid; - } - set - { - __isset.fromTid = true; - this._fromTid = value; - } - } - - public Tid ToTid - { - get - { - return _toTid; - } - set - { - __isset.toTid = true; - this._toTid = value; - } - } - - /// - /// subscribe:订阅其他用户的状态 probe:请求获取其他用户的状态 unavailable:不可用,离线(offline)状态 - /// - public string Status - { - get - { - return _status; - } - set - { - __isset.status = true; - this._status = value; - } - } - - /// - /// normal:类似于email,主要特点是不要求响应; - /// chat:类似于qq里的好友即时聊天,主要特点是实时通讯; - /// groupchat:类似于聊天室里的群聊; - /// headline:用于发送alert和notification; - /// error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; - /// - public string Type - { - get - { - return _type; - } - set - { - __isset.type = true; - this._type = value; - } - } - - /// - /// 优先权 0 。高优先级的resource能接受发送到bare JID的消息,低优先级的resource不能 - /// - public int Priority - { - get - { - return _priority; - } - set - { - __isset.priority = true; - this._priority = value; - } - } - - /// - /// chat:聊天中 away:暂时离开 xa:eXtend Away,长时间离开 dnd:勿打扰 online:在线 offline:离线 - /// - public string Show - { - get - { - return _show; - } - set - { - __isset.show = true; - this._show = value; - } - } - - /// - /// 成员Tid 群聊时信息发送者Tid - /// - public Tid LeaguerTid - { - get - { - return _leaguerTid; - } - set - { - __isset.leaguerTid = true; - this._leaguerTid = value; - } - } - - /// - /// 扩展字段 - /// - public List ExtraList - { - get - { - return _extraList; - } - set - { - __isset.extraList = true; - this._extraList = value; - } - } - - /// - /// 错误码 - /// - public TimError Error - { - get - { - return _error; - } - set - { - __isset.error = true; - this._error = value; - } - } - - public Dictionary ExtraMap - { - get - { - return _extraMap; - } - set - { - __isset.extraMap = true; - this._extraMap = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool fromTid; - public bool toTid; - public bool status; - public bool type; - public bool priority; - public bool show; - public bool leaguerTid; - public bool extraList; - public bool error; - public bool extraMap; - } - - public TimPBean() { - } - - public TimPBean(string threadId) : this() { - this.ThreadId = threadId; - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - bool isset_threadId = false; - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.String) { - ThreadId = iprot.ReadString(); - isset_threadId = true; - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.Struct) { - FromTid = new Tid(); - FromTid.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.Struct) { - ToTid = new Tid(); - ToTid.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 4: - if (field.Type == TType.String) { - Status = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 5: - if (field.Type == TType.String) { - Type = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 6: - if (field.Type == TType.I32) { - Priority = iprot.ReadI32(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 7: - if (field.Type == TType.String) { - Show = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 8: - if (field.Type == TType.Struct) { - LeaguerTid = new Tid(); - LeaguerTid.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 9: - if (field.Type == TType.List) { - { - ExtraList = new List(); - TList _list66 = iprot.ReadListBegin(); - for( int _i67 = 0; _i67 < _list66.Count; ++_i67) - { - TimNode _elem68; - _elem68 = new TimNode(); - _elem68.Read(iprot); - ExtraList.Add(_elem68); - } - iprot.ReadListEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 10: - if (field.Type == TType.Struct) { - Error = new TimError(); - Error.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 11: - if (field.Type == TType.Map) { - { - ExtraMap = new Dictionary(); - TMap _map69 = iprot.ReadMapBegin(); - for( int _i70 = 0; _i70 < _map69.Count; ++_i70) - { - string _key71; - string _val72; - _key71 = iprot.ReadString(); - _val72 = iprot.ReadString(); - ExtraMap[_key71] = _val72; - } - iprot.ReadMapEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - if (!isset_threadId) - throw new TProtocolException(TProtocolException.INVALID_DATA); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("TimPBean"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - field.Name = "threadId"; - field.Type = TType.String; - field.ID = 1; - oprot.WriteFieldBegin(field); - oprot.WriteString(ThreadId); - oprot.WriteFieldEnd(); - if (FromTid != null && __isset.fromTid) { - field.Name = "fromTid"; - field.Type = TType.Struct; - field.ID = 2; - oprot.WriteFieldBegin(field); - FromTid.Write(oprot); - oprot.WriteFieldEnd(); - } - if (ToTid != null && __isset.toTid) { - field.Name = "toTid"; - field.Type = TType.Struct; - field.ID = 3; - oprot.WriteFieldBegin(field); - ToTid.Write(oprot); - oprot.WriteFieldEnd(); - } - if (Status != null && __isset.status) { - field.Name = "status"; - field.Type = TType.String; - field.ID = 4; - oprot.WriteFieldBegin(field); - oprot.WriteString(Status); - oprot.WriteFieldEnd(); - } - if (Type != null && __isset.type) { - field.Name = "type"; - field.Type = TType.String; - field.ID = 5; - oprot.WriteFieldBegin(field); - oprot.WriteString(Type); - oprot.WriteFieldEnd(); - } - if (__isset.priority) { - field.Name = "priority"; - field.Type = TType.I32; - field.ID = 6; - oprot.WriteFieldBegin(field); - oprot.WriteI32(Priority); - oprot.WriteFieldEnd(); - } - if (Show != null && __isset.show) { - field.Name = "show"; - field.Type = TType.String; - field.ID = 7; - oprot.WriteFieldBegin(field); - oprot.WriteString(Show); - oprot.WriteFieldEnd(); - } - if (LeaguerTid != null && __isset.leaguerTid) { - field.Name = "leaguerTid"; - field.Type = TType.Struct; - field.ID = 8; - oprot.WriteFieldBegin(field); - LeaguerTid.Write(oprot); - oprot.WriteFieldEnd(); - } - if (ExtraList != null && __isset.extraList) { - field.Name = "extraList"; - field.Type = TType.List; - field.ID = 9; - oprot.WriteFieldBegin(field); - { - oprot.WriteListBegin(new TList(TType.Struct, ExtraList.Count)); - foreach (TimNode _iter73 in ExtraList) - { - _iter73.Write(oprot); - } - oprot.WriteListEnd(); - } - oprot.WriteFieldEnd(); - } - if (Error != null && __isset.error) { - field.Name = "error"; - field.Type = TType.Struct; - field.ID = 10; - oprot.WriteFieldBegin(field); - Error.Write(oprot); - oprot.WriteFieldEnd(); - } - if (ExtraMap != null && __isset.extraMap) { - field.Name = "extraMap"; - field.Type = TType.Map; - field.ID = 11; - oprot.WriteFieldBegin(field); - { - oprot.WriteMapBegin(new TMap(TType.String, TType.String, ExtraMap.Count)); - foreach (string _iter74 in ExtraMap.Keys) - { - oprot.WriteString(_iter74); - oprot.WriteString(ExtraMap[_iter74]); - } - oprot.WriteMapEnd(); - } - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("TimPBean("); - __sb.Append(", ThreadId: "); - __sb.Append(ThreadId); - if (FromTid != null && __isset.fromTid) { - __sb.Append(", FromTid: "); - __sb.Append(FromTid== null ? "" : FromTid.ToString()); - } - if (ToTid != null && __isset.toTid) { - __sb.Append(", ToTid: "); - __sb.Append(ToTid== null ? "" : ToTid.ToString()); - } - if (Status != null && __isset.status) { - __sb.Append(", Status: "); - __sb.Append(Status); - } - if (Type != null && __isset.type) { - __sb.Append(", Type: "); - __sb.Append(Type); - } - if (__isset.priority) { - __sb.Append(", Priority: "); - __sb.Append(Priority); - } - if (Show != null && __isset.show) { - __sb.Append(", Show: "); - __sb.Append(Show); - } - if (LeaguerTid != null && __isset.leaguerTid) { - __sb.Append(", LeaguerTid: "); - __sb.Append(LeaguerTid== null ? "" : LeaguerTid.ToString()); - } - if (ExtraList != null && __isset.extraList) { - __sb.Append(", ExtraList: "); - __sb.Append(ExtraList); - } - if (Error != null && __isset.error) { - __sb.Append(", Error: "); - __sb.Append(Error== null ? "" : Error.ToString()); - } - if (ExtraMap != null && __isset.extraMap) { - __sb.Append(", ExtraMap: "); - __sb.Append(ExtraMap); - } - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/TimPBeanList.cs b/protocols/gen-csharp/TimPBeanList.cs deleted file mode 100644 index 127a33f..0000000 --- a/protocols/gen-csharp/TimPBeanList.cs +++ /dev/null @@ -1,259 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class TimPBeanList : TBase -{ - private List _timPBeanList; - private string _reqType; - private Dictionary _extraMap; - - public string ThreadId { get; set; } - - /// - /// 状态信息列表 - /// - public List TimPBeanList_ - { - get - { - return _timPBeanList; - } - set - { - __isset.timPBeanList = true; - this._timPBeanList = value; - } - } - - /// - /// 类型 - /// - public string ReqType - { - get - { - return _reqType; - } - set - { - __isset.reqType = true; - this._reqType = value; - } - } - - public Dictionary ExtraMap - { - get - { - return _extraMap; - } - set - { - __isset.extraMap = true; - this._extraMap = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool timPBeanList; - public bool reqType; - public bool extraMap; - } - - public TimPBeanList() { - } - - public TimPBeanList(string threadId) : this() { - this.ThreadId = threadId; - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - bool isset_threadId = false; - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.String) { - ThreadId = iprot.ReadString(); - isset_threadId = true; - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.List) { - { - TimPBeanList_ = new List(); - TList _list158 = iprot.ReadListBegin(); - for( int _i159 = 0; _i159 < _list158.Count; ++_i159) - { - TimPBean _elem160; - _elem160 = new TimPBean(); - _elem160.Read(iprot); - TimPBeanList_.Add(_elem160); - } - iprot.ReadListEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.String) { - ReqType = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 4: - if (field.Type == TType.Map) { - { - ExtraMap = new Dictionary(); - TMap _map161 = iprot.ReadMapBegin(); - for( int _i162 = 0; _i162 < _map161.Count; ++_i162) - { - string _key163; - string _val164; - _key163 = iprot.ReadString(); - _val164 = iprot.ReadString(); - ExtraMap[_key163] = _val164; - } - iprot.ReadMapEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - if (!isset_threadId) - throw new TProtocolException(TProtocolException.INVALID_DATA); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("TimPBeanList"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - field.Name = "threadId"; - field.Type = TType.String; - field.ID = 1; - oprot.WriteFieldBegin(field); - oprot.WriteString(ThreadId); - oprot.WriteFieldEnd(); - if (TimPBeanList_ != null && __isset.timPBeanList) { - field.Name = "timPBeanList"; - field.Type = TType.List; - field.ID = 2; - oprot.WriteFieldBegin(field); - { - oprot.WriteListBegin(new TList(TType.Struct, TimPBeanList_.Count)); - foreach (TimPBean _iter165 in TimPBeanList_) - { - _iter165.Write(oprot); - } - oprot.WriteListEnd(); - } - oprot.WriteFieldEnd(); - } - if (ReqType != null && __isset.reqType) { - field.Name = "reqType"; - field.Type = TType.String; - field.ID = 3; - oprot.WriteFieldBegin(field); - oprot.WriteString(ReqType); - oprot.WriteFieldEnd(); - } - if (ExtraMap != null && __isset.extraMap) { - field.Name = "extraMap"; - field.Type = TType.Map; - field.ID = 4; - oprot.WriteFieldBegin(field); - { - oprot.WriteMapBegin(new TMap(TType.String, TType.String, ExtraMap.Count)); - foreach (string _iter166 in ExtraMap.Keys) - { - oprot.WriteString(_iter166); - oprot.WriteString(ExtraMap[_iter166]); - } - oprot.WriteMapEnd(); - } - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("TimPBeanList("); - __sb.Append(", ThreadId: "); - __sb.Append(ThreadId); - if (TimPBeanList_ != null && __isset.timPBeanList) { - __sb.Append(", TimPBeanList_: "); - __sb.Append(TimPBeanList_); - } - if (ReqType != null && __isset.reqType) { - __sb.Append(", ReqType: "); - __sb.Append(ReqType); - } - if (ExtraMap != null && __isset.extraMap) { - __sb.Append(", ExtraMap: "); - __sb.Append(ExtraMap); - } - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/TimPage.cs b/protocols/gen-csharp/TimPage.cs deleted file mode 100644 index 38d35b3..0000000 --- a/protocols/gen-csharp/TimPage.cs +++ /dev/null @@ -1,262 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class TimPage : TBase -{ - private string _fromTimeStamp; - private string _toTimeStamp; - private int _limitCount; - private Dictionary _extraMap; - - /// - /// 时间上 - /// - public string FromTimeStamp - { - get - { - return _fromTimeStamp; - } - set - { - __isset.fromTimeStamp = true; - this._fromTimeStamp = value; - } - } - - /// - /// 时间下 - /// - public string ToTimeStamp - { - get - { - return _toTimeStamp; - } - set - { - __isset.toTimeStamp = true; - this._toTimeStamp = value; - } - } - - /// - /// 条数 - /// - public int LimitCount - { - get - { - return _limitCount; - } - set - { - __isset.limitCount = true; - this._limitCount = value; - } - } - - public Dictionary ExtraMap - { - get - { - return _extraMap; - } - set - { - __isset.extraMap = true; - this._extraMap = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool fromTimeStamp; - public bool toTimeStamp; - public bool limitCount; - public bool extraMap; - } - - public TimPage() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.String) { - FromTimeStamp = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.String) { - ToTimeStamp = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.I32) { - LimitCount = iprot.ReadI32(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 4: - if (field.Type == TType.Map) { - { - ExtraMap = new Dictionary(); - TMap _map131 = iprot.ReadMapBegin(); - for( int _i132 = 0; _i132 < _map131.Count; ++_i132) - { - string _key133; - string _val134; - _key133 = iprot.ReadString(); - _val134 = iprot.ReadString(); - ExtraMap[_key133] = _val134; - } - iprot.ReadMapEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("TimPage"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (FromTimeStamp != null && __isset.fromTimeStamp) { - field.Name = "fromTimeStamp"; - field.Type = TType.String; - field.ID = 1; - oprot.WriteFieldBegin(field); - oprot.WriteString(FromTimeStamp); - oprot.WriteFieldEnd(); - } - if (ToTimeStamp != null && __isset.toTimeStamp) { - field.Name = "toTimeStamp"; - field.Type = TType.String; - field.ID = 2; - oprot.WriteFieldBegin(field); - oprot.WriteString(ToTimeStamp); - oprot.WriteFieldEnd(); - } - if (__isset.limitCount) { - field.Name = "limitCount"; - field.Type = TType.I32; - field.ID = 3; - oprot.WriteFieldBegin(field); - oprot.WriteI32(LimitCount); - oprot.WriteFieldEnd(); - } - if (ExtraMap != null && __isset.extraMap) { - field.Name = "extraMap"; - field.Type = TType.Map; - field.ID = 4; - oprot.WriteFieldBegin(field); - { - oprot.WriteMapBegin(new TMap(TType.String, TType.String, ExtraMap.Count)); - foreach (string _iter135 in ExtraMap.Keys) - { - oprot.WriteString(_iter135); - oprot.WriteString(ExtraMap[_iter135]); - } - oprot.WriteMapEnd(); - } - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("TimPage("); - bool __first = true; - if (FromTimeStamp != null && __isset.fromTimeStamp) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("FromTimeStamp: "); - __sb.Append(FromTimeStamp); - } - if (ToTimeStamp != null && __isset.toTimeStamp) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("ToTimeStamp: "); - __sb.Append(ToTimeStamp); - } - if (__isset.limitCount) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("LimitCount: "); - __sb.Append(LimitCount); - } - if (ExtraMap != null && __isset.extraMap) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("ExtraMap: "); - __sb.Append(ExtraMap); - } - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/TimParam.cs b/protocols/gen-csharp/TimParam.cs deleted file mode 100644 index 76251cf..0000000 --- a/protocols/gen-csharp/TimParam.cs +++ /dev/null @@ -1,397 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class TimParam : TBase -{ - private string _timestamp; - private short _version; - private string _lang; - private List _extraList; - private Dictionary _extraMap; - private string _interflow; - private string _tls; - - /// - /// 服务器时间 - /// - public string Timestamp - { - get - { - return _timestamp; - } - set - { - __isset.timestamp = true; - this._timestamp = value; - } - } - - /// - /// 版本 - /// - public short Version - { - get - { - return _version; - } - set - { - __isset.version = true; - this._version = value; - } - } - - /// - /// 语言 - /// - public string Lang - { - get - { - return _lang; - } - set - { - __isset.lang = true; - this._lang = value; - } - } - - /// - /// 附加信息 - /// - public List ExtraList - { - get - { - return _extraList; - } - set - { - __isset.extraList = true; - this._extraList = value; - } - } - - public Dictionary ExtraMap - { - get - { - return _extraMap; - } - set - { - __isset.extraMap = true; - this._extraMap = value; - } - } - - /// - /// 消息合流 - /// - public string Interflow - { - get - { - return _interflow; - } - set - { - __isset.interflow = true; - this._interflow = value; - } - } - - /// - /// tls - /// - public string Tls - { - get - { - return _tls; - } - set - { - __isset.tls = true; - this._tls = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool timestamp; - public bool version; - public bool lang; - public bool extraList; - public bool extraMap; - public bool interflow; - public bool tls; - } - - public TimParam() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.String) { - Timestamp = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.I16) { - Version = iprot.ReadI16(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.String) { - Lang = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 4: - if (field.Type == TType.List) { - { - ExtraList = new List(); - TList _list9 = iprot.ReadListBegin(); - for( int _i10 = 0; _i10 < _list9.Count; ++_i10) - { - TimNode _elem11; - _elem11 = new TimNode(); - _elem11.Read(iprot); - ExtraList.Add(_elem11); - } - iprot.ReadListEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 5: - if (field.Type == TType.Map) { - { - ExtraMap = new Dictionary(); - TMap _map12 = iprot.ReadMapBegin(); - for( int _i13 = 0; _i13 < _map12.Count; ++_i13) - { - string _key14; - string _val15; - _key14 = iprot.ReadString(); - _val15 = iprot.ReadString(); - ExtraMap[_key14] = _val15; - } - iprot.ReadMapEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 6: - if (field.Type == TType.String) { - Interflow = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 7: - if (field.Type == TType.String) { - Tls = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("TimParam"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Timestamp != null && __isset.timestamp) { - field.Name = "timestamp"; - field.Type = TType.String; - field.ID = 1; - oprot.WriteFieldBegin(field); - oprot.WriteString(Timestamp); - oprot.WriteFieldEnd(); - } - if (__isset.version) { - field.Name = "version"; - field.Type = TType.I16; - field.ID = 2; - oprot.WriteFieldBegin(field); - oprot.WriteI16(Version); - oprot.WriteFieldEnd(); - } - if (Lang != null && __isset.lang) { - field.Name = "lang"; - field.Type = TType.String; - field.ID = 3; - oprot.WriteFieldBegin(field); - oprot.WriteString(Lang); - oprot.WriteFieldEnd(); - } - if (ExtraList != null && __isset.extraList) { - field.Name = "extraList"; - field.Type = TType.List; - field.ID = 4; - oprot.WriteFieldBegin(field); - { - oprot.WriteListBegin(new TList(TType.Struct, ExtraList.Count)); - foreach (TimNode _iter16 in ExtraList) - { - _iter16.Write(oprot); - } - oprot.WriteListEnd(); - } - oprot.WriteFieldEnd(); - } - if (ExtraMap != null && __isset.extraMap) { - field.Name = "extraMap"; - field.Type = TType.Map; - field.ID = 5; - oprot.WriteFieldBegin(field); - { - oprot.WriteMapBegin(new TMap(TType.String, TType.String, ExtraMap.Count)); - foreach (string _iter17 in ExtraMap.Keys) - { - oprot.WriteString(_iter17); - oprot.WriteString(ExtraMap[_iter17]); - } - oprot.WriteMapEnd(); - } - oprot.WriteFieldEnd(); - } - if (Interflow != null && __isset.interflow) { - field.Name = "interflow"; - field.Type = TType.String; - field.ID = 6; - oprot.WriteFieldBegin(field); - oprot.WriteString(Interflow); - oprot.WriteFieldEnd(); - } - if (Tls != null && __isset.tls) { - field.Name = "tls"; - field.Type = TType.String; - field.ID = 7; - oprot.WriteFieldBegin(field); - oprot.WriteString(Tls); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("TimParam("); - bool __first = true; - if (Timestamp != null && __isset.timestamp) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Timestamp: "); - __sb.Append(Timestamp); - } - if (__isset.version) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Version: "); - __sb.Append(Version); - } - if (Lang != null && __isset.lang) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Lang: "); - __sb.Append(Lang); - } - if (ExtraList != null && __isset.extraList) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("ExtraList: "); - __sb.Append(ExtraList); - } - if (ExtraMap != null && __isset.extraMap) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("ExtraMap: "); - __sb.Append(ExtraMap); - } - if (Interflow != null && __isset.interflow) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Interflow: "); - __sb.Append(Interflow); - } - if (Tls != null && __isset.tls) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Tls: "); - __sb.Append(Tls); - } - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/TimPropertyBean.cs b/protocols/gen-csharp/TimPropertyBean.cs deleted file mode 100644 index 4021e46..0000000 --- a/protocols/gen-csharp/TimPropertyBean.cs +++ /dev/null @@ -1,203 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class TimPropertyBean : TBase -{ - private string _threadId; - private string _interflow; - private string _tls; - - public string ThreadId - { - get - { - return _threadId; - } - set - { - __isset.threadId = true; - this._threadId = value; - } - } - - /// - /// 消息合流 - /// - public string Interflow - { - get - { - return _interflow; - } - set - { - __isset.interflow = true; - this._interflow = value; - } - } - - /// - /// tls - /// - public string Tls - { - get - { - return _tls; - } - set - { - __isset.tls = true; - this._tls = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool threadId; - public bool interflow; - public bool tls; - } - - public TimPropertyBean() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.String) { - ThreadId = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.String) { - Interflow = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.String) { - Tls = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("TimPropertyBean"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (ThreadId != null && __isset.threadId) { - field.Name = "threadId"; - field.Type = TType.String; - field.ID = 1; - oprot.WriteFieldBegin(field); - oprot.WriteString(ThreadId); - oprot.WriteFieldEnd(); - } - if (Interflow != null && __isset.interflow) { - field.Name = "interflow"; - field.Type = TType.String; - field.ID = 2; - oprot.WriteFieldBegin(field); - oprot.WriteString(Interflow); - oprot.WriteFieldEnd(); - } - if (Tls != null && __isset.tls) { - field.Name = "tls"; - field.Type = TType.String; - field.ID = 3; - oprot.WriteFieldBegin(field); - oprot.WriteString(Tls); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("TimPropertyBean("); - bool __first = true; - if (ThreadId != null && __isset.threadId) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("ThreadId: "); - __sb.Append(ThreadId); - } - if (Interflow != null && __isset.interflow) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Interflow: "); - __sb.Append(Interflow); - } - if (Tls != null && __isset.tls) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Tls: "); - __sb.Append(Tls); - } - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/TimRemoteRoom.cs b/protocols/gen-csharp/TimRemoteRoom.cs deleted file mode 100644 index 936b552..0000000 --- a/protocols/gen-csharp/TimRemoteRoom.cs +++ /dev/null @@ -1,225 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class TimRemoteRoom : TBase -{ - private TimError _error; - private TimRoom _room; - private Dictionary _extraMap; - - /// - /// 错误码 - /// - public TimError Error - { - get - { - return _error; - } - set - { - __isset.error = true; - this._error = value; - } - } - - /// - /// 远程房间信息 - /// - public TimRoom Room - { - get - { - return _room; - } - set - { - __isset.room = true; - this._room = value; - } - } - - public Dictionary ExtraMap - { - get - { - return _extraMap; - } - set - { - __isset.extraMap = true; - this._extraMap = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool error; - public bool room; - public bool extraMap; - } - - public TimRemoteRoom() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - Error = new TimError(); - Error.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.Struct) { - Room = new TimRoom(); - Room.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.Map) { - { - ExtraMap = new Dictionary(); - TMap _map103 = iprot.ReadMapBegin(); - for( int _i104 = 0; _i104 < _map103.Count; ++_i104) - { - string _key105; - string _val106; - _key105 = iprot.ReadString(); - _val106 = iprot.ReadString(); - ExtraMap[_key105] = _val106; - } - iprot.ReadMapEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("TimRemoteRoom"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Error != null && __isset.error) { - field.Name = "error"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - Error.Write(oprot); - oprot.WriteFieldEnd(); - } - if (Room != null && __isset.room) { - field.Name = "room"; - field.Type = TType.Struct; - field.ID = 2; - oprot.WriteFieldBegin(field); - Room.Write(oprot); - oprot.WriteFieldEnd(); - } - if (ExtraMap != null && __isset.extraMap) { - field.Name = "extraMap"; - field.Type = TType.Map; - field.ID = 3; - oprot.WriteFieldBegin(field); - { - oprot.WriteMapBegin(new TMap(TType.String, TType.String, ExtraMap.Count)); - foreach (string _iter107 in ExtraMap.Keys) - { - oprot.WriteString(_iter107); - oprot.WriteString(ExtraMap[_iter107]); - } - oprot.WriteMapEnd(); - } - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("TimRemoteRoom("); - bool __first = true; - if (Error != null && __isset.error) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Error: "); - __sb.Append(Error== null ? "" : Error.ToString()); - } - if (Room != null && __isset.room) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Room: "); - __sb.Append(Room== null ? "" : Room.ToString()); - } - if (ExtraMap != null && __isset.extraMap) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("ExtraMap: "); - __sb.Append(ExtraMap); - } - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/TimRemoteUserBean.cs b/protocols/gen-csharp/TimRemoteUserBean.cs deleted file mode 100644 index e3c4c37..0000000 --- a/protocols/gen-csharp/TimRemoteUserBean.cs +++ /dev/null @@ -1,225 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class TimRemoteUserBean : TBase -{ - private TimError _error; - private TimUserBean _ub; - private Dictionary _extraMap; - - /// - /// 错误码 - /// - public TimError Error - { - get - { - return _error; - } - set - { - __isset.error = true; - this._error = value; - } - } - - /// - /// 远程用户信息 - /// - public TimUserBean Ub - { - get - { - return _ub; - } - set - { - __isset.ub = true; - this._ub = value; - } - } - - public Dictionary ExtraMap - { - get - { - return _extraMap; - } - set - { - __isset.extraMap = true; - this._extraMap = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool error; - public bool ub; - public bool extraMap; - } - - public TimRemoteUserBean() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - Error = new TimError(); - Error.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.Struct) { - Ub = new TimUserBean(); - Ub.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.Map) { - { - ExtraMap = new Dictionary(); - TMap _map98 = iprot.ReadMapBegin(); - for( int _i99 = 0; _i99 < _map98.Count; ++_i99) - { - string _key100; - string _val101; - _key100 = iprot.ReadString(); - _val101 = iprot.ReadString(); - ExtraMap[_key100] = _val101; - } - iprot.ReadMapEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("TimRemoteUserBean"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Error != null && __isset.error) { - field.Name = "error"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - Error.Write(oprot); - oprot.WriteFieldEnd(); - } - if (Ub != null && __isset.ub) { - field.Name = "ub"; - field.Type = TType.Struct; - field.ID = 2; - oprot.WriteFieldBegin(field); - Ub.Write(oprot); - oprot.WriteFieldEnd(); - } - if (ExtraMap != null && __isset.extraMap) { - field.Name = "extraMap"; - field.Type = TType.Map; - field.ID = 3; - oprot.WriteFieldBegin(field); - { - oprot.WriteMapBegin(new TMap(TType.String, TType.String, ExtraMap.Count)); - foreach (string _iter102 in ExtraMap.Keys) - { - oprot.WriteString(_iter102); - oprot.WriteString(ExtraMap[_iter102]); - } - oprot.WriteMapEnd(); - } - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("TimRemoteUserBean("); - bool __first = true; - if (Error != null && __isset.error) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Error: "); - __sb.Append(Error== null ? "" : Error.ToString()); - } - if (Ub != null && __isset.ub) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Ub: "); - __sb.Append(Ub== null ? "" : Ub.ToString()); - } - if (ExtraMap != null && __isset.extraMap) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("ExtraMap: "); - __sb.Append(ExtraMap); - } - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/TimResponseBean.cs b/protocols/gen-csharp/TimResponseBean.cs deleted file mode 100644 index 20308d2..0000000 --- a/protocols/gen-csharp/TimResponseBean.cs +++ /dev/null @@ -1,278 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class TimResponseBean : TBase -{ - private string _threadId; - private TimError _error; - private List _extraList; - private Dictionary _extraMap; - - public string ThreadId - { - get - { - return _threadId; - } - set - { - __isset.threadId = true; - this._threadId = value; - } - } - - /// - /// 错误码 - /// - public TimError Error - { - get - { - return _error; - } - set - { - __isset.error = true; - this._error = value; - } - } - - /// - /// 附加信息 - /// - public List ExtraList - { - get - { - return _extraList; - } - set - { - __isset.extraList = true; - this._extraList = value; - } - } - - public Dictionary ExtraMap - { - get - { - return _extraMap; - } - set - { - __isset.extraMap = true; - this._extraMap = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool threadId; - public bool error; - public bool extraList; - public bool extraMap; - } - - public TimResponseBean() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.String) { - ThreadId = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.Struct) { - Error = new TimError(); - Error.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.List) { - { - ExtraList = new List(); - TList _list108 = iprot.ReadListBegin(); - for( int _i109 = 0; _i109 < _list108.Count; ++_i109) - { - TimNode _elem110; - _elem110 = new TimNode(); - _elem110.Read(iprot); - ExtraList.Add(_elem110); - } - iprot.ReadListEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 4: - if (field.Type == TType.Map) { - { - ExtraMap = new Dictionary(); - TMap _map111 = iprot.ReadMapBegin(); - for( int _i112 = 0; _i112 < _map111.Count; ++_i112) - { - string _key113; - string _val114; - _key113 = iprot.ReadString(); - _val114 = iprot.ReadString(); - ExtraMap[_key113] = _val114; - } - iprot.ReadMapEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("TimResponseBean"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (ThreadId != null && __isset.threadId) { - field.Name = "threadId"; - field.Type = TType.String; - field.ID = 1; - oprot.WriteFieldBegin(field); - oprot.WriteString(ThreadId); - oprot.WriteFieldEnd(); - } - if (Error != null && __isset.error) { - field.Name = "error"; - field.Type = TType.Struct; - field.ID = 2; - oprot.WriteFieldBegin(field); - Error.Write(oprot); - oprot.WriteFieldEnd(); - } - if (ExtraList != null && __isset.extraList) { - field.Name = "extraList"; - field.Type = TType.List; - field.ID = 3; - oprot.WriteFieldBegin(field); - { - oprot.WriteListBegin(new TList(TType.Struct, ExtraList.Count)); - foreach (TimNode _iter115 in ExtraList) - { - _iter115.Write(oprot); - } - oprot.WriteListEnd(); - } - oprot.WriteFieldEnd(); - } - if (ExtraMap != null && __isset.extraMap) { - field.Name = "extraMap"; - field.Type = TType.Map; - field.ID = 4; - oprot.WriteFieldBegin(field); - { - oprot.WriteMapBegin(new TMap(TType.String, TType.String, ExtraMap.Count)); - foreach (string _iter116 in ExtraMap.Keys) - { - oprot.WriteString(_iter116); - oprot.WriteString(ExtraMap[_iter116]); - } - oprot.WriteMapEnd(); - } - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("TimResponseBean("); - bool __first = true; - if (ThreadId != null && __isset.threadId) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("ThreadId: "); - __sb.Append(ThreadId); - } - if (Error != null && __isset.error) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Error: "); - __sb.Append(Error== null ? "" : Error.ToString()); - } - if (ExtraList != null && __isset.extraList) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("ExtraList: "); - __sb.Append(ExtraList); - } - if (ExtraMap != null && __isset.extraMap) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("ExtraMap: "); - __sb.Append(ExtraMap); - } - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/TimRoom.cs b/protocols/gen-csharp/TimRoom.cs deleted file mode 100644 index e1d7349..0000000 --- a/protocols/gen-csharp/TimRoom.cs +++ /dev/null @@ -1,553 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class TimRoom : TBase -{ - private Tid _tid; - private Tid _founderTid; - private List _HostsTid; - private List _membersTid; - private string _headurl; - private string _roomName; - private string _desc; - private TimTime _createTime; - private List _extraList; - private Dictionary _extraMap; - - /// - /// 房间Tid - /// - public Tid Tid - { - get - { - return _tid; - } - set - { - __isset.tid = true; - this._tid = value; - } - } - - /// - /// 创建人Tid - /// - public Tid FounderTid - { - get - { - return _founderTid; - } - set - { - __isset.founderTid = true; - this._founderTid = value; - } - } - - /// - /// 主持人Tid - /// - public List HostsTid - { - get - { - return _HostsTid; - } - set - { - __isset.HostsTid = true; - this._HostsTid = value; - } - } - - /// - /// memberTid - /// - public List MembersTid - { - get - { - return _membersTid; - } - set - { - __isset.membersTid = true; - this._membersTid = value; - } - } - - /// - /// 头像地址 http://xxx.jpg - /// - public string Headurl - { - get - { - return _headurl; - } - set - { - __isset.headurl = true; - this._headurl = value; - } - } - - /// - /// 房间名称 - /// - public string RoomName - { - get - { - return _roomName; - } - set - { - __isset.roomName = true; - this._roomName = value; - } - } - - /// - /// 房间说明 - /// - public string Desc - { - get - { - return _desc; - } - set - { - __isset.desc = true; - this._desc = value; - } - } - - /// - /// 房间创建时间 - /// - public TimTime CreateTime - { - get - { - return _createTime; - } - set - { - __isset.createTime = true; - this._createTime = value; - } - } - - /// - /// 扩展字段 - /// - public List ExtraList - { - get - { - return _extraList; - } - set - { - __isset.extraList = true; - this._extraList = value; - } - } - - public Dictionary ExtraMap - { - get - { - return _extraMap; - } - set - { - __isset.extraMap = true; - this._extraMap = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool tid; - public bool founderTid; - public bool HostsTid; - public bool membersTid; - public bool headurl; - public bool roomName; - public bool desc; - public bool createTime; - public bool extraList; - public bool extraMap; - } - - public TimRoom() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - Tid = new Tid(); - Tid.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.Struct) { - FounderTid = new Tid(); - FounderTid.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.List) { - { - HostsTid = new List(); - TList _list49 = iprot.ReadListBegin(); - for( int _i50 = 0; _i50 < _list49.Count; ++_i50) - { - Tid _elem51; - _elem51 = new Tid(); - _elem51.Read(iprot); - HostsTid.Add(_elem51); - } - iprot.ReadListEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 4: - if (field.Type == TType.List) { - { - MembersTid = new List(); - TList _list52 = iprot.ReadListBegin(); - for( int _i53 = 0; _i53 < _list52.Count; ++_i53) - { - Tid _elem54; - _elem54 = new Tid(); - _elem54.Read(iprot); - MembersTid.Add(_elem54); - } - iprot.ReadListEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 5: - if (field.Type == TType.String) { - Headurl = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 6: - if (field.Type == TType.String) { - RoomName = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 7: - if (field.Type == TType.String) { - Desc = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 8: - if (field.Type == TType.Struct) { - CreateTime = new TimTime(); - CreateTime.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 9: - if (field.Type == TType.List) { - { - ExtraList = new List(); - TList _list55 = iprot.ReadListBegin(); - for( int _i56 = 0; _i56 < _list55.Count; ++_i56) - { - TimNode _elem57; - _elem57 = new TimNode(); - _elem57.Read(iprot); - ExtraList.Add(_elem57); - } - iprot.ReadListEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 10: - if (field.Type == TType.Map) { - { - ExtraMap = new Dictionary(); - TMap _map58 = iprot.ReadMapBegin(); - for( int _i59 = 0; _i59 < _map58.Count; ++_i59) - { - string _key60; - string _val61; - _key60 = iprot.ReadString(); - _val61 = iprot.ReadString(); - ExtraMap[_key60] = _val61; - } - iprot.ReadMapEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("TimRoom"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Tid != null && __isset.tid) { - field.Name = "tid"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - Tid.Write(oprot); - oprot.WriteFieldEnd(); - } - if (FounderTid != null && __isset.founderTid) { - field.Name = "founderTid"; - field.Type = TType.Struct; - field.ID = 2; - oprot.WriteFieldBegin(field); - FounderTid.Write(oprot); - oprot.WriteFieldEnd(); - } - if (HostsTid != null && __isset.HostsTid) { - field.Name = "HostsTid"; - field.Type = TType.List; - field.ID = 3; - oprot.WriteFieldBegin(field); - { - oprot.WriteListBegin(new TList(TType.Struct, HostsTid.Count)); - foreach (Tid _iter62 in HostsTid) - { - _iter62.Write(oprot); - } - oprot.WriteListEnd(); - } - oprot.WriteFieldEnd(); - } - if (MembersTid != null && __isset.membersTid) { - field.Name = "membersTid"; - field.Type = TType.List; - field.ID = 4; - oprot.WriteFieldBegin(field); - { - oprot.WriteListBegin(new TList(TType.Struct, MembersTid.Count)); - foreach (Tid _iter63 in MembersTid) - { - _iter63.Write(oprot); - } - oprot.WriteListEnd(); - } - oprot.WriteFieldEnd(); - } - if (Headurl != null && __isset.headurl) { - field.Name = "headurl"; - field.Type = TType.String; - field.ID = 5; - oprot.WriteFieldBegin(field); - oprot.WriteString(Headurl); - oprot.WriteFieldEnd(); - } - if (RoomName != null && __isset.roomName) { - field.Name = "roomName"; - field.Type = TType.String; - field.ID = 6; - oprot.WriteFieldBegin(field); - oprot.WriteString(RoomName); - oprot.WriteFieldEnd(); - } - if (Desc != null && __isset.desc) { - field.Name = "desc"; - field.Type = TType.String; - field.ID = 7; - oprot.WriteFieldBegin(field); - oprot.WriteString(Desc); - oprot.WriteFieldEnd(); - } - if (CreateTime != null && __isset.createTime) { - field.Name = "createTime"; - field.Type = TType.Struct; - field.ID = 8; - oprot.WriteFieldBegin(field); - CreateTime.Write(oprot); - oprot.WriteFieldEnd(); - } - if (ExtraList != null && __isset.extraList) { - field.Name = "extraList"; - field.Type = TType.List; - field.ID = 9; - oprot.WriteFieldBegin(field); - { - oprot.WriteListBegin(new TList(TType.Struct, ExtraList.Count)); - foreach (TimNode _iter64 in ExtraList) - { - _iter64.Write(oprot); - } - oprot.WriteListEnd(); - } - oprot.WriteFieldEnd(); - } - if (ExtraMap != null && __isset.extraMap) { - field.Name = "extraMap"; - field.Type = TType.Map; - field.ID = 10; - oprot.WriteFieldBegin(field); - { - oprot.WriteMapBegin(new TMap(TType.String, TType.String, ExtraMap.Count)); - foreach (string _iter65 in ExtraMap.Keys) - { - oprot.WriteString(_iter65); - oprot.WriteString(ExtraMap[_iter65]); - } - oprot.WriteMapEnd(); - } - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("TimRoom("); - bool __first = true; - if (Tid != null && __isset.tid) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Tid: "); - __sb.Append(Tid== null ? "" : Tid.ToString()); - } - if (FounderTid != null && __isset.founderTid) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("FounderTid: "); - __sb.Append(FounderTid== null ? "" : FounderTid.ToString()); - } - if (HostsTid != null && __isset.HostsTid) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("HostsTid: "); - __sb.Append(HostsTid); - } - if (MembersTid != null && __isset.membersTid) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("MembersTid: "); - __sb.Append(MembersTid); - } - if (Headurl != null && __isset.headurl) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Headurl: "); - __sb.Append(Headurl); - } - if (RoomName != null && __isset.roomName) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("RoomName: "); - __sb.Append(RoomName); - } - if (Desc != null && __isset.desc) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Desc: "); - __sb.Append(Desc); - } - if (CreateTime != null && __isset.createTime) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("CreateTime: "); - __sb.Append(CreateTime== null ? "" : CreateTime.ToString()); - } - if (ExtraList != null && __isset.extraList) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("ExtraList: "); - __sb.Append(ExtraList); - } - if (ExtraMap != null && __isset.extraMap) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("ExtraMap: "); - __sb.Append(ExtraMap); - } - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/TimRoster.cs b/protocols/gen-csharp/TimRoster.cs deleted file mode 100644 index 31c2a35..0000000 --- a/protocols/gen-csharp/TimRoster.cs +++ /dev/null @@ -1,233 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class TimRoster : TBase -{ - private string _name; - private Dictionary _extraMap; - - /// - /// none表示用户和contact之前没有任何的关系(虽然在server的buddy list中存在) - /// to表示用户能看到contact的presence,但是contact看不到用户的Presence - /// from和to的含义相反,指用户看不到contact的presence,但是contact可以看到 - /// both表示相关之间都能看到对方的presence - /// - public string Subscription { get; set; } - - public Tid Tid { get; set; } - - /// - /// 用户名 - /// - public string Name - { - get - { - return _name; - } - set - { - __isset.name = true; - this._name = value; - } - } - - public Dictionary ExtraMap - { - get - { - return _extraMap; - } - set - { - __isset.extraMap = true; - this._extraMap = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool name; - public bool extraMap; - } - - public TimRoster() { - } - - public TimRoster(string subscription, Tid tid) : this() { - this.Subscription = subscription; - this.Tid = tid; - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - bool isset_subscription = false; - bool isset_tid = false; - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.String) { - Subscription = iprot.ReadString(); - isset_subscription = true; - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.Struct) { - Tid = new Tid(); - Tid.Read(iprot); - isset_tid = true; - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.String) { - Name = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 4: - if (field.Type == TType.Map) { - { - ExtraMap = new Dictionary(); - TMap _map93 = iprot.ReadMapBegin(); - for( int _i94 = 0; _i94 < _map93.Count; ++_i94) - { - string _key95; - string _val96; - _key95 = iprot.ReadString(); - _val96 = iprot.ReadString(); - ExtraMap[_key95] = _val96; - } - iprot.ReadMapEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - if (!isset_subscription) - throw new TProtocolException(TProtocolException.INVALID_DATA); - if (!isset_tid) - throw new TProtocolException(TProtocolException.INVALID_DATA); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("TimRoster"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - field.Name = "subscription"; - field.Type = TType.String; - field.ID = 1; - oprot.WriteFieldBegin(field); - oprot.WriteString(Subscription); - oprot.WriteFieldEnd(); - field.Name = "tid"; - field.Type = TType.Struct; - field.ID = 2; - oprot.WriteFieldBegin(field); - Tid.Write(oprot); - oprot.WriteFieldEnd(); - if (Name != null && __isset.name) { - field.Name = "name"; - field.Type = TType.String; - field.ID = 3; - oprot.WriteFieldBegin(field); - oprot.WriteString(Name); - oprot.WriteFieldEnd(); - } - if (ExtraMap != null && __isset.extraMap) { - field.Name = "extraMap"; - field.Type = TType.Map; - field.ID = 4; - oprot.WriteFieldBegin(field); - { - oprot.WriteMapBegin(new TMap(TType.String, TType.String, ExtraMap.Count)); - foreach (string _iter97 in ExtraMap.Keys) - { - oprot.WriteString(_iter97); - oprot.WriteString(ExtraMap[_iter97]); - } - oprot.WriteMapEnd(); - } - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("TimRoster("); - __sb.Append(", Subscription: "); - __sb.Append(Subscription); - __sb.Append(", Tid: "); - __sb.Append(Tid== null ? "" : Tid.ToString()); - if (Name != null && __isset.name) { - __sb.Append(", Name: "); - __sb.Append(Name); - } - if (ExtraMap != null && __isset.extraMap) { - __sb.Append(", ExtraMap: "); - __sb.Append(ExtraMap); - } - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/TimSock5Bean.cs b/protocols/gen-csharp/TimSock5Bean.cs deleted file mode 100644 index 56ff366..0000000 --- a/protocols/gen-csharp/TimSock5Bean.cs +++ /dev/null @@ -1,291 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class TimSock5Bean : TBase -{ - private Dictionary _extraMap; - - public Tid FromTid { get; set; } - - public Tid ToTid { get; set; } - - /// - /// ip地址 - /// - public string Addr { get; set; } - - /// - /// 端口 - /// - public int Port { get; set; } - - /// - /// 传输类型 1:tcp 2:udp - /// - public short Transport { get; set; } - - /// - /// 发布id 通过发布id 可以连接两个发布id相同的用户 - /// - public string PubId { get; set; } - - public Dictionary ExtraMap - { - get - { - return _extraMap; - } - set - { - __isset.extraMap = true; - this._extraMap = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool extraMap; - } - - public TimSock5Bean() { - } - - public TimSock5Bean(Tid fromTid, Tid toTid, string addr, int port, short transport, string pubId) : this() { - this.FromTid = fromTid; - this.ToTid = toTid; - this.Addr = addr; - this.Port = port; - this.Transport = transport; - this.PubId = pubId; - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - bool isset_fromTid = false; - bool isset_toTid = false; - bool isset_addr = false; - bool isset_port = false; - bool isset_transport = false; - bool isset_pubId = false; - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - FromTid = new Tid(); - FromTid.Read(iprot); - isset_fromTid = true; - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.Struct) { - ToTid = new Tid(); - ToTid.Read(iprot); - isset_toTid = true; - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.String) { - Addr = iprot.ReadString(); - isset_addr = true; - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 4: - if (field.Type == TType.I32) { - Port = iprot.ReadI32(); - isset_port = true; - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 5: - if (field.Type == TType.I16) { - Transport = iprot.ReadI16(); - isset_transport = true; - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 6: - if (field.Type == TType.String) { - PubId = iprot.ReadString(); - isset_pubId = true; - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 7: - if (field.Type == TType.Map) { - { - ExtraMap = new Dictionary(); - TMap _map117 = iprot.ReadMapBegin(); - for( int _i118 = 0; _i118 < _map117.Count; ++_i118) - { - string _key119; - string _val120; - _key119 = iprot.ReadString(); - _val120 = iprot.ReadString(); - ExtraMap[_key119] = _val120; - } - iprot.ReadMapEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - if (!isset_fromTid) - throw new TProtocolException(TProtocolException.INVALID_DATA); - if (!isset_toTid) - throw new TProtocolException(TProtocolException.INVALID_DATA); - if (!isset_addr) - throw new TProtocolException(TProtocolException.INVALID_DATA); - if (!isset_port) - throw new TProtocolException(TProtocolException.INVALID_DATA); - if (!isset_transport) - throw new TProtocolException(TProtocolException.INVALID_DATA); - if (!isset_pubId) - throw new TProtocolException(TProtocolException.INVALID_DATA); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("TimSock5Bean"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - field.Name = "fromTid"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - FromTid.Write(oprot); - oprot.WriteFieldEnd(); - field.Name = "toTid"; - field.Type = TType.Struct; - field.ID = 2; - oprot.WriteFieldBegin(field); - ToTid.Write(oprot); - oprot.WriteFieldEnd(); - field.Name = "addr"; - field.Type = TType.String; - field.ID = 3; - oprot.WriteFieldBegin(field); - oprot.WriteString(Addr); - oprot.WriteFieldEnd(); - field.Name = "port"; - field.Type = TType.I32; - field.ID = 4; - oprot.WriteFieldBegin(field); - oprot.WriteI32(Port); - oprot.WriteFieldEnd(); - field.Name = "transport"; - field.Type = TType.I16; - field.ID = 5; - oprot.WriteFieldBegin(field); - oprot.WriteI16(Transport); - oprot.WriteFieldEnd(); - field.Name = "pubId"; - field.Type = TType.String; - field.ID = 6; - oprot.WriteFieldBegin(field); - oprot.WriteString(PubId); - oprot.WriteFieldEnd(); - if (ExtraMap != null && __isset.extraMap) { - field.Name = "extraMap"; - field.Type = TType.Map; - field.ID = 7; - oprot.WriteFieldBegin(field); - { - oprot.WriteMapBegin(new TMap(TType.String, TType.String, ExtraMap.Count)); - foreach (string _iter121 in ExtraMap.Keys) - { - oprot.WriteString(_iter121); - oprot.WriteString(ExtraMap[_iter121]); - } - oprot.WriteMapEnd(); - } - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("TimSock5Bean("); - __sb.Append(", FromTid: "); - __sb.Append(FromTid== null ? "" : FromTid.ToString()); - __sb.Append(", ToTid: "); - __sb.Append(ToTid== null ? "" : ToTid.ToString()); - __sb.Append(", Addr: "); - __sb.Append(Addr); - __sb.Append(", Port: "); - __sb.Append(Port); - __sb.Append(", Transport: "); - __sb.Append(Transport); - __sb.Append(", PubId: "); - __sb.Append(PubId); - if (ExtraMap != null && __isset.extraMap) { - __sb.Append(", ExtraMap: "); - __sb.Append(ExtraMap); - } - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/TimSock5Bytes.cs b/protocols/gen-csharp/TimSock5Bytes.cs deleted file mode 100644 index 4bf1289..0000000 --- a/protocols/gen-csharp/TimSock5Bytes.cs +++ /dev/null @@ -1,237 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class TimSock5Bytes : TBase -{ - private Dictionary _extraMap; - - /// - /// 发布id - /// - public string PubId { get; set; } - - /// - /// 序号数据块 - /// - public int Index { get; set; } - - /// - /// 数据块 - /// - public List Bytes { get; set; } - - public Dictionary ExtraMap - { - get - { - return _extraMap; - } - set - { - __isset.extraMap = true; - this._extraMap = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool extraMap; - } - - public TimSock5Bytes() { - } - - public TimSock5Bytes(string pubId, int index, List bytes) : this() { - this.PubId = pubId; - this.Index = index; - this.Bytes = bytes; - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - bool isset_pubId = false; - bool isset_index = false; - bool isset_bytes = false; - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.String) { - PubId = iprot.ReadString(); - isset_pubId = true; - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.I32) { - Index = iprot.ReadI32(); - isset_index = true; - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.List) { - { - Bytes = new List(); - TList _list122 = iprot.ReadListBegin(); - for( int _i123 = 0; _i123 < _list122.Count; ++_i123) - { - byte[] _elem124; - _elem124 = iprot.ReadBinary(); - Bytes.Add(_elem124); - } - iprot.ReadListEnd(); - } - isset_bytes = true; - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 4: - if (field.Type == TType.Map) { - { - ExtraMap = new Dictionary(); - TMap _map125 = iprot.ReadMapBegin(); - for( int _i126 = 0; _i126 < _map125.Count; ++_i126) - { - string _key127; - string _val128; - _key127 = iprot.ReadString(); - _val128 = iprot.ReadString(); - ExtraMap[_key127] = _val128; - } - iprot.ReadMapEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - if (!isset_pubId) - throw new TProtocolException(TProtocolException.INVALID_DATA); - if (!isset_index) - throw new TProtocolException(TProtocolException.INVALID_DATA); - if (!isset_bytes) - throw new TProtocolException(TProtocolException.INVALID_DATA); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("TimSock5Bytes"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - field.Name = "pubId"; - field.Type = TType.String; - field.ID = 1; - oprot.WriteFieldBegin(field); - oprot.WriteString(PubId); - oprot.WriteFieldEnd(); - field.Name = "index"; - field.Type = TType.I32; - field.ID = 2; - oprot.WriteFieldBegin(field); - oprot.WriteI32(Index); - oprot.WriteFieldEnd(); - field.Name = "bytes"; - field.Type = TType.List; - field.ID = 3; - oprot.WriteFieldBegin(field); - { - oprot.WriteListBegin(new TList(TType.String, Bytes.Count)); - foreach (byte[] _iter129 in Bytes) - { - oprot.WriteBinary(_iter129); - } - oprot.WriteListEnd(); - } - oprot.WriteFieldEnd(); - if (ExtraMap != null && __isset.extraMap) { - field.Name = "extraMap"; - field.Type = TType.Map; - field.ID = 4; - oprot.WriteFieldBegin(field); - { - oprot.WriteMapBegin(new TMap(TType.String, TType.String, ExtraMap.Count)); - foreach (string _iter130 in ExtraMap.Keys) - { - oprot.WriteString(_iter130); - oprot.WriteString(ExtraMap[_iter130]); - } - oprot.WriteMapEnd(); - } - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("TimSock5Bytes("); - __sb.Append(", PubId: "); - __sb.Append(PubId); - __sb.Append(", Index: "); - __sb.Append(Index); - __sb.Append(", Bytes: "); - __sb.Append(Bytes); - if (ExtraMap != null && __isset.extraMap) { - __sb.Append(", ExtraMap: "); - __sb.Append(ExtraMap); - } - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/TimTime.cs b/protocols/gen-csharp/TimTime.cs deleted file mode 100644 index 1076ef2..0000000 --- a/protocols/gen-csharp/TimTime.cs +++ /dev/null @@ -1,167 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class TimTime : TBase -{ - private string _timestamp; - private string _formattime; - - /// - /// 时间戳 (毫秒) - /// - public string Timestamp - { - get - { - return _timestamp; - } - set - { - __isset.timestamp = true; - this._timestamp = value; - } - } - - /// - /// 格式化时间 - /// - public string Formattime - { - get - { - return _formattime; - } - set - { - __isset.formattime = true; - this._formattime = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool timestamp; - public bool formattime; - } - - public TimTime() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.String) { - Timestamp = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.String) { - Formattime = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("TimTime"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Timestamp != null && __isset.timestamp) { - field.Name = "timestamp"; - field.Type = TType.String; - field.ID = 1; - oprot.WriteFieldBegin(field); - oprot.WriteString(Timestamp); - oprot.WriteFieldEnd(); - } - if (Formattime != null && __isset.formattime) { - field.Name = "formattime"; - field.Type = TType.String; - field.ID = 2; - oprot.WriteFieldBegin(field); - oprot.WriteString(Formattime); - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("TimTime("); - bool __first = true; - if (Timestamp != null && __isset.timestamp) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Timestamp: "); - __sb.Append(Timestamp); - } - if (Formattime != null && __isset.formattime) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Formattime: "); - __sb.Append(Formattime); - } - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/TimUserBean.cs b/protocols/gen-csharp/TimUserBean.cs deleted file mode 100644 index bba04e8..0000000 --- a/protocols/gen-csharp/TimUserBean.cs +++ /dev/null @@ -1,572 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; -using Thrift.Protocol; -using Thrift.Transport; - - -#if !SILVERLIGHT -[Serializable] -#endif -public partial class TimUserBean : TBase -{ - private Tid _tid; - private string _nickname; - private string _remarkname; - private string _brithday; - private short _gender; - private string _headurl; - private TimArea _area; - private byte[] _headbyte; - private List _photoBytes; - private List _extraList; - private Dictionary _extraMap; - - /// - /// 用户bean - /// - public Tid Tid - { - get - { - return _tid; - } - set - { - __isset.tid = true; - this._tid = value; - } - } - - /// - /// 昵称 - /// - public string Nickname - { - get - { - return _nickname; - } - set - { - __isset.nickname = true; - this._nickname = value; - } - } - - /// - /// 备注名称 - /// - public string Remarkname - { - get - { - return _remarkname; - } - set - { - __isset.remarkname = true; - this._remarkname = value; - } - } - - /// - /// 生日 2000-01-01 - /// - public string Brithday - { - get - { - return _brithday; - } - set - { - __isset.brithday = true; - this._brithday = value; - } - } - - /// - /// 性别 自行约定 如 : 0不知,1男,2女 - /// - public short Gender - { - get - { - return _gender; - } - set - { - __isset.gender = true; - this._gender = value; - } - } - - /// - /// 头像地址 http://xxx.jpg - /// - public string Headurl - { - get - { - return _headurl; - } - set - { - __isset.headurl = true; - this._headurl = value; - } - } - - /// - /// 地区 - /// - public TimArea Area - { - get - { - return _area; - } - set - { - __isset.area = true; - this._area = value; - } - } - - /// - /// 头像 - /// - public byte[] Headbyte - { - get - { - return _headbyte; - } - set - { - __isset.headbyte = true; - this._headbyte = value; - } - } - - /// - /// 其他图片 - /// - public List PhotoBytes - { - get - { - return _photoBytes; - } - set - { - __isset.photoBytes = true; - this._photoBytes = value; - } - } - - /// - /// 扩展字段 - /// - public List ExtraList - { - get - { - return _extraList; - } - set - { - __isset.extraList = true; - this._extraList = value; - } - } - - public Dictionary ExtraMap - { - get - { - return _extraMap; - } - set - { - __isset.extraMap = true; - this._extraMap = value; - } - } - - - public Isset __isset; - #if !SILVERLIGHT - [Serializable] - #endif - public struct Isset { - public bool tid; - public bool nickname; - public bool remarkname; - public bool brithday; - public bool gender; - public bool headurl; - public bool area; - public bool headbyte; - public bool photoBytes; - public bool extraList; - public bool extraMap; - } - - public TimUserBean() { - } - - public void Read (TProtocol iprot) - { - iprot.IncrementRecursionDepth(); - try - { - TField field; - iprot.ReadStructBegin(); - while (true) - { - field = iprot.ReadFieldBegin(); - if (field.Type == TType.Stop) { - break; - } - switch (field.ID) - { - case 1: - if (field.Type == TType.Struct) { - Tid = new Tid(); - Tid.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 2: - if (field.Type == TType.String) { - Nickname = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 3: - if (field.Type == TType.String) { - Remarkname = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 4: - if (field.Type == TType.String) { - Brithday = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 5: - if (field.Type == TType.I16) { - Gender = iprot.ReadI16(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 6: - if (field.Type == TType.String) { - Headurl = iprot.ReadString(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 7: - if (field.Type == TType.Struct) { - Area = new TimArea(); - Area.Read(iprot); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 8: - if (field.Type == TType.String) { - Headbyte = iprot.ReadBinary(); - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 9: - if (field.Type == TType.List) { - { - PhotoBytes = new List(); - TList _list36 = iprot.ReadListBegin(); - for( int _i37 = 0; _i37 < _list36.Count; ++_i37) - { - byte[] _elem38; - _elem38 = iprot.ReadBinary(); - PhotoBytes.Add(_elem38); - } - iprot.ReadListEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 10: - if (field.Type == TType.List) { - { - ExtraList = new List(); - TList _list39 = iprot.ReadListBegin(); - for( int _i40 = 0; _i40 < _list39.Count; ++_i40) - { - TimNode _elem41; - _elem41 = new TimNode(); - _elem41.Read(iprot); - ExtraList.Add(_elem41); - } - iprot.ReadListEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - case 11: - if (field.Type == TType.Map) { - { - ExtraMap = new Dictionary(); - TMap _map42 = iprot.ReadMapBegin(); - for( int _i43 = 0; _i43 < _map42.Count; ++_i43) - { - string _key44; - string _val45; - _key44 = iprot.ReadString(); - _val45 = iprot.ReadString(); - ExtraMap[_key44] = _val45; - } - iprot.ReadMapEnd(); - } - } else { - TProtocolUtil.Skip(iprot, field.Type); - } - break; - default: - TProtocolUtil.Skip(iprot, field.Type); - break; - } - iprot.ReadFieldEnd(); - } - iprot.ReadStructEnd(); - } - finally - { - iprot.DecrementRecursionDepth(); - } - } - - public void Write(TProtocol oprot) { - oprot.IncrementRecursionDepth(); - try - { - TStruct struc = new TStruct("TimUserBean"); - oprot.WriteStructBegin(struc); - TField field = new TField(); - if (Tid != null && __isset.tid) { - field.Name = "tid"; - field.Type = TType.Struct; - field.ID = 1; - oprot.WriteFieldBegin(field); - Tid.Write(oprot); - oprot.WriteFieldEnd(); - } - if (Nickname != null && __isset.nickname) { - field.Name = "nickname"; - field.Type = TType.String; - field.ID = 2; - oprot.WriteFieldBegin(field); - oprot.WriteString(Nickname); - oprot.WriteFieldEnd(); - } - if (Remarkname != null && __isset.remarkname) { - field.Name = "remarkname"; - field.Type = TType.String; - field.ID = 3; - oprot.WriteFieldBegin(field); - oprot.WriteString(Remarkname); - oprot.WriteFieldEnd(); - } - if (Brithday != null && __isset.brithday) { - field.Name = "brithday"; - field.Type = TType.String; - field.ID = 4; - oprot.WriteFieldBegin(field); - oprot.WriteString(Brithday); - oprot.WriteFieldEnd(); - } - if (__isset.gender) { - field.Name = "gender"; - field.Type = TType.I16; - field.ID = 5; - oprot.WriteFieldBegin(field); - oprot.WriteI16(Gender); - oprot.WriteFieldEnd(); - } - if (Headurl != null && __isset.headurl) { - field.Name = "headurl"; - field.Type = TType.String; - field.ID = 6; - oprot.WriteFieldBegin(field); - oprot.WriteString(Headurl); - oprot.WriteFieldEnd(); - } - if (Area != null && __isset.area) { - field.Name = "area"; - field.Type = TType.Struct; - field.ID = 7; - oprot.WriteFieldBegin(field); - Area.Write(oprot); - oprot.WriteFieldEnd(); - } - if (Headbyte != null && __isset.headbyte) { - field.Name = "headbyte"; - field.Type = TType.String; - field.ID = 8; - oprot.WriteFieldBegin(field); - oprot.WriteBinary(Headbyte); - oprot.WriteFieldEnd(); - } - if (PhotoBytes != null && __isset.photoBytes) { - field.Name = "photoBytes"; - field.Type = TType.List; - field.ID = 9; - oprot.WriteFieldBegin(field); - { - oprot.WriteListBegin(new TList(TType.String, PhotoBytes.Count)); - foreach (byte[] _iter46 in PhotoBytes) - { - oprot.WriteBinary(_iter46); - } - oprot.WriteListEnd(); - } - oprot.WriteFieldEnd(); - } - if (ExtraList != null && __isset.extraList) { - field.Name = "extraList"; - field.Type = TType.List; - field.ID = 10; - oprot.WriteFieldBegin(field); - { - oprot.WriteListBegin(new TList(TType.Struct, ExtraList.Count)); - foreach (TimNode _iter47 in ExtraList) - { - _iter47.Write(oprot); - } - oprot.WriteListEnd(); - } - oprot.WriteFieldEnd(); - } - if (ExtraMap != null && __isset.extraMap) { - field.Name = "extraMap"; - field.Type = TType.Map; - field.ID = 11; - oprot.WriteFieldBegin(field); - { - oprot.WriteMapBegin(new TMap(TType.String, TType.String, ExtraMap.Count)); - foreach (string _iter48 in ExtraMap.Keys) - { - oprot.WriteString(_iter48); - oprot.WriteString(ExtraMap[_iter48]); - } - oprot.WriteMapEnd(); - } - oprot.WriteFieldEnd(); - } - oprot.WriteFieldStop(); - oprot.WriteStructEnd(); - } - finally - { - oprot.DecrementRecursionDepth(); - } - } - - public override string ToString() { - StringBuilder __sb = new StringBuilder("TimUserBean("); - bool __first = true; - if (Tid != null && __isset.tid) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Tid: "); - __sb.Append(Tid== null ? "" : Tid.ToString()); - } - if (Nickname != null && __isset.nickname) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Nickname: "); - __sb.Append(Nickname); - } - if (Remarkname != null && __isset.remarkname) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Remarkname: "); - __sb.Append(Remarkname); - } - if (Brithday != null && __isset.brithday) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Brithday: "); - __sb.Append(Brithday); - } - if (__isset.gender) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Gender: "); - __sb.Append(Gender); - } - if (Headurl != null && __isset.headurl) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Headurl: "); - __sb.Append(Headurl); - } - if (Area != null && __isset.area) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Area: "); - __sb.Append(Area== null ? "" : Area.ToString()); - } - if (Headbyte != null && __isset.headbyte) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("Headbyte: "); - __sb.Append(Headbyte); - } - if (PhotoBytes != null && __isset.photoBytes) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("PhotoBytes: "); - __sb.Append(PhotoBytes); - } - if (ExtraList != null && __isset.extraList) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("ExtraList: "); - __sb.Append(ExtraList); - } - if (ExtraMap != null && __isset.extraMap) { - if(!__first) { __sb.Append(", "); } - __first = false; - __sb.Append("ExtraMap: "); - __sb.Append(ExtraMap); - } - __sb.Append(")"); - return __sb.ToString(); - } - -} - diff --git a/protocols/gen-csharp/tim.Constants.cs b/protocols/gen-csharp/tim.Constants.cs deleted file mode 100644 index 60fe94e..0000000 --- a/protocols/gen-csharp/tim.Constants.cs +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.3) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.IO; -using Thrift; -using Thrift.Collections; -using System.Runtime.Serialization; - -public static class timConstants -{ - /// - /// 内部版本号 - /// - public const int protocolversion = 4; - /// - /// 外部版本号 - /// - public const string protocolversionName = "1.1.0"; - /// - /// 状态码:成功 - /// - public const string TIM_SC_SUCCESS = "200"; - /// - /// 状态码:失败 - /// - public const string TIM_SC_FAILED = "400"; -} diff --git a/protocols/gen-d/ITim.d b/protocols/gen-d/ITim.d index 4ee9365..34b905c 100644 --- a/protocols/gen-d/ITim.d +++ b/protocols/gen-d/ITim.d @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -13,29 +13,101 @@ import thrift.util.hashset; import tim_types; interface ITim { + /** + 流程开始 + */ void timStream(ref const(TimParam) param); + /** + tls协议 + */ void timStarttls(); + /** + 登陆协议 + */ void timLogin(ref const(Tid) tid, string pwd); + /** + 回执信息 + */ void timAck(ref const(TimAckBean) ab); + /** + 广播出席协议或接收广播协议 + */ void timPresence(ref const(TimPBean) pbean); + /** + 发送信息或接收信息 + */ void timMessage(ref const(TimMBean) mbean); + /** + ping 心跳协议 + */ void timPing(string threadId); + /** + 错误通知 + */ void timError(ref const(TimError) e); + /** + 登出协议 + */ void timLogout(); + /** + 注册协议 + */ void timRegist(ref const(Tid) tid, string auth); + /** + 花名册 + */ void timRoser(ref const(TimRoster) roster); + /** + 发送信息或接收信息列表(合流) + */ void timMessageList(ref const(TimMBeanList) mbeanList); + /** + 发送状态信息列表(合流) + */ void timPresenceList(ref const(TimPBeanList) pbeanList); + /** + 信息请求 get请求数据 del删除 + */ void timMessageIq(ref const(TimMessageIq) timMsgIq, string iqType); + /** + 信息请求 + */ void timMessageResult(ref const(TimMBean) mbean); + /** + 用户协议属性请求 + */ void timProperty(ref const(TimPropertyBean) tpb); + /** + 请求远程验证信息 + */ TimRemoteUserBean timRemoteUserAuth(ref const(Tid) tid, string pwd, ref const(TimAuth) auth); + /** + 请求远程用户信息 + */ TimRemoteUserBean timRemoteUserGet(ref const(Tid) tid, ref const(TimAuth) auth); + /** + 编辑远程用户信息 + */ TimRemoteUserBean timRemoteUserEdit(ref const(Tid) tid, ref const(TimUserBean) ub, ref const(TimAuth) auth); + /** + 广播出席协议或接收广播协议 + */ TimResponseBean timResponsePresence(ref const(TimPBean) pbean, ref const(TimAuth) auth); + /** + 发送信息或接收信息 + */ TimResponseBean timResponseMessage(ref const(TimMBean) mbean, ref const(TimAuth) auth); + /** + 信息请求 get请求数据 del删除(辅助接口) + */ TimMBeanList timResponseMessageIq(ref const(TimMessageIq) timMsgIq, string iqType, ref const(TimAuth) auth); + /** + 广播出席协议或接收广播协议 + */ TimResponseBean timResponsePresenceList(ref const(TimPBeanList) pbeanList, ref const(TimAuth) auth); + /** + 发送信息或接收信息 + */ TimResponseBean timResponseMessageList(ref const(TimMBeanList) mbeanList, ref const(TimAuth) auth); enum methodMeta = [ diff --git a/protocols/gen-d/tim_constants.d b/protocols/gen-d/tim_constants.d index ecaf977..e975209 100644 --- a/protocols/gen-d/tim_constants.d +++ b/protocols/gen-d/tim_constants.d @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -12,12 +12,24 @@ import thrift.util.hashset; import tim_types; +/** + 内部版本号 +*/ immutable(int) protocolversion; +/** + 外部版本号 +*/ immutable(string) protocolversionName; +/** + 状态码:成功 +*/ immutable(string) TIM_SC_SUCCESS; +/** + 状态码:失败 +*/ immutable(string) TIM_SC_FAILED; -static this() { +shared static this() { protocolversion = 4; protocolversionName = "1.1.0"; diff --git a/protocols/gen-d/tim_types.d b/protocols/gen-d/tim_types.d index 65af310..87ea297 100644 --- a/protocols/gen-d/tim_types.d +++ b/protocols/gen-d/tim_types.d @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -51,18 +51,18 @@ struct TimAckBean { struct TimHBean { int chl; int platform; - short version; + short version_; mixin TStructHelpers!([ TFieldMeta(`chl`, 1, TReq.REQUIRED), TFieldMeta(`platform`, 2, TReq.OPTIONAL), - TFieldMeta(`version`, 3, TReq.REQUIRED) + TFieldMeta(`version_`, 3, TReq.REQUIRED) ]); } struct TimParam { string timestamp; - short version; + short version_; string lang; TimNode[] extraList; string[string] extraMap; @@ -71,7 +71,7 @@ struct TimParam { mixin TStructHelpers!([ TFieldMeta(`timestamp`, 1, TReq.OPTIONAL), - TFieldMeta(`version`, 2, TReq.OPTIONAL), + TFieldMeta(`version_`, 2, TReq.OPTIONAL), TFieldMeta(`lang`, 3, TReq.OPTIONAL), TFieldMeta(`extraList`, 4, TReq.OPTIONAL), TFieldMeta(`extraMap`, 5, TReq.OPTIONAL), @@ -211,7 +211,7 @@ struct TimMBean { string mid; Tid fromTid; Tid toTid; - string body; + string body_; string type; short msgType; TimTime offline; @@ -227,7 +227,7 @@ struct TimMBean { TFieldMeta(`mid`, 2, TReq.OPTIONAL), TFieldMeta(`fromTid`, 3, TReq.OPTIONAL), TFieldMeta(`toTid`, 4, TReq.OPTIONAL), - TFieldMeta(`body`, 5, TReq.OPTIONAL), + TFieldMeta(`body_`, 5, TReq.OPTIONAL), TFieldMeta(`type`, 6, TReq.OPTIONAL), TFieldMeta(`msgType`, 7, TReq.OPTIONAL), TFieldMeta(`offline`, 8, TReq.OPTIONAL), diff --git a/protocols/gen-erl/i_tim_thrift.erl b/protocols/gen-erl/i_tim_thrift.erl index 53ec5e3..2cf620d 100644 --- a/protocols/gen-erl/i_tim_thrift.erl +++ b/protocols/gen-erl/i_tim_thrift.erl @@ -1,5 +1,5 @@ %% -%% Autogenerated by Thrift Compiler (0.9.3) +%% Autogenerated by Thrift Compiler (0.17.0) %% %% DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING %% @@ -10,7 +10,7 @@ -include("i_tim_thrift.hrl"). --export([struct_info/1, function_info/2]). +-export([struct_info/1, function_info/2, function_names/0]). struct_info(_) -> erlang:error(function_clause). %%% interface @@ -246,3 +246,6 @@ function_info('timResponseMessageList', exceptions) -> ; function_info(_Func, _Info) -> erlang:error(function_clause). +function_names() -> + ['timStream', 'timStarttls', 'timLogin', 'timAck', 'timPresence', 'timMessage', 'timPing', 'timError', 'timLogout', 'timRegist', 'timRoser', 'timMessageList', 'timPresenceList', 'timMessageIq', 'timMessageResult', 'timProperty', 'timRemoteUserAuth', 'timRemoteUserGet', 'timRemoteUserEdit', 'timResponsePresence', 'timResponseMessage', 'timResponseMessageIq', 'timResponsePresenceList', 'timResponseMessageList']. + diff --git a/protocols/gen-erl/i_tim_thrift.hrl b/protocols/gen-erl/i_tim_thrift.hrl index 7ad363f..c78189d 100644 --- a/protocols/gen-erl/i_tim_thrift.hrl +++ b/protocols/gen-erl/i_tim_thrift.hrl @@ -1,3 +1,9 @@ +%% +%% Autogenerated by Thrift Compiler (0.17.0) +%% +%% DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +%% + -ifndef(_i_tim_included). -define(_i_tim_included, yeah). -include("tim_types.hrl"). diff --git a/protocols/gen-erl/tim_constants.erl b/protocols/gen-erl/tim_constants.erl new file mode 100644 index 0000000..91bd174 --- /dev/null +++ b/protocols/gen-erl/tim_constants.erl @@ -0,0 +1,10 @@ +%% +%% Autogenerated by Thrift Compiler (0.17.0) +%% +%% DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +%% + +-module(tim_constants). + +-include("tim_types.hrl"). + diff --git a/protocols/gen-erl/tim_constants.hrl b/protocols/gen-erl/tim_constants.hrl index 346ee8f..e9f1b93 100644 --- a/protocols/gen-erl/tim_constants.hrl +++ b/protocols/gen-erl/tim_constants.hrl @@ -1,5 +1,5 @@ %% -%% Autogenerated by Thrift Compiler (0.9.3) +%% Autogenerated by Thrift Compiler (0.17.0) %% %% DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING %% diff --git a/protocols/gen-erl/tim_types.erl b/protocols/gen-erl/tim_types.erl index 30c2dd0..1077bbd 100644 --- a/protocols/gen-erl/tim_types.erl +++ b/protocols/gen-erl/tim_types.erl @@ -1,5 +1,5 @@ %% -%% Autogenerated by Thrift Compiler (0.9.3) +%% Autogenerated by Thrift Compiler (0.17.0) %% %% DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING %% @@ -8,7 +8,7 @@ -include("tim_types.hrl"). --export([struct_info/1, struct_info_ext/1]). +-export([struct_info/1, struct_info_ext/1, enum_info/1, enum_names/0, struct_names/0, exception_names/0]). struct_info('TimError') -> {struct, [{1, i32}, @@ -430,3 +430,14 @@ struct_info_ext('TimPropertyBean') -> struct_info_ext(_) -> erlang:error(function_clause). +struct_names() -> + ['TimError', 'TimNode', 'TimAckBean', 'TimHBean', 'TimParam', 'TimTime', 'TimArea', 'Tid', 'TimUserBean', 'TimRoom', 'TimPBean', 'TimMBean', 'TimIqBean', 'TimRoster', 'TimRemoteUserBean', 'TimRemoteRoom', 'TimResponseBean', 'TimSock5Bean', 'TimSock5Bytes', 'TimPage', 'TimMessageIq', 'TimAuth', 'TimMBeanList', 'TimPBeanList', 'TimPropertyBean']. + +enum_info(_) -> erlang:error(function_clause). + +enum_names() -> + []. + +exception_names() -> + []. + diff --git a/protocols/gen-erl/tim_types.hrl b/protocols/gen-erl/tim_types.hrl index 4f8dc18..79afd52 100644 --- a/protocols/gen-erl/tim_types.hrl +++ b/protocols/gen-erl/tim_types.hrl @@ -1,172 +1,178 @@ +%% +%% Autogenerated by Thrift Compiler (0.17.0) +%% +%% DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +%% + -ifndef(_tim_types_included). -define(_tim_types_included, yeah). %% struct 'TimError' --record('TimError', {'errCode' :: integer(), - 'errMsg' :: string() | binary()}). +-record('TimError', {'errCode' :: integer() | 'undefined', + 'errMsg' :: string() | binary() | 'undefined'}). -type 'TimError'() :: #'TimError'{}. %% struct 'TimNode' --record('TimNode', {'key' :: string() | binary(), - 'value' :: string() | binary()}). +-record('TimNode', {'key' :: string() | binary() | 'undefined', + 'value' :: string() | binary() | 'undefined'}). -type 'TimNode'() :: #'TimNode'{}. %% struct 'TimAckBean' --record('TimAckBean', {'id' :: string() | binary(), - 'ackType' :: string() | binary(), - 'ackStatus' :: string() | binary(), - 'extraList' :: list(), - 'err' :: 'TimError'(), - 'extraMap' :: dict:dict()}). +-record('TimAckBean', {'id' :: string() | binary() | 'undefined', + 'ackType' :: string() | binary() | 'undefined', + 'ackStatus' :: string() | binary() | 'undefined', + 'extraList' :: list() | 'undefined', + 'err' :: 'TimError'() | 'undefined', + 'extraMap' :: dict:dict() | 'undefined'}). -type 'TimAckBean'() :: #'TimAckBean'{}. %% struct 'TimHBean' -record('TimHBean', {'chl' :: integer(), - 'platform' :: integer(), + 'platform' :: integer() | 'undefined', 'version' :: integer()}). -type 'TimHBean'() :: #'TimHBean'{}. %% struct 'TimParam' --record('TimParam', {'timestamp' :: string() | binary(), - 'version' :: integer(), - 'lang' :: string() | binary(), - 'extraList' :: list(), - 'extraMap' :: dict:dict(), - 'interflow' :: string() | binary(), - 'tls' :: string() | binary()}). +-record('TimParam', {'timestamp' :: string() | binary() | 'undefined', + 'version' :: integer() | 'undefined', + 'lang' :: string() | binary() | 'undefined', + 'extraList' :: list() | 'undefined', + 'extraMap' :: dict:dict() | 'undefined', + 'interflow' :: string() | binary() | 'undefined', + 'tls' :: string() | binary() | 'undefined'}). -type 'TimParam'() :: #'TimParam'{}. %% struct 'TimTime' --record('TimTime', {'timestamp' :: string() | binary(), - 'formattime' :: string() | binary()}). +-record('TimTime', {'timestamp' :: string() | binary() | 'undefined', + 'formattime' :: string() | binary() | 'undefined'}). -type 'TimTime'() :: #'TimTime'{}. %% struct 'TimArea' --record('TimArea', {'country' :: string() | binary(), - 'province' :: string() | binary(), - 'city' :: string() | binary(), - 'extraList' :: list(), - 'extraMap' :: dict:dict()}). +-record('TimArea', {'country' :: string() | binary() | 'undefined', + 'province' :: string() | binary() | 'undefined', + 'city' :: string() | binary() | 'undefined', + 'extraList' :: list() | 'undefined', + 'extraMap' :: dict:dict() | 'undefined'}). -type 'TimArea'() :: #'TimArea'{}. %% struct 'Tid' -record('Tid', {'name' :: string() | binary(), - 'domain' :: string() | binary(), - 'resource' :: string() | binary(), - 'type' :: string() | binary(), - 'extraList' :: list(), - 'extraMap' :: dict:dict()}). + 'domain' :: string() | binary() | 'undefined', + 'resource' :: string() | binary() | 'undefined', + 'type' :: string() | binary() | 'undefined', + 'extraList' :: list() | 'undefined', + 'extraMap' :: dict:dict() | 'undefined'}). -type 'Tid'() :: #'Tid'{}. %% struct 'TimUserBean' --record('TimUserBean', {'tid' :: 'Tid'(), - 'nickname' :: string() | binary(), - 'remarkname' :: string() | binary(), - 'brithday' :: string() | binary(), - 'gender' :: integer(), - 'headurl' :: string() | binary(), - 'area' :: 'TimArea'(), - 'headbyte' :: string() | binary(), - 'photoBytes' :: list(), - 'extraList' :: list(), - 'extraMap' :: dict:dict()}). +-record('TimUserBean', {'tid' :: 'Tid'() | 'undefined', + 'nickname' :: string() | binary() | 'undefined', + 'remarkname' :: string() | binary() | 'undefined', + 'brithday' :: string() | binary() | 'undefined', + 'gender' :: integer() | 'undefined', + 'headurl' :: string() | binary() | 'undefined', + 'area' :: 'TimArea'() | 'undefined', + 'headbyte' :: string() | binary() | 'undefined', + 'photoBytes' :: list() | 'undefined', + 'extraList' :: list() | 'undefined', + 'extraMap' :: dict:dict() | 'undefined'}). -type 'TimUserBean'() :: #'TimUserBean'{}. %% struct 'TimRoom' --record('TimRoom', {'tid' :: 'Tid'(), - 'founderTid' :: 'Tid'(), - 'HostsTid' :: list(), - 'membersTid' :: list(), - 'headurl' :: string() | binary(), - 'roomName' :: string() | binary(), - 'desc' :: string() | binary(), - 'createTime' :: 'TimTime'(), - 'extraList' :: list(), - 'extraMap' :: dict:dict()}). +-record('TimRoom', {'tid' :: 'Tid'() | 'undefined', + 'founderTid' :: 'Tid'() | 'undefined', + 'HostsTid' :: list() | 'undefined', + 'membersTid' :: list() | 'undefined', + 'headurl' :: string() | binary() | 'undefined', + 'roomName' :: string() | binary() | 'undefined', + 'desc' :: string() | binary() | 'undefined', + 'createTime' :: 'TimTime'() | 'undefined', + 'extraList' :: list() | 'undefined', + 'extraMap' :: dict:dict() | 'undefined'}). -type 'TimRoom'() :: #'TimRoom'{}. %% struct 'TimPBean' -record('TimPBean', {'threadId' :: string() | binary(), - 'fromTid' :: 'Tid'(), - 'toTid' :: 'Tid'(), - 'status' :: string() | binary(), - 'type' :: string() | binary(), - 'priority' :: integer(), - 'show' :: string() | binary(), - 'leaguerTid' :: 'Tid'(), - 'extraList' :: list(), - 'error' :: 'TimError'(), - 'extraMap' :: dict:dict()}). + 'fromTid' :: 'Tid'() | 'undefined', + 'toTid' :: 'Tid'() | 'undefined', + 'status' :: string() | binary() | 'undefined', + 'type' :: string() | binary() | 'undefined', + 'priority' :: integer() | 'undefined', + 'show' :: string() | binary() | 'undefined', + 'leaguerTid' :: 'Tid'() | 'undefined', + 'extraList' :: list() | 'undefined', + 'error' :: 'TimError'() | 'undefined', + 'extraMap' :: dict:dict() | 'undefined'}). -type 'TimPBean'() :: #'TimPBean'{}. %% struct 'TimMBean' -record('TimMBean', {'threadId' :: string() | binary(), - 'mid' :: string() | binary(), - 'fromTid' :: 'Tid'(), - 'toTid' :: 'Tid'(), - 'body' :: string() | binary(), - 'type' :: string() | binary(), - 'msgType' :: integer(), - 'offline' :: 'TimTime'(), - 'leaguerTid' :: 'Tid'(), - 'extraList' :: list(), - 'timestamp' :: string() | binary(), - 'error' :: 'TimError'(), - 'extraMap' :: dict:dict(), - 'readstatus' :: integer()}). + 'mid' :: string() | binary() | 'undefined', + 'fromTid' :: 'Tid'() | 'undefined', + 'toTid' :: 'Tid'() | 'undefined', + 'body' :: string() | binary() | 'undefined', + 'type' :: string() | binary() | 'undefined', + 'msgType' :: integer() | 'undefined', + 'offline' :: 'TimTime'() | 'undefined', + 'leaguerTid' :: 'Tid'() | 'undefined', + 'extraList' :: list() | 'undefined', + 'timestamp' :: string() | binary() | 'undefined', + 'error' :: 'TimError'() | 'undefined', + 'extraMap' :: dict:dict() | 'undefined', + 'readstatus' :: integer() | 'undefined'}). -type 'TimMBean'() :: #'TimMBean'{}. %% struct 'TimIqBean' -record('TimIqBean', {'threadId' :: string() | binary(), - 'fromTid' :: 'Tid'(), - 'toTid' :: 'Tid'(), - 'type' :: string() | binary(), - 'extraList' :: list(), - 'error' :: 'TimError'(), - 'extraMap' :: dict:dict()}). + 'fromTid' :: 'Tid'() | 'undefined', + 'toTid' :: 'Tid'() | 'undefined', + 'type' :: string() | binary() | 'undefined', + 'extraList' :: list() | 'undefined', + 'error' :: 'TimError'() | 'undefined', + 'extraMap' :: dict:dict() | 'undefined'}). -type 'TimIqBean'() :: #'TimIqBean'{}. %% struct 'TimRoster' -record('TimRoster', {'subscription' :: string() | binary(), 'tid' = #'Tid'{} :: 'Tid'(), - 'name' :: string() | binary(), - 'extraMap' :: dict:dict()}). + 'name' :: string() | binary() | 'undefined', + 'extraMap' :: dict:dict() | 'undefined'}). -type 'TimRoster'() :: #'TimRoster'{}. %% struct 'TimRemoteUserBean' --record('TimRemoteUserBean', {'error' :: 'TimError'(), - 'ub' :: 'TimUserBean'(), - 'extraMap' :: dict:dict()}). +-record('TimRemoteUserBean', {'error' :: 'TimError'() | 'undefined', + 'ub' :: 'TimUserBean'() | 'undefined', + 'extraMap' :: dict:dict() | 'undefined'}). -type 'TimRemoteUserBean'() :: #'TimRemoteUserBean'{}. %% struct 'TimRemoteRoom' --record('TimRemoteRoom', {'error' :: 'TimError'(), - 'room' :: 'TimRoom'(), - 'extraMap' :: dict:dict()}). +-record('TimRemoteRoom', {'error' :: 'TimError'() | 'undefined', + 'room' :: 'TimRoom'() | 'undefined', + 'extraMap' :: dict:dict() | 'undefined'}). -type 'TimRemoteRoom'() :: #'TimRemoteRoom'{}. %% struct 'TimResponseBean' --record('TimResponseBean', {'threadId' :: string() | binary(), - 'error' :: 'TimError'(), - 'extraList' :: list(), - 'extraMap' :: dict:dict()}). +-record('TimResponseBean', {'threadId' :: string() | binary() | 'undefined', + 'error' :: 'TimError'() | 'undefined', + 'extraList' :: list() | 'undefined', + 'extraMap' :: dict:dict() | 'undefined'}). -type 'TimResponseBean'() :: #'TimResponseBean'{}. %% struct 'TimSock5Bean' @@ -177,7 +183,7 @@ 'port' :: integer(), 'transport' :: integer(), 'pubId' :: string() | binary(), - 'extraMap' :: dict:dict()}). + 'extraMap' :: dict:dict() | 'undefined'}). -type 'TimSock5Bean'() :: #'TimSock5Bean'{}. %% struct 'TimSock5Bytes' @@ -185,53 +191,53 @@ -record('TimSock5Bytes', {'pubId' :: string() | binary(), 'index' :: integer(), 'bytes' = [] :: list(), - 'extraMap' :: dict:dict()}). + 'extraMap' :: dict:dict() | 'undefined'}). -type 'TimSock5Bytes'() :: #'TimSock5Bytes'{}. %% struct 'TimPage' --record('TimPage', {'fromTimeStamp' :: string() | binary(), - 'toTimeStamp' :: string() | binary(), - 'limitCount' :: integer(), - 'extraMap' :: dict:dict()}). +-record('TimPage', {'fromTimeStamp' :: string() | binary() | 'undefined', + 'toTimeStamp' :: string() | binary() | 'undefined', + 'limitCount' :: integer() | 'undefined', + 'extraMap' :: dict:dict() | 'undefined'}). -type 'TimPage'() :: #'TimPage'{}. %% struct 'TimMessageIq' --record('TimMessageIq', {'tidlist' :: list(), - 'timPage' :: 'TimPage'(), - 'midlist' :: list(), - 'extraMap' :: dict:dict()}). +-record('TimMessageIq', {'tidlist' :: list() | 'undefined', + 'timPage' :: 'TimPage'() | 'undefined', + 'midlist' :: list() | 'undefined', + 'extraMap' :: dict:dict() | 'undefined'}). -type 'TimMessageIq'() :: #'TimMessageIq'{}. %% struct 'TimAuth' --record('TimAuth', {'domain' :: string() | binary(), - 'username' :: string() | binary(), - 'pwd' :: string() | binary()}). +-record('TimAuth', {'domain' :: string() | binary() | 'undefined', + 'username' :: string() | binary() | 'undefined', + 'pwd' :: string() | binary() | 'undefined'}). -type 'TimAuth'() :: #'TimAuth'{}. %% struct 'TimMBeanList' -record('TimMBeanList', {'threadId' :: string() | binary(), - 'timMBeanList' :: list(), - 'reqType' :: string() | binary(), - 'extraMap' :: dict:dict()}). + 'timMBeanList' :: list() | 'undefined', + 'reqType' :: string() | binary() | 'undefined', + 'extraMap' :: dict:dict() | 'undefined'}). -type 'TimMBeanList'() :: #'TimMBeanList'{}. %% struct 'TimPBeanList' -record('TimPBeanList', {'threadId' :: string() | binary(), - 'timPBeanList' :: list(), - 'reqType' :: string() | binary(), - 'extraMap' :: dict:dict()}). + 'timPBeanList' :: list() | 'undefined', + 'reqType' :: string() | binary() | 'undefined', + 'extraMap' :: dict:dict() | 'undefined'}). -type 'TimPBeanList'() :: #'TimPBeanList'{}. %% struct 'TimPropertyBean' --record('TimPropertyBean', {'threadId' :: string() | binary(), - 'interflow' :: string() | binary(), - 'tls' :: string() | binary()}). +-record('TimPropertyBean', {'threadId' :: string() | binary() | 'undefined', + 'interflow' :: string() | binary() | 'undefined', + 'tls' :: string() | binary() | 'undefined'}). -type 'TimPropertyBean'() :: #'TimPropertyBean'{}. -endif. diff --git a/protocols/gen-go/protocol/GoUnusedProtection__.go b/protocols/gen-go/protocol/GoUnusedProtection__.go new file mode 100644 index 0000000..b51bc1a --- /dev/null +++ b/protocols/gen-go/protocol/GoUnusedProtection__.go @@ -0,0 +1,6 @@ +// Code generated by Thrift Compiler (0.17.0). DO NOT EDIT. + +package protocol + +var GoUnusedProtection__ int; + diff --git a/protocols/gen-go/protocol/i_tim-remote/i_tim-remote.go b/protocols/gen-go/protocol/i_tim-remote/i_tim-remote.go index c63cd9d..f8cad4d 100644 --- a/protocols/gen-go/protocol/i_tim-remote/i_tim-remote.go +++ b/protocols/gen-go/protocol/i_tim-remote/i_tim-remote.go @@ -1,861 +1,891 @@ -// Autogenerated by Thrift Compiler (0.9.3) -// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +// Code generated by Thrift Compiler (0.17.0). DO NOT EDIT. package main import ( + "context" "flag" "fmt" - "git.apache.org/thrift.git/lib/go/thrift" "math" "net" "net/url" "os" - "protocol" "strconv" "strings" + thrift "github.com/apache/thrift/lib/go/thrift" + "protocol" ) +var _ = protocol.GoUnusedProtection__ + func Usage() { - fmt.Fprintln(os.Stderr, "Usage of ", os.Args[0], " [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]:") - flag.PrintDefaults() - fmt.Fprintln(os.Stderr, "\nFunctions:") - fmt.Fprintln(os.Stderr, " void timStream(TimParam param)") - fmt.Fprintln(os.Stderr, " void timStarttls()") - fmt.Fprintln(os.Stderr, " void timLogin(Tid tid, string pwd)") - fmt.Fprintln(os.Stderr, " void timAck(TimAckBean ab)") - fmt.Fprintln(os.Stderr, " void timPresence(TimPBean pbean)") - fmt.Fprintln(os.Stderr, " void timMessage(TimMBean mbean)") - fmt.Fprintln(os.Stderr, " void timPing(string threadId)") - fmt.Fprintln(os.Stderr, " void timError(TimError e)") - fmt.Fprintln(os.Stderr, " void timLogout()") - fmt.Fprintln(os.Stderr, " void timRegist(Tid tid, string auth)") - fmt.Fprintln(os.Stderr, " void timRoser(TimRoster roster)") - fmt.Fprintln(os.Stderr, " void timMessageList(TimMBeanList mbeanList)") - fmt.Fprintln(os.Stderr, " void timPresenceList(TimPBeanList pbeanList)") - fmt.Fprintln(os.Stderr, " void timMessageIq(TimMessageIq timMsgIq, string iqType)") - fmt.Fprintln(os.Stderr, " void timMessageResult(TimMBean mbean)") - fmt.Fprintln(os.Stderr, " void timProperty(TimPropertyBean tpb)") - fmt.Fprintln(os.Stderr, " TimRemoteUserBean timRemoteUserAuth(Tid tid, string pwd, TimAuth auth)") - fmt.Fprintln(os.Stderr, " TimRemoteUserBean timRemoteUserGet(Tid tid, TimAuth auth)") - fmt.Fprintln(os.Stderr, " TimRemoteUserBean timRemoteUserEdit(Tid tid, TimUserBean ub, TimAuth auth)") - fmt.Fprintln(os.Stderr, " TimResponseBean timResponsePresence(TimPBean pbean, TimAuth auth)") - fmt.Fprintln(os.Stderr, " TimResponseBean timResponseMessage(TimMBean mbean, TimAuth auth)") - fmt.Fprintln(os.Stderr, " TimMBeanList timResponseMessageIq(TimMessageIq timMsgIq, string iqType, TimAuth auth)") - fmt.Fprintln(os.Stderr, " TimResponseBean timResponsePresenceList(TimPBeanList pbeanList, TimAuth auth)") - fmt.Fprintln(os.Stderr, " TimResponseBean timResponseMessageList(TimMBeanList mbeanList, TimAuth auth)") - fmt.Fprintln(os.Stderr) - os.Exit(0) + fmt.Fprintln(os.Stderr, "Usage of ", os.Args[0], " [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]:") + flag.PrintDefaults() + fmt.Fprintln(os.Stderr, "\nFunctions:") + fmt.Fprintln(os.Stderr, " void timStream(TimParam param)") + fmt.Fprintln(os.Stderr, " void timStarttls()") + fmt.Fprintln(os.Stderr, " void timLogin(Tid tid, string pwd)") + fmt.Fprintln(os.Stderr, " void timAck(TimAckBean ab)") + fmt.Fprintln(os.Stderr, " void timPresence(TimPBean pbean)") + fmt.Fprintln(os.Stderr, " void timMessage(TimMBean mbean)") + fmt.Fprintln(os.Stderr, " void timPing(string threadId)") + fmt.Fprintln(os.Stderr, " void timError(TimError e)") + fmt.Fprintln(os.Stderr, " void timLogout()") + fmt.Fprintln(os.Stderr, " void timRegist(Tid tid, string auth)") + fmt.Fprintln(os.Stderr, " void timRoser(TimRoster roster)") + fmt.Fprintln(os.Stderr, " void timMessageList(TimMBeanList mbeanList)") + fmt.Fprintln(os.Stderr, " void timPresenceList(TimPBeanList pbeanList)") + fmt.Fprintln(os.Stderr, " void timMessageIq(TimMessageIq timMsgIq, string iqType)") + fmt.Fprintln(os.Stderr, " void timMessageResult(TimMBean mbean)") + fmt.Fprintln(os.Stderr, " void timProperty(TimPropertyBean tpb)") + fmt.Fprintln(os.Stderr, " TimRemoteUserBean timRemoteUserAuth(Tid tid, string pwd, TimAuth auth)") + fmt.Fprintln(os.Stderr, " TimRemoteUserBean timRemoteUserGet(Tid tid, TimAuth auth)") + fmt.Fprintln(os.Stderr, " TimRemoteUserBean timRemoteUserEdit(Tid tid, TimUserBean ub, TimAuth auth)") + fmt.Fprintln(os.Stderr, " TimResponseBean timResponsePresence(TimPBean pbean, TimAuth auth)") + fmt.Fprintln(os.Stderr, " TimResponseBean timResponseMessage(TimMBean mbean, TimAuth auth)") + fmt.Fprintln(os.Stderr, " TimMBeanList timResponseMessageIq(TimMessageIq timMsgIq, string iqType, TimAuth auth)") + fmt.Fprintln(os.Stderr, " TimResponseBean timResponsePresenceList(TimPBeanList pbeanList, TimAuth auth)") + fmt.Fprintln(os.Stderr, " TimResponseBean timResponseMessageList(TimMBeanList mbeanList, TimAuth auth)") + fmt.Fprintln(os.Stderr) + os.Exit(0) } -func main() { - flag.Usage = Usage - var host string - var port int - var protocol string - var urlString string - var framed bool - var useHttp bool - var parsedUrl url.URL - var trans thrift.TTransport - _ = strconv.Atoi - _ = math.Abs - flag.Usage = Usage - flag.StringVar(&host, "h", "localhost", "Specify host and port") - flag.IntVar(&port, "p", 9090, "Specify port") - flag.StringVar(&protocol, "P", "binary", "Specify the protocol (binary, compact, simplejson, json)") - flag.StringVar(&urlString, "u", "", "Specify the url") - flag.BoolVar(&framed, "framed", false, "Use framed transport") - flag.BoolVar(&useHttp, "http", false, "Use http") - flag.Parse() +type httpHeaders map[string]string - if len(urlString) > 0 { - parsedUrl, err := url.Parse(urlString) - if err != nil { - fmt.Fprintln(os.Stderr, "Error parsing URL: ", err) - flag.Usage() - } - host = parsedUrl.Host - useHttp = len(parsedUrl.Scheme) <= 0 || parsedUrl.Scheme == "http" - } else if useHttp { - _, err := url.Parse(fmt.Sprint("http://", host, ":", port)) - if err != nil { - fmt.Fprintln(os.Stderr, "Error parsing URL: ", err) - flag.Usage() - } - } +func (h httpHeaders) String() string { + var m map[string]string = h + return fmt.Sprintf("%s", m) +} - cmd := flag.Arg(0) - var err error - if useHttp { - trans, err = thrift.NewTHttpClient(parsedUrl.String()) - } else { - portStr := fmt.Sprint(port) - if strings.Contains(host, ":") { - host, portStr, err = net.SplitHostPort(host) - if err != nil { - fmt.Fprintln(os.Stderr, "error with host:", err) - os.Exit(1) - } - } - trans, err = thrift.NewTSocket(net.JoinHostPort(host, portStr)) - if err != nil { - fmt.Fprintln(os.Stderr, "error resolving address:", err) - os.Exit(1) - } - if framed { - trans = thrift.NewTFramedTransport(trans) - } - } - if err != nil { - fmt.Fprintln(os.Stderr, "Error creating transport", err) - os.Exit(1) - } - defer trans.Close() - var protocolFactory thrift.TProtocolFactory - switch protocol { - case "compact": - protocolFactory = thrift.NewTCompactProtocolFactory() - break - case "simplejson": - protocolFactory = thrift.NewTSimpleJSONProtocolFactory() - break - case "json": - protocolFactory = thrift.NewTJSONProtocolFactory() - break - case "binary", "": - protocolFactory = thrift.NewTBinaryProtocolFactoryDefault() - break - default: - fmt.Fprintln(os.Stderr, "Invalid protocol specified: ", protocol) - Usage() - os.Exit(1) - } - client := protocol.NewITimClientFactory(trans, protocolFactory) - if err := trans.Open(); err != nil { - fmt.Fprintln(os.Stderr, "Error opening socket to ", host, ":", port, " ", err) - os.Exit(1) - } +func (h httpHeaders) Set(value string) error { + parts := strings.Split(value, ": ") + if len(parts) != 2 { + return fmt.Errorf("header should be of format 'Key: Value'") + } + h[parts[0]] = parts[1] + return nil +} - switch cmd { - case "timStream": - if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "TimStream requires 1 args") - flag.Usage() - } - arg74 := flag.Arg(1) - mbTrans75 := thrift.NewTMemoryBufferLen(len(arg74)) - defer mbTrans75.Close() - _, err76 := mbTrans75.WriteString(arg74) - if err76 != nil { - Usage() - return - } - factory77 := thrift.NewTSimpleJSONProtocolFactory() - jsProt78 := factory77.GetProtocol(mbTrans75) - argvalue0 := protocol.NewTimParam() - err79 := argvalue0.Read(jsProt78) - if err79 != nil { - Usage() - return - } - value0 := argvalue0 - fmt.Print(client.TimStream(value0)) - fmt.Print("\n") - break - case "timStarttls": - if flag.NArg()-1 != 0 { - fmt.Fprintln(os.Stderr, "TimStarttls requires 0 args") - flag.Usage() - } - fmt.Print(client.TimStarttls()) - fmt.Print("\n") - break - case "timLogin": - if flag.NArg()-1 != 2 { - fmt.Fprintln(os.Stderr, "TimLogin requires 2 args") - flag.Usage() - } - arg80 := flag.Arg(1) - mbTrans81 := thrift.NewTMemoryBufferLen(len(arg80)) - defer mbTrans81.Close() - _, err82 := mbTrans81.WriteString(arg80) - if err82 != nil { - Usage() - return - } - factory83 := thrift.NewTSimpleJSONProtocolFactory() - jsProt84 := factory83.GetProtocol(mbTrans81) - argvalue0 := protocol.NewTid() - err85 := argvalue0.Read(jsProt84) - if err85 != nil { - Usage() - return - } - value0 := argvalue0 - argvalue1 := flag.Arg(2) - value1 := argvalue1 - fmt.Print(client.TimLogin(value0, value1)) - fmt.Print("\n") - break - case "timAck": - if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "TimAck requires 1 args") - flag.Usage() - } - arg87 := flag.Arg(1) - mbTrans88 := thrift.NewTMemoryBufferLen(len(arg87)) - defer mbTrans88.Close() - _, err89 := mbTrans88.WriteString(arg87) - if err89 != nil { - Usage() - return - } - factory90 := thrift.NewTSimpleJSONProtocolFactory() - jsProt91 := factory90.GetProtocol(mbTrans88) - argvalue0 := protocol.NewTimAckBean() - err92 := argvalue0.Read(jsProt91) - if err92 != nil { - Usage() - return - } - value0 := argvalue0 - fmt.Print(client.TimAck(value0)) - fmt.Print("\n") - break - case "timPresence": - if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "TimPresence requires 1 args") - flag.Usage() - } - arg93 := flag.Arg(1) - mbTrans94 := thrift.NewTMemoryBufferLen(len(arg93)) - defer mbTrans94.Close() - _, err95 := mbTrans94.WriteString(arg93) - if err95 != nil { - Usage() - return - } - factory96 := thrift.NewTSimpleJSONProtocolFactory() - jsProt97 := factory96.GetProtocol(mbTrans94) - argvalue0 := protocol.NewTimPBean() - err98 := argvalue0.Read(jsProt97) - if err98 != nil { - Usage() - return - } - value0 := argvalue0 - fmt.Print(client.TimPresence(value0)) - fmt.Print("\n") - break - case "timMessage": - if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "TimMessage requires 1 args") - flag.Usage() - } - arg99 := flag.Arg(1) - mbTrans100 := thrift.NewTMemoryBufferLen(len(arg99)) - defer mbTrans100.Close() - _, err101 := mbTrans100.WriteString(arg99) - if err101 != nil { - Usage() - return - } - factory102 := thrift.NewTSimpleJSONProtocolFactory() - jsProt103 := factory102.GetProtocol(mbTrans100) - argvalue0 := protocol.NewTimMBean() - err104 := argvalue0.Read(jsProt103) - if err104 != nil { - Usage() - return - } - value0 := argvalue0 - fmt.Print(client.TimMessage(value0)) - fmt.Print("\n") - break - case "timPing": - if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "TimPing requires 1 args") - flag.Usage() - } - argvalue0 := flag.Arg(1) - value0 := argvalue0 - fmt.Print(client.TimPing(value0)) - fmt.Print("\n") - break - case "timError": - if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "TimError requires 1 args") - flag.Usage() - } - arg106 := flag.Arg(1) - mbTrans107 := thrift.NewTMemoryBufferLen(len(arg106)) - defer mbTrans107.Close() - _, err108 := mbTrans107.WriteString(arg106) - if err108 != nil { - Usage() - return - } - factory109 := thrift.NewTSimpleJSONProtocolFactory() - jsProt110 := factory109.GetProtocol(mbTrans107) - argvalue0 := protocol.NewTimError() - err111 := argvalue0.Read(jsProt110) - if err111 != nil { - Usage() - return - } - value0 := argvalue0 - fmt.Print(client.TimError(value0)) - fmt.Print("\n") - break - case "timLogout": - if flag.NArg()-1 != 0 { - fmt.Fprintln(os.Stderr, "TimLogout requires 0 args") - flag.Usage() - } - fmt.Print(client.TimLogout()) - fmt.Print("\n") - break - case "timRegist": - if flag.NArg()-1 != 2 { - fmt.Fprintln(os.Stderr, "TimRegist requires 2 args") - flag.Usage() - } - arg112 := flag.Arg(1) - mbTrans113 := thrift.NewTMemoryBufferLen(len(arg112)) - defer mbTrans113.Close() - _, err114 := mbTrans113.WriteString(arg112) - if err114 != nil { - Usage() - return - } - factory115 := thrift.NewTSimpleJSONProtocolFactory() - jsProt116 := factory115.GetProtocol(mbTrans113) - argvalue0 := protocol.NewTid() - err117 := argvalue0.Read(jsProt116) - if err117 != nil { - Usage() - return - } - value0 := argvalue0 - argvalue1 := flag.Arg(2) - value1 := argvalue1 - fmt.Print(client.TimRegist(value0, value1)) - fmt.Print("\n") - break - case "timRoser": - if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "TimRoser requires 1 args") - flag.Usage() - } - arg119 := flag.Arg(1) - mbTrans120 := thrift.NewTMemoryBufferLen(len(arg119)) - defer mbTrans120.Close() - _, err121 := mbTrans120.WriteString(arg119) - if err121 != nil { - Usage() - return - } - factory122 := thrift.NewTSimpleJSONProtocolFactory() - jsProt123 := factory122.GetProtocol(mbTrans120) - argvalue0 := protocol.NewTimRoster() - err124 := argvalue0.Read(jsProt123) - if err124 != nil { - Usage() - return - } - value0 := argvalue0 - fmt.Print(client.TimRoser(value0)) - fmt.Print("\n") - break - case "timMessageList": - if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "TimMessageList requires 1 args") - flag.Usage() - } - arg125 := flag.Arg(1) - mbTrans126 := thrift.NewTMemoryBufferLen(len(arg125)) - defer mbTrans126.Close() - _, err127 := mbTrans126.WriteString(arg125) - if err127 != nil { - Usage() - return - } - factory128 := thrift.NewTSimpleJSONProtocolFactory() - jsProt129 := factory128.GetProtocol(mbTrans126) - argvalue0 := protocol.NewTimMBeanList() - err130 := argvalue0.Read(jsProt129) - if err130 != nil { - Usage() - return - } - value0 := argvalue0 - fmt.Print(client.TimMessageList(value0)) - fmt.Print("\n") - break - case "timPresenceList": - if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "TimPresenceList requires 1 args") - flag.Usage() - } - arg131 := flag.Arg(1) - mbTrans132 := thrift.NewTMemoryBufferLen(len(arg131)) - defer mbTrans132.Close() - _, err133 := mbTrans132.WriteString(arg131) - if err133 != nil { - Usage() - return - } - factory134 := thrift.NewTSimpleJSONProtocolFactory() - jsProt135 := factory134.GetProtocol(mbTrans132) - argvalue0 := protocol.NewTimPBeanList() - err136 := argvalue0.Read(jsProt135) - if err136 != nil { - Usage() - return - } - value0 := argvalue0 - fmt.Print(client.TimPresenceList(value0)) - fmt.Print("\n") - break - case "timMessageIq": - if flag.NArg()-1 != 2 { - fmt.Fprintln(os.Stderr, "TimMessageIq requires 2 args") - flag.Usage() - } - arg137 := flag.Arg(1) - mbTrans138 := thrift.NewTMemoryBufferLen(len(arg137)) - defer mbTrans138.Close() - _, err139 := mbTrans138.WriteString(arg137) - if err139 != nil { - Usage() - return - } - factory140 := thrift.NewTSimpleJSONProtocolFactory() - jsProt141 := factory140.GetProtocol(mbTrans138) - argvalue0 := protocol.NewTimMessageIq() - err142 := argvalue0.Read(jsProt141) - if err142 != nil { - Usage() - return - } - value0 := argvalue0 - argvalue1 := flag.Arg(2) - value1 := argvalue1 - fmt.Print(client.TimMessageIq(value0, value1)) - fmt.Print("\n") - break - case "timMessageResult": - if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "TimMessageResult_ requires 1 args") - flag.Usage() - } - arg144 := flag.Arg(1) - mbTrans145 := thrift.NewTMemoryBufferLen(len(arg144)) - defer mbTrans145.Close() - _, err146 := mbTrans145.WriteString(arg144) - if err146 != nil { - Usage() - return - } - factory147 := thrift.NewTSimpleJSONProtocolFactory() - jsProt148 := factory147.GetProtocol(mbTrans145) - argvalue0 := protocol.NewTimMBean() - err149 := argvalue0.Read(jsProt148) - if err149 != nil { - Usage() - return - } - value0 := argvalue0 - fmt.Print(client.TimMessageResult_(value0)) - fmt.Print("\n") - break - case "timProperty": - if flag.NArg()-1 != 1 { - fmt.Fprintln(os.Stderr, "TimProperty requires 1 args") - flag.Usage() - } - arg150 := flag.Arg(1) - mbTrans151 := thrift.NewTMemoryBufferLen(len(arg150)) - defer mbTrans151.Close() - _, err152 := mbTrans151.WriteString(arg150) - if err152 != nil { - Usage() - return - } - factory153 := thrift.NewTSimpleJSONProtocolFactory() - jsProt154 := factory153.GetProtocol(mbTrans151) - argvalue0 := protocol.NewTimPropertyBean() - err155 := argvalue0.Read(jsProt154) - if err155 != nil { - Usage() - return - } - value0 := argvalue0 - fmt.Print(client.TimProperty(value0)) - fmt.Print("\n") - break - case "timRemoteUserAuth": - if flag.NArg()-1 != 3 { - fmt.Fprintln(os.Stderr, "TimRemoteUserAuth requires 3 args") - flag.Usage() - } - arg156 := flag.Arg(1) - mbTrans157 := thrift.NewTMemoryBufferLen(len(arg156)) - defer mbTrans157.Close() - _, err158 := mbTrans157.WriteString(arg156) - if err158 != nil { - Usage() - return - } - factory159 := thrift.NewTSimpleJSONProtocolFactory() - jsProt160 := factory159.GetProtocol(mbTrans157) - argvalue0 := protocol.NewTid() - err161 := argvalue0.Read(jsProt160) - if err161 != nil { - Usage() - return - } - value0 := argvalue0 - argvalue1 := flag.Arg(2) - value1 := argvalue1 - arg163 := flag.Arg(3) - mbTrans164 := thrift.NewTMemoryBufferLen(len(arg163)) - defer mbTrans164.Close() - _, err165 := mbTrans164.WriteString(arg163) - if err165 != nil { - Usage() - return - } - factory166 := thrift.NewTSimpleJSONProtocolFactory() - jsProt167 := factory166.GetProtocol(mbTrans164) - argvalue2 := protocol.NewTimAuth() - err168 := argvalue2.Read(jsProt167) - if err168 != nil { - Usage() - return - } - value2 := argvalue2 - fmt.Print(client.TimRemoteUserAuth(value0, value1, value2)) - fmt.Print("\n") - break - case "timRemoteUserGet": - if flag.NArg()-1 != 2 { - fmt.Fprintln(os.Stderr, "TimRemoteUserGet requires 2 args") - flag.Usage() - } - arg169 := flag.Arg(1) - mbTrans170 := thrift.NewTMemoryBufferLen(len(arg169)) - defer mbTrans170.Close() - _, err171 := mbTrans170.WriteString(arg169) - if err171 != nil { - Usage() - return - } - factory172 := thrift.NewTSimpleJSONProtocolFactory() - jsProt173 := factory172.GetProtocol(mbTrans170) - argvalue0 := protocol.NewTid() - err174 := argvalue0.Read(jsProt173) - if err174 != nil { - Usage() - return - } - value0 := argvalue0 - arg175 := flag.Arg(2) - mbTrans176 := thrift.NewTMemoryBufferLen(len(arg175)) - defer mbTrans176.Close() - _, err177 := mbTrans176.WriteString(arg175) - if err177 != nil { - Usage() - return - } - factory178 := thrift.NewTSimpleJSONProtocolFactory() - jsProt179 := factory178.GetProtocol(mbTrans176) - argvalue1 := protocol.NewTimAuth() - err180 := argvalue1.Read(jsProt179) - if err180 != nil { - Usage() - return - } - value1 := argvalue1 - fmt.Print(client.TimRemoteUserGet(value0, value1)) - fmt.Print("\n") - break - case "timRemoteUserEdit": - if flag.NArg()-1 != 3 { - fmt.Fprintln(os.Stderr, "TimRemoteUserEdit requires 3 args") - flag.Usage() - } - arg181 := flag.Arg(1) - mbTrans182 := thrift.NewTMemoryBufferLen(len(arg181)) - defer mbTrans182.Close() - _, err183 := mbTrans182.WriteString(arg181) - if err183 != nil { - Usage() - return - } - factory184 := thrift.NewTSimpleJSONProtocolFactory() - jsProt185 := factory184.GetProtocol(mbTrans182) - argvalue0 := protocol.NewTid() - err186 := argvalue0.Read(jsProt185) - if err186 != nil { - Usage() - return - } - value0 := argvalue0 - arg187 := flag.Arg(2) - mbTrans188 := thrift.NewTMemoryBufferLen(len(arg187)) - defer mbTrans188.Close() - _, err189 := mbTrans188.WriteString(arg187) - if err189 != nil { - Usage() - return - } - factory190 := thrift.NewTSimpleJSONProtocolFactory() - jsProt191 := factory190.GetProtocol(mbTrans188) - argvalue1 := protocol.NewTimUserBean() - err192 := argvalue1.Read(jsProt191) - if err192 != nil { - Usage() - return - } - value1 := argvalue1 - arg193 := flag.Arg(3) - mbTrans194 := thrift.NewTMemoryBufferLen(len(arg193)) - defer mbTrans194.Close() - _, err195 := mbTrans194.WriteString(arg193) - if err195 != nil { - Usage() - return - } - factory196 := thrift.NewTSimpleJSONProtocolFactory() - jsProt197 := factory196.GetProtocol(mbTrans194) - argvalue2 := protocol.NewTimAuth() - err198 := argvalue2.Read(jsProt197) - if err198 != nil { - Usage() - return - } - value2 := argvalue2 - fmt.Print(client.TimRemoteUserEdit(value0, value1, value2)) - fmt.Print("\n") - break - case "timResponsePresence": - if flag.NArg()-1 != 2 { - fmt.Fprintln(os.Stderr, "TimResponsePresence requires 2 args") - flag.Usage() - } - arg199 := flag.Arg(1) - mbTrans200 := thrift.NewTMemoryBufferLen(len(arg199)) - defer mbTrans200.Close() - _, err201 := mbTrans200.WriteString(arg199) - if err201 != nil { - Usage() - return - } - factory202 := thrift.NewTSimpleJSONProtocolFactory() - jsProt203 := factory202.GetProtocol(mbTrans200) - argvalue0 := protocol.NewTimPBean() - err204 := argvalue0.Read(jsProt203) - if err204 != nil { - Usage() - return - } - value0 := argvalue0 - arg205 := flag.Arg(2) - mbTrans206 := thrift.NewTMemoryBufferLen(len(arg205)) - defer mbTrans206.Close() - _, err207 := mbTrans206.WriteString(arg205) - if err207 != nil { - Usage() - return - } - factory208 := thrift.NewTSimpleJSONProtocolFactory() - jsProt209 := factory208.GetProtocol(mbTrans206) - argvalue1 := protocol.NewTimAuth() - err210 := argvalue1.Read(jsProt209) - if err210 != nil { - Usage() - return - } - value1 := argvalue1 - fmt.Print(client.TimResponsePresence(value0, value1)) - fmt.Print("\n") - break - case "timResponseMessage": - if flag.NArg()-1 != 2 { - fmt.Fprintln(os.Stderr, "TimResponseMessage requires 2 args") - flag.Usage() - } - arg211 := flag.Arg(1) - mbTrans212 := thrift.NewTMemoryBufferLen(len(arg211)) - defer mbTrans212.Close() - _, err213 := mbTrans212.WriteString(arg211) - if err213 != nil { - Usage() - return - } - factory214 := thrift.NewTSimpleJSONProtocolFactory() - jsProt215 := factory214.GetProtocol(mbTrans212) - argvalue0 := protocol.NewTimMBean() - err216 := argvalue0.Read(jsProt215) - if err216 != nil { - Usage() - return - } - value0 := argvalue0 - arg217 := flag.Arg(2) - mbTrans218 := thrift.NewTMemoryBufferLen(len(arg217)) - defer mbTrans218.Close() - _, err219 := mbTrans218.WriteString(arg217) - if err219 != nil { - Usage() - return - } - factory220 := thrift.NewTSimpleJSONProtocolFactory() - jsProt221 := factory220.GetProtocol(mbTrans218) - argvalue1 := protocol.NewTimAuth() - err222 := argvalue1.Read(jsProt221) - if err222 != nil { - Usage() - return - } - value1 := argvalue1 - fmt.Print(client.TimResponseMessage(value0, value1)) - fmt.Print("\n") - break - case "timResponseMessageIq": - if flag.NArg()-1 != 3 { - fmt.Fprintln(os.Stderr, "TimResponseMessageIq requires 3 args") - flag.Usage() - } - arg223 := flag.Arg(1) - mbTrans224 := thrift.NewTMemoryBufferLen(len(arg223)) - defer mbTrans224.Close() - _, err225 := mbTrans224.WriteString(arg223) - if err225 != nil { - Usage() - return - } - factory226 := thrift.NewTSimpleJSONProtocolFactory() - jsProt227 := factory226.GetProtocol(mbTrans224) - argvalue0 := protocol.NewTimMessageIq() - err228 := argvalue0.Read(jsProt227) - if err228 != nil { - Usage() - return - } - value0 := argvalue0 - argvalue1 := flag.Arg(2) - value1 := argvalue1 - arg230 := flag.Arg(3) - mbTrans231 := thrift.NewTMemoryBufferLen(len(arg230)) - defer mbTrans231.Close() - _, err232 := mbTrans231.WriteString(arg230) - if err232 != nil { - Usage() - return - } - factory233 := thrift.NewTSimpleJSONProtocolFactory() - jsProt234 := factory233.GetProtocol(mbTrans231) - argvalue2 := protocol.NewTimAuth() - err235 := argvalue2.Read(jsProt234) - if err235 != nil { - Usage() - return - } - value2 := argvalue2 - fmt.Print(client.TimResponseMessageIq(value0, value1, value2)) - fmt.Print("\n") - break - case "timResponsePresenceList": - if flag.NArg()-1 != 2 { - fmt.Fprintln(os.Stderr, "TimResponsePresenceList requires 2 args") - flag.Usage() - } - arg236 := flag.Arg(1) - mbTrans237 := thrift.NewTMemoryBufferLen(len(arg236)) - defer mbTrans237.Close() - _, err238 := mbTrans237.WriteString(arg236) - if err238 != nil { - Usage() - return - } - factory239 := thrift.NewTSimpleJSONProtocolFactory() - jsProt240 := factory239.GetProtocol(mbTrans237) - argvalue0 := protocol.NewTimPBeanList() - err241 := argvalue0.Read(jsProt240) - if err241 != nil { - Usage() - return - } - value0 := argvalue0 - arg242 := flag.Arg(2) - mbTrans243 := thrift.NewTMemoryBufferLen(len(arg242)) - defer mbTrans243.Close() - _, err244 := mbTrans243.WriteString(arg242) - if err244 != nil { - Usage() - return - } - factory245 := thrift.NewTSimpleJSONProtocolFactory() - jsProt246 := factory245.GetProtocol(mbTrans243) - argvalue1 := protocol.NewTimAuth() - err247 := argvalue1.Read(jsProt246) - if err247 != nil { - Usage() - return - } - value1 := argvalue1 - fmt.Print(client.TimResponsePresenceList(value0, value1)) - fmt.Print("\n") - break - case "timResponseMessageList": - if flag.NArg()-1 != 2 { - fmt.Fprintln(os.Stderr, "TimResponseMessageList requires 2 args") - flag.Usage() - } - arg248 := flag.Arg(1) - mbTrans249 := thrift.NewTMemoryBufferLen(len(arg248)) - defer mbTrans249.Close() - _, err250 := mbTrans249.WriteString(arg248) - if err250 != nil { - Usage() - return - } - factory251 := thrift.NewTSimpleJSONProtocolFactory() - jsProt252 := factory251.GetProtocol(mbTrans249) - argvalue0 := protocol.NewTimMBeanList() - err253 := argvalue0.Read(jsProt252) - if err253 != nil { - Usage() - return - } - value0 := argvalue0 - arg254 := flag.Arg(2) - mbTrans255 := thrift.NewTMemoryBufferLen(len(arg254)) - defer mbTrans255.Close() - _, err256 := mbTrans255.WriteString(arg254) - if err256 != nil { - Usage() - return - } - factory257 := thrift.NewTSimpleJSONProtocolFactory() - jsProt258 := factory257.GetProtocol(mbTrans255) - argvalue1 := protocol.NewTimAuth() - err259 := argvalue1.Read(jsProt258) - if err259 != nil { - Usage() - return - } - value1 := argvalue1 - fmt.Print(client.TimResponseMessageList(value0, value1)) - fmt.Print("\n") - break - case "": - Usage() - break - default: - fmt.Fprintln(os.Stderr, "Invalid function ", cmd) - } +func main() { + flag.Usage = Usage + var host string + var port int + var protocol string + var urlString string + var framed bool + var useHttp bool + headers := make(httpHeaders) + var parsedUrl *url.URL + var trans thrift.TTransport + _ = strconv.Atoi + _ = math.Abs + flag.Usage = Usage + flag.StringVar(&host, "h", "localhost", "Specify host and port") + flag.IntVar(&port, "p", 9090, "Specify port") + flag.StringVar(&protocol, "P", "binary", "Specify the protocol (binary, compact, simplejson, json)") + flag.StringVar(&urlString, "u", "", "Specify the url") + flag.BoolVar(&framed, "framed", false, "Use framed transport") + flag.BoolVar(&useHttp, "http", false, "Use http") + flag.Var(headers, "H", "Headers to set on the http(s) request (e.g. -H \"Key: Value\")") + flag.Parse() + + if len(urlString) > 0 { + var err error + parsedUrl, err = url.Parse(urlString) + if err != nil { + fmt.Fprintln(os.Stderr, "Error parsing URL: ", err) + flag.Usage() + } + host = parsedUrl.Host + useHttp = len(parsedUrl.Scheme) <= 0 || parsedUrl.Scheme == "http" || parsedUrl.Scheme == "https" + } else if useHttp { + _, err := url.Parse(fmt.Sprint("http://", host, ":", port)) + if err != nil { + fmt.Fprintln(os.Stderr, "Error parsing URL: ", err) + flag.Usage() + } + } + + cmd := flag.Arg(0) + var err error + var cfg *thrift.TConfiguration = nil + if useHttp { + trans, err = thrift.NewTHttpClient(parsedUrl.String()) + if len(headers) > 0 { + httptrans := trans.(*thrift.THttpClient) + for key, value := range headers { + httptrans.SetHeader(key, value) + } + } + } else { + portStr := fmt.Sprint(port) + if strings.Contains(host, ":") { + host, portStr, err = net.SplitHostPort(host) + if err != nil { + fmt.Fprintln(os.Stderr, "error with host:", err) + os.Exit(1) + } + } + trans = thrift.NewTSocketConf(net.JoinHostPort(host, portStr), cfg) + if err != nil { + fmt.Fprintln(os.Stderr, "error resolving address:", err) + os.Exit(1) + } + if framed { + trans = thrift.NewTFramedTransportConf(trans, cfg) + } + } + if err != nil { + fmt.Fprintln(os.Stderr, "Error creating transport", err) + os.Exit(1) + } + defer trans.Close() + var protocolFactory thrift.TProtocolFactory + switch protocol { + case "compact": + protocolFactory = thrift.NewTCompactProtocolFactoryConf(cfg) + break + case "simplejson": + protocolFactory = thrift.NewTSimpleJSONProtocolFactoryConf(cfg) + break + case "json": + protocolFactory = thrift.NewTJSONProtocolFactory() + break + case "binary", "": + protocolFactory = thrift.NewTBinaryProtocolFactoryConf(cfg) + break + default: + fmt.Fprintln(os.Stderr, "Invalid protocol specified: ", protocol) + Usage() + os.Exit(1) + } + iprot := protocolFactory.GetProtocol(trans) + oprot := protocolFactory.GetProtocol(trans) + client := protocol.NewITimClient(thrift.NewTStandardClient(iprot, oprot)) + if err := trans.Open(); err != nil { + fmt.Fprintln(os.Stderr, "Error opening socket to ", host, ":", port, " ", err) + os.Exit(1) + } + + switch cmd { + case "timStream": + if flag.NArg() - 1 != 1 { + fmt.Fprintln(os.Stderr, "TimStream requires 1 args") + flag.Usage() + } + arg159 := flag.Arg(1) + mbTrans160 := thrift.NewTMemoryBufferLen(len(arg159)) + defer mbTrans160.Close() + _, err161 := mbTrans160.WriteString(arg159) + if err161 != nil { + Usage() + return + } + factory162 := thrift.NewTJSONProtocolFactory() + jsProt163 := factory162.GetProtocol(mbTrans160) + argvalue0 := protocol.NewTimParam() + err164 := argvalue0.Read(context.Background(), jsProt163) + if err164 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.TimStream(context.Background(), value0)) + fmt.Print("\n") + break + case "timStarttls": + if flag.NArg() - 1 != 0 { + fmt.Fprintln(os.Stderr, "TimStarttls requires 0 args") + flag.Usage() + } + fmt.Print(client.TimStarttls(context.Background())) + fmt.Print("\n") + break + case "timLogin": + if flag.NArg() - 1 != 2 { + fmt.Fprintln(os.Stderr, "TimLogin requires 2 args") + flag.Usage() + } + arg165 := flag.Arg(1) + mbTrans166 := thrift.NewTMemoryBufferLen(len(arg165)) + defer mbTrans166.Close() + _, err167 := mbTrans166.WriteString(arg165) + if err167 != nil { + Usage() + return + } + factory168 := thrift.NewTJSONProtocolFactory() + jsProt169 := factory168.GetProtocol(mbTrans166) + argvalue0 := protocol.NewTid() + err170 := argvalue0.Read(context.Background(), jsProt169) + if err170 != nil { + Usage() + return + } + value0 := argvalue0 + argvalue1 := flag.Arg(2) + value1 := argvalue1 + fmt.Print(client.TimLogin(context.Background(), value0, value1)) + fmt.Print("\n") + break + case "timAck": + if flag.NArg() - 1 != 1 { + fmt.Fprintln(os.Stderr, "TimAck requires 1 args") + flag.Usage() + } + arg172 := flag.Arg(1) + mbTrans173 := thrift.NewTMemoryBufferLen(len(arg172)) + defer mbTrans173.Close() + _, err174 := mbTrans173.WriteString(arg172) + if err174 != nil { + Usage() + return + } + factory175 := thrift.NewTJSONProtocolFactory() + jsProt176 := factory175.GetProtocol(mbTrans173) + argvalue0 := protocol.NewTimAckBean() + err177 := argvalue0.Read(context.Background(), jsProt176) + if err177 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.TimAck(context.Background(), value0)) + fmt.Print("\n") + break + case "timPresence": + if flag.NArg() - 1 != 1 { + fmt.Fprintln(os.Stderr, "TimPresence requires 1 args") + flag.Usage() + } + arg178 := flag.Arg(1) + mbTrans179 := thrift.NewTMemoryBufferLen(len(arg178)) + defer mbTrans179.Close() + _, err180 := mbTrans179.WriteString(arg178) + if err180 != nil { + Usage() + return + } + factory181 := thrift.NewTJSONProtocolFactory() + jsProt182 := factory181.GetProtocol(mbTrans179) + argvalue0 := protocol.NewTimPBean() + err183 := argvalue0.Read(context.Background(), jsProt182) + if err183 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.TimPresence(context.Background(), value0)) + fmt.Print("\n") + break + case "timMessage": + if flag.NArg() - 1 != 1 { + fmt.Fprintln(os.Stderr, "TimMessage requires 1 args") + flag.Usage() + } + arg184 := flag.Arg(1) + mbTrans185 := thrift.NewTMemoryBufferLen(len(arg184)) + defer mbTrans185.Close() + _, err186 := mbTrans185.WriteString(arg184) + if err186 != nil { + Usage() + return + } + factory187 := thrift.NewTJSONProtocolFactory() + jsProt188 := factory187.GetProtocol(mbTrans185) + argvalue0 := protocol.NewTimMBean() + err189 := argvalue0.Read(context.Background(), jsProt188) + if err189 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.TimMessage(context.Background(), value0)) + fmt.Print("\n") + break + case "timPing": + if flag.NArg() - 1 != 1 { + fmt.Fprintln(os.Stderr, "TimPing requires 1 args") + flag.Usage() + } + argvalue0 := flag.Arg(1) + value0 := argvalue0 + fmt.Print(client.TimPing(context.Background(), value0)) + fmt.Print("\n") + break + case "timError": + if flag.NArg() - 1 != 1 { + fmt.Fprintln(os.Stderr, "TimError requires 1 args") + flag.Usage() + } + arg191 := flag.Arg(1) + mbTrans192 := thrift.NewTMemoryBufferLen(len(arg191)) + defer mbTrans192.Close() + _, err193 := mbTrans192.WriteString(arg191) + if err193 != nil { + Usage() + return + } + factory194 := thrift.NewTJSONProtocolFactory() + jsProt195 := factory194.GetProtocol(mbTrans192) + argvalue0 := protocol.NewTimError() + err196 := argvalue0.Read(context.Background(), jsProt195) + if err196 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.TimError(context.Background(), value0)) + fmt.Print("\n") + break + case "timLogout": + if flag.NArg() - 1 != 0 { + fmt.Fprintln(os.Stderr, "TimLogout requires 0 args") + flag.Usage() + } + fmt.Print(client.TimLogout(context.Background())) + fmt.Print("\n") + break + case "timRegist": + if flag.NArg() - 1 != 2 { + fmt.Fprintln(os.Stderr, "TimRegist requires 2 args") + flag.Usage() + } + arg197 := flag.Arg(1) + mbTrans198 := thrift.NewTMemoryBufferLen(len(arg197)) + defer mbTrans198.Close() + _, err199 := mbTrans198.WriteString(arg197) + if err199 != nil { + Usage() + return + } + factory200 := thrift.NewTJSONProtocolFactory() + jsProt201 := factory200.GetProtocol(mbTrans198) + argvalue0 := protocol.NewTid() + err202 := argvalue0.Read(context.Background(), jsProt201) + if err202 != nil { + Usage() + return + } + value0 := argvalue0 + argvalue1 := flag.Arg(2) + value1 := argvalue1 + fmt.Print(client.TimRegist(context.Background(), value0, value1)) + fmt.Print("\n") + break + case "timRoser": + if flag.NArg() - 1 != 1 { + fmt.Fprintln(os.Stderr, "TimRoser requires 1 args") + flag.Usage() + } + arg204 := flag.Arg(1) + mbTrans205 := thrift.NewTMemoryBufferLen(len(arg204)) + defer mbTrans205.Close() + _, err206 := mbTrans205.WriteString(arg204) + if err206 != nil { + Usage() + return + } + factory207 := thrift.NewTJSONProtocolFactory() + jsProt208 := factory207.GetProtocol(mbTrans205) + argvalue0 := protocol.NewTimRoster() + err209 := argvalue0.Read(context.Background(), jsProt208) + if err209 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.TimRoser(context.Background(), value0)) + fmt.Print("\n") + break + case "timMessageList": + if flag.NArg() - 1 != 1 { + fmt.Fprintln(os.Stderr, "TimMessageList requires 1 args") + flag.Usage() + } + arg210 := flag.Arg(1) + mbTrans211 := thrift.NewTMemoryBufferLen(len(arg210)) + defer mbTrans211.Close() + _, err212 := mbTrans211.WriteString(arg210) + if err212 != nil { + Usage() + return + } + factory213 := thrift.NewTJSONProtocolFactory() + jsProt214 := factory213.GetProtocol(mbTrans211) + argvalue0 := protocol.NewTimMBeanList() + err215 := argvalue0.Read(context.Background(), jsProt214) + if err215 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.TimMessageList(context.Background(), value0)) + fmt.Print("\n") + break + case "timPresenceList": + if flag.NArg() - 1 != 1 { + fmt.Fprintln(os.Stderr, "TimPresenceList requires 1 args") + flag.Usage() + } + arg216 := flag.Arg(1) + mbTrans217 := thrift.NewTMemoryBufferLen(len(arg216)) + defer mbTrans217.Close() + _, err218 := mbTrans217.WriteString(arg216) + if err218 != nil { + Usage() + return + } + factory219 := thrift.NewTJSONProtocolFactory() + jsProt220 := factory219.GetProtocol(mbTrans217) + argvalue0 := protocol.NewTimPBeanList() + err221 := argvalue0.Read(context.Background(), jsProt220) + if err221 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.TimPresenceList(context.Background(), value0)) + fmt.Print("\n") + break + case "timMessageIq": + if flag.NArg() - 1 != 2 { + fmt.Fprintln(os.Stderr, "TimMessageIq requires 2 args") + flag.Usage() + } + arg222 := flag.Arg(1) + mbTrans223 := thrift.NewTMemoryBufferLen(len(arg222)) + defer mbTrans223.Close() + _, err224 := mbTrans223.WriteString(arg222) + if err224 != nil { + Usage() + return + } + factory225 := thrift.NewTJSONProtocolFactory() + jsProt226 := factory225.GetProtocol(mbTrans223) + argvalue0 := protocol.NewTimMessageIq() + err227 := argvalue0.Read(context.Background(), jsProt226) + if err227 != nil { + Usage() + return + } + value0 := argvalue0 + argvalue1 := flag.Arg(2) + value1 := argvalue1 + fmt.Print(client.TimMessageIq(context.Background(), value0, value1)) + fmt.Print("\n") + break + case "timMessageResult": + if flag.NArg() - 1 != 1 { + fmt.Fprintln(os.Stderr, "TimMessageResult_ requires 1 args") + flag.Usage() + } + arg229 := flag.Arg(1) + mbTrans230 := thrift.NewTMemoryBufferLen(len(arg229)) + defer mbTrans230.Close() + _, err231 := mbTrans230.WriteString(arg229) + if err231 != nil { + Usage() + return + } + factory232 := thrift.NewTJSONProtocolFactory() + jsProt233 := factory232.GetProtocol(mbTrans230) + argvalue0 := protocol.NewTimMBean() + err234 := argvalue0.Read(context.Background(), jsProt233) + if err234 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.TimMessageResult_(context.Background(), value0)) + fmt.Print("\n") + break + case "timProperty": + if flag.NArg() - 1 != 1 { + fmt.Fprintln(os.Stderr, "TimProperty requires 1 args") + flag.Usage() + } + arg235 := flag.Arg(1) + mbTrans236 := thrift.NewTMemoryBufferLen(len(arg235)) + defer mbTrans236.Close() + _, err237 := mbTrans236.WriteString(arg235) + if err237 != nil { + Usage() + return + } + factory238 := thrift.NewTJSONProtocolFactory() + jsProt239 := factory238.GetProtocol(mbTrans236) + argvalue0 := protocol.NewTimPropertyBean() + err240 := argvalue0.Read(context.Background(), jsProt239) + if err240 != nil { + Usage() + return + } + value0 := argvalue0 + fmt.Print(client.TimProperty(context.Background(), value0)) + fmt.Print("\n") + break + case "timRemoteUserAuth": + if flag.NArg() - 1 != 3 { + fmt.Fprintln(os.Stderr, "TimRemoteUserAuth requires 3 args") + flag.Usage() + } + arg241 := flag.Arg(1) + mbTrans242 := thrift.NewTMemoryBufferLen(len(arg241)) + defer mbTrans242.Close() + _, err243 := mbTrans242.WriteString(arg241) + if err243 != nil { + Usage() + return + } + factory244 := thrift.NewTJSONProtocolFactory() + jsProt245 := factory244.GetProtocol(mbTrans242) + argvalue0 := protocol.NewTid() + err246 := argvalue0.Read(context.Background(), jsProt245) + if err246 != nil { + Usage() + return + } + value0 := argvalue0 + argvalue1 := flag.Arg(2) + value1 := argvalue1 + arg248 := flag.Arg(3) + mbTrans249 := thrift.NewTMemoryBufferLen(len(arg248)) + defer mbTrans249.Close() + _, err250 := mbTrans249.WriteString(arg248) + if err250 != nil { + Usage() + return + } + factory251 := thrift.NewTJSONProtocolFactory() + jsProt252 := factory251.GetProtocol(mbTrans249) + argvalue2 := protocol.NewTimAuth() + err253 := argvalue2.Read(context.Background(), jsProt252) + if err253 != nil { + Usage() + return + } + value2 := argvalue2 + fmt.Print(client.TimRemoteUserAuth(context.Background(), value0, value1, value2)) + fmt.Print("\n") + break + case "timRemoteUserGet": + if flag.NArg() - 1 != 2 { + fmt.Fprintln(os.Stderr, "TimRemoteUserGet requires 2 args") + flag.Usage() + } + arg254 := flag.Arg(1) + mbTrans255 := thrift.NewTMemoryBufferLen(len(arg254)) + defer mbTrans255.Close() + _, err256 := mbTrans255.WriteString(arg254) + if err256 != nil { + Usage() + return + } + factory257 := thrift.NewTJSONProtocolFactory() + jsProt258 := factory257.GetProtocol(mbTrans255) + argvalue0 := protocol.NewTid() + err259 := argvalue0.Read(context.Background(), jsProt258) + if err259 != nil { + Usage() + return + } + value0 := argvalue0 + arg260 := flag.Arg(2) + mbTrans261 := thrift.NewTMemoryBufferLen(len(arg260)) + defer mbTrans261.Close() + _, err262 := mbTrans261.WriteString(arg260) + if err262 != nil { + Usage() + return + } + factory263 := thrift.NewTJSONProtocolFactory() + jsProt264 := factory263.GetProtocol(mbTrans261) + argvalue1 := protocol.NewTimAuth() + err265 := argvalue1.Read(context.Background(), jsProt264) + if err265 != nil { + Usage() + return + } + value1 := argvalue1 + fmt.Print(client.TimRemoteUserGet(context.Background(), value0, value1)) + fmt.Print("\n") + break + case "timRemoteUserEdit": + if flag.NArg() - 1 != 3 { + fmt.Fprintln(os.Stderr, "TimRemoteUserEdit requires 3 args") + flag.Usage() + } + arg266 := flag.Arg(1) + mbTrans267 := thrift.NewTMemoryBufferLen(len(arg266)) + defer mbTrans267.Close() + _, err268 := mbTrans267.WriteString(arg266) + if err268 != nil { + Usage() + return + } + factory269 := thrift.NewTJSONProtocolFactory() + jsProt270 := factory269.GetProtocol(mbTrans267) + argvalue0 := protocol.NewTid() + err271 := argvalue0.Read(context.Background(), jsProt270) + if err271 != nil { + Usage() + return + } + value0 := argvalue0 + arg272 := flag.Arg(2) + mbTrans273 := thrift.NewTMemoryBufferLen(len(arg272)) + defer mbTrans273.Close() + _, err274 := mbTrans273.WriteString(arg272) + if err274 != nil { + Usage() + return + } + factory275 := thrift.NewTJSONProtocolFactory() + jsProt276 := factory275.GetProtocol(mbTrans273) + argvalue1 := protocol.NewTimUserBean() + err277 := argvalue1.Read(context.Background(), jsProt276) + if err277 != nil { + Usage() + return + } + value1 := argvalue1 + arg278 := flag.Arg(3) + mbTrans279 := thrift.NewTMemoryBufferLen(len(arg278)) + defer mbTrans279.Close() + _, err280 := mbTrans279.WriteString(arg278) + if err280 != nil { + Usage() + return + } + factory281 := thrift.NewTJSONProtocolFactory() + jsProt282 := factory281.GetProtocol(mbTrans279) + argvalue2 := protocol.NewTimAuth() + err283 := argvalue2.Read(context.Background(), jsProt282) + if err283 != nil { + Usage() + return + } + value2 := argvalue2 + fmt.Print(client.TimRemoteUserEdit(context.Background(), value0, value1, value2)) + fmt.Print("\n") + break + case "timResponsePresence": + if flag.NArg() - 1 != 2 { + fmt.Fprintln(os.Stderr, "TimResponsePresence requires 2 args") + flag.Usage() + } + arg284 := flag.Arg(1) + mbTrans285 := thrift.NewTMemoryBufferLen(len(arg284)) + defer mbTrans285.Close() + _, err286 := mbTrans285.WriteString(arg284) + if err286 != nil { + Usage() + return + } + factory287 := thrift.NewTJSONProtocolFactory() + jsProt288 := factory287.GetProtocol(mbTrans285) + argvalue0 := protocol.NewTimPBean() + err289 := argvalue0.Read(context.Background(), jsProt288) + if err289 != nil { + Usage() + return + } + value0 := argvalue0 + arg290 := flag.Arg(2) + mbTrans291 := thrift.NewTMemoryBufferLen(len(arg290)) + defer mbTrans291.Close() + _, err292 := mbTrans291.WriteString(arg290) + if err292 != nil { + Usage() + return + } + factory293 := thrift.NewTJSONProtocolFactory() + jsProt294 := factory293.GetProtocol(mbTrans291) + argvalue1 := protocol.NewTimAuth() + err295 := argvalue1.Read(context.Background(), jsProt294) + if err295 != nil { + Usage() + return + } + value1 := argvalue1 + fmt.Print(client.TimResponsePresence(context.Background(), value0, value1)) + fmt.Print("\n") + break + case "timResponseMessage": + if flag.NArg() - 1 != 2 { + fmt.Fprintln(os.Stderr, "TimResponseMessage requires 2 args") + flag.Usage() + } + arg296 := flag.Arg(1) + mbTrans297 := thrift.NewTMemoryBufferLen(len(arg296)) + defer mbTrans297.Close() + _, err298 := mbTrans297.WriteString(arg296) + if err298 != nil { + Usage() + return + } + factory299 := thrift.NewTJSONProtocolFactory() + jsProt300 := factory299.GetProtocol(mbTrans297) + argvalue0 := protocol.NewTimMBean() + err301 := argvalue0.Read(context.Background(), jsProt300) + if err301 != nil { + Usage() + return + } + value0 := argvalue0 + arg302 := flag.Arg(2) + mbTrans303 := thrift.NewTMemoryBufferLen(len(arg302)) + defer mbTrans303.Close() + _, err304 := mbTrans303.WriteString(arg302) + if err304 != nil { + Usage() + return + } + factory305 := thrift.NewTJSONProtocolFactory() + jsProt306 := factory305.GetProtocol(mbTrans303) + argvalue1 := protocol.NewTimAuth() + err307 := argvalue1.Read(context.Background(), jsProt306) + if err307 != nil { + Usage() + return + } + value1 := argvalue1 + fmt.Print(client.TimResponseMessage(context.Background(), value0, value1)) + fmt.Print("\n") + break + case "timResponseMessageIq": + if flag.NArg() - 1 != 3 { + fmt.Fprintln(os.Stderr, "TimResponseMessageIq requires 3 args") + flag.Usage() + } + arg308 := flag.Arg(1) + mbTrans309 := thrift.NewTMemoryBufferLen(len(arg308)) + defer mbTrans309.Close() + _, err310 := mbTrans309.WriteString(arg308) + if err310 != nil { + Usage() + return + } + factory311 := thrift.NewTJSONProtocolFactory() + jsProt312 := factory311.GetProtocol(mbTrans309) + argvalue0 := protocol.NewTimMessageIq() + err313 := argvalue0.Read(context.Background(), jsProt312) + if err313 != nil { + Usage() + return + } + value0 := argvalue0 + argvalue1 := flag.Arg(2) + value1 := argvalue1 + arg315 := flag.Arg(3) + mbTrans316 := thrift.NewTMemoryBufferLen(len(arg315)) + defer mbTrans316.Close() + _, err317 := mbTrans316.WriteString(arg315) + if err317 != nil { + Usage() + return + } + factory318 := thrift.NewTJSONProtocolFactory() + jsProt319 := factory318.GetProtocol(mbTrans316) + argvalue2 := protocol.NewTimAuth() + err320 := argvalue2.Read(context.Background(), jsProt319) + if err320 != nil { + Usage() + return + } + value2 := argvalue2 + fmt.Print(client.TimResponseMessageIq(context.Background(), value0, value1, value2)) + fmt.Print("\n") + break + case "timResponsePresenceList": + if flag.NArg() - 1 != 2 { + fmt.Fprintln(os.Stderr, "TimResponsePresenceList requires 2 args") + flag.Usage() + } + arg321 := flag.Arg(1) + mbTrans322 := thrift.NewTMemoryBufferLen(len(arg321)) + defer mbTrans322.Close() + _, err323 := mbTrans322.WriteString(arg321) + if err323 != nil { + Usage() + return + } + factory324 := thrift.NewTJSONProtocolFactory() + jsProt325 := factory324.GetProtocol(mbTrans322) + argvalue0 := protocol.NewTimPBeanList() + err326 := argvalue0.Read(context.Background(), jsProt325) + if err326 != nil { + Usage() + return + } + value0 := argvalue0 + arg327 := flag.Arg(2) + mbTrans328 := thrift.NewTMemoryBufferLen(len(arg327)) + defer mbTrans328.Close() + _, err329 := mbTrans328.WriteString(arg327) + if err329 != nil { + Usage() + return + } + factory330 := thrift.NewTJSONProtocolFactory() + jsProt331 := factory330.GetProtocol(mbTrans328) + argvalue1 := protocol.NewTimAuth() + err332 := argvalue1.Read(context.Background(), jsProt331) + if err332 != nil { + Usage() + return + } + value1 := argvalue1 + fmt.Print(client.TimResponsePresenceList(context.Background(), value0, value1)) + fmt.Print("\n") + break + case "timResponseMessageList": + if flag.NArg() - 1 != 2 { + fmt.Fprintln(os.Stderr, "TimResponseMessageList requires 2 args") + flag.Usage() + } + arg333 := flag.Arg(1) + mbTrans334 := thrift.NewTMemoryBufferLen(len(arg333)) + defer mbTrans334.Close() + _, err335 := mbTrans334.WriteString(arg333) + if err335 != nil { + Usage() + return + } + factory336 := thrift.NewTJSONProtocolFactory() + jsProt337 := factory336.GetProtocol(mbTrans334) + argvalue0 := protocol.NewTimMBeanList() + err338 := argvalue0.Read(context.Background(), jsProt337) + if err338 != nil { + Usage() + return + } + value0 := argvalue0 + arg339 := flag.Arg(2) + mbTrans340 := thrift.NewTMemoryBufferLen(len(arg339)) + defer mbTrans340.Close() + _, err341 := mbTrans340.WriteString(arg339) + if err341 != nil { + Usage() + return + } + factory342 := thrift.NewTJSONProtocolFactory() + jsProt343 := factory342.GetProtocol(mbTrans340) + argvalue1 := protocol.NewTimAuth() + err344 := argvalue1.Read(context.Background(), jsProt343) + if err344 != nil { + Usage() + return + } + value1 := argvalue1 + fmt.Print(client.TimResponseMessageList(context.Background(), value0, value1)) + fmt.Print("\n") + break + case "": + Usage() + break + default: + fmt.Fprintln(os.Stderr, "Invalid function ", cmd) + } } diff --git a/protocols/gen-go/protocol/itim.go b/protocols/gen-go/protocol/itim.go deleted file mode 100644 index f7e4c8a..0000000 --- a/protocols/gen-go/protocol/itim.go +++ /dev/null @@ -1,5753 +0,0 @@ -// Autogenerated by Thrift Compiler (0.9.3) -// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - -package protocol - -import ( - "bytes" - "fmt" - "git.apache.org/thrift.git/lib/go/thrift" -) - -// (needed to ensure safety because of naive import list construction.) -var _ = thrift.ZERO -var _ = fmt.Printf -var _ = bytes.Equal - -type ITim interface { - // 流程开始 - // - // Parameters: - // - Param - TimStream(param *TimParam) (err error) - // tls协议 - TimStarttls() (err error) - // 登陆协议 - // - // Parameters: - // - Tid - // - Pwd - TimLogin(tid *Tid, pwd string) (err error) - // 回执信息 - // - // Parameters: - // - Ab - TimAck(ab *TimAckBean) (err error) - // 广播出席协议或接收广播协议 - // - // Parameters: - // - Pbean - TimPresence(pbean *TimPBean) (err error) - // 发送信息或接收信息 - // - // Parameters: - // - Mbean - TimMessage(mbean *TimMBean) (err error) - // ping 心跳协议 - // - // Parameters: - // - ThreadId - TimPing(threadId string) (err error) - // 错误通知 - // - // Parameters: - // - E - TimError(e *TimError) (err error) - // 登出协议 - TimLogout() (err error) - // 注册协议 - // - // Parameters: - // - Tid - // - Auth - TimRegist(tid *Tid, auth string) (err error) - // 花名册 - // - // Parameters: - // - Roster - TimRoser(roster *TimRoster) (err error) - // 发送信息或接收信息列表(合流) - // - // Parameters: - // - MbeanList - TimMessageList(mbeanList *TimMBeanList) (err error) - // 发送状态信息列表(合流) - // - // Parameters: - // - PbeanList - TimPresenceList(pbeanList *TimPBeanList) (err error) - // 信息请求 get请求数据 del删除 - // - // Parameters: - // - TimMsgIq - // - IqType - TimMessageIq(timMsgIq *TimMessageIq, iqType string) (err error) - // 信息请求 - // - // Parameters: - // - Mbean - TimMessageResult_(mbean *TimMBean) (err error) - // 用户协议属性请求 - // - // Parameters: - // - Tpb - TimProperty(tpb *TimPropertyBean) (err error) - // 请求远程验证信息 - // - // Parameters: - // - Tid - // - Pwd - // - Auth - TimRemoteUserAuth(tid *Tid, pwd string, auth *TimAuth) (r *TimRemoteUserBean, err error) - // 请求远程用户信息 - // - // Parameters: - // - Tid - // - Auth - TimRemoteUserGet(tid *Tid, auth *TimAuth) (r *TimRemoteUserBean, err error) - // 编辑远程用户信息 - // - // Parameters: - // - Tid - // - Ub - // - Auth - TimRemoteUserEdit(tid *Tid, ub *TimUserBean, auth *TimAuth) (r *TimRemoteUserBean, err error) - // 广播出席协议或接收广播协议 - // - // Parameters: - // - Pbean - // - Auth - TimResponsePresence(pbean *TimPBean, auth *TimAuth) (r *TimResponseBean, err error) - // 发送信息或接收信息 - // - // Parameters: - // - Mbean - // - Auth - TimResponseMessage(mbean *TimMBean, auth *TimAuth) (r *TimResponseBean, err error) - // 信息请求 get请求数据 del删除(辅助接口) - // - // Parameters: - // - TimMsgIq - // - IqType - // - Auth - TimResponseMessageIq(timMsgIq *TimMessageIq, iqType string, auth *TimAuth) (r *TimMBeanList, err error) - // 广播出席协议或接收广播协议 - // - // Parameters: - // - PbeanList - // - Auth - TimResponsePresenceList(pbeanList *TimPBeanList, auth *TimAuth) (r *TimResponseBean, err error) - // 发送信息或接收信息 - // - // Parameters: - // - MbeanList - // - Auth - TimResponseMessageList(mbeanList *TimMBeanList, auth *TimAuth) (r *TimResponseBean, err error) -} - -type ITimClient struct { - Transport thrift.TTransport - ProtocolFactory thrift.TProtocolFactory - InputProtocol thrift.TProtocol - OutputProtocol thrift.TProtocol - SeqId int32 -} - -func NewITimClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *ITimClient { - return &ITimClient{Transport: t, - ProtocolFactory: f, - InputProtocol: f.GetProtocol(t), - OutputProtocol: f.GetProtocol(t), - SeqId: 0, - } -} - -func NewITimClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *ITimClient { - return &ITimClient{Transport: t, - ProtocolFactory: nil, - InputProtocol: iprot, - OutputProtocol: oprot, - SeqId: 0, - } -} - -// 流程开始 -// -// Parameters: -// - Param -func (p *ITimClient) TimStream(param *TimParam) (err error) { - if err = p.sendTimStream(param); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimStream(param *TimParam) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timStream", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimStreamArgs{ - Param: param, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// tls协议 -func (p *ITimClient) TimStarttls() (err error) { - if err = p.sendTimStarttls(); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimStarttls() (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timStarttls", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimStarttlsArgs{} - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 登陆协议 -// -// Parameters: -// - Tid -// - Pwd -func (p *ITimClient) TimLogin(tid *Tid, pwd string) (err error) { - if err = p.sendTimLogin(tid, pwd); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimLogin(tid *Tid, pwd string) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timLogin", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimLoginArgs{ - Tid: tid, - Pwd: pwd, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 回执信息 -// -// Parameters: -// - Ab -func (p *ITimClient) TimAck(ab *TimAckBean) (err error) { - if err = p.sendTimAck(ab); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimAck(ab *TimAckBean) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timAck", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimAckArgs{ - Ab: ab, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 广播出席协议或接收广播协议 -// -// Parameters: -// - Pbean -func (p *ITimClient) TimPresence(pbean *TimPBean) (err error) { - if err = p.sendTimPresence(pbean); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimPresence(pbean *TimPBean) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timPresence", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimPresenceArgs{ - Pbean: pbean, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 发送信息或接收信息 -// -// Parameters: -// - Mbean -func (p *ITimClient) TimMessage(mbean *TimMBean) (err error) { - if err = p.sendTimMessage(mbean); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimMessage(mbean *TimMBean) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timMessage", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimMessageArgs{ - Mbean: mbean, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// ping 心跳协议 -// -// Parameters: -// - ThreadId -func (p *ITimClient) TimPing(threadId string) (err error) { - if err = p.sendTimPing(threadId); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimPing(threadId string) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timPing", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimPingArgs{ - ThreadId: threadId, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 错误通知 -// -// Parameters: -// - E -func (p *ITimClient) TimError(e *TimError) (err error) { - if err = p.sendTimError(e); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimError(e *TimError) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timError", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimErrorArgs{ - E: e, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 登出协议 -func (p *ITimClient) TimLogout() (err error) { - if err = p.sendTimLogout(); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimLogout() (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timLogout", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimLogoutArgs{} - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 注册协议 -// -// Parameters: -// - Tid -// - Auth -func (p *ITimClient) TimRegist(tid *Tid, auth string) (err error) { - if err = p.sendTimRegist(tid, auth); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimRegist(tid *Tid, auth string) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timRegist", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimRegistArgs{ - Tid: tid, - Auth: auth, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 花名册 -// -// Parameters: -// - Roster -func (p *ITimClient) TimRoser(roster *TimRoster) (err error) { - if err = p.sendTimRoser(roster); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimRoser(roster *TimRoster) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timRoser", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimRoserArgs{ - Roster: roster, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 发送信息或接收信息列表(合流) -// -// Parameters: -// - MbeanList -func (p *ITimClient) TimMessageList(mbeanList *TimMBeanList) (err error) { - if err = p.sendTimMessageList(mbeanList); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimMessageList(mbeanList *TimMBeanList) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timMessageList", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimMessageListArgs{ - MbeanList: mbeanList, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 发送状态信息列表(合流) -// -// Parameters: -// - PbeanList -func (p *ITimClient) TimPresenceList(pbeanList *TimPBeanList) (err error) { - if err = p.sendTimPresenceList(pbeanList); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimPresenceList(pbeanList *TimPBeanList) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timPresenceList", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimPresenceListArgs{ - PbeanList: pbeanList, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 信息请求 get请求数据 del删除 -// -// Parameters: -// - TimMsgIq -// - IqType -func (p *ITimClient) TimMessageIq(timMsgIq *TimMessageIq, iqType string) (err error) { - if err = p.sendTimMessageIq(timMsgIq, iqType); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimMessageIq(timMsgIq *TimMessageIq, iqType string) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timMessageIq", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimMessageIqArgs{ - TimMsgIq: timMsgIq, - IqType: iqType, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 信息请求 -// -// Parameters: -// - Mbean -func (p *ITimClient) TimMessageResult_(mbean *TimMBean) (err error) { - if err = p.sendTimMessageResult_(mbean); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimMessageResult_(mbean *TimMBean) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timMessageResult", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimMessageResultArgs{ - Mbean: mbean, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 用户协议属性请求 -// -// Parameters: -// - Tpb -func (p *ITimClient) TimProperty(tpb *TimPropertyBean) (err error) { - if err = p.sendTimProperty(tpb); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimProperty(tpb *TimPropertyBean) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timProperty", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimPropertyArgs{ - Tpb: tpb, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 请求远程验证信息 -// -// Parameters: -// - Tid -// - Pwd -// - Auth -func (p *ITimClient) TimRemoteUserAuth(tid *Tid, pwd string, auth *TimAuth) (r *TimRemoteUserBean, err error) { - if err = p.sendTimRemoteUserAuth(tid, pwd, auth); err != nil { - return - } - return p.recvTimRemoteUserAuth() -} - -func (p *ITimClient) sendTimRemoteUserAuth(tid *Tid, pwd string, auth *TimAuth) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timRemoteUserAuth", thrift.CALL, p.SeqId); err != nil { - return - } - args := ITimTimRemoteUserAuthArgs{ - Tid: tid, - Pwd: pwd, - Auth: auth, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *ITimClient) recvTimRemoteUserAuth() (value *TimRemoteUserBean, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "timRemoteUserAuth" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "timRemoteUserAuth failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "timRemoteUserAuth failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error56 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error57 error - error57, err = error56.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error57 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "timRemoteUserAuth failed: invalid message type") - return - } - result := ITimTimRemoteUserAuthResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - value = result.GetSuccess() - return -} - -// 请求远程用户信息 -// -// Parameters: -// - Tid -// - Auth -func (p *ITimClient) TimRemoteUserGet(tid *Tid, auth *TimAuth) (r *TimRemoteUserBean, err error) { - if err = p.sendTimRemoteUserGet(tid, auth); err != nil { - return - } - return p.recvTimRemoteUserGet() -} - -func (p *ITimClient) sendTimRemoteUserGet(tid *Tid, auth *TimAuth) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timRemoteUserGet", thrift.CALL, p.SeqId); err != nil { - return - } - args := ITimTimRemoteUserGetArgs{ - Tid: tid, - Auth: auth, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *ITimClient) recvTimRemoteUserGet() (value *TimRemoteUserBean, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "timRemoteUserGet" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "timRemoteUserGet failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "timRemoteUserGet failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error58 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error59 error - error59, err = error58.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error59 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "timRemoteUserGet failed: invalid message type") - return - } - result := ITimTimRemoteUserGetResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - value = result.GetSuccess() - return -} - -// 编辑远程用户信息 -// -// Parameters: -// - Tid -// - Ub -// - Auth -func (p *ITimClient) TimRemoteUserEdit(tid *Tid, ub *TimUserBean, auth *TimAuth) (r *TimRemoteUserBean, err error) { - if err = p.sendTimRemoteUserEdit(tid, ub, auth); err != nil { - return - } - return p.recvTimRemoteUserEdit() -} - -func (p *ITimClient) sendTimRemoteUserEdit(tid *Tid, ub *TimUserBean, auth *TimAuth) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timRemoteUserEdit", thrift.CALL, p.SeqId); err != nil { - return - } - args := ITimTimRemoteUserEditArgs{ - Tid: tid, - Ub: ub, - Auth: auth, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *ITimClient) recvTimRemoteUserEdit() (value *TimRemoteUserBean, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "timRemoteUserEdit" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "timRemoteUserEdit failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "timRemoteUserEdit failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error60 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error61 error - error61, err = error60.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error61 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "timRemoteUserEdit failed: invalid message type") - return - } - result := ITimTimRemoteUserEditResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - value = result.GetSuccess() - return -} - -// 广播出席协议或接收广播协议 -// -// Parameters: -// - Pbean -// - Auth -func (p *ITimClient) TimResponsePresence(pbean *TimPBean, auth *TimAuth) (r *TimResponseBean, err error) { - if err = p.sendTimResponsePresence(pbean, auth); err != nil { - return - } - return p.recvTimResponsePresence() -} - -func (p *ITimClient) sendTimResponsePresence(pbean *TimPBean, auth *TimAuth) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timResponsePresence", thrift.CALL, p.SeqId); err != nil { - return - } - args := ITimTimResponsePresenceArgs{ - Pbean: pbean, - Auth: auth, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *ITimClient) recvTimResponsePresence() (value *TimResponseBean, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "timResponsePresence" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "timResponsePresence failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "timResponsePresence failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error62 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error63 error - error63, err = error62.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error63 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "timResponsePresence failed: invalid message type") - return - } - result := ITimTimResponsePresenceResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - value = result.GetSuccess() - return -} - -// 发送信息或接收信息 -// -// Parameters: -// - Mbean -// - Auth -func (p *ITimClient) TimResponseMessage(mbean *TimMBean, auth *TimAuth) (r *TimResponseBean, err error) { - if err = p.sendTimResponseMessage(mbean, auth); err != nil { - return - } - return p.recvTimResponseMessage() -} - -func (p *ITimClient) sendTimResponseMessage(mbean *TimMBean, auth *TimAuth) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timResponseMessage", thrift.CALL, p.SeqId); err != nil { - return - } - args := ITimTimResponseMessageArgs{ - Mbean: mbean, - Auth: auth, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *ITimClient) recvTimResponseMessage() (value *TimResponseBean, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "timResponseMessage" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "timResponseMessage failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "timResponseMessage failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error64 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error65 error - error65, err = error64.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error65 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "timResponseMessage failed: invalid message type") - return - } - result := ITimTimResponseMessageResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - value = result.GetSuccess() - return -} - -// 信息请求 get请求数据 del删除(辅助接口) -// -// Parameters: -// - TimMsgIq -// - IqType -// - Auth -func (p *ITimClient) TimResponseMessageIq(timMsgIq *TimMessageIq, iqType string, auth *TimAuth) (r *TimMBeanList, err error) { - if err = p.sendTimResponseMessageIq(timMsgIq, iqType, auth); err != nil { - return - } - return p.recvTimResponseMessageIq() -} - -func (p *ITimClient) sendTimResponseMessageIq(timMsgIq *TimMessageIq, iqType string, auth *TimAuth) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timResponseMessageIq", thrift.CALL, p.SeqId); err != nil { - return - } - args := ITimTimResponseMessageIqArgs{ - TimMsgIq: timMsgIq, - IqType: iqType, - Auth: auth, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *ITimClient) recvTimResponseMessageIq() (value *TimMBeanList, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "timResponseMessageIq" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "timResponseMessageIq failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "timResponseMessageIq failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error66 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error67 error - error67, err = error66.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error67 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "timResponseMessageIq failed: invalid message type") - return - } - result := ITimTimResponseMessageIqResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - value = result.GetSuccess() - return -} - -// 广播出席协议或接收广播协议 -// -// Parameters: -// - PbeanList -// - Auth -func (p *ITimClient) TimResponsePresenceList(pbeanList *TimPBeanList, auth *TimAuth) (r *TimResponseBean, err error) { - if err = p.sendTimResponsePresenceList(pbeanList, auth); err != nil { - return - } - return p.recvTimResponsePresenceList() -} - -func (p *ITimClient) sendTimResponsePresenceList(pbeanList *TimPBeanList, auth *TimAuth) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timResponsePresenceList", thrift.CALL, p.SeqId); err != nil { - return - } - args := ITimTimResponsePresenceListArgs{ - PbeanList: pbeanList, - Auth: auth, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *ITimClient) recvTimResponsePresenceList() (value *TimResponseBean, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "timResponsePresenceList" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "timResponsePresenceList failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "timResponsePresenceList failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error68 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error69 error - error69, err = error68.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error69 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "timResponsePresenceList failed: invalid message type") - return - } - result := ITimTimResponsePresenceListResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - value = result.GetSuccess() - return -} - -// 发送信息或接收信息 -// -// Parameters: -// - MbeanList -// - Auth -func (p *ITimClient) TimResponseMessageList(mbeanList *TimMBeanList, auth *TimAuth) (r *TimResponseBean, err error) { - if err = p.sendTimResponseMessageList(mbeanList, auth); err != nil { - return - } - return p.recvTimResponseMessageList() -} - -func (p *ITimClient) sendTimResponseMessageList(mbeanList *TimMBeanList, auth *TimAuth) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timResponseMessageList", thrift.CALL, p.SeqId); err != nil { - return - } - args := ITimTimResponseMessageListArgs{ - MbeanList: mbeanList, - Auth: auth, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *ITimClient) recvTimResponseMessageList() (value *TimResponseBean, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "timResponseMessageList" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "timResponseMessageList failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "timResponseMessageList failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error70 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error71 error - error71, err = error70.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error71 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "timResponseMessageList failed: invalid message type") - return - } - result := ITimTimResponseMessageListResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - value = result.GetSuccess() - return -} - -type ITimProcessor struct { - processorMap map[string]thrift.TProcessorFunction - handler ITim -} - -func (p *ITimProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction) { - p.processorMap[key] = processor -} - -func (p *ITimProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool) { - processor, ok = p.processorMap[key] - return processor, ok -} - -func (p *ITimProcessor) ProcessorMap() map[string]thrift.TProcessorFunction { - return p.processorMap -} - -func NewITimProcessor(handler ITim) *ITimProcessor { - - self72 := &ITimProcessor{handler: handler, processorMap: make(map[string]thrift.TProcessorFunction)} - self72.processorMap["timStream"] = &iTimProcessorTimStream{handler: handler} - self72.processorMap["timStarttls"] = &iTimProcessorTimStarttls{handler: handler} - self72.processorMap["timLogin"] = &iTimProcessorTimLogin{handler: handler} - self72.processorMap["timAck"] = &iTimProcessorTimAck{handler: handler} - self72.processorMap["timPresence"] = &iTimProcessorTimPresence{handler: handler} - self72.processorMap["timMessage"] = &iTimProcessorTimMessage{handler: handler} - self72.processorMap["timPing"] = &iTimProcessorTimPing{handler: handler} - self72.processorMap["timError"] = &iTimProcessorTimError{handler: handler} - self72.processorMap["timLogout"] = &iTimProcessorTimLogout{handler: handler} - self72.processorMap["timRegist"] = &iTimProcessorTimRegist{handler: handler} - self72.processorMap["timRoser"] = &iTimProcessorTimRoser{handler: handler} - self72.processorMap["timMessageList"] = &iTimProcessorTimMessageList{handler: handler} - self72.processorMap["timPresenceList"] = &iTimProcessorTimPresenceList{handler: handler} - self72.processorMap["timMessageIq"] = &iTimProcessorTimMessageIq{handler: handler} - self72.processorMap["timMessageResult"] = &iTimProcessorTimMessageResult_{handler: handler} - self72.processorMap["timProperty"] = &iTimProcessorTimProperty{handler: handler} - self72.processorMap["timRemoteUserAuth"] = &iTimProcessorTimRemoteUserAuth{handler: handler} - self72.processorMap["timRemoteUserGet"] = &iTimProcessorTimRemoteUserGet{handler: handler} - self72.processorMap["timRemoteUserEdit"] = &iTimProcessorTimRemoteUserEdit{handler: handler} - self72.processorMap["timResponsePresence"] = &iTimProcessorTimResponsePresence{handler: handler} - self72.processorMap["timResponseMessage"] = &iTimProcessorTimResponseMessage{handler: handler} - self72.processorMap["timResponseMessageIq"] = &iTimProcessorTimResponseMessageIq{handler: handler} - self72.processorMap["timResponsePresenceList"] = &iTimProcessorTimResponsePresenceList{handler: handler} - self72.processorMap["timResponseMessageList"] = &iTimProcessorTimResponseMessageList{handler: handler} - return self72 -} - -func (p *ITimProcessor) Process(iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - name, _, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return false, err - } - if processor, ok := p.GetProcessorFunction(name); ok { - return processor.Process(seqId, iprot, oprot) - } - iprot.Skip(thrift.STRUCT) - iprot.ReadMessageEnd() - x73 := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function "+name) - oprot.WriteMessageBegin(name, thrift.EXCEPTION, seqId) - x73.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, x73 - -} - -type iTimProcessorTimStream struct { - handler ITim -} - -func (p *iTimProcessorTimStream) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimStreamArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimStream(args.Param); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimStarttls struct { - handler ITim -} - -func (p *iTimProcessorTimStarttls) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimStarttlsArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimStarttls(); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimLogin struct { - handler ITim -} - -func (p *iTimProcessorTimLogin) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimLoginArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimLogin(args.Tid, args.Pwd); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimAck struct { - handler ITim -} - -func (p *iTimProcessorTimAck) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimAckArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimAck(args.Ab); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimPresence struct { - handler ITim -} - -func (p *iTimProcessorTimPresence) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimPresenceArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimPresence(args.Pbean); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimMessage struct { - handler ITim -} - -func (p *iTimProcessorTimMessage) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimMessageArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimMessage(args.Mbean); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimPing struct { - handler ITim -} - -func (p *iTimProcessorTimPing) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimPingArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimPing(args.ThreadId); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimError struct { - handler ITim -} - -func (p *iTimProcessorTimError) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimErrorArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimError(args.E); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimLogout struct { - handler ITim -} - -func (p *iTimProcessorTimLogout) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimLogoutArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimLogout(); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimRegist struct { - handler ITim -} - -func (p *iTimProcessorTimRegist) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimRegistArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimRegist(args.Tid, args.Auth); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimRoser struct { - handler ITim -} - -func (p *iTimProcessorTimRoser) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimRoserArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimRoser(args.Roster); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimMessageList struct { - handler ITim -} - -func (p *iTimProcessorTimMessageList) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimMessageListArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimMessageList(args.MbeanList); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimPresenceList struct { - handler ITim -} - -func (p *iTimProcessorTimPresenceList) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimPresenceListArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimPresenceList(args.PbeanList); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimMessageIq struct { - handler ITim -} - -func (p *iTimProcessorTimMessageIq) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimMessageIqArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimMessageIq(args.TimMsgIq, args.IqType); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimMessageResult_ struct { - handler ITim -} - -func (p *iTimProcessorTimMessageResult_) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimMessageResultArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimMessageResult_(args.Mbean); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimProperty struct { - handler ITim -} - -func (p *iTimProcessorTimProperty) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimPropertyArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimProperty(args.Tpb); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimRemoteUserAuth struct { - handler ITim -} - -func (p *iTimProcessorTimRemoteUserAuth) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimRemoteUserAuthArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("timRemoteUserAuth", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := ITimTimRemoteUserAuthResult{} - var retval *TimRemoteUserBean - var err2 error - if retval, err2 = p.handler.TimRemoteUserAuth(args.Tid, args.Pwd, args.Auth); err2 != nil { - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timRemoteUserAuth: "+err2.Error()) - oprot.WriteMessageBegin("timRemoteUserAuth", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("timRemoteUserAuth", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type iTimProcessorTimRemoteUserGet struct { - handler ITim -} - -func (p *iTimProcessorTimRemoteUserGet) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimRemoteUserGetArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("timRemoteUserGet", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := ITimTimRemoteUserGetResult{} - var retval *TimRemoteUserBean - var err2 error - if retval, err2 = p.handler.TimRemoteUserGet(args.Tid, args.Auth); err2 != nil { - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timRemoteUserGet: "+err2.Error()) - oprot.WriteMessageBegin("timRemoteUserGet", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("timRemoteUserGet", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type iTimProcessorTimRemoteUserEdit struct { - handler ITim -} - -func (p *iTimProcessorTimRemoteUserEdit) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimRemoteUserEditArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("timRemoteUserEdit", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := ITimTimRemoteUserEditResult{} - var retval *TimRemoteUserBean - var err2 error - if retval, err2 = p.handler.TimRemoteUserEdit(args.Tid, args.Ub, args.Auth); err2 != nil { - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timRemoteUserEdit: "+err2.Error()) - oprot.WriteMessageBegin("timRemoteUserEdit", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("timRemoteUserEdit", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type iTimProcessorTimResponsePresence struct { - handler ITim -} - -func (p *iTimProcessorTimResponsePresence) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimResponsePresenceArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("timResponsePresence", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := ITimTimResponsePresenceResult{} - var retval *TimResponseBean - var err2 error - if retval, err2 = p.handler.TimResponsePresence(args.Pbean, args.Auth); err2 != nil { - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timResponsePresence: "+err2.Error()) - oprot.WriteMessageBegin("timResponsePresence", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("timResponsePresence", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type iTimProcessorTimResponseMessage struct { - handler ITim -} - -func (p *iTimProcessorTimResponseMessage) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimResponseMessageArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("timResponseMessage", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := ITimTimResponseMessageResult{} - var retval *TimResponseBean - var err2 error - if retval, err2 = p.handler.TimResponseMessage(args.Mbean, args.Auth); err2 != nil { - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timResponseMessage: "+err2.Error()) - oprot.WriteMessageBegin("timResponseMessage", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("timResponseMessage", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type iTimProcessorTimResponseMessageIq struct { - handler ITim -} - -func (p *iTimProcessorTimResponseMessageIq) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimResponseMessageIqArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("timResponseMessageIq", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := ITimTimResponseMessageIqResult{} - var retval *TimMBeanList - var err2 error - if retval, err2 = p.handler.TimResponseMessageIq(args.TimMsgIq, args.IqType, args.Auth); err2 != nil { - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timResponseMessageIq: "+err2.Error()) - oprot.WriteMessageBegin("timResponseMessageIq", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("timResponseMessageIq", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type iTimProcessorTimResponsePresenceList struct { - handler ITim -} - -func (p *iTimProcessorTimResponsePresenceList) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimResponsePresenceListArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("timResponsePresenceList", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := ITimTimResponsePresenceListResult{} - var retval *TimResponseBean - var err2 error - if retval, err2 = p.handler.TimResponsePresenceList(args.PbeanList, args.Auth); err2 != nil { - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timResponsePresenceList: "+err2.Error()) - oprot.WriteMessageBegin("timResponsePresenceList", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("timResponsePresenceList", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type iTimProcessorTimResponseMessageList struct { - handler ITim -} - -func (p *iTimProcessorTimResponseMessageList) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimResponseMessageListArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("timResponseMessageList", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := ITimTimResponseMessageListResult{} - var retval *TimResponseBean - var err2 error - if retval, err2 = p.handler.TimResponseMessageList(args.MbeanList, args.Auth); err2 != nil { - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timResponseMessageList: "+err2.Error()) - oprot.WriteMessageBegin("timResponseMessageList", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("timResponseMessageList", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -// HELPER FUNCTIONS AND STRUCTURES - -// Attributes: -// - Param -type ITimTimStreamArgs struct { - Param *TimParam `thrift:"param,1" json:"param"` -} - -func NewITimTimStreamArgs() *ITimTimStreamArgs { - return &ITimTimStreamArgs{} -} - -var ITimTimStreamArgs_Param_DEFAULT *TimParam - -func (p *ITimTimStreamArgs) GetParam() *TimParam { - if !p.IsSetParam() { - return ITimTimStreamArgs_Param_DEFAULT - } - return p.Param -} -func (p *ITimTimStreamArgs) IsSetParam() bool { - return p.Param != nil -} - -func (p *ITimTimStreamArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimStreamArgs) readField1(iprot thrift.TProtocol) error { - p.Param = &TimParam{} - if err := p.Param.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Param), err) - } - return nil -} - -func (p *ITimTimStreamArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timStream_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimStreamArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("param", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:param: ", p), err) - } - if err := p.Param.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Param), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:param: ", p), err) - } - return err -} - -func (p *ITimTimStreamArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimStreamArgs(%+v)", *p) -} - -type ITimTimStarttlsArgs struct { -} - -func NewITimTimStarttlsArgs() *ITimTimStarttlsArgs { - return &ITimTimStarttlsArgs{} -} - -func (p *ITimTimStarttlsArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimStarttlsArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timStarttls_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimStarttlsArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimStarttlsArgs(%+v)", *p) -} - -// Attributes: -// - Tid -// - Pwd -type ITimTimLoginArgs struct { - Tid *Tid `thrift:"tid,1" json:"tid"` - Pwd string `thrift:"pwd,2" json:"pwd"` -} - -func NewITimTimLoginArgs() *ITimTimLoginArgs { - return &ITimTimLoginArgs{} -} - -var ITimTimLoginArgs_Tid_DEFAULT *Tid - -func (p *ITimTimLoginArgs) GetTid() *Tid { - if !p.IsSetTid() { - return ITimTimLoginArgs_Tid_DEFAULT - } - return p.Tid -} - -func (p *ITimTimLoginArgs) GetPwd() string { - return p.Pwd -} -func (p *ITimTimLoginArgs) IsSetTid() bool { - return p.Tid != nil -} - -func (p *ITimTimLoginArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimLoginArgs) readField1(iprot thrift.TProtocol) error { - p.Tid = &Tid{} - if err := p.Tid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) - } - return nil -} - -func (p *ITimTimLoginArgs) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Pwd = v - } - return nil -} - -func (p *ITimTimLoginArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timLogin_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimLoginArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tid", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) - } - if err := p.Tid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) - } - return err -} - -func (p *ITimTimLoginArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("pwd", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:pwd: ", p), err) - } - if err := oprot.WriteString(string(p.Pwd)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.pwd (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:pwd: ", p), err) - } - return err -} - -func (p *ITimTimLoginArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimLoginArgs(%+v)", *p) -} - -// Attributes: -// - Ab -type ITimTimAckArgs struct { - Ab *TimAckBean `thrift:"ab,1" json:"ab"` -} - -func NewITimTimAckArgs() *ITimTimAckArgs { - return &ITimTimAckArgs{} -} - -var ITimTimAckArgs_Ab_DEFAULT *TimAckBean - -func (p *ITimTimAckArgs) GetAb() *TimAckBean { - if !p.IsSetAb() { - return ITimTimAckArgs_Ab_DEFAULT - } - return p.Ab -} -func (p *ITimTimAckArgs) IsSetAb() bool { - return p.Ab != nil -} - -func (p *ITimTimAckArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimAckArgs) readField1(iprot thrift.TProtocol) error { - p.Ab = &TimAckBean{} - if err := p.Ab.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Ab), err) - } - return nil -} - -func (p *ITimTimAckArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timAck_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimAckArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("ab", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:ab: ", p), err) - } - if err := p.Ab.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Ab), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:ab: ", p), err) - } - return err -} - -func (p *ITimTimAckArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimAckArgs(%+v)", *p) -} - -// Attributes: -// - Pbean -type ITimTimPresenceArgs struct { - Pbean *TimPBean `thrift:"pbean,1" json:"pbean"` -} - -func NewITimTimPresenceArgs() *ITimTimPresenceArgs { - return &ITimTimPresenceArgs{} -} - -var ITimTimPresenceArgs_Pbean_DEFAULT *TimPBean - -func (p *ITimTimPresenceArgs) GetPbean() *TimPBean { - if !p.IsSetPbean() { - return ITimTimPresenceArgs_Pbean_DEFAULT - } - return p.Pbean -} -func (p *ITimTimPresenceArgs) IsSetPbean() bool { - return p.Pbean != nil -} - -func (p *ITimTimPresenceArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimPresenceArgs) readField1(iprot thrift.TProtocol) error { - p.Pbean = &TimPBean{} - if err := p.Pbean.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Pbean), err) - } - return nil -} - -func (p *ITimTimPresenceArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timPresence_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimPresenceArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("pbean", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pbean: ", p), err) - } - if err := p.Pbean.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Pbean), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:pbean: ", p), err) - } - return err -} - -func (p *ITimTimPresenceArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimPresenceArgs(%+v)", *p) -} - -// Attributes: -// - Mbean -type ITimTimMessageArgs struct { - Mbean *TimMBean `thrift:"mbean,1" json:"mbean"` -} - -func NewITimTimMessageArgs() *ITimTimMessageArgs { - return &ITimTimMessageArgs{} -} - -var ITimTimMessageArgs_Mbean_DEFAULT *TimMBean - -func (p *ITimTimMessageArgs) GetMbean() *TimMBean { - if !p.IsSetMbean() { - return ITimTimMessageArgs_Mbean_DEFAULT - } - return p.Mbean -} -func (p *ITimTimMessageArgs) IsSetMbean() bool { - return p.Mbean != nil -} - -func (p *ITimTimMessageArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimMessageArgs) readField1(iprot thrift.TProtocol) error { - p.Mbean = &TimMBean{} - if err := p.Mbean.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Mbean), err) - } - return nil -} - -func (p *ITimTimMessageArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timMessage_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimMessageArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("mbean", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:mbean: ", p), err) - } - if err := p.Mbean.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Mbean), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:mbean: ", p), err) - } - return err -} - -func (p *ITimTimMessageArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimMessageArgs(%+v)", *p) -} - -// Attributes: -// - ThreadId -type ITimTimPingArgs struct { - ThreadId string `thrift:"threadId,1" json:"threadId"` -} - -func NewITimTimPingArgs() *ITimTimPingArgs { - return &ITimTimPingArgs{} -} - -func (p *ITimTimPingArgs) GetThreadId() string { - return p.ThreadId -} -func (p *ITimTimPingArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimPingArgs) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.ThreadId = v - } - return nil -} - -func (p *ITimTimPingArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timPing_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimPingArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("threadId", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) - } - if err := oprot.WriteString(string(p.ThreadId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) - } - return err -} - -func (p *ITimTimPingArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimPingArgs(%+v)", *p) -} - -// Attributes: -// - E -type ITimTimErrorArgs struct { - E *TimError `thrift:"e,1" json:"e"` -} - -func NewITimTimErrorArgs() *ITimTimErrorArgs { - return &ITimTimErrorArgs{} -} - -var ITimTimErrorArgs_E_DEFAULT *TimError - -func (p *ITimTimErrorArgs) GetE() *TimError { - if !p.IsSetE() { - return ITimTimErrorArgs_E_DEFAULT - } - return p.E -} -func (p *ITimTimErrorArgs) IsSetE() bool { - return p.E != nil -} - -func (p *ITimTimErrorArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimErrorArgs) readField1(iprot thrift.TProtocol) error { - p.E = &TimError{} - if err := p.E.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.E), err) - } - return nil -} - -func (p *ITimTimErrorArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timError_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimErrorArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:e: ", p), err) - } - if err := p.E.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.E), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:e: ", p), err) - } - return err -} - -func (p *ITimTimErrorArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimErrorArgs(%+v)", *p) -} - -type ITimTimLogoutArgs struct { -} - -func NewITimTimLogoutArgs() *ITimTimLogoutArgs { - return &ITimTimLogoutArgs{} -} - -func (p *ITimTimLogoutArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimLogoutArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timLogout_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimLogoutArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimLogoutArgs(%+v)", *p) -} - -// Attributes: -// - Tid -// - Auth -type ITimTimRegistArgs struct { - Tid *Tid `thrift:"tid,1" json:"tid"` - Auth string `thrift:"auth,2" json:"auth"` -} - -func NewITimTimRegistArgs() *ITimTimRegistArgs { - return &ITimTimRegistArgs{} -} - -var ITimTimRegistArgs_Tid_DEFAULT *Tid - -func (p *ITimTimRegistArgs) GetTid() *Tid { - if !p.IsSetTid() { - return ITimTimRegistArgs_Tid_DEFAULT - } - return p.Tid -} - -func (p *ITimTimRegistArgs) GetAuth() string { - return p.Auth -} -func (p *ITimTimRegistArgs) IsSetTid() bool { - return p.Tid != nil -} - -func (p *ITimTimRegistArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimRegistArgs) readField1(iprot thrift.TProtocol) error { - p.Tid = &Tid{} - if err := p.Tid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) - } - return nil -} - -func (p *ITimTimRegistArgs) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Auth = v - } - return nil -} - -func (p *ITimTimRegistArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timRegist_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimRegistArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tid", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) - } - if err := p.Tid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) - } - return err -} - -func (p *ITimTimRegistArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("auth", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:auth: ", p), err) - } - if err := oprot.WriteString(string(p.Auth)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.auth (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:auth: ", p), err) - } - return err -} - -func (p *ITimTimRegistArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimRegistArgs(%+v)", *p) -} - -// Attributes: -// - Roster -type ITimTimRoserArgs struct { - Roster *TimRoster `thrift:"roster,1" json:"roster"` -} - -func NewITimTimRoserArgs() *ITimTimRoserArgs { - return &ITimTimRoserArgs{} -} - -var ITimTimRoserArgs_Roster_DEFAULT *TimRoster - -func (p *ITimTimRoserArgs) GetRoster() *TimRoster { - if !p.IsSetRoster() { - return ITimTimRoserArgs_Roster_DEFAULT - } - return p.Roster -} -func (p *ITimTimRoserArgs) IsSetRoster() bool { - return p.Roster != nil -} - -func (p *ITimTimRoserArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimRoserArgs) readField1(iprot thrift.TProtocol) error { - p.Roster = &TimRoster{} - if err := p.Roster.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Roster), err) - } - return nil -} - -func (p *ITimTimRoserArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timRoser_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimRoserArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("roster", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:roster: ", p), err) - } - if err := p.Roster.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Roster), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:roster: ", p), err) - } - return err -} - -func (p *ITimTimRoserArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimRoserArgs(%+v)", *p) -} - -// Attributes: -// - MbeanList -type ITimTimMessageListArgs struct { - MbeanList *TimMBeanList `thrift:"mbeanList,1" json:"mbeanList"` -} - -func NewITimTimMessageListArgs() *ITimTimMessageListArgs { - return &ITimTimMessageListArgs{} -} - -var ITimTimMessageListArgs_MbeanList_DEFAULT *TimMBeanList - -func (p *ITimTimMessageListArgs) GetMbeanList() *TimMBeanList { - if !p.IsSetMbeanList() { - return ITimTimMessageListArgs_MbeanList_DEFAULT - } - return p.MbeanList -} -func (p *ITimTimMessageListArgs) IsSetMbeanList() bool { - return p.MbeanList != nil -} - -func (p *ITimTimMessageListArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimMessageListArgs) readField1(iprot thrift.TProtocol) error { - p.MbeanList = &TimMBeanList{} - if err := p.MbeanList.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.MbeanList), err) - } - return nil -} - -func (p *ITimTimMessageListArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timMessageList_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimMessageListArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("mbeanList", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:mbeanList: ", p), err) - } - if err := p.MbeanList.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.MbeanList), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:mbeanList: ", p), err) - } - return err -} - -func (p *ITimTimMessageListArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimMessageListArgs(%+v)", *p) -} - -// Attributes: -// - PbeanList -type ITimTimPresenceListArgs struct { - PbeanList *TimPBeanList `thrift:"pbeanList,1" json:"pbeanList"` -} - -func NewITimTimPresenceListArgs() *ITimTimPresenceListArgs { - return &ITimTimPresenceListArgs{} -} - -var ITimTimPresenceListArgs_PbeanList_DEFAULT *TimPBeanList - -func (p *ITimTimPresenceListArgs) GetPbeanList() *TimPBeanList { - if !p.IsSetPbeanList() { - return ITimTimPresenceListArgs_PbeanList_DEFAULT - } - return p.PbeanList -} -func (p *ITimTimPresenceListArgs) IsSetPbeanList() bool { - return p.PbeanList != nil -} - -func (p *ITimTimPresenceListArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimPresenceListArgs) readField1(iprot thrift.TProtocol) error { - p.PbeanList = &TimPBeanList{} - if err := p.PbeanList.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.PbeanList), err) - } - return nil -} - -func (p *ITimTimPresenceListArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timPresenceList_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimPresenceListArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("pbeanList", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pbeanList: ", p), err) - } - if err := p.PbeanList.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.PbeanList), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:pbeanList: ", p), err) - } - return err -} - -func (p *ITimTimPresenceListArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimPresenceListArgs(%+v)", *p) -} - -// Attributes: -// - TimMsgIq -// - IqType -type ITimTimMessageIqArgs struct { - TimMsgIq *TimMessageIq `thrift:"timMsgIq,1" json:"timMsgIq"` - IqType string `thrift:"iqType,2" json:"iqType"` -} - -func NewITimTimMessageIqArgs() *ITimTimMessageIqArgs { - return &ITimTimMessageIqArgs{} -} - -var ITimTimMessageIqArgs_TimMsgIq_DEFAULT *TimMessageIq - -func (p *ITimTimMessageIqArgs) GetTimMsgIq() *TimMessageIq { - if !p.IsSetTimMsgIq() { - return ITimTimMessageIqArgs_TimMsgIq_DEFAULT - } - return p.TimMsgIq -} - -func (p *ITimTimMessageIqArgs) GetIqType() string { - return p.IqType -} -func (p *ITimTimMessageIqArgs) IsSetTimMsgIq() bool { - return p.TimMsgIq != nil -} - -func (p *ITimTimMessageIqArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimMessageIqArgs) readField1(iprot thrift.TProtocol) error { - p.TimMsgIq = &TimMessageIq{} - if err := p.TimMsgIq.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TimMsgIq), err) - } - return nil -} - -func (p *ITimTimMessageIqArgs) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.IqType = v - } - return nil -} - -func (p *ITimTimMessageIqArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timMessageIq_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimMessageIqArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("timMsgIq", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:timMsgIq: ", p), err) - } - if err := p.TimMsgIq.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TimMsgIq), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:timMsgIq: ", p), err) - } - return err -} - -func (p *ITimTimMessageIqArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("iqType", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:iqType: ", p), err) - } - if err := oprot.WriteString(string(p.IqType)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.iqType (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:iqType: ", p), err) - } - return err -} - -func (p *ITimTimMessageIqArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimMessageIqArgs(%+v)", *p) -} - -// Attributes: -// - Mbean -type ITimTimMessageResultArgs struct { - Mbean *TimMBean `thrift:"mbean,1" json:"mbean"` -} - -func NewITimTimMessageResultArgs() *ITimTimMessageResultArgs { - return &ITimTimMessageResultArgs{} -} - -var ITimTimMessageResultArgs_Mbean_DEFAULT *TimMBean - -func (p *ITimTimMessageResultArgs) GetMbean() *TimMBean { - if !p.IsSetMbean() { - return ITimTimMessageResultArgs_Mbean_DEFAULT - } - return p.Mbean -} -func (p *ITimTimMessageResultArgs) IsSetMbean() bool { - return p.Mbean != nil -} - -func (p *ITimTimMessageResultArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimMessageResultArgs) readField1(iprot thrift.TProtocol) error { - p.Mbean = &TimMBean{} - if err := p.Mbean.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Mbean), err) - } - return nil -} - -func (p *ITimTimMessageResultArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timMessageResult_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimMessageResultArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("mbean", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:mbean: ", p), err) - } - if err := p.Mbean.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Mbean), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:mbean: ", p), err) - } - return err -} - -func (p *ITimTimMessageResultArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimMessageResultArgs(%+v)", *p) -} - -// Attributes: -// - Tpb -type ITimTimPropertyArgs struct { - Tpb *TimPropertyBean `thrift:"tpb,1" json:"tpb"` -} - -func NewITimTimPropertyArgs() *ITimTimPropertyArgs { - return &ITimTimPropertyArgs{} -} - -var ITimTimPropertyArgs_Tpb_DEFAULT *TimPropertyBean - -func (p *ITimTimPropertyArgs) GetTpb() *TimPropertyBean { - if !p.IsSetTpb() { - return ITimTimPropertyArgs_Tpb_DEFAULT - } - return p.Tpb -} -func (p *ITimTimPropertyArgs) IsSetTpb() bool { - return p.Tpb != nil -} - -func (p *ITimTimPropertyArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimPropertyArgs) readField1(iprot thrift.TProtocol) error { - p.Tpb = &TimPropertyBean{} - if err := p.Tpb.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tpb), err) - } - return nil -} - -func (p *ITimTimPropertyArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timProperty_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimPropertyArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tpb", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tpb: ", p), err) - } - if err := p.Tpb.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tpb), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tpb: ", p), err) - } - return err -} - -func (p *ITimTimPropertyArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimPropertyArgs(%+v)", *p) -} - -// Attributes: -// - Tid -// - Pwd -// - Auth -type ITimTimRemoteUserAuthArgs struct { - Tid *Tid `thrift:"tid,1" json:"tid"` - Pwd string `thrift:"pwd,2" json:"pwd"` - Auth *TimAuth `thrift:"auth,3" json:"auth"` -} - -func NewITimTimRemoteUserAuthArgs() *ITimTimRemoteUserAuthArgs { - return &ITimTimRemoteUserAuthArgs{} -} - -var ITimTimRemoteUserAuthArgs_Tid_DEFAULT *Tid - -func (p *ITimTimRemoteUserAuthArgs) GetTid() *Tid { - if !p.IsSetTid() { - return ITimTimRemoteUserAuthArgs_Tid_DEFAULT - } - return p.Tid -} - -func (p *ITimTimRemoteUserAuthArgs) GetPwd() string { - return p.Pwd -} - -var ITimTimRemoteUserAuthArgs_Auth_DEFAULT *TimAuth - -func (p *ITimTimRemoteUserAuthArgs) GetAuth() *TimAuth { - if !p.IsSetAuth() { - return ITimTimRemoteUserAuthArgs_Auth_DEFAULT - } - return p.Auth -} -func (p *ITimTimRemoteUserAuthArgs) IsSetTid() bool { - return p.Tid != nil -} - -func (p *ITimTimRemoteUserAuthArgs) IsSetAuth() bool { - return p.Auth != nil -} - -func (p *ITimTimRemoteUserAuthArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimRemoteUserAuthArgs) readField1(iprot thrift.TProtocol) error { - p.Tid = &Tid{} - if err := p.Tid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) - } - return nil -} - -func (p *ITimTimRemoteUserAuthArgs) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Pwd = v - } - return nil -} - -func (p *ITimTimRemoteUserAuthArgs) readField3(iprot thrift.TProtocol) error { - p.Auth = &TimAuth{} - if err := p.Auth.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) - } - return nil -} - -func (p *ITimTimRemoteUserAuthArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timRemoteUserAuth_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimRemoteUserAuthArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tid", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) - } - if err := p.Tid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) - } - return err -} - -func (p *ITimTimRemoteUserAuthArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("pwd", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:pwd: ", p), err) - } - if err := oprot.WriteString(string(p.Pwd)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.pwd (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:pwd: ", p), err) - } - return err -} - -func (p *ITimTimRemoteUserAuthArgs) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("auth", thrift.STRUCT, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:auth: ", p), err) - } - if err := p.Auth.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:auth: ", p), err) - } - return err -} - -func (p *ITimTimRemoteUserAuthArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimRemoteUserAuthArgs(%+v)", *p) -} - -// Attributes: -// - Success -type ITimTimRemoteUserAuthResult struct { - Success *TimRemoteUserBean `thrift:"success,0" json:"success,omitempty"` -} - -func NewITimTimRemoteUserAuthResult() *ITimTimRemoteUserAuthResult { - return &ITimTimRemoteUserAuthResult{} -} - -var ITimTimRemoteUserAuthResult_Success_DEFAULT *TimRemoteUserBean - -func (p *ITimTimRemoteUserAuthResult) GetSuccess() *TimRemoteUserBean { - if !p.IsSetSuccess() { - return ITimTimRemoteUserAuthResult_Success_DEFAULT - } - return p.Success -} -func (p *ITimTimRemoteUserAuthResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *ITimTimRemoteUserAuthResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimRemoteUserAuthResult) readField0(iprot thrift.TProtocol) error { - p.Success = &TimRemoteUserBean{} - if err := p.Success.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) - } - return nil -} - -func (p *ITimTimRemoteUserAuthResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timRemoteUserAuth_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimRemoteUserAuthResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := p.Success.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *ITimTimRemoteUserAuthResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimRemoteUserAuthResult(%+v)", *p) -} - -// Attributes: -// - Tid -// - Auth -type ITimTimRemoteUserGetArgs struct { - Tid *Tid `thrift:"tid,1" json:"tid"` - Auth *TimAuth `thrift:"auth,2" json:"auth"` -} - -func NewITimTimRemoteUserGetArgs() *ITimTimRemoteUserGetArgs { - return &ITimTimRemoteUserGetArgs{} -} - -var ITimTimRemoteUserGetArgs_Tid_DEFAULT *Tid - -func (p *ITimTimRemoteUserGetArgs) GetTid() *Tid { - if !p.IsSetTid() { - return ITimTimRemoteUserGetArgs_Tid_DEFAULT - } - return p.Tid -} - -var ITimTimRemoteUserGetArgs_Auth_DEFAULT *TimAuth - -func (p *ITimTimRemoteUserGetArgs) GetAuth() *TimAuth { - if !p.IsSetAuth() { - return ITimTimRemoteUserGetArgs_Auth_DEFAULT - } - return p.Auth -} -func (p *ITimTimRemoteUserGetArgs) IsSetTid() bool { - return p.Tid != nil -} - -func (p *ITimTimRemoteUserGetArgs) IsSetAuth() bool { - return p.Auth != nil -} - -func (p *ITimTimRemoteUserGetArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimRemoteUserGetArgs) readField1(iprot thrift.TProtocol) error { - p.Tid = &Tid{} - if err := p.Tid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) - } - return nil -} - -func (p *ITimTimRemoteUserGetArgs) readField2(iprot thrift.TProtocol) error { - p.Auth = &TimAuth{} - if err := p.Auth.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) - } - return nil -} - -func (p *ITimTimRemoteUserGetArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timRemoteUserGet_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimRemoteUserGetArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tid", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) - } - if err := p.Tid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) - } - return err -} - -func (p *ITimTimRemoteUserGetArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("auth", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:auth: ", p), err) - } - if err := p.Auth.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:auth: ", p), err) - } - return err -} - -func (p *ITimTimRemoteUserGetArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimRemoteUserGetArgs(%+v)", *p) -} - -// Attributes: -// - Success -type ITimTimRemoteUserGetResult struct { - Success *TimRemoteUserBean `thrift:"success,0" json:"success,omitempty"` -} - -func NewITimTimRemoteUserGetResult() *ITimTimRemoteUserGetResult { - return &ITimTimRemoteUserGetResult{} -} - -var ITimTimRemoteUserGetResult_Success_DEFAULT *TimRemoteUserBean - -func (p *ITimTimRemoteUserGetResult) GetSuccess() *TimRemoteUserBean { - if !p.IsSetSuccess() { - return ITimTimRemoteUserGetResult_Success_DEFAULT - } - return p.Success -} -func (p *ITimTimRemoteUserGetResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *ITimTimRemoteUserGetResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimRemoteUserGetResult) readField0(iprot thrift.TProtocol) error { - p.Success = &TimRemoteUserBean{} - if err := p.Success.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) - } - return nil -} - -func (p *ITimTimRemoteUserGetResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timRemoteUserGet_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimRemoteUserGetResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := p.Success.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *ITimTimRemoteUserGetResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimRemoteUserGetResult(%+v)", *p) -} - -// Attributes: -// - Tid -// - Ub -// - Auth -type ITimTimRemoteUserEditArgs struct { - Tid *Tid `thrift:"tid,1" json:"tid"` - Ub *TimUserBean `thrift:"ub,2" json:"ub"` - Auth *TimAuth `thrift:"auth,3" json:"auth"` -} - -func NewITimTimRemoteUserEditArgs() *ITimTimRemoteUserEditArgs { - return &ITimTimRemoteUserEditArgs{} -} - -var ITimTimRemoteUserEditArgs_Tid_DEFAULT *Tid - -func (p *ITimTimRemoteUserEditArgs) GetTid() *Tid { - if !p.IsSetTid() { - return ITimTimRemoteUserEditArgs_Tid_DEFAULT - } - return p.Tid -} - -var ITimTimRemoteUserEditArgs_Ub_DEFAULT *TimUserBean - -func (p *ITimTimRemoteUserEditArgs) GetUb() *TimUserBean { - if !p.IsSetUb() { - return ITimTimRemoteUserEditArgs_Ub_DEFAULT - } - return p.Ub -} - -var ITimTimRemoteUserEditArgs_Auth_DEFAULT *TimAuth - -func (p *ITimTimRemoteUserEditArgs) GetAuth() *TimAuth { - if !p.IsSetAuth() { - return ITimTimRemoteUserEditArgs_Auth_DEFAULT - } - return p.Auth -} -func (p *ITimTimRemoteUserEditArgs) IsSetTid() bool { - return p.Tid != nil -} - -func (p *ITimTimRemoteUserEditArgs) IsSetUb() bool { - return p.Ub != nil -} - -func (p *ITimTimRemoteUserEditArgs) IsSetAuth() bool { - return p.Auth != nil -} - -func (p *ITimTimRemoteUserEditArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimRemoteUserEditArgs) readField1(iprot thrift.TProtocol) error { - p.Tid = &Tid{} - if err := p.Tid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) - } - return nil -} - -func (p *ITimTimRemoteUserEditArgs) readField2(iprot thrift.TProtocol) error { - p.Ub = &TimUserBean{} - if err := p.Ub.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Ub), err) - } - return nil -} - -func (p *ITimTimRemoteUserEditArgs) readField3(iprot thrift.TProtocol) error { - p.Auth = &TimAuth{} - if err := p.Auth.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) - } - return nil -} - -func (p *ITimTimRemoteUserEditArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timRemoteUserEdit_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimRemoteUserEditArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tid", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) - } - if err := p.Tid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) - } - return err -} - -func (p *ITimTimRemoteUserEditArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("ub", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:ub: ", p), err) - } - if err := p.Ub.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Ub), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:ub: ", p), err) - } - return err -} - -func (p *ITimTimRemoteUserEditArgs) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("auth", thrift.STRUCT, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:auth: ", p), err) - } - if err := p.Auth.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:auth: ", p), err) - } - return err -} - -func (p *ITimTimRemoteUserEditArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimRemoteUserEditArgs(%+v)", *p) -} - -// Attributes: -// - Success -type ITimTimRemoteUserEditResult struct { - Success *TimRemoteUserBean `thrift:"success,0" json:"success,omitempty"` -} - -func NewITimTimRemoteUserEditResult() *ITimTimRemoteUserEditResult { - return &ITimTimRemoteUserEditResult{} -} - -var ITimTimRemoteUserEditResult_Success_DEFAULT *TimRemoteUserBean - -func (p *ITimTimRemoteUserEditResult) GetSuccess() *TimRemoteUserBean { - if !p.IsSetSuccess() { - return ITimTimRemoteUserEditResult_Success_DEFAULT - } - return p.Success -} -func (p *ITimTimRemoteUserEditResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *ITimTimRemoteUserEditResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimRemoteUserEditResult) readField0(iprot thrift.TProtocol) error { - p.Success = &TimRemoteUserBean{} - if err := p.Success.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) - } - return nil -} - -func (p *ITimTimRemoteUserEditResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timRemoteUserEdit_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimRemoteUserEditResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := p.Success.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *ITimTimRemoteUserEditResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimRemoteUserEditResult(%+v)", *p) -} - -// Attributes: -// - Pbean -// - Auth -type ITimTimResponsePresenceArgs struct { - Pbean *TimPBean `thrift:"pbean,1" json:"pbean"` - Auth *TimAuth `thrift:"auth,2" json:"auth"` -} - -func NewITimTimResponsePresenceArgs() *ITimTimResponsePresenceArgs { - return &ITimTimResponsePresenceArgs{} -} - -var ITimTimResponsePresenceArgs_Pbean_DEFAULT *TimPBean - -func (p *ITimTimResponsePresenceArgs) GetPbean() *TimPBean { - if !p.IsSetPbean() { - return ITimTimResponsePresenceArgs_Pbean_DEFAULT - } - return p.Pbean -} - -var ITimTimResponsePresenceArgs_Auth_DEFAULT *TimAuth - -func (p *ITimTimResponsePresenceArgs) GetAuth() *TimAuth { - if !p.IsSetAuth() { - return ITimTimResponsePresenceArgs_Auth_DEFAULT - } - return p.Auth -} -func (p *ITimTimResponsePresenceArgs) IsSetPbean() bool { - return p.Pbean != nil -} - -func (p *ITimTimResponsePresenceArgs) IsSetAuth() bool { - return p.Auth != nil -} - -func (p *ITimTimResponsePresenceArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimResponsePresenceArgs) readField1(iprot thrift.TProtocol) error { - p.Pbean = &TimPBean{} - if err := p.Pbean.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Pbean), err) - } - return nil -} - -func (p *ITimTimResponsePresenceArgs) readField2(iprot thrift.TProtocol) error { - p.Auth = &TimAuth{} - if err := p.Auth.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) - } - return nil -} - -func (p *ITimTimResponsePresenceArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timResponsePresence_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimResponsePresenceArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("pbean", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pbean: ", p), err) - } - if err := p.Pbean.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Pbean), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:pbean: ", p), err) - } - return err -} - -func (p *ITimTimResponsePresenceArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("auth", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:auth: ", p), err) - } - if err := p.Auth.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:auth: ", p), err) - } - return err -} - -func (p *ITimTimResponsePresenceArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimResponsePresenceArgs(%+v)", *p) -} - -// Attributes: -// - Success -type ITimTimResponsePresenceResult struct { - Success *TimResponseBean `thrift:"success,0" json:"success,omitempty"` -} - -func NewITimTimResponsePresenceResult() *ITimTimResponsePresenceResult { - return &ITimTimResponsePresenceResult{} -} - -var ITimTimResponsePresenceResult_Success_DEFAULT *TimResponseBean - -func (p *ITimTimResponsePresenceResult) GetSuccess() *TimResponseBean { - if !p.IsSetSuccess() { - return ITimTimResponsePresenceResult_Success_DEFAULT - } - return p.Success -} -func (p *ITimTimResponsePresenceResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *ITimTimResponsePresenceResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimResponsePresenceResult) readField0(iprot thrift.TProtocol) error { - p.Success = &TimResponseBean{} - if err := p.Success.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) - } - return nil -} - -func (p *ITimTimResponsePresenceResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timResponsePresence_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimResponsePresenceResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := p.Success.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *ITimTimResponsePresenceResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimResponsePresenceResult(%+v)", *p) -} - -// Attributes: -// - Mbean -// - Auth -type ITimTimResponseMessageArgs struct { - Mbean *TimMBean `thrift:"mbean,1" json:"mbean"` - Auth *TimAuth `thrift:"auth,2" json:"auth"` -} - -func NewITimTimResponseMessageArgs() *ITimTimResponseMessageArgs { - return &ITimTimResponseMessageArgs{} -} - -var ITimTimResponseMessageArgs_Mbean_DEFAULT *TimMBean - -func (p *ITimTimResponseMessageArgs) GetMbean() *TimMBean { - if !p.IsSetMbean() { - return ITimTimResponseMessageArgs_Mbean_DEFAULT - } - return p.Mbean -} - -var ITimTimResponseMessageArgs_Auth_DEFAULT *TimAuth - -func (p *ITimTimResponseMessageArgs) GetAuth() *TimAuth { - if !p.IsSetAuth() { - return ITimTimResponseMessageArgs_Auth_DEFAULT - } - return p.Auth -} -func (p *ITimTimResponseMessageArgs) IsSetMbean() bool { - return p.Mbean != nil -} - -func (p *ITimTimResponseMessageArgs) IsSetAuth() bool { - return p.Auth != nil -} - -func (p *ITimTimResponseMessageArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimResponseMessageArgs) readField1(iprot thrift.TProtocol) error { - p.Mbean = &TimMBean{} - if err := p.Mbean.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Mbean), err) - } - return nil -} - -func (p *ITimTimResponseMessageArgs) readField2(iprot thrift.TProtocol) error { - p.Auth = &TimAuth{} - if err := p.Auth.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) - } - return nil -} - -func (p *ITimTimResponseMessageArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timResponseMessage_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimResponseMessageArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("mbean", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:mbean: ", p), err) - } - if err := p.Mbean.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Mbean), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:mbean: ", p), err) - } - return err -} - -func (p *ITimTimResponseMessageArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("auth", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:auth: ", p), err) - } - if err := p.Auth.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:auth: ", p), err) - } - return err -} - -func (p *ITimTimResponseMessageArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimResponseMessageArgs(%+v)", *p) -} - -// Attributes: -// - Success -type ITimTimResponseMessageResult struct { - Success *TimResponseBean `thrift:"success,0" json:"success,omitempty"` -} - -func NewITimTimResponseMessageResult() *ITimTimResponseMessageResult { - return &ITimTimResponseMessageResult{} -} - -var ITimTimResponseMessageResult_Success_DEFAULT *TimResponseBean - -func (p *ITimTimResponseMessageResult) GetSuccess() *TimResponseBean { - if !p.IsSetSuccess() { - return ITimTimResponseMessageResult_Success_DEFAULT - } - return p.Success -} -func (p *ITimTimResponseMessageResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *ITimTimResponseMessageResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimResponseMessageResult) readField0(iprot thrift.TProtocol) error { - p.Success = &TimResponseBean{} - if err := p.Success.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) - } - return nil -} - -func (p *ITimTimResponseMessageResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timResponseMessage_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimResponseMessageResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := p.Success.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *ITimTimResponseMessageResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimResponseMessageResult(%+v)", *p) -} - -// Attributes: -// - TimMsgIq -// - IqType -// - Auth -type ITimTimResponseMessageIqArgs struct { - TimMsgIq *TimMessageIq `thrift:"timMsgIq,1" json:"timMsgIq"` - IqType string `thrift:"iqType,2" json:"iqType"` - Auth *TimAuth `thrift:"auth,3" json:"auth"` -} - -func NewITimTimResponseMessageIqArgs() *ITimTimResponseMessageIqArgs { - return &ITimTimResponseMessageIqArgs{} -} - -var ITimTimResponseMessageIqArgs_TimMsgIq_DEFAULT *TimMessageIq - -func (p *ITimTimResponseMessageIqArgs) GetTimMsgIq() *TimMessageIq { - if !p.IsSetTimMsgIq() { - return ITimTimResponseMessageIqArgs_TimMsgIq_DEFAULT - } - return p.TimMsgIq -} - -func (p *ITimTimResponseMessageIqArgs) GetIqType() string { - return p.IqType -} - -var ITimTimResponseMessageIqArgs_Auth_DEFAULT *TimAuth - -func (p *ITimTimResponseMessageIqArgs) GetAuth() *TimAuth { - if !p.IsSetAuth() { - return ITimTimResponseMessageIqArgs_Auth_DEFAULT - } - return p.Auth -} -func (p *ITimTimResponseMessageIqArgs) IsSetTimMsgIq() bool { - return p.TimMsgIq != nil -} - -func (p *ITimTimResponseMessageIqArgs) IsSetAuth() bool { - return p.Auth != nil -} - -func (p *ITimTimResponseMessageIqArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimResponseMessageIqArgs) readField1(iprot thrift.TProtocol) error { - p.TimMsgIq = &TimMessageIq{} - if err := p.TimMsgIq.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TimMsgIq), err) - } - return nil -} - -func (p *ITimTimResponseMessageIqArgs) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.IqType = v - } - return nil -} - -func (p *ITimTimResponseMessageIqArgs) readField3(iprot thrift.TProtocol) error { - p.Auth = &TimAuth{} - if err := p.Auth.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) - } - return nil -} - -func (p *ITimTimResponseMessageIqArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timResponseMessageIq_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimResponseMessageIqArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("timMsgIq", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:timMsgIq: ", p), err) - } - if err := p.TimMsgIq.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TimMsgIq), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:timMsgIq: ", p), err) - } - return err -} - -func (p *ITimTimResponseMessageIqArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("iqType", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:iqType: ", p), err) - } - if err := oprot.WriteString(string(p.IqType)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.iqType (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:iqType: ", p), err) - } - return err -} - -func (p *ITimTimResponseMessageIqArgs) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("auth", thrift.STRUCT, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:auth: ", p), err) - } - if err := p.Auth.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:auth: ", p), err) - } - return err -} - -func (p *ITimTimResponseMessageIqArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimResponseMessageIqArgs(%+v)", *p) -} - -// Attributes: -// - Success -type ITimTimResponseMessageIqResult struct { - Success *TimMBeanList `thrift:"success,0" json:"success,omitempty"` -} - -func NewITimTimResponseMessageIqResult() *ITimTimResponseMessageIqResult { - return &ITimTimResponseMessageIqResult{} -} - -var ITimTimResponseMessageIqResult_Success_DEFAULT *TimMBeanList - -func (p *ITimTimResponseMessageIqResult) GetSuccess() *TimMBeanList { - if !p.IsSetSuccess() { - return ITimTimResponseMessageIqResult_Success_DEFAULT - } - return p.Success -} -func (p *ITimTimResponseMessageIqResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *ITimTimResponseMessageIqResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimResponseMessageIqResult) readField0(iprot thrift.TProtocol) error { - p.Success = &TimMBeanList{} - if err := p.Success.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) - } - return nil -} - -func (p *ITimTimResponseMessageIqResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timResponseMessageIq_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimResponseMessageIqResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := p.Success.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *ITimTimResponseMessageIqResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimResponseMessageIqResult(%+v)", *p) -} - -// Attributes: -// - PbeanList -// - Auth -type ITimTimResponsePresenceListArgs struct { - PbeanList *TimPBeanList `thrift:"pbeanList,1" json:"pbeanList"` - Auth *TimAuth `thrift:"auth,2" json:"auth"` -} - -func NewITimTimResponsePresenceListArgs() *ITimTimResponsePresenceListArgs { - return &ITimTimResponsePresenceListArgs{} -} - -var ITimTimResponsePresenceListArgs_PbeanList_DEFAULT *TimPBeanList - -func (p *ITimTimResponsePresenceListArgs) GetPbeanList() *TimPBeanList { - if !p.IsSetPbeanList() { - return ITimTimResponsePresenceListArgs_PbeanList_DEFAULT - } - return p.PbeanList -} - -var ITimTimResponsePresenceListArgs_Auth_DEFAULT *TimAuth - -func (p *ITimTimResponsePresenceListArgs) GetAuth() *TimAuth { - if !p.IsSetAuth() { - return ITimTimResponsePresenceListArgs_Auth_DEFAULT - } - return p.Auth -} -func (p *ITimTimResponsePresenceListArgs) IsSetPbeanList() bool { - return p.PbeanList != nil -} - -func (p *ITimTimResponsePresenceListArgs) IsSetAuth() bool { - return p.Auth != nil -} - -func (p *ITimTimResponsePresenceListArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimResponsePresenceListArgs) readField1(iprot thrift.TProtocol) error { - p.PbeanList = &TimPBeanList{} - if err := p.PbeanList.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.PbeanList), err) - } - return nil -} - -func (p *ITimTimResponsePresenceListArgs) readField2(iprot thrift.TProtocol) error { - p.Auth = &TimAuth{} - if err := p.Auth.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) - } - return nil -} - -func (p *ITimTimResponsePresenceListArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timResponsePresenceList_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimResponsePresenceListArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("pbeanList", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pbeanList: ", p), err) - } - if err := p.PbeanList.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.PbeanList), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:pbeanList: ", p), err) - } - return err -} - -func (p *ITimTimResponsePresenceListArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("auth", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:auth: ", p), err) - } - if err := p.Auth.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:auth: ", p), err) - } - return err -} - -func (p *ITimTimResponsePresenceListArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimResponsePresenceListArgs(%+v)", *p) -} - -// Attributes: -// - Success -type ITimTimResponsePresenceListResult struct { - Success *TimResponseBean `thrift:"success,0" json:"success,omitempty"` -} - -func NewITimTimResponsePresenceListResult() *ITimTimResponsePresenceListResult { - return &ITimTimResponsePresenceListResult{} -} - -var ITimTimResponsePresenceListResult_Success_DEFAULT *TimResponseBean - -func (p *ITimTimResponsePresenceListResult) GetSuccess() *TimResponseBean { - if !p.IsSetSuccess() { - return ITimTimResponsePresenceListResult_Success_DEFAULT - } - return p.Success -} -func (p *ITimTimResponsePresenceListResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *ITimTimResponsePresenceListResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimResponsePresenceListResult) readField0(iprot thrift.TProtocol) error { - p.Success = &TimResponseBean{} - if err := p.Success.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) - } - return nil -} - -func (p *ITimTimResponsePresenceListResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timResponsePresenceList_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimResponsePresenceListResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := p.Success.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *ITimTimResponsePresenceListResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimResponsePresenceListResult(%+v)", *p) -} - -// Attributes: -// - MbeanList -// - Auth -type ITimTimResponseMessageListArgs struct { - MbeanList *TimMBeanList `thrift:"mbeanList,1" json:"mbeanList"` - Auth *TimAuth `thrift:"auth,2" json:"auth"` -} - -func NewITimTimResponseMessageListArgs() *ITimTimResponseMessageListArgs { - return &ITimTimResponseMessageListArgs{} -} - -var ITimTimResponseMessageListArgs_MbeanList_DEFAULT *TimMBeanList - -func (p *ITimTimResponseMessageListArgs) GetMbeanList() *TimMBeanList { - if !p.IsSetMbeanList() { - return ITimTimResponseMessageListArgs_MbeanList_DEFAULT - } - return p.MbeanList -} - -var ITimTimResponseMessageListArgs_Auth_DEFAULT *TimAuth - -func (p *ITimTimResponseMessageListArgs) GetAuth() *TimAuth { - if !p.IsSetAuth() { - return ITimTimResponseMessageListArgs_Auth_DEFAULT - } - return p.Auth -} -func (p *ITimTimResponseMessageListArgs) IsSetMbeanList() bool { - return p.MbeanList != nil -} - -func (p *ITimTimResponseMessageListArgs) IsSetAuth() bool { - return p.Auth != nil -} - -func (p *ITimTimResponseMessageListArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimResponseMessageListArgs) readField1(iprot thrift.TProtocol) error { - p.MbeanList = &TimMBeanList{} - if err := p.MbeanList.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.MbeanList), err) - } - return nil -} - -func (p *ITimTimResponseMessageListArgs) readField2(iprot thrift.TProtocol) error { - p.Auth = &TimAuth{} - if err := p.Auth.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) - } - return nil -} - -func (p *ITimTimResponseMessageListArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timResponseMessageList_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimResponseMessageListArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("mbeanList", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:mbeanList: ", p), err) - } - if err := p.MbeanList.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.MbeanList), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:mbeanList: ", p), err) - } - return err -} - -func (p *ITimTimResponseMessageListArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("auth", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:auth: ", p), err) - } - if err := p.Auth.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:auth: ", p), err) - } - return err -} - -func (p *ITimTimResponseMessageListArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimResponseMessageListArgs(%+v)", *p) -} - -// Attributes: -// - Success -type ITimTimResponseMessageListResult struct { - Success *TimResponseBean `thrift:"success,0" json:"success,omitempty"` -} - -func NewITimTimResponseMessageListResult() *ITimTimResponseMessageListResult { - return &ITimTimResponseMessageListResult{} -} - -var ITimTimResponseMessageListResult_Success_DEFAULT *TimResponseBean - -func (p *ITimTimResponseMessageListResult) GetSuccess() *TimResponseBean { - if !p.IsSetSuccess() { - return ITimTimResponseMessageListResult_Success_DEFAULT - } - return p.Success -} -func (p *ITimTimResponseMessageListResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *ITimTimResponseMessageListResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimResponseMessageListResult) readField0(iprot thrift.TProtocol) error { - p.Success = &TimResponseBean{} - if err := p.Success.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) - } - return nil -} - -func (p *ITimTimResponseMessageListResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timResponseMessageList_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimResponseMessageListResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := p.Success.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *ITimTimResponseMessageListResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimResponseMessageListResult(%+v)", *p) -} diff --git a/protocols/gen-go/protocol/constants.go b/protocols/gen-go/protocol/tim-consts.go similarity index 60% rename from protocols/gen-go/protocol/constants.go rename to protocols/gen-go/protocol/tim-consts.go index 8f1bc92..8f13ef8 100644 --- a/protocols/gen-go/protocol/constants.go +++ b/protocols/gen-go/protocol/tim-consts.go @@ -1,17 +1,22 @@ -// Autogenerated by Thrift Compiler (0.9.3) -// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +// Code generated by Thrift Compiler (0.17.0). DO NOT EDIT. package protocol import ( "bytes" + "context" + "errors" "fmt" - "git.apache.org/thrift.git/lib/go/thrift" + "time" + thrift "github.com/apache/thrift/lib/go/thrift" ) // (needed to ensure safety because of naive import list construction.) var _ = thrift.ZERO var _ = fmt.Printf +var _ = errors.New +var _ = context.Background +var _ = time.Now var _ = bytes.Equal const Protocolversion = 4 @@ -21,3 +26,4 @@ const TIM_SC_FAILED = "400" func init() { } + diff --git a/protocols/gen-go/protocol/tim.go b/protocols/gen-go/protocol/tim.go new file mode 100644 index 0000000..856960c --- /dev/null +++ b/protocols/gen-go/protocol/tim.go @@ -0,0 +1,14297 @@ +// Code generated by Thrift Compiler (0.17.0). DO NOT EDIT. + +package protocol + +import ( + "bytes" + "context" + "errors" + "fmt" + "time" + thrift "github.com/apache/thrift/lib/go/thrift" +) + +// (needed to ensure safety because of naive import list construction.) +var _ = thrift.ZERO +var _ = fmt.Printf +var _ = errors.New +var _ = context.Background +var _ = time.Now +var _ = bytes.Equal + +// Attributes: +// - ErrCode: 错误码 +// - ErrMsg: 错误内容 +type TimError struct { + ErrCode *int32 `thrift:"errCode,1" db:"errCode" json:"errCode,omitempty"` + ErrMsg *string `thrift:"errMsg,2" db:"errMsg" json:"errMsg,omitempty"` +} + +func NewTimError() *TimError { + return &TimError{} +} + +var TimError_ErrCode_DEFAULT int32 +func (p *TimError) GetErrCode() int32 { + if !p.IsSetErrCode() { + return TimError_ErrCode_DEFAULT + } +return *p.ErrCode +} +var TimError_ErrMsg_DEFAULT string +func (p *TimError) GetErrMsg() string { + if !p.IsSetErrMsg() { + return TimError_ErrMsg_DEFAULT + } +return *p.ErrMsg +} +func (p *TimError) IsSetErrCode() bool { + return p.ErrCode != nil +} + +func (p *TimError) IsSetErrMsg() bool { + return p.ErrMsg != nil +} + +func (p *TimError) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.I32 { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimError) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.ErrCode = &v +} + return nil +} + +func (p *TimError) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.ErrMsg = &v +} + return nil +} + +func (p *TimError) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimError"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimError) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetErrCode() { + if err := oprot.WriteFieldBegin(ctx, "errCode", thrift.I32, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:errCode: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.ErrCode)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.errCode (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:errCode: ", p), err) } + } + return err +} + +func (p *TimError) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetErrMsg() { + if err := oprot.WriteFieldBegin(ctx, "errMsg", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:errMsg: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.ErrMsg)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.errMsg (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:errMsg: ", p), err) } + } + return err +} + +func (p *TimError) Equals(other *TimError) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.ErrCode != other.ErrCode { + if p.ErrCode == nil || other.ErrCode == nil { + return false + } + if (*p.ErrCode) != (*other.ErrCode) { return false } + } + if p.ErrMsg != other.ErrMsg { + if p.ErrMsg == nil || other.ErrMsg == nil { + return false + } + if (*p.ErrMsg) != (*other.ErrMsg) { return false } + } + return true +} + +func (p *TimError) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimError(%+v)", *p) +} + +// Attributes: +// - Key: 键 +// - Value: 值 +type TimNode struct { + Key *string `thrift:"key,1" db:"key" json:"key,omitempty"` + Value *string `thrift:"value,2" db:"value" json:"value,omitempty"` +} + +func NewTimNode() *TimNode { + return &TimNode{} +} + +var TimNode_Key_DEFAULT string +func (p *TimNode) GetKey() string { + if !p.IsSetKey() { + return TimNode_Key_DEFAULT + } +return *p.Key +} +var TimNode_Value_DEFAULT string +func (p *TimNode) GetValue() string { + if !p.IsSetValue() { + return TimNode_Value_DEFAULT + } +return *p.Value +} +func (p *TimNode) IsSetKey() bool { + return p.Key != nil +} + +func (p *TimNode) IsSetValue() bool { + return p.Value != nil +} + +func (p *TimNode) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimNode) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Key = &v +} + return nil +} + +func (p *TimNode) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Value = &v +} + return nil +} + +func (p *TimNode) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimNode"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimNode) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetKey() { + if err := oprot.WriteFieldBegin(ctx, "key", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:key: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Key)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.key (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:key: ", p), err) } + } + return err +} + +func (p *TimNode) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetValue() { + if err := oprot.WriteFieldBegin(ctx, "value", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:value: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Value)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.value (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:value: ", p), err) } + } + return err +} + +func (p *TimNode) Equals(other *TimNode) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Key != other.Key { + if p.Key == nil || other.Key == nil { + return false + } + if (*p.Key) != (*other.Key) { return false } + } + if p.Value != other.Value { + if p.Value == nil || other.Value == nil { + return false + } + if (*p.Value) != (*other.Value) { return false } + } + return true +} + +func (p *TimNode) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimNode(%+v)", *p) +} + +// Attributes: +// - ID: id,返回所要回执协议的线程id +// - AckType: 类型,自定义 如:ping,message等 +// - AckStatus: 状态,如成功,失败等 +// - ExtraList: 附加信息 +// - Err: 错误信息 +// - ExtraMap +type TimAckBean struct { + ID *string `thrift:"id,1" db:"id" json:"id,omitempty"` + AckType *string `thrift:"ackType,2" db:"ackType" json:"ackType,omitempty"` + AckStatus *string `thrift:"ackStatus,3" db:"ackStatus" json:"ackStatus,omitempty"` + ExtraList []*TimNode `thrift:"extraList,4" db:"extraList" json:"extraList,omitempty"` + Err *TimError `thrift:"err,5" db:"err" json:"err,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,6" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimAckBean() *TimAckBean { + return &TimAckBean{} +} + +var TimAckBean_ID_DEFAULT string +func (p *TimAckBean) GetID() string { + if !p.IsSetID() { + return TimAckBean_ID_DEFAULT + } +return *p.ID +} +var TimAckBean_AckType_DEFAULT string +func (p *TimAckBean) GetAckType() string { + if !p.IsSetAckType() { + return TimAckBean_AckType_DEFAULT + } +return *p.AckType +} +var TimAckBean_AckStatus_DEFAULT string +func (p *TimAckBean) GetAckStatus() string { + if !p.IsSetAckStatus() { + return TimAckBean_AckStatus_DEFAULT + } +return *p.AckStatus +} +var TimAckBean_ExtraList_DEFAULT []*TimNode + +func (p *TimAckBean) GetExtraList() []*TimNode { + return p.ExtraList +} +var TimAckBean_Err_DEFAULT *TimError +func (p *TimAckBean) GetErr() *TimError { + if !p.IsSetErr() { + return TimAckBean_Err_DEFAULT + } +return p.Err +} +var TimAckBean_ExtraMap_DEFAULT map[string]string + +func (p *TimAckBean) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimAckBean) IsSetID() bool { + return p.ID != nil +} + +func (p *TimAckBean) IsSetAckType() bool { + return p.AckType != nil +} + +func (p *TimAckBean) IsSetAckStatus() bool { + return p.AckStatus != nil +} + +func (p *TimAckBean) IsSetExtraList() bool { + return p.ExtraList != nil +} + +func (p *TimAckBean) IsSetErr() bool { + return p.Err != nil +} + +func (p *TimAckBean) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimAckBean) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.LIST { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.MAP { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimAckBean) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.ID = &v +} + return nil +} + +func (p *TimAckBean) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.AckType = &v +} + return nil +} + +func (p *TimAckBean) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.AckStatus = &v +} + return nil +} + +func (p *TimAckBean) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TimNode, 0, size) + p.ExtraList = tSlice + for i := 0; i < size; i ++ { + _elem0 := &TimNode{} + if err := _elem0.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem0), err) + } + p.ExtraList = append(p.ExtraList, _elem0) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimAckBean) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + p.Err = &TimError{} + if err := p.Err.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Err), err) + } + return nil +} + +func (p *TimAckBean) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key1 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key1 = v +} +var _val2 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val2 = v +} + p.ExtraMap[_key1] = _val2 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimAckBean) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimAckBean"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimAckBean) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetID() { + if err := oprot.WriteFieldBegin(ctx, "id", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:id: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.ID)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.id (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:id: ", p), err) } + } + return err +} + +func (p *TimAckBean) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetAckType() { + if err := oprot.WriteFieldBegin(ctx, "ackType", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:ackType: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.AckType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.ackType (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:ackType: ", p), err) } + } + return err +} + +func (p *TimAckBean) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetAckStatus() { + if err := oprot.WriteFieldBegin(ctx, "ackStatus", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:ackStatus: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.AckStatus)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.ackStatus (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:ackStatus: ", p), err) } + } + return err +} + +func (p *TimAckBean) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraList() { + if err := oprot.WriteFieldBegin(ctx, "extraList", thrift.LIST, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ExtraList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ExtraList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraList: ", p), err) } + } + return err +} + +func (p *TimAckBean) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetErr() { + if err := oprot.WriteFieldBegin(ctx, "err", thrift.STRUCT, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:err: ", p), err) } + if err := p.Err.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Err), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:err: ", p), err) } + } + return err +} + +func (p *TimAckBean) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:extraMap: ", p), err) } + } + return err +} + +func (p *TimAckBean) Equals(other *TimAckBean) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.ID != other.ID { + if p.ID == nil || other.ID == nil { + return false + } + if (*p.ID) != (*other.ID) { return false } + } + if p.AckType != other.AckType { + if p.AckType == nil || other.AckType == nil { + return false + } + if (*p.AckType) != (*other.AckType) { return false } + } + if p.AckStatus != other.AckStatus { + if p.AckStatus == nil || other.AckStatus == nil { + return false + } + if (*p.AckStatus) != (*other.AckStatus) { return false } + } + if len(p.ExtraList) != len(other.ExtraList) { return false } + for i, _tgt := range p.ExtraList { + _src3 := other.ExtraList[i] + if !_tgt.Equals(_src3) { return false } + } + if !p.Err.Equals(other.Err) { return false } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src4 := other.ExtraMap[k] + if _tgt != _src4 { return false } + } + return true +} + +func (p *TimAckBean) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimAckBean(%+v)", *p) +} + +// Attributes: +// - Chl: 渠道 +// - Platform: 平台 +// - Version: version 客户端协议版本 +type TimHBean struct { + Chl int32 `thrift:"chl,1,required" db:"chl" json:"chl"` + Platform *int32 `thrift:"platform,2" db:"platform" json:"platform,omitempty"` + Version int16 `thrift:"version,3,required" db:"version" json:"version"` +} + +func NewTimHBean() *TimHBean { + return &TimHBean{} +} + + +func (p *TimHBean) GetChl() int32 { + return p.Chl +} +var TimHBean_Platform_DEFAULT int32 +func (p *TimHBean) GetPlatform() int32 { + if !p.IsSetPlatform() { + return TimHBean_Platform_DEFAULT + } +return *p.Platform +} + +func (p *TimHBean) GetVersion() int16 { + return p.Version +} +func (p *TimHBean) IsSetPlatform() bool { + return p.Platform != nil +} + +func (p *TimHBean) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetChl bool = false; + var issetVersion bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.I32 { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetChl = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.I32 { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.I16 { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + issetVersion = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetChl{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Chl is not set")); + } + if !issetVersion{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Version is not set")); + } + return nil +} + +func (p *TimHBean) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Chl = v +} + return nil +} + +func (p *TimHBean) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Platform = &v +} + return nil +} + +func (p *TimHBean) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI16(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Version = v +} + return nil +} + +func (p *TimHBean) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimHBean"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimHBean) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "chl", thrift.I32, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:chl: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.Chl)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.chl (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:chl: ", p), err) } + return err +} + +func (p *TimHBean) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetPlatform() { + if err := oprot.WriteFieldBegin(ctx, "platform", thrift.I32, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:platform: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.Platform)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.platform (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:platform: ", p), err) } + } + return err +} + +func (p *TimHBean) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "version", thrift.I16, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:version: ", p), err) } + if err := oprot.WriteI16(ctx, int16(p.Version)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.version (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:version: ", p), err) } + return err +} + +func (p *TimHBean) Equals(other *TimHBean) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Chl != other.Chl { return false } + if p.Platform != other.Platform { + if p.Platform == nil || other.Platform == nil { + return false + } + if (*p.Platform) != (*other.Platform) { return false } + } + if p.Version != other.Version { return false } + return true +} + +func (p *TimHBean) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimHBean(%+v)", *p) +} + +// Attributes: +// - Timestamp: 服务器时间 +// - Version: 版本 +// - Lang: 语言 +// - ExtraList: 附加信息 +// - ExtraMap +// - Interflow: 消息合流 +// - TLS: tls +type TimParam struct { + Timestamp *string `thrift:"timestamp,1" db:"timestamp" json:"timestamp,omitempty"` + Version *int16 `thrift:"version,2" db:"version" json:"version,omitempty"` + Lang *string `thrift:"lang,3" db:"lang" json:"lang,omitempty"` + ExtraList []*TimNode `thrift:"extraList,4" db:"extraList" json:"extraList,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,5" db:"extraMap" json:"extraMap,omitempty"` + Interflow *string `thrift:"interflow,6" db:"interflow" json:"interflow,omitempty"` + TLS *string `thrift:"tls,7" db:"tls" json:"tls,omitempty"` +} + +func NewTimParam() *TimParam { + return &TimParam{} +} + +var TimParam_Timestamp_DEFAULT string +func (p *TimParam) GetTimestamp() string { + if !p.IsSetTimestamp() { + return TimParam_Timestamp_DEFAULT + } +return *p.Timestamp +} +var TimParam_Version_DEFAULT int16 +func (p *TimParam) GetVersion() int16 { + if !p.IsSetVersion() { + return TimParam_Version_DEFAULT + } +return *p.Version +} +var TimParam_Lang_DEFAULT string +func (p *TimParam) GetLang() string { + if !p.IsSetLang() { + return TimParam_Lang_DEFAULT + } +return *p.Lang +} +var TimParam_ExtraList_DEFAULT []*TimNode + +func (p *TimParam) GetExtraList() []*TimNode { + return p.ExtraList +} +var TimParam_ExtraMap_DEFAULT map[string]string + +func (p *TimParam) GetExtraMap() map[string]string { + return p.ExtraMap +} +var TimParam_Interflow_DEFAULT string +func (p *TimParam) GetInterflow() string { + if !p.IsSetInterflow() { + return TimParam_Interflow_DEFAULT + } +return *p.Interflow +} +var TimParam_TLS_DEFAULT string +func (p *TimParam) GetTLS() string { + if !p.IsSetTLS() { + return TimParam_TLS_DEFAULT + } +return *p.TLS +} +func (p *TimParam) IsSetTimestamp() bool { + return p.Timestamp != nil +} + +func (p *TimParam) IsSetVersion() bool { + return p.Version != nil +} + +func (p *TimParam) IsSetLang() bool { + return p.Lang != nil +} + +func (p *TimParam) IsSetExtraList() bool { + return p.ExtraList != nil +} + +func (p *TimParam) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimParam) IsSetInterflow() bool { + return p.Interflow != nil +} + +func (p *TimParam) IsSetTLS() bool { + return p.TLS != nil +} + +func (p *TimParam) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.I16 { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.LIST { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.MAP { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.STRING { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.STRING { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimParam) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Timestamp = &v +} + return nil +} + +func (p *TimParam) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI16(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Version = &v +} + return nil +} + +func (p *TimParam) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Lang = &v +} + return nil +} + +func (p *TimParam) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TimNode, 0, size) + p.ExtraList = tSlice + for i := 0; i < size; i ++ { + _elem5 := &TimNode{} + if err := _elem5.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem5), err) + } + p.ExtraList = append(p.ExtraList, _elem5) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimParam) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key6 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key6 = v +} +var _val7 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val7 = v +} + p.ExtraMap[_key6] = _val7 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimParam) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) +} else { + p.Interflow = &v +} + return nil +} + +func (p *TimParam) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 7: ", err) +} else { + p.TLS = &v +} + return nil +} + +func (p *TimParam) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimParam"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimParam) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimestamp() { + if err := oprot.WriteFieldBegin(ctx, "timestamp", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:timestamp: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Timestamp)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.timestamp (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:timestamp: ", p), err) } + } + return err +} + +func (p *TimParam) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetVersion() { + if err := oprot.WriteFieldBegin(ctx, "version", thrift.I16, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:version: ", p), err) } + if err := oprot.WriteI16(ctx, int16(*p.Version)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.version (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:version: ", p), err) } + } + return err +} + +func (p *TimParam) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetLang() { + if err := oprot.WriteFieldBegin(ctx, "lang", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:lang: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Lang)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.lang (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:lang: ", p), err) } + } + return err +} + +func (p *TimParam) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraList() { + if err := oprot.WriteFieldBegin(ctx, "extraList", thrift.LIST, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ExtraList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ExtraList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraList: ", p), err) } + } + return err +} + +func (p *TimParam) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:extraMap: ", p), err) } + } + return err +} + +func (p *TimParam) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetInterflow() { + if err := oprot.WriteFieldBegin(ctx, "interflow", thrift.STRING, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:interflow: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Interflow)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.interflow (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:interflow: ", p), err) } + } + return err +} + +func (p *TimParam) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTLS() { + if err := oprot.WriteFieldBegin(ctx, "tls", thrift.STRING, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:tls: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.TLS)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.tls (7) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:tls: ", p), err) } + } + return err +} + +func (p *TimParam) Equals(other *TimParam) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Timestamp != other.Timestamp { + if p.Timestamp == nil || other.Timestamp == nil { + return false + } + if (*p.Timestamp) != (*other.Timestamp) { return false } + } + if p.Version != other.Version { + if p.Version == nil || other.Version == nil { + return false + } + if (*p.Version) != (*other.Version) { return false } + } + if p.Lang != other.Lang { + if p.Lang == nil || other.Lang == nil { + return false + } + if (*p.Lang) != (*other.Lang) { return false } + } + if len(p.ExtraList) != len(other.ExtraList) { return false } + for i, _tgt := range p.ExtraList { + _src8 := other.ExtraList[i] + if !_tgt.Equals(_src8) { return false } + } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src9 := other.ExtraMap[k] + if _tgt != _src9 { return false } + } + if p.Interflow != other.Interflow { + if p.Interflow == nil || other.Interflow == nil { + return false + } + if (*p.Interflow) != (*other.Interflow) { return false } + } + if p.TLS != other.TLS { + if p.TLS == nil || other.TLS == nil { + return false + } + if (*p.TLS) != (*other.TLS) { return false } + } + return true +} + +func (p *TimParam) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimParam(%+v)", *p) +} + +// Attributes: +// - Timestamp: 时间戳 (毫秒) +// - Formattime: 格式化时间 +type TimTime struct { + Timestamp *string `thrift:"timestamp,1" db:"timestamp" json:"timestamp,omitempty"` + Formattime *string `thrift:"formattime,2" db:"formattime" json:"formattime,omitempty"` +} + +func NewTimTime() *TimTime { + return &TimTime{} +} + +var TimTime_Timestamp_DEFAULT string +func (p *TimTime) GetTimestamp() string { + if !p.IsSetTimestamp() { + return TimTime_Timestamp_DEFAULT + } +return *p.Timestamp +} +var TimTime_Formattime_DEFAULT string +func (p *TimTime) GetFormattime() string { + if !p.IsSetFormattime() { + return TimTime_Formattime_DEFAULT + } +return *p.Formattime +} +func (p *TimTime) IsSetTimestamp() bool { + return p.Timestamp != nil +} + +func (p *TimTime) IsSetFormattime() bool { + return p.Formattime != nil +} + +func (p *TimTime) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimTime) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Timestamp = &v +} + return nil +} + +func (p *TimTime) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Formattime = &v +} + return nil +} + +func (p *TimTime) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimTime"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimTime) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimestamp() { + if err := oprot.WriteFieldBegin(ctx, "timestamp", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:timestamp: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Timestamp)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.timestamp (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:timestamp: ", p), err) } + } + return err +} + +func (p *TimTime) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetFormattime() { + if err := oprot.WriteFieldBegin(ctx, "formattime", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:formattime: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Formattime)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.formattime (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:formattime: ", p), err) } + } + return err +} + +func (p *TimTime) Equals(other *TimTime) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Timestamp != other.Timestamp { + if p.Timestamp == nil || other.Timestamp == nil { + return false + } + if (*p.Timestamp) != (*other.Timestamp) { return false } + } + if p.Formattime != other.Formattime { + if p.Formattime == nil || other.Formattime == nil { + return false + } + if (*p.Formattime) != (*other.Formattime) { return false } + } + return true +} + +func (p *TimTime) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimTime(%+v)", *p) +} + +// Attributes: +// - Country: 国家 +// - Province: 省 +// - City: 市 +// - ExtraList: 附加信息:如区,镇,乡等 +// - ExtraMap +type TimArea struct { + Country *string `thrift:"country,1" db:"country" json:"country,omitempty"` + Province *string `thrift:"province,2" db:"province" json:"province,omitempty"` + City *string `thrift:"city,3" db:"city" json:"city,omitempty"` + ExtraList []*TimNode `thrift:"extraList,4" db:"extraList" json:"extraList,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,5" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimArea() *TimArea { + return &TimArea{} +} + +var TimArea_Country_DEFAULT string +func (p *TimArea) GetCountry() string { + if !p.IsSetCountry() { + return TimArea_Country_DEFAULT + } +return *p.Country +} +var TimArea_Province_DEFAULT string +func (p *TimArea) GetProvince() string { + if !p.IsSetProvince() { + return TimArea_Province_DEFAULT + } +return *p.Province +} +var TimArea_City_DEFAULT string +func (p *TimArea) GetCity() string { + if !p.IsSetCity() { + return TimArea_City_DEFAULT + } +return *p.City +} +var TimArea_ExtraList_DEFAULT []*TimNode + +func (p *TimArea) GetExtraList() []*TimNode { + return p.ExtraList +} +var TimArea_ExtraMap_DEFAULT map[string]string + +func (p *TimArea) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimArea) IsSetCountry() bool { + return p.Country != nil +} + +func (p *TimArea) IsSetProvince() bool { + return p.Province != nil +} + +func (p *TimArea) IsSetCity() bool { + return p.City != nil +} + +func (p *TimArea) IsSetExtraList() bool { + return p.ExtraList != nil +} + +func (p *TimArea) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimArea) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.LIST { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.MAP { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimArea) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Country = &v +} + return nil +} + +func (p *TimArea) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Province = &v +} + return nil +} + +func (p *TimArea) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.City = &v +} + return nil +} + +func (p *TimArea) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TimNode, 0, size) + p.ExtraList = tSlice + for i := 0; i < size; i ++ { + _elem10 := &TimNode{} + if err := _elem10.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem10), err) + } + p.ExtraList = append(p.ExtraList, _elem10) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimArea) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key11 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key11 = v +} +var _val12 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val12 = v +} + p.ExtraMap[_key11] = _val12 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimArea) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimArea"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimArea) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetCountry() { + if err := oprot.WriteFieldBegin(ctx, "country", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:country: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Country)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.country (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:country: ", p), err) } + } + return err +} + +func (p *TimArea) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetProvince() { + if err := oprot.WriteFieldBegin(ctx, "province", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:province: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Province)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.province (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:province: ", p), err) } + } + return err +} + +func (p *TimArea) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetCity() { + if err := oprot.WriteFieldBegin(ctx, "city", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:city: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.City)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.city (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:city: ", p), err) } + } + return err +} + +func (p *TimArea) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraList() { + if err := oprot.WriteFieldBegin(ctx, "extraList", thrift.LIST, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ExtraList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ExtraList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraList: ", p), err) } + } + return err +} + +func (p *TimArea) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:extraMap: ", p), err) } + } + return err +} + +func (p *TimArea) Equals(other *TimArea) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Country != other.Country { + if p.Country == nil || other.Country == nil { + return false + } + if (*p.Country) != (*other.Country) { return false } + } + if p.Province != other.Province { + if p.Province == nil || other.Province == nil { + return false + } + if (*p.Province) != (*other.Province) { return false } + } + if p.City != other.City { + if p.City == nil || other.City == nil { + return false + } + if (*p.City) != (*other.City) { return false } + } + if len(p.ExtraList) != len(other.ExtraList) { return false } + for i, _tgt := range p.ExtraList { + _src13 := other.ExtraList[i] + if !_tgt.Equals(_src13) { return false } + } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src14 := other.ExtraMap[k] + if _tgt != _src14 { return false } + } + return true +} + +func (p *TimArea) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimArea(%+v)", *p) +} + +// Attributes: +// - Name: 登陆名 用户登录号,房间号等 +// - Domain: 域名 用于区分渠道等 appid,appsecret +// - Resource: 系统 自行约定 如 : 1IOS,2android,3H5,4WEB 等 +// - Type: normal,group +// - ExtraList: 附加信息:如传递客户端信息 iphone6,xiaomi,huawei等 +// - ExtraMap +type Tid struct { + Name string `thrift:"name,1,required" db:"name" json:"name"` + Domain *string `thrift:"domain,2" db:"domain" json:"domain,omitempty"` + Resource *string `thrift:"resource,3" db:"resource" json:"resource,omitempty"` + Type *string `thrift:"type,4" db:"type" json:"type,omitempty"` + ExtraList []*TimNode `thrift:"extraList,5" db:"extraList" json:"extraList,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,6" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTid() *Tid { + return &Tid{} +} + + +func (p *Tid) GetName() string { + return p.Name +} +var Tid_Domain_DEFAULT string +func (p *Tid) GetDomain() string { + if !p.IsSetDomain() { + return Tid_Domain_DEFAULT + } +return *p.Domain +} +var Tid_Resource_DEFAULT string +func (p *Tid) GetResource() string { + if !p.IsSetResource() { + return Tid_Resource_DEFAULT + } +return *p.Resource +} +var Tid_Type_DEFAULT string +func (p *Tid) GetType() string { + if !p.IsSetType() { + return Tid_Type_DEFAULT + } +return *p.Type +} +var Tid_ExtraList_DEFAULT []*TimNode + +func (p *Tid) GetExtraList() []*TimNode { + return p.ExtraList +} +var Tid_ExtraMap_DEFAULT map[string]string + +func (p *Tid) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *Tid) IsSetDomain() bool { + return p.Domain != nil +} + +func (p *Tid) IsSetResource() bool { + return p.Resource != nil +} + +func (p *Tid) IsSetType() bool { + return p.Type != nil +} + +func (p *Tid) IsSetExtraList() bool { + return p.ExtraList != nil +} + +func (p *Tid) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *Tid) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetName bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetName = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.STRING { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.LIST { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.MAP { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetName{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set")); + } + return nil +} + +func (p *Tid) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Name = v +} + return nil +} + +func (p *Tid) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Domain = &v +} + return nil +} + +func (p *Tid) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Resource = &v +} + return nil +} + +func (p *Tid) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.Type = &v +} + return nil +} + +func (p *Tid) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TimNode, 0, size) + p.ExtraList = tSlice + for i := 0; i < size; i ++ { + _elem15 := &TimNode{} + if err := _elem15.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem15), err) + } + p.ExtraList = append(p.ExtraList, _elem15) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *Tid) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key16 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key16 = v +} +var _val17 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val17 = v +} + p.ExtraMap[_key16] = _val17 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *Tid) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "Tid"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *Tid) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Name)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.name (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) } + return err +} + +func (p *Tid) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetDomain() { + if err := oprot.WriteFieldBegin(ctx, "domain", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:domain: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Domain)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.domain (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:domain: ", p), err) } + } + return err +} + +func (p *Tid) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetResource() { + if err := oprot.WriteFieldBegin(ctx, "resource", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:resource: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Resource)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.resource (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:resource: ", p), err) } + } + return err +} + +func (p *Tid) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetType() { + if err := oprot.WriteFieldBegin(ctx, "type", thrift.STRING, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:type: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Type)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.type (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:type: ", p), err) } + } + return err +} + +func (p *Tid) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraList() { + if err := oprot.WriteFieldBegin(ctx, "extraList", thrift.LIST, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:extraList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ExtraList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ExtraList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:extraList: ", p), err) } + } + return err +} + +func (p *Tid) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:extraMap: ", p), err) } + } + return err +} + +func (p *Tid) Equals(other *Tid) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Name != other.Name { return false } + if p.Domain != other.Domain { + if p.Domain == nil || other.Domain == nil { + return false + } + if (*p.Domain) != (*other.Domain) { return false } + } + if p.Resource != other.Resource { + if p.Resource == nil || other.Resource == nil { + return false + } + if (*p.Resource) != (*other.Resource) { return false } + } + if p.Type != other.Type { + if p.Type == nil || other.Type == nil { + return false + } + if (*p.Type) != (*other.Type) { return false } + } + if len(p.ExtraList) != len(other.ExtraList) { return false } + for i, _tgt := range p.ExtraList { + _src18 := other.ExtraList[i] + if !_tgt.Equals(_src18) { return false } + } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src19 := other.ExtraMap[k] + if _tgt != _src19 { return false } + } + return true +} + +func (p *Tid) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("Tid(%+v)", *p) +} + +// Attributes: +// - Tid: 用户bean +// - Nickname: 昵称 +// - Remarkname: 备注名称 +// - Brithday: 生日 2000-01-01 +// - Gender: 性别 自行约定 如 : 0不知,1男,2女 +// - Headurl: 头像地址 http://xxx.jpg +// - Area: 地区 +// - Headbyte: 头像 +// - PhotoBytes: 其他图片 +// - ExtraList: 扩展字段 +// - ExtraMap +type TimUserBean struct { + Tid *Tid `thrift:"tid,1" db:"tid" json:"tid,omitempty"` + Nickname *string `thrift:"nickname,2" db:"nickname" json:"nickname,omitempty"` + Remarkname *string `thrift:"remarkname,3" db:"remarkname" json:"remarkname,omitempty"` + Brithday *string `thrift:"brithday,4" db:"brithday" json:"brithday,omitempty"` + Gender *int16 `thrift:"gender,5" db:"gender" json:"gender,omitempty"` + Headurl *string `thrift:"headurl,6" db:"headurl" json:"headurl,omitempty"` + Area *TimArea `thrift:"area,7" db:"area" json:"area,omitempty"` + Headbyte []byte `thrift:"headbyte,8" db:"headbyte" json:"headbyte,omitempty"` + PhotoBytes [][]byte `thrift:"photoBytes,9" db:"photoBytes" json:"photoBytes,omitempty"` + ExtraList []*TimNode `thrift:"extraList,10" db:"extraList" json:"extraList,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,11" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimUserBean() *TimUserBean { + return &TimUserBean{} +} + +var TimUserBean_Tid_DEFAULT *Tid +func (p *TimUserBean) GetTid() *Tid { + if !p.IsSetTid() { + return TimUserBean_Tid_DEFAULT + } +return p.Tid +} +var TimUserBean_Nickname_DEFAULT string +func (p *TimUserBean) GetNickname() string { + if !p.IsSetNickname() { + return TimUserBean_Nickname_DEFAULT + } +return *p.Nickname +} +var TimUserBean_Remarkname_DEFAULT string +func (p *TimUserBean) GetRemarkname() string { + if !p.IsSetRemarkname() { + return TimUserBean_Remarkname_DEFAULT + } +return *p.Remarkname +} +var TimUserBean_Brithday_DEFAULT string +func (p *TimUserBean) GetBrithday() string { + if !p.IsSetBrithday() { + return TimUserBean_Brithday_DEFAULT + } +return *p.Brithday +} +var TimUserBean_Gender_DEFAULT int16 +func (p *TimUserBean) GetGender() int16 { + if !p.IsSetGender() { + return TimUserBean_Gender_DEFAULT + } +return *p.Gender +} +var TimUserBean_Headurl_DEFAULT string +func (p *TimUserBean) GetHeadurl() string { + if !p.IsSetHeadurl() { + return TimUserBean_Headurl_DEFAULT + } +return *p.Headurl +} +var TimUserBean_Area_DEFAULT *TimArea +func (p *TimUserBean) GetArea() *TimArea { + if !p.IsSetArea() { + return TimUserBean_Area_DEFAULT + } +return p.Area +} +var TimUserBean_Headbyte_DEFAULT []byte + +func (p *TimUserBean) GetHeadbyte() []byte { + return p.Headbyte +} +var TimUserBean_PhotoBytes_DEFAULT [][]byte + +func (p *TimUserBean) GetPhotoBytes() [][]byte { + return p.PhotoBytes +} +var TimUserBean_ExtraList_DEFAULT []*TimNode + +func (p *TimUserBean) GetExtraList() []*TimNode { + return p.ExtraList +} +var TimUserBean_ExtraMap_DEFAULT map[string]string + +func (p *TimUserBean) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimUserBean) IsSetTid() bool { + return p.Tid != nil +} + +func (p *TimUserBean) IsSetNickname() bool { + return p.Nickname != nil +} + +func (p *TimUserBean) IsSetRemarkname() bool { + return p.Remarkname != nil +} + +func (p *TimUserBean) IsSetBrithday() bool { + return p.Brithday != nil +} + +func (p *TimUserBean) IsSetGender() bool { + return p.Gender != nil +} + +func (p *TimUserBean) IsSetHeadurl() bool { + return p.Headurl != nil +} + +func (p *TimUserBean) IsSetArea() bool { + return p.Area != nil +} + +func (p *TimUserBean) IsSetHeadbyte() bool { + return p.Headbyte != nil +} + +func (p *TimUserBean) IsSetPhotoBytes() bool { + return p.PhotoBytes != nil +} + +func (p *TimUserBean) IsSetExtraList() bool { + return p.ExtraList != nil +} + +func (p *TimUserBean) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimUserBean) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.STRING { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.I16 { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.STRING { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 8: + if fieldTypeId == thrift.STRING { + if err := p.ReadField8(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 9: + if fieldTypeId == thrift.LIST { + if err := p.ReadField9(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 10: + if fieldTypeId == thrift.LIST { + if err := p.ReadField10(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 11: + if fieldTypeId == thrift.MAP { + if err := p.ReadField11(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimUserBean) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Tid = &Tid{} + if err := p.Tid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) + } + return nil +} + +func (p *TimUserBean) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Nickname = &v +} + return nil +} + +func (p *TimUserBean) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Remarkname = &v +} + return nil +} + +func (p *TimUserBean) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.Brithday = &v +} + return nil +} + +func (p *TimUserBean) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI16(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) +} else { + p.Gender = &v +} + return nil +} + +func (p *TimUserBean) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) +} else { + p.Headurl = &v +} + return nil +} + +func (p *TimUserBean) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + p.Area = &TimArea{} + if err := p.Area.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Area), err) + } + return nil +} + +func (p *TimUserBean) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 8: ", err) +} else { + p.Headbyte = v +} + return nil +} + +func (p *TimUserBean) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([][]byte, 0, size) + p.PhotoBytes = tSlice + for i := 0; i < size; i ++ { +var _elem20 []byte + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem20 = v +} + p.PhotoBytes = append(p.PhotoBytes, _elem20) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimUserBean) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TimNode, 0, size) + p.ExtraList = tSlice + for i := 0; i < size; i ++ { + _elem21 := &TimNode{} + if err := _elem21.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem21), err) + } + p.ExtraList = append(p.ExtraList, _elem21) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimUserBean) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key22 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key22 = v +} +var _val23 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val23 = v +} + p.ExtraMap[_key22] = _val23 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimUserBean) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimUserBean"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + if err := p.writeField8(ctx, oprot); err != nil { return err } + if err := p.writeField9(ctx, oprot); err != nil { return err } + if err := p.writeField10(ctx, oprot); err != nil { return err } + if err := p.writeField11(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimUserBean) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTid() { + if err := oprot.WriteFieldBegin(ctx, "tid", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) } + if err := p.Tid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) } + } + return err +} + +func (p *TimUserBean) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetNickname() { + if err := oprot.WriteFieldBegin(ctx, "nickname", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:nickname: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Nickname)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.nickname (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:nickname: ", p), err) } + } + return err +} + +func (p *TimUserBean) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetRemarkname() { + if err := oprot.WriteFieldBegin(ctx, "remarkname", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:remarkname: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Remarkname)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.remarkname (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:remarkname: ", p), err) } + } + return err +} + +func (p *TimUserBean) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetBrithday() { + if err := oprot.WriteFieldBegin(ctx, "brithday", thrift.STRING, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:brithday: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Brithday)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.brithday (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:brithday: ", p), err) } + } + return err +} + +func (p *TimUserBean) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetGender() { + if err := oprot.WriteFieldBegin(ctx, "gender", thrift.I16, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:gender: ", p), err) } + if err := oprot.WriteI16(ctx, int16(*p.Gender)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.gender (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:gender: ", p), err) } + } + return err +} + +func (p *TimUserBean) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetHeadurl() { + if err := oprot.WriteFieldBegin(ctx, "headurl", thrift.STRING, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:headurl: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Headurl)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.headurl (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:headurl: ", p), err) } + } + return err +} + +func (p *TimUserBean) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetArea() { + if err := oprot.WriteFieldBegin(ctx, "area", thrift.STRUCT, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:area: ", p), err) } + if err := p.Area.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Area), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:area: ", p), err) } + } + return err +} + +func (p *TimUserBean) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetHeadbyte() { + if err := oprot.WriteFieldBegin(ctx, "headbyte", thrift.STRING, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:headbyte: ", p), err) } + if err := oprot.WriteBinary(ctx, p.Headbyte); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.headbyte (8) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:headbyte: ", p), err) } + } + return err +} + +func (p *TimUserBean) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetPhotoBytes() { + if err := oprot.WriteFieldBegin(ctx, "photoBytes", thrift.LIST, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:photoBytes: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.PhotoBytes)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.PhotoBytes { + if err := oprot.WriteBinary(ctx, v); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:photoBytes: ", p), err) } + } + return err +} + +func (p *TimUserBean) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraList() { + if err := oprot.WriteFieldBegin(ctx, "extraList", thrift.LIST, 10); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:extraList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ExtraList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ExtraList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 10:extraList: ", p), err) } + } + return err +} + +func (p *TimUserBean) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 11); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 11:extraMap: ", p), err) } + } + return err +} + +func (p *TimUserBean) Equals(other *TimUserBean) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Tid.Equals(other.Tid) { return false } + if p.Nickname != other.Nickname { + if p.Nickname == nil || other.Nickname == nil { + return false + } + if (*p.Nickname) != (*other.Nickname) { return false } + } + if p.Remarkname != other.Remarkname { + if p.Remarkname == nil || other.Remarkname == nil { + return false + } + if (*p.Remarkname) != (*other.Remarkname) { return false } + } + if p.Brithday != other.Brithday { + if p.Brithday == nil || other.Brithday == nil { + return false + } + if (*p.Brithday) != (*other.Brithday) { return false } + } + if p.Gender != other.Gender { + if p.Gender == nil || other.Gender == nil { + return false + } + if (*p.Gender) != (*other.Gender) { return false } + } + if p.Headurl != other.Headurl { + if p.Headurl == nil || other.Headurl == nil { + return false + } + if (*p.Headurl) != (*other.Headurl) { return false } + } + if !p.Area.Equals(other.Area) { return false } + if bytes.Compare(p.Headbyte, other.Headbyte) != 0 { return false } + if len(p.PhotoBytes) != len(other.PhotoBytes) { return false } + for i, _tgt := range p.PhotoBytes { + _src24 := other.PhotoBytes[i] + if bytes.Compare(_tgt, _src24) != 0 { return false } + } + if len(p.ExtraList) != len(other.ExtraList) { return false } + for i, _tgt := range p.ExtraList { + _src25 := other.ExtraList[i] + if !_tgt.Equals(_src25) { return false } + } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src26 := other.ExtraMap[k] + if _tgt != _src26 { return false } + } + return true +} + +func (p *TimUserBean) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimUserBean(%+v)", *p) +} + +// Attributes: +// - Tid: 房间Tid +// - FounderTid: 创建人Tid +// - HostsTid: 主持人Tid +// - MembersTid: memberTid +// - Headurl: 头像地址 http://xxx.jpg +// - RoomName: 房间名称 +// - Desc: 房间说明 +// - CreateTime: 房间创建时间 +// - ExtraList: 扩展字段 +// - ExtraMap +type TimRoom struct { + Tid *Tid `thrift:"tid,1" db:"tid" json:"tid,omitempty"` + FounderTid *Tid `thrift:"founderTid,2" db:"founderTid" json:"founderTid,omitempty"` + HostsTid []*Tid `thrift:"HostsTid,3" db:"HostsTid" json:"HostsTid,omitempty"` + MembersTid []*Tid `thrift:"membersTid,4" db:"membersTid" json:"membersTid,omitempty"` + Headurl *string `thrift:"headurl,5" db:"headurl" json:"headurl,omitempty"` + RoomName *string `thrift:"roomName,6" db:"roomName" json:"roomName,omitempty"` + Desc *string `thrift:"desc,7" db:"desc" json:"desc,omitempty"` + CreateTime *TimTime `thrift:"createTime,8" db:"createTime" json:"createTime,omitempty"` + ExtraList []*TimNode `thrift:"extraList,9" db:"extraList" json:"extraList,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,10" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimRoom() *TimRoom { + return &TimRoom{} +} + +var TimRoom_Tid_DEFAULT *Tid +func (p *TimRoom) GetTid() *Tid { + if !p.IsSetTid() { + return TimRoom_Tid_DEFAULT + } +return p.Tid +} +var TimRoom_FounderTid_DEFAULT *Tid +func (p *TimRoom) GetFounderTid() *Tid { + if !p.IsSetFounderTid() { + return TimRoom_FounderTid_DEFAULT + } +return p.FounderTid +} +var TimRoom_HostsTid_DEFAULT []*Tid + +func (p *TimRoom) GetHostsTid() []*Tid { + return p.HostsTid +} +var TimRoom_MembersTid_DEFAULT []*Tid + +func (p *TimRoom) GetMembersTid() []*Tid { + return p.MembersTid +} +var TimRoom_Headurl_DEFAULT string +func (p *TimRoom) GetHeadurl() string { + if !p.IsSetHeadurl() { + return TimRoom_Headurl_DEFAULT + } +return *p.Headurl +} +var TimRoom_RoomName_DEFAULT string +func (p *TimRoom) GetRoomName() string { + if !p.IsSetRoomName() { + return TimRoom_RoomName_DEFAULT + } +return *p.RoomName +} +var TimRoom_Desc_DEFAULT string +func (p *TimRoom) GetDesc() string { + if !p.IsSetDesc() { + return TimRoom_Desc_DEFAULT + } +return *p.Desc +} +var TimRoom_CreateTime_DEFAULT *TimTime +func (p *TimRoom) GetCreateTime() *TimTime { + if !p.IsSetCreateTime() { + return TimRoom_CreateTime_DEFAULT + } +return p.CreateTime +} +var TimRoom_ExtraList_DEFAULT []*TimNode + +func (p *TimRoom) GetExtraList() []*TimNode { + return p.ExtraList +} +var TimRoom_ExtraMap_DEFAULT map[string]string + +func (p *TimRoom) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimRoom) IsSetTid() bool { + return p.Tid != nil +} + +func (p *TimRoom) IsSetFounderTid() bool { + return p.FounderTid != nil +} + +func (p *TimRoom) IsSetHostsTid() bool { + return p.HostsTid != nil +} + +func (p *TimRoom) IsSetMembersTid() bool { + return p.MembersTid != nil +} + +func (p *TimRoom) IsSetHeadurl() bool { + return p.Headurl != nil +} + +func (p *TimRoom) IsSetRoomName() bool { + return p.RoomName != nil +} + +func (p *TimRoom) IsSetDesc() bool { + return p.Desc != nil +} + +func (p *TimRoom) IsSetCreateTime() bool { + return p.CreateTime != nil +} + +func (p *TimRoom) IsSetExtraList() bool { + return p.ExtraList != nil +} + +func (p *TimRoom) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimRoom) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.LIST { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.LIST { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.STRING { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.STRING { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.STRING { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 8: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField8(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 9: + if fieldTypeId == thrift.LIST { + if err := p.ReadField9(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 10: + if fieldTypeId == thrift.MAP { + if err := p.ReadField10(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimRoom) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Tid = &Tid{} + if err := p.Tid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) + } + return nil +} + +func (p *TimRoom) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.FounderTid = &Tid{} + if err := p.FounderTid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.FounderTid), err) + } + return nil +} + +func (p *TimRoom) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*Tid, 0, size) + p.HostsTid = tSlice + for i := 0; i < size; i ++ { + _elem27 := &Tid{} + if err := _elem27.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem27), err) + } + p.HostsTid = append(p.HostsTid, _elem27) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimRoom) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*Tid, 0, size) + p.MembersTid = tSlice + for i := 0; i < size; i ++ { + _elem28 := &Tid{} + if err := _elem28.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem28), err) + } + p.MembersTid = append(p.MembersTid, _elem28) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimRoom) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) +} else { + p.Headurl = &v +} + return nil +} + +func (p *TimRoom) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) +} else { + p.RoomName = &v +} + return nil +} + +func (p *TimRoom) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 7: ", err) +} else { + p.Desc = &v +} + return nil +} + +func (p *TimRoom) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { + p.CreateTime = &TimTime{} + if err := p.CreateTime.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.CreateTime), err) + } + return nil +} + +func (p *TimRoom) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TimNode, 0, size) + p.ExtraList = tSlice + for i := 0; i < size; i ++ { + _elem29 := &TimNode{} + if err := _elem29.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem29), err) + } + p.ExtraList = append(p.ExtraList, _elem29) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimRoom) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key30 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key30 = v +} +var _val31 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val31 = v +} + p.ExtraMap[_key30] = _val31 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimRoom) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimRoom"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + if err := p.writeField8(ctx, oprot); err != nil { return err } + if err := p.writeField9(ctx, oprot); err != nil { return err } + if err := p.writeField10(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimRoom) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTid() { + if err := oprot.WriteFieldBegin(ctx, "tid", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) } + if err := p.Tid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) } + } + return err +} + +func (p *TimRoom) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetFounderTid() { + if err := oprot.WriteFieldBegin(ctx, "founderTid", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:founderTid: ", p), err) } + if err := p.FounderTid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.FounderTid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:founderTid: ", p), err) } + } + return err +} + +func (p *TimRoom) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetHostsTid() { + if err := oprot.WriteFieldBegin(ctx, "HostsTid", thrift.LIST, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:HostsTid: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.HostsTid)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.HostsTid { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:HostsTid: ", p), err) } + } + return err +} + +func (p *TimRoom) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetMembersTid() { + if err := oprot.WriteFieldBegin(ctx, "membersTid", thrift.LIST, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:membersTid: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.MembersTid)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.MembersTid { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:membersTid: ", p), err) } + } + return err +} + +func (p *TimRoom) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetHeadurl() { + if err := oprot.WriteFieldBegin(ctx, "headurl", thrift.STRING, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:headurl: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Headurl)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.headurl (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:headurl: ", p), err) } + } + return err +} + +func (p *TimRoom) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetRoomName() { + if err := oprot.WriteFieldBegin(ctx, "roomName", thrift.STRING, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:roomName: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.RoomName)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.roomName (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:roomName: ", p), err) } + } + return err +} + +func (p *TimRoom) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetDesc() { + if err := oprot.WriteFieldBegin(ctx, "desc", thrift.STRING, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:desc: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Desc)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.desc (7) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:desc: ", p), err) } + } + return err +} + +func (p *TimRoom) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetCreateTime() { + if err := oprot.WriteFieldBegin(ctx, "createTime", thrift.STRUCT, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:createTime: ", p), err) } + if err := p.CreateTime.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.CreateTime), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:createTime: ", p), err) } + } + return err +} + +func (p *TimRoom) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraList() { + if err := oprot.WriteFieldBegin(ctx, "extraList", thrift.LIST, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:extraList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ExtraList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ExtraList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:extraList: ", p), err) } + } + return err +} + +func (p *TimRoom) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 10); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 10:extraMap: ", p), err) } + } + return err +} + +func (p *TimRoom) Equals(other *TimRoom) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Tid.Equals(other.Tid) { return false } + if !p.FounderTid.Equals(other.FounderTid) { return false } + if len(p.HostsTid) != len(other.HostsTid) { return false } + for i, _tgt := range p.HostsTid { + _src32 := other.HostsTid[i] + if !_tgt.Equals(_src32) { return false } + } + if len(p.MembersTid) != len(other.MembersTid) { return false } + for i, _tgt := range p.MembersTid { + _src33 := other.MembersTid[i] + if !_tgt.Equals(_src33) { return false } + } + if p.Headurl != other.Headurl { + if p.Headurl == nil || other.Headurl == nil { + return false + } + if (*p.Headurl) != (*other.Headurl) { return false } + } + if p.RoomName != other.RoomName { + if p.RoomName == nil || other.RoomName == nil { + return false + } + if (*p.RoomName) != (*other.RoomName) { return false } + } + if p.Desc != other.Desc { + if p.Desc == nil || other.Desc == nil { + return false + } + if (*p.Desc) != (*other.Desc) { return false } + } + if !p.CreateTime.Equals(other.CreateTime) { return false } + if len(p.ExtraList) != len(other.ExtraList) { return false } + for i, _tgt := range p.ExtraList { + _src34 := other.ExtraList[i] + if !_tgt.Equals(_src34) { return false } + } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src35 := other.ExtraMap[k] + if _tgt != _src35 { return false } + } + return true +} + +func (p *TimRoom) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimRoom(%+v)", *p) +} + +// Attributes: +// - ThreadId: 标识 +// - FromTid +// - ToTid +// - Status: subscribe:订阅其他用户的状态 probe:请求获取其他用户的状态 unavailable:不可用,离线(offline)状态 +// - Type: normal:类似于email,主要特点是不要求响应; +// chat:类似于qq里的好友即时聊天,主要特点是实时通讯; +// groupchat:类似于聊天室里的群聊; +// headline:用于发送alert和notification; +// error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; +// - Priority: 优先权 0 。高优先级的resource能接受发送到bare JID的消息,低优先级的resource不能 +// - Show: chat:聊天中 away:暂时离开 xa:eXtend Away,长时间离开 dnd:勿打扰 online:在线 offline:离线 +// - LeaguerTid: 成员Tid 群聊时信息发送者Tid +// - ExtraList: 扩展字段 +// - Error: 错误码 +// - ExtraMap +type TimPBean struct { + ThreadId string `thrift:"threadId,1,required" db:"threadId" json:"threadId"` + FromTid *Tid `thrift:"fromTid,2" db:"fromTid" json:"fromTid,omitempty"` + ToTid *Tid `thrift:"toTid,3" db:"toTid" json:"toTid,omitempty"` + Status *string `thrift:"status,4" db:"status" json:"status,omitempty"` + Type *string `thrift:"type,5" db:"type" json:"type,omitempty"` + Priority *int32 `thrift:"priority,6" db:"priority" json:"priority,omitempty"` + Show *string `thrift:"show,7" db:"show" json:"show,omitempty"` + LeaguerTid *Tid `thrift:"leaguerTid,8" db:"leaguerTid" json:"leaguerTid,omitempty"` + ExtraList []*TimNode `thrift:"extraList,9" db:"extraList" json:"extraList,omitempty"` + Error *TimError `thrift:"error,10" db:"error" json:"error,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,11" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimPBean() *TimPBean { + return &TimPBean{} +} + + +func (p *TimPBean) GetThreadId() string { + return p.ThreadId +} +var TimPBean_FromTid_DEFAULT *Tid +func (p *TimPBean) GetFromTid() *Tid { + if !p.IsSetFromTid() { + return TimPBean_FromTid_DEFAULT + } +return p.FromTid +} +var TimPBean_ToTid_DEFAULT *Tid +func (p *TimPBean) GetToTid() *Tid { + if !p.IsSetToTid() { + return TimPBean_ToTid_DEFAULT + } +return p.ToTid +} +var TimPBean_Status_DEFAULT string +func (p *TimPBean) GetStatus() string { + if !p.IsSetStatus() { + return TimPBean_Status_DEFAULT + } +return *p.Status +} +var TimPBean_Type_DEFAULT string +func (p *TimPBean) GetType() string { + if !p.IsSetType() { + return TimPBean_Type_DEFAULT + } +return *p.Type +} +var TimPBean_Priority_DEFAULT int32 +func (p *TimPBean) GetPriority() int32 { + if !p.IsSetPriority() { + return TimPBean_Priority_DEFAULT + } +return *p.Priority +} +var TimPBean_Show_DEFAULT string +func (p *TimPBean) GetShow() string { + if !p.IsSetShow() { + return TimPBean_Show_DEFAULT + } +return *p.Show +} +var TimPBean_LeaguerTid_DEFAULT *Tid +func (p *TimPBean) GetLeaguerTid() *Tid { + if !p.IsSetLeaguerTid() { + return TimPBean_LeaguerTid_DEFAULT + } +return p.LeaguerTid +} +var TimPBean_ExtraList_DEFAULT []*TimNode + +func (p *TimPBean) GetExtraList() []*TimNode { + return p.ExtraList +} +var TimPBean_Error_DEFAULT *TimError +func (p *TimPBean) GetError() *TimError { + if !p.IsSetError() { + return TimPBean_Error_DEFAULT + } +return p.Error +} +var TimPBean_ExtraMap_DEFAULT map[string]string + +func (p *TimPBean) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimPBean) IsSetFromTid() bool { + return p.FromTid != nil +} + +func (p *TimPBean) IsSetToTid() bool { + return p.ToTid != nil +} + +func (p *TimPBean) IsSetStatus() bool { + return p.Status != nil +} + +func (p *TimPBean) IsSetType() bool { + return p.Type != nil +} + +func (p *TimPBean) IsSetPriority() bool { + return p.Priority != nil +} + +func (p *TimPBean) IsSetShow() bool { + return p.Show != nil +} + +func (p *TimPBean) IsSetLeaguerTid() bool { + return p.LeaguerTid != nil +} + +func (p *TimPBean) IsSetExtraList() bool { + return p.ExtraList != nil +} + +func (p *TimPBean) IsSetError() bool { + return p.Error != nil +} + +func (p *TimPBean) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimPBean) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetThreadId bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetThreadId = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.STRING { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.STRING { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.I32 { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.STRING { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 8: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField8(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 9: + if fieldTypeId == thrift.LIST { + if err := p.ReadField9(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 10: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField10(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 11: + if fieldTypeId == thrift.MAP { + if err := p.ReadField11(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetThreadId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ThreadId is not set")); + } + return nil +} + +func (p *TimPBean) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.ThreadId = v +} + return nil +} + +func (p *TimPBean) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.FromTid = &Tid{} + if err := p.FromTid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.FromTid), err) + } + return nil +} + +func (p *TimPBean) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + p.ToTid = &Tid{} + if err := p.ToTid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ToTid), err) + } + return nil +} + +func (p *TimPBean) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.Status = &v +} + return nil +} + +func (p *TimPBean) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) +} else { + p.Type = &v +} + return nil +} + +func (p *TimPBean) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) +} else { + p.Priority = &v +} + return nil +} + +func (p *TimPBean) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 7: ", err) +} else { + p.Show = &v +} + return nil +} + +func (p *TimPBean) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { + p.LeaguerTid = &Tid{} + if err := p.LeaguerTid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.LeaguerTid), err) + } + return nil +} + +func (p *TimPBean) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TimNode, 0, size) + p.ExtraList = tSlice + for i := 0; i < size; i ++ { + _elem36 := &TimNode{} + if err := _elem36.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem36), err) + } + p.ExtraList = append(p.ExtraList, _elem36) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimPBean) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { + p.Error = &TimError{} + if err := p.Error.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Error), err) + } + return nil +} + +func (p *TimPBean) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key37 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key37 = v +} +var _val38 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val38 = v +} + p.ExtraMap[_key37] = _val38 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimPBean) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimPBean"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + if err := p.writeField8(ctx, oprot); err != nil { return err } + if err := p.writeField9(ctx, oprot); err != nil { return err } + if err := p.writeField10(ctx, oprot); err != nil { return err } + if err := p.writeField11(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimPBean) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "threadId", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) } + if err := oprot.WriteString(ctx, string(p.ThreadId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) } + return err +} + +func (p *TimPBean) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetFromTid() { + if err := oprot.WriteFieldBegin(ctx, "fromTid", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:fromTid: ", p), err) } + if err := p.FromTid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.FromTid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:fromTid: ", p), err) } + } + return err +} + +func (p *TimPBean) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetToTid() { + if err := oprot.WriteFieldBegin(ctx, "toTid", thrift.STRUCT, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:toTid: ", p), err) } + if err := p.ToTid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ToTid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:toTid: ", p), err) } + } + return err +} + +func (p *TimPBean) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetStatus() { + if err := oprot.WriteFieldBegin(ctx, "status", thrift.STRING, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:status: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Status)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.status (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:status: ", p), err) } + } + return err +} + +func (p *TimPBean) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetType() { + if err := oprot.WriteFieldBegin(ctx, "type", thrift.STRING, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:type: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Type)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.type (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:type: ", p), err) } + } + return err +} + +func (p *TimPBean) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetPriority() { + if err := oprot.WriteFieldBegin(ctx, "priority", thrift.I32, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:priority: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.Priority)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.priority (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:priority: ", p), err) } + } + return err +} + +func (p *TimPBean) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetShow() { + if err := oprot.WriteFieldBegin(ctx, "show", thrift.STRING, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:show: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Show)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.show (7) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:show: ", p), err) } + } + return err +} + +func (p *TimPBean) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetLeaguerTid() { + if err := oprot.WriteFieldBegin(ctx, "leaguerTid", thrift.STRUCT, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:leaguerTid: ", p), err) } + if err := p.LeaguerTid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.LeaguerTid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:leaguerTid: ", p), err) } + } + return err +} + +func (p *TimPBean) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraList() { + if err := oprot.WriteFieldBegin(ctx, "extraList", thrift.LIST, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:extraList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ExtraList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ExtraList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:extraList: ", p), err) } + } + return err +} + +func (p *TimPBean) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetError() { + if err := oprot.WriteFieldBegin(ctx, "error", thrift.STRUCT, 10); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:error: ", p), err) } + if err := p.Error.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Error), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 10:error: ", p), err) } + } + return err +} + +func (p *TimPBean) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 11); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 11:extraMap: ", p), err) } + } + return err +} + +func (p *TimPBean) Equals(other *TimPBean) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.ThreadId != other.ThreadId { return false } + if !p.FromTid.Equals(other.FromTid) { return false } + if !p.ToTid.Equals(other.ToTid) { return false } + if p.Status != other.Status { + if p.Status == nil || other.Status == nil { + return false + } + if (*p.Status) != (*other.Status) { return false } + } + if p.Type != other.Type { + if p.Type == nil || other.Type == nil { + return false + } + if (*p.Type) != (*other.Type) { return false } + } + if p.Priority != other.Priority { + if p.Priority == nil || other.Priority == nil { + return false + } + if (*p.Priority) != (*other.Priority) { return false } + } + if p.Show != other.Show { + if p.Show == nil || other.Show == nil { + return false + } + if (*p.Show) != (*other.Show) { return false } + } + if !p.LeaguerTid.Equals(other.LeaguerTid) { return false } + if len(p.ExtraList) != len(other.ExtraList) { return false } + for i, _tgt := range p.ExtraList { + _src39 := other.ExtraList[i] + if !_tgt.Equals(_src39) { return false } + } + if !p.Error.Equals(other.Error) { return false } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src40 := other.ExtraMap[k] + if _tgt != _src40 { return false } + } + return true +} + +func (p *TimPBean) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimPBean(%+v)", *p) +} + +// Attributes: +// - ThreadId: 线程id +// - Mid: 消息id号 +// - FromTid: 来源Tid +// - ToTid: 目标Tid +// - Body: 信息内容 +// - Type: normal:类似于email,主要特点是不要求响应; +// chat:类似于qq里的好友即时聊天,主要特点是实时通讯; +// groupchat:类似于聊天室里的群聊; +// headline:用于发送alert和notification; +// error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; +// - MsgType: 消息类型 1 文字 2 图片 3 语音 4视频 5混合 +// - Offline: 是否离线信息 +// - LeaguerTid: 成员Tid 群聊时信息发送者Tid +// - ExtraList: 扩展字段 +// - Timestamp: 服务器发送信息时间戳(毫秒) +// - Error: 错误码 +// - ExtraMap +// - Readstatus: 0未读 1已读 +type TimMBean struct { + ThreadId string `thrift:"threadId,1,required" db:"threadId" json:"threadId"` + Mid *string `thrift:"mid,2" db:"mid" json:"mid,omitempty"` + FromTid *Tid `thrift:"fromTid,3" db:"fromTid" json:"fromTid,omitempty"` + ToTid *Tid `thrift:"toTid,4" db:"toTid" json:"toTid,omitempty"` + Body *string `thrift:"body,5" db:"body" json:"body,omitempty"` + Type *string `thrift:"type,6" db:"type" json:"type,omitempty"` + MsgType *int16 `thrift:"msgType,7" db:"msgType" json:"msgType,omitempty"` + Offline *TimTime `thrift:"offline,8" db:"offline" json:"offline,omitempty"` + LeaguerTid *Tid `thrift:"leaguerTid,9" db:"leaguerTid" json:"leaguerTid,omitempty"` + ExtraList []*TimNode `thrift:"extraList,10" db:"extraList" json:"extraList,omitempty"` + Timestamp *string `thrift:"timestamp,11" db:"timestamp" json:"timestamp,omitempty"` + Error *TimError `thrift:"error,12" db:"error" json:"error,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,13" db:"extraMap" json:"extraMap,omitempty"` + Readstatus *int16 `thrift:"readstatus,14" db:"readstatus" json:"readstatus,omitempty"` +} + +func NewTimMBean() *TimMBean { + return &TimMBean{} +} + + +func (p *TimMBean) GetThreadId() string { + return p.ThreadId +} +var TimMBean_Mid_DEFAULT string +func (p *TimMBean) GetMid() string { + if !p.IsSetMid() { + return TimMBean_Mid_DEFAULT + } +return *p.Mid +} +var TimMBean_FromTid_DEFAULT *Tid +func (p *TimMBean) GetFromTid() *Tid { + if !p.IsSetFromTid() { + return TimMBean_FromTid_DEFAULT + } +return p.FromTid +} +var TimMBean_ToTid_DEFAULT *Tid +func (p *TimMBean) GetToTid() *Tid { + if !p.IsSetToTid() { + return TimMBean_ToTid_DEFAULT + } +return p.ToTid +} +var TimMBean_Body_DEFAULT string +func (p *TimMBean) GetBody() string { + if !p.IsSetBody() { + return TimMBean_Body_DEFAULT + } +return *p.Body +} +var TimMBean_Type_DEFAULT string +func (p *TimMBean) GetType() string { + if !p.IsSetType() { + return TimMBean_Type_DEFAULT + } +return *p.Type +} +var TimMBean_MsgType_DEFAULT int16 +func (p *TimMBean) GetMsgType() int16 { + if !p.IsSetMsgType() { + return TimMBean_MsgType_DEFAULT + } +return *p.MsgType +} +var TimMBean_Offline_DEFAULT *TimTime +func (p *TimMBean) GetOffline() *TimTime { + if !p.IsSetOffline() { + return TimMBean_Offline_DEFAULT + } +return p.Offline +} +var TimMBean_LeaguerTid_DEFAULT *Tid +func (p *TimMBean) GetLeaguerTid() *Tid { + if !p.IsSetLeaguerTid() { + return TimMBean_LeaguerTid_DEFAULT + } +return p.LeaguerTid +} +var TimMBean_ExtraList_DEFAULT []*TimNode + +func (p *TimMBean) GetExtraList() []*TimNode { + return p.ExtraList +} +var TimMBean_Timestamp_DEFAULT string +func (p *TimMBean) GetTimestamp() string { + if !p.IsSetTimestamp() { + return TimMBean_Timestamp_DEFAULT + } +return *p.Timestamp +} +var TimMBean_Error_DEFAULT *TimError +func (p *TimMBean) GetError() *TimError { + if !p.IsSetError() { + return TimMBean_Error_DEFAULT + } +return p.Error +} +var TimMBean_ExtraMap_DEFAULT map[string]string + +func (p *TimMBean) GetExtraMap() map[string]string { + return p.ExtraMap +} +var TimMBean_Readstatus_DEFAULT int16 +func (p *TimMBean) GetReadstatus() int16 { + if !p.IsSetReadstatus() { + return TimMBean_Readstatus_DEFAULT + } +return *p.Readstatus +} +func (p *TimMBean) IsSetMid() bool { + return p.Mid != nil +} + +func (p *TimMBean) IsSetFromTid() bool { + return p.FromTid != nil +} + +func (p *TimMBean) IsSetToTid() bool { + return p.ToTid != nil +} + +func (p *TimMBean) IsSetBody() bool { + return p.Body != nil +} + +func (p *TimMBean) IsSetType() bool { + return p.Type != nil +} + +func (p *TimMBean) IsSetMsgType() bool { + return p.MsgType != nil +} + +func (p *TimMBean) IsSetOffline() bool { + return p.Offline != nil +} + +func (p *TimMBean) IsSetLeaguerTid() bool { + return p.LeaguerTid != nil +} + +func (p *TimMBean) IsSetExtraList() bool { + return p.ExtraList != nil +} + +func (p *TimMBean) IsSetTimestamp() bool { + return p.Timestamp != nil +} + +func (p *TimMBean) IsSetError() bool { + return p.Error != nil +} + +func (p *TimMBean) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimMBean) IsSetReadstatus() bool { + return p.Readstatus != nil +} + +func (p *TimMBean) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetThreadId bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetThreadId = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.STRING { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.STRING { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.I16 { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 8: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField8(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 9: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField9(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 10: + if fieldTypeId == thrift.LIST { + if err := p.ReadField10(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 11: + if fieldTypeId == thrift.STRING { + if err := p.ReadField11(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 12: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField12(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 13: + if fieldTypeId == thrift.MAP { + if err := p.ReadField13(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 14: + if fieldTypeId == thrift.I16 { + if err := p.ReadField14(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetThreadId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ThreadId is not set")); + } + return nil +} + +func (p *TimMBean) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.ThreadId = v +} + return nil +} + +func (p *TimMBean) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Mid = &v +} + return nil +} + +func (p *TimMBean) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + p.FromTid = &Tid{} + if err := p.FromTid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.FromTid), err) + } + return nil +} + +func (p *TimMBean) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + p.ToTid = &Tid{} + if err := p.ToTid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ToTid), err) + } + return nil +} + +func (p *TimMBean) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) +} else { + p.Body = &v +} + return nil +} + +func (p *TimMBean) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) +} else { + p.Type = &v +} + return nil +} + +func (p *TimMBean) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI16(ctx); err != nil { + return thrift.PrependError("error reading field 7: ", err) +} else { + p.MsgType = &v +} + return nil +} + +func (p *TimMBean) ReadField8(ctx context.Context, iprot thrift.TProtocol) error { + p.Offline = &TimTime{} + if err := p.Offline.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Offline), err) + } + return nil +} + +func (p *TimMBean) ReadField9(ctx context.Context, iprot thrift.TProtocol) error { + p.LeaguerTid = &Tid{} + if err := p.LeaguerTid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.LeaguerTid), err) + } + return nil +} + +func (p *TimMBean) ReadField10(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TimNode, 0, size) + p.ExtraList = tSlice + for i := 0; i < size; i ++ { + _elem41 := &TimNode{} + if err := _elem41.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem41), err) + } + p.ExtraList = append(p.ExtraList, _elem41) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimMBean) ReadField11(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 11: ", err) +} else { + p.Timestamp = &v +} + return nil +} + +func (p *TimMBean) ReadField12(ctx context.Context, iprot thrift.TProtocol) error { + p.Error = &TimError{} + if err := p.Error.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Error), err) + } + return nil +} + +func (p *TimMBean) ReadField13(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key42 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key42 = v +} +var _val43 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val43 = v +} + p.ExtraMap[_key42] = _val43 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimMBean) ReadField14(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI16(ctx); err != nil { + return thrift.PrependError("error reading field 14: ", err) +} else { + p.Readstatus = &v +} + return nil +} + +func (p *TimMBean) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimMBean"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + if err := p.writeField8(ctx, oprot); err != nil { return err } + if err := p.writeField9(ctx, oprot); err != nil { return err } + if err := p.writeField10(ctx, oprot); err != nil { return err } + if err := p.writeField11(ctx, oprot); err != nil { return err } + if err := p.writeField12(ctx, oprot); err != nil { return err } + if err := p.writeField13(ctx, oprot); err != nil { return err } + if err := p.writeField14(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimMBean) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "threadId", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) } + if err := oprot.WriteString(ctx, string(p.ThreadId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) } + return err +} + +func (p *TimMBean) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetMid() { + if err := oprot.WriteFieldBegin(ctx, "mid", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:mid: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Mid)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.mid (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:mid: ", p), err) } + } + return err +} + +func (p *TimMBean) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetFromTid() { + if err := oprot.WriteFieldBegin(ctx, "fromTid", thrift.STRUCT, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:fromTid: ", p), err) } + if err := p.FromTid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.FromTid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:fromTid: ", p), err) } + } + return err +} + +func (p *TimMBean) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetToTid() { + if err := oprot.WriteFieldBegin(ctx, "toTid", thrift.STRUCT, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:toTid: ", p), err) } + if err := p.ToTid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ToTid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:toTid: ", p), err) } + } + return err +} + +func (p *TimMBean) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetBody() { + if err := oprot.WriteFieldBegin(ctx, "body", thrift.STRING, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:body: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Body)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.body (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:body: ", p), err) } + } + return err +} + +func (p *TimMBean) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetType() { + if err := oprot.WriteFieldBegin(ctx, "type", thrift.STRING, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:type: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Type)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.type (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:type: ", p), err) } + } + return err +} + +func (p *TimMBean) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetMsgType() { + if err := oprot.WriteFieldBegin(ctx, "msgType", thrift.I16, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:msgType: ", p), err) } + if err := oprot.WriteI16(ctx, int16(*p.MsgType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.msgType (7) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:msgType: ", p), err) } + } + return err +} + +func (p *TimMBean) writeField8(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetOffline() { + if err := oprot.WriteFieldBegin(ctx, "offline", thrift.STRUCT, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:offline: ", p), err) } + if err := p.Offline.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Offline), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:offline: ", p), err) } + } + return err +} + +func (p *TimMBean) writeField9(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetLeaguerTid() { + if err := oprot.WriteFieldBegin(ctx, "leaguerTid", thrift.STRUCT, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:leaguerTid: ", p), err) } + if err := p.LeaguerTid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.LeaguerTid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:leaguerTid: ", p), err) } + } + return err +} + +func (p *TimMBean) writeField10(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraList() { + if err := oprot.WriteFieldBegin(ctx, "extraList", thrift.LIST, 10); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:extraList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ExtraList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ExtraList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 10:extraList: ", p), err) } + } + return err +} + +func (p *TimMBean) writeField11(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimestamp() { + if err := oprot.WriteFieldBegin(ctx, "timestamp", thrift.STRING, 11); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:timestamp: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Timestamp)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.timestamp (11) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 11:timestamp: ", p), err) } + } + return err +} + +func (p *TimMBean) writeField12(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetError() { + if err := oprot.WriteFieldBegin(ctx, "error", thrift.STRUCT, 12); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 12:error: ", p), err) } + if err := p.Error.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Error), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 12:error: ", p), err) } + } + return err +} + +func (p *TimMBean) writeField13(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 13); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 13:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 13:extraMap: ", p), err) } + } + return err +} + +func (p *TimMBean) writeField14(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetReadstatus() { + if err := oprot.WriteFieldBegin(ctx, "readstatus", thrift.I16, 14); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 14:readstatus: ", p), err) } + if err := oprot.WriteI16(ctx, int16(*p.Readstatus)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.readstatus (14) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 14:readstatus: ", p), err) } + } + return err +} + +func (p *TimMBean) Equals(other *TimMBean) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.ThreadId != other.ThreadId { return false } + if p.Mid != other.Mid { + if p.Mid == nil || other.Mid == nil { + return false + } + if (*p.Mid) != (*other.Mid) { return false } + } + if !p.FromTid.Equals(other.FromTid) { return false } + if !p.ToTid.Equals(other.ToTid) { return false } + if p.Body != other.Body { + if p.Body == nil || other.Body == nil { + return false + } + if (*p.Body) != (*other.Body) { return false } + } + if p.Type != other.Type { + if p.Type == nil || other.Type == nil { + return false + } + if (*p.Type) != (*other.Type) { return false } + } + if p.MsgType != other.MsgType { + if p.MsgType == nil || other.MsgType == nil { + return false + } + if (*p.MsgType) != (*other.MsgType) { return false } + } + if !p.Offline.Equals(other.Offline) { return false } + if !p.LeaguerTid.Equals(other.LeaguerTid) { return false } + if len(p.ExtraList) != len(other.ExtraList) { return false } + for i, _tgt := range p.ExtraList { + _src44 := other.ExtraList[i] + if !_tgt.Equals(_src44) { return false } + } + if p.Timestamp != other.Timestamp { + if p.Timestamp == nil || other.Timestamp == nil { + return false + } + if (*p.Timestamp) != (*other.Timestamp) { return false } + } + if !p.Error.Equals(other.Error) { return false } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src45 := other.ExtraMap[k] + if _tgt != _src45 { return false } + } + if p.Readstatus != other.Readstatus { + if p.Readstatus == nil || other.Readstatus == nil { + return false + } + if (*p.Readstatus) != (*other.Readstatus) { return false } + } + return true +} + +func (p *TimMBean) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimMBean(%+v)", *p) +} + +// Attributes: +// - ThreadId: 线程id +// - FromTid +// - ToTid +// - Type: Get :获取当前域值。类似于http get方法 +// Set :设置或替换get查询的值。类似于http put方法。 +// Result :说明成功的响应了先前的查询。类似于http状态码200。 +// Error: 查询和响应中出现的错误。 +// - ExtraList: 扩展字段 +// - Error: 错误码 +// - ExtraMap +type TimIqBean struct { + ThreadId string `thrift:"threadId,1,required" db:"threadId" json:"threadId"` + FromTid *Tid `thrift:"fromTid,2" db:"fromTid" json:"fromTid,omitempty"` + ToTid *Tid `thrift:"toTid,3" db:"toTid" json:"toTid,omitempty"` + Type *string `thrift:"type,4" db:"type" json:"type,omitempty"` + ExtraList []*TimNode `thrift:"extraList,5" db:"extraList" json:"extraList,omitempty"` + Error *TimError `thrift:"error,6" db:"error" json:"error,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,7" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimIqBean() *TimIqBean { + return &TimIqBean{} +} + + +func (p *TimIqBean) GetThreadId() string { + return p.ThreadId +} +var TimIqBean_FromTid_DEFAULT *Tid +func (p *TimIqBean) GetFromTid() *Tid { + if !p.IsSetFromTid() { + return TimIqBean_FromTid_DEFAULT + } +return p.FromTid +} +var TimIqBean_ToTid_DEFAULT *Tid +func (p *TimIqBean) GetToTid() *Tid { + if !p.IsSetToTid() { + return TimIqBean_ToTid_DEFAULT + } +return p.ToTid +} +var TimIqBean_Type_DEFAULT string +func (p *TimIqBean) GetType() string { + if !p.IsSetType() { + return TimIqBean_Type_DEFAULT + } +return *p.Type +} +var TimIqBean_ExtraList_DEFAULT []*TimNode + +func (p *TimIqBean) GetExtraList() []*TimNode { + return p.ExtraList +} +var TimIqBean_Error_DEFAULT *TimError +func (p *TimIqBean) GetError() *TimError { + if !p.IsSetError() { + return TimIqBean_Error_DEFAULT + } +return p.Error +} +var TimIqBean_ExtraMap_DEFAULT map[string]string + +func (p *TimIqBean) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimIqBean) IsSetFromTid() bool { + return p.FromTid != nil +} + +func (p *TimIqBean) IsSetToTid() bool { + return p.ToTid != nil +} + +func (p *TimIqBean) IsSetType() bool { + return p.Type != nil +} + +func (p *TimIqBean) IsSetExtraList() bool { + return p.ExtraList != nil +} + +func (p *TimIqBean) IsSetError() bool { + return p.Error != nil +} + +func (p *TimIqBean) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimIqBean) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetThreadId bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetThreadId = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.STRING { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.LIST { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.MAP { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetThreadId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ThreadId is not set")); + } + return nil +} + +func (p *TimIqBean) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.ThreadId = v +} + return nil +} + +func (p *TimIqBean) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.FromTid = &Tid{} + if err := p.FromTid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.FromTid), err) + } + return nil +} + +func (p *TimIqBean) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + p.ToTid = &Tid{} + if err := p.ToTid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ToTid), err) + } + return nil +} + +func (p *TimIqBean) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.Type = &v +} + return nil +} + +func (p *TimIqBean) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TimNode, 0, size) + p.ExtraList = tSlice + for i := 0; i < size; i ++ { + _elem46 := &TimNode{} + if err := _elem46.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem46), err) + } + p.ExtraList = append(p.ExtraList, _elem46) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimIqBean) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + p.Error = &TimError{} + if err := p.Error.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Error), err) + } + return nil +} + +func (p *TimIqBean) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key47 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key47 = v +} +var _val48 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val48 = v +} + p.ExtraMap[_key47] = _val48 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimIqBean) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimIqBean"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimIqBean) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "threadId", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) } + if err := oprot.WriteString(ctx, string(p.ThreadId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) } + return err +} + +func (p *TimIqBean) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetFromTid() { + if err := oprot.WriteFieldBegin(ctx, "fromTid", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:fromTid: ", p), err) } + if err := p.FromTid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.FromTid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:fromTid: ", p), err) } + } + return err +} + +func (p *TimIqBean) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetToTid() { + if err := oprot.WriteFieldBegin(ctx, "toTid", thrift.STRUCT, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:toTid: ", p), err) } + if err := p.ToTid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ToTid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:toTid: ", p), err) } + } + return err +} + +func (p *TimIqBean) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetType() { + if err := oprot.WriteFieldBegin(ctx, "type", thrift.STRING, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:type: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Type)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.type (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:type: ", p), err) } + } + return err +} + +func (p *TimIqBean) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraList() { + if err := oprot.WriteFieldBegin(ctx, "extraList", thrift.LIST, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:extraList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ExtraList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ExtraList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:extraList: ", p), err) } + } + return err +} + +func (p *TimIqBean) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetError() { + if err := oprot.WriteFieldBegin(ctx, "error", thrift.STRUCT, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:error: ", p), err) } + if err := p.Error.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Error), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:error: ", p), err) } + } + return err +} + +func (p *TimIqBean) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:extraMap: ", p), err) } + } + return err +} + +func (p *TimIqBean) Equals(other *TimIqBean) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.ThreadId != other.ThreadId { return false } + if !p.FromTid.Equals(other.FromTid) { return false } + if !p.ToTid.Equals(other.ToTid) { return false } + if p.Type != other.Type { + if p.Type == nil || other.Type == nil { + return false + } + if (*p.Type) != (*other.Type) { return false } + } + if len(p.ExtraList) != len(other.ExtraList) { return false } + for i, _tgt := range p.ExtraList { + _src49 := other.ExtraList[i] + if !_tgt.Equals(_src49) { return false } + } + if !p.Error.Equals(other.Error) { return false } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src50 := other.ExtraMap[k] + if _tgt != _src50 { return false } + } + return true +} + +func (p *TimIqBean) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimIqBean(%+v)", *p) +} + +// Attributes: +// - Subscription: none表示用户和contact之前没有任何的关系(虽然在server的buddy list中存在) +// to表示用户能看到contact的presence,但是contact看不到用户的Presence +// from和to的含义相反,指用户看不到contact的presence,但是contact可以看到 +// both表示相关之间都能看到对方的presence +// - Tid +// - Name: 用户名 +// - ExtraMap +type TimRoster struct { + Subscription string `thrift:"subscription,1,required" db:"subscription" json:"subscription"` + Tid *Tid `thrift:"tid,2,required" db:"tid" json:"tid"` + Name *string `thrift:"name,3" db:"name" json:"name,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,4" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimRoster() *TimRoster { + return &TimRoster{} +} + + +func (p *TimRoster) GetSubscription() string { + return p.Subscription +} +var TimRoster_Tid_DEFAULT *Tid +func (p *TimRoster) GetTid() *Tid { + if !p.IsSetTid() { + return TimRoster_Tid_DEFAULT + } +return p.Tid +} +var TimRoster_Name_DEFAULT string +func (p *TimRoster) GetName() string { + if !p.IsSetName() { + return TimRoster_Name_DEFAULT + } +return *p.Name +} +var TimRoster_ExtraMap_DEFAULT map[string]string + +func (p *TimRoster) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimRoster) IsSetTid() bool { + return p.Tid != nil +} + +func (p *TimRoster) IsSetName() bool { + return p.Name != nil +} + +func (p *TimRoster) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimRoster) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetSubscription bool = false; + var issetTid bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetSubscription = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetTid = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.MAP { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetSubscription{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Subscription is not set")); + } + if !issetTid{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tid is not set")); + } + return nil +} + +func (p *TimRoster) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Subscription = v +} + return nil +} + +func (p *TimRoster) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Tid = &Tid{} + if err := p.Tid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) + } + return nil +} + +func (p *TimRoster) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Name = &v +} + return nil +} + +func (p *TimRoster) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key51 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key51 = v +} +var _val52 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val52 = v +} + p.ExtraMap[_key51] = _val52 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimRoster) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimRoster"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimRoster) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "subscription", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:subscription: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Subscription)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.subscription (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:subscription: ", p), err) } + return err +} + +func (p *TimRoster) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tid", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tid: ", p), err) } + if err := p.Tid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tid: ", p), err) } + return err +} + +func (p *TimRoster) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetName() { + if err := oprot.WriteFieldBegin(ctx, "name", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:name: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Name)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.name (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:name: ", p), err) } + } + return err +} + +func (p *TimRoster) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) } + } + return err +} + +func (p *TimRoster) Equals(other *TimRoster) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Subscription != other.Subscription { return false } + if !p.Tid.Equals(other.Tid) { return false } + if p.Name != other.Name { + if p.Name == nil || other.Name == nil { + return false + } + if (*p.Name) != (*other.Name) { return false } + } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src53 := other.ExtraMap[k] + if _tgt != _src53 { return false } + } + return true +} + +func (p *TimRoster) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimRoster(%+v)", *p) +} + +// Attributes: +// - Error: 错误码 +// - Ub: 远程用户信息 +// - ExtraMap +type TimRemoteUserBean struct { + Error *TimError `thrift:"error,1" db:"error" json:"error,omitempty"` + Ub *TimUserBean `thrift:"ub,2" db:"ub" json:"ub,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,3" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimRemoteUserBean() *TimRemoteUserBean { + return &TimRemoteUserBean{} +} + +var TimRemoteUserBean_Error_DEFAULT *TimError +func (p *TimRemoteUserBean) GetError() *TimError { + if !p.IsSetError() { + return TimRemoteUserBean_Error_DEFAULT + } +return p.Error +} +var TimRemoteUserBean_Ub_DEFAULT *TimUserBean +func (p *TimRemoteUserBean) GetUb() *TimUserBean { + if !p.IsSetUb() { + return TimRemoteUserBean_Ub_DEFAULT + } +return p.Ub +} +var TimRemoteUserBean_ExtraMap_DEFAULT map[string]string + +func (p *TimRemoteUserBean) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimRemoteUserBean) IsSetError() bool { + return p.Error != nil +} + +func (p *TimRemoteUserBean) IsSetUb() bool { + return p.Ub != nil +} + +func (p *TimRemoteUserBean) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimRemoteUserBean) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.MAP { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimRemoteUserBean) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Error = &TimError{} + if err := p.Error.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Error), err) + } + return nil +} + +func (p *TimRemoteUserBean) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Ub = &TimUserBean{} + if err := p.Ub.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Ub), err) + } + return nil +} + +func (p *TimRemoteUserBean) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key54 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key54 = v +} +var _val55 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val55 = v +} + p.ExtraMap[_key54] = _val55 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimRemoteUserBean) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimRemoteUserBean"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimRemoteUserBean) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetError() { + if err := oprot.WriteFieldBegin(ctx, "error", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:error: ", p), err) } + if err := p.Error.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Error), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:error: ", p), err) } + } + return err +} + +func (p *TimRemoteUserBean) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetUb() { + if err := oprot.WriteFieldBegin(ctx, "ub", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:ub: ", p), err) } + if err := p.Ub.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Ub), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:ub: ", p), err) } + } + return err +} + +func (p *TimRemoteUserBean) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:extraMap: ", p), err) } + } + return err +} + +func (p *TimRemoteUserBean) Equals(other *TimRemoteUserBean) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Error.Equals(other.Error) { return false } + if !p.Ub.Equals(other.Ub) { return false } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src56 := other.ExtraMap[k] + if _tgt != _src56 { return false } + } + return true +} + +func (p *TimRemoteUserBean) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimRemoteUserBean(%+v)", *p) +} + +// Attributes: +// - Error: 错误码 +// - Room: 远程房间信息 +// - ExtraMap +type TimRemoteRoom struct { + Error *TimError `thrift:"error,1" db:"error" json:"error,omitempty"` + Room *TimRoom `thrift:"room,2" db:"room" json:"room,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,3" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimRemoteRoom() *TimRemoteRoom { + return &TimRemoteRoom{} +} + +var TimRemoteRoom_Error_DEFAULT *TimError +func (p *TimRemoteRoom) GetError() *TimError { + if !p.IsSetError() { + return TimRemoteRoom_Error_DEFAULT + } +return p.Error +} +var TimRemoteRoom_Room_DEFAULT *TimRoom +func (p *TimRemoteRoom) GetRoom() *TimRoom { + if !p.IsSetRoom() { + return TimRemoteRoom_Room_DEFAULT + } +return p.Room +} +var TimRemoteRoom_ExtraMap_DEFAULT map[string]string + +func (p *TimRemoteRoom) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimRemoteRoom) IsSetError() bool { + return p.Error != nil +} + +func (p *TimRemoteRoom) IsSetRoom() bool { + return p.Room != nil +} + +func (p *TimRemoteRoom) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimRemoteRoom) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.MAP { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimRemoteRoom) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Error = &TimError{} + if err := p.Error.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Error), err) + } + return nil +} + +func (p *TimRemoteRoom) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Room = &TimRoom{} + if err := p.Room.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Room), err) + } + return nil +} + +func (p *TimRemoteRoom) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key57 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key57 = v +} +var _val58 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val58 = v +} + p.ExtraMap[_key57] = _val58 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimRemoteRoom) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimRemoteRoom"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimRemoteRoom) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetError() { + if err := oprot.WriteFieldBegin(ctx, "error", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:error: ", p), err) } + if err := p.Error.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Error), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:error: ", p), err) } + } + return err +} + +func (p *TimRemoteRoom) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetRoom() { + if err := oprot.WriteFieldBegin(ctx, "room", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:room: ", p), err) } + if err := p.Room.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Room), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:room: ", p), err) } + } + return err +} + +func (p *TimRemoteRoom) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:extraMap: ", p), err) } + } + return err +} + +func (p *TimRemoteRoom) Equals(other *TimRemoteRoom) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.Error.Equals(other.Error) { return false } + if !p.Room.Equals(other.Room) { return false } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src59 := other.ExtraMap[k] + if _tgt != _src59 { return false } + } + return true +} + +func (p *TimRemoteRoom) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimRemoteRoom(%+v)", *p) +} + +// Attributes: +// - ThreadId +// - Error: 错误码 +// - ExtraList: 附加信息 +// - ExtraMap +type TimResponseBean struct { + ThreadId *string `thrift:"threadId,1" db:"threadId" json:"threadId,omitempty"` + Error *TimError `thrift:"error,2" db:"error" json:"error,omitempty"` + ExtraList []*TimNode `thrift:"extraList,3" db:"extraList" json:"extraList,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,4" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimResponseBean() *TimResponseBean { + return &TimResponseBean{} +} + +var TimResponseBean_ThreadId_DEFAULT string +func (p *TimResponseBean) GetThreadId() string { + if !p.IsSetThreadId() { + return TimResponseBean_ThreadId_DEFAULT + } +return *p.ThreadId +} +var TimResponseBean_Error_DEFAULT *TimError +func (p *TimResponseBean) GetError() *TimError { + if !p.IsSetError() { + return TimResponseBean_Error_DEFAULT + } +return p.Error +} +var TimResponseBean_ExtraList_DEFAULT []*TimNode + +func (p *TimResponseBean) GetExtraList() []*TimNode { + return p.ExtraList +} +var TimResponseBean_ExtraMap_DEFAULT map[string]string + +func (p *TimResponseBean) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimResponseBean) IsSetThreadId() bool { + return p.ThreadId != nil +} + +func (p *TimResponseBean) IsSetError() bool { + return p.Error != nil +} + +func (p *TimResponseBean) IsSetExtraList() bool { + return p.ExtraList != nil +} + +func (p *TimResponseBean) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimResponseBean) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.LIST { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.MAP { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimResponseBean) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.ThreadId = &v +} + return nil +} + +func (p *TimResponseBean) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Error = &TimError{} + if err := p.Error.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Error), err) + } + return nil +} + +func (p *TimResponseBean) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TimNode, 0, size) + p.ExtraList = tSlice + for i := 0; i < size; i ++ { + _elem60 := &TimNode{} + if err := _elem60.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem60), err) + } + p.ExtraList = append(p.ExtraList, _elem60) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimResponseBean) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key61 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key61 = v +} +var _val62 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val62 = v +} + p.ExtraMap[_key61] = _val62 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimResponseBean) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimResponseBean"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimResponseBean) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetThreadId() { + if err := oprot.WriteFieldBegin(ctx, "threadId", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.ThreadId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) } + } + return err +} + +func (p *TimResponseBean) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetError() { + if err := oprot.WriteFieldBegin(ctx, "error", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:error: ", p), err) } + if err := p.Error.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Error), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:error: ", p), err) } + } + return err +} + +func (p *TimResponseBean) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraList() { + if err := oprot.WriteFieldBegin(ctx, "extraList", thrift.LIST, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:extraList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.ExtraList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.ExtraList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:extraList: ", p), err) } + } + return err +} + +func (p *TimResponseBean) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) } + } + return err +} + +func (p *TimResponseBean) Equals(other *TimResponseBean) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.ThreadId != other.ThreadId { + if p.ThreadId == nil || other.ThreadId == nil { + return false + } + if (*p.ThreadId) != (*other.ThreadId) { return false } + } + if !p.Error.Equals(other.Error) { return false } + if len(p.ExtraList) != len(other.ExtraList) { return false } + for i, _tgt := range p.ExtraList { + _src63 := other.ExtraList[i] + if !_tgt.Equals(_src63) { return false } + } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src64 := other.ExtraMap[k] + if _tgt != _src64 { return false } + } + return true +} + +func (p *TimResponseBean) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimResponseBean(%+v)", *p) +} + +// Attributes: +// - FromTid +// - ToTid +// - Addr: ip地址 +// - Port: 端口 +// - Transport: 传输类型 1:tcp 2:udp +// - PubId: 发布id 通过发布id 可以连接两个发布id相同的用户 +// - ExtraMap +type TimSock5Bean struct { + FromTid *Tid `thrift:"fromTid,1,required" db:"fromTid" json:"fromTid"` + ToTid *Tid `thrift:"toTid,2,required" db:"toTid" json:"toTid"` + Addr string `thrift:"addr,3,required" db:"addr" json:"addr"` + Port int32 `thrift:"port,4,required" db:"port" json:"port"` + Transport int16 `thrift:"transport,5,required" db:"transport" json:"transport"` + PubId string `thrift:"pubId,6,required" db:"pubId" json:"pubId"` + ExtraMap map[string]string `thrift:"extraMap,7" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimSock5Bean() *TimSock5Bean { + return &TimSock5Bean{} +} + +var TimSock5Bean_FromTid_DEFAULT *Tid +func (p *TimSock5Bean) GetFromTid() *Tid { + if !p.IsSetFromTid() { + return TimSock5Bean_FromTid_DEFAULT + } +return p.FromTid +} +var TimSock5Bean_ToTid_DEFAULT *Tid +func (p *TimSock5Bean) GetToTid() *Tid { + if !p.IsSetToTid() { + return TimSock5Bean_ToTid_DEFAULT + } +return p.ToTid +} + +func (p *TimSock5Bean) GetAddr() string { + return p.Addr +} + +func (p *TimSock5Bean) GetPort() int32 { + return p.Port +} + +func (p *TimSock5Bean) GetTransport() int16 { + return p.Transport +} + +func (p *TimSock5Bean) GetPubId() string { + return p.PubId +} +var TimSock5Bean_ExtraMap_DEFAULT map[string]string + +func (p *TimSock5Bean) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimSock5Bean) IsSetFromTid() bool { + return p.FromTid != nil +} + +func (p *TimSock5Bean) IsSetToTid() bool { + return p.ToTid != nil +} + +func (p *TimSock5Bean) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimSock5Bean) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetFromTid bool = false; + var issetToTid bool = false; + var issetAddr bool = false; + var issetPort bool = false; + var issetTransport bool = false; + var issetPubId bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetFromTid = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetToTid = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + issetAddr = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.I32 { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + issetPort = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 5: + if fieldTypeId == thrift.I16 { + if err := p.ReadField5(ctx, iprot); err != nil { + return err + } + issetTransport = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 6: + if fieldTypeId == thrift.STRING { + if err := p.ReadField6(ctx, iprot); err != nil { + return err + } + issetPubId = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 7: + if fieldTypeId == thrift.MAP { + if err := p.ReadField7(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetFromTid{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field FromTid is not set")); + } + if !issetToTid{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ToTid is not set")); + } + if !issetAddr{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Addr is not set")); + } + if !issetPort{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Port is not set")); + } + if !issetTransport{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Transport is not set")); + } + if !issetPubId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PubId is not set")); + } + return nil +} + +func (p *TimSock5Bean) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.FromTid = &Tid{} + if err := p.FromTid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.FromTid), err) + } + return nil +} + +func (p *TimSock5Bean) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.ToTid = &Tid{} + if err := p.ToTid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ToTid), err) + } + return nil +} + +func (p *TimSock5Bean) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Addr = v +} + return nil +} + +func (p *TimSock5Bean) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 4: ", err) +} else { + p.Port = v +} + return nil +} + +func (p *TimSock5Bean) ReadField5(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI16(ctx); err != nil { + return thrift.PrependError("error reading field 5: ", err) +} else { + p.Transport = v +} + return nil +} + +func (p *TimSock5Bean) ReadField6(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 6: ", err) +} else { + p.PubId = v +} + return nil +} + +func (p *TimSock5Bean) ReadField7(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key65 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key65 = v +} +var _val66 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val66 = v +} + p.ExtraMap[_key65] = _val66 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimSock5Bean) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimSock5Bean"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + if err := p.writeField5(ctx, oprot); err != nil { return err } + if err := p.writeField6(ctx, oprot); err != nil { return err } + if err := p.writeField7(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimSock5Bean) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "fromTid", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:fromTid: ", p), err) } + if err := p.FromTid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.FromTid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:fromTid: ", p), err) } + return err +} + +func (p *TimSock5Bean) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "toTid", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:toTid: ", p), err) } + if err := p.ToTid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ToTid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:toTid: ", p), err) } + return err +} + +func (p *TimSock5Bean) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "addr", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:addr: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Addr)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.addr (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:addr: ", p), err) } + return err +} + +func (p *TimSock5Bean) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "port", thrift.I32, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:port: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.Port)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.port (4) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:port: ", p), err) } + return err +} + +func (p *TimSock5Bean) writeField5(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "transport", thrift.I16, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:transport: ", p), err) } + if err := oprot.WriteI16(ctx, int16(p.Transport)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.transport (5) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:transport: ", p), err) } + return err +} + +func (p *TimSock5Bean) writeField6(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "pubId", thrift.STRING, 6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:pubId: ", p), err) } + if err := oprot.WriteString(ctx, string(p.PubId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.pubId (6) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 6:pubId: ", p), err) } + return err +} + +func (p *TimSock5Bean) writeField7(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:extraMap: ", p), err) } + } + return err +} + +func (p *TimSock5Bean) Equals(other *TimSock5Bean) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if !p.FromTid.Equals(other.FromTid) { return false } + if !p.ToTid.Equals(other.ToTid) { return false } + if p.Addr != other.Addr { return false } + if p.Port != other.Port { return false } + if p.Transport != other.Transport { return false } + if p.PubId != other.PubId { return false } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src67 := other.ExtraMap[k] + if _tgt != _src67 { return false } + } + return true +} + +func (p *TimSock5Bean) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimSock5Bean(%+v)", *p) +} + +// Attributes: +// - PubId: 发布id +// - Index: 序号数据块 +// - Bytes: 数据块 +// - ExtraMap +type TimSock5Bytes struct { + PubId string `thrift:"pubId,1,required" db:"pubId" json:"pubId"` + Index int32 `thrift:"index,2,required" db:"index" json:"index"` + Bytes [][]byte `thrift:"bytes,3,required" db:"bytes" json:"bytes"` + ExtraMap map[string]string `thrift:"extraMap,4" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimSock5Bytes() *TimSock5Bytes { + return &TimSock5Bytes{} +} + + +func (p *TimSock5Bytes) GetPubId() string { + return p.PubId +} + +func (p *TimSock5Bytes) GetIndex() int32 { + return p.Index +} + +func (p *TimSock5Bytes) GetBytes() [][]byte { + return p.Bytes +} +var TimSock5Bytes_ExtraMap_DEFAULT map[string]string + +func (p *TimSock5Bytes) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimSock5Bytes) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimSock5Bytes) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetPubId bool = false; + var issetIndex bool = false; + var issetBytes bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetPubId = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.I32 { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + issetIndex = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.LIST { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + issetBytes = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.MAP { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetPubId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PubId is not set")); + } + if !issetIndex{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Index is not set")); + } + if !issetBytes{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Bytes is not set")); + } + return nil +} + +func (p *TimSock5Bytes) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.PubId = v +} + return nil +} + +func (p *TimSock5Bytes) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Index = v +} + return nil +} + +func (p *TimSock5Bytes) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([][]byte, 0, size) + p.Bytes = tSlice + for i := 0; i < size; i ++ { +var _elem68 []byte + if v, err := iprot.ReadBinary(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem68 = v +} + p.Bytes = append(p.Bytes, _elem68) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimSock5Bytes) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key69 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key69 = v +} +var _val70 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val70 = v +} + p.ExtraMap[_key69] = _val70 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimSock5Bytes) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimSock5Bytes"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimSock5Bytes) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "pubId", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pubId: ", p), err) } + if err := oprot.WriteString(ctx, string(p.PubId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.pubId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:pubId: ", p), err) } + return err +} + +func (p *TimSock5Bytes) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "index", thrift.I32, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:index: ", p), err) } + if err := oprot.WriteI32(ctx, int32(p.Index)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.index (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:index: ", p), err) } + return err +} + +func (p *TimSock5Bytes) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "bytes", thrift.LIST, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:bytes: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Bytes)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Bytes { + if err := oprot.WriteBinary(ctx, v); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:bytes: ", p), err) } + return err +} + +func (p *TimSock5Bytes) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) } + } + return err +} + +func (p *TimSock5Bytes) Equals(other *TimSock5Bytes) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.PubId != other.PubId { return false } + if p.Index != other.Index { return false } + if len(p.Bytes) != len(other.Bytes) { return false } + for i, _tgt := range p.Bytes { + _src71 := other.Bytes[i] + if bytes.Compare(_tgt, _src71) != 0 { return false } + } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src72 := other.ExtraMap[k] + if _tgt != _src72 { return false } + } + return true +} + +func (p *TimSock5Bytes) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimSock5Bytes(%+v)", *p) +} + +// Attributes: +// - FromTimeStamp: 时间上 +// - ToTimeStamp: 时间下 +// - LimitCount: 条数 +// - ExtraMap +type TimPage struct { + FromTimeStamp *string `thrift:"fromTimeStamp,1" db:"fromTimeStamp" json:"fromTimeStamp,omitempty"` + ToTimeStamp *string `thrift:"toTimeStamp,2" db:"toTimeStamp" json:"toTimeStamp,omitempty"` + LimitCount *int32 `thrift:"limitCount,3" db:"limitCount" json:"limitCount,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,4" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimPage() *TimPage { + return &TimPage{} +} + +var TimPage_FromTimeStamp_DEFAULT string +func (p *TimPage) GetFromTimeStamp() string { + if !p.IsSetFromTimeStamp() { + return TimPage_FromTimeStamp_DEFAULT + } +return *p.FromTimeStamp +} +var TimPage_ToTimeStamp_DEFAULT string +func (p *TimPage) GetToTimeStamp() string { + if !p.IsSetToTimeStamp() { + return TimPage_ToTimeStamp_DEFAULT + } +return *p.ToTimeStamp +} +var TimPage_LimitCount_DEFAULT int32 +func (p *TimPage) GetLimitCount() int32 { + if !p.IsSetLimitCount() { + return TimPage_LimitCount_DEFAULT + } +return *p.LimitCount +} +var TimPage_ExtraMap_DEFAULT map[string]string + +func (p *TimPage) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimPage) IsSetFromTimeStamp() bool { + return p.FromTimeStamp != nil +} + +func (p *TimPage) IsSetToTimeStamp() bool { + return p.ToTimeStamp != nil +} + +func (p *TimPage) IsSetLimitCount() bool { + return p.LimitCount != nil +} + +func (p *TimPage) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimPage) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.I32 { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.MAP { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimPage) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.FromTimeStamp = &v +} + return nil +} + +func (p *TimPage) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.ToTimeStamp = &v +} + return nil +} + +func (p *TimPage) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadI32(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.LimitCount = &v +} + return nil +} + +func (p *TimPage) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key73 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key73 = v +} +var _val74 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val74 = v +} + p.ExtraMap[_key73] = _val74 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimPage) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimPage"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimPage) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetFromTimeStamp() { + if err := oprot.WriteFieldBegin(ctx, "fromTimeStamp", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:fromTimeStamp: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.FromTimeStamp)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.fromTimeStamp (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:fromTimeStamp: ", p), err) } + } + return err +} + +func (p *TimPage) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetToTimeStamp() { + if err := oprot.WriteFieldBegin(ctx, "toTimeStamp", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:toTimeStamp: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.ToTimeStamp)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.toTimeStamp (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:toTimeStamp: ", p), err) } + } + return err +} + +func (p *TimPage) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetLimitCount() { + if err := oprot.WriteFieldBegin(ctx, "limitCount", thrift.I32, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:limitCount: ", p), err) } + if err := oprot.WriteI32(ctx, int32(*p.LimitCount)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.limitCount (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:limitCount: ", p), err) } + } + return err +} + +func (p *TimPage) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) } + } + return err +} + +func (p *TimPage) Equals(other *TimPage) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.FromTimeStamp != other.FromTimeStamp { + if p.FromTimeStamp == nil || other.FromTimeStamp == nil { + return false + } + if (*p.FromTimeStamp) != (*other.FromTimeStamp) { return false } + } + if p.ToTimeStamp != other.ToTimeStamp { + if p.ToTimeStamp == nil || other.ToTimeStamp == nil { + return false + } + if (*p.ToTimeStamp) != (*other.ToTimeStamp) { return false } + } + if p.LimitCount != other.LimitCount { + if p.LimitCount == nil || other.LimitCount == nil { + return false + } + if (*p.LimitCount) != (*other.LimitCount) { return false } + } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src75 := other.ExtraMap[k] + if _tgt != _src75 { return false } + } + return true +} + +func (p *TimPage) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimPage(%+v)", *p) +} + +// Attributes: +// - Tidlist: tid集合 +// - TimPage: 分页 +// - Midlist: mid集合 +// - ExtraMap +type TimMessageIq struct { + Tidlist []string `thrift:"tidlist,1" db:"tidlist" json:"tidlist,omitempty"` + TimPage *TimPage `thrift:"timPage,2" db:"timPage" json:"timPage,omitempty"` + Midlist []string `thrift:"midlist,3" db:"midlist" json:"midlist,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,4" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimMessageIq() *TimMessageIq { + return &TimMessageIq{} +} + +var TimMessageIq_Tidlist_DEFAULT []string + +func (p *TimMessageIq) GetTidlist() []string { + return p.Tidlist +} +var TimMessageIq_TimPage_DEFAULT *TimPage +func (p *TimMessageIq) GetTimPage() *TimPage { + if !p.IsSetTimPage() { + return TimMessageIq_TimPage_DEFAULT + } +return p.TimPage +} +var TimMessageIq_Midlist_DEFAULT []string + +func (p *TimMessageIq) GetMidlist() []string { + return p.Midlist +} +var TimMessageIq_ExtraMap_DEFAULT map[string]string + +func (p *TimMessageIq) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimMessageIq) IsSetTidlist() bool { + return p.Tidlist != nil +} + +func (p *TimMessageIq) IsSetTimPage() bool { + return p.TimPage != nil +} + +func (p *TimMessageIq) IsSetMidlist() bool { + return p.Midlist != nil +} + +func (p *TimMessageIq) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimMessageIq) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.LIST { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.LIST { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.MAP { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimMessageIq) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]string, 0, size) + p.Tidlist = tSlice + for i := 0; i < size; i ++ { +var _elem76 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem76 = v +} + p.Tidlist = append(p.Tidlist, _elem76) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimMessageIq) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.TimPage = &TimPage{} + if err := p.TimPage.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TimPage), err) + } + return nil +} + +func (p *TimMessageIq) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]string, 0, size) + p.Midlist = tSlice + for i := 0; i < size; i ++ { +var _elem77 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _elem77 = v +} + p.Midlist = append(p.Midlist, _elem77) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimMessageIq) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key78 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key78 = v +} +var _val79 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val79 = v +} + p.ExtraMap[_key78] = _val79 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimMessageIq) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimMessageIq"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimMessageIq) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTidlist() { + if err := oprot.WriteFieldBegin(ctx, "tidlist", thrift.LIST, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tidlist: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Tidlist)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Tidlist { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tidlist: ", p), err) } + } + return err +} + +func (p *TimMessageIq) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimPage() { + if err := oprot.WriteFieldBegin(ctx, "timPage", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:timPage: ", p), err) } + if err := p.TimPage.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TimPage), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:timPage: ", p), err) } + } + return err +} + +func (p *TimMessageIq) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetMidlist() { + if err := oprot.WriteFieldBegin(ctx, "midlist", thrift.LIST, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:midlist: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRING, len(p.Midlist)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Midlist { + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:midlist: ", p), err) } + } + return err +} + +func (p *TimMessageIq) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) } + } + return err +} + +func (p *TimMessageIq) Equals(other *TimMessageIq) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if len(p.Tidlist) != len(other.Tidlist) { return false } + for i, _tgt := range p.Tidlist { + _src80 := other.Tidlist[i] + if _tgt != _src80 { return false } + } + if !p.TimPage.Equals(other.TimPage) { return false } + if len(p.Midlist) != len(other.Midlist) { return false } + for i, _tgt := range p.Midlist { + _src81 := other.Midlist[i] + if _tgt != _src81 { return false } + } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src82 := other.ExtraMap[k] + if _tgt != _src82 { return false } + } + return true +} + +func (p *TimMessageIq) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimMessageIq(%+v)", *p) +} + +// Attributes: +// - Domain: 域名 +// - Username: 用户名 +// - Pwd: 密码 +type TimAuth struct { + Domain *string `thrift:"domain,1" db:"domain" json:"domain,omitempty"` + Username *string `thrift:"username,2" db:"username" json:"username,omitempty"` + Pwd *string `thrift:"pwd,3" db:"pwd" json:"pwd,omitempty"` +} + +func NewTimAuth() *TimAuth { + return &TimAuth{} +} + +var TimAuth_Domain_DEFAULT string +func (p *TimAuth) GetDomain() string { + if !p.IsSetDomain() { + return TimAuth_Domain_DEFAULT + } +return *p.Domain +} +var TimAuth_Username_DEFAULT string +func (p *TimAuth) GetUsername() string { + if !p.IsSetUsername() { + return TimAuth_Username_DEFAULT + } +return *p.Username +} +var TimAuth_Pwd_DEFAULT string +func (p *TimAuth) GetPwd() string { + if !p.IsSetPwd() { + return TimAuth_Pwd_DEFAULT + } +return *p.Pwd +} +func (p *TimAuth) IsSetDomain() bool { + return p.Domain != nil +} + +func (p *TimAuth) IsSetUsername() bool { + return p.Username != nil +} + +func (p *TimAuth) IsSetPwd() bool { + return p.Pwd != nil +} + +func (p *TimAuth) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimAuth) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.Domain = &v +} + return nil +} + +func (p *TimAuth) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Username = &v +} + return nil +} + +func (p *TimAuth) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.Pwd = &v +} + return nil +} + +func (p *TimAuth) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimAuth"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimAuth) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetDomain() { + if err := oprot.WriteFieldBegin(ctx, "domain", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:domain: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Domain)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.domain (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:domain: ", p), err) } + } + return err +} + +func (p *TimAuth) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetUsername() { + if err := oprot.WriteFieldBegin(ctx, "username", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:username: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Username)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.username (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:username: ", p), err) } + } + return err +} + +func (p *TimAuth) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetPwd() { + if err := oprot.WriteFieldBegin(ctx, "pwd", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:pwd: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Pwd)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.pwd (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:pwd: ", p), err) } + } + return err +} + +func (p *TimAuth) Equals(other *TimAuth) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.Domain != other.Domain { + if p.Domain == nil || other.Domain == nil { + return false + } + if (*p.Domain) != (*other.Domain) { return false } + } + if p.Username != other.Username { + if p.Username == nil || other.Username == nil { + return false + } + if (*p.Username) != (*other.Username) { return false } + } + if p.Pwd != other.Pwd { + if p.Pwd == nil || other.Pwd == nil { + return false + } + if (*p.Pwd) != (*other.Pwd) { return false } + } + return true +} + +func (p *TimAuth) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimAuth(%+v)", *p) +} + +// Attributes: +// - ThreadId +// - TimMBeanList: 信息列表 +// - ReqType: 类型 +// - ExtraMap +type TimMBeanList struct { + ThreadId string `thrift:"threadId,1,required" db:"threadId" json:"threadId"` + TimMBeanList []*TimMBean `thrift:"timMBeanList,2" db:"timMBeanList" json:"timMBeanList,omitempty"` + ReqType *string `thrift:"reqType,3" db:"reqType" json:"reqType,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,4" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimMBeanList() *TimMBeanList { + return &TimMBeanList{} +} + + +func (p *TimMBeanList) GetThreadId() string { + return p.ThreadId +} +var TimMBeanList_TimMBeanList_DEFAULT []*TimMBean + +func (p *TimMBeanList) GetTimMBeanList() []*TimMBean { + return p.TimMBeanList +} +var TimMBeanList_ReqType_DEFAULT string +func (p *TimMBeanList) GetReqType() string { + if !p.IsSetReqType() { + return TimMBeanList_ReqType_DEFAULT + } +return *p.ReqType +} +var TimMBeanList_ExtraMap_DEFAULT map[string]string + +func (p *TimMBeanList) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimMBeanList) IsSetTimMBeanList() bool { + return p.TimMBeanList != nil +} + +func (p *TimMBeanList) IsSetReqType() bool { + return p.ReqType != nil +} + +func (p *TimMBeanList) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimMBeanList) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetThreadId bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetThreadId = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.LIST { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.MAP { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetThreadId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ThreadId is not set")); + } + return nil +} + +func (p *TimMBeanList) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.ThreadId = v +} + return nil +} + +func (p *TimMBeanList) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TimMBean, 0, size) + p.TimMBeanList = tSlice + for i := 0; i < size; i ++ { + _elem83 := &TimMBean{} + if err := _elem83.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem83), err) + } + p.TimMBeanList = append(p.TimMBeanList, _elem83) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimMBeanList) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.ReqType = &v +} + return nil +} + +func (p *TimMBeanList) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key84 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key84 = v +} +var _val85 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val85 = v +} + p.ExtraMap[_key84] = _val85 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimMBeanList) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimMBeanList"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimMBeanList) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "threadId", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) } + if err := oprot.WriteString(ctx, string(p.ThreadId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) } + return err +} + +func (p *TimMBeanList) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimMBeanList() { + if err := oprot.WriteFieldBegin(ctx, "timMBeanList", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:timMBeanList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.TimMBeanList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.TimMBeanList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:timMBeanList: ", p), err) } + } + return err +} + +func (p *TimMBeanList) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetReqType() { + if err := oprot.WriteFieldBegin(ctx, "reqType", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:reqType: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.ReqType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.reqType (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:reqType: ", p), err) } + } + return err +} + +func (p *TimMBeanList) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) } + } + return err +} + +func (p *TimMBeanList) Equals(other *TimMBeanList) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.ThreadId != other.ThreadId { return false } + if len(p.TimMBeanList) != len(other.TimMBeanList) { return false } + for i, _tgt := range p.TimMBeanList { + _src86 := other.TimMBeanList[i] + if !_tgt.Equals(_src86) { return false } + } + if p.ReqType != other.ReqType { + if p.ReqType == nil || other.ReqType == nil { + return false + } + if (*p.ReqType) != (*other.ReqType) { return false } + } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src87 := other.ExtraMap[k] + if _tgt != _src87 { return false } + } + return true +} + +func (p *TimMBeanList) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimMBeanList(%+v)", *p) +} + +// Attributes: +// - ThreadId +// - TimPBeanList: 状态信息列表 +// - ReqType: 类型 +// - ExtraMap +type TimPBeanList struct { + ThreadId string `thrift:"threadId,1,required" db:"threadId" json:"threadId"` + TimPBeanList []*TimPBean `thrift:"timPBeanList,2" db:"timPBeanList" json:"timPBeanList,omitempty"` + ReqType *string `thrift:"reqType,3" db:"reqType" json:"reqType,omitempty"` + ExtraMap map[string]string `thrift:"extraMap,4" db:"extraMap" json:"extraMap,omitempty"` +} + +func NewTimPBeanList() *TimPBeanList { + return &TimPBeanList{} +} + + +func (p *TimPBeanList) GetThreadId() string { + return p.ThreadId +} +var TimPBeanList_TimPBeanList_DEFAULT []*TimPBean + +func (p *TimPBeanList) GetTimPBeanList() []*TimPBean { + return p.TimPBeanList +} +var TimPBeanList_ReqType_DEFAULT string +func (p *TimPBeanList) GetReqType() string { + if !p.IsSetReqType() { + return TimPBeanList_ReqType_DEFAULT + } +return *p.ReqType +} +var TimPBeanList_ExtraMap_DEFAULT map[string]string + +func (p *TimPBeanList) GetExtraMap() map[string]string { + return p.ExtraMap +} +func (p *TimPBeanList) IsSetTimPBeanList() bool { + return p.TimPBeanList != nil +} + +func (p *TimPBeanList) IsSetReqType() bool { + return p.ReqType != nil +} + +func (p *TimPBeanList) IsSetExtraMap() bool { + return p.ExtraMap != nil +} + +func (p *TimPBeanList) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + var issetThreadId bool = false; + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + issetThreadId = true + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.LIST { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 4: + if fieldTypeId == thrift.MAP { + if err := p.ReadField4(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + if !issetThreadId{ + return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ThreadId is not set")); + } + return nil +} + +func (p *TimPBeanList) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.ThreadId = v +} + return nil +} + +func (p *TimPBeanList) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + _, size, err := iprot.ReadListBegin(ctx) + if err != nil { + return thrift.PrependError("error reading list begin: ", err) + } + tSlice := make([]*TimPBean, 0, size) + p.TimPBeanList = tSlice + for i := 0; i < size; i ++ { + _elem88 := &TimPBean{} + if err := _elem88.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem88), err) + } + p.TimPBeanList = append(p.TimPBeanList, _elem88) + } + if err := iprot.ReadListEnd(ctx); err != nil { + return thrift.PrependError("error reading list end: ", err) + } + return nil +} + +func (p *TimPBeanList) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.ReqType = &v +} + return nil +} + +func (p *TimPBeanList) ReadField4(ctx context.Context, iprot thrift.TProtocol) error { + _, _, size, err := iprot.ReadMapBegin(ctx) + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.ExtraMap = tMap + for i := 0; i < size; i ++ { +var _key89 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _key89 = v +} +var _val90 string + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 0: ", err) +} else { + _val90 = v +} + p.ExtraMap[_key89] = _val90 + } + if err := iprot.ReadMapEnd(ctx); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *TimPBeanList) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimPBeanList"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + if err := p.writeField4(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimPBeanList) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "threadId", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) } + if err := oprot.WriteString(ctx, string(p.ThreadId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) } + return err +} + +func (p *TimPBeanList) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTimPBeanList() { + if err := oprot.WriteFieldBegin(ctx, "timPBeanList", thrift.LIST, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:timPBeanList: ", p), err) } + if err := oprot.WriteListBegin(ctx, thrift.STRUCT, len(p.TimPBeanList)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.TimPBeanList { + if err := v.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteListEnd(ctx); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:timPBeanList: ", p), err) } + } + return err +} + +func (p *TimPBeanList) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetReqType() { + if err := oprot.WriteFieldBegin(ctx, "reqType", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:reqType: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.ReqType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.reqType (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:reqType: ", p), err) } + } + return err +} + +func (p *TimPBeanList) writeField4(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetExtraMap() { + if err := oprot.WriteFieldBegin(ctx, "extraMap", thrift.MAP, 4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) } + if err := oprot.WriteMapBegin(ctx, thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.ExtraMap { + if err := oprot.WriteString(ctx, string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(ctx, string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(ctx); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) } + } + return err +} + +func (p *TimPBeanList) Equals(other *TimPBeanList) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.ThreadId != other.ThreadId { return false } + if len(p.TimPBeanList) != len(other.TimPBeanList) { return false } + for i, _tgt := range p.TimPBeanList { + _src91 := other.TimPBeanList[i] + if !_tgt.Equals(_src91) { return false } + } + if p.ReqType != other.ReqType { + if p.ReqType == nil || other.ReqType == nil { + return false + } + if (*p.ReqType) != (*other.ReqType) { return false } + } + if len(p.ExtraMap) != len(other.ExtraMap) { return false } + for k, _tgt := range p.ExtraMap { + _src92 := other.ExtraMap[k] + if _tgt != _src92 { return false } + } + return true +} + +func (p *TimPBeanList) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimPBeanList(%+v)", *p) +} + +// Attributes: +// - ThreadId +// - Interflow: 消息合流 +// - TLS: tls +type TimPropertyBean struct { + ThreadId *string `thrift:"threadId,1" db:"threadId" json:"threadId,omitempty"` + Interflow *string `thrift:"interflow,2" db:"interflow" json:"interflow,omitempty"` + TLS *string `thrift:"tls,3" db:"tls" json:"tls,omitempty"` +} + +func NewTimPropertyBean() *TimPropertyBean { + return &TimPropertyBean{} +} + +var TimPropertyBean_ThreadId_DEFAULT string +func (p *TimPropertyBean) GetThreadId() string { + if !p.IsSetThreadId() { + return TimPropertyBean_ThreadId_DEFAULT + } +return *p.ThreadId +} +var TimPropertyBean_Interflow_DEFAULT string +func (p *TimPropertyBean) GetInterflow() string { + if !p.IsSetInterflow() { + return TimPropertyBean_Interflow_DEFAULT + } +return *p.Interflow +} +var TimPropertyBean_TLS_DEFAULT string +func (p *TimPropertyBean) GetTLS() string { + if !p.IsSetTLS() { + return TimPropertyBean_TLS_DEFAULT + } +return *p.TLS +} +func (p *TimPropertyBean) IsSetThreadId() bool { + return p.ThreadId != nil +} + +func (p *TimPropertyBean) IsSetInterflow() bool { + return p.Interflow != nil +} + +func (p *TimPropertyBean) IsSetTLS() bool { + return p.TLS != nil +} + +func (p *TimPropertyBean) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRING { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *TimPropertyBean) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.ThreadId = &v +} + return nil +} + +func (p *TimPropertyBean) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Interflow = &v +} + return nil +} + +func (p *TimPropertyBean) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 3: ", err) +} else { + p.TLS = &v +} + return nil +} + +func (p *TimPropertyBean) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "TimPropertyBean"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *TimPropertyBean) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetThreadId() { + if err := oprot.WriteFieldBegin(ctx, "threadId", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.ThreadId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) } + } + return err +} + +func (p *TimPropertyBean) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetInterflow() { + if err := oprot.WriteFieldBegin(ctx, "interflow", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:interflow: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.Interflow)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.interflow (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:interflow: ", p), err) } + } + return err +} + +func (p *TimPropertyBean) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetTLS() { + if err := oprot.WriteFieldBegin(ctx, "tls", thrift.STRING, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:tls: ", p), err) } + if err := oprot.WriteString(ctx, string(*p.TLS)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.tls (3) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:tls: ", p), err) } + } + return err +} + +func (p *TimPropertyBean) Equals(other *TimPropertyBean) bool { + if p == other { + return true + } else if p == nil || other == nil { + return false + } + if p.ThreadId != other.ThreadId { + if p.ThreadId == nil || other.ThreadId == nil { + return false + } + if (*p.ThreadId) != (*other.ThreadId) { return false } + } + if p.Interflow != other.Interflow { + if p.Interflow == nil || other.Interflow == nil { + return false + } + if (*p.Interflow) != (*other.Interflow) { return false } + } + if p.TLS != other.TLS { + if p.TLS == nil || other.TLS == nil { + return false + } + if (*p.TLS) != (*other.TLS) { return false } + } + return true +} + +func (p *TimPropertyBean) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("TimPropertyBean(%+v)", *p) +} + +type ITim interface { + // 流程开始 + // + // Parameters: + // - Param + TimStream(ctx context.Context, param *TimParam) (_err error) + // tls协议 + TimStarttls(ctx context.Context) (_err error) + // 登陆协议 + // + // Parameters: + // - Tid + // - Pwd + TimLogin(ctx context.Context, tid *Tid, pwd string) (_err error) + // 回执信息 + // + // Parameters: + // - Ab + TimAck(ctx context.Context, ab *TimAckBean) (_err error) + // 广播出席协议或接收广播协议 + // + // Parameters: + // - Pbean + TimPresence(ctx context.Context, pbean *TimPBean) (_err error) + // 发送信息或接收信息 + // + // Parameters: + // - Mbean + TimMessage(ctx context.Context, mbean *TimMBean) (_err error) + // ping 心跳协议 + // + // Parameters: + // - ThreadId + TimPing(ctx context.Context, threadId string) (_err error) + // 错误通知 + // + // Parameters: + // - E + TimError(ctx context.Context, e *TimError) (_err error) + // 登出协议 + TimLogout(ctx context.Context) (_err error) + // 注册协议 + // + // Parameters: + // - Tid + // - Auth + TimRegist(ctx context.Context, tid *Tid, auth string) (_err error) + // 花名册 + // + // Parameters: + // - Roster + TimRoser(ctx context.Context, roster *TimRoster) (_err error) + // 发送信息或接收信息列表(合流) + // + // Parameters: + // - MbeanList + TimMessageList(ctx context.Context, mbeanList *TimMBeanList) (_err error) + // 发送状态信息列表(合流) + // + // Parameters: + // - PbeanList + TimPresenceList(ctx context.Context, pbeanList *TimPBeanList) (_err error) + // 信息请求 get请求数据 del删除 + // + // Parameters: + // - TimMsgIq + // - IqType + TimMessageIq(ctx context.Context, timMsgIq *TimMessageIq, iqType string) (_err error) + // 信息请求 + // + // Parameters: + // - Mbean + TimMessageResult_(ctx context.Context, mbean *TimMBean) (_err error) + // 用户协议属性请求 + // + // Parameters: + // - Tpb + TimProperty(ctx context.Context, tpb *TimPropertyBean) (_err error) + // 请求远程验证信息 + // + // Parameters: + // - Tid + // - Pwd + // - Auth + TimRemoteUserAuth(ctx context.Context, tid *Tid, pwd string, auth *TimAuth) (_r *TimRemoteUserBean, _err error) + // 请求远程用户信息 + // + // Parameters: + // - Tid + // - Auth + TimRemoteUserGet(ctx context.Context, tid *Tid, auth *TimAuth) (_r *TimRemoteUserBean, _err error) + // 编辑远程用户信息 + // + // Parameters: + // - Tid + // - Ub + // - Auth + TimRemoteUserEdit(ctx context.Context, tid *Tid, ub *TimUserBean, auth *TimAuth) (_r *TimRemoteUserBean, _err error) + // 广播出席协议或接收广播协议 + // + // Parameters: + // - Pbean + // - Auth + TimResponsePresence(ctx context.Context, pbean *TimPBean, auth *TimAuth) (_r *TimResponseBean, _err error) + // 发送信息或接收信息 + // + // Parameters: + // - Mbean + // - Auth + TimResponseMessage(ctx context.Context, mbean *TimMBean, auth *TimAuth) (_r *TimResponseBean, _err error) + // 信息请求 get请求数据 del删除(辅助接口) + // + // Parameters: + // - TimMsgIq + // - IqType + // - Auth + TimResponseMessageIq(ctx context.Context, timMsgIq *TimMessageIq, iqType string, auth *TimAuth) (_r *TimMBeanList, _err error) + // 广播出席协议或接收广播协议 + // + // Parameters: + // - PbeanList + // - Auth + TimResponsePresenceList(ctx context.Context, pbeanList *TimPBeanList, auth *TimAuth) (_r *TimResponseBean, _err error) + // 发送信息或接收信息 + // + // Parameters: + // - MbeanList + // - Auth + TimResponseMessageList(ctx context.Context, mbeanList *TimMBeanList, auth *TimAuth) (_r *TimResponseBean, _err error) +} + +type ITimClient struct { + c thrift.TClient + meta thrift.ResponseMeta +} + +func NewITimClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *ITimClient { + return &ITimClient{ + c: thrift.NewTStandardClient(f.GetProtocol(t), f.GetProtocol(t)), + } +} + +func NewITimClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *ITimClient { + return &ITimClient{ + c: thrift.NewTStandardClient(iprot, oprot), + } +} + +func NewITimClient(c thrift.TClient) *ITimClient { + return &ITimClient{ + c: c, + } +} + +func (p *ITimClient) Client_() thrift.TClient { + return p.c +} + +func (p *ITimClient) LastResponseMeta_() thrift.ResponseMeta { + return p.meta +} + +func (p *ITimClient) SetLastResponseMeta_(meta thrift.ResponseMeta) { + p.meta = meta +} + +// 流程开始 +// +// Parameters: +// - Param +func (p *ITimClient) TimStream(ctx context.Context, param *TimParam) (_err error) { + var _args93 ITimTimStreamArgs + _args93.Param = param + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timStream", &_args93, nil); err != nil { + return err + } + return nil +} + +// tls协议 +func (p *ITimClient) TimStarttls(ctx context.Context) (_err error) { + var _args94 ITimTimStarttlsArgs + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timStarttls", &_args94, nil); err != nil { + return err + } + return nil +} + +// 登陆协议 +// +// Parameters: +// - Tid +// - Pwd +func (p *ITimClient) TimLogin(ctx context.Context, tid *Tid, pwd string) (_err error) { + var _args95 ITimTimLoginArgs + _args95.Tid = tid + _args95.Pwd = pwd + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timLogin", &_args95, nil); err != nil { + return err + } + return nil +} + +// 回执信息 +// +// Parameters: +// - Ab +func (p *ITimClient) TimAck(ctx context.Context, ab *TimAckBean) (_err error) { + var _args96 ITimTimAckArgs + _args96.Ab = ab + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timAck", &_args96, nil); err != nil { + return err + } + return nil +} + +// 广播出席协议或接收广播协议 +// +// Parameters: +// - Pbean +func (p *ITimClient) TimPresence(ctx context.Context, pbean *TimPBean) (_err error) { + var _args97 ITimTimPresenceArgs + _args97.Pbean = pbean + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timPresence", &_args97, nil); err != nil { + return err + } + return nil +} + +// 发送信息或接收信息 +// +// Parameters: +// - Mbean +func (p *ITimClient) TimMessage(ctx context.Context, mbean *TimMBean) (_err error) { + var _args98 ITimTimMessageArgs + _args98.Mbean = mbean + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timMessage", &_args98, nil); err != nil { + return err + } + return nil +} + +// ping 心跳协议 +// +// Parameters: +// - ThreadId +func (p *ITimClient) TimPing(ctx context.Context, threadId string) (_err error) { + var _args99 ITimTimPingArgs + _args99.ThreadId = threadId + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timPing", &_args99, nil); err != nil { + return err + } + return nil +} + +// 错误通知 +// +// Parameters: +// - E +func (p *ITimClient) TimError(ctx context.Context, e *TimError) (_err error) { + var _args100 ITimTimErrorArgs + _args100.E = e + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timError", &_args100, nil); err != nil { + return err + } + return nil +} + +// 登出协议 +func (p *ITimClient) TimLogout(ctx context.Context) (_err error) { + var _args101 ITimTimLogoutArgs + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timLogout", &_args101, nil); err != nil { + return err + } + return nil +} + +// 注册协议 +// +// Parameters: +// - Tid +// - Auth +func (p *ITimClient) TimRegist(ctx context.Context, tid *Tid, auth string) (_err error) { + var _args102 ITimTimRegistArgs + _args102.Tid = tid + _args102.Auth = auth + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timRegist", &_args102, nil); err != nil { + return err + } + return nil +} + +// 花名册 +// +// Parameters: +// - Roster +func (p *ITimClient) TimRoser(ctx context.Context, roster *TimRoster) (_err error) { + var _args103 ITimTimRoserArgs + _args103.Roster = roster + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timRoser", &_args103, nil); err != nil { + return err + } + return nil +} + +// 发送信息或接收信息列表(合流) +// +// Parameters: +// - MbeanList +func (p *ITimClient) TimMessageList(ctx context.Context, mbeanList *TimMBeanList) (_err error) { + var _args104 ITimTimMessageListArgs + _args104.MbeanList = mbeanList + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timMessageList", &_args104, nil); err != nil { + return err + } + return nil +} + +// 发送状态信息列表(合流) +// +// Parameters: +// - PbeanList +func (p *ITimClient) TimPresenceList(ctx context.Context, pbeanList *TimPBeanList) (_err error) { + var _args105 ITimTimPresenceListArgs + _args105.PbeanList = pbeanList + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timPresenceList", &_args105, nil); err != nil { + return err + } + return nil +} + +// 信息请求 get请求数据 del删除 +// +// Parameters: +// - TimMsgIq +// - IqType +func (p *ITimClient) TimMessageIq(ctx context.Context, timMsgIq *TimMessageIq, iqType string) (_err error) { + var _args106 ITimTimMessageIqArgs + _args106.TimMsgIq = timMsgIq + _args106.IqType = iqType + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timMessageIq", &_args106, nil); err != nil { + return err + } + return nil +} + +// 信息请求 +// +// Parameters: +// - Mbean +func (p *ITimClient) TimMessageResult_(ctx context.Context, mbean *TimMBean) (_err error) { + var _args107 ITimTimMessageResultArgs + _args107.Mbean = mbean + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timMessageResult", &_args107, nil); err != nil { + return err + } + return nil +} + +// 用户协议属性请求 +// +// Parameters: +// - Tpb +func (p *ITimClient) TimProperty(ctx context.Context, tpb *TimPropertyBean) (_err error) { + var _args108 ITimTimPropertyArgs + _args108.Tpb = tpb + p.SetLastResponseMeta_(thrift.ResponseMeta{}) + if _, err := p.Client_().Call(ctx, "timProperty", &_args108, nil); err != nil { + return err + } + return nil +} + +// 请求远程验证信息 +// +// Parameters: +// - Tid +// - Pwd +// - Auth +func (p *ITimClient) TimRemoteUserAuth(ctx context.Context, tid *Tid, pwd string, auth *TimAuth) (_r *TimRemoteUserBean, _err error) { + var _args109 ITimTimRemoteUserAuthArgs + _args109.Tid = tid + _args109.Pwd = pwd + _args109.Auth = auth + var _result111 ITimTimRemoteUserAuthResult + var _meta110 thrift.ResponseMeta + _meta110, _err = p.Client_().Call(ctx, "timRemoteUserAuth", &_args109, &_result111) + p.SetLastResponseMeta_(_meta110) + if _err != nil { + return + } + if _ret112 := _result111.GetSuccess(); _ret112 != nil { + return _ret112, nil + } + return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "timRemoteUserAuth failed: unknown result") +} + +// 请求远程用户信息 +// +// Parameters: +// - Tid +// - Auth +func (p *ITimClient) TimRemoteUserGet(ctx context.Context, tid *Tid, auth *TimAuth) (_r *TimRemoteUserBean, _err error) { + var _args113 ITimTimRemoteUserGetArgs + _args113.Tid = tid + _args113.Auth = auth + var _result115 ITimTimRemoteUserGetResult + var _meta114 thrift.ResponseMeta + _meta114, _err = p.Client_().Call(ctx, "timRemoteUserGet", &_args113, &_result115) + p.SetLastResponseMeta_(_meta114) + if _err != nil { + return + } + if _ret116 := _result115.GetSuccess(); _ret116 != nil { + return _ret116, nil + } + return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "timRemoteUserGet failed: unknown result") +} + +// 编辑远程用户信息 +// +// Parameters: +// - Tid +// - Ub +// - Auth +func (p *ITimClient) TimRemoteUserEdit(ctx context.Context, tid *Tid, ub *TimUserBean, auth *TimAuth) (_r *TimRemoteUserBean, _err error) { + var _args117 ITimTimRemoteUserEditArgs + _args117.Tid = tid + _args117.Ub = ub + _args117.Auth = auth + var _result119 ITimTimRemoteUserEditResult + var _meta118 thrift.ResponseMeta + _meta118, _err = p.Client_().Call(ctx, "timRemoteUserEdit", &_args117, &_result119) + p.SetLastResponseMeta_(_meta118) + if _err != nil { + return + } + if _ret120 := _result119.GetSuccess(); _ret120 != nil { + return _ret120, nil + } + return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "timRemoteUserEdit failed: unknown result") +} + +// 广播出席协议或接收广播协议 +// +// Parameters: +// - Pbean +// - Auth +func (p *ITimClient) TimResponsePresence(ctx context.Context, pbean *TimPBean, auth *TimAuth) (_r *TimResponseBean, _err error) { + var _args121 ITimTimResponsePresenceArgs + _args121.Pbean = pbean + _args121.Auth = auth + var _result123 ITimTimResponsePresenceResult + var _meta122 thrift.ResponseMeta + _meta122, _err = p.Client_().Call(ctx, "timResponsePresence", &_args121, &_result123) + p.SetLastResponseMeta_(_meta122) + if _err != nil { + return + } + if _ret124 := _result123.GetSuccess(); _ret124 != nil { + return _ret124, nil + } + return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "timResponsePresence failed: unknown result") +} + +// 发送信息或接收信息 +// +// Parameters: +// - Mbean +// - Auth +func (p *ITimClient) TimResponseMessage(ctx context.Context, mbean *TimMBean, auth *TimAuth) (_r *TimResponseBean, _err error) { + var _args125 ITimTimResponseMessageArgs + _args125.Mbean = mbean + _args125.Auth = auth + var _result127 ITimTimResponseMessageResult + var _meta126 thrift.ResponseMeta + _meta126, _err = p.Client_().Call(ctx, "timResponseMessage", &_args125, &_result127) + p.SetLastResponseMeta_(_meta126) + if _err != nil { + return + } + if _ret128 := _result127.GetSuccess(); _ret128 != nil { + return _ret128, nil + } + return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "timResponseMessage failed: unknown result") +} + +// 信息请求 get请求数据 del删除(辅助接口) +// +// Parameters: +// - TimMsgIq +// - IqType +// - Auth +func (p *ITimClient) TimResponseMessageIq(ctx context.Context, timMsgIq *TimMessageIq, iqType string, auth *TimAuth) (_r *TimMBeanList, _err error) { + var _args129 ITimTimResponseMessageIqArgs + _args129.TimMsgIq = timMsgIq + _args129.IqType = iqType + _args129.Auth = auth + var _result131 ITimTimResponseMessageIqResult + var _meta130 thrift.ResponseMeta + _meta130, _err = p.Client_().Call(ctx, "timResponseMessageIq", &_args129, &_result131) + p.SetLastResponseMeta_(_meta130) + if _err != nil { + return + } + if _ret132 := _result131.GetSuccess(); _ret132 != nil { + return _ret132, nil + } + return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "timResponseMessageIq failed: unknown result") +} + +// 广播出席协议或接收广播协议 +// +// Parameters: +// - PbeanList +// - Auth +func (p *ITimClient) TimResponsePresenceList(ctx context.Context, pbeanList *TimPBeanList, auth *TimAuth) (_r *TimResponseBean, _err error) { + var _args133 ITimTimResponsePresenceListArgs + _args133.PbeanList = pbeanList + _args133.Auth = auth + var _result135 ITimTimResponsePresenceListResult + var _meta134 thrift.ResponseMeta + _meta134, _err = p.Client_().Call(ctx, "timResponsePresenceList", &_args133, &_result135) + p.SetLastResponseMeta_(_meta134) + if _err != nil { + return + } + if _ret136 := _result135.GetSuccess(); _ret136 != nil { + return _ret136, nil + } + return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "timResponsePresenceList failed: unknown result") +} + +// 发送信息或接收信息 +// +// Parameters: +// - MbeanList +// - Auth +func (p *ITimClient) TimResponseMessageList(ctx context.Context, mbeanList *TimMBeanList, auth *TimAuth) (_r *TimResponseBean, _err error) { + var _args137 ITimTimResponseMessageListArgs + _args137.MbeanList = mbeanList + _args137.Auth = auth + var _result139 ITimTimResponseMessageListResult + var _meta138 thrift.ResponseMeta + _meta138, _err = p.Client_().Call(ctx, "timResponseMessageList", &_args137, &_result139) + p.SetLastResponseMeta_(_meta138) + if _err != nil { + return + } + if _ret140 := _result139.GetSuccess(); _ret140 != nil { + return _ret140, nil + } + return nil, thrift.NewTApplicationException(thrift.MISSING_RESULT, "timResponseMessageList failed: unknown result") +} + +type ITimProcessor struct { + processorMap map[string]thrift.TProcessorFunction + handler ITim +} + +func (p *ITimProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction) { + p.processorMap[key] = processor +} + +func (p *ITimProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool) { + processor, ok = p.processorMap[key] + return processor, ok +} + +func (p *ITimProcessor) ProcessorMap() map[string]thrift.TProcessorFunction { + return p.processorMap +} + +func NewITimProcessor(handler ITim) *ITimProcessor { + + self141 := &ITimProcessor{handler:handler, processorMap:make(map[string]thrift.TProcessorFunction)} + self141.processorMap["timStream"] = &iTimProcessorTimStream{handler:handler} + self141.processorMap["timStarttls"] = &iTimProcessorTimStarttls{handler:handler} + self141.processorMap["timLogin"] = &iTimProcessorTimLogin{handler:handler} + self141.processorMap["timAck"] = &iTimProcessorTimAck{handler:handler} + self141.processorMap["timPresence"] = &iTimProcessorTimPresence{handler:handler} + self141.processorMap["timMessage"] = &iTimProcessorTimMessage{handler:handler} + self141.processorMap["timPing"] = &iTimProcessorTimPing{handler:handler} + self141.processorMap["timError"] = &iTimProcessorTimError{handler:handler} + self141.processorMap["timLogout"] = &iTimProcessorTimLogout{handler:handler} + self141.processorMap["timRegist"] = &iTimProcessorTimRegist{handler:handler} + self141.processorMap["timRoser"] = &iTimProcessorTimRoser{handler:handler} + self141.processorMap["timMessageList"] = &iTimProcessorTimMessageList{handler:handler} + self141.processorMap["timPresenceList"] = &iTimProcessorTimPresenceList{handler:handler} + self141.processorMap["timMessageIq"] = &iTimProcessorTimMessageIq{handler:handler} + self141.processorMap["timMessageResult"] = &iTimProcessorTimMessageResult_{handler:handler} + self141.processorMap["timProperty"] = &iTimProcessorTimProperty{handler:handler} + self141.processorMap["timRemoteUserAuth"] = &iTimProcessorTimRemoteUserAuth{handler:handler} + self141.processorMap["timRemoteUserGet"] = &iTimProcessorTimRemoteUserGet{handler:handler} + self141.processorMap["timRemoteUserEdit"] = &iTimProcessorTimRemoteUserEdit{handler:handler} + self141.processorMap["timResponsePresence"] = &iTimProcessorTimResponsePresence{handler:handler} + self141.processorMap["timResponseMessage"] = &iTimProcessorTimResponseMessage{handler:handler} + self141.processorMap["timResponseMessageIq"] = &iTimProcessorTimResponseMessageIq{handler:handler} + self141.processorMap["timResponsePresenceList"] = &iTimProcessorTimResponsePresenceList{handler:handler} + self141.processorMap["timResponseMessageList"] = &iTimProcessorTimResponseMessageList{handler:handler} +return self141 +} + +func (p *ITimProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + name, _, seqId, err2 := iprot.ReadMessageBegin(ctx) + if err2 != nil { return false, thrift.WrapTException(err2) } + if processor, ok := p.GetProcessorFunction(name); ok { + return processor.Process(ctx, seqId, iprot, oprot) + } + iprot.Skip(ctx, thrift.STRUCT) + iprot.ReadMessageEnd(ctx) + x142 := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function " + name) + oprot.WriteMessageBegin(ctx, name, thrift.EXCEPTION, seqId) + x142.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, x142 + +} + +type iTimProcessorTimStream struct { + handler ITim +} + +func (p *iTimProcessorTimStream) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimStreamArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimStream(ctx, args.Param); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimStarttls struct { + handler ITim +} + +func (p *iTimProcessorTimStarttls) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimStarttlsArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimStarttls(ctx); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimLogin struct { + handler ITim +} + +func (p *iTimProcessorTimLogin) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimLoginArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimLogin(ctx, args.Tid, args.Pwd); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimAck struct { + handler ITim +} + +func (p *iTimProcessorTimAck) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimAckArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimAck(ctx, args.Ab); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimPresence struct { + handler ITim +} + +func (p *iTimProcessorTimPresence) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimPresenceArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimPresence(ctx, args.Pbean); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimMessage struct { + handler ITim +} + +func (p *iTimProcessorTimMessage) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimMessageArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimMessage(ctx, args.Mbean); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimPing struct { + handler ITim +} + +func (p *iTimProcessorTimPing) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimPingArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimPing(ctx, args.ThreadId); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimError struct { + handler ITim +} + +func (p *iTimProcessorTimError) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimErrorArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimError(ctx, args.E); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimLogout struct { + handler ITim +} + +func (p *iTimProcessorTimLogout) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimLogoutArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimLogout(ctx); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimRegist struct { + handler ITim +} + +func (p *iTimProcessorTimRegist) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimRegistArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimRegist(ctx, args.Tid, args.Auth); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimRoser struct { + handler ITim +} + +func (p *iTimProcessorTimRoser) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimRoserArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimRoser(ctx, args.Roster); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimMessageList struct { + handler ITim +} + +func (p *iTimProcessorTimMessageList) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimMessageListArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimMessageList(ctx, args.MbeanList); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimPresenceList struct { + handler ITim +} + +func (p *iTimProcessorTimPresenceList) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimPresenceListArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimPresenceList(ctx, args.PbeanList); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimMessageIq struct { + handler ITim +} + +func (p *iTimProcessorTimMessageIq) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimMessageIqArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimMessageIq(ctx, args.TimMsgIq, args.IqType); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimMessageResult_ struct { + handler ITim +} + +func (p *iTimProcessorTimMessageResult_) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimMessageResultArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimMessageResult_(ctx, args.Mbean); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimProperty struct { + handler ITim +} + +func (p *iTimProcessorTimProperty) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + args := ITimTimPropertyArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + _ = tickerCancel + + if err2 := p.handler.TimProperty(ctx, args.Tpb); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + } + tickerCancel() + return true, err +} + +type iTimProcessorTimRemoteUserAuth struct { + handler ITim +} + +func (p *iTimProcessorTimRemoteUserAuth) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err143 error + args := ITimTimRemoteUserAuthArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "timRemoteUserAuth", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := ITimTimRemoteUserAuthResult{} + if retval, err2 := p.handler.TimRemoteUserAuth(ctx, args.Tid, args.Pwd, args.Auth); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc144 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timRemoteUserAuth: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "timRemoteUserAuth", thrift.EXCEPTION, seqId); err2 != nil { + _write_err143 = thrift.WrapTException(err2) + } + if err2 := _exc144.Write(ctx, oprot); _write_err143 == nil && err2 != nil { + _write_err143 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err143 == nil && err2 != nil { + _write_err143 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err143 == nil && err2 != nil { + _write_err143 = thrift.WrapTException(err2) + } + if _write_err143 != nil { + return false, thrift.WrapTException(_write_err143) + } + return true, err + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "timRemoteUserAuth", thrift.REPLY, seqId); err2 != nil { + _write_err143 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err143 == nil && err2 != nil { + _write_err143 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err143 == nil && err2 != nil { + _write_err143 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err143 == nil && err2 != nil { + _write_err143 = thrift.WrapTException(err2) + } + if _write_err143 != nil { + return false, thrift.WrapTException(_write_err143) + } + return true, err +} + +type iTimProcessorTimRemoteUserGet struct { + handler ITim +} + +func (p *iTimProcessorTimRemoteUserGet) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err145 error + args := ITimTimRemoteUserGetArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "timRemoteUserGet", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := ITimTimRemoteUserGetResult{} + if retval, err2 := p.handler.TimRemoteUserGet(ctx, args.Tid, args.Auth); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc146 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timRemoteUserGet: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "timRemoteUserGet", thrift.EXCEPTION, seqId); err2 != nil { + _write_err145 = thrift.WrapTException(err2) + } + if err2 := _exc146.Write(ctx, oprot); _write_err145 == nil && err2 != nil { + _write_err145 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err145 == nil && err2 != nil { + _write_err145 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err145 == nil && err2 != nil { + _write_err145 = thrift.WrapTException(err2) + } + if _write_err145 != nil { + return false, thrift.WrapTException(_write_err145) + } + return true, err + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "timRemoteUserGet", thrift.REPLY, seqId); err2 != nil { + _write_err145 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err145 == nil && err2 != nil { + _write_err145 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err145 == nil && err2 != nil { + _write_err145 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err145 == nil && err2 != nil { + _write_err145 = thrift.WrapTException(err2) + } + if _write_err145 != nil { + return false, thrift.WrapTException(_write_err145) + } + return true, err +} + +type iTimProcessorTimRemoteUserEdit struct { + handler ITim +} + +func (p *iTimProcessorTimRemoteUserEdit) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err147 error + args := ITimTimRemoteUserEditArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "timRemoteUserEdit", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := ITimTimRemoteUserEditResult{} + if retval, err2 := p.handler.TimRemoteUserEdit(ctx, args.Tid, args.Ub, args.Auth); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc148 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timRemoteUserEdit: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "timRemoteUserEdit", thrift.EXCEPTION, seqId); err2 != nil { + _write_err147 = thrift.WrapTException(err2) + } + if err2 := _exc148.Write(ctx, oprot); _write_err147 == nil && err2 != nil { + _write_err147 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err147 == nil && err2 != nil { + _write_err147 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err147 == nil && err2 != nil { + _write_err147 = thrift.WrapTException(err2) + } + if _write_err147 != nil { + return false, thrift.WrapTException(_write_err147) + } + return true, err + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "timRemoteUserEdit", thrift.REPLY, seqId); err2 != nil { + _write_err147 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err147 == nil && err2 != nil { + _write_err147 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err147 == nil && err2 != nil { + _write_err147 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err147 == nil && err2 != nil { + _write_err147 = thrift.WrapTException(err2) + } + if _write_err147 != nil { + return false, thrift.WrapTException(_write_err147) + } + return true, err +} + +type iTimProcessorTimResponsePresence struct { + handler ITim +} + +func (p *iTimProcessorTimResponsePresence) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err149 error + args := ITimTimResponsePresenceArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "timResponsePresence", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := ITimTimResponsePresenceResult{} + if retval, err2 := p.handler.TimResponsePresence(ctx, args.Pbean, args.Auth); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc150 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timResponsePresence: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "timResponsePresence", thrift.EXCEPTION, seqId); err2 != nil { + _write_err149 = thrift.WrapTException(err2) + } + if err2 := _exc150.Write(ctx, oprot); _write_err149 == nil && err2 != nil { + _write_err149 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err149 == nil && err2 != nil { + _write_err149 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err149 == nil && err2 != nil { + _write_err149 = thrift.WrapTException(err2) + } + if _write_err149 != nil { + return false, thrift.WrapTException(_write_err149) + } + return true, err + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "timResponsePresence", thrift.REPLY, seqId); err2 != nil { + _write_err149 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err149 == nil && err2 != nil { + _write_err149 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err149 == nil && err2 != nil { + _write_err149 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err149 == nil && err2 != nil { + _write_err149 = thrift.WrapTException(err2) + } + if _write_err149 != nil { + return false, thrift.WrapTException(_write_err149) + } + return true, err +} + +type iTimProcessorTimResponseMessage struct { + handler ITim +} + +func (p *iTimProcessorTimResponseMessage) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err151 error + args := ITimTimResponseMessageArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "timResponseMessage", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := ITimTimResponseMessageResult{} + if retval, err2 := p.handler.TimResponseMessage(ctx, args.Mbean, args.Auth); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc152 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timResponseMessage: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "timResponseMessage", thrift.EXCEPTION, seqId); err2 != nil { + _write_err151 = thrift.WrapTException(err2) + } + if err2 := _exc152.Write(ctx, oprot); _write_err151 == nil && err2 != nil { + _write_err151 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err151 == nil && err2 != nil { + _write_err151 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err151 == nil && err2 != nil { + _write_err151 = thrift.WrapTException(err2) + } + if _write_err151 != nil { + return false, thrift.WrapTException(_write_err151) + } + return true, err + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "timResponseMessage", thrift.REPLY, seqId); err2 != nil { + _write_err151 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err151 == nil && err2 != nil { + _write_err151 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err151 == nil && err2 != nil { + _write_err151 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err151 == nil && err2 != nil { + _write_err151 = thrift.WrapTException(err2) + } + if _write_err151 != nil { + return false, thrift.WrapTException(_write_err151) + } + return true, err +} + +type iTimProcessorTimResponseMessageIq struct { + handler ITim +} + +func (p *iTimProcessorTimResponseMessageIq) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err153 error + args := ITimTimResponseMessageIqArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "timResponseMessageIq", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := ITimTimResponseMessageIqResult{} + if retval, err2 := p.handler.TimResponseMessageIq(ctx, args.TimMsgIq, args.IqType, args.Auth); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc154 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timResponseMessageIq: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "timResponseMessageIq", thrift.EXCEPTION, seqId); err2 != nil { + _write_err153 = thrift.WrapTException(err2) + } + if err2 := _exc154.Write(ctx, oprot); _write_err153 == nil && err2 != nil { + _write_err153 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err153 == nil && err2 != nil { + _write_err153 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err153 == nil && err2 != nil { + _write_err153 = thrift.WrapTException(err2) + } + if _write_err153 != nil { + return false, thrift.WrapTException(_write_err153) + } + return true, err + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "timResponseMessageIq", thrift.REPLY, seqId); err2 != nil { + _write_err153 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err153 == nil && err2 != nil { + _write_err153 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err153 == nil && err2 != nil { + _write_err153 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err153 == nil && err2 != nil { + _write_err153 = thrift.WrapTException(err2) + } + if _write_err153 != nil { + return false, thrift.WrapTException(_write_err153) + } + return true, err +} + +type iTimProcessorTimResponsePresenceList struct { + handler ITim +} + +func (p *iTimProcessorTimResponsePresenceList) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err155 error + args := ITimTimResponsePresenceListArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "timResponsePresenceList", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := ITimTimResponsePresenceListResult{} + if retval, err2 := p.handler.TimResponsePresenceList(ctx, args.PbeanList, args.Auth); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc156 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timResponsePresenceList: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "timResponsePresenceList", thrift.EXCEPTION, seqId); err2 != nil { + _write_err155 = thrift.WrapTException(err2) + } + if err2 := _exc156.Write(ctx, oprot); _write_err155 == nil && err2 != nil { + _write_err155 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err155 == nil && err2 != nil { + _write_err155 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err155 == nil && err2 != nil { + _write_err155 = thrift.WrapTException(err2) + } + if _write_err155 != nil { + return false, thrift.WrapTException(_write_err155) + } + return true, err + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "timResponsePresenceList", thrift.REPLY, seqId); err2 != nil { + _write_err155 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err155 == nil && err2 != nil { + _write_err155 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err155 == nil && err2 != nil { + _write_err155 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err155 == nil && err2 != nil { + _write_err155 = thrift.WrapTException(err2) + } + if _write_err155 != nil { + return false, thrift.WrapTException(_write_err155) + } + return true, err +} + +type iTimProcessorTimResponseMessageList struct { + handler ITim +} + +func (p *iTimProcessorTimResponseMessageList) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { + var _write_err157 error + args := ITimTimResponseMessageListArgs{} + if err2 := args.Read(ctx, iprot); err2 != nil { + iprot.ReadMessageEnd(ctx) + x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err2.Error()) + oprot.WriteMessageBegin(ctx, "timResponseMessageList", thrift.EXCEPTION, seqId) + x.Write(ctx, oprot) + oprot.WriteMessageEnd(ctx) + oprot.Flush(ctx) + return false, thrift.WrapTException(err2) + } + iprot.ReadMessageEnd(ctx) + + tickerCancel := func() {} + // Start a goroutine to do server side connectivity check. + if thrift.ServerConnectivityCheckInterval > 0 { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + defer cancel() + var tickerCtx context.Context + tickerCtx, tickerCancel = context.WithCancel(context.Background()) + defer tickerCancel() + go func(ctx context.Context, cancel context.CancelFunc) { + ticker := time.NewTicker(thrift.ServerConnectivityCheckInterval) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + if !iprot.Transport().IsOpen() { + cancel() + return + } + } + } + }(tickerCtx, cancel) + } + + result := ITimTimResponseMessageListResult{} + if retval, err2 := p.handler.TimResponseMessageList(ctx, args.MbeanList, args.Auth); err2 != nil { + tickerCancel() + err = thrift.WrapTException(err2) + if errors.Is(err2, thrift.ErrAbandonRequest) { + return false, thrift.WrapTException(err2) + } + _exc158 := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timResponseMessageList: " + err2.Error()) + if err2 := oprot.WriteMessageBegin(ctx, "timResponseMessageList", thrift.EXCEPTION, seqId); err2 != nil { + _write_err157 = thrift.WrapTException(err2) + } + if err2 := _exc158.Write(ctx, oprot); _write_err157 == nil && err2 != nil { + _write_err157 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err157 == nil && err2 != nil { + _write_err157 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err157 == nil && err2 != nil { + _write_err157 = thrift.WrapTException(err2) + } + if _write_err157 != nil { + return false, thrift.WrapTException(_write_err157) + } + return true, err + } else { + result.Success = retval + } + tickerCancel() + if err2 := oprot.WriteMessageBegin(ctx, "timResponseMessageList", thrift.REPLY, seqId); err2 != nil { + _write_err157 = thrift.WrapTException(err2) + } + if err2 := result.Write(ctx, oprot); _write_err157 == nil && err2 != nil { + _write_err157 = thrift.WrapTException(err2) + } + if err2 := oprot.WriteMessageEnd(ctx); _write_err157 == nil && err2 != nil { + _write_err157 = thrift.WrapTException(err2) + } + if err2 := oprot.Flush(ctx); _write_err157 == nil && err2 != nil { + _write_err157 = thrift.WrapTException(err2) + } + if _write_err157 != nil { + return false, thrift.WrapTException(_write_err157) + } + return true, err +} + + +// HELPER FUNCTIONS AND STRUCTURES + +// Attributes: +// - Param +type ITimTimStreamArgs struct { + Param *TimParam `thrift:"param,1" db:"param" json:"param"` +} + +func NewITimTimStreamArgs() *ITimTimStreamArgs { + return &ITimTimStreamArgs{} +} + +var ITimTimStreamArgs_Param_DEFAULT *TimParam +func (p *ITimTimStreamArgs) GetParam() *TimParam { + if !p.IsSetParam() { + return ITimTimStreamArgs_Param_DEFAULT + } +return p.Param +} +func (p *ITimTimStreamArgs) IsSetParam() bool { + return p.Param != nil +} + +func (p *ITimTimStreamArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimStreamArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Param = &TimParam{} + if err := p.Param.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Param), err) + } + return nil +} + +func (p *ITimTimStreamArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timStream_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimStreamArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "param", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:param: ", p), err) } + if err := p.Param.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Param), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:param: ", p), err) } + return err +} + +func (p *ITimTimStreamArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimStreamArgs(%+v)", *p) +} + +type ITimTimStarttlsArgs struct { +} + +func NewITimTimStarttlsArgs() *ITimTimStarttlsArgs { + return &ITimTimStarttlsArgs{} +} + +func (p *ITimTimStarttlsArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimStarttlsArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timStarttls_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimStarttlsArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimStarttlsArgs(%+v)", *p) +} + +// Attributes: +// - Tid +// - Pwd +type ITimTimLoginArgs struct { + Tid *Tid `thrift:"tid,1" db:"tid" json:"tid"` + Pwd string `thrift:"pwd,2" db:"pwd" json:"pwd"` +} + +func NewITimTimLoginArgs() *ITimTimLoginArgs { + return &ITimTimLoginArgs{} +} + +var ITimTimLoginArgs_Tid_DEFAULT *Tid +func (p *ITimTimLoginArgs) GetTid() *Tid { + if !p.IsSetTid() { + return ITimTimLoginArgs_Tid_DEFAULT + } +return p.Tid +} + +func (p *ITimTimLoginArgs) GetPwd() string { + return p.Pwd +} +func (p *ITimTimLoginArgs) IsSetTid() bool { + return p.Tid != nil +} + +func (p *ITimTimLoginArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimLoginArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Tid = &Tid{} + if err := p.Tid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) + } + return nil +} + +func (p *ITimTimLoginArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Pwd = v +} + return nil +} + +func (p *ITimTimLoginArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timLogin_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimLoginArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tid", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) } + if err := p.Tid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) } + return err +} + +func (p *ITimTimLoginArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "pwd", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:pwd: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Pwd)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.pwd (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:pwd: ", p), err) } + return err +} + +func (p *ITimTimLoginArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimLoginArgs(%+v)", *p) +} + +// Attributes: +// - Ab +type ITimTimAckArgs struct { + Ab *TimAckBean `thrift:"ab,1" db:"ab" json:"ab"` +} + +func NewITimTimAckArgs() *ITimTimAckArgs { + return &ITimTimAckArgs{} +} + +var ITimTimAckArgs_Ab_DEFAULT *TimAckBean +func (p *ITimTimAckArgs) GetAb() *TimAckBean { + if !p.IsSetAb() { + return ITimTimAckArgs_Ab_DEFAULT + } +return p.Ab +} +func (p *ITimTimAckArgs) IsSetAb() bool { + return p.Ab != nil +} + +func (p *ITimTimAckArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimAckArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Ab = &TimAckBean{} + if err := p.Ab.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Ab), err) + } + return nil +} + +func (p *ITimTimAckArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timAck_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimAckArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "ab", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:ab: ", p), err) } + if err := p.Ab.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Ab), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:ab: ", p), err) } + return err +} + +func (p *ITimTimAckArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimAckArgs(%+v)", *p) +} + +// Attributes: +// - Pbean +type ITimTimPresenceArgs struct { + Pbean *TimPBean `thrift:"pbean,1" db:"pbean" json:"pbean"` +} + +func NewITimTimPresenceArgs() *ITimTimPresenceArgs { + return &ITimTimPresenceArgs{} +} + +var ITimTimPresenceArgs_Pbean_DEFAULT *TimPBean +func (p *ITimTimPresenceArgs) GetPbean() *TimPBean { + if !p.IsSetPbean() { + return ITimTimPresenceArgs_Pbean_DEFAULT + } +return p.Pbean +} +func (p *ITimTimPresenceArgs) IsSetPbean() bool { + return p.Pbean != nil +} + +func (p *ITimTimPresenceArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimPresenceArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Pbean = &TimPBean{} + if err := p.Pbean.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Pbean), err) + } + return nil +} + +func (p *ITimTimPresenceArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timPresence_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimPresenceArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "pbean", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pbean: ", p), err) } + if err := p.Pbean.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Pbean), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:pbean: ", p), err) } + return err +} + +func (p *ITimTimPresenceArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimPresenceArgs(%+v)", *p) +} + +// Attributes: +// - Mbean +type ITimTimMessageArgs struct { + Mbean *TimMBean `thrift:"mbean,1" db:"mbean" json:"mbean"` +} + +func NewITimTimMessageArgs() *ITimTimMessageArgs { + return &ITimTimMessageArgs{} +} + +var ITimTimMessageArgs_Mbean_DEFAULT *TimMBean +func (p *ITimTimMessageArgs) GetMbean() *TimMBean { + if !p.IsSetMbean() { + return ITimTimMessageArgs_Mbean_DEFAULT + } +return p.Mbean +} +func (p *ITimTimMessageArgs) IsSetMbean() bool { + return p.Mbean != nil +} + +func (p *ITimTimMessageArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimMessageArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Mbean = &TimMBean{} + if err := p.Mbean.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Mbean), err) + } + return nil +} + +func (p *ITimTimMessageArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timMessage_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimMessageArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "mbean", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:mbean: ", p), err) } + if err := p.Mbean.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Mbean), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:mbean: ", p), err) } + return err +} + +func (p *ITimTimMessageArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimMessageArgs(%+v)", *p) +} + +// Attributes: +// - ThreadId +type ITimTimPingArgs struct { + ThreadId string `thrift:"threadId,1" db:"threadId" json:"threadId"` +} + +func NewITimTimPingArgs() *ITimTimPingArgs { + return &ITimTimPingArgs{} +} + + +func (p *ITimTimPingArgs) GetThreadId() string { + return p.ThreadId +} +func (p *ITimTimPingArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRING { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimPingArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 1: ", err) +} else { + p.ThreadId = v +} + return nil +} + +func (p *ITimTimPingArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timPing_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimPingArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "threadId", thrift.STRING, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) } + if err := oprot.WriteString(ctx, string(p.ThreadId)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) } + return err +} + +func (p *ITimTimPingArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimPingArgs(%+v)", *p) +} + +// Attributes: +// - E +type ITimTimErrorArgs struct { + E *TimError `thrift:"e,1" db:"e" json:"e"` +} + +func NewITimTimErrorArgs() *ITimTimErrorArgs { + return &ITimTimErrorArgs{} +} + +var ITimTimErrorArgs_E_DEFAULT *TimError +func (p *ITimTimErrorArgs) GetE() *TimError { + if !p.IsSetE() { + return ITimTimErrorArgs_E_DEFAULT + } +return p.E +} +func (p *ITimTimErrorArgs) IsSetE() bool { + return p.E != nil +} + +func (p *ITimTimErrorArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimErrorArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.E = &TimError{} + if err := p.E.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.E), err) + } + return nil +} + +func (p *ITimTimErrorArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timError_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimErrorArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "e", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:e: ", p), err) } + if err := p.E.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.E), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:e: ", p), err) } + return err +} + +func (p *ITimTimErrorArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimErrorArgs(%+v)", *p) +} + +type ITimTimLogoutArgs struct { +} + +func NewITimTimLogoutArgs() *ITimTimLogoutArgs { + return &ITimTimLogoutArgs{} +} + +func (p *ITimTimLogoutArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimLogoutArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timLogout_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimLogoutArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimLogoutArgs(%+v)", *p) +} + +// Attributes: +// - Tid +// - Auth +type ITimTimRegistArgs struct { + Tid *Tid `thrift:"tid,1" db:"tid" json:"tid"` + Auth string `thrift:"auth,2" db:"auth" json:"auth"` +} + +func NewITimTimRegistArgs() *ITimTimRegistArgs { + return &ITimTimRegistArgs{} +} + +var ITimTimRegistArgs_Tid_DEFAULT *Tid +func (p *ITimTimRegistArgs) GetTid() *Tid { + if !p.IsSetTid() { + return ITimTimRegistArgs_Tid_DEFAULT + } +return p.Tid +} + +func (p *ITimTimRegistArgs) GetAuth() string { + return p.Auth +} +func (p *ITimTimRegistArgs) IsSetTid() bool { + return p.Tid != nil +} + +func (p *ITimTimRegistArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimRegistArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Tid = &Tid{} + if err := p.Tid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) + } + return nil +} + +func (p *ITimTimRegistArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Auth = v +} + return nil +} + +func (p *ITimTimRegistArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timRegist_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimRegistArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tid", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) } + if err := p.Tid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) } + return err +} + +func (p *ITimTimRegistArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "auth", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:auth: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Auth)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.auth (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:auth: ", p), err) } + return err +} + +func (p *ITimTimRegistArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimRegistArgs(%+v)", *p) +} + +// Attributes: +// - Roster +type ITimTimRoserArgs struct { + Roster *TimRoster `thrift:"roster,1" db:"roster" json:"roster"` +} + +func NewITimTimRoserArgs() *ITimTimRoserArgs { + return &ITimTimRoserArgs{} +} + +var ITimTimRoserArgs_Roster_DEFAULT *TimRoster +func (p *ITimTimRoserArgs) GetRoster() *TimRoster { + if !p.IsSetRoster() { + return ITimTimRoserArgs_Roster_DEFAULT + } +return p.Roster +} +func (p *ITimTimRoserArgs) IsSetRoster() bool { + return p.Roster != nil +} + +func (p *ITimTimRoserArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimRoserArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Roster = &TimRoster{} + if err := p.Roster.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Roster), err) + } + return nil +} + +func (p *ITimTimRoserArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timRoser_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimRoserArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "roster", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:roster: ", p), err) } + if err := p.Roster.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Roster), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:roster: ", p), err) } + return err +} + +func (p *ITimTimRoserArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimRoserArgs(%+v)", *p) +} + +// Attributes: +// - MbeanList +type ITimTimMessageListArgs struct { + MbeanList *TimMBeanList `thrift:"mbeanList,1" db:"mbeanList" json:"mbeanList"` +} + +func NewITimTimMessageListArgs() *ITimTimMessageListArgs { + return &ITimTimMessageListArgs{} +} + +var ITimTimMessageListArgs_MbeanList_DEFAULT *TimMBeanList +func (p *ITimTimMessageListArgs) GetMbeanList() *TimMBeanList { + if !p.IsSetMbeanList() { + return ITimTimMessageListArgs_MbeanList_DEFAULT + } +return p.MbeanList +} +func (p *ITimTimMessageListArgs) IsSetMbeanList() bool { + return p.MbeanList != nil +} + +func (p *ITimTimMessageListArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimMessageListArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.MbeanList = &TimMBeanList{} + if err := p.MbeanList.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.MbeanList), err) + } + return nil +} + +func (p *ITimTimMessageListArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timMessageList_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimMessageListArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "mbeanList", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:mbeanList: ", p), err) } + if err := p.MbeanList.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.MbeanList), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:mbeanList: ", p), err) } + return err +} + +func (p *ITimTimMessageListArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimMessageListArgs(%+v)", *p) +} + +// Attributes: +// - PbeanList +type ITimTimPresenceListArgs struct { + PbeanList *TimPBeanList `thrift:"pbeanList,1" db:"pbeanList" json:"pbeanList"` +} + +func NewITimTimPresenceListArgs() *ITimTimPresenceListArgs { + return &ITimTimPresenceListArgs{} +} + +var ITimTimPresenceListArgs_PbeanList_DEFAULT *TimPBeanList +func (p *ITimTimPresenceListArgs) GetPbeanList() *TimPBeanList { + if !p.IsSetPbeanList() { + return ITimTimPresenceListArgs_PbeanList_DEFAULT + } +return p.PbeanList +} +func (p *ITimTimPresenceListArgs) IsSetPbeanList() bool { + return p.PbeanList != nil +} + +func (p *ITimTimPresenceListArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimPresenceListArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.PbeanList = &TimPBeanList{} + if err := p.PbeanList.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.PbeanList), err) + } + return nil +} + +func (p *ITimTimPresenceListArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timPresenceList_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimPresenceListArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "pbeanList", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pbeanList: ", p), err) } + if err := p.PbeanList.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.PbeanList), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:pbeanList: ", p), err) } + return err +} + +func (p *ITimTimPresenceListArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimPresenceListArgs(%+v)", *p) +} + +// Attributes: +// - TimMsgIq +// - IqType +type ITimTimMessageIqArgs struct { + TimMsgIq *TimMessageIq `thrift:"timMsgIq,1" db:"timMsgIq" json:"timMsgIq"` + IqType string `thrift:"iqType,2" db:"iqType" json:"iqType"` +} + +func NewITimTimMessageIqArgs() *ITimTimMessageIqArgs { + return &ITimTimMessageIqArgs{} +} + +var ITimTimMessageIqArgs_TimMsgIq_DEFAULT *TimMessageIq +func (p *ITimTimMessageIqArgs) GetTimMsgIq() *TimMessageIq { + if !p.IsSetTimMsgIq() { + return ITimTimMessageIqArgs_TimMsgIq_DEFAULT + } +return p.TimMsgIq +} + +func (p *ITimTimMessageIqArgs) GetIqType() string { + return p.IqType +} +func (p *ITimTimMessageIqArgs) IsSetTimMsgIq() bool { + return p.TimMsgIq != nil +} + +func (p *ITimTimMessageIqArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimMessageIqArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.TimMsgIq = &TimMessageIq{} + if err := p.TimMsgIq.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TimMsgIq), err) + } + return nil +} + +func (p *ITimTimMessageIqArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.IqType = v +} + return nil +} + +func (p *ITimTimMessageIqArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timMessageIq_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimMessageIqArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "timMsgIq", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:timMsgIq: ", p), err) } + if err := p.TimMsgIq.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TimMsgIq), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:timMsgIq: ", p), err) } + return err +} + +func (p *ITimTimMessageIqArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "iqType", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:iqType: ", p), err) } + if err := oprot.WriteString(ctx, string(p.IqType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.iqType (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:iqType: ", p), err) } + return err +} + +func (p *ITimTimMessageIqArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimMessageIqArgs(%+v)", *p) +} + +// Attributes: +// - Mbean +type ITimTimMessageResultArgs struct { + Mbean *TimMBean `thrift:"mbean,1" db:"mbean" json:"mbean"` +} + +func NewITimTimMessageResultArgs() *ITimTimMessageResultArgs { + return &ITimTimMessageResultArgs{} +} + +var ITimTimMessageResultArgs_Mbean_DEFAULT *TimMBean +func (p *ITimTimMessageResultArgs) GetMbean() *TimMBean { + if !p.IsSetMbean() { + return ITimTimMessageResultArgs_Mbean_DEFAULT + } +return p.Mbean +} +func (p *ITimTimMessageResultArgs) IsSetMbean() bool { + return p.Mbean != nil +} + +func (p *ITimTimMessageResultArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimMessageResultArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Mbean = &TimMBean{} + if err := p.Mbean.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Mbean), err) + } + return nil +} + +func (p *ITimTimMessageResultArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timMessageResult_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimMessageResultArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "mbean", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:mbean: ", p), err) } + if err := p.Mbean.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Mbean), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:mbean: ", p), err) } + return err +} + +func (p *ITimTimMessageResultArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimMessageResultArgs(%+v)", *p) +} + +// Attributes: +// - Tpb +type ITimTimPropertyArgs struct { + Tpb *TimPropertyBean `thrift:"tpb,1" db:"tpb" json:"tpb"` +} + +func NewITimTimPropertyArgs() *ITimTimPropertyArgs { + return &ITimTimPropertyArgs{} +} + +var ITimTimPropertyArgs_Tpb_DEFAULT *TimPropertyBean +func (p *ITimTimPropertyArgs) GetTpb() *TimPropertyBean { + if !p.IsSetTpb() { + return ITimTimPropertyArgs_Tpb_DEFAULT + } +return p.Tpb +} +func (p *ITimTimPropertyArgs) IsSetTpb() bool { + return p.Tpb != nil +} + +func (p *ITimTimPropertyArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimPropertyArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Tpb = &TimPropertyBean{} + if err := p.Tpb.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tpb), err) + } + return nil +} + +func (p *ITimTimPropertyArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timProperty_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimPropertyArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tpb", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tpb: ", p), err) } + if err := p.Tpb.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tpb), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tpb: ", p), err) } + return err +} + +func (p *ITimTimPropertyArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimPropertyArgs(%+v)", *p) +} + +// Attributes: +// - Tid +// - Pwd +// - Auth +type ITimTimRemoteUserAuthArgs struct { + Tid *Tid `thrift:"tid,1" db:"tid" json:"tid"` + Pwd string `thrift:"pwd,2" db:"pwd" json:"pwd"` + Auth *TimAuth `thrift:"auth,3" db:"auth" json:"auth"` +} + +func NewITimTimRemoteUserAuthArgs() *ITimTimRemoteUserAuthArgs { + return &ITimTimRemoteUserAuthArgs{} +} + +var ITimTimRemoteUserAuthArgs_Tid_DEFAULT *Tid +func (p *ITimTimRemoteUserAuthArgs) GetTid() *Tid { + if !p.IsSetTid() { + return ITimTimRemoteUserAuthArgs_Tid_DEFAULT + } +return p.Tid +} + +func (p *ITimTimRemoteUserAuthArgs) GetPwd() string { + return p.Pwd +} +var ITimTimRemoteUserAuthArgs_Auth_DEFAULT *TimAuth +func (p *ITimTimRemoteUserAuthArgs) GetAuth() *TimAuth { + if !p.IsSetAuth() { + return ITimTimRemoteUserAuthArgs_Auth_DEFAULT + } +return p.Auth +} +func (p *ITimTimRemoteUserAuthArgs) IsSetTid() bool { + return p.Tid != nil +} + +func (p *ITimTimRemoteUserAuthArgs) IsSetAuth() bool { + return p.Auth != nil +} + +func (p *ITimTimRemoteUserAuthArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimRemoteUserAuthArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Tid = &Tid{} + if err := p.Tid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) + } + return nil +} + +func (p *ITimTimRemoteUserAuthArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.Pwd = v +} + return nil +} + +func (p *ITimTimRemoteUserAuthArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + p.Auth = &TimAuth{} + if err := p.Auth.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) + } + return nil +} + +func (p *ITimTimRemoteUserAuthArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timRemoteUserAuth_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimRemoteUserAuthArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tid", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) } + if err := p.Tid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) } + return err +} + +func (p *ITimTimRemoteUserAuthArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "pwd", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:pwd: ", p), err) } + if err := oprot.WriteString(ctx, string(p.Pwd)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.pwd (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:pwd: ", p), err) } + return err +} + +func (p *ITimTimRemoteUserAuthArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "auth", thrift.STRUCT, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:auth: ", p), err) } + if err := p.Auth.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:auth: ", p), err) } + return err +} + +func (p *ITimTimRemoteUserAuthArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimRemoteUserAuthArgs(%+v)", *p) +} + +// Attributes: +// - Success +type ITimTimRemoteUserAuthResult struct { + Success *TimRemoteUserBean `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewITimTimRemoteUserAuthResult() *ITimTimRemoteUserAuthResult { + return &ITimTimRemoteUserAuthResult{} +} + +var ITimTimRemoteUserAuthResult_Success_DEFAULT *TimRemoteUserBean +func (p *ITimTimRemoteUserAuthResult) GetSuccess() *TimRemoteUserBean { + if !p.IsSetSuccess() { + return ITimTimRemoteUserAuthResult_Success_DEFAULT + } +return p.Success +} +func (p *ITimTimRemoteUserAuthResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *ITimTimRemoteUserAuthResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimRemoteUserAuthResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TimRemoteUserBean{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } + return nil +} + +func (p *ITimTimRemoteUserAuthResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timRemoteUserAuth_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimRemoteUserAuthResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *ITimTimRemoteUserAuthResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimRemoteUserAuthResult(%+v)", *p) +} + +// Attributes: +// - Tid +// - Auth +type ITimTimRemoteUserGetArgs struct { + Tid *Tid `thrift:"tid,1" db:"tid" json:"tid"` + Auth *TimAuth `thrift:"auth,2" db:"auth" json:"auth"` +} + +func NewITimTimRemoteUserGetArgs() *ITimTimRemoteUserGetArgs { + return &ITimTimRemoteUserGetArgs{} +} + +var ITimTimRemoteUserGetArgs_Tid_DEFAULT *Tid +func (p *ITimTimRemoteUserGetArgs) GetTid() *Tid { + if !p.IsSetTid() { + return ITimTimRemoteUserGetArgs_Tid_DEFAULT + } +return p.Tid +} +var ITimTimRemoteUserGetArgs_Auth_DEFAULT *TimAuth +func (p *ITimTimRemoteUserGetArgs) GetAuth() *TimAuth { + if !p.IsSetAuth() { + return ITimTimRemoteUserGetArgs_Auth_DEFAULT + } +return p.Auth +} +func (p *ITimTimRemoteUserGetArgs) IsSetTid() bool { + return p.Tid != nil +} + +func (p *ITimTimRemoteUserGetArgs) IsSetAuth() bool { + return p.Auth != nil +} + +func (p *ITimTimRemoteUserGetArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimRemoteUserGetArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Tid = &Tid{} + if err := p.Tid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) + } + return nil +} + +func (p *ITimTimRemoteUserGetArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Auth = &TimAuth{} + if err := p.Auth.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) + } + return nil +} + +func (p *ITimTimRemoteUserGetArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timRemoteUserGet_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimRemoteUserGetArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tid", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) } + if err := p.Tid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) } + return err +} + +func (p *ITimTimRemoteUserGetArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "auth", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:auth: ", p), err) } + if err := p.Auth.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:auth: ", p), err) } + return err +} + +func (p *ITimTimRemoteUserGetArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimRemoteUserGetArgs(%+v)", *p) +} + +// Attributes: +// - Success +type ITimTimRemoteUserGetResult struct { + Success *TimRemoteUserBean `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewITimTimRemoteUserGetResult() *ITimTimRemoteUserGetResult { + return &ITimTimRemoteUserGetResult{} +} + +var ITimTimRemoteUserGetResult_Success_DEFAULT *TimRemoteUserBean +func (p *ITimTimRemoteUserGetResult) GetSuccess() *TimRemoteUserBean { + if !p.IsSetSuccess() { + return ITimTimRemoteUserGetResult_Success_DEFAULT + } +return p.Success +} +func (p *ITimTimRemoteUserGetResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *ITimTimRemoteUserGetResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimRemoteUserGetResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TimRemoteUserBean{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } + return nil +} + +func (p *ITimTimRemoteUserGetResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timRemoteUserGet_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimRemoteUserGetResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *ITimTimRemoteUserGetResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimRemoteUserGetResult(%+v)", *p) +} + +// Attributes: +// - Tid +// - Ub +// - Auth +type ITimTimRemoteUserEditArgs struct { + Tid *Tid `thrift:"tid,1" db:"tid" json:"tid"` + Ub *TimUserBean `thrift:"ub,2" db:"ub" json:"ub"` + Auth *TimAuth `thrift:"auth,3" db:"auth" json:"auth"` +} + +func NewITimTimRemoteUserEditArgs() *ITimTimRemoteUserEditArgs { + return &ITimTimRemoteUserEditArgs{} +} + +var ITimTimRemoteUserEditArgs_Tid_DEFAULT *Tid +func (p *ITimTimRemoteUserEditArgs) GetTid() *Tid { + if !p.IsSetTid() { + return ITimTimRemoteUserEditArgs_Tid_DEFAULT + } +return p.Tid +} +var ITimTimRemoteUserEditArgs_Ub_DEFAULT *TimUserBean +func (p *ITimTimRemoteUserEditArgs) GetUb() *TimUserBean { + if !p.IsSetUb() { + return ITimTimRemoteUserEditArgs_Ub_DEFAULT + } +return p.Ub +} +var ITimTimRemoteUserEditArgs_Auth_DEFAULT *TimAuth +func (p *ITimTimRemoteUserEditArgs) GetAuth() *TimAuth { + if !p.IsSetAuth() { + return ITimTimRemoteUserEditArgs_Auth_DEFAULT + } +return p.Auth +} +func (p *ITimTimRemoteUserEditArgs) IsSetTid() bool { + return p.Tid != nil +} + +func (p *ITimTimRemoteUserEditArgs) IsSetUb() bool { + return p.Ub != nil +} + +func (p *ITimTimRemoteUserEditArgs) IsSetAuth() bool { + return p.Auth != nil +} + +func (p *ITimTimRemoteUserEditArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimRemoteUserEditArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Tid = &Tid{} + if err := p.Tid.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) + } + return nil +} + +func (p *ITimTimRemoteUserEditArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Ub = &TimUserBean{} + if err := p.Ub.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Ub), err) + } + return nil +} + +func (p *ITimTimRemoteUserEditArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + p.Auth = &TimAuth{} + if err := p.Auth.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) + } + return nil +} + +func (p *ITimTimRemoteUserEditArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timRemoteUserEdit_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimRemoteUserEditArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "tid", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) } + if err := p.Tid.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) } + return err +} + +func (p *ITimTimRemoteUserEditArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "ub", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:ub: ", p), err) } + if err := p.Ub.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Ub), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:ub: ", p), err) } + return err +} + +func (p *ITimTimRemoteUserEditArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "auth", thrift.STRUCT, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:auth: ", p), err) } + if err := p.Auth.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:auth: ", p), err) } + return err +} + +func (p *ITimTimRemoteUserEditArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimRemoteUserEditArgs(%+v)", *p) +} + +// Attributes: +// - Success +type ITimTimRemoteUserEditResult struct { + Success *TimRemoteUserBean `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewITimTimRemoteUserEditResult() *ITimTimRemoteUserEditResult { + return &ITimTimRemoteUserEditResult{} +} + +var ITimTimRemoteUserEditResult_Success_DEFAULT *TimRemoteUserBean +func (p *ITimTimRemoteUserEditResult) GetSuccess() *TimRemoteUserBean { + if !p.IsSetSuccess() { + return ITimTimRemoteUserEditResult_Success_DEFAULT + } +return p.Success +} +func (p *ITimTimRemoteUserEditResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *ITimTimRemoteUserEditResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimRemoteUserEditResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TimRemoteUserBean{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } + return nil +} + +func (p *ITimTimRemoteUserEditResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timRemoteUserEdit_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimRemoteUserEditResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *ITimTimRemoteUserEditResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimRemoteUserEditResult(%+v)", *p) +} + +// Attributes: +// - Pbean +// - Auth +type ITimTimResponsePresenceArgs struct { + Pbean *TimPBean `thrift:"pbean,1" db:"pbean" json:"pbean"` + Auth *TimAuth `thrift:"auth,2" db:"auth" json:"auth"` +} + +func NewITimTimResponsePresenceArgs() *ITimTimResponsePresenceArgs { + return &ITimTimResponsePresenceArgs{} +} + +var ITimTimResponsePresenceArgs_Pbean_DEFAULT *TimPBean +func (p *ITimTimResponsePresenceArgs) GetPbean() *TimPBean { + if !p.IsSetPbean() { + return ITimTimResponsePresenceArgs_Pbean_DEFAULT + } +return p.Pbean +} +var ITimTimResponsePresenceArgs_Auth_DEFAULT *TimAuth +func (p *ITimTimResponsePresenceArgs) GetAuth() *TimAuth { + if !p.IsSetAuth() { + return ITimTimResponsePresenceArgs_Auth_DEFAULT + } +return p.Auth +} +func (p *ITimTimResponsePresenceArgs) IsSetPbean() bool { + return p.Pbean != nil +} + +func (p *ITimTimResponsePresenceArgs) IsSetAuth() bool { + return p.Auth != nil +} + +func (p *ITimTimResponsePresenceArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimResponsePresenceArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Pbean = &TimPBean{} + if err := p.Pbean.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Pbean), err) + } + return nil +} + +func (p *ITimTimResponsePresenceArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Auth = &TimAuth{} + if err := p.Auth.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) + } + return nil +} + +func (p *ITimTimResponsePresenceArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timResponsePresence_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimResponsePresenceArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "pbean", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pbean: ", p), err) } + if err := p.Pbean.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Pbean), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:pbean: ", p), err) } + return err +} + +func (p *ITimTimResponsePresenceArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "auth", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:auth: ", p), err) } + if err := p.Auth.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:auth: ", p), err) } + return err +} + +func (p *ITimTimResponsePresenceArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimResponsePresenceArgs(%+v)", *p) +} + +// Attributes: +// - Success +type ITimTimResponsePresenceResult struct { + Success *TimResponseBean `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewITimTimResponsePresenceResult() *ITimTimResponsePresenceResult { + return &ITimTimResponsePresenceResult{} +} + +var ITimTimResponsePresenceResult_Success_DEFAULT *TimResponseBean +func (p *ITimTimResponsePresenceResult) GetSuccess() *TimResponseBean { + if !p.IsSetSuccess() { + return ITimTimResponsePresenceResult_Success_DEFAULT + } +return p.Success +} +func (p *ITimTimResponsePresenceResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *ITimTimResponsePresenceResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimResponsePresenceResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TimResponseBean{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } + return nil +} + +func (p *ITimTimResponsePresenceResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timResponsePresence_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimResponsePresenceResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *ITimTimResponsePresenceResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimResponsePresenceResult(%+v)", *p) +} + +// Attributes: +// - Mbean +// - Auth +type ITimTimResponseMessageArgs struct { + Mbean *TimMBean `thrift:"mbean,1" db:"mbean" json:"mbean"` + Auth *TimAuth `thrift:"auth,2" db:"auth" json:"auth"` +} + +func NewITimTimResponseMessageArgs() *ITimTimResponseMessageArgs { + return &ITimTimResponseMessageArgs{} +} + +var ITimTimResponseMessageArgs_Mbean_DEFAULT *TimMBean +func (p *ITimTimResponseMessageArgs) GetMbean() *TimMBean { + if !p.IsSetMbean() { + return ITimTimResponseMessageArgs_Mbean_DEFAULT + } +return p.Mbean +} +var ITimTimResponseMessageArgs_Auth_DEFAULT *TimAuth +func (p *ITimTimResponseMessageArgs) GetAuth() *TimAuth { + if !p.IsSetAuth() { + return ITimTimResponseMessageArgs_Auth_DEFAULT + } +return p.Auth +} +func (p *ITimTimResponseMessageArgs) IsSetMbean() bool { + return p.Mbean != nil +} + +func (p *ITimTimResponseMessageArgs) IsSetAuth() bool { + return p.Auth != nil +} + +func (p *ITimTimResponseMessageArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimResponseMessageArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.Mbean = &TimMBean{} + if err := p.Mbean.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Mbean), err) + } + return nil +} + +func (p *ITimTimResponseMessageArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Auth = &TimAuth{} + if err := p.Auth.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) + } + return nil +} + +func (p *ITimTimResponseMessageArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timResponseMessage_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimResponseMessageArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "mbean", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:mbean: ", p), err) } + if err := p.Mbean.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Mbean), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:mbean: ", p), err) } + return err +} + +func (p *ITimTimResponseMessageArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "auth", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:auth: ", p), err) } + if err := p.Auth.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:auth: ", p), err) } + return err +} + +func (p *ITimTimResponseMessageArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimResponseMessageArgs(%+v)", *p) +} + +// Attributes: +// - Success +type ITimTimResponseMessageResult struct { + Success *TimResponseBean `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewITimTimResponseMessageResult() *ITimTimResponseMessageResult { + return &ITimTimResponseMessageResult{} +} + +var ITimTimResponseMessageResult_Success_DEFAULT *TimResponseBean +func (p *ITimTimResponseMessageResult) GetSuccess() *TimResponseBean { + if !p.IsSetSuccess() { + return ITimTimResponseMessageResult_Success_DEFAULT + } +return p.Success +} +func (p *ITimTimResponseMessageResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *ITimTimResponseMessageResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimResponseMessageResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TimResponseBean{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } + return nil +} + +func (p *ITimTimResponseMessageResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timResponseMessage_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimResponseMessageResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *ITimTimResponseMessageResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimResponseMessageResult(%+v)", *p) +} + +// Attributes: +// - TimMsgIq +// - IqType +// - Auth +type ITimTimResponseMessageIqArgs struct { + TimMsgIq *TimMessageIq `thrift:"timMsgIq,1" db:"timMsgIq" json:"timMsgIq"` + IqType string `thrift:"iqType,2" db:"iqType" json:"iqType"` + Auth *TimAuth `thrift:"auth,3" db:"auth" json:"auth"` +} + +func NewITimTimResponseMessageIqArgs() *ITimTimResponseMessageIqArgs { + return &ITimTimResponseMessageIqArgs{} +} + +var ITimTimResponseMessageIqArgs_TimMsgIq_DEFAULT *TimMessageIq +func (p *ITimTimResponseMessageIqArgs) GetTimMsgIq() *TimMessageIq { + if !p.IsSetTimMsgIq() { + return ITimTimResponseMessageIqArgs_TimMsgIq_DEFAULT + } +return p.TimMsgIq +} + +func (p *ITimTimResponseMessageIqArgs) GetIqType() string { + return p.IqType +} +var ITimTimResponseMessageIqArgs_Auth_DEFAULT *TimAuth +func (p *ITimTimResponseMessageIqArgs) GetAuth() *TimAuth { + if !p.IsSetAuth() { + return ITimTimResponseMessageIqArgs_Auth_DEFAULT + } +return p.Auth +} +func (p *ITimTimResponseMessageIqArgs) IsSetTimMsgIq() bool { + return p.TimMsgIq != nil +} + +func (p *ITimTimResponseMessageIqArgs) IsSetAuth() bool { + return p.Auth != nil +} + +func (p *ITimTimResponseMessageIqArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRING { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 3: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField3(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimResponseMessageIqArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.TimMsgIq = &TimMessageIq{} + if err := p.TimMsgIq.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TimMsgIq), err) + } + return nil +} + +func (p *ITimTimResponseMessageIqArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + if v, err := iprot.ReadString(ctx); err != nil { + return thrift.PrependError("error reading field 2: ", err) +} else { + p.IqType = v +} + return nil +} + +func (p *ITimTimResponseMessageIqArgs) ReadField3(ctx context.Context, iprot thrift.TProtocol) error { + p.Auth = &TimAuth{} + if err := p.Auth.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) + } + return nil +} + +func (p *ITimTimResponseMessageIqArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timResponseMessageIq_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + if err := p.writeField3(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimResponseMessageIqArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "timMsgIq", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:timMsgIq: ", p), err) } + if err := p.TimMsgIq.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TimMsgIq), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:timMsgIq: ", p), err) } + return err +} + +func (p *ITimTimResponseMessageIqArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "iqType", thrift.STRING, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:iqType: ", p), err) } + if err := oprot.WriteString(ctx, string(p.IqType)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.iqType (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:iqType: ", p), err) } + return err +} + +func (p *ITimTimResponseMessageIqArgs) writeField3(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "auth", thrift.STRUCT, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:auth: ", p), err) } + if err := p.Auth.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:auth: ", p), err) } + return err +} + +func (p *ITimTimResponseMessageIqArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimResponseMessageIqArgs(%+v)", *p) +} + +// Attributes: +// - Success +type ITimTimResponseMessageIqResult struct { + Success *TimMBeanList `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewITimTimResponseMessageIqResult() *ITimTimResponseMessageIqResult { + return &ITimTimResponseMessageIqResult{} +} + +var ITimTimResponseMessageIqResult_Success_DEFAULT *TimMBeanList +func (p *ITimTimResponseMessageIqResult) GetSuccess() *TimMBeanList { + if !p.IsSetSuccess() { + return ITimTimResponseMessageIqResult_Success_DEFAULT + } +return p.Success +} +func (p *ITimTimResponseMessageIqResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *ITimTimResponseMessageIqResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimResponseMessageIqResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TimMBeanList{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } + return nil +} + +func (p *ITimTimResponseMessageIqResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timResponseMessageIq_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimResponseMessageIqResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *ITimTimResponseMessageIqResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimResponseMessageIqResult(%+v)", *p) +} + +// Attributes: +// - PbeanList +// - Auth +type ITimTimResponsePresenceListArgs struct { + PbeanList *TimPBeanList `thrift:"pbeanList,1" db:"pbeanList" json:"pbeanList"` + Auth *TimAuth `thrift:"auth,2" db:"auth" json:"auth"` +} + +func NewITimTimResponsePresenceListArgs() *ITimTimResponsePresenceListArgs { + return &ITimTimResponsePresenceListArgs{} +} + +var ITimTimResponsePresenceListArgs_PbeanList_DEFAULT *TimPBeanList +func (p *ITimTimResponsePresenceListArgs) GetPbeanList() *TimPBeanList { + if !p.IsSetPbeanList() { + return ITimTimResponsePresenceListArgs_PbeanList_DEFAULT + } +return p.PbeanList +} +var ITimTimResponsePresenceListArgs_Auth_DEFAULT *TimAuth +func (p *ITimTimResponsePresenceListArgs) GetAuth() *TimAuth { + if !p.IsSetAuth() { + return ITimTimResponsePresenceListArgs_Auth_DEFAULT + } +return p.Auth +} +func (p *ITimTimResponsePresenceListArgs) IsSetPbeanList() bool { + return p.PbeanList != nil +} + +func (p *ITimTimResponsePresenceListArgs) IsSetAuth() bool { + return p.Auth != nil +} + +func (p *ITimTimResponsePresenceListArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimResponsePresenceListArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.PbeanList = &TimPBeanList{} + if err := p.PbeanList.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.PbeanList), err) + } + return nil +} + +func (p *ITimTimResponsePresenceListArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Auth = &TimAuth{} + if err := p.Auth.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) + } + return nil +} + +func (p *ITimTimResponsePresenceListArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timResponsePresenceList_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimResponsePresenceListArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "pbeanList", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pbeanList: ", p), err) } + if err := p.PbeanList.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.PbeanList), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:pbeanList: ", p), err) } + return err +} + +func (p *ITimTimResponsePresenceListArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "auth", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:auth: ", p), err) } + if err := p.Auth.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:auth: ", p), err) } + return err +} + +func (p *ITimTimResponsePresenceListArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimResponsePresenceListArgs(%+v)", *p) +} + +// Attributes: +// - Success +type ITimTimResponsePresenceListResult struct { + Success *TimResponseBean `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewITimTimResponsePresenceListResult() *ITimTimResponsePresenceListResult { + return &ITimTimResponsePresenceListResult{} +} + +var ITimTimResponsePresenceListResult_Success_DEFAULT *TimResponseBean +func (p *ITimTimResponsePresenceListResult) GetSuccess() *TimResponseBean { + if !p.IsSetSuccess() { + return ITimTimResponsePresenceListResult_Success_DEFAULT + } +return p.Success +} +func (p *ITimTimResponsePresenceListResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *ITimTimResponsePresenceListResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimResponsePresenceListResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TimResponseBean{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } + return nil +} + +func (p *ITimTimResponsePresenceListResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timResponsePresenceList_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimResponsePresenceListResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *ITimTimResponsePresenceListResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimResponsePresenceListResult(%+v)", *p) +} + +// Attributes: +// - MbeanList +// - Auth +type ITimTimResponseMessageListArgs struct { + MbeanList *TimMBeanList `thrift:"mbeanList,1" db:"mbeanList" json:"mbeanList"` + Auth *TimAuth `thrift:"auth,2" db:"auth" json:"auth"` +} + +func NewITimTimResponseMessageListArgs() *ITimTimResponseMessageListArgs { + return &ITimTimResponseMessageListArgs{} +} + +var ITimTimResponseMessageListArgs_MbeanList_DEFAULT *TimMBeanList +func (p *ITimTimResponseMessageListArgs) GetMbeanList() *TimMBeanList { + if !p.IsSetMbeanList() { + return ITimTimResponseMessageListArgs_MbeanList_DEFAULT + } +return p.MbeanList +} +var ITimTimResponseMessageListArgs_Auth_DEFAULT *TimAuth +func (p *ITimTimResponseMessageListArgs) GetAuth() *TimAuth { + if !p.IsSetAuth() { + return ITimTimResponseMessageListArgs_Auth_DEFAULT + } +return p.Auth +} +func (p *ITimTimResponseMessageListArgs) IsSetMbeanList() bool { + return p.MbeanList != nil +} + +func (p *ITimTimResponseMessageListArgs) IsSetAuth() bool { + return p.Auth != nil +} + +func (p *ITimTimResponseMessageListArgs) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField1(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + case 2: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField2(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimResponseMessageListArgs) ReadField1(ctx context.Context, iprot thrift.TProtocol) error { + p.MbeanList = &TimMBeanList{} + if err := p.MbeanList.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.MbeanList), err) + } + return nil +} + +func (p *ITimTimResponseMessageListArgs) ReadField2(ctx context.Context, iprot thrift.TProtocol) error { + p.Auth = &TimAuth{} + if err := p.Auth.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) + } + return nil +} + +func (p *ITimTimResponseMessageListArgs) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timResponseMessageList_args"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField1(ctx, oprot); err != nil { return err } + if err := p.writeField2(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimResponseMessageListArgs) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "mbeanList", thrift.STRUCT, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:mbeanList: ", p), err) } + if err := p.MbeanList.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.MbeanList), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:mbeanList: ", p), err) } + return err +} + +func (p *ITimTimResponseMessageListArgs) writeField2(ctx context.Context, oprot thrift.TProtocol) (err error) { + if err := oprot.WriteFieldBegin(ctx, "auth", thrift.STRUCT, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:auth: ", p), err) } + if err := p.Auth.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:auth: ", p), err) } + return err +} + +func (p *ITimTimResponseMessageListArgs) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimResponseMessageListArgs(%+v)", *p) +} + +// Attributes: +// - Success +type ITimTimResponseMessageListResult struct { + Success *TimResponseBean `thrift:"success,0" db:"success" json:"success,omitempty"` +} + +func NewITimTimResponseMessageListResult() *ITimTimResponseMessageListResult { + return &ITimTimResponseMessageListResult{} +} + +var ITimTimResponseMessageListResult_Success_DEFAULT *TimResponseBean +func (p *ITimTimResponseMessageListResult) GetSuccess() *TimResponseBean { + if !p.IsSetSuccess() { + return ITimTimResponseMessageListResult_Success_DEFAULT + } +return p.Success +} +func (p *ITimTimResponseMessageListResult) IsSetSuccess() bool { + return p.Success != nil +} + +func (p *ITimTimResponseMessageListResult) Read(ctx context.Context, iprot thrift.TProtocol) error { + if _, err := iprot.ReadStructBegin(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 0: + if fieldTypeId == thrift.STRUCT { + if err := p.ReadField0(ctx, iprot); err != nil { + return err + } + } else { + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + default: + if err := iprot.Skip(ctx, fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(ctx); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} + +func (p *ITimTimResponseMessageListResult) ReadField0(ctx context.Context, iprot thrift.TProtocol) error { + p.Success = &TimResponseBean{} + if err := p.Success.Read(ctx, iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) + } + return nil +} + +func (p *ITimTimResponseMessageListResult) Write(ctx context.Context, oprot thrift.TProtocol) error { + if err := oprot.WriteStructBegin(ctx, "timResponseMessageList_result"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if p != nil { + if err := p.writeField0(ctx, oprot); err != nil { return err } + } + if err := oprot.WriteFieldStop(ctx); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(ctx); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *ITimTimResponseMessageListResult) writeField0(ctx context.Context, oprot thrift.TProtocol) (err error) { + if p.IsSetSuccess() { + if err := oprot.WriteFieldBegin(ctx, "success", thrift.STRUCT, 0); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) } + if err := p.Success.Write(ctx, oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) + } + if err := oprot.WriteFieldEnd(ctx); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) } + } + return err +} + +func (p *ITimTimResponseMessageListResult) String() string { + if p == nil { + return "" + } + return fmt.Sprintf("ITimTimResponseMessageListResult(%+v)", *p) +} + + diff --git a/protocols/gen-go/protocol/ttypes.go b/protocols/gen-go/protocol/ttypes.go deleted file mode 100644 index 019e080..0000000 --- a/protocols/gen-go/protocol/ttypes.go +++ /dev/null @@ -1,8254 +0,0 @@ -// Autogenerated by Thrift Compiler (0.9.3) -// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - -package protocol - -import ( - "bytes" - "fmt" - "git.apache.org/thrift.git/lib/go/thrift" -) - -// (needed to ensure safety because of naive import list construction.) -var _ = thrift.ZERO -var _ = fmt.Printf -var _ = bytes.Equal - -var GoUnusedProtection__ int - -// Attributes: -// - ErrCode: 错误码 -// - ErrMsg: 错误内容 -type TimError struct { - ErrCode *int32 `thrift:"errCode,1" json:"errCode,omitempty"` - ErrMsg *string `thrift:"errMsg,2" json:"errMsg,omitempty"` -} - -func NewTimError() *TimError { - return &TimError{} -} - -var TimError_ErrCode_DEFAULT int32 - -func (p *TimError) GetErrCode() int32 { - if !p.IsSetErrCode() { - return TimError_ErrCode_DEFAULT - } - return *p.ErrCode -} - -var TimError_ErrMsg_DEFAULT string - -func (p *TimError) GetErrMsg() string { - if !p.IsSetErrMsg() { - return TimError_ErrMsg_DEFAULT - } - return *p.ErrMsg -} -func (p *TimError) IsSetErrCode() bool { - return p.ErrCode != nil -} - -func (p *TimError) IsSetErrMsg() bool { - return p.ErrMsg != nil -} - -func (p *TimError) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimError) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.ErrCode = &v - } - return nil -} - -func (p *TimError) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.ErrMsg = &v - } - return nil -} - -func (p *TimError) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimError"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimError) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetErrCode() { - if err := oprot.WriteFieldBegin("errCode", thrift.I32, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:errCode: ", p), err) - } - if err := oprot.WriteI32(int32(*p.ErrCode)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.errCode (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:errCode: ", p), err) - } - } - return err -} - -func (p *TimError) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetErrMsg() { - if err := oprot.WriteFieldBegin("errMsg", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:errMsg: ", p), err) - } - if err := oprot.WriteString(string(*p.ErrMsg)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.errMsg (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:errMsg: ", p), err) - } - } - return err -} - -func (p *TimError) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimError(%+v)", *p) -} - -// Attributes: -// - Key: 键 -// - Value: 值 -type TimNode struct { - Key *string `thrift:"key,1" json:"key,omitempty"` - Value *string `thrift:"value,2" json:"value,omitempty"` -} - -func NewTimNode() *TimNode { - return &TimNode{} -} - -var TimNode_Key_DEFAULT string - -func (p *TimNode) GetKey() string { - if !p.IsSetKey() { - return TimNode_Key_DEFAULT - } - return *p.Key -} - -var TimNode_Value_DEFAULT string - -func (p *TimNode) GetValue() string { - if !p.IsSetValue() { - return TimNode_Value_DEFAULT - } - return *p.Value -} -func (p *TimNode) IsSetKey() bool { - return p.Key != nil -} - -func (p *TimNode) IsSetValue() bool { - return p.Value != nil -} - -func (p *TimNode) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimNode) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Key = &v - } - return nil -} - -func (p *TimNode) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Value = &v - } - return nil -} - -func (p *TimNode) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimNode"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimNode) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetKey() { - if err := oprot.WriteFieldBegin("key", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:key: ", p), err) - } - if err := oprot.WriteString(string(*p.Key)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.key (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:key: ", p), err) - } - } - return err -} - -func (p *TimNode) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetValue() { - if err := oprot.WriteFieldBegin("value", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:value: ", p), err) - } - if err := oprot.WriteString(string(*p.Value)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.value (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:value: ", p), err) - } - } - return err -} - -func (p *TimNode) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimNode(%+v)", *p) -} - -// Attributes: -// - ID: id,返回所要回执协议的线程id -// - AckType: 类型,自定义 如:ping,message等 -// - AckStatus: 状态,如成功,失败等 -// - ExtraList: 附加信息 -// - Err: 错误信息 -// - ExtraMap -type TimAckBean struct { - ID *string `thrift:"id,1" json:"id,omitempty"` - AckType *string `thrift:"ackType,2" json:"ackType,omitempty"` - AckStatus *string `thrift:"ackStatus,3" json:"ackStatus,omitempty"` - ExtraList []*TimNode `thrift:"extraList,4" json:"extraList,omitempty"` - Err *TimError `thrift:"err,5" json:"err,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,6" json:"extraMap,omitempty"` -} - -func NewTimAckBean() *TimAckBean { - return &TimAckBean{} -} - -var TimAckBean_ID_DEFAULT string - -func (p *TimAckBean) GetID() string { - if !p.IsSetID() { - return TimAckBean_ID_DEFAULT - } - return *p.ID -} - -var TimAckBean_AckType_DEFAULT string - -func (p *TimAckBean) GetAckType() string { - if !p.IsSetAckType() { - return TimAckBean_AckType_DEFAULT - } - return *p.AckType -} - -var TimAckBean_AckStatus_DEFAULT string - -func (p *TimAckBean) GetAckStatus() string { - if !p.IsSetAckStatus() { - return TimAckBean_AckStatus_DEFAULT - } - return *p.AckStatus -} - -var TimAckBean_ExtraList_DEFAULT []*TimNode - -func (p *TimAckBean) GetExtraList() []*TimNode { - return p.ExtraList -} - -var TimAckBean_Err_DEFAULT *TimError - -func (p *TimAckBean) GetErr() *TimError { - if !p.IsSetErr() { - return TimAckBean_Err_DEFAULT - } - return p.Err -} - -var TimAckBean_ExtraMap_DEFAULT map[string]string - -func (p *TimAckBean) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimAckBean) IsSetID() bool { - return p.ID != nil -} - -func (p *TimAckBean) IsSetAckType() bool { - return p.AckType != nil -} - -func (p *TimAckBean) IsSetAckStatus() bool { - return p.AckStatus != nil -} - -func (p *TimAckBean) IsSetExtraList() bool { - return p.ExtraList != nil -} - -func (p *TimAckBean) IsSetErr() bool { - return p.Err != nil -} - -func (p *TimAckBean) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimAckBean) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimAckBean) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.ID = &v - } - return nil -} - -func (p *TimAckBean) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.AckType = &v - } - return nil -} - -func (p *TimAckBean) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.AckStatus = &v - } - return nil -} - -func (p *TimAckBean) readField4(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TimNode, 0, size) - p.ExtraList = tSlice - for i := 0; i < size; i++ { - _elem0 := &TimNode{} - if err := _elem0.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem0), err) - } - p.ExtraList = append(p.ExtraList, _elem0) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimAckBean) readField5(iprot thrift.TProtocol) error { - p.Err = &TimError{} - if err := p.Err.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Err), err) - } - return nil -} - -func (p *TimAckBean) readField6(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key1 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key1 = v - } - var _val2 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val2 = v - } - p.ExtraMap[_key1] = _val2 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimAckBean) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimAckBean"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimAckBean) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetID() { - if err := oprot.WriteFieldBegin("id", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:id: ", p), err) - } - if err := oprot.WriteString(string(*p.ID)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.id (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:id: ", p), err) - } - } - return err -} - -func (p *TimAckBean) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetAckType() { - if err := oprot.WriteFieldBegin("ackType", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:ackType: ", p), err) - } - if err := oprot.WriteString(string(*p.AckType)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.ackType (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:ackType: ", p), err) - } - } - return err -} - -func (p *TimAckBean) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetAckStatus() { - if err := oprot.WriteFieldBegin("ackStatus", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:ackStatus: ", p), err) - } - if err := oprot.WriteString(string(*p.AckStatus)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.ackStatus (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:ackStatus: ", p), err) - } - } - return err -} - -func (p *TimAckBean) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraList() { - if err := oprot.WriteFieldBegin("extraList", thrift.LIST, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraList: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ExtraList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.ExtraList { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraList: ", p), err) - } - } - return err -} - -func (p *TimAckBean) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetErr() { - if err := oprot.WriteFieldBegin("err", thrift.STRUCT, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:err: ", p), err) - } - if err := p.Err.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Err), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:err: ", p), err) - } - } - return err -} - -func (p *TimAckBean) writeField6(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:extraMap: ", p), err) - } - } - return err -} - -func (p *TimAckBean) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimAckBean(%+v)", *p) -} - -// Attributes: -// - Chl: 渠道 -// - Platform: 平台 -// - Version: version 客户端协议版本 -type TimHBean struct { - Chl int32 `thrift:"chl,1,required" json:"chl"` - Platform *int32 `thrift:"platform,2" json:"platform,omitempty"` - Version int16 `thrift:"version,3,required" json:"version"` -} - -func NewTimHBean() *TimHBean { - return &TimHBean{} -} - -func (p *TimHBean) GetChl() int32 { - return p.Chl -} - -var TimHBean_Platform_DEFAULT int32 - -func (p *TimHBean) GetPlatform() int32 { - if !p.IsSetPlatform() { - return TimHBean_Platform_DEFAULT - } - return *p.Platform -} - -func (p *TimHBean) GetVersion() int16 { - return p.Version -} -func (p *TimHBean) IsSetPlatform() bool { - return p.Platform != nil -} - -func (p *TimHBean) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetChl bool = false - var issetVersion bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetChl = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - issetVersion = true - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetChl { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Chl is not set")) - } - if !issetVersion { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Version is not set")) - } - return nil -} - -func (p *TimHBean) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Chl = v - } - return nil -} - -func (p *TimHBean) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Platform = &v - } - return nil -} - -func (p *TimHBean) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI16(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.Version = v - } - return nil -} - -func (p *TimHBean) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimHBean"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimHBean) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("chl", thrift.I32, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:chl: ", p), err) - } - if err := oprot.WriteI32(int32(p.Chl)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.chl (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:chl: ", p), err) - } - return err -} - -func (p *TimHBean) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetPlatform() { - if err := oprot.WriteFieldBegin("platform", thrift.I32, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:platform: ", p), err) - } - if err := oprot.WriteI32(int32(*p.Platform)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.platform (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:platform: ", p), err) - } - } - return err -} - -func (p *TimHBean) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("version", thrift.I16, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:version: ", p), err) - } - if err := oprot.WriteI16(int16(p.Version)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.version (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:version: ", p), err) - } - return err -} - -func (p *TimHBean) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimHBean(%+v)", *p) -} - -// Attributes: -// - Timestamp: 服务器时间 -// - Version: 版本 -// - Lang: 语言 -// - ExtraList: 附加信息 -// - ExtraMap -// - Interflow: 消息合流 -// - TLS: tls -type TimParam struct { - Timestamp *string `thrift:"timestamp,1" json:"timestamp,omitempty"` - Version *int16 `thrift:"version,2" json:"version,omitempty"` - Lang *string `thrift:"lang,3" json:"lang,omitempty"` - ExtraList []*TimNode `thrift:"extraList,4" json:"extraList,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,5" json:"extraMap,omitempty"` - Interflow *string `thrift:"interflow,6" json:"interflow,omitempty"` - TLS *string `thrift:"tls,7" json:"tls,omitempty"` -} - -func NewTimParam() *TimParam { - return &TimParam{} -} - -var TimParam_Timestamp_DEFAULT string - -func (p *TimParam) GetTimestamp() string { - if !p.IsSetTimestamp() { - return TimParam_Timestamp_DEFAULT - } - return *p.Timestamp -} - -var TimParam_Version_DEFAULT int16 - -func (p *TimParam) GetVersion() int16 { - if !p.IsSetVersion() { - return TimParam_Version_DEFAULT - } - return *p.Version -} - -var TimParam_Lang_DEFAULT string - -func (p *TimParam) GetLang() string { - if !p.IsSetLang() { - return TimParam_Lang_DEFAULT - } - return *p.Lang -} - -var TimParam_ExtraList_DEFAULT []*TimNode - -func (p *TimParam) GetExtraList() []*TimNode { - return p.ExtraList -} - -var TimParam_ExtraMap_DEFAULT map[string]string - -func (p *TimParam) GetExtraMap() map[string]string { - return p.ExtraMap -} - -var TimParam_Interflow_DEFAULT string - -func (p *TimParam) GetInterflow() string { - if !p.IsSetInterflow() { - return TimParam_Interflow_DEFAULT - } - return *p.Interflow -} - -var TimParam_TLS_DEFAULT string - -func (p *TimParam) GetTLS() string { - if !p.IsSetTLS() { - return TimParam_TLS_DEFAULT - } - return *p.TLS -} -func (p *TimParam) IsSetTimestamp() bool { - return p.Timestamp != nil -} - -func (p *TimParam) IsSetVersion() bool { - return p.Version != nil -} - -func (p *TimParam) IsSetLang() bool { - return p.Lang != nil -} - -func (p *TimParam) IsSetExtraList() bool { - return p.ExtraList != nil -} - -func (p *TimParam) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimParam) IsSetInterflow() bool { - return p.Interflow != nil -} - -func (p *TimParam) IsSetTLS() bool { - return p.TLS != nil -} - -func (p *TimParam) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - case 7: - if err := p.readField7(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimParam) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Timestamp = &v - } - return nil -} - -func (p *TimParam) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI16(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Version = &v - } - return nil -} - -func (p *TimParam) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.Lang = &v - } - return nil -} - -func (p *TimParam) readField4(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TimNode, 0, size) - p.ExtraList = tSlice - for i := 0; i < size; i++ { - _elem3 := &TimNode{} - if err := _elem3.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem3), err) - } - p.ExtraList = append(p.ExtraList, _elem3) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimParam) readField5(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key4 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key4 = v - } - var _val5 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val5 = v - } - p.ExtraMap[_key4] = _val5 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimParam) readField6(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 6: ", err) - } else { - p.Interflow = &v - } - return nil -} - -func (p *TimParam) readField7(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 7: ", err) - } else { - p.TLS = &v - } - return nil -} - -func (p *TimParam) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimParam"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := p.writeField7(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimParam) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetTimestamp() { - if err := oprot.WriteFieldBegin("timestamp", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:timestamp: ", p), err) - } - if err := oprot.WriteString(string(*p.Timestamp)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.timestamp (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:timestamp: ", p), err) - } - } - return err -} - -func (p *TimParam) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetVersion() { - if err := oprot.WriteFieldBegin("version", thrift.I16, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:version: ", p), err) - } - if err := oprot.WriteI16(int16(*p.Version)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.version (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:version: ", p), err) - } - } - return err -} - -func (p *TimParam) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetLang() { - if err := oprot.WriteFieldBegin("lang", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:lang: ", p), err) - } - if err := oprot.WriteString(string(*p.Lang)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.lang (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:lang: ", p), err) - } - } - return err -} - -func (p *TimParam) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraList() { - if err := oprot.WriteFieldBegin("extraList", thrift.LIST, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraList: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ExtraList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.ExtraList { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraList: ", p), err) - } - } - return err -} - -func (p *TimParam) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:extraMap: ", p), err) - } - } - return err -} - -func (p *TimParam) writeField6(oprot thrift.TProtocol) (err error) { - if p.IsSetInterflow() { - if err := oprot.WriteFieldBegin("interflow", thrift.STRING, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:interflow: ", p), err) - } - if err := oprot.WriteString(string(*p.Interflow)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.interflow (6) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:interflow: ", p), err) - } - } - return err -} - -func (p *TimParam) writeField7(oprot thrift.TProtocol) (err error) { - if p.IsSetTLS() { - if err := oprot.WriteFieldBegin("tls", thrift.STRING, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:tls: ", p), err) - } - if err := oprot.WriteString(string(*p.TLS)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.tls (7) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:tls: ", p), err) - } - } - return err -} - -func (p *TimParam) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimParam(%+v)", *p) -} - -// Attributes: -// - Timestamp: 时间戳 (毫秒) -// - Formattime: 格式化时间 -type TimTime struct { - Timestamp *string `thrift:"timestamp,1" json:"timestamp,omitempty"` - Formattime *string `thrift:"formattime,2" json:"formattime,omitempty"` -} - -func NewTimTime() *TimTime { - return &TimTime{} -} - -var TimTime_Timestamp_DEFAULT string - -func (p *TimTime) GetTimestamp() string { - if !p.IsSetTimestamp() { - return TimTime_Timestamp_DEFAULT - } - return *p.Timestamp -} - -var TimTime_Formattime_DEFAULT string - -func (p *TimTime) GetFormattime() string { - if !p.IsSetFormattime() { - return TimTime_Formattime_DEFAULT - } - return *p.Formattime -} -func (p *TimTime) IsSetTimestamp() bool { - return p.Timestamp != nil -} - -func (p *TimTime) IsSetFormattime() bool { - return p.Formattime != nil -} - -func (p *TimTime) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimTime) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Timestamp = &v - } - return nil -} - -func (p *TimTime) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Formattime = &v - } - return nil -} - -func (p *TimTime) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimTime"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimTime) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetTimestamp() { - if err := oprot.WriteFieldBegin("timestamp", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:timestamp: ", p), err) - } - if err := oprot.WriteString(string(*p.Timestamp)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.timestamp (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:timestamp: ", p), err) - } - } - return err -} - -func (p *TimTime) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetFormattime() { - if err := oprot.WriteFieldBegin("formattime", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:formattime: ", p), err) - } - if err := oprot.WriteString(string(*p.Formattime)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.formattime (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:formattime: ", p), err) - } - } - return err -} - -func (p *TimTime) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimTime(%+v)", *p) -} - -// Attributes: -// - Country: 国家 -// - Province: 省 -// - City: 市 -// - ExtraList: 附加信息:如区,镇,乡等 -// - ExtraMap -type TimArea struct { - Country *string `thrift:"country,1" json:"country,omitempty"` - Province *string `thrift:"province,2" json:"province,omitempty"` - City *string `thrift:"city,3" json:"city,omitempty"` - ExtraList []*TimNode `thrift:"extraList,4" json:"extraList,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,5" json:"extraMap,omitempty"` -} - -func NewTimArea() *TimArea { - return &TimArea{} -} - -var TimArea_Country_DEFAULT string - -func (p *TimArea) GetCountry() string { - if !p.IsSetCountry() { - return TimArea_Country_DEFAULT - } - return *p.Country -} - -var TimArea_Province_DEFAULT string - -func (p *TimArea) GetProvince() string { - if !p.IsSetProvince() { - return TimArea_Province_DEFAULT - } - return *p.Province -} - -var TimArea_City_DEFAULT string - -func (p *TimArea) GetCity() string { - if !p.IsSetCity() { - return TimArea_City_DEFAULT - } - return *p.City -} - -var TimArea_ExtraList_DEFAULT []*TimNode - -func (p *TimArea) GetExtraList() []*TimNode { - return p.ExtraList -} - -var TimArea_ExtraMap_DEFAULT map[string]string - -func (p *TimArea) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimArea) IsSetCountry() bool { - return p.Country != nil -} - -func (p *TimArea) IsSetProvince() bool { - return p.Province != nil -} - -func (p *TimArea) IsSetCity() bool { - return p.City != nil -} - -func (p *TimArea) IsSetExtraList() bool { - return p.ExtraList != nil -} - -func (p *TimArea) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimArea) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimArea) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Country = &v - } - return nil -} - -func (p *TimArea) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Province = &v - } - return nil -} - -func (p *TimArea) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.City = &v - } - return nil -} - -func (p *TimArea) readField4(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TimNode, 0, size) - p.ExtraList = tSlice - for i := 0; i < size; i++ { - _elem6 := &TimNode{} - if err := _elem6.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem6), err) - } - p.ExtraList = append(p.ExtraList, _elem6) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimArea) readField5(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key7 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key7 = v - } - var _val8 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val8 = v - } - p.ExtraMap[_key7] = _val8 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimArea) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimArea"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimArea) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetCountry() { - if err := oprot.WriteFieldBegin("country", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:country: ", p), err) - } - if err := oprot.WriteString(string(*p.Country)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.country (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:country: ", p), err) - } - } - return err -} - -func (p *TimArea) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetProvince() { - if err := oprot.WriteFieldBegin("province", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:province: ", p), err) - } - if err := oprot.WriteString(string(*p.Province)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.province (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:province: ", p), err) - } - } - return err -} - -func (p *TimArea) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetCity() { - if err := oprot.WriteFieldBegin("city", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:city: ", p), err) - } - if err := oprot.WriteString(string(*p.City)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.city (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:city: ", p), err) - } - } - return err -} - -func (p *TimArea) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraList() { - if err := oprot.WriteFieldBegin("extraList", thrift.LIST, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraList: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ExtraList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.ExtraList { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraList: ", p), err) - } - } - return err -} - -func (p *TimArea) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:extraMap: ", p), err) - } - } - return err -} - -func (p *TimArea) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimArea(%+v)", *p) -} - -// Attributes: -// - Name: 登陆名 用户登录号,房间号等 -// - Domain: 域名 用于区分渠道等 appid,appsecret -// - Resource: 系统 自行约定 如 : 1IOS,2android,3H5,4WEB 等 -// - Type: normal,group -// - ExtraList: 附加信息:如传递客户端信息 iphone6,xiaomi,huawei等 -// - ExtraMap -type Tid struct { - Name string `thrift:"name,1,required" json:"name"` - Domain *string `thrift:"domain,2" json:"domain,omitempty"` - Resource *string `thrift:"resource,3" json:"resource,omitempty"` - Type *string `thrift:"type,4" json:"type,omitempty"` - ExtraList []*TimNode `thrift:"extraList,5" json:"extraList,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,6" json:"extraMap,omitempty"` -} - -func NewTid() *Tid { - return &Tid{} -} - -func (p *Tid) GetName() string { - return p.Name -} - -var Tid_Domain_DEFAULT string - -func (p *Tid) GetDomain() string { - if !p.IsSetDomain() { - return Tid_Domain_DEFAULT - } - return *p.Domain -} - -var Tid_Resource_DEFAULT string - -func (p *Tid) GetResource() string { - if !p.IsSetResource() { - return Tid_Resource_DEFAULT - } - return *p.Resource -} - -var Tid_Type_DEFAULT string - -func (p *Tid) GetType() string { - if !p.IsSetType() { - return Tid_Type_DEFAULT - } - return *p.Type -} - -var Tid_ExtraList_DEFAULT []*TimNode - -func (p *Tid) GetExtraList() []*TimNode { - return p.ExtraList -} - -var Tid_ExtraMap_DEFAULT map[string]string - -func (p *Tid) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *Tid) IsSetDomain() bool { - return p.Domain != nil -} - -func (p *Tid) IsSetResource() bool { - return p.Resource != nil -} - -func (p *Tid) IsSetType() bool { - return p.Type != nil -} - -func (p *Tid) IsSetExtraList() bool { - return p.ExtraList != nil -} - -func (p *Tid) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *Tid) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetName bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetName = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetName { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set")) - } - return nil -} - -func (p *Tid) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Name = v - } - return nil -} - -func (p *Tid) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Domain = &v - } - return nil -} - -func (p *Tid) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.Resource = &v - } - return nil -} - -func (p *Tid) readField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 4: ", err) - } else { - p.Type = &v - } - return nil -} - -func (p *Tid) readField5(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TimNode, 0, size) - p.ExtraList = tSlice - for i := 0; i < size; i++ { - _elem9 := &TimNode{} - if err := _elem9.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem9), err) - } - p.ExtraList = append(p.ExtraList, _elem9) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *Tid) readField6(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key10 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key10 = v - } - var _val11 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val11 = v - } - p.ExtraMap[_key10] = _val11 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *Tid) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("Tid"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *Tid) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("name", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) - } - if err := oprot.WriteString(string(p.Name)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.name (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) - } - return err -} - -func (p *Tid) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetDomain() { - if err := oprot.WriteFieldBegin("domain", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:domain: ", p), err) - } - if err := oprot.WriteString(string(*p.Domain)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.domain (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:domain: ", p), err) - } - } - return err -} - -func (p *Tid) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetResource() { - if err := oprot.WriteFieldBegin("resource", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:resource: ", p), err) - } - if err := oprot.WriteString(string(*p.Resource)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.resource (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:resource: ", p), err) - } - } - return err -} - -func (p *Tid) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetType() { - if err := oprot.WriteFieldBegin("type", thrift.STRING, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:type: ", p), err) - } - if err := oprot.WriteString(string(*p.Type)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.type (4) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:type: ", p), err) - } - } - return err -} - -func (p *Tid) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraList() { - if err := oprot.WriteFieldBegin("extraList", thrift.LIST, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:extraList: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ExtraList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.ExtraList { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:extraList: ", p), err) - } - } - return err -} - -func (p *Tid) writeField6(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:extraMap: ", p), err) - } - } - return err -} - -func (p *Tid) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("Tid(%+v)", *p) -} - -// Attributes: -// - Tid: 用户bean -// - Nickname: 昵称 -// - Remarkname: 备注名称 -// - Brithday: 生日 2000-01-01 -// - Gender: 性别 自行约定 如 : 0不知,1男,2女 -// - Headurl: 头像地址 http://xxx.jpg -// - Area: 地区 -// - Headbyte: 头像 -// - PhotoBytes: 其他图片 -// - ExtraList: 扩展字段 -// - ExtraMap -type TimUserBean struct { - Tid *Tid `thrift:"tid,1" json:"tid,omitempty"` - Nickname *string `thrift:"nickname,2" json:"nickname,omitempty"` - Remarkname *string `thrift:"remarkname,3" json:"remarkname,omitempty"` - Brithday *string `thrift:"brithday,4" json:"brithday,omitempty"` - Gender *int16 `thrift:"gender,5" json:"gender,omitempty"` - Headurl *string `thrift:"headurl,6" json:"headurl,omitempty"` - Area *TimArea `thrift:"area,7" json:"area,omitempty"` - Headbyte []byte `thrift:"headbyte,8" json:"headbyte,omitempty"` - PhotoBytes [][]byte `thrift:"photoBytes,9" json:"photoBytes,omitempty"` - ExtraList []*TimNode `thrift:"extraList,10" json:"extraList,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,11" json:"extraMap,omitempty"` -} - -func NewTimUserBean() *TimUserBean { - return &TimUserBean{} -} - -var TimUserBean_Tid_DEFAULT *Tid - -func (p *TimUserBean) GetTid() *Tid { - if !p.IsSetTid() { - return TimUserBean_Tid_DEFAULT - } - return p.Tid -} - -var TimUserBean_Nickname_DEFAULT string - -func (p *TimUserBean) GetNickname() string { - if !p.IsSetNickname() { - return TimUserBean_Nickname_DEFAULT - } - return *p.Nickname -} - -var TimUserBean_Remarkname_DEFAULT string - -func (p *TimUserBean) GetRemarkname() string { - if !p.IsSetRemarkname() { - return TimUserBean_Remarkname_DEFAULT - } - return *p.Remarkname -} - -var TimUserBean_Brithday_DEFAULT string - -func (p *TimUserBean) GetBrithday() string { - if !p.IsSetBrithday() { - return TimUserBean_Brithday_DEFAULT - } - return *p.Brithday -} - -var TimUserBean_Gender_DEFAULT int16 - -func (p *TimUserBean) GetGender() int16 { - if !p.IsSetGender() { - return TimUserBean_Gender_DEFAULT - } - return *p.Gender -} - -var TimUserBean_Headurl_DEFAULT string - -func (p *TimUserBean) GetHeadurl() string { - if !p.IsSetHeadurl() { - return TimUserBean_Headurl_DEFAULT - } - return *p.Headurl -} - -var TimUserBean_Area_DEFAULT *TimArea - -func (p *TimUserBean) GetArea() *TimArea { - if !p.IsSetArea() { - return TimUserBean_Area_DEFAULT - } - return p.Area -} - -var TimUserBean_Headbyte_DEFAULT []byte - -func (p *TimUserBean) GetHeadbyte() []byte { - return p.Headbyte -} - -var TimUserBean_PhotoBytes_DEFAULT [][]byte - -func (p *TimUserBean) GetPhotoBytes() [][]byte { - return p.PhotoBytes -} - -var TimUserBean_ExtraList_DEFAULT []*TimNode - -func (p *TimUserBean) GetExtraList() []*TimNode { - return p.ExtraList -} - -var TimUserBean_ExtraMap_DEFAULT map[string]string - -func (p *TimUserBean) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimUserBean) IsSetTid() bool { - return p.Tid != nil -} - -func (p *TimUserBean) IsSetNickname() bool { - return p.Nickname != nil -} - -func (p *TimUserBean) IsSetRemarkname() bool { - return p.Remarkname != nil -} - -func (p *TimUserBean) IsSetBrithday() bool { - return p.Brithday != nil -} - -func (p *TimUserBean) IsSetGender() bool { - return p.Gender != nil -} - -func (p *TimUserBean) IsSetHeadurl() bool { - return p.Headurl != nil -} - -func (p *TimUserBean) IsSetArea() bool { - return p.Area != nil -} - -func (p *TimUserBean) IsSetHeadbyte() bool { - return p.Headbyte != nil -} - -func (p *TimUserBean) IsSetPhotoBytes() bool { - return p.PhotoBytes != nil -} - -func (p *TimUserBean) IsSetExtraList() bool { - return p.ExtraList != nil -} - -func (p *TimUserBean) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimUserBean) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - case 7: - if err := p.readField7(iprot); err != nil { - return err - } - case 8: - if err := p.readField8(iprot); err != nil { - return err - } - case 9: - if err := p.readField9(iprot); err != nil { - return err - } - case 10: - if err := p.readField10(iprot); err != nil { - return err - } - case 11: - if err := p.readField11(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimUserBean) readField1(iprot thrift.TProtocol) error { - p.Tid = &Tid{} - if err := p.Tid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) - } - return nil -} - -func (p *TimUserBean) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Nickname = &v - } - return nil -} - -func (p *TimUserBean) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.Remarkname = &v - } - return nil -} - -func (p *TimUserBean) readField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 4: ", err) - } else { - p.Brithday = &v - } - return nil -} - -func (p *TimUserBean) readField5(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI16(); err != nil { - return thrift.PrependError("error reading field 5: ", err) - } else { - p.Gender = &v - } - return nil -} - -func (p *TimUserBean) readField6(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 6: ", err) - } else { - p.Headurl = &v - } - return nil -} - -func (p *TimUserBean) readField7(iprot thrift.TProtocol) error { - p.Area = &TimArea{} - if err := p.Area.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Area), err) - } - return nil -} - -func (p *TimUserBean) readField8(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 8: ", err) - } else { - p.Headbyte = v - } - return nil -} - -func (p *TimUserBean) readField9(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([][]byte, 0, size) - p.PhotoBytes = tSlice - for i := 0; i < size; i++ { - var _elem12 []byte - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _elem12 = v - } - p.PhotoBytes = append(p.PhotoBytes, _elem12) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimUserBean) readField10(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TimNode, 0, size) - p.ExtraList = tSlice - for i := 0; i < size; i++ { - _elem13 := &TimNode{} - if err := _elem13.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem13), err) - } - p.ExtraList = append(p.ExtraList, _elem13) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimUserBean) readField11(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key14 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key14 = v - } - var _val15 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val15 = v - } - p.ExtraMap[_key14] = _val15 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimUserBean) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimUserBean"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := p.writeField7(oprot); err != nil { - return err - } - if err := p.writeField8(oprot); err != nil { - return err - } - if err := p.writeField9(oprot); err != nil { - return err - } - if err := p.writeField10(oprot); err != nil { - return err - } - if err := p.writeField11(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimUserBean) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetTid() { - if err := oprot.WriteFieldBegin("tid", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) - } - if err := p.Tid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) - } - } - return err -} - -func (p *TimUserBean) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetNickname() { - if err := oprot.WriteFieldBegin("nickname", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:nickname: ", p), err) - } - if err := oprot.WriteString(string(*p.Nickname)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.nickname (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:nickname: ", p), err) - } - } - return err -} - -func (p *TimUserBean) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetRemarkname() { - if err := oprot.WriteFieldBegin("remarkname", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:remarkname: ", p), err) - } - if err := oprot.WriteString(string(*p.Remarkname)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.remarkname (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:remarkname: ", p), err) - } - } - return err -} - -func (p *TimUserBean) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetBrithday() { - if err := oprot.WriteFieldBegin("brithday", thrift.STRING, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:brithday: ", p), err) - } - if err := oprot.WriteString(string(*p.Brithday)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.brithday (4) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:brithday: ", p), err) - } - } - return err -} - -func (p *TimUserBean) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetGender() { - if err := oprot.WriteFieldBegin("gender", thrift.I16, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:gender: ", p), err) - } - if err := oprot.WriteI16(int16(*p.Gender)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.gender (5) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:gender: ", p), err) - } - } - return err -} - -func (p *TimUserBean) writeField6(oprot thrift.TProtocol) (err error) { - if p.IsSetHeadurl() { - if err := oprot.WriteFieldBegin("headurl", thrift.STRING, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:headurl: ", p), err) - } - if err := oprot.WriteString(string(*p.Headurl)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.headurl (6) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:headurl: ", p), err) - } - } - return err -} - -func (p *TimUserBean) writeField7(oprot thrift.TProtocol) (err error) { - if p.IsSetArea() { - if err := oprot.WriteFieldBegin("area", thrift.STRUCT, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:area: ", p), err) - } - if err := p.Area.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Area), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:area: ", p), err) - } - } - return err -} - -func (p *TimUserBean) writeField8(oprot thrift.TProtocol) (err error) { - if p.IsSetHeadbyte() { - if err := oprot.WriteFieldBegin("headbyte", thrift.STRING, 8); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:headbyte: ", p), err) - } - if err := oprot.WriteBinary(p.Headbyte); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.headbyte (8) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 8:headbyte: ", p), err) - } - } - return err -} - -func (p *TimUserBean) writeField9(oprot thrift.TProtocol) (err error) { - if p.IsSetPhotoBytes() { - if err := oprot.WriteFieldBegin("photoBytes", thrift.LIST, 9); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:photoBytes: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRING, len(p.PhotoBytes)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.PhotoBytes { - if err := oprot.WriteBinary(v); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 9:photoBytes: ", p), err) - } - } - return err -} - -func (p *TimUserBean) writeField10(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraList() { - if err := oprot.WriteFieldBegin("extraList", thrift.LIST, 10); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:extraList: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ExtraList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.ExtraList { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 10:extraList: ", p), err) - } - } - return err -} - -func (p *TimUserBean) writeField11(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 11); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 11:extraMap: ", p), err) - } - } - return err -} - -func (p *TimUserBean) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimUserBean(%+v)", *p) -} - -// Attributes: -// - Tid: 房间Tid -// - FounderTid: 创建人Tid -// - HostsTid: 主持人Tid -// - MembersTid: memberTid -// - Headurl: 头像地址 http://xxx.jpg -// - RoomName: 房间名称 -// - Desc: 房间说明 -// - CreateTime: 房间创建时间 -// - ExtraList: 扩展字段 -// - ExtraMap -type TimRoom struct { - Tid *Tid `thrift:"tid,1" json:"tid,omitempty"` - FounderTid *Tid `thrift:"founderTid,2" json:"founderTid,omitempty"` - HostsTid []*Tid `thrift:"HostsTid,3" json:"HostsTid,omitempty"` - MembersTid []*Tid `thrift:"membersTid,4" json:"membersTid,omitempty"` - Headurl *string `thrift:"headurl,5" json:"headurl,omitempty"` - RoomName *string `thrift:"roomName,6" json:"roomName,omitempty"` - Desc *string `thrift:"desc,7" json:"desc,omitempty"` - CreateTime *TimTime `thrift:"createTime,8" json:"createTime,omitempty"` - ExtraList []*TimNode `thrift:"extraList,9" json:"extraList,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,10" json:"extraMap,omitempty"` -} - -func NewTimRoom() *TimRoom { - return &TimRoom{} -} - -var TimRoom_Tid_DEFAULT *Tid - -func (p *TimRoom) GetTid() *Tid { - if !p.IsSetTid() { - return TimRoom_Tid_DEFAULT - } - return p.Tid -} - -var TimRoom_FounderTid_DEFAULT *Tid - -func (p *TimRoom) GetFounderTid() *Tid { - if !p.IsSetFounderTid() { - return TimRoom_FounderTid_DEFAULT - } - return p.FounderTid -} - -var TimRoom_HostsTid_DEFAULT []*Tid - -func (p *TimRoom) GetHostsTid() []*Tid { - return p.HostsTid -} - -var TimRoom_MembersTid_DEFAULT []*Tid - -func (p *TimRoom) GetMembersTid() []*Tid { - return p.MembersTid -} - -var TimRoom_Headurl_DEFAULT string - -func (p *TimRoom) GetHeadurl() string { - if !p.IsSetHeadurl() { - return TimRoom_Headurl_DEFAULT - } - return *p.Headurl -} - -var TimRoom_RoomName_DEFAULT string - -func (p *TimRoom) GetRoomName() string { - if !p.IsSetRoomName() { - return TimRoom_RoomName_DEFAULT - } - return *p.RoomName -} - -var TimRoom_Desc_DEFAULT string - -func (p *TimRoom) GetDesc() string { - if !p.IsSetDesc() { - return TimRoom_Desc_DEFAULT - } - return *p.Desc -} - -var TimRoom_CreateTime_DEFAULT *TimTime - -func (p *TimRoom) GetCreateTime() *TimTime { - if !p.IsSetCreateTime() { - return TimRoom_CreateTime_DEFAULT - } - return p.CreateTime -} - -var TimRoom_ExtraList_DEFAULT []*TimNode - -func (p *TimRoom) GetExtraList() []*TimNode { - return p.ExtraList -} - -var TimRoom_ExtraMap_DEFAULT map[string]string - -func (p *TimRoom) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimRoom) IsSetTid() bool { - return p.Tid != nil -} - -func (p *TimRoom) IsSetFounderTid() bool { - return p.FounderTid != nil -} - -func (p *TimRoom) IsSetHostsTid() bool { - return p.HostsTid != nil -} - -func (p *TimRoom) IsSetMembersTid() bool { - return p.MembersTid != nil -} - -func (p *TimRoom) IsSetHeadurl() bool { - return p.Headurl != nil -} - -func (p *TimRoom) IsSetRoomName() bool { - return p.RoomName != nil -} - -func (p *TimRoom) IsSetDesc() bool { - return p.Desc != nil -} - -func (p *TimRoom) IsSetCreateTime() bool { - return p.CreateTime != nil -} - -func (p *TimRoom) IsSetExtraList() bool { - return p.ExtraList != nil -} - -func (p *TimRoom) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimRoom) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - case 7: - if err := p.readField7(iprot); err != nil { - return err - } - case 8: - if err := p.readField8(iprot); err != nil { - return err - } - case 9: - if err := p.readField9(iprot); err != nil { - return err - } - case 10: - if err := p.readField10(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimRoom) readField1(iprot thrift.TProtocol) error { - p.Tid = &Tid{} - if err := p.Tid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) - } - return nil -} - -func (p *TimRoom) readField2(iprot thrift.TProtocol) error { - p.FounderTid = &Tid{} - if err := p.FounderTid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.FounderTid), err) - } - return nil -} - -func (p *TimRoom) readField3(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*Tid, 0, size) - p.HostsTid = tSlice - for i := 0; i < size; i++ { - _elem16 := &Tid{} - if err := _elem16.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem16), err) - } - p.HostsTid = append(p.HostsTid, _elem16) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimRoom) readField4(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*Tid, 0, size) - p.MembersTid = tSlice - for i := 0; i < size; i++ { - _elem17 := &Tid{} - if err := _elem17.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem17), err) - } - p.MembersTid = append(p.MembersTid, _elem17) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimRoom) readField5(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 5: ", err) - } else { - p.Headurl = &v - } - return nil -} - -func (p *TimRoom) readField6(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 6: ", err) - } else { - p.RoomName = &v - } - return nil -} - -func (p *TimRoom) readField7(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 7: ", err) - } else { - p.Desc = &v - } - return nil -} - -func (p *TimRoom) readField8(iprot thrift.TProtocol) error { - p.CreateTime = &TimTime{} - if err := p.CreateTime.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.CreateTime), err) - } - return nil -} - -func (p *TimRoom) readField9(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TimNode, 0, size) - p.ExtraList = tSlice - for i := 0; i < size; i++ { - _elem18 := &TimNode{} - if err := _elem18.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem18), err) - } - p.ExtraList = append(p.ExtraList, _elem18) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimRoom) readField10(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key19 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key19 = v - } - var _val20 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val20 = v - } - p.ExtraMap[_key19] = _val20 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimRoom) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimRoom"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := p.writeField7(oprot); err != nil { - return err - } - if err := p.writeField8(oprot); err != nil { - return err - } - if err := p.writeField9(oprot); err != nil { - return err - } - if err := p.writeField10(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimRoom) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetTid() { - if err := oprot.WriteFieldBegin("tid", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) - } - if err := p.Tid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) - } - } - return err -} - -func (p *TimRoom) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetFounderTid() { - if err := oprot.WriteFieldBegin("founderTid", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:founderTid: ", p), err) - } - if err := p.FounderTid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.FounderTid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:founderTid: ", p), err) - } - } - return err -} - -func (p *TimRoom) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetHostsTid() { - if err := oprot.WriteFieldBegin("HostsTid", thrift.LIST, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:HostsTid: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.HostsTid)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.HostsTid { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:HostsTid: ", p), err) - } - } - return err -} - -func (p *TimRoom) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetMembersTid() { - if err := oprot.WriteFieldBegin("membersTid", thrift.LIST, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:membersTid: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.MembersTid)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.MembersTid { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:membersTid: ", p), err) - } - } - return err -} - -func (p *TimRoom) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetHeadurl() { - if err := oprot.WriteFieldBegin("headurl", thrift.STRING, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:headurl: ", p), err) - } - if err := oprot.WriteString(string(*p.Headurl)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.headurl (5) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:headurl: ", p), err) - } - } - return err -} - -func (p *TimRoom) writeField6(oprot thrift.TProtocol) (err error) { - if p.IsSetRoomName() { - if err := oprot.WriteFieldBegin("roomName", thrift.STRING, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:roomName: ", p), err) - } - if err := oprot.WriteString(string(*p.RoomName)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.roomName (6) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:roomName: ", p), err) - } - } - return err -} - -func (p *TimRoom) writeField7(oprot thrift.TProtocol) (err error) { - if p.IsSetDesc() { - if err := oprot.WriteFieldBegin("desc", thrift.STRING, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:desc: ", p), err) - } - if err := oprot.WriteString(string(*p.Desc)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.desc (7) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:desc: ", p), err) - } - } - return err -} - -func (p *TimRoom) writeField8(oprot thrift.TProtocol) (err error) { - if p.IsSetCreateTime() { - if err := oprot.WriteFieldBegin("createTime", thrift.STRUCT, 8); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:createTime: ", p), err) - } - if err := p.CreateTime.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.CreateTime), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 8:createTime: ", p), err) - } - } - return err -} - -func (p *TimRoom) writeField9(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraList() { - if err := oprot.WriteFieldBegin("extraList", thrift.LIST, 9); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:extraList: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ExtraList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.ExtraList { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 9:extraList: ", p), err) - } - } - return err -} - -func (p *TimRoom) writeField10(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 10); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 10:extraMap: ", p), err) - } - } - return err -} - -func (p *TimRoom) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimRoom(%+v)", *p) -} - -// Attributes: -// - ThreadId: 标识 -// - FromTid -// - ToTid -// - Status: subscribe:订阅其他用户的状态 probe:请求获取其他用户的状态 unavailable:不可用,离线(offline)状态 -// - Type: normal:类似于email,主要特点是不要求响应; -// chat:类似于qq里的好友即时聊天,主要特点是实时通讯; -// groupchat:类似于聊天室里的群聊; -// headline:用于发送alert和notification; -// error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; -// - Priority: 优先权 0 。高优先级的resource能接受发送到bare JID的消息,低优先级的resource不能 -// - Show: chat:聊天中 away:暂时离开 xa:eXtend Away,长时间离开 dnd:勿打扰 online:在线 offline:离线 -// - LeaguerTid: 成员Tid 群聊时信息发送者Tid -// - ExtraList: 扩展字段 -// - Error: 错误码 -// - ExtraMap -type TimPBean struct { - ThreadId string `thrift:"threadId,1,required" json:"threadId"` - FromTid *Tid `thrift:"fromTid,2" json:"fromTid,omitempty"` - ToTid *Tid `thrift:"toTid,3" json:"toTid,omitempty"` - Status *string `thrift:"status,4" json:"status,omitempty"` - Type *string `thrift:"type,5" json:"type,omitempty"` - Priority *int32 `thrift:"priority,6" json:"priority,omitempty"` - Show *string `thrift:"show,7" json:"show,omitempty"` - LeaguerTid *Tid `thrift:"leaguerTid,8" json:"leaguerTid,omitempty"` - ExtraList []*TimNode `thrift:"extraList,9" json:"extraList,omitempty"` - Error *TimError `thrift:"error,10" json:"error,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,11" json:"extraMap,omitempty"` -} - -func NewTimPBean() *TimPBean { - return &TimPBean{} -} - -func (p *TimPBean) GetThreadId() string { - return p.ThreadId -} - -var TimPBean_FromTid_DEFAULT *Tid - -func (p *TimPBean) GetFromTid() *Tid { - if !p.IsSetFromTid() { - return TimPBean_FromTid_DEFAULT - } - return p.FromTid -} - -var TimPBean_ToTid_DEFAULT *Tid - -func (p *TimPBean) GetToTid() *Tid { - if !p.IsSetToTid() { - return TimPBean_ToTid_DEFAULT - } - return p.ToTid -} - -var TimPBean_Status_DEFAULT string - -func (p *TimPBean) GetStatus() string { - if !p.IsSetStatus() { - return TimPBean_Status_DEFAULT - } - return *p.Status -} - -var TimPBean_Type_DEFAULT string - -func (p *TimPBean) GetType() string { - if !p.IsSetType() { - return TimPBean_Type_DEFAULT - } - return *p.Type -} - -var TimPBean_Priority_DEFAULT int32 - -func (p *TimPBean) GetPriority() int32 { - if !p.IsSetPriority() { - return TimPBean_Priority_DEFAULT - } - return *p.Priority -} - -var TimPBean_Show_DEFAULT string - -func (p *TimPBean) GetShow() string { - if !p.IsSetShow() { - return TimPBean_Show_DEFAULT - } - return *p.Show -} - -var TimPBean_LeaguerTid_DEFAULT *Tid - -func (p *TimPBean) GetLeaguerTid() *Tid { - if !p.IsSetLeaguerTid() { - return TimPBean_LeaguerTid_DEFAULT - } - return p.LeaguerTid -} - -var TimPBean_ExtraList_DEFAULT []*TimNode - -func (p *TimPBean) GetExtraList() []*TimNode { - return p.ExtraList -} - -var TimPBean_Error_DEFAULT *TimError - -func (p *TimPBean) GetError() *TimError { - if !p.IsSetError() { - return TimPBean_Error_DEFAULT - } - return p.Error -} - -var TimPBean_ExtraMap_DEFAULT map[string]string - -func (p *TimPBean) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimPBean) IsSetFromTid() bool { - return p.FromTid != nil -} - -func (p *TimPBean) IsSetToTid() bool { - return p.ToTid != nil -} - -func (p *TimPBean) IsSetStatus() bool { - return p.Status != nil -} - -func (p *TimPBean) IsSetType() bool { - return p.Type != nil -} - -func (p *TimPBean) IsSetPriority() bool { - return p.Priority != nil -} - -func (p *TimPBean) IsSetShow() bool { - return p.Show != nil -} - -func (p *TimPBean) IsSetLeaguerTid() bool { - return p.LeaguerTid != nil -} - -func (p *TimPBean) IsSetExtraList() bool { - return p.ExtraList != nil -} - -func (p *TimPBean) IsSetError() bool { - return p.Error != nil -} - -func (p *TimPBean) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimPBean) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetThreadId bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetThreadId = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - case 7: - if err := p.readField7(iprot); err != nil { - return err - } - case 8: - if err := p.readField8(iprot); err != nil { - return err - } - case 9: - if err := p.readField9(iprot); err != nil { - return err - } - case 10: - if err := p.readField10(iprot); err != nil { - return err - } - case 11: - if err := p.readField11(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetThreadId { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ThreadId is not set")) - } - return nil -} - -func (p *TimPBean) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.ThreadId = v - } - return nil -} - -func (p *TimPBean) readField2(iprot thrift.TProtocol) error { - p.FromTid = &Tid{} - if err := p.FromTid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.FromTid), err) - } - return nil -} - -func (p *TimPBean) readField3(iprot thrift.TProtocol) error { - p.ToTid = &Tid{} - if err := p.ToTid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ToTid), err) - } - return nil -} - -func (p *TimPBean) readField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 4: ", err) - } else { - p.Status = &v - } - return nil -} - -func (p *TimPBean) readField5(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 5: ", err) - } else { - p.Type = &v - } - return nil -} - -func (p *TimPBean) readField6(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 6: ", err) - } else { - p.Priority = &v - } - return nil -} - -func (p *TimPBean) readField7(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 7: ", err) - } else { - p.Show = &v - } - return nil -} - -func (p *TimPBean) readField8(iprot thrift.TProtocol) error { - p.LeaguerTid = &Tid{} - if err := p.LeaguerTid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.LeaguerTid), err) - } - return nil -} - -func (p *TimPBean) readField9(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TimNode, 0, size) - p.ExtraList = tSlice - for i := 0; i < size; i++ { - _elem21 := &TimNode{} - if err := _elem21.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem21), err) - } - p.ExtraList = append(p.ExtraList, _elem21) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimPBean) readField10(iprot thrift.TProtocol) error { - p.Error = &TimError{} - if err := p.Error.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Error), err) - } - return nil -} - -func (p *TimPBean) readField11(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key22 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key22 = v - } - var _val23 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val23 = v - } - p.ExtraMap[_key22] = _val23 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimPBean) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimPBean"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := p.writeField7(oprot); err != nil { - return err - } - if err := p.writeField8(oprot); err != nil { - return err - } - if err := p.writeField9(oprot); err != nil { - return err - } - if err := p.writeField10(oprot); err != nil { - return err - } - if err := p.writeField11(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimPBean) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("threadId", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) - } - if err := oprot.WriteString(string(p.ThreadId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) - } - return err -} - -func (p *TimPBean) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetFromTid() { - if err := oprot.WriteFieldBegin("fromTid", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:fromTid: ", p), err) - } - if err := p.FromTid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.FromTid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:fromTid: ", p), err) - } - } - return err -} - -func (p *TimPBean) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetToTid() { - if err := oprot.WriteFieldBegin("toTid", thrift.STRUCT, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:toTid: ", p), err) - } - if err := p.ToTid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ToTid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:toTid: ", p), err) - } - } - return err -} - -func (p *TimPBean) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetStatus() { - if err := oprot.WriteFieldBegin("status", thrift.STRING, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:status: ", p), err) - } - if err := oprot.WriteString(string(*p.Status)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.status (4) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:status: ", p), err) - } - } - return err -} - -func (p *TimPBean) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetType() { - if err := oprot.WriteFieldBegin("type", thrift.STRING, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:type: ", p), err) - } - if err := oprot.WriteString(string(*p.Type)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.type (5) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:type: ", p), err) - } - } - return err -} - -func (p *TimPBean) writeField6(oprot thrift.TProtocol) (err error) { - if p.IsSetPriority() { - if err := oprot.WriteFieldBegin("priority", thrift.I32, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:priority: ", p), err) - } - if err := oprot.WriteI32(int32(*p.Priority)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.priority (6) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:priority: ", p), err) - } - } - return err -} - -func (p *TimPBean) writeField7(oprot thrift.TProtocol) (err error) { - if p.IsSetShow() { - if err := oprot.WriteFieldBegin("show", thrift.STRING, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:show: ", p), err) - } - if err := oprot.WriteString(string(*p.Show)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.show (7) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:show: ", p), err) - } - } - return err -} - -func (p *TimPBean) writeField8(oprot thrift.TProtocol) (err error) { - if p.IsSetLeaguerTid() { - if err := oprot.WriteFieldBegin("leaguerTid", thrift.STRUCT, 8); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:leaguerTid: ", p), err) - } - if err := p.LeaguerTid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.LeaguerTid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 8:leaguerTid: ", p), err) - } - } - return err -} - -func (p *TimPBean) writeField9(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraList() { - if err := oprot.WriteFieldBegin("extraList", thrift.LIST, 9); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:extraList: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ExtraList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.ExtraList { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 9:extraList: ", p), err) - } - } - return err -} - -func (p *TimPBean) writeField10(oprot thrift.TProtocol) (err error) { - if p.IsSetError() { - if err := oprot.WriteFieldBegin("error", thrift.STRUCT, 10); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:error: ", p), err) - } - if err := p.Error.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Error), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 10:error: ", p), err) - } - } - return err -} - -func (p *TimPBean) writeField11(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 11); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 11:extraMap: ", p), err) - } - } - return err -} - -func (p *TimPBean) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimPBean(%+v)", *p) -} - -// Attributes: -// - ThreadId: 线程id -// - Mid: 消息id号 -// - FromTid: 来源Tid -// - ToTid: 目标Tid -// - Body: 信息内容 -// - Type: normal:类似于email,主要特点是不要求响应; -// chat:类似于qq里的好友即时聊天,主要特点是实时通讯; -// groupchat:类似于聊天室里的群聊; -// headline:用于发送alert和notification; -// error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; -// - MsgType: 消息类型 1 文字 2 图片 3 语音 4视频 5混合 -// - Offline: 是否离线信息 -// - LeaguerTid: 成员Tid 群聊时信息发送者Tid -// - ExtraList: 扩展字段 -// - Timestamp: 服务器发送信息时间戳(毫秒) -// - Error: 错误码 -// - ExtraMap -// - Readstatus: 0未读 1已读 -type TimMBean struct { - ThreadId string `thrift:"threadId,1,required" json:"threadId"` - Mid *string `thrift:"mid,2" json:"mid,omitempty"` - FromTid *Tid `thrift:"fromTid,3" json:"fromTid,omitempty"` - ToTid *Tid `thrift:"toTid,4" json:"toTid,omitempty"` - Body *string `thrift:"body,5" json:"body,omitempty"` - Type *string `thrift:"type,6" json:"type,omitempty"` - MsgType *int16 `thrift:"msgType,7" json:"msgType,omitempty"` - Offline *TimTime `thrift:"offline,8" json:"offline,omitempty"` - LeaguerTid *Tid `thrift:"leaguerTid,9" json:"leaguerTid,omitempty"` - ExtraList []*TimNode `thrift:"extraList,10" json:"extraList,omitempty"` - Timestamp *string `thrift:"timestamp,11" json:"timestamp,omitempty"` - Error *TimError `thrift:"error,12" json:"error,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,13" json:"extraMap,omitempty"` - Readstatus *int16 `thrift:"readstatus,14" json:"readstatus,omitempty"` -} - -func NewTimMBean() *TimMBean { - return &TimMBean{} -} - -func (p *TimMBean) GetThreadId() string { - return p.ThreadId -} - -var TimMBean_Mid_DEFAULT string - -func (p *TimMBean) GetMid() string { - if !p.IsSetMid() { - return TimMBean_Mid_DEFAULT - } - return *p.Mid -} - -var TimMBean_FromTid_DEFAULT *Tid - -func (p *TimMBean) GetFromTid() *Tid { - if !p.IsSetFromTid() { - return TimMBean_FromTid_DEFAULT - } - return p.FromTid -} - -var TimMBean_ToTid_DEFAULT *Tid - -func (p *TimMBean) GetToTid() *Tid { - if !p.IsSetToTid() { - return TimMBean_ToTid_DEFAULT - } - return p.ToTid -} - -var TimMBean_Body_DEFAULT string - -func (p *TimMBean) GetBody() string { - if !p.IsSetBody() { - return TimMBean_Body_DEFAULT - } - return *p.Body -} - -var TimMBean_Type_DEFAULT string - -func (p *TimMBean) GetType() string { - if !p.IsSetType() { - return TimMBean_Type_DEFAULT - } - return *p.Type -} - -var TimMBean_MsgType_DEFAULT int16 - -func (p *TimMBean) GetMsgType() int16 { - if !p.IsSetMsgType() { - return TimMBean_MsgType_DEFAULT - } - return *p.MsgType -} - -var TimMBean_Offline_DEFAULT *TimTime - -func (p *TimMBean) GetOffline() *TimTime { - if !p.IsSetOffline() { - return TimMBean_Offline_DEFAULT - } - return p.Offline -} - -var TimMBean_LeaguerTid_DEFAULT *Tid - -func (p *TimMBean) GetLeaguerTid() *Tid { - if !p.IsSetLeaguerTid() { - return TimMBean_LeaguerTid_DEFAULT - } - return p.LeaguerTid -} - -var TimMBean_ExtraList_DEFAULT []*TimNode - -func (p *TimMBean) GetExtraList() []*TimNode { - return p.ExtraList -} - -var TimMBean_Timestamp_DEFAULT string - -func (p *TimMBean) GetTimestamp() string { - if !p.IsSetTimestamp() { - return TimMBean_Timestamp_DEFAULT - } - return *p.Timestamp -} - -var TimMBean_Error_DEFAULT *TimError - -func (p *TimMBean) GetError() *TimError { - if !p.IsSetError() { - return TimMBean_Error_DEFAULT - } - return p.Error -} - -var TimMBean_ExtraMap_DEFAULT map[string]string - -func (p *TimMBean) GetExtraMap() map[string]string { - return p.ExtraMap -} - -var TimMBean_Readstatus_DEFAULT int16 - -func (p *TimMBean) GetReadstatus() int16 { - if !p.IsSetReadstatus() { - return TimMBean_Readstatus_DEFAULT - } - return *p.Readstatus -} -func (p *TimMBean) IsSetMid() bool { - return p.Mid != nil -} - -func (p *TimMBean) IsSetFromTid() bool { - return p.FromTid != nil -} - -func (p *TimMBean) IsSetToTid() bool { - return p.ToTid != nil -} - -func (p *TimMBean) IsSetBody() bool { - return p.Body != nil -} - -func (p *TimMBean) IsSetType() bool { - return p.Type != nil -} - -func (p *TimMBean) IsSetMsgType() bool { - return p.MsgType != nil -} - -func (p *TimMBean) IsSetOffline() bool { - return p.Offline != nil -} - -func (p *TimMBean) IsSetLeaguerTid() bool { - return p.LeaguerTid != nil -} - -func (p *TimMBean) IsSetExtraList() bool { - return p.ExtraList != nil -} - -func (p *TimMBean) IsSetTimestamp() bool { - return p.Timestamp != nil -} - -func (p *TimMBean) IsSetError() bool { - return p.Error != nil -} - -func (p *TimMBean) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimMBean) IsSetReadstatus() bool { - return p.Readstatus != nil -} - -func (p *TimMBean) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetThreadId bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetThreadId = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - case 7: - if err := p.readField7(iprot); err != nil { - return err - } - case 8: - if err := p.readField8(iprot); err != nil { - return err - } - case 9: - if err := p.readField9(iprot); err != nil { - return err - } - case 10: - if err := p.readField10(iprot); err != nil { - return err - } - case 11: - if err := p.readField11(iprot); err != nil { - return err - } - case 12: - if err := p.readField12(iprot); err != nil { - return err - } - case 13: - if err := p.readField13(iprot); err != nil { - return err - } - case 14: - if err := p.readField14(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetThreadId { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ThreadId is not set")) - } - return nil -} - -func (p *TimMBean) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.ThreadId = v - } - return nil -} - -func (p *TimMBean) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Mid = &v - } - return nil -} - -func (p *TimMBean) readField3(iprot thrift.TProtocol) error { - p.FromTid = &Tid{} - if err := p.FromTid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.FromTid), err) - } - return nil -} - -func (p *TimMBean) readField4(iprot thrift.TProtocol) error { - p.ToTid = &Tid{} - if err := p.ToTid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ToTid), err) - } - return nil -} - -func (p *TimMBean) readField5(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 5: ", err) - } else { - p.Body = &v - } - return nil -} - -func (p *TimMBean) readField6(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 6: ", err) - } else { - p.Type = &v - } - return nil -} - -func (p *TimMBean) readField7(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI16(); err != nil { - return thrift.PrependError("error reading field 7: ", err) - } else { - p.MsgType = &v - } - return nil -} - -func (p *TimMBean) readField8(iprot thrift.TProtocol) error { - p.Offline = &TimTime{} - if err := p.Offline.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Offline), err) - } - return nil -} - -func (p *TimMBean) readField9(iprot thrift.TProtocol) error { - p.LeaguerTid = &Tid{} - if err := p.LeaguerTid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.LeaguerTid), err) - } - return nil -} - -func (p *TimMBean) readField10(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TimNode, 0, size) - p.ExtraList = tSlice - for i := 0; i < size; i++ { - _elem24 := &TimNode{} - if err := _elem24.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem24), err) - } - p.ExtraList = append(p.ExtraList, _elem24) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimMBean) readField11(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 11: ", err) - } else { - p.Timestamp = &v - } - return nil -} - -func (p *TimMBean) readField12(iprot thrift.TProtocol) error { - p.Error = &TimError{} - if err := p.Error.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Error), err) - } - return nil -} - -func (p *TimMBean) readField13(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key25 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key25 = v - } - var _val26 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val26 = v - } - p.ExtraMap[_key25] = _val26 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimMBean) readField14(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI16(); err != nil { - return thrift.PrependError("error reading field 14: ", err) - } else { - p.Readstatus = &v - } - return nil -} - -func (p *TimMBean) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimMBean"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := p.writeField7(oprot); err != nil { - return err - } - if err := p.writeField8(oprot); err != nil { - return err - } - if err := p.writeField9(oprot); err != nil { - return err - } - if err := p.writeField10(oprot); err != nil { - return err - } - if err := p.writeField11(oprot); err != nil { - return err - } - if err := p.writeField12(oprot); err != nil { - return err - } - if err := p.writeField13(oprot); err != nil { - return err - } - if err := p.writeField14(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimMBean) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("threadId", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) - } - if err := oprot.WriteString(string(p.ThreadId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) - } - return err -} - -func (p *TimMBean) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetMid() { - if err := oprot.WriteFieldBegin("mid", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:mid: ", p), err) - } - if err := oprot.WriteString(string(*p.Mid)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.mid (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:mid: ", p), err) - } - } - return err -} - -func (p *TimMBean) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetFromTid() { - if err := oprot.WriteFieldBegin("fromTid", thrift.STRUCT, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:fromTid: ", p), err) - } - if err := p.FromTid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.FromTid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:fromTid: ", p), err) - } - } - return err -} - -func (p *TimMBean) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetToTid() { - if err := oprot.WriteFieldBegin("toTid", thrift.STRUCT, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:toTid: ", p), err) - } - if err := p.ToTid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ToTid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:toTid: ", p), err) - } - } - return err -} - -func (p *TimMBean) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetBody() { - if err := oprot.WriteFieldBegin("body", thrift.STRING, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:body: ", p), err) - } - if err := oprot.WriteString(string(*p.Body)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.body (5) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:body: ", p), err) - } - } - return err -} - -func (p *TimMBean) writeField6(oprot thrift.TProtocol) (err error) { - if p.IsSetType() { - if err := oprot.WriteFieldBegin("type", thrift.STRING, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:type: ", p), err) - } - if err := oprot.WriteString(string(*p.Type)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.type (6) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:type: ", p), err) - } - } - return err -} - -func (p *TimMBean) writeField7(oprot thrift.TProtocol) (err error) { - if p.IsSetMsgType() { - if err := oprot.WriteFieldBegin("msgType", thrift.I16, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:msgType: ", p), err) - } - if err := oprot.WriteI16(int16(*p.MsgType)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.msgType (7) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:msgType: ", p), err) - } - } - return err -} - -func (p *TimMBean) writeField8(oprot thrift.TProtocol) (err error) { - if p.IsSetOffline() { - if err := oprot.WriteFieldBegin("offline", thrift.STRUCT, 8); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:offline: ", p), err) - } - if err := p.Offline.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Offline), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 8:offline: ", p), err) - } - } - return err -} - -func (p *TimMBean) writeField9(oprot thrift.TProtocol) (err error) { - if p.IsSetLeaguerTid() { - if err := oprot.WriteFieldBegin("leaguerTid", thrift.STRUCT, 9); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:leaguerTid: ", p), err) - } - if err := p.LeaguerTid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.LeaguerTid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 9:leaguerTid: ", p), err) - } - } - return err -} - -func (p *TimMBean) writeField10(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraList() { - if err := oprot.WriteFieldBegin("extraList", thrift.LIST, 10); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:extraList: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ExtraList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.ExtraList { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 10:extraList: ", p), err) - } - } - return err -} - -func (p *TimMBean) writeField11(oprot thrift.TProtocol) (err error) { - if p.IsSetTimestamp() { - if err := oprot.WriteFieldBegin("timestamp", thrift.STRING, 11); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:timestamp: ", p), err) - } - if err := oprot.WriteString(string(*p.Timestamp)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.timestamp (11) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 11:timestamp: ", p), err) - } - } - return err -} - -func (p *TimMBean) writeField12(oprot thrift.TProtocol) (err error) { - if p.IsSetError() { - if err := oprot.WriteFieldBegin("error", thrift.STRUCT, 12); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 12:error: ", p), err) - } - if err := p.Error.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Error), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 12:error: ", p), err) - } - } - return err -} - -func (p *TimMBean) writeField13(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 13); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 13:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 13:extraMap: ", p), err) - } - } - return err -} - -func (p *TimMBean) writeField14(oprot thrift.TProtocol) (err error) { - if p.IsSetReadstatus() { - if err := oprot.WriteFieldBegin("readstatus", thrift.I16, 14); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 14:readstatus: ", p), err) - } - if err := oprot.WriteI16(int16(*p.Readstatus)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.readstatus (14) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 14:readstatus: ", p), err) - } - } - return err -} - -func (p *TimMBean) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimMBean(%+v)", *p) -} - -// Attributes: -// - ThreadId: 线程id -// - FromTid -// - ToTid -// - Type: Get :获取当前域值。类似于http get方法 -// Set :设置或替换get查询的值。类似于http put方法。 -// Result :说明成功的响应了先前的查询。类似于http状态码200。 -// Error: 查询和响应中出现的错误。 -// - ExtraList: 扩展字段 -// - Error: 错误码 -// - ExtraMap -type TimIqBean struct { - ThreadId string `thrift:"threadId,1,required" json:"threadId"` - FromTid *Tid `thrift:"fromTid,2" json:"fromTid,omitempty"` - ToTid *Tid `thrift:"toTid,3" json:"toTid,omitempty"` - Type *string `thrift:"type,4" json:"type,omitempty"` - ExtraList []*TimNode `thrift:"extraList,5" json:"extraList,omitempty"` - Error *TimError `thrift:"error,6" json:"error,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,7" json:"extraMap,omitempty"` -} - -func NewTimIqBean() *TimIqBean { - return &TimIqBean{} -} - -func (p *TimIqBean) GetThreadId() string { - return p.ThreadId -} - -var TimIqBean_FromTid_DEFAULT *Tid - -func (p *TimIqBean) GetFromTid() *Tid { - if !p.IsSetFromTid() { - return TimIqBean_FromTid_DEFAULT - } - return p.FromTid -} - -var TimIqBean_ToTid_DEFAULT *Tid - -func (p *TimIqBean) GetToTid() *Tid { - if !p.IsSetToTid() { - return TimIqBean_ToTid_DEFAULT - } - return p.ToTid -} - -var TimIqBean_Type_DEFAULT string - -func (p *TimIqBean) GetType() string { - if !p.IsSetType() { - return TimIqBean_Type_DEFAULT - } - return *p.Type -} - -var TimIqBean_ExtraList_DEFAULT []*TimNode - -func (p *TimIqBean) GetExtraList() []*TimNode { - return p.ExtraList -} - -var TimIqBean_Error_DEFAULT *TimError - -func (p *TimIqBean) GetError() *TimError { - if !p.IsSetError() { - return TimIqBean_Error_DEFAULT - } - return p.Error -} - -var TimIqBean_ExtraMap_DEFAULT map[string]string - -func (p *TimIqBean) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimIqBean) IsSetFromTid() bool { - return p.FromTid != nil -} - -func (p *TimIqBean) IsSetToTid() bool { - return p.ToTid != nil -} - -func (p *TimIqBean) IsSetType() bool { - return p.Type != nil -} - -func (p *TimIqBean) IsSetExtraList() bool { - return p.ExtraList != nil -} - -func (p *TimIqBean) IsSetError() bool { - return p.Error != nil -} - -func (p *TimIqBean) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimIqBean) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetThreadId bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetThreadId = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - case 7: - if err := p.readField7(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetThreadId { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ThreadId is not set")) - } - return nil -} - -func (p *TimIqBean) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.ThreadId = v - } - return nil -} - -func (p *TimIqBean) readField2(iprot thrift.TProtocol) error { - p.FromTid = &Tid{} - if err := p.FromTid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.FromTid), err) - } - return nil -} - -func (p *TimIqBean) readField3(iprot thrift.TProtocol) error { - p.ToTid = &Tid{} - if err := p.ToTid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ToTid), err) - } - return nil -} - -func (p *TimIqBean) readField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 4: ", err) - } else { - p.Type = &v - } - return nil -} - -func (p *TimIqBean) readField5(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TimNode, 0, size) - p.ExtraList = tSlice - for i := 0; i < size; i++ { - _elem27 := &TimNode{} - if err := _elem27.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem27), err) - } - p.ExtraList = append(p.ExtraList, _elem27) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimIqBean) readField6(iprot thrift.TProtocol) error { - p.Error = &TimError{} - if err := p.Error.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Error), err) - } - return nil -} - -func (p *TimIqBean) readField7(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key28 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key28 = v - } - var _val29 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val29 = v - } - p.ExtraMap[_key28] = _val29 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimIqBean) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimIqBean"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := p.writeField7(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimIqBean) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("threadId", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) - } - if err := oprot.WriteString(string(p.ThreadId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) - } - return err -} - -func (p *TimIqBean) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetFromTid() { - if err := oprot.WriteFieldBegin("fromTid", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:fromTid: ", p), err) - } - if err := p.FromTid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.FromTid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:fromTid: ", p), err) - } - } - return err -} - -func (p *TimIqBean) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetToTid() { - if err := oprot.WriteFieldBegin("toTid", thrift.STRUCT, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:toTid: ", p), err) - } - if err := p.ToTid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ToTid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:toTid: ", p), err) - } - } - return err -} - -func (p *TimIqBean) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetType() { - if err := oprot.WriteFieldBegin("type", thrift.STRING, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:type: ", p), err) - } - if err := oprot.WriteString(string(*p.Type)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.type (4) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:type: ", p), err) - } - } - return err -} - -func (p *TimIqBean) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraList() { - if err := oprot.WriteFieldBegin("extraList", thrift.LIST, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:extraList: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ExtraList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.ExtraList { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:extraList: ", p), err) - } - } - return err -} - -func (p *TimIqBean) writeField6(oprot thrift.TProtocol) (err error) { - if p.IsSetError() { - if err := oprot.WriteFieldBegin("error", thrift.STRUCT, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:error: ", p), err) - } - if err := p.Error.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Error), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:error: ", p), err) - } - } - return err -} - -func (p *TimIqBean) writeField7(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:extraMap: ", p), err) - } - } - return err -} - -func (p *TimIqBean) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimIqBean(%+v)", *p) -} - -// Attributes: -// - Subscription: none表示用户和contact之前没有任何的关系(虽然在server的buddy list中存在) -// to表示用户能看到contact的presence,但是contact看不到用户的Presence -// from和to的含义相反,指用户看不到contact的presence,但是contact可以看到 -// both表示相关之间都能看到对方的presence -// - Tid -// - Name: 用户名 -// - ExtraMap -type TimRoster struct { - Subscription string `thrift:"subscription,1,required" json:"subscription"` - Tid *Tid `thrift:"tid,2,required" json:"tid"` - Name *string `thrift:"name,3" json:"name,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,4" json:"extraMap,omitempty"` -} - -func NewTimRoster() *TimRoster { - return &TimRoster{} -} - -func (p *TimRoster) GetSubscription() string { - return p.Subscription -} - -var TimRoster_Tid_DEFAULT *Tid - -func (p *TimRoster) GetTid() *Tid { - if !p.IsSetTid() { - return TimRoster_Tid_DEFAULT - } - return p.Tid -} - -var TimRoster_Name_DEFAULT string - -func (p *TimRoster) GetName() string { - if !p.IsSetName() { - return TimRoster_Name_DEFAULT - } - return *p.Name -} - -var TimRoster_ExtraMap_DEFAULT map[string]string - -func (p *TimRoster) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimRoster) IsSetTid() bool { - return p.Tid != nil -} - -func (p *TimRoster) IsSetName() bool { - return p.Name != nil -} - -func (p *TimRoster) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimRoster) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetSubscription bool = false - var issetTid bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetSubscription = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetTid = true - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetSubscription { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Subscription is not set")) - } - if !issetTid { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tid is not set")) - } - return nil -} - -func (p *TimRoster) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Subscription = v - } - return nil -} - -func (p *TimRoster) readField2(iprot thrift.TProtocol) error { - p.Tid = &Tid{} - if err := p.Tid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) - } - return nil -} - -func (p *TimRoster) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.Name = &v - } - return nil -} - -func (p *TimRoster) readField4(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key30 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key30 = v - } - var _val31 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val31 = v - } - p.ExtraMap[_key30] = _val31 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimRoster) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimRoster"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimRoster) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("subscription", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:subscription: ", p), err) - } - if err := oprot.WriteString(string(p.Subscription)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.subscription (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:subscription: ", p), err) - } - return err -} - -func (p *TimRoster) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tid", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tid: ", p), err) - } - if err := p.Tid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tid: ", p), err) - } - return err -} - -func (p *TimRoster) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetName() { - if err := oprot.WriteFieldBegin("name", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:name: ", p), err) - } - if err := oprot.WriteString(string(*p.Name)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.name (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:name: ", p), err) - } - } - return err -} - -func (p *TimRoster) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) - } - } - return err -} - -func (p *TimRoster) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimRoster(%+v)", *p) -} - -// Attributes: -// - Error: 错误码 -// - Ub: 远程用户信息 -// - ExtraMap -type TimRemoteUserBean struct { - Error *TimError `thrift:"error,1" json:"error,omitempty"` - Ub *TimUserBean `thrift:"ub,2" json:"ub,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,3" json:"extraMap,omitempty"` -} - -func NewTimRemoteUserBean() *TimRemoteUserBean { - return &TimRemoteUserBean{} -} - -var TimRemoteUserBean_Error_DEFAULT *TimError - -func (p *TimRemoteUserBean) GetError() *TimError { - if !p.IsSetError() { - return TimRemoteUserBean_Error_DEFAULT - } - return p.Error -} - -var TimRemoteUserBean_Ub_DEFAULT *TimUserBean - -func (p *TimRemoteUserBean) GetUb() *TimUserBean { - if !p.IsSetUb() { - return TimRemoteUserBean_Ub_DEFAULT - } - return p.Ub -} - -var TimRemoteUserBean_ExtraMap_DEFAULT map[string]string - -func (p *TimRemoteUserBean) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimRemoteUserBean) IsSetError() bool { - return p.Error != nil -} - -func (p *TimRemoteUserBean) IsSetUb() bool { - return p.Ub != nil -} - -func (p *TimRemoteUserBean) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimRemoteUserBean) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimRemoteUserBean) readField1(iprot thrift.TProtocol) error { - p.Error = &TimError{} - if err := p.Error.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Error), err) - } - return nil -} - -func (p *TimRemoteUserBean) readField2(iprot thrift.TProtocol) error { - p.Ub = &TimUserBean{} - if err := p.Ub.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Ub), err) - } - return nil -} - -func (p *TimRemoteUserBean) readField3(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key32 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key32 = v - } - var _val33 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val33 = v - } - p.ExtraMap[_key32] = _val33 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimRemoteUserBean) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimRemoteUserBean"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimRemoteUserBean) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetError() { - if err := oprot.WriteFieldBegin("error", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:error: ", p), err) - } - if err := p.Error.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Error), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:error: ", p), err) - } - } - return err -} - -func (p *TimRemoteUserBean) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetUb() { - if err := oprot.WriteFieldBegin("ub", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:ub: ", p), err) - } - if err := p.Ub.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Ub), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:ub: ", p), err) - } - } - return err -} - -func (p *TimRemoteUserBean) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:extraMap: ", p), err) - } - } - return err -} - -func (p *TimRemoteUserBean) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimRemoteUserBean(%+v)", *p) -} - -// Attributes: -// - Error: 错误码 -// - Room: 远程房间信息 -// - ExtraMap -type TimRemoteRoom struct { - Error *TimError `thrift:"error,1" json:"error,omitempty"` - Room *TimRoom `thrift:"room,2" json:"room,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,3" json:"extraMap,omitempty"` -} - -func NewTimRemoteRoom() *TimRemoteRoom { - return &TimRemoteRoom{} -} - -var TimRemoteRoom_Error_DEFAULT *TimError - -func (p *TimRemoteRoom) GetError() *TimError { - if !p.IsSetError() { - return TimRemoteRoom_Error_DEFAULT - } - return p.Error -} - -var TimRemoteRoom_Room_DEFAULT *TimRoom - -func (p *TimRemoteRoom) GetRoom() *TimRoom { - if !p.IsSetRoom() { - return TimRemoteRoom_Room_DEFAULT - } - return p.Room -} - -var TimRemoteRoom_ExtraMap_DEFAULT map[string]string - -func (p *TimRemoteRoom) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimRemoteRoom) IsSetError() bool { - return p.Error != nil -} - -func (p *TimRemoteRoom) IsSetRoom() bool { - return p.Room != nil -} - -func (p *TimRemoteRoom) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimRemoteRoom) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimRemoteRoom) readField1(iprot thrift.TProtocol) error { - p.Error = &TimError{} - if err := p.Error.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Error), err) - } - return nil -} - -func (p *TimRemoteRoom) readField2(iprot thrift.TProtocol) error { - p.Room = &TimRoom{} - if err := p.Room.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Room), err) - } - return nil -} - -func (p *TimRemoteRoom) readField3(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key34 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key34 = v - } - var _val35 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val35 = v - } - p.ExtraMap[_key34] = _val35 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimRemoteRoom) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimRemoteRoom"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimRemoteRoom) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetError() { - if err := oprot.WriteFieldBegin("error", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:error: ", p), err) - } - if err := p.Error.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Error), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:error: ", p), err) - } - } - return err -} - -func (p *TimRemoteRoom) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetRoom() { - if err := oprot.WriteFieldBegin("room", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:room: ", p), err) - } - if err := p.Room.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Room), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:room: ", p), err) - } - } - return err -} - -func (p *TimRemoteRoom) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:extraMap: ", p), err) - } - } - return err -} - -func (p *TimRemoteRoom) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimRemoteRoom(%+v)", *p) -} - -// Attributes: -// - ThreadId -// - Error: 错误码 -// - ExtraList: 附加信息 -// - ExtraMap -type TimResponseBean struct { - ThreadId *string `thrift:"threadId,1" json:"threadId,omitempty"` - Error *TimError `thrift:"error,2" json:"error,omitempty"` - ExtraList []*TimNode `thrift:"extraList,3" json:"extraList,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,4" json:"extraMap,omitempty"` -} - -func NewTimResponseBean() *TimResponseBean { - return &TimResponseBean{} -} - -var TimResponseBean_ThreadId_DEFAULT string - -func (p *TimResponseBean) GetThreadId() string { - if !p.IsSetThreadId() { - return TimResponseBean_ThreadId_DEFAULT - } - return *p.ThreadId -} - -var TimResponseBean_Error_DEFAULT *TimError - -func (p *TimResponseBean) GetError() *TimError { - if !p.IsSetError() { - return TimResponseBean_Error_DEFAULT - } - return p.Error -} - -var TimResponseBean_ExtraList_DEFAULT []*TimNode - -func (p *TimResponseBean) GetExtraList() []*TimNode { - return p.ExtraList -} - -var TimResponseBean_ExtraMap_DEFAULT map[string]string - -func (p *TimResponseBean) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimResponseBean) IsSetThreadId() bool { - return p.ThreadId != nil -} - -func (p *TimResponseBean) IsSetError() bool { - return p.Error != nil -} - -func (p *TimResponseBean) IsSetExtraList() bool { - return p.ExtraList != nil -} - -func (p *TimResponseBean) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimResponseBean) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimResponseBean) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.ThreadId = &v - } - return nil -} - -func (p *TimResponseBean) readField2(iprot thrift.TProtocol) error { - p.Error = &TimError{} - if err := p.Error.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Error), err) - } - return nil -} - -func (p *TimResponseBean) readField3(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TimNode, 0, size) - p.ExtraList = tSlice - for i := 0; i < size; i++ { - _elem36 := &TimNode{} - if err := _elem36.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem36), err) - } - p.ExtraList = append(p.ExtraList, _elem36) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimResponseBean) readField4(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key37 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key37 = v - } - var _val38 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val38 = v - } - p.ExtraMap[_key37] = _val38 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimResponseBean) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimResponseBean"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimResponseBean) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetThreadId() { - if err := oprot.WriteFieldBegin("threadId", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) - } - if err := oprot.WriteString(string(*p.ThreadId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) - } - } - return err -} - -func (p *TimResponseBean) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetError() { - if err := oprot.WriteFieldBegin("error", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:error: ", p), err) - } - if err := p.Error.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Error), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:error: ", p), err) - } - } - return err -} - -func (p *TimResponseBean) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraList() { - if err := oprot.WriteFieldBegin("extraList", thrift.LIST, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:extraList: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ExtraList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.ExtraList { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:extraList: ", p), err) - } - } - return err -} - -func (p *TimResponseBean) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) - } - } - return err -} - -func (p *TimResponseBean) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimResponseBean(%+v)", *p) -} - -// Attributes: -// - FromTid -// - ToTid -// - Addr: ip地址 -// - Port: 端口 -// - Transport: 传输类型 1:tcp 2:udp -// - PubId: 发布id 通过发布id 可以连接两个发布id相同的用户 -// - ExtraMap -type TimSock5Bean struct { - FromTid *Tid `thrift:"fromTid,1,required" json:"fromTid"` - ToTid *Tid `thrift:"toTid,2,required" json:"toTid"` - Addr string `thrift:"addr,3,required" json:"addr"` - Port int32 `thrift:"port,4,required" json:"port"` - Transport int16 `thrift:"transport,5,required" json:"transport"` - PubId string `thrift:"pubId,6,required" json:"pubId"` - ExtraMap map[string]string `thrift:"extraMap,7" json:"extraMap,omitempty"` -} - -func NewTimSock5Bean() *TimSock5Bean { - return &TimSock5Bean{} -} - -var TimSock5Bean_FromTid_DEFAULT *Tid - -func (p *TimSock5Bean) GetFromTid() *Tid { - if !p.IsSetFromTid() { - return TimSock5Bean_FromTid_DEFAULT - } - return p.FromTid -} - -var TimSock5Bean_ToTid_DEFAULT *Tid - -func (p *TimSock5Bean) GetToTid() *Tid { - if !p.IsSetToTid() { - return TimSock5Bean_ToTid_DEFAULT - } - return p.ToTid -} - -func (p *TimSock5Bean) GetAddr() string { - return p.Addr -} - -func (p *TimSock5Bean) GetPort() int32 { - return p.Port -} - -func (p *TimSock5Bean) GetTransport() int16 { - return p.Transport -} - -func (p *TimSock5Bean) GetPubId() string { - return p.PubId -} - -var TimSock5Bean_ExtraMap_DEFAULT map[string]string - -func (p *TimSock5Bean) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimSock5Bean) IsSetFromTid() bool { - return p.FromTid != nil -} - -func (p *TimSock5Bean) IsSetToTid() bool { - return p.ToTid != nil -} - -func (p *TimSock5Bean) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimSock5Bean) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetFromTid bool = false - var issetToTid bool = false - var issetAddr bool = false - var issetPort bool = false - var issetTransport bool = false - var issetPubId bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetFromTid = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetToTid = true - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - issetAddr = true - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - issetPort = true - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - issetTransport = true - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - issetPubId = true - case 7: - if err := p.readField7(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetFromTid { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field FromTid is not set")) - } - if !issetToTid { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ToTid is not set")) - } - if !issetAddr { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Addr is not set")) - } - if !issetPort { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Port is not set")) - } - if !issetTransport { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Transport is not set")) - } - if !issetPubId { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PubId is not set")) - } - return nil -} - -func (p *TimSock5Bean) readField1(iprot thrift.TProtocol) error { - p.FromTid = &Tid{} - if err := p.FromTid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.FromTid), err) - } - return nil -} - -func (p *TimSock5Bean) readField2(iprot thrift.TProtocol) error { - p.ToTid = &Tid{} - if err := p.ToTid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ToTid), err) - } - return nil -} - -func (p *TimSock5Bean) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.Addr = v - } - return nil -} - -func (p *TimSock5Bean) readField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 4: ", err) - } else { - p.Port = v - } - return nil -} - -func (p *TimSock5Bean) readField5(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI16(); err != nil { - return thrift.PrependError("error reading field 5: ", err) - } else { - p.Transport = v - } - return nil -} - -func (p *TimSock5Bean) readField6(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 6: ", err) - } else { - p.PubId = v - } - return nil -} - -func (p *TimSock5Bean) readField7(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key39 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key39 = v - } - var _val40 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val40 = v - } - p.ExtraMap[_key39] = _val40 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimSock5Bean) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimSock5Bean"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := p.writeField7(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimSock5Bean) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("fromTid", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:fromTid: ", p), err) - } - if err := p.FromTid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.FromTid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:fromTid: ", p), err) - } - return err -} - -func (p *TimSock5Bean) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("toTid", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:toTid: ", p), err) - } - if err := p.ToTid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ToTid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:toTid: ", p), err) - } - return err -} - -func (p *TimSock5Bean) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("addr", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:addr: ", p), err) - } - if err := oprot.WriteString(string(p.Addr)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.addr (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:addr: ", p), err) - } - return err -} - -func (p *TimSock5Bean) writeField4(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("port", thrift.I32, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:port: ", p), err) - } - if err := oprot.WriteI32(int32(p.Port)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.port (4) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:port: ", p), err) - } - return err -} - -func (p *TimSock5Bean) writeField5(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("transport", thrift.I16, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:transport: ", p), err) - } - if err := oprot.WriteI16(int16(p.Transport)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.transport (5) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:transport: ", p), err) - } - return err -} - -func (p *TimSock5Bean) writeField6(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("pubId", thrift.STRING, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:pubId: ", p), err) - } - if err := oprot.WriteString(string(p.PubId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.pubId (6) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:pubId: ", p), err) - } - return err -} - -func (p *TimSock5Bean) writeField7(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:extraMap: ", p), err) - } - } - return err -} - -func (p *TimSock5Bean) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimSock5Bean(%+v)", *p) -} - -// Attributes: -// - PubId: 发布id -// - Index: 序号数据块 -// - Bytes: 数据块 -// - ExtraMap -type TimSock5Bytes struct { - PubId string `thrift:"pubId,1,required" json:"pubId"` - Index int32 `thrift:"index,2,required" json:"index"` - Bytes [][]byte `thrift:"bytes,3,required" json:"bytes"` - ExtraMap map[string]string `thrift:"extraMap,4" json:"extraMap,omitempty"` -} - -func NewTimSock5Bytes() *TimSock5Bytes { - return &TimSock5Bytes{} -} - -func (p *TimSock5Bytes) GetPubId() string { - return p.PubId -} - -func (p *TimSock5Bytes) GetIndex() int32 { - return p.Index -} - -func (p *TimSock5Bytes) GetBytes() [][]byte { - return p.Bytes -} - -var TimSock5Bytes_ExtraMap_DEFAULT map[string]string - -func (p *TimSock5Bytes) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimSock5Bytes) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimSock5Bytes) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetPubId bool = false - var issetIndex bool = false - var issetBytes bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetPubId = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetIndex = true - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - issetBytes = true - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetPubId { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PubId is not set")) - } - if !issetIndex { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Index is not set")) - } - if !issetBytes { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Bytes is not set")) - } - return nil -} - -func (p *TimSock5Bytes) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.PubId = v - } - return nil -} - -func (p *TimSock5Bytes) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Index = v - } - return nil -} - -func (p *TimSock5Bytes) readField3(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([][]byte, 0, size) - p.Bytes = tSlice - for i := 0; i < size; i++ { - var _elem41 []byte - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _elem41 = v - } - p.Bytes = append(p.Bytes, _elem41) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimSock5Bytes) readField4(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key42 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key42 = v - } - var _val43 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val43 = v - } - p.ExtraMap[_key42] = _val43 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimSock5Bytes) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimSock5Bytes"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimSock5Bytes) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("pubId", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pubId: ", p), err) - } - if err := oprot.WriteString(string(p.PubId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.pubId (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:pubId: ", p), err) - } - return err -} - -func (p *TimSock5Bytes) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("index", thrift.I32, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:index: ", p), err) - } - if err := oprot.WriteI32(int32(p.Index)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.index (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:index: ", p), err) - } - return err -} - -func (p *TimSock5Bytes) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("bytes", thrift.LIST, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:bytes: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRING, len(p.Bytes)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Bytes { - if err := oprot.WriteBinary(v); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:bytes: ", p), err) - } - return err -} - -func (p *TimSock5Bytes) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) - } - } - return err -} - -func (p *TimSock5Bytes) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimSock5Bytes(%+v)", *p) -} - -// Attributes: -// - FromTimeStamp: 时间上 -// - ToTimeStamp: 时间下 -// - LimitCount: 条数 -// - ExtraMap -type TimPage struct { - FromTimeStamp *string `thrift:"fromTimeStamp,1" json:"fromTimeStamp,omitempty"` - ToTimeStamp *string `thrift:"toTimeStamp,2" json:"toTimeStamp,omitempty"` - LimitCount *int32 `thrift:"limitCount,3" json:"limitCount,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,4" json:"extraMap,omitempty"` -} - -func NewTimPage() *TimPage { - return &TimPage{} -} - -var TimPage_FromTimeStamp_DEFAULT string - -func (p *TimPage) GetFromTimeStamp() string { - if !p.IsSetFromTimeStamp() { - return TimPage_FromTimeStamp_DEFAULT - } - return *p.FromTimeStamp -} - -var TimPage_ToTimeStamp_DEFAULT string - -func (p *TimPage) GetToTimeStamp() string { - if !p.IsSetToTimeStamp() { - return TimPage_ToTimeStamp_DEFAULT - } - return *p.ToTimeStamp -} - -var TimPage_LimitCount_DEFAULT int32 - -func (p *TimPage) GetLimitCount() int32 { - if !p.IsSetLimitCount() { - return TimPage_LimitCount_DEFAULT - } - return *p.LimitCount -} - -var TimPage_ExtraMap_DEFAULT map[string]string - -func (p *TimPage) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimPage) IsSetFromTimeStamp() bool { - return p.FromTimeStamp != nil -} - -func (p *TimPage) IsSetToTimeStamp() bool { - return p.ToTimeStamp != nil -} - -func (p *TimPage) IsSetLimitCount() bool { - return p.LimitCount != nil -} - -func (p *TimPage) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimPage) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimPage) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.FromTimeStamp = &v - } - return nil -} - -func (p *TimPage) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.ToTimeStamp = &v - } - return nil -} - -func (p *TimPage) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.LimitCount = &v - } - return nil -} - -func (p *TimPage) readField4(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key44 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key44 = v - } - var _val45 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val45 = v - } - p.ExtraMap[_key44] = _val45 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimPage) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimPage"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimPage) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetFromTimeStamp() { - if err := oprot.WriteFieldBegin("fromTimeStamp", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:fromTimeStamp: ", p), err) - } - if err := oprot.WriteString(string(*p.FromTimeStamp)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.fromTimeStamp (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:fromTimeStamp: ", p), err) - } - } - return err -} - -func (p *TimPage) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetToTimeStamp() { - if err := oprot.WriteFieldBegin("toTimeStamp", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:toTimeStamp: ", p), err) - } - if err := oprot.WriteString(string(*p.ToTimeStamp)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.toTimeStamp (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:toTimeStamp: ", p), err) - } - } - return err -} - -func (p *TimPage) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetLimitCount() { - if err := oprot.WriteFieldBegin("limitCount", thrift.I32, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:limitCount: ", p), err) - } - if err := oprot.WriteI32(int32(*p.LimitCount)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.limitCount (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:limitCount: ", p), err) - } - } - return err -} - -func (p *TimPage) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) - } - } - return err -} - -func (p *TimPage) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimPage(%+v)", *p) -} - -// Attributes: -// - Tidlist: tid集合 -// - TimPage: 分页 -// - Midlist: mid集合 -// - ExtraMap -type TimMessageIq struct { - Tidlist []string `thrift:"tidlist,1" json:"tidlist,omitempty"` - TimPage *TimPage `thrift:"timPage,2" json:"timPage,omitempty"` - Midlist []string `thrift:"midlist,3" json:"midlist,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,4" json:"extraMap,omitempty"` -} - -func NewTimMessageIq() *TimMessageIq { - return &TimMessageIq{} -} - -var TimMessageIq_Tidlist_DEFAULT []string - -func (p *TimMessageIq) GetTidlist() []string { - return p.Tidlist -} - -var TimMessageIq_TimPage_DEFAULT *TimPage - -func (p *TimMessageIq) GetTimPage() *TimPage { - if !p.IsSetTimPage() { - return TimMessageIq_TimPage_DEFAULT - } - return p.TimPage -} - -var TimMessageIq_Midlist_DEFAULT []string - -func (p *TimMessageIq) GetMidlist() []string { - return p.Midlist -} - -var TimMessageIq_ExtraMap_DEFAULT map[string]string - -func (p *TimMessageIq) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimMessageIq) IsSetTidlist() bool { - return p.Tidlist != nil -} - -func (p *TimMessageIq) IsSetTimPage() bool { - return p.TimPage != nil -} - -func (p *TimMessageIq) IsSetMidlist() bool { - return p.Midlist != nil -} - -func (p *TimMessageIq) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimMessageIq) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimMessageIq) readField1(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]string, 0, size) - p.Tidlist = tSlice - for i := 0; i < size; i++ { - var _elem46 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _elem46 = v - } - p.Tidlist = append(p.Tidlist, _elem46) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimMessageIq) readField2(iprot thrift.TProtocol) error { - p.TimPage = &TimPage{} - if err := p.TimPage.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TimPage), err) - } - return nil -} - -func (p *TimMessageIq) readField3(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]string, 0, size) - p.Midlist = tSlice - for i := 0; i < size; i++ { - var _elem47 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _elem47 = v - } - p.Midlist = append(p.Midlist, _elem47) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimMessageIq) readField4(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key48 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key48 = v - } - var _val49 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val49 = v - } - p.ExtraMap[_key48] = _val49 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimMessageIq) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimMessageIq"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimMessageIq) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetTidlist() { - if err := oprot.WriteFieldBegin("tidlist", thrift.LIST, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tidlist: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRING, len(p.Tidlist)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Tidlist { - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tidlist: ", p), err) - } - } - return err -} - -func (p *TimMessageIq) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetTimPage() { - if err := oprot.WriteFieldBegin("timPage", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:timPage: ", p), err) - } - if err := p.TimPage.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TimPage), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:timPage: ", p), err) - } - } - return err -} - -func (p *TimMessageIq) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetMidlist() { - if err := oprot.WriteFieldBegin("midlist", thrift.LIST, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:midlist: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRING, len(p.Midlist)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Midlist { - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:midlist: ", p), err) - } - } - return err -} - -func (p *TimMessageIq) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) - } - } - return err -} - -func (p *TimMessageIq) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimMessageIq(%+v)", *p) -} - -// Attributes: -// - Domain: 域名 -// - Username: 用户名 -// - Pwd: 密码 -type TimAuth struct { - Domain *string `thrift:"domain,1" json:"domain,omitempty"` - Username *string `thrift:"username,2" json:"username,omitempty"` - Pwd *string `thrift:"pwd,3" json:"pwd,omitempty"` -} - -func NewTimAuth() *TimAuth { - return &TimAuth{} -} - -var TimAuth_Domain_DEFAULT string - -func (p *TimAuth) GetDomain() string { - if !p.IsSetDomain() { - return TimAuth_Domain_DEFAULT - } - return *p.Domain -} - -var TimAuth_Username_DEFAULT string - -func (p *TimAuth) GetUsername() string { - if !p.IsSetUsername() { - return TimAuth_Username_DEFAULT - } - return *p.Username -} - -var TimAuth_Pwd_DEFAULT string - -func (p *TimAuth) GetPwd() string { - if !p.IsSetPwd() { - return TimAuth_Pwd_DEFAULT - } - return *p.Pwd -} -func (p *TimAuth) IsSetDomain() bool { - return p.Domain != nil -} - -func (p *TimAuth) IsSetUsername() bool { - return p.Username != nil -} - -func (p *TimAuth) IsSetPwd() bool { - return p.Pwd != nil -} - -func (p *TimAuth) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimAuth) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Domain = &v - } - return nil -} - -func (p *TimAuth) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Username = &v - } - return nil -} - -func (p *TimAuth) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.Pwd = &v - } - return nil -} - -func (p *TimAuth) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimAuth"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimAuth) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetDomain() { - if err := oprot.WriteFieldBegin("domain", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:domain: ", p), err) - } - if err := oprot.WriteString(string(*p.Domain)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.domain (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:domain: ", p), err) - } - } - return err -} - -func (p *TimAuth) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetUsername() { - if err := oprot.WriteFieldBegin("username", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:username: ", p), err) - } - if err := oprot.WriteString(string(*p.Username)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.username (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:username: ", p), err) - } - } - return err -} - -func (p *TimAuth) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetPwd() { - if err := oprot.WriteFieldBegin("pwd", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:pwd: ", p), err) - } - if err := oprot.WriteString(string(*p.Pwd)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.pwd (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:pwd: ", p), err) - } - } - return err -} - -func (p *TimAuth) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimAuth(%+v)", *p) -} - -// Attributes: -// - ThreadId -// - TimMBeanList: 信息列表 -// - ReqType: 类型 -// - ExtraMap -type TimMBeanList struct { - ThreadId string `thrift:"threadId,1,required" json:"threadId"` - TimMBeanList []*TimMBean `thrift:"timMBeanList,2" json:"timMBeanList,omitempty"` - ReqType *string `thrift:"reqType,3" json:"reqType,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,4" json:"extraMap,omitempty"` -} - -func NewTimMBeanList() *TimMBeanList { - return &TimMBeanList{} -} - -func (p *TimMBeanList) GetThreadId() string { - return p.ThreadId -} - -var TimMBeanList_TimMBeanList_DEFAULT []*TimMBean - -func (p *TimMBeanList) GetTimMBeanList() []*TimMBean { - return p.TimMBeanList -} - -var TimMBeanList_ReqType_DEFAULT string - -func (p *TimMBeanList) GetReqType() string { - if !p.IsSetReqType() { - return TimMBeanList_ReqType_DEFAULT - } - return *p.ReqType -} - -var TimMBeanList_ExtraMap_DEFAULT map[string]string - -func (p *TimMBeanList) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimMBeanList) IsSetTimMBeanList() bool { - return p.TimMBeanList != nil -} - -func (p *TimMBeanList) IsSetReqType() bool { - return p.ReqType != nil -} - -func (p *TimMBeanList) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimMBeanList) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetThreadId bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetThreadId = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetThreadId { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ThreadId is not set")) - } - return nil -} - -func (p *TimMBeanList) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.ThreadId = v - } - return nil -} - -func (p *TimMBeanList) readField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TimMBean, 0, size) - p.TimMBeanList = tSlice - for i := 0; i < size; i++ { - _elem50 := &TimMBean{} - if err := _elem50.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem50), err) - } - p.TimMBeanList = append(p.TimMBeanList, _elem50) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimMBeanList) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.ReqType = &v - } - return nil -} - -func (p *TimMBeanList) readField4(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key51 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key51 = v - } - var _val52 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val52 = v - } - p.ExtraMap[_key51] = _val52 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimMBeanList) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimMBeanList"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimMBeanList) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("threadId", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) - } - if err := oprot.WriteString(string(p.ThreadId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) - } - return err -} - -func (p *TimMBeanList) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetTimMBeanList() { - if err := oprot.WriteFieldBegin("timMBeanList", thrift.LIST, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:timMBeanList: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.TimMBeanList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.TimMBeanList { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:timMBeanList: ", p), err) - } - } - return err -} - -func (p *TimMBeanList) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetReqType() { - if err := oprot.WriteFieldBegin("reqType", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:reqType: ", p), err) - } - if err := oprot.WriteString(string(*p.ReqType)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.reqType (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:reqType: ", p), err) - } - } - return err -} - -func (p *TimMBeanList) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) - } - } - return err -} - -func (p *TimMBeanList) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimMBeanList(%+v)", *p) -} - -// Attributes: -// - ThreadId -// - TimPBeanList: 状态信息列表 -// - ReqType: 类型 -// - ExtraMap -type TimPBeanList struct { - ThreadId string `thrift:"threadId,1,required" json:"threadId"` - TimPBeanList []*TimPBean `thrift:"timPBeanList,2" json:"timPBeanList,omitempty"` - ReqType *string `thrift:"reqType,3" json:"reqType,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,4" json:"extraMap,omitempty"` -} - -func NewTimPBeanList() *TimPBeanList { - return &TimPBeanList{} -} - -func (p *TimPBeanList) GetThreadId() string { - return p.ThreadId -} - -var TimPBeanList_TimPBeanList_DEFAULT []*TimPBean - -func (p *TimPBeanList) GetTimPBeanList() []*TimPBean { - return p.TimPBeanList -} - -var TimPBeanList_ReqType_DEFAULT string - -func (p *TimPBeanList) GetReqType() string { - if !p.IsSetReqType() { - return TimPBeanList_ReqType_DEFAULT - } - return *p.ReqType -} - -var TimPBeanList_ExtraMap_DEFAULT map[string]string - -func (p *TimPBeanList) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimPBeanList) IsSetTimPBeanList() bool { - return p.TimPBeanList != nil -} - -func (p *TimPBeanList) IsSetReqType() bool { - return p.ReqType != nil -} - -func (p *TimPBeanList) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimPBeanList) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetThreadId bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetThreadId = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetThreadId { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ThreadId is not set")) - } - return nil -} - -func (p *TimPBeanList) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.ThreadId = v - } - return nil -} - -func (p *TimPBeanList) readField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TimPBean, 0, size) - p.TimPBeanList = tSlice - for i := 0; i < size; i++ { - _elem53 := &TimPBean{} - if err := _elem53.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem53), err) - } - p.TimPBeanList = append(p.TimPBeanList, _elem53) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimPBeanList) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.ReqType = &v - } - return nil -} - -func (p *TimPBeanList) readField4(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key54 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key54 = v - } - var _val55 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val55 = v - } - p.ExtraMap[_key54] = _val55 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimPBeanList) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimPBeanList"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimPBeanList) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("threadId", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) - } - if err := oprot.WriteString(string(p.ThreadId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) - } - return err -} - -func (p *TimPBeanList) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetTimPBeanList() { - if err := oprot.WriteFieldBegin("timPBeanList", thrift.LIST, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:timPBeanList: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.TimPBeanList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.TimPBeanList { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:timPBeanList: ", p), err) - } - } - return err -} - -func (p *TimPBeanList) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetReqType() { - if err := oprot.WriteFieldBegin("reqType", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:reqType: ", p), err) - } - if err := oprot.WriteString(string(*p.ReqType)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.reqType (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:reqType: ", p), err) - } - } - return err -} - -func (p *TimPBeanList) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) - } - } - return err -} - -func (p *TimPBeanList) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimPBeanList(%+v)", *p) -} - -// Attributes: -// - ThreadId -// - Interflow: 消息合流 -// - TLS: tls -type TimPropertyBean struct { - ThreadId *string `thrift:"threadId,1" json:"threadId,omitempty"` - Interflow *string `thrift:"interflow,2" json:"interflow,omitempty"` - TLS *string `thrift:"tls,3" json:"tls,omitempty"` -} - -func NewTimPropertyBean() *TimPropertyBean { - return &TimPropertyBean{} -} - -var TimPropertyBean_ThreadId_DEFAULT string - -func (p *TimPropertyBean) GetThreadId() string { - if !p.IsSetThreadId() { - return TimPropertyBean_ThreadId_DEFAULT - } - return *p.ThreadId -} - -var TimPropertyBean_Interflow_DEFAULT string - -func (p *TimPropertyBean) GetInterflow() string { - if !p.IsSetInterflow() { - return TimPropertyBean_Interflow_DEFAULT - } - return *p.Interflow -} - -var TimPropertyBean_TLS_DEFAULT string - -func (p *TimPropertyBean) GetTLS() string { - if !p.IsSetTLS() { - return TimPropertyBean_TLS_DEFAULT - } - return *p.TLS -} -func (p *TimPropertyBean) IsSetThreadId() bool { - return p.ThreadId != nil -} - -func (p *TimPropertyBean) IsSetInterflow() bool { - return p.Interflow != nil -} - -func (p *TimPropertyBean) IsSetTLS() bool { - return p.TLS != nil -} - -func (p *TimPropertyBean) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimPropertyBean) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.ThreadId = &v - } - return nil -} - -func (p *TimPropertyBean) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Interflow = &v - } - return nil -} - -func (p *TimPropertyBean) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.TLS = &v - } - return nil -} - -func (p *TimPropertyBean) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimPropertyBean"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimPropertyBean) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetThreadId() { - if err := oprot.WriteFieldBegin("threadId", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) - } - if err := oprot.WriteString(string(*p.ThreadId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) - } - } - return err -} - -func (p *TimPropertyBean) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetInterflow() { - if err := oprot.WriteFieldBegin("interflow", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:interflow: ", p), err) - } - if err := oprot.WriteString(string(*p.Interflow)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.interflow (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:interflow: ", p), err) - } - } - return err -} - -func (p *TimPropertyBean) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetTLS() { - if err := oprot.WriteFieldBegin("tls", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:tls: ", p), err) - } - if err := oprot.WriteString(string(*p.TLS)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.tls (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:tls: ", p), err) - } - } - return err -} - -func (p *TimPropertyBean) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimPropertyBean(%+v)", *p) -} diff --git a/protocols/gen-hs/ITim.hs b/protocols/gen-hs/ITim.hs deleted file mode 100644 index dbfcc51..0000000 --- a/protocols/gen-hs/ITim.hs +++ /dev/null @@ -1,1840 +0,0 @@ -{-# LANGUAGE DeriveDataTypeable #-} -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE OverloadedStrings #-} -{-# OPTIONS_GHC -fno-warn-missing-fields #-} -{-# OPTIONS_GHC -fno-warn-missing-signatures #-} -{-# OPTIONS_GHC -fno-warn-name-shadowing #-} -{-# OPTIONS_GHC -fno-warn-unused-imports #-} -{-# OPTIONS_GHC -fno-warn-unused-matches #-} - ------------------------------------------------------------------ --- Autogenerated by Thrift Compiler (0.9.3) -- --- -- --- DO NOT EDIT UNLESS YOU ARE SURE YOU KNOW WHAT YOU ARE DOING -- ------------------------------------------------------------------ - -module ITim where -import Prelude (($), (.), (>>=), (==), (++)) -import qualified Prelude as P -import qualified Control.Exception as X -import qualified Control.Monad as M ( liftM, ap, when ) -import Data.Functor ( (<$>) ) -import qualified Data.ByteString.Lazy as LBS -import qualified Data.Hashable as H -import qualified Data.Int as I -import qualified Data.Maybe as M (catMaybes) -import qualified Data.Text.Lazy.Encoding as E ( decodeUtf8, encodeUtf8 ) -import qualified Data.Text.Lazy as LT -import qualified GHC.Generics as G (Generic) -import qualified Data.Typeable as TY ( Typeable ) -import qualified Data.HashMap.Strict as Map -import qualified Data.HashSet as Set -import qualified Data.Vector as Vector -import qualified Test.QuickCheck.Arbitrary as QC ( Arbitrary(..) ) -import qualified Test.QuickCheck as QC ( elements ) - -import qualified Thrift as T -import qualified Thrift.Types as T -import qualified Thrift.Arbitraries as T - - -import Tim_Types -import qualified ITim_Iface as Iface --- HELPER FUNCTIONS AND STRUCTURES -- - -data TimStream_args = TimStream_args { timStream_args_param :: TimParam - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimStream_args where - hashWithSalt salt record = salt `H.hashWithSalt` timStream_args_param record -instance QC.Arbitrary TimStream_args where - arbitrary = M.liftM TimStream_args (QC.arbitrary) - shrink obj | obj == default_TimStream_args = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimStream_args{timStream_args_param = timStream_args_param obj} then P.Nothing else P.Just $ default_TimStream_args{timStream_args_param = timStream_args_param obj} - ] -from_TimStream_args :: TimStream_args -> T.ThriftVal -from_TimStream_args record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v446 -> P.Just (1, ("param",from_TimParam _v446))) $ timStream_args_param record - ] -write_TimStream_args :: (T.Protocol p, T.Transport t) => p t -> TimStream_args -> P.IO () -write_TimStream_args oprot record = T.writeVal oprot $ from_TimStream_args record -encode_TimStream_args :: (T.Protocol p, T.Transport t) => p t -> TimStream_args -> LBS.ByteString -encode_TimStream_args oprot record = T.serializeVal oprot $ from_TimStream_args record -to_TimStream_args :: T.ThriftVal -> TimStream_args -to_TimStream_args (T.TStruct fields) = TimStream_args{ - timStream_args_param = P.maybe (timStream_args_param default_TimStream_args) (\(_,_val448) -> (case _val448 of {T.TStruct _val449 -> (to_TimParam (T.TStruct _val449)); _ -> P.error "wrong type"})) (Map.lookup (1) fields) - } -to_TimStream_args _ = P.error "not a struct" -read_TimStream_args :: (T.Transport t, T.Protocol p) => p t -> P.IO TimStream_args -read_TimStream_args iprot = to_TimStream_args <$> T.readVal iprot (T.T_STRUCT typemap_TimStream_args) -decode_TimStream_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimStream_args -decode_TimStream_args iprot bs = to_TimStream_args $ T.deserializeVal iprot (T.T_STRUCT typemap_TimStream_args) bs -typemap_TimStream_args :: T.TypeMap -typemap_TimStream_args = Map.fromList [(1,("param",(T.T_STRUCT typemap_TimParam)))] -default_TimStream_args :: TimStream_args -default_TimStream_args = TimStream_args{ - timStream_args_param = default_TimParam} -data TimStream_result = TimStream_result deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimStream_result where - hashWithSalt salt record = salt -instance QC.Arbitrary TimStream_result where - arbitrary = QC.elements [TimStream_result] -from_TimStream_result :: TimStream_result -> T.ThriftVal -from_TimStream_result record = T.TStruct $ Map.fromList $ M.catMaybes - [] -write_TimStream_result :: (T.Protocol p, T.Transport t) => p t -> TimStream_result -> P.IO () -write_TimStream_result oprot record = T.writeVal oprot $ from_TimStream_result record -encode_TimStream_result :: (T.Protocol p, T.Transport t) => p t -> TimStream_result -> LBS.ByteString -encode_TimStream_result oprot record = T.serializeVal oprot $ from_TimStream_result record -to_TimStream_result :: T.ThriftVal -> TimStream_result -to_TimStream_result (T.TStruct fields) = TimStream_result{ - - } -to_TimStream_result _ = P.error "not a struct" -read_TimStream_result :: (T.Transport t, T.Protocol p) => p t -> P.IO TimStream_result -read_TimStream_result iprot = to_TimStream_result <$> T.readVal iprot (T.T_STRUCT typemap_TimStream_result) -decode_TimStream_result :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimStream_result -decode_TimStream_result iprot bs = to_TimStream_result $ T.deserializeVal iprot (T.T_STRUCT typemap_TimStream_result) bs -typemap_TimStream_result :: T.TypeMap -typemap_TimStream_result = Map.fromList [] -default_TimStream_result :: TimStream_result -default_TimStream_result = TimStream_result{ -} -data TimStarttls_args = TimStarttls_args deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimStarttls_args where - hashWithSalt salt record = salt -instance QC.Arbitrary TimStarttls_args where - arbitrary = QC.elements [TimStarttls_args] -from_TimStarttls_args :: TimStarttls_args -> T.ThriftVal -from_TimStarttls_args record = T.TStruct $ Map.fromList $ M.catMaybes - [] -write_TimStarttls_args :: (T.Protocol p, T.Transport t) => p t -> TimStarttls_args -> P.IO () -write_TimStarttls_args oprot record = T.writeVal oprot $ from_TimStarttls_args record -encode_TimStarttls_args :: (T.Protocol p, T.Transport t) => p t -> TimStarttls_args -> LBS.ByteString -encode_TimStarttls_args oprot record = T.serializeVal oprot $ from_TimStarttls_args record -to_TimStarttls_args :: T.ThriftVal -> TimStarttls_args -to_TimStarttls_args (T.TStruct fields) = TimStarttls_args{ - - } -to_TimStarttls_args _ = P.error "not a struct" -read_TimStarttls_args :: (T.Transport t, T.Protocol p) => p t -> P.IO TimStarttls_args -read_TimStarttls_args iprot = to_TimStarttls_args <$> T.readVal iprot (T.T_STRUCT typemap_TimStarttls_args) -decode_TimStarttls_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimStarttls_args -decode_TimStarttls_args iprot bs = to_TimStarttls_args $ T.deserializeVal iprot (T.T_STRUCT typemap_TimStarttls_args) bs -typemap_TimStarttls_args :: T.TypeMap -typemap_TimStarttls_args = Map.fromList [] -default_TimStarttls_args :: TimStarttls_args -default_TimStarttls_args = TimStarttls_args{ -} -data TimStarttls_result = TimStarttls_result deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimStarttls_result where - hashWithSalt salt record = salt -instance QC.Arbitrary TimStarttls_result where - arbitrary = QC.elements [TimStarttls_result] -from_TimStarttls_result :: TimStarttls_result -> T.ThriftVal -from_TimStarttls_result record = T.TStruct $ Map.fromList $ M.catMaybes - [] -write_TimStarttls_result :: (T.Protocol p, T.Transport t) => p t -> TimStarttls_result -> P.IO () -write_TimStarttls_result oprot record = T.writeVal oprot $ from_TimStarttls_result record -encode_TimStarttls_result :: (T.Protocol p, T.Transport t) => p t -> TimStarttls_result -> LBS.ByteString -encode_TimStarttls_result oprot record = T.serializeVal oprot $ from_TimStarttls_result record -to_TimStarttls_result :: T.ThriftVal -> TimStarttls_result -to_TimStarttls_result (T.TStruct fields) = TimStarttls_result{ - - } -to_TimStarttls_result _ = P.error "not a struct" -read_TimStarttls_result :: (T.Transport t, T.Protocol p) => p t -> P.IO TimStarttls_result -read_TimStarttls_result iprot = to_TimStarttls_result <$> T.readVal iprot (T.T_STRUCT typemap_TimStarttls_result) -decode_TimStarttls_result :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimStarttls_result -decode_TimStarttls_result iprot bs = to_TimStarttls_result $ T.deserializeVal iprot (T.T_STRUCT typemap_TimStarttls_result) bs -typemap_TimStarttls_result :: T.TypeMap -typemap_TimStarttls_result = Map.fromList [] -default_TimStarttls_result :: TimStarttls_result -default_TimStarttls_result = TimStarttls_result{ -} -data TimLogin_args = TimLogin_args { timLogin_args_tid :: Tid - , timLogin_args_pwd :: LT.Text - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimLogin_args where - hashWithSalt salt record = salt `H.hashWithSalt` timLogin_args_tid record `H.hashWithSalt` timLogin_args_pwd record -instance QC.Arbitrary TimLogin_args where - arbitrary = M.liftM TimLogin_args (QC.arbitrary) - `M.ap`(QC.arbitrary) - shrink obj | obj == default_TimLogin_args = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimLogin_args{timLogin_args_tid = timLogin_args_tid obj} then P.Nothing else P.Just $ default_TimLogin_args{timLogin_args_tid = timLogin_args_tid obj} - , if obj == default_TimLogin_args{timLogin_args_pwd = timLogin_args_pwd obj} then P.Nothing else P.Just $ default_TimLogin_args{timLogin_args_pwd = timLogin_args_pwd obj} - ] -from_TimLogin_args :: TimLogin_args -> T.ThriftVal -from_TimLogin_args record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v467 -> P.Just (1, ("tid",from_Tid _v467))) $ timLogin_args_tid record - , (\_v467 -> P.Just (2, ("pwd",T.TString $ E.encodeUtf8 _v467))) $ timLogin_args_pwd record - ] -write_TimLogin_args :: (T.Protocol p, T.Transport t) => p t -> TimLogin_args -> P.IO () -write_TimLogin_args oprot record = T.writeVal oprot $ from_TimLogin_args record -encode_TimLogin_args :: (T.Protocol p, T.Transport t) => p t -> TimLogin_args -> LBS.ByteString -encode_TimLogin_args oprot record = T.serializeVal oprot $ from_TimLogin_args record -to_TimLogin_args :: T.ThriftVal -> TimLogin_args -to_TimLogin_args (T.TStruct fields) = TimLogin_args{ - timLogin_args_tid = P.maybe (timLogin_args_tid default_TimLogin_args) (\(_,_val469) -> (case _val469 of {T.TStruct _val470 -> (to_Tid (T.TStruct _val470)); _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timLogin_args_pwd = P.maybe (timLogin_args_pwd default_TimLogin_args) (\(_,_val469) -> (case _val469 of {T.TString _val471 -> E.decodeUtf8 _val471; _ -> P.error "wrong type"})) (Map.lookup (2) fields) - } -to_TimLogin_args _ = P.error "not a struct" -read_TimLogin_args :: (T.Transport t, T.Protocol p) => p t -> P.IO TimLogin_args -read_TimLogin_args iprot = to_TimLogin_args <$> T.readVal iprot (T.T_STRUCT typemap_TimLogin_args) -decode_TimLogin_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimLogin_args -decode_TimLogin_args iprot bs = to_TimLogin_args $ T.deserializeVal iprot (T.T_STRUCT typemap_TimLogin_args) bs -typemap_TimLogin_args :: T.TypeMap -typemap_TimLogin_args = Map.fromList [(1,("tid",(T.T_STRUCT typemap_Tid))),(2,("pwd",T.T_STRING))] -default_TimLogin_args :: TimLogin_args -default_TimLogin_args = TimLogin_args{ - timLogin_args_tid = default_Tid, - timLogin_args_pwd = ""} -data TimLogin_result = TimLogin_result deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimLogin_result where - hashWithSalt salt record = salt -instance QC.Arbitrary TimLogin_result where - arbitrary = QC.elements [TimLogin_result] -from_TimLogin_result :: TimLogin_result -> T.ThriftVal -from_TimLogin_result record = T.TStruct $ Map.fromList $ M.catMaybes - [] -write_TimLogin_result :: (T.Protocol p, T.Transport t) => p t -> TimLogin_result -> P.IO () -write_TimLogin_result oprot record = T.writeVal oprot $ from_TimLogin_result record -encode_TimLogin_result :: (T.Protocol p, T.Transport t) => p t -> TimLogin_result -> LBS.ByteString -encode_TimLogin_result oprot record = T.serializeVal oprot $ from_TimLogin_result record -to_TimLogin_result :: T.ThriftVal -> TimLogin_result -to_TimLogin_result (T.TStruct fields) = TimLogin_result{ - - } -to_TimLogin_result _ = P.error "not a struct" -read_TimLogin_result :: (T.Transport t, T.Protocol p) => p t -> P.IO TimLogin_result -read_TimLogin_result iprot = to_TimLogin_result <$> T.readVal iprot (T.T_STRUCT typemap_TimLogin_result) -decode_TimLogin_result :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimLogin_result -decode_TimLogin_result iprot bs = to_TimLogin_result $ T.deserializeVal iprot (T.T_STRUCT typemap_TimLogin_result) bs -typemap_TimLogin_result :: T.TypeMap -typemap_TimLogin_result = Map.fromList [] -default_TimLogin_result :: TimLogin_result -default_TimLogin_result = TimLogin_result{ -} -data TimAck_args = TimAck_args { timAck_args_ab :: TimAckBean - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimAck_args where - hashWithSalt salt record = salt `H.hashWithSalt` timAck_args_ab record -instance QC.Arbitrary TimAck_args where - arbitrary = M.liftM TimAck_args (QC.arbitrary) - shrink obj | obj == default_TimAck_args = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimAck_args{timAck_args_ab = timAck_args_ab obj} then P.Nothing else P.Just $ default_TimAck_args{timAck_args_ab = timAck_args_ab obj} - ] -from_TimAck_args :: TimAck_args -> T.ThriftVal -from_TimAck_args record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v479 -> P.Just (1, ("ab",from_TimAckBean _v479))) $ timAck_args_ab record - ] -write_TimAck_args :: (T.Protocol p, T.Transport t) => p t -> TimAck_args -> P.IO () -write_TimAck_args oprot record = T.writeVal oprot $ from_TimAck_args record -encode_TimAck_args :: (T.Protocol p, T.Transport t) => p t -> TimAck_args -> LBS.ByteString -encode_TimAck_args oprot record = T.serializeVal oprot $ from_TimAck_args record -to_TimAck_args :: T.ThriftVal -> TimAck_args -to_TimAck_args (T.TStruct fields) = TimAck_args{ - timAck_args_ab = P.maybe (timAck_args_ab default_TimAck_args) (\(_,_val481) -> (case _val481 of {T.TStruct _val482 -> (to_TimAckBean (T.TStruct _val482)); _ -> P.error "wrong type"})) (Map.lookup (1) fields) - } -to_TimAck_args _ = P.error "not a struct" -read_TimAck_args :: (T.Transport t, T.Protocol p) => p t -> P.IO TimAck_args -read_TimAck_args iprot = to_TimAck_args <$> T.readVal iprot (T.T_STRUCT typemap_TimAck_args) -decode_TimAck_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimAck_args -decode_TimAck_args iprot bs = to_TimAck_args $ T.deserializeVal iprot (T.T_STRUCT typemap_TimAck_args) bs -typemap_TimAck_args :: T.TypeMap -typemap_TimAck_args = Map.fromList [(1,("ab",(T.T_STRUCT typemap_TimAckBean)))] -default_TimAck_args :: TimAck_args -default_TimAck_args = TimAck_args{ - timAck_args_ab = default_TimAckBean} -data TimAck_result = TimAck_result deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimAck_result where - hashWithSalt salt record = salt -instance QC.Arbitrary TimAck_result where - arbitrary = QC.elements [TimAck_result] -from_TimAck_result :: TimAck_result -> T.ThriftVal -from_TimAck_result record = T.TStruct $ Map.fromList $ M.catMaybes - [] -write_TimAck_result :: (T.Protocol p, T.Transport t) => p t -> TimAck_result -> P.IO () -write_TimAck_result oprot record = T.writeVal oprot $ from_TimAck_result record -encode_TimAck_result :: (T.Protocol p, T.Transport t) => p t -> TimAck_result -> LBS.ByteString -encode_TimAck_result oprot record = T.serializeVal oprot $ from_TimAck_result record -to_TimAck_result :: T.ThriftVal -> TimAck_result -to_TimAck_result (T.TStruct fields) = TimAck_result{ - - } -to_TimAck_result _ = P.error "not a struct" -read_TimAck_result :: (T.Transport t, T.Protocol p) => p t -> P.IO TimAck_result -read_TimAck_result iprot = to_TimAck_result <$> T.readVal iprot (T.T_STRUCT typemap_TimAck_result) -decode_TimAck_result :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimAck_result -decode_TimAck_result iprot bs = to_TimAck_result $ T.deserializeVal iprot (T.T_STRUCT typemap_TimAck_result) bs -typemap_TimAck_result :: T.TypeMap -typemap_TimAck_result = Map.fromList [] -default_TimAck_result :: TimAck_result -default_TimAck_result = TimAck_result{ -} -data TimPresence_args = TimPresence_args { timPresence_args_pbean :: TimPBean - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimPresence_args where - hashWithSalt salt record = salt `H.hashWithSalt` timPresence_args_pbean record -instance QC.Arbitrary TimPresence_args where - arbitrary = M.liftM TimPresence_args (QC.arbitrary) - shrink obj | obj == default_TimPresence_args = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimPresence_args{timPresence_args_pbean = timPresence_args_pbean obj} then P.Nothing else P.Just $ default_TimPresence_args{timPresence_args_pbean = timPresence_args_pbean obj} - ] -from_TimPresence_args :: TimPresence_args -> T.ThriftVal -from_TimPresence_args record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v490 -> P.Just (1, ("pbean",from_TimPBean _v490))) $ timPresence_args_pbean record - ] -write_TimPresence_args :: (T.Protocol p, T.Transport t) => p t -> TimPresence_args -> P.IO () -write_TimPresence_args oprot record = T.writeVal oprot $ from_TimPresence_args record -encode_TimPresence_args :: (T.Protocol p, T.Transport t) => p t -> TimPresence_args -> LBS.ByteString -encode_TimPresence_args oprot record = T.serializeVal oprot $ from_TimPresence_args record -to_TimPresence_args :: T.ThriftVal -> TimPresence_args -to_TimPresence_args (T.TStruct fields) = TimPresence_args{ - timPresence_args_pbean = P.maybe (timPresence_args_pbean default_TimPresence_args) (\(_,_val492) -> (case _val492 of {T.TStruct _val493 -> (to_TimPBean (T.TStruct _val493)); _ -> P.error "wrong type"})) (Map.lookup (1) fields) - } -to_TimPresence_args _ = P.error "not a struct" -read_TimPresence_args :: (T.Transport t, T.Protocol p) => p t -> P.IO TimPresence_args -read_TimPresence_args iprot = to_TimPresence_args <$> T.readVal iprot (T.T_STRUCT typemap_TimPresence_args) -decode_TimPresence_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimPresence_args -decode_TimPresence_args iprot bs = to_TimPresence_args $ T.deserializeVal iprot (T.T_STRUCT typemap_TimPresence_args) bs -typemap_TimPresence_args :: T.TypeMap -typemap_TimPresence_args = Map.fromList [(1,("pbean",(T.T_STRUCT typemap_TimPBean)))] -default_TimPresence_args :: TimPresence_args -default_TimPresence_args = TimPresence_args{ - timPresence_args_pbean = default_TimPBean} -data TimPresence_result = TimPresence_result deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimPresence_result where - hashWithSalt salt record = salt -instance QC.Arbitrary TimPresence_result where - arbitrary = QC.elements [TimPresence_result] -from_TimPresence_result :: TimPresence_result -> T.ThriftVal -from_TimPresence_result record = T.TStruct $ Map.fromList $ M.catMaybes - [] -write_TimPresence_result :: (T.Protocol p, T.Transport t) => p t -> TimPresence_result -> P.IO () -write_TimPresence_result oprot record = T.writeVal oprot $ from_TimPresence_result record -encode_TimPresence_result :: (T.Protocol p, T.Transport t) => p t -> TimPresence_result -> LBS.ByteString -encode_TimPresence_result oprot record = T.serializeVal oprot $ from_TimPresence_result record -to_TimPresence_result :: T.ThriftVal -> TimPresence_result -to_TimPresence_result (T.TStruct fields) = TimPresence_result{ - - } -to_TimPresence_result _ = P.error "not a struct" -read_TimPresence_result :: (T.Transport t, T.Protocol p) => p t -> P.IO TimPresence_result -read_TimPresence_result iprot = to_TimPresence_result <$> T.readVal iprot (T.T_STRUCT typemap_TimPresence_result) -decode_TimPresence_result :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimPresence_result -decode_TimPresence_result iprot bs = to_TimPresence_result $ T.deserializeVal iprot (T.T_STRUCT typemap_TimPresence_result) bs -typemap_TimPresence_result :: T.TypeMap -typemap_TimPresence_result = Map.fromList [] -default_TimPresence_result :: TimPresence_result -default_TimPresence_result = TimPresence_result{ -} -data TimMessage_args = TimMessage_args { timMessage_args_mbean :: TimMBean - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimMessage_args where - hashWithSalt salt record = salt `H.hashWithSalt` timMessage_args_mbean record -instance QC.Arbitrary TimMessage_args where - arbitrary = M.liftM TimMessage_args (QC.arbitrary) - shrink obj | obj == default_TimMessage_args = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimMessage_args{timMessage_args_mbean = timMessage_args_mbean obj} then P.Nothing else P.Just $ default_TimMessage_args{timMessage_args_mbean = timMessage_args_mbean obj} - ] -from_TimMessage_args :: TimMessage_args -> T.ThriftVal -from_TimMessage_args record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v501 -> P.Just (1, ("mbean",from_TimMBean _v501))) $ timMessage_args_mbean record - ] -write_TimMessage_args :: (T.Protocol p, T.Transport t) => p t -> TimMessage_args -> P.IO () -write_TimMessage_args oprot record = T.writeVal oprot $ from_TimMessage_args record -encode_TimMessage_args :: (T.Protocol p, T.Transport t) => p t -> TimMessage_args -> LBS.ByteString -encode_TimMessage_args oprot record = T.serializeVal oprot $ from_TimMessage_args record -to_TimMessage_args :: T.ThriftVal -> TimMessage_args -to_TimMessage_args (T.TStruct fields) = TimMessage_args{ - timMessage_args_mbean = P.maybe (timMessage_args_mbean default_TimMessage_args) (\(_,_val503) -> (case _val503 of {T.TStruct _val504 -> (to_TimMBean (T.TStruct _val504)); _ -> P.error "wrong type"})) (Map.lookup (1) fields) - } -to_TimMessage_args _ = P.error "not a struct" -read_TimMessage_args :: (T.Transport t, T.Protocol p) => p t -> P.IO TimMessage_args -read_TimMessage_args iprot = to_TimMessage_args <$> T.readVal iprot (T.T_STRUCT typemap_TimMessage_args) -decode_TimMessage_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimMessage_args -decode_TimMessage_args iprot bs = to_TimMessage_args $ T.deserializeVal iprot (T.T_STRUCT typemap_TimMessage_args) bs -typemap_TimMessage_args :: T.TypeMap -typemap_TimMessage_args = Map.fromList [(1,("mbean",(T.T_STRUCT typemap_TimMBean)))] -default_TimMessage_args :: TimMessage_args -default_TimMessage_args = TimMessage_args{ - timMessage_args_mbean = default_TimMBean} -data TimMessage_result = TimMessage_result deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimMessage_result where - hashWithSalt salt record = salt -instance QC.Arbitrary TimMessage_result where - arbitrary = QC.elements [TimMessage_result] -from_TimMessage_result :: TimMessage_result -> T.ThriftVal -from_TimMessage_result record = T.TStruct $ Map.fromList $ M.catMaybes - [] -write_TimMessage_result :: (T.Protocol p, T.Transport t) => p t -> TimMessage_result -> P.IO () -write_TimMessage_result oprot record = T.writeVal oprot $ from_TimMessage_result record -encode_TimMessage_result :: (T.Protocol p, T.Transport t) => p t -> TimMessage_result -> LBS.ByteString -encode_TimMessage_result oprot record = T.serializeVal oprot $ from_TimMessage_result record -to_TimMessage_result :: T.ThriftVal -> TimMessage_result -to_TimMessage_result (T.TStruct fields) = TimMessage_result{ - - } -to_TimMessage_result _ = P.error "not a struct" -read_TimMessage_result :: (T.Transport t, T.Protocol p) => p t -> P.IO TimMessage_result -read_TimMessage_result iprot = to_TimMessage_result <$> T.readVal iprot (T.T_STRUCT typemap_TimMessage_result) -decode_TimMessage_result :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimMessage_result -decode_TimMessage_result iprot bs = to_TimMessage_result $ T.deserializeVal iprot (T.T_STRUCT typemap_TimMessage_result) bs -typemap_TimMessage_result :: T.TypeMap -typemap_TimMessage_result = Map.fromList [] -default_TimMessage_result :: TimMessage_result -default_TimMessage_result = TimMessage_result{ -} -data TimPing_args = TimPing_args { timPing_args_threadId :: LT.Text - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimPing_args where - hashWithSalt salt record = salt `H.hashWithSalt` timPing_args_threadId record -instance QC.Arbitrary TimPing_args where - arbitrary = M.liftM TimPing_args (QC.arbitrary) - shrink obj | obj == default_TimPing_args = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimPing_args{timPing_args_threadId = timPing_args_threadId obj} then P.Nothing else P.Just $ default_TimPing_args{timPing_args_threadId = timPing_args_threadId obj} - ] -from_TimPing_args :: TimPing_args -> T.ThriftVal -from_TimPing_args record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v512 -> P.Just (1, ("threadId",T.TString $ E.encodeUtf8 _v512))) $ timPing_args_threadId record - ] -write_TimPing_args :: (T.Protocol p, T.Transport t) => p t -> TimPing_args -> P.IO () -write_TimPing_args oprot record = T.writeVal oprot $ from_TimPing_args record -encode_TimPing_args :: (T.Protocol p, T.Transport t) => p t -> TimPing_args -> LBS.ByteString -encode_TimPing_args oprot record = T.serializeVal oprot $ from_TimPing_args record -to_TimPing_args :: T.ThriftVal -> TimPing_args -to_TimPing_args (T.TStruct fields) = TimPing_args{ - timPing_args_threadId = P.maybe (timPing_args_threadId default_TimPing_args) (\(_,_val514) -> (case _val514 of {T.TString _val515 -> E.decodeUtf8 _val515; _ -> P.error "wrong type"})) (Map.lookup (1) fields) - } -to_TimPing_args _ = P.error "not a struct" -read_TimPing_args :: (T.Transport t, T.Protocol p) => p t -> P.IO TimPing_args -read_TimPing_args iprot = to_TimPing_args <$> T.readVal iprot (T.T_STRUCT typemap_TimPing_args) -decode_TimPing_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimPing_args -decode_TimPing_args iprot bs = to_TimPing_args $ T.deserializeVal iprot (T.T_STRUCT typemap_TimPing_args) bs -typemap_TimPing_args :: T.TypeMap -typemap_TimPing_args = Map.fromList [(1,("threadId",T.T_STRING))] -default_TimPing_args :: TimPing_args -default_TimPing_args = TimPing_args{ - timPing_args_threadId = ""} -data TimPing_result = TimPing_result deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimPing_result where - hashWithSalt salt record = salt -instance QC.Arbitrary TimPing_result where - arbitrary = QC.elements [TimPing_result] -from_TimPing_result :: TimPing_result -> T.ThriftVal -from_TimPing_result record = T.TStruct $ Map.fromList $ M.catMaybes - [] -write_TimPing_result :: (T.Protocol p, T.Transport t) => p t -> TimPing_result -> P.IO () -write_TimPing_result oprot record = T.writeVal oprot $ from_TimPing_result record -encode_TimPing_result :: (T.Protocol p, T.Transport t) => p t -> TimPing_result -> LBS.ByteString -encode_TimPing_result oprot record = T.serializeVal oprot $ from_TimPing_result record -to_TimPing_result :: T.ThriftVal -> TimPing_result -to_TimPing_result (T.TStruct fields) = TimPing_result{ - - } -to_TimPing_result _ = P.error "not a struct" -read_TimPing_result :: (T.Transport t, T.Protocol p) => p t -> P.IO TimPing_result -read_TimPing_result iprot = to_TimPing_result <$> T.readVal iprot (T.T_STRUCT typemap_TimPing_result) -decode_TimPing_result :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimPing_result -decode_TimPing_result iprot bs = to_TimPing_result $ T.deserializeVal iprot (T.T_STRUCT typemap_TimPing_result) bs -typemap_TimPing_result :: T.TypeMap -typemap_TimPing_result = Map.fromList [] -default_TimPing_result :: TimPing_result -default_TimPing_result = TimPing_result{ -} -data TimError_args = TimError_args { timError_args_e :: TimError - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimError_args where - hashWithSalt salt record = salt `H.hashWithSalt` timError_args_e record -instance QC.Arbitrary TimError_args where - arbitrary = M.liftM TimError_args (QC.arbitrary) - shrink obj | obj == default_TimError_args = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimError_args{timError_args_e = timError_args_e obj} then P.Nothing else P.Just $ default_TimError_args{timError_args_e = timError_args_e obj} - ] -from_TimError_args :: TimError_args -> T.ThriftVal -from_TimError_args record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v523 -> P.Just (1, ("e",from_TimError _v523))) $ timError_args_e record - ] -write_TimError_args :: (T.Protocol p, T.Transport t) => p t -> TimError_args -> P.IO () -write_TimError_args oprot record = T.writeVal oprot $ from_TimError_args record -encode_TimError_args :: (T.Protocol p, T.Transport t) => p t -> TimError_args -> LBS.ByteString -encode_TimError_args oprot record = T.serializeVal oprot $ from_TimError_args record -to_TimError_args :: T.ThriftVal -> TimError_args -to_TimError_args (T.TStruct fields) = TimError_args{ - timError_args_e = P.maybe (timError_args_e default_TimError_args) (\(_,_val525) -> (case _val525 of {T.TStruct _val526 -> (to_TimError (T.TStruct _val526)); _ -> P.error "wrong type"})) (Map.lookup (1) fields) - } -to_TimError_args _ = P.error "not a struct" -read_TimError_args :: (T.Transport t, T.Protocol p) => p t -> P.IO TimError_args -read_TimError_args iprot = to_TimError_args <$> T.readVal iprot (T.T_STRUCT typemap_TimError_args) -decode_TimError_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimError_args -decode_TimError_args iprot bs = to_TimError_args $ T.deserializeVal iprot (T.T_STRUCT typemap_TimError_args) bs -typemap_TimError_args :: T.TypeMap -typemap_TimError_args = Map.fromList [(1,("e",(T.T_STRUCT typemap_TimError)))] -default_TimError_args :: TimError_args -default_TimError_args = TimError_args{ - timError_args_e = default_TimError} -data TimError_result = TimError_result deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimError_result where - hashWithSalt salt record = salt -instance QC.Arbitrary TimError_result where - arbitrary = QC.elements [TimError_result] -from_TimError_result :: TimError_result -> T.ThriftVal -from_TimError_result record = T.TStruct $ Map.fromList $ M.catMaybes - [] -write_TimError_result :: (T.Protocol p, T.Transport t) => p t -> TimError_result -> P.IO () -write_TimError_result oprot record = T.writeVal oprot $ from_TimError_result record -encode_TimError_result :: (T.Protocol p, T.Transport t) => p t -> TimError_result -> LBS.ByteString -encode_TimError_result oprot record = T.serializeVal oprot $ from_TimError_result record -to_TimError_result :: T.ThriftVal -> TimError_result -to_TimError_result (T.TStruct fields) = TimError_result{ - - } -to_TimError_result _ = P.error "not a struct" -read_TimError_result :: (T.Transport t, T.Protocol p) => p t -> P.IO TimError_result -read_TimError_result iprot = to_TimError_result <$> T.readVal iprot (T.T_STRUCT typemap_TimError_result) -decode_TimError_result :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimError_result -decode_TimError_result iprot bs = to_TimError_result $ T.deserializeVal iprot (T.T_STRUCT typemap_TimError_result) bs -typemap_TimError_result :: T.TypeMap -typemap_TimError_result = Map.fromList [] -default_TimError_result :: TimError_result -default_TimError_result = TimError_result{ -} -data TimLogout_args = TimLogout_args deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimLogout_args where - hashWithSalt salt record = salt -instance QC.Arbitrary TimLogout_args where - arbitrary = QC.elements [TimLogout_args] -from_TimLogout_args :: TimLogout_args -> T.ThriftVal -from_TimLogout_args record = T.TStruct $ Map.fromList $ M.catMaybes - [] -write_TimLogout_args :: (T.Protocol p, T.Transport t) => p t -> TimLogout_args -> P.IO () -write_TimLogout_args oprot record = T.writeVal oprot $ from_TimLogout_args record -encode_TimLogout_args :: (T.Protocol p, T.Transport t) => p t -> TimLogout_args -> LBS.ByteString -encode_TimLogout_args oprot record = T.serializeVal oprot $ from_TimLogout_args record -to_TimLogout_args :: T.ThriftVal -> TimLogout_args -to_TimLogout_args (T.TStruct fields) = TimLogout_args{ - - } -to_TimLogout_args _ = P.error "not a struct" -read_TimLogout_args :: (T.Transport t, T.Protocol p) => p t -> P.IO TimLogout_args -read_TimLogout_args iprot = to_TimLogout_args <$> T.readVal iprot (T.T_STRUCT typemap_TimLogout_args) -decode_TimLogout_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimLogout_args -decode_TimLogout_args iprot bs = to_TimLogout_args $ T.deserializeVal iprot (T.T_STRUCT typemap_TimLogout_args) bs -typemap_TimLogout_args :: T.TypeMap -typemap_TimLogout_args = Map.fromList [] -default_TimLogout_args :: TimLogout_args -default_TimLogout_args = TimLogout_args{ -} -data TimLogout_result = TimLogout_result deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimLogout_result where - hashWithSalt salt record = salt -instance QC.Arbitrary TimLogout_result where - arbitrary = QC.elements [TimLogout_result] -from_TimLogout_result :: TimLogout_result -> T.ThriftVal -from_TimLogout_result record = T.TStruct $ Map.fromList $ M.catMaybes - [] -write_TimLogout_result :: (T.Protocol p, T.Transport t) => p t -> TimLogout_result -> P.IO () -write_TimLogout_result oprot record = T.writeVal oprot $ from_TimLogout_result record -encode_TimLogout_result :: (T.Protocol p, T.Transport t) => p t -> TimLogout_result -> LBS.ByteString -encode_TimLogout_result oprot record = T.serializeVal oprot $ from_TimLogout_result record -to_TimLogout_result :: T.ThriftVal -> TimLogout_result -to_TimLogout_result (T.TStruct fields) = TimLogout_result{ - - } -to_TimLogout_result _ = P.error "not a struct" -read_TimLogout_result :: (T.Transport t, T.Protocol p) => p t -> P.IO TimLogout_result -read_TimLogout_result iprot = to_TimLogout_result <$> T.readVal iprot (T.T_STRUCT typemap_TimLogout_result) -decode_TimLogout_result :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimLogout_result -decode_TimLogout_result iprot bs = to_TimLogout_result $ T.deserializeVal iprot (T.T_STRUCT typemap_TimLogout_result) bs -typemap_TimLogout_result :: T.TypeMap -typemap_TimLogout_result = Map.fromList [] -default_TimLogout_result :: TimLogout_result -default_TimLogout_result = TimLogout_result{ -} -data TimRegist_args = TimRegist_args { timRegist_args_tid :: Tid - , timRegist_args_auth :: LT.Text - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimRegist_args where - hashWithSalt salt record = salt `H.hashWithSalt` timRegist_args_tid record `H.hashWithSalt` timRegist_args_auth record -instance QC.Arbitrary TimRegist_args where - arbitrary = M.liftM TimRegist_args (QC.arbitrary) - `M.ap`(QC.arbitrary) - shrink obj | obj == default_TimRegist_args = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimRegist_args{timRegist_args_tid = timRegist_args_tid obj} then P.Nothing else P.Just $ default_TimRegist_args{timRegist_args_tid = timRegist_args_tid obj} - , if obj == default_TimRegist_args{timRegist_args_auth = timRegist_args_auth obj} then P.Nothing else P.Just $ default_TimRegist_args{timRegist_args_auth = timRegist_args_auth obj} - ] -from_TimRegist_args :: TimRegist_args -> T.ThriftVal -from_TimRegist_args record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v544 -> P.Just (1, ("tid",from_Tid _v544))) $ timRegist_args_tid record - , (\_v544 -> P.Just (2, ("auth",T.TString $ E.encodeUtf8 _v544))) $ timRegist_args_auth record - ] -write_TimRegist_args :: (T.Protocol p, T.Transport t) => p t -> TimRegist_args -> P.IO () -write_TimRegist_args oprot record = T.writeVal oprot $ from_TimRegist_args record -encode_TimRegist_args :: (T.Protocol p, T.Transport t) => p t -> TimRegist_args -> LBS.ByteString -encode_TimRegist_args oprot record = T.serializeVal oprot $ from_TimRegist_args record -to_TimRegist_args :: T.ThriftVal -> TimRegist_args -to_TimRegist_args (T.TStruct fields) = TimRegist_args{ - timRegist_args_tid = P.maybe (timRegist_args_tid default_TimRegist_args) (\(_,_val546) -> (case _val546 of {T.TStruct _val547 -> (to_Tid (T.TStruct _val547)); _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timRegist_args_auth = P.maybe (timRegist_args_auth default_TimRegist_args) (\(_,_val546) -> (case _val546 of {T.TString _val548 -> E.decodeUtf8 _val548; _ -> P.error "wrong type"})) (Map.lookup (2) fields) - } -to_TimRegist_args _ = P.error "not a struct" -read_TimRegist_args :: (T.Transport t, T.Protocol p) => p t -> P.IO TimRegist_args -read_TimRegist_args iprot = to_TimRegist_args <$> T.readVal iprot (T.T_STRUCT typemap_TimRegist_args) -decode_TimRegist_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimRegist_args -decode_TimRegist_args iprot bs = to_TimRegist_args $ T.deserializeVal iprot (T.T_STRUCT typemap_TimRegist_args) bs -typemap_TimRegist_args :: T.TypeMap -typemap_TimRegist_args = Map.fromList [(1,("tid",(T.T_STRUCT typemap_Tid))),(2,("auth",T.T_STRING))] -default_TimRegist_args :: TimRegist_args -default_TimRegist_args = TimRegist_args{ - timRegist_args_tid = default_Tid, - timRegist_args_auth = ""} -data TimRegist_result = TimRegist_result deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimRegist_result where - hashWithSalt salt record = salt -instance QC.Arbitrary TimRegist_result where - arbitrary = QC.elements [TimRegist_result] -from_TimRegist_result :: TimRegist_result -> T.ThriftVal -from_TimRegist_result record = T.TStruct $ Map.fromList $ M.catMaybes - [] -write_TimRegist_result :: (T.Protocol p, T.Transport t) => p t -> TimRegist_result -> P.IO () -write_TimRegist_result oprot record = T.writeVal oprot $ from_TimRegist_result record -encode_TimRegist_result :: (T.Protocol p, T.Transport t) => p t -> TimRegist_result -> LBS.ByteString -encode_TimRegist_result oprot record = T.serializeVal oprot $ from_TimRegist_result record -to_TimRegist_result :: T.ThriftVal -> TimRegist_result -to_TimRegist_result (T.TStruct fields) = TimRegist_result{ - - } -to_TimRegist_result _ = P.error "not a struct" -read_TimRegist_result :: (T.Transport t, T.Protocol p) => p t -> P.IO TimRegist_result -read_TimRegist_result iprot = to_TimRegist_result <$> T.readVal iprot (T.T_STRUCT typemap_TimRegist_result) -decode_TimRegist_result :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimRegist_result -decode_TimRegist_result iprot bs = to_TimRegist_result $ T.deserializeVal iprot (T.T_STRUCT typemap_TimRegist_result) bs -typemap_TimRegist_result :: T.TypeMap -typemap_TimRegist_result = Map.fromList [] -default_TimRegist_result :: TimRegist_result -default_TimRegist_result = TimRegist_result{ -} -data TimRoser_args = TimRoser_args { timRoser_args_roster :: TimRoster - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimRoser_args where - hashWithSalt salt record = salt `H.hashWithSalt` timRoser_args_roster record -instance QC.Arbitrary TimRoser_args where - arbitrary = M.liftM TimRoser_args (QC.arbitrary) - shrink obj | obj == default_TimRoser_args = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimRoser_args{timRoser_args_roster = timRoser_args_roster obj} then P.Nothing else P.Just $ default_TimRoser_args{timRoser_args_roster = timRoser_args_roster obj} - ] -from_TimRoser_args :: TimRoser_args -> T.ThriftVal -from_TimRoser_args record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v556 -> P.Just (1, ("roster",from_TimRoster _v556))) $ timRoser_args_roster record - ] -write_TimRoser_args :: (T.Protocol p, T.Transport t) => p t -> TimRoser_args -> P.IO () -write_TimRoser_args oprot record = T.writeVal oprot $ from_TimRoser_args record -encode_TimRoser_args :: (T.Protocol p, T.Transport t) => p t -> TimRoser_args -> LBS.ByteString -encode_TimRoser_args oprot record = T.serializeVal oprot $ from_TimRoser_args record -to_TimRoser_args :: T.ThriftVal -> TimRoser_args -to_TimRoser_args (T.TStruct fields) = TimRoser_args{ - timRoser_args_roster = P.maybe (timRoser_args_roster default_TimRoser_args) (\(_,_val558) -> (case _val558 of {T.TStruct _val559 -> (to_TimRoster (T.TStruct _val559)); _ -> P.error "wrong type"})) (Map.lookup (1) fields) - } -to_TimRoser_args _ = P.error "not a struct" -read_TimRoser_args :: (T.Transport t, T.Protocol p) => p t -> P.IO TimRoser_args -read_TimRoser_args iprot = to_TimRoser_args <$> T.readVal iprot (T.T_STRUCT typemap_TimRoser_args) -decode_TimRoser_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimRoser_args -decode_TimRoser_args iprot bs = to_TimRoser_args $ T.deserializeVal iprot (T.T_STRUCT typemap_TimRoser_args) bs -typemap_TimRoser_args :: T.TypeMap -typemap_TimRoser_args = Map.fromList [(1,("roster",(T.T_STRUCT typemap_TimRoster)))] -default_TimRoser_args :: TimRoser_args -default_TimRoser_args = TimRoser_args{ - timRoser_args_roster = default_TimRoster} -data TimRoser_result = TimRoser_result deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimRoser_result where - hashWithSalt salt record = salt -instance QC.Arbitrary TimRoser_result where - arbitrary = QC.elements [TimRoser_result] -from_TimRoser_result :: TimRoser_result -> T.ThriftVal -from_TimRoser_result record = T.TStruct $ Map.fromList $ M.catMaybes - [] -write_TimRoser_result :: (T.Protocol p, T.Transport t) => p t -> TimRoser_result -> P.IO () -write_TimRoser_result oprot record = T.writeVal oprot $ from_TimRoser_result record -encode_TimRoser_result :: (T.Protocol p, T.Transport t) => p t -> TimRoser_result -> LBS.ByteString -encode_TimRoser_result oprot record = T.serializeVal oprot $ from_TimRoser_result record -to_TimRoser_result :: T.ThriftVal -> TimRoser_result -to_TimRoser_result (T.TStruct fields) = TimRoser_result{ - - } -to_TimRoser_result _ = P.error "not a struct" -read_TimRoser_result :: (T.Transport t, T.Protocol p) => p t -> P.IO TimRoser_result -read_TimRoser_result iprot = to_TimRoser_result <$> T.readVal iprot (T.T_STRUCT typemap_TimRoser_result) -decode_TimRoser_result :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimRoser_result -decode_TimRoser_result iprot bs = to_TimRoser_result $ T.deserializeVal iprot (T.T_STRUCT typemap_TimRoser_result) bs -typemap_TimRoser_result :: T.TypeMap -typemap_TimRoser_result = Map.fromList [] -default_TimRoser_result :: TimRoser_result -default_TimRoser_result = TimRoser_result{ -} -data TimMessageList_args = TimMessageList_args { timMessageList_args_mbeanList :: TimMBeanList - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimMessageList_args where - hashWithSalt salt record = salt `H.hashWithSalt` timMessageList_args_mbeanList record -instance QC.Arbitrary TimMessageList_args where - arbitrary = M.liftM TimMessageList_args (QC.arbitrary) - shrink obj | obj == default_TimMessageList_args = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimMessageList_args{timMessageList_args_mbeanList = timMessageList_args_mbeanList obj} then P.Nothing else P.Just $ default_TimMessageList_args{timMessageList_args_mbeanList = timMessageList_args_mbeanList obj} - ] -from_TimMessageList_args :: TimMessageList_args -> T.ThriftVal -from_TimMessageList_args record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v567 -> P.Just (1, ("mbeanList",from_TimMBeanList _v567))) $ timMessageList_args_mbeanList record - ] -write_TimMessageList_args :: (T.Protocol p, T.Transport t) => p t -> TimMessageList_args -> P.IO () -write_TimMessageList_args oprot record = T.writeVal oprot $ from_TimMessageList_args record -encode_TimMessageList_args :: (T.Protocol p, T.Transport t) => p t -> TimMessageList_args -> LBS.ByteString -encode_TimMessageList_args oprot record = T.serializeVal oprot $ from_TimMessageList_args record -to_TimMessageList_args :: T.ThriftVal -> TimMessageList_args -to_TimMessageList_args (T.TStruct fields) = TimMessageList_args{ - timMessageList_args_mbeanList = P.maybe (timMessageList_args_mbeanList default_TimMessageList_args) (\(_,_val569) -> (case _val569 of {T.TStruct _val570 -> (to_TimMBeanList (T.TStruct _val570)); _ -> P.error "wrong type"})) (Map.lookup (1) fields) - } -to_TimMessageList_args _ = P.error "not a struct" -read_TimMessageList_args :: (T.Transport t, T.Protocol p) => p t -> P.IO TimMessageList_args -read_TimMessageList_args iprot = to_TimMessageList_args <$> T.readVal iprot (T.T_STRUCT typemap_TimMessageList_args) -decode_TimMessageList_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimMessageList_args -decode_TimMessageList_args iprot bs = to_TimMessageList_args $ T.deserializeVal iprot (T.T_STRUCT typemap_TimMessageList_args) bs -typemap_TimMessageList_args :: T.TypeMap -typemap_TimMessageList_args = Map.fromList [(1,("mbeanList",(T.T_STRUCT typemap_TimMBeanList)))] -default_TimMessageList_args :: TimMessageList_args -default_TimMessageList_args = TimMessageList_args{ - timMessageList_args_mbeanList = default_TimMBeanList} -data TimMessageList_result = TimMessageList_result deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimMessageList_result where - hashWithSalt salt record = salt -instance QC.Arbitrary TimMessageList_result where - arbitrary = QC.elements [TimMessageList_result] -from_TimMessageList_result :: TimMessageList_result -> T.ThriftVal -from_TimMessageList_result record = T.TStruct $ Map.fromList $ M.catMaybes - [] -write_TimMessageList_result :: (T.Protocol p, T.Transport t) => p t -> TimMessageList_result -> P.IO () -write_TimMessageList_result oprot record = T.writeVal oprot $ from_TimMessageList_result record -encode_TimMessageList_result :: (T.Protocol p, T.Transport t) => p t -> TimMessageList_result -> LBS.ByteString -encode_TimMessageList_result oprot record = T.serializeVal oprot $ from_TimMessageList_result record -to_TimMessageList_result :: T.ThriftVal -> TimMessageList_result -to_TimMessageList_result (T.TStruct fields) = TimMessageList_result{ - - } -to_TimMessageList_result _ = P.error "not a struct" -read_TimMessageList_result :: (T.Transport t, T.Protocol p) => p t -> P.IO TimMessageList_result -read_TimMessageList_result iprot = to_TimMessageList_result <$> T.readVal iprot (T.T_STRUCT typemap_TimMessageList_result) -decode_TimMessageList_result :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimMessageList_result -decode_TimMessageList_result iprot bs = to_TimMessageList_result $ T.deserializeVal iprot (T.T_STRUCT typemap_TimMessageList_result) bs -typemap_TimMessageList_result :: T.TypeMap -typemap_TimMessageList_result = Map.fromList [] -default_TimMessageList_result :: TimMessageList_result -default_TimMessageList_result = TimMessageList_result{ -} -data TimPresenceList_args = TimPresenceList_args { timPresenceList_args_pbeanList :: TimPBeanList - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimPresenceList_args where - hashWithSalt salt record = salt `H.hashWithSalt` timPresenceList_args_pbeanList record -instance QC.Arbitrary TimPresenceList_args where - arbitrary = M.liftM TimPresenceList_args (QC.arbitrary) - shrink obj | obj == default_TimPresenceList_args = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimPresenceList_args{timPresenceList_args_pbeanList = timPresenceList_args_pbeanList obj} then P.Nothing else P.Just $ default_TimPresenceList_args{timPresenceList_args_pbeanList = timPresenceList_args_pbeanList obj} - ] -from_TimPresenceList_args :: TimPresenceList_args -> T.ThriftVal -from_TimPresenceList_args record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v578 -> P.Just (1, ("pbeanList",from_TimPBeanList _v578))) $ timPresenceList_args_pbeanList record - ] -write_TimPresenceList_args :: (T.Protocol p, T.Transport t) => p t -> TimPresenceList_args -> P.IO () -write_TimPresenceList_args oprot record = T.writeVal oprot $ from_TimPresenceList_args record -encode_TimPresenceList_args :: (T.Protocol p, T.Transport t) => p t -> TimPresenceList_args -> LBS.ByteString -encode_TimPresenceList_args oprot record = T.serializeVal oprot $ from_TimPresenceList_args record -to_TimPresenceList_args :: T.ThriftVal -> TimPresenceList_args -to_TimPresenceList_args (T.TStruct fields) = TimPresenceList_args{ - timPresenceList_args_pbeanList = P.maybe (timPresenceList_args_pbeanList default_TimPresenceList_args) (\(_,_val580) -> (case _val580 of {T.TStruct _val581 -> (to_TimPBeanList (T.TStruct _val581)); _ -> P.error "wrong type"})) (Map.lookup (1) fields) - } -to_TimPresenceList_args _ = P.error "not a struct" -read_TimPresenceList_args :: (T.Transport t, T.Protocol p) => p t -> P.IO TimPresenceList_args -read_TimPresenceList_args iprot = to_TimPresenceList_args <$> T.readVal iprot (T.T_STRUCT typemap_TimPresenceList_args) -decode_TimPresenceList_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimPresenceList_args -decode_TimPresenceList_args iprot bs = to_TimPresenceList_args $ T.deserializeVal iprot (T.T_STRUCT typemap_TimPresenceList_args) bs -typemap_TimPresenceList_args :: T.TypeMap -typemap_TimPresenceList_args = Map.fromList [(1,("pbeanList",(T.T_STRUCT typemap_TimPBeanList)))] -default_TimPresenceList_args :: TimPresenceList_args -default_TimPresenceList_args = TimPresenceList_args{ - timPresenceList_args_pbeanList = default_TimPBeanList} -data TimPresenceList_result = TimPresenceList_result deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimPresenceList_result where - hashWithSalt salt record = salt -instance QC.Arbitrary TimPresenceList_result where - arbitrary = QC.elements [TimPresenceList_result] -from_TimPresenceList_result :: TimPresenceList_result -> T.ThriftVal -from_TimPresenceList_result record = T.TStruct $ Map.fromList $ M.catMaybes - [] -write_TimPresenceList_result :: (T.Protocol p, T.Transport t) => p t -> TimPresenceList_result -> P.IO () -write_TimPresenceList_result oprot record = T.writeVal oprot $ from_TimPresenceList_result record -encode_TimPresenceList_result :: (T.Protocol p, T.Transport t) => p t -> TimPresenceList_result -> LBS.ByteString -encode_TimPresenceList_result oprot record = T.serializeVal oprot $ from_TimPresenceList_result record -to_TimPresenceList_result :: T.ThriftVal -> TimPresenceList_result -to_TimPresenceList_result (T.TStruct fields) = TimPresenceList_result{ - - } -to_TimPresenceList_result _ = P.error "not a struct" -read_TimPresenceList_result :: (T.Transport t, T.Protocol p) => p t -> P.IO TimPresenceList_result -read_TimPresenceList_result iprot = to_TimPresenceList_result <$> T.readVal iprot (T.T_STRUCT typemap_TimPresenceList_result) -decode_TimPresenceList_result :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimPresenceList_result -decode_TimPresenceList_result iprot bs = to_TimPresenceList_result $ T.deserializeVal iprot (T.T_STRUCT typemap_TimPresenceList_result) bs -typemap_TimPresenceList_result :: T.TypeMap -typemap_TimPresenceList_result = Map.fromList [] -default_TimPresenceList_result :: TimPresenceList_result -default_TimPresenceList_result = TimPresenceList_result{ -} -data TimMessageIq_args = TimMessageIq_args { timMessageIq_args_timMsgIq :: TimMessageIq - , timMessageIq_args_iqType :: LT.Text - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimMessageIq_args where - hashWithSalt salt record = salt `H.hashWithSalt` timMessageIq_args_timMsgIq record `H.hashWithSalt` timMessageIq_args_iqType record -instance QC.Arbitrary TimMessageIq_args where - arbitrary = M.liftM TimMessageIq_args (QC.arbitrary) - `M.ap`(QC.arbitrary) - shrink obj | obj == default_TimMessageIq_args = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimMessageIq_args{timMessageIq_args_timMsgIq = timMessageIq_args_timMsgIq obj} then P.Nothing else P.Just $ default_TimMessageIq_args{timMessageIq_args_timMsgIq = timMessageIq_args_timMsgIq obj} - , if obj == default_TimMessageIq_args{timMessageIq_args_iqType = timMessageIq_args_iqType obj} then P.Nothing else P.Just $ default_TimMessageIq_args{timMessageIq_args_iqType = timMessageIq_args_iqType obj} - ] -from_TimMessageIq_args :: TimMessageIq_args -> T.ThriftVal -from_TimMessageIq_args record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v589 -> P.Just (1, ("timMsgIq",from_TimMessageIq _v589))) $ timMessageIq_args_timMsgIq record - , (\_v589 -> P.Just (2, ("iqType",T.TString $ E.encodeUtf8 _v589))) $ timMessageIq_args_iqType record - ] -write_TimMessageIq_args :: (T.Protocol p, T.Transport t) => p t -> TimMessageIq_args -> P.IO () -write_TimMessageIq_args oprot record = T.writeVal oprot $ from_TimMessageIq_args record -encode_TimMessageIq_args :: (T.Protocol p, T.Transport t) => p t -> TimMessageIq_args -> LBS.ByteString -encode_TimMessageIq_args oprot record = T.serializeVal oprot $ from_TimMessageIq_args record -to_TimMessageIq_args :: T.ThriftVal -> TimMessageIq_args -to_TimMessageIq_args (T.TStruct fields) = TimMessageIq_args{ - timMessageIq_args_timMsgIq = P.maybe (timMessageIq_args_timMsgIq default_TimMessageIq_args) (\(_,_val591) -> (case _val591 of {T.TStruct _val592 -> (to_TimMessageIq (T.TStruct _val592)); _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timMessageIq_args_iqType = P.maybe (timMessageIq_args_iqType default_TimMessageIq_args) (\(_,_val591) -> (case _val591 of {T.TString _val593 -> E.decodeUtf8 _val593; _ -> P.error "wrong type"})) (Map.lookup (2) fields) - } -to_TimMessageIq_args _ = P.error "not a struct" -read_TimMessageIq_args :: (T.Transport t, T.Protocol p) => p t -> P.IO TimMessageIq_args -read_TimMessageIq_args iprot = to_TimMessageIq_args <$> T.readVal iprot (T.T_STRUCT typemap_TimMessageIq_args) -decode_TimMessageIq_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimMessageIq_args -decode_TimMessageIq_args iprot bs = to_TimMessageIq_args $ T.deserializeVal iprot (T.T_STRUCT typemap_TimMessageIq_args) bs -typemap_TimMessageIq_args :: T.TypeMap -typemap_TimMessageIq_args = Map.fromList [(1,("timMsgIq",(T.T_STRUCT typemap_TimMessageIq))),(2,("iqType",T.T_STRING))] -default_TimMessageIq_args :: TimMessageIq_args -default_TimMessageIq_args = TimMessageIq_args{ - timMessageIq_args_timMsgIq = default_TimMessageIq, - timMessageIq_args_iqType = ""} -data TimMessageIq_result = TimMessageIq_result deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimMessageIq_result where - hashWithSalt salt record = salt -instance QC.Arbitrary TimMessageIq_result where - arbitrary = QC.elements [TimMessageIq_result] -from_TimMessageIq_result :: TimMessageIq_result -> T.ThriftVal -from_TimMessageIq_result record = T.TStruct $ Map.fromList $ M.catMaybes - [] -write_TimMessageIq_result :: (T.Protocol p, T.Transport t) => p t -> TimMessageIq_result -> P.IO () -write_TimMessageIq_result oprot record = T.writeVal oprot $ from_TimMessageIq_result record -encode_TimMessageIq_result :: (T.Protocol p, T.Transport t) => p t -> TimMessageIq_result -> LBS.ByteString -encode_TimMessageIq_result oprot record = T.serializeVal oprot $ from_TimMessageIq_result record -to_TimMessageIq_result :: T.ThriftVal -> TimMessageIq_result -to_TimMessageIq_result (T.TStruct fields) = TimMessageIq_result{ - - } -to_TimMessageIq_result _ = P.error "not a struct" -read_TimMessageIq_result :: (T.Transport t, T.Protocol p) => p t -> P.IO TimMessageIq_result -read_TimMessageIq_result iprot = to_TimMessageIq_result <$> T.readVal iprot (T.T_STRUCT typemap_TimMessageIq_result) -decode_TimMessageIq_result :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimMessageIq_result -decode_TimMessageIq_result iprot bs = to_TimMessageIq_result $ T.deserializeVal iprot (T.T_STRUCT typemap_TimMessageIq_result) bs -typemap_TimMessageIq_result :: T.TypeMap -typemap_TimMessageIq_result = Map.fromList [] -default_TimMessageIq_result :: TimMessageIq_result -default_TimMessageIq_result = TimMessageIq_result{ -} -data TimMessageResult_args = TimMessageResult_args { timMessageResult_args_mbean :: TimMBean - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimMessageResult_args where - hashWithSalt salt record = salt `H.hashWithSalt` timMessageResult_args_mbean record -instance QC.Arbitrary TimMessageResult_args where - arbitrary = M.liftM TimMessageResult_args (QC.arbitrary) - shrink obj | obj == default_TimMessageResult_args = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimMessageResult_args{timMessageResult_args_mbean = timMessageResult_args_mbean obj} then P.Nothing else P.Just $ default_TimMessageResult_args{timMessageResult_args_mbean = timMessageResult_args_mbean obj} - ] -from_TimMessageResult_args :: TimMessageResult_args -> T.ThriftVal -from_TimMessageResult_args record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v601 -> P.Just (1, ("mbean",from_TimMBean _v601))) $ timMessageResult_args_mbean record - ] -write_TimMessageResult_args :: (T.Protocol p, T.Transport t) => p t -> TimMessageResult_args -> P.IO () -write_TimMessageResult_args oprot record = T.writeVal oprot $ from_TimMessageResult_args record -encode_TimMessageResult_args :: (T.Protocol p, T.Transport t) => p t -> TimMessageResult_args -> LBS.ByteString -encode_TimMessageResult_args oprot record = T.serializeVal oprot $ from_TimMessageResult_args record -to_TimMessageResult_args :: T.ThriftVal -> TimMessageResult_args -to_TimMessageResult_args (T.TStruct fields) = TimMessageResult_args{ - timMessageResult_args_mbean = P.maybe (timMessageResult_args_mbean default_TimMessageResult_args) (\(_,_val603) -> (case _val603 of {T.TStruct _val604 -> (to_TimMBean (T.TStruct _val604)); _ -> P.error "wrong type"})) (Map.lookup (1) fields) - } -to_TimMessageResult_args _ = P.error "not a struct" -read_TimMessageResult_args :: (T.Transport t, T.Protocol p) => p t -> P.IO TimMessageResult_args -read_TimMessageResult_args iprot = to_TimMessageResult_args <$> T.readVal iprot (T.T_STRUCT typemap_TimMessageResult_args) -decode_TimMessageResult_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimMessageResult_args -decode_TimMessageResult_args iprot bs = to_TimMessageResult_args $ T.deserializeVal iprot (T.T_STRUCT typemap_TimMessageResult_args) bs -typemap_TimMessageResult_args :: T.TypeMap -typemap_TimMessageResult_args = Map.fromList [(1,("mbean",(T.T_STRUCT typemap_TimMBean)))] -default_TimMessageResult_args :: TimMessageResult_args -default_TimMessageResult_args = TimMessageResult_args{ - timMessageResult_args_mbean = default_TimMBean} -data TimMessageResult_result = TimMessageResult_result deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimMessageResult_result where - hashWithSalt salt record = salt -instance QC.Arbitrary TimMessageResult_result where - arbitrary = QC.elements [TimMessageResult_result] -from_TimMessageResult_result :: TimMessageResult_result -> T.ThriftVal -from_TimMessageResult_result record = T.TStruct $ Map.fromList $ M.catMaybes - [] -write_TimMessageResult_result :: (T.Protocol p, T.Transport t) => p t -> TimMessageResult_result -> P.IO () -write_TimMessageResult_result oprot record = T.writeVal oprot $ from_TimMessageResult_result record -encode_TimMessageResult_result :: (T.Protocol p, T.Transport t) => p t -> TimMessageResult_result -> LBS.ByteString -encode_TimMessageResult_result oprot record = T.serializeVal oprot $ from_TimMessageResult_result record -to_TimMessageResult_result :: T.ThriftVal -> TimMessageResult_result -to_TimMessageResult_result (T.TStruct fields) = TimMessageResult_result{ - - } -to_TimMessageResult_result _ = P.error "not a struct" -read_TimMessageResult_result :: (T.Transport t, T.Protocol p) => p t -> P.IO TimMessageResult_result -read_TimMessageResult_result iprot = to_TimMessageResult_result <$> T.readVal iprot (T.T_STRUCT typemap_TimMessageResult_result) -decode_TimMessageResult_result :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimMessageResult_result -decode_TimMessageResult_result iprot bs = to_TimMessageResult_result $ T.deserializeVal iprot (T.T_STRUCT typemap_TimMessageResult_result) bs -typemap_TimMessageResult_result :: T.TypeMap -typemap_TimMessageResult_result = Map.fromList [] -default_TimMessageResult_result :: TimMessageResult_result -default_TimMessageResult_result = TimMessageResult_result{ -} -data TimProperty_args = TimProperty_args { timProperty_args_tpb :: TimPropertyBean - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimProperty_args where - hashWithSalt salt record = salt `H.hashWithSalt` timProperty_args_tpb record -instance QC.Arbitrary TimProperty_args where - arbitrary = M.liftM TimProperty_args (QC.arbitrary) - shrink obj | obj == default_TimProperty_args = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimProperty_args{timProperty_args_tpb = timProperty_args_tpb obj} then P.Nothing else P.Just $ default_TimProperty_args{timProperty_args_tpb = timProperty_args_tpb obj} - ] -from_TimProperty_args :: TimProperty_args -> T.ThriftVal -from_TimProperty_args record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v612 -> P.Just (1, ("tpb",from_TimPropertyBean _v612))) $ timProperty_args_tpb record - ] -write_TimProperty_args :: (T.Protocol p, T.Transport t) => p t -> TimProperty_args -> P.IO () -write_TimProperty_args oprot record = T.writeVal oprot $ from_TimProperty_args record -encode_TimProperty_args :: (T.Protocol p, T.Transport t) => p t -> TimProperty_args -> LBS.ByteString -encode_TimProperty_args oprot record = T.serializeVal oprot $ from_TimProperty_args record -to_TimProperty_args :: T.ThriftVal -> TimProperty_args -to_TimProperty_args (T.TStruct fields) = TimProperty_args{ - timProperty_args_tpb = P.maybe (timProperty_args_tpb default_TimProperty_args) (\(_,_val614) -> (case _val614 of {T.TStruct _val615 -> (to_TimPropertyBean (T.TStruct _val615)); _ -> P.error "wrong type"})) (Map.lookup (1) fields) - } -to_TimProperty_args _ = P.error "not a struct" -read_TimProperty_args :: (T.Transport t, T.Protocol p) => p t -> P.IO TimProperty_args -read_TimProperty_args iprot = to_TimProperty_args <$> T.readVal iprot (T.T_STRUCT typemap_TimProperty_args) -decode_TimProperty_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimProperty_args -decode_TimProperty_args iprot bs = to_TimProperty_args $ T.deserializeVal iprot (T.T_STRUCT typemap_TimProperty_args) bs -typemap_TimProperty_args :: T.TypeMap -typemap_TimProperty_args = Map.fromList [(1,("tpb",(T.T_STRUCT typemap_TimPropertyBean)))] -default_TimProperty_args :: TimProperty_args -default_TimProperty_args = TimProperty_args{ - timProperty_args_tpb = default_TimPropertyBean} -data TimProperty_result = TimProperty_result deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimProperty_result where - hashWithSalt salt record = salt -instance QC.Arbitrary TimProperty_result where - arbitrary = QC.elements [TimProperty_result] -from_TimProperty_result :: TimProperty_result -> T.ThriftVal -from_TimProperty_result record = T.TStruct $ Map.fromList $ M.catMaybes - [] -write_TimProperty_result :: (T.Protocol p, T.Transport t) => p t -> TimProperty_result -> P.IO () -write_TimProperty_result oprot record = T.writeVal oprot $ from_TimProperty_result record -encode_TimProperty_result :: (T.Protocol p, T.Transport t) => p t -> TimProperty_result -> LBS.ByteString -encode_TimProperty_result oprot record = T.serializeVal oprot $ from_TimProperty_result record -to_TimProperty_result :: T.ThriftVal -> TimProperty_result -to_TimProperty_result (T.TStruct fields) = TimProperty_result{ - - } -to_TimProperty_result _ = P.error "not a struct" -read_TimProperty_result :: (T.Transport t, T.Protocol p) => p t -> P.IO TimProperty_result -read_TimProperty_result iprot = to_TimProperty_result <$> T.readVal iprot (T.T_STRUCT typemap_TimProperty_result) -decode_TimProperty_result :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimProperty_result -decode_TimProperty_result iprot bs = to_TimProperty_result $ T.deserializeVal iprot (T.T_STRUCT typemap_TimProperty_result) bs -typemap_TimProperty_result :: T.TypeMap -typemap_TimProperty_result = Map.fromList [] -default_TimProperty_result :: TimProperty_result -default_TimProperty_result = TimProperty_result{ -} -data TimRemoteUserAuth_args = TimRemoteUserAuth_args { timRemoteUserAuth_args_tid :: Tid - , timRemoteUserAuth_args_pwd :: LT.Text - , timRemoteUserAuth_args_auth :: TimAuth - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimRemoteUserAuth_args where - hashWithSalt salt record = salt `H.hashWithSalt` timRemoteUserAuth_args_tid record `H.hashWithSalt` timRemoteUserAuth_args_pwd record `H.hashWithSalt` timRemoteUserAuth_args_auth record -instance QC.Arbitrary TimRemoteUserAuth_args where - arbitrary = M.liftM TimRemoteUserAuth_args (QC.arbitrary) - `M.ap`(QC.arbitrary) - `M.ap`(QC.arbitrary) - shrink obj | obj == default_TimRemoteUserAuth_args = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimRemoteUserAuth_args{timRemoteUserAuth_args_tid = timRemoteUserAuth_args_tid obj} then P.Nothing else P.Just $ default_TimRemoteUserAuth_args{timRemoteUserAuth_args_tid = timRemoteUserAuth_args_tid obj} - , if obj == default_TimRemoteUserAuth_args{timRemoteUserAuth_args_pwd = timRemoteUserAuth_args_pwd obj} then P.Nothing else P.Just $ default_TimRemoteUserAuth_args{timRemoteUserAuth_args_pwd = timRemoteUserAuth_args_pwd obj} - , if obj == default_TimRemoteUserAuth_args{timRemoteUserAuth_args_auth = timRemoteUserAuth_args_auth obj} then P.Nothing else P.Just $ default_TimRemoteUserAuth_args{timRemoteUserAuth_args_auth = timRemoteUserAuth_args_auth obj} - ] -from_TimRemoteUserAuth_args :: TimRemoteUserAuth_args -> T.ThriftVal -from_TimRemoteUserAuth_args record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v623 -> P.Just (1, ("tid",from_Tid _v623))) $ timRemoteUserAuth_args_tid record - , (\_v623 -> P.Just (2, ("pwd",T.TString $ E.encodeUtf8 _v623))) $ timRemoteUserAuth_args_pwd record - , (\_v623 -> P.Just (3, ("auth",from_TimAuth _v623))) $ timRemoteUserAuth_args_auth record - ] -write_TimRemoteUserAuth_args :: (T.Protocol p, T.Transport t) => p t -> TimRemoteUserAuth_args -> P.IO () -write_TimRemoteUserAuth_args oprot record = T.writeVal oprot $ from_TimRemoteUserAuth_args record -encode_TimRemoteUserAuth_args :: (T.Protocol p, T.Transport t) => p t -> TimRemoteUserAuth_args -> LBS.ByteString -encode_TimRemoteUserAuth_args oprot record = T.serializeVal oprot $ from_TimRemoteUserAuth_args record -to_TimRemoteUserAuth_args :: T.ThriftVal -> TimRemoteUserAuth_args -to_TimRemoteUserAuth_args (T.TStruct fields) = TimRemoteUserAuth_args{ - timRemoteUserAuth_args_tid = P.maybe (timRemoteUserAuth_args_tid default_TimRemoteUserAuth_args) (\(_,_val625) -> (case _val625 of {T.TStruct _val626 -> (to_Tid (T.TStruct _val626)); _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timRemoteUserAuth_args_pwd = P.maybe (timRemoteUserAuth_args_pwd default_TimRemoteUserAuth_args) (\(_,_val625) -> (case _val625 of {T.TString _val627 -> E.decodeUtf8 _val627; _ -> P.error "wrong type"})) (Map.lookup (2) fields), - timRemoteUserAuth_args_auth = P.maybe (timRemoteUserAuth_args_auth default_TimRemoteUserAuth_args) (\(_,_val625) -> (case _val625 of {T.TStruct _val628 -> (to_TimAuth (T.TStruct _val628)); _ -> P.error "wrong type"})) (Map.lookup (3) fields) - } -to_TimRemoteUserAuth_args _ = P.error "not a struct" -read_TimRemoteUserAuth_args :: (T.Transport t, T.Protocol p) => p t -> P.IO TimRemoteUserAuth_args -read_TimRemoteUserAuth_args iprot = to_TimRemoteUserAuth_args <$> T.readVal iprot (T.T_STRUCT typemap_TimRemoteUserAuth_args) -decode_TimRemoteUserAuth_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimRemoteUserAuth_args -decode_TimRemoteUserAuth_args iprot bs = to_TimRemoteUserAuth_args $ T.deserializeVal iprot (T.T_STRUCT typemap_TimRemoteUserAuth_args) bs -typemap_TimRemoteUserAuth_args :: T.TypeMap -typemap_TimRemoteUserAuth_args = Map.fromList [(1,("tid",(T.T_STRUCT typemap_Tid))),(2,("pwd",T.T_STRING)),(3,("auth",(T.T_STRUCT typemap_TimAuth)))] -default_TimRemoteUserAuth_args :: TimRemoteUserAuth_args -default_TimRemoteUserAuth_args = TimRemoteUserAuth_args{ - timRemoteUserAuth_args_tid = default_Tid, - timRemoteUserAuth_args_pwd = "", - timRemoteUserAuth_args_auth = default_TimAuth} -data TimRemoteUserAuth_result = TimRemoteUserAuth_result { timRemoteUserAuth_result_success :: TimRemoteUserBean - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimRemoteUserAuth_result where - hashWithSalt salt record = salt `H.hashWithSalt` timRemoteUserAuth_result_success record -instance QC.Arbitrary TimRemoteUserAuth_result where - arbitrary = M.liftM TimRemoteUserAuth_result (QC.arbitrary) - shrink obj | obj == default_TimRemoteUserAuth_result = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimRemoteUserAuth_result{timRemoteUserAuth_result_success = timRemoteUserAuth_result_success obj} then P.Nothing else P.Just $ default_TimRemoteUserAuth_result{timRemoteUserAuth_result_success = timRemoteUserAuth_result_success obj} - ] -from_TimRemoteUserAuth_result :: TimRemoteUserAuth_result -> T.ThriftVal -from_TimRemoteUserAuth_result record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v631 -> P.Just (0, ("success",from_TimRemoteUserBean _v631))) $ timRemoteUserAuth_result_success record - ] -write_TimRemoteUserAuth_result :: (T.Protocol p, T.Transport t) => p t -> TimRemoteUserAuth_result -> P.IO () -write_TimRemoteUserAuth_result oprot record = T.writeVal oprot $ from_TimRemoteUserAuth_result record -encode_TimRemoteUserAuth_result :: (T.Protocol p, T.Transport t) => p t -> TimRemoteUserAuth_result -> LBS.ByteString -encode_TimRemoteUserAuth_result oprot record = T.serializeVal oprot $ from_TimRemoteUserAuth_result record -to_TimRemoteUserAuth_result :: T.ThriftVal -> TimRemoteUserAuth_result -to_TimRemoteUserAuth_result (T.TStruct fields) = TimRemoteUserAuth_result{ - timRemoteUserAuth_result_success = P.maybe (timRemoteUserAuth_result_success default_TimRemoteUserAuth_result) (\(_,_val633) -> (case _val633 of {T.TStruct _val634 -> (to_TimRemoteUserBean (T.TStruct _val634)); _ -> P.error "wrong type"})) (Map.lookup (0) fields) - } -to_TimRemoteUserAuth_result _ = P.error "not a struct" -read_TimRemoteUserAuth_result :: (T.Transport t, T.Protocol p) => p t -> P.IO TimRemoteUserAuth_result -read_TimRemoteUserAuth_result iprot = to_TimRemoteUserAuth_result <$> T.readVal iprot (T.T_STRUCT typemap_TimRemoteUserAuth_result) -decode_TimRemoteUserAuth_result :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimRemoteUserAuth_result -decode_TimRemoteUserAuth_result iprot bs = to_TimRemoteUserAuth_result $ T.deserializeVal iprot (T.T_STRUCT typemap_TimRemoteUserAuth_result) bs -typemap_TimRemoteUserAuth_result :: T.TypeMap -typemap_TimRemoteUserAuth_result = Map.fromList [(0,("success",(T.T_STRUCT typemap_TimRemoteUserBean)))] -default_TimRemoteUserAuth_result :: TimRemoteUserAuth_result -default_TimRemoteUserAuth_result = TimRemoteUserAuth_result{ - timRemoteUserAuth_result_success = default_TimRemoteUserBean} -data TimRemoteUserGet_args = TimRemoteUserGet_args { timRemoteUserGet_args_tid :: Tid - , timRemoteUserGet_args_auth :: TimAuth - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimRemoteUserGet_args where - hashWithSalt salt record = salt `H.hashWithSalt` timRemoteUserGet_args_tid record `H.hashWithSalt` timRemoteUserGet_args_auth record -instance QC.Arbitrary TimRemoteUserGet_args where - arbitrary = M.liftM TimRemoteUserGet_args (QC.arbitrary) - `M.ap`(QC.arbitrary) - shrink obj | obj == default_TimRemoteUserGet_args = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimRemoteUserGet_args{timRemoteUserGet_args_tid = timRemoteUserGet_args_tid obj} then P.Nothing else P.Just $ default_TimRemoteUserGet_args{timRemoteUserGet_args_tid = timRemoteUserGet_args_tid obj} - , if obj == default_TimRemoteUserGet_args{timRemoteUserGet_args_auth = timRemoteUserGet_args_auth obj} then P.Nothing else P.Just $ default_TimRemoteUserGet_args{timRemoteUserGet_args_auth = timRemoteUserGet_args_auth obj} - ] -from_TimRemoteUserGet_args :: TimRemoteUserGet_args -> T.ThriftVal -from_TimRemoteUserGet_args record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v637 -> P.Just (1, ("tid",from_Tid _v637))) $ timRemoteUserGet_args_tid record - , (\_v637 -> P.Just (2, ("auth",from_TimAuth _v637))) $ timRemoteUserGet_args_auth record - ] -write_TimRemoteUserGet_args :: (T.Protocol p, T.Transport t) => p t -> TimRemoteUserGet_args -> P.IO () -write_TimRemoteUserGet_args oprot record = T.writeVal oprot $ from_TimRemoteUserGet_args record -encode_TimRemoteUserGet_args :: (T.Protocol p, T.Transport t) => p t -> TimRemoteUserGet_args -> LBS.ByteString -encode_TimRemoteUserGet_args oprot record = T.serializeVal oprot $ from_TimRemoteUserGet_args record -to_TimRemoteUserGet_args :: T.ThriftVal -> TimRemoteUserGet_args -to_TimRemoteUserGet_args (T.TStruct fields) = TimRemoteUserGet_args{ - timRemoteUserGet_args_tid = P.maybe (timRemoteUserGet_args_tid default_TimRemoteUserGet_args) (\(_,_val639) -> (case _val639 of {T.TStruct _val640 -> (to_Tid (T.TStruct _val640)); _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timRemoteUserGet_args_auth = P.maybe (timRemoteUserGet_args_auth default_TimRemoteUserGet_args) (\(_,_val639) -> (case _val639 of {T.TStruct _val641 -> (to_TimAuth (T.TStruct _val641)); _ -> P.error "wrong type"})) (Map.lookup (2) fields) - } -to_TimRemoteUserGet_args _ = P.error "not a struct" -read_TimRemoteUserGet_args :: (T.Transport t, T.Protocol p) => p t -> P.IO TimRemoteUserGet_args -read_TimRemoteUserGet_args iprot = to_TimRemoteUserGet_args <$> T.readVal iprot (T.T_STRUCT typemap_TimRemoteUserGet_args) -decode_TimRemoteUserGet_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimRemoteUserGet_args -decode_TimRemoteUserGet_args iprot bs = to_TimRemoteUserGet_args $ T.deserializeVal iprot (T.T_STRUCT typemap_TimRemoteUserGet_args) bs -typemap_TimRemoteUserGet_args :: T.TypeMap -typemap_TimRemoteUserGet_args = Map.fromList [(1,("tid",(T.T_STRUCT typemap_Tid))),(2,("auth",(T.T_STRUCT typemap_TimAuth)))] -default_TimRemoteUserGet_args :: TimRemoteUserGet_args -default_TimRemoteUserGet_args = TimRemoteUserGet_args{ - timRemoteUserGet_args_tid = default_Tid, - timRemoteUserGet_args_auth = default_TimAuth} -data TimRemoteUserGet_result = TimRemoteUserGet_result { timRemoteUserGet_result_success :: TimRemoteUserBean - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimRemoteUserGet_result where - hashWithSalt salt record = salt `H.hashWithSalt` timRemoteUserGet_result_success record -instance QC.Arbitrary TimRemoteUserGet_result where - arbitrary = M.liftM TimRemoteUserGet_result (QC.arbitrary) - shrink obj | obj == default_TimRemoteUserGet_result = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimRemoteUserGet_result{timRemoteUserGet_result_success = timRemoteUserGet_result_success obj} then P.Nothing else P.Just $ default_TimRemoteUserGet_result{timRemoteUserGet_result_success = timRemoteUserGet_result_success obj} - ] -from_TimRemoteUserGet_result :: TimRemoteUserGet_result -> T.ThriftVal -from_TimRemoteUserGet_result record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v644 -> P.Just (0, ("success",from_TimRemoteUserBean _v644))) $ timRemoteUserGet_result_success record - ] -write_TimRemoteUserGet_result :: (T.Protocol p, T.Transport t) => p t -> TimRemoteUserGet_result -> P.IO () -write_TimRemoteUserGet_result oprot record = T.writeVal oprot $ from_TimRemoteUserGet_result record -encode_TimRemoteUserGet_result :: (T.Protocol p, T.Transport t) => p t -> TimRemoteUserGet_result -> LBS.ByteString -encode_TimRemoteUserGet_result oprot record = T.serializeVal oprot $ from_TimRemoteUserGet_result record -to_TimRemoteUserGet_result :: T.ThriftVal -> TimRemoteUserGet_result -to_TimRemoteUserGet_result (T.TStruct fields) = TimRemoteUserGet_result{ - timRemoteUserGet_result_success = P.maybe (timRemoteUserGet_result_success default_TimRemoteUserGet_result) (\(_,_val646) -> (case _val646 of {T.TStruct _val647 -> (to_TimRemoteUserBean (T.TStruct _val647)); _ -> P.error "wrong type"})) (Map.lookup (0) fields) - } -to_TimRemoteUserGet_result _ = P.error "not a struct" -read_TimRemoteUserGet_result :: (T.Transport t, T.Protocol p) => p t -> P.IO TimRemoteUserGet_result -read_TimRemoteUserGet_result iprot = to_TimRemoteUserGet_result <$> T.readVal iprot (T.T_STRUCT typemap_TimRemoteUserGet_result) -decode_TimRemoteUserGet_result :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimRemoteUserGet_result -decode_TimRemoteUserGet_result iprot bs = to_TimRemoteUserGet_result $ T.deserializeVal iprot (T.T_STRUCT typemap_TimRemoteUserGet_result) bs -typemap_TimRemoteUserGet_result :: T.TypeMap -typemap_TimRemoteUserGet_result = Map.fromList [(0,("success",(T.T_STRUCT typemap_TimRemoteUserBean)))] -default_TimRemoteUserGet_result :: TimRemoteUserGet_result -default_TimRemoteUserGet_result = TimRemoteUserGet_result{ - timRemoteUserGet_result_success = default_TimRemoteUserBean} -data TimRemoteUserEdit_args = TimRemoteUserEdit_args { timRemoteUserEdit_args_tid :: Tid - , timRemoteUserEdit_args_ub :: TimUserBean - , timRemoteUserEdit_args_auth :: TimAuth - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimRemoteUserEdit_args where - hashWithSalt salt record = salt `H.hashWithSalt` timRemoteUserEdit_args_tid record `H.hashWithSalt` timRemoteUserEdit_args_ub record `H.hashWithSalt` timRemoteUserEdit_args_auth record -instance QC.Arbitrary TimRemoteUserEdit_args where - arbitrary = M.liftM TimRemoteUserEdit_args (QC.arbitrary) - `M.ap`(QC.arbitrary) - `M.ap`(QC.arbitrary) - shrink obj | obj == default_TimRemoteUserEdit_args = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimRemoteUserEdit_args{timRemoteUserEdit_args_tid = timRemoteUserEdit_args_tid obj} then P.Nothing else P.Just $ default_TimRemoteUserEdit_args{timRemoteUserEdit_args_tid = timRemoteUserEdit_args_tid obj} - , if obj == default_TimRemoteUserEdit_args{timRemoteUserEdit_args_ub = timRemoteUserEdit_args_ub obj} then P.Nothing else P.Just $ default_TimRemoteUserEdit_args{timRemoteUserEdit_args_ub = timRemoteUserEdit_args_ub obj} - , if obj == default_TimRemoteUserEdit_args{timRemoteUserEdit_args_auth = timRemoteUserEdit_args_auth obj} then P.Nothing else P.Just $ default_TimRemoteUserEdit_args{timRemoteUserEdit_args_auth = timRemoteUserEdit_args_auth obj} - ] -from_TimRemoteUserEdit_args :: TimRemoteUserEdit_args -> T.ThriftVal -from_TimRemoteUserEdit_args record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v650 -> P.Just (1, ("tid",from_Tid _v650))) $ timRemoteUserEdit_args_tid record - , (\_v650 -> P.Just (2, ("ub",from_TimUserBean _v650))) $ timRemoteUserEdit_args_ub record - , (\_v650 -> P.Just (3, ("auth",from_TimAuth _v650))) $ timRemoteUserEdit_args_auth record - ] -write_TimRemoteUserEdit_args :: (T.Protocol p, T.Transport t) => p t -> TimRemoteUserEdit_args -> P.IO () -write_TimRemoteUserEdit_args oprot record = T.writeVal oprot $ from_TimRemoteUserEdit_args record -encode_TimRemoteUserEdit_args :: (T.Protocol p, T.Transport t) => p t -> TimRemoteUserEdit_args -> LBS.ByteString -encode_TimRemoteUserEdit_args oprot record = T.serializeVal oprot $ from_TimRemoteUserEdit_args record -to_TimRemoteUserEdit_args :: T.ThriftVal -> TimRemoteUserEdit_args -to_TimRemoteUserEdit_args (T.TStruct fields) = TimRemoteUserEdit_args{ - timRemoteUserEdit_args_tid = P.maybe (timRemoteUserEdit_args_tid default_TimRemoteUserEdit_args) (\(_,_val652) -> (case _val652 of {T.TStruct _val653 -> (to_Tid (T.TStruct _val653)); _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timRemoteUserEdit_args_ub = P.maybe (timRemoteUserEdit_args_ub default_TimRemoteUserEdit_args) (\(_,_val652) -> (case _val652 of {T.TStruct _val654 -> (to_TimUserBean (T.TStruct _val654)); _ -> P.error "wrong type"})) (Map.lookup (2) fields), - timRemoteUserEdit_args_auth = P.maybe (timRemoteUserEdit_args_auth default_TimRemoteUserEdit_args) (\(_,_val652) -> (case _val652 of {T.TStruct _val655 -> (to_TimAuth (T.TStruct _val655)); _ -> P.error "wrong type"})) (Map.lookup (3) fields) - } -to_TimRemoteUserEdit_args _ = P.error "not a struct" -read_TimRemoteUserEdit_args :: (T.Transport t, T.Protocol p) => p t -> P.IO TimRemoteUserEdit_args -read_TimRemoteUserEdit_args iprot = to_TimRemoteUserEdit_args <$> T.readVal iprot (T.T_STRUCT typemap_TimRemoteUserEdit_args) -decode_TimRemoteUserEdit_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimRemoteUserEdit_args -decode_TimRemoteUserEdit_args iprot bs = to_TimRemoteUserEdit_args $ T.deserializeVal iprot (T.T_STRUCT typemap_TimRemoteUserEdit_args) bs -typemap_TimRemoteUserEdit_args :: T.TypeMap -typemap_TimRemoteUserEdit_args = Map.fromList [(1,("tid",(T.T_STRUCT typemap_Tid))),(2,("ub",(T.T_STRUCT typemap_TimUserBean))),(3,("auth",(T.T_STRUCT typemap_TimAuth)))] -default_TimRemoteUserEdit_args :: TimRemoteUserEdit_args -default_TimRemoteUserEdit_args = TimRemoteUserEdit_args{ - timRemoteUserEdit_args_tid = default_Tid, - timRemoteUserEdit_args_ub = default_TimUserBean, - timRemoteUserEdit_args_auth = default_TimAuth} -data TimRemoteUserEdit_result = TimRemoteUserEdit_result { timRemoteUserEdit_result_success :: TimRemoteUserBean - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimRemoteUserEdit_result where - hashWithSalt salt record = salt `H.hashWithSalt` timRemoteUserEdit_result_success record -instance QC.Arbitrary TimRemoteUserEdit_result where - arbitrary = M.liftM TimRemoteUserEdit_result (QC.arbitrary) - shrink obj | obj == default_TimRemoteUserEdit_result = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimRemoteUserEdit_result{timRemoteUserEdit_result_success = timRemoteUserEdit_result_success obj} then P.Nothing else P.Just $ default_TimRemoteUserEdit_result{timRemoteUserEdit_result_success = timRemoteUserEdit_result_success obj} - ] -from_TimRemoteUserEdit_result :: TimRemoteUserEdit_result -> T.ThriftVal -from_TimRemoteUserEdit_result record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v658 -> P.Just (0, ("success",from_TimRemoteUserBean _v658))) $ timRemoteUserEdit_result_success record - ] -write_TimRemoteUserEdit_result :: (T.Protocol p, T.Transport t) => p t -> TimRemoteUserEdit_result -> P.IO () -write_TimRemoteUserEdit_result oprot record = T.writeVal oprot $ from_TimRemoteUserEdit_result record -encode_TimRemoteUserEdit_result :: (T.Protocol p, T.Transport t) => p t -> TimRemoteUserEdit_result -> LBS.ByteString -encode_TimRemoteUserEdit_result oprot record = T.serializeVal oprot $ from_TimRemoteUserEdit_result record -to_TimRemoteUserEdit_result :: T.ThriftVal -> TimRemoteUserEdit_result -to_TimRemoteUserEdit_result (T.TStruct fields) = TimRemoteUserEdit_result{ - timRemoteUserEdit_result_success = P.maybe (timRemoteUserEdit_result_success default_TimRemoteUserEdit_result) (\(_,_val660) -> (case _val660 of {T.TStruct _val661 -> (to_TimRemoteUserBean (T.TStruct _val661)); _ -> P.error "wrong type"})) (Map.lookup (0) fields) - } -to_TimRemoteUserEdit_result _ = P.error "not a struct" -read_TimRemoteUserEdit_result :: (T.Transport t, T.Protocol p) => p t -> P.IO TimRemoteUserEdit_result -read_TimRemoteUserEdit_result iprot = to_TimRemoteUserEdit_result <$> T.readVal iprot (T.T_STRUCT typemap_TimRemoteUserEdit_result) -decode_TimRemoteUserEdit_result :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimRemoteUserEdit_result -decode_TimRemoteUserEdit_result iprot bs = to_TimRemoteUserEdit_result $ T.deserializeVal iprot (T.T_STRUCT typemap_TimRemoteUserEdit_result) bs -typemap_TimRemoteUserEdit_result :: T.TypeMap -typemap_TimRemoteUserEdit_result = Map.fromList [(0,("success",(T.T_STRUCT typemap_TimRemoteUserBean)))] -default_TimRemoteUserEdit_result :: TimRemoteUserEdit_result -default_TimRemoteUserEdit_result = TimRemoteUserEdit_result{ - timRemoteUserEdit_result_success = default_TimRemoteUserBean} -data TimResponsePresence_args = TimResponsePresence_args { timResponsePresence_args_pbean :: TimPBean - , timResponsePresence_args_auth :: TimAuth - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimResponsePresence_args where - hashWithSalt salt record = salt `H.hashWithSalt` timResponsePresence_args_pbean record `H.hashWithSalt` timResponsePresence_args_auth record -instance QC.Arbitrary TimResponsePresence_args where - arbitrary = M.liftM TimResponsePresence_args (QC.arbitrary) - `M.ap`(QC.arbitrary) - shrink obj | obj == default_TimResponsePresence_args = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimResponsePresence_args{timResponsePresence_args_pbean = timResponsePresence_args_pbean obj} then P.Nothing else P.Just $ default_TimResponsePresence_args{timResponsePresence_args_pbean = timResponsePresence_args_pbean obj} - , if obj == default_TimResponsePresence_args{timResponsePresence_args_auth = timResponsePresence_args_auth obj} then P.Nothing else P.Just $ default_TimResponsePresence_args{timResponsePresence_args_auth = timResponsePresence_args_auth obj} - ] -from_TimResponsePresence_args :: TimResponsePresence_args -> T.ThriftVal -from_TimResponsePresence_args record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v664 -> P.Just (1, ("pbean",from_TimPBean _v664))) $ timResponsePresence_args_pbean record - , (\_v664 -> P.Just (2, ("auth",from_TimAuth _v664))) $ timResponsePresence_args_auth record - ] -write_TimResponsePresence_args :: (T.Protocol p, T.Transport t) => p t -> TimResponsePresence_args -> P.IO () -write_TimResponsePresence_args oprot record = T.writeVal oprot $ from_TimResponsePresence_args record -encode_TimResponsePresence_args :: (T.Protocol p, T.Transport t) => p t -> TimResponsePresence_args -> LBS.ByteString -encode_TimResponsePresence_args oprot record = T.serializeVal oprot $ from_TimResponsePresence_args record -to_TimResponsePresence_args :: T.ThriftVal -> TimResponsePresence_args -to_TimResponsePresence_args (T.TStruct fields) = TimResponsePresence_args{ - timResponsePresence_args_pbean = P.maybe (timResponsePresence_args_pbean default_TimResponsePresence_args) (\(_,_val666) -> (case _val666 of {T.TStruct _val667 -> (to_TimPBean (T.TStruct _val667)); _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timResponsePresence_args_auth = P.maybe (timResponsePresence_args_auth default_TimResponsePresence_args) (\(_,_val666) -> (case _val666 of {T.TStruct _val668 -> (to_TimAuth (T.TStruct _val668)); _ -> P.error "wrong type"})) (Map.lookup (2) fields) - } -to_TimResponsePresence_args _ = P.error "not a struct" -read_TimResponsePresence_args :: (T.Transport t, T.Protocol p) => p t -> P.IO TimResponsePresence_args -read_TimResponsePresence_args iprot = to_TimResponsePresence_args <$> T.readVal iprot (T.T_STRUCT typemap_TimResponsePresence_args) -decode_TimResponsePresence_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimResponsePresence_args -decode_TimResponsePresence_args iprot bs = to_TimResponsePresence_args $ T.deserializeVal iprot (T.T_STRUCT typemap_TimResponsePresence_args) bs -typemap_TimResponsePresence_args :: T.TypeMap -typemap_TimResponsePresence_args = Map.fromList [(1,("pbean",(T.T_STRUCT typemap_TimPBean))),(2,("auth",(T.T_STRUCT typemap_TimAuth)))] -default_TimResponsePresence_args :: TimResponsePresence_args -default_TimResponsePresence_args = TimResponsePresence_args{ - timResponsePresence_args_pbean = default_TimPBean, - timResponsePresence_args_auth = default_TimAuth} -data TimResponsePresence_result = TimResponsePresence_result { timResponsePresence_result_success :: TimResponseBean - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimResponsePresence_result where - hashWithSalt salt record = salt `H.hashWithSalt` timResponsePresence_result_success record -instance QC.Arbitrary TimResponsePresence_result where - arbitrary = M.liftM TimResponsePresence_result (QC.arbitrary) - shrink obj | obj == default_TimResponsePresence_result = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimResponsePresence_result{timResponsePresence_result_success = timResponsePresence_result_success obj} then P.Nothing else P.Just $ default_TimResponsePresence_result{timResponsePresence_result_success = timResponsePresence_result_success obj} - ] -from_TimResponsePresence_result :: TimResponsePresence_result -> T.ThriftVal -from_TimResponsePresence_result record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v671 -> P.Just (0, ("success",from_TimResponseBean _v671))) $ timResponsePresence_result_success record - ] -write_TimResponsePresence_result :: (T.Protocol p, T.Transport t) => p t -> TimResponsePresence_result -> P.IO () -write_TimResponsePresence_result oprot record = T.writeVal oprot $ from_TimResponsePresence_result record -encode_TimResponsePresence_result :: (T.Protocol p, T.Transport t) => p t -> TimResponsePresence_result -> LBS.ByteString -encode_TimResponsePresence_result oprot record = T.serializeVal oprot $ from_TimResponsePresence_result record -to_TimResponsePresence_result :: T.ThriftVal -> TimResponsePresence_result -to_TimResponsePresence_result (T.TStruct fields) = TimResponsePresence_result{ - timResponsePresence_result_success = P.maybe (timResponsePresence_result_success default_TimResponsePresence_result) (\(_,_val673) -> (case _val673 of {T.TStruct _val674 -> (to_TimResponseBean (T.TStruct _val674)); _ -> P.error "wrong type"})) (Map.lookup (0) fields) - } -to_TimResponsePresence_result _ = P.error "not a struct" -read_TimResponsePresence_result :: (T.Transport t, T.Protocol p) => p t -> P.IO TimResponsePresence_result -read_TimResponsePresence_result iprot = to_TimResponsePresence_result <$> T.readVal iprot (T.T_STRUCT typemap_TimResponsePresence_result) -decode_TimResponsePresence_result :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimResponsePresence_result -decode_TimResponsePresence_result iprot bs = to_TimResponsePresence_result $ T.deserializeVal iprot (T.T_STRUCT typemap_TimResponsePresence_result) bs -typemap_TimResponsePresence_result :: T.TypeMap -typemap_TimResponsePresence_result = Map.fromList [(0,("success",(T.T_STRUCT typemap_TimResponseBean)))] -default_TimResponsePresence_result :: TimResponsePresence_result -default_TimResponsePresence_result = TimResponsePresence_result{ - timResponsePresence_result_success = default_TimResponseBean} -data TimResponseMessage_args = TimResponseMessage_args { timResponseMessage_args_mbean :: TimMBean - , timResponseMessage_args_auth :: TimAuth - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimResponseMessage_args where - hashWithSalt salt record = salt `H.hashWithSalt` timResponseMessage_args_mbean record `H.hashWithSalt` timResponseMessage_args_auth record -instance QC.Arbitrary TimResponseMessage_args where - arbitrary = M.liftM TimResponseMessage_args (QC.arbitrary) - `M.ap`(QC.arbitrary) - shrink obj | obj == default_TimResponseMessage_args = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimResponseMessage_args{timResponseMessage_args_mbean = timResponseMessage_args_mbean obj} then P.Nothing else P.Just $ default_TimResponseMessage_args{timResponseMessage_args_mbean = timResponseMessage_args_mbean obj} - , if obj == default_TimResponseMessage_args{timResponseMessage_args_auth = timResponseMessage_args_auth obj} then P.Nothing else P.Just $ default_TimResponseMessage_args{timResponseMessage_args_auth = timResponseMessage_args_auth obj} - ] -from_TimResponseMessage_args :: TimResponseMessage_args -> T.ThriftVal -from_TimResponseMessage_args record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v677 -> P.Just (1, ("mbean",from_TimMBean _v677))) $ timResponseMessage_args_mbean record - , (\_v677 -> P.Just (2, ("auth",from_TimAuth _v677))) $ timResponseMessage_args_auth record - ] -write_TimResponseMessage_args :: (T.Protocol p, T.Transport t) => p t -> TimResponseMessage_args -> P.IO () -write_TimResponseMessage_args oprot record = T.writeVal oprot $ from_TimResponseMessage_args record -encode_TimResponseMessage_args :: (T.Protocol p, T.Transport t) => p t -> TimResponseMessage_args -> LBS.ByteString -encode_TimResponseMessage_args oprot record = T.serializeVal oprot $ from_TimResponseMessage_args record -to_TimResponseMessage_args :: T.ThriftVal -> TimResponseMessage_args -to_TimResponseMessage_args (T.TStruct fields) = TimResponseMessage_args{ - timResponseMessage_args_mbean = P.maybe (timResponseMessage_args_mbean default_TimResponseMessage_args) (\(_,_val679) -> (case _val679 of {T.TStruct _val680 -> (to_TimMBean (T.TStruct _val680)); _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timResponseMessage_args_auth = P.maybe (timResponseMessage_args_auth default_TimResponseMessage_args) (\(_,_val679) -> (case _val679 of {T.TStruct _val681 -> (to_TimAuth (T.TStruct _val681)); _ -> P.error "wrong type"})) (Map.lookup (2) fields) - } -to_TimResponseMessage_args _ = P.error "not a struct" -read_TimResponseMessage_args :: (T.Transport t, T.Protocol p) => p t -> P.IO TimResponseMessage_args -read_TimResponseMessage_args iprot = to_TimResponseMessage_args <$> T.readVal iprot (T.T_STRUCT typemap_TimResponseMessage_args) -decode_TimResponseMessage_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimResponseMessage_args -decode_TimResponseMessage_args iprot bs = to_TimResponseMessage_args $ T.deserializeVal iprot (T.T_STRUCT typemap_TimResponseMessage_args) bs -typemap_TimResponseMessage_args :: T.TypeMap -typemap_TimResponseMessage_args = Map.fromList [(1,("mbean",(T.T_STRUCT typemap_TimMBean))),(2,("auth",(T.T_STRUCT typemap_TimAuth)))] -default_TimResponseMessage_args :: TimResponseMessage_args -default_TimResponseMessage_args = TimResponseMessage_args{ - timResponseMessage_args_mbean = default_TimMBean, - timResponseMessage_args_auth = default_TimAuth} -data TimResponseMessage_result = TimResponseMessage_result { timResponseMessage_result_success :: TimResponseBean - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimResponseMessage_result where - hashWithSalt salt record = salt `H.hashWithSalt` timResponseMessage_result_success record -instance QC.Arbitrary TimResponseMessage_result where - arbitrary = M.liftM TimResponseMessage_result (QC.arbitrary) - shrink obj | obj == default_TimResponseMessage_result = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimResponseMessage_result{timResponseMessage_result_success = timResponseMessage_result_success obj} then P.Nothing else P.Just $ default_TimResponseMessage_result{timResponseMessage_result_success = timResponseMessage_result_success obj} - ] -from_TimResponseMessage_result :: TimResponseMessage_result -> T.ThriftVal -from_TimResponseMessage_result record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v684 -> P.Just (0, ("success",from_TimResponseBean _v684))) $ timResponseMessage_result_success record - ] -write_TimResponseMessage_result :: (T.Protocol p, T.Transport t) => p t -> TimResponseMessage_result -> P.IO () -write_TimResponseMessage_result oprot record = T.writeVal oprot $ from_TimResponseMessage_result record -encode_TimResponseMessage_result :: (T.Protocol p, T.Transport t) => p t -> TimResponseMessage_result -> LBS.ByteString -encode_TimResponseMessage_result oprot record = T.serializeVal oprot $ from_TimResponseMessage_result record -to_TimResponseMessage_result :: T.ThriftVal -> TimResponseMessage_result -to_TimResponseMessage_result (T.TStruct fields) = TimResponseMessage_result{ - timResponseMessage_result_success = P.maybe (timResponseMessage_result_success default_TimResponseMessage_result) (\(_,_val686) -> (case _val686 of {T.TStruct _val687 -> (to_TimResponseBean (T.TStruct _val687)); _ -> P.error "wrong type"})) (Map.lookup (0) fields) - } -to_TimResponseMessage_result _ = P.error "not a struct" -read_TimResponseMessage_result :: (T.Transport t, T.Protocol p) => p t -> P.IO TimResponseMessage_result -read_TimResponseMessage_result iprot = to_TimResponseMessage_result <$> T.readVal iprot (T.T_STRUCT typemap_TimResponseMessage_result) -decode_TimResponseMessage_result :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimResponseMessage_result -decode_TimResponseMessage_result iprot bs = to_TimResponseMessage_result $ T.deserializeVal iprot (T.T_STRUCT typemap_TimResponseMessage_result) bs -typemap_TimResponseMessage_result :: T.TypeMap -typemap_TimResponseMessage_result = Map.fromList [(0,("success",(T.T_STRUCT typemap_TimResponseBean)))] -default_TimResponseMessage_result :: TimResponseMessage_result -default_TimResponseMessage_result = TimResponseMessage_result{ - timResponseMessage_result_success = default_TimResponseBean} -data TimResponseMessageIq_args = TimResponseMessageIq_args { timResponseMessageIq_args_timMsgIq :: TimMessageIq - , timResponseMessageIq_args_iqType :: LT.Text - , timResponseMessageIq_args_auth :: TimAuth - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimResponseMessageIq_args where - hashWithSalt salt record = salt `H.hashWithSalt` timResponseMessageIq_args_timMsgIq record `H.hashWithSalt` timResponseMessageIq_args_iqType record `H.hashWithSalt` timResponseMessageIq_args_auth record -instance QC.Arbitrary TimResponseMessageIq_args where - arbitrary = M.liftM TimResponseMessageIq_args (QC.arbitrary) - `M.ap`(QC.arbitrary) - `M.ap`(QC.arbitrary) - shrink obj | obj == default_TimResponseMessageIq_args = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimResponseMessageIq_args{timResponseMessageIq_args_timMsgIq = timResponseMessageIq_args_timMsgIq obj} then P.Nothing else P.Just $ default_TimResponseMessageIq_args{timResponseMessageIq_args_timMsgIq = timResponseMessageIq_args_timMsgIq obj} - , if obj == default_TimResponseMessageIq_args{timResponseMessageIq_args_iqType = timResponseMessageIq_args_iqType obj} then P.Nothing else P.Just $ default_TimResponseMessageIq_args{timResponseMessageIq_args_iqType = timResponseMessageIq_args_iqType obj} - , if obj == default_TimResponseMessageIq_args{timResponseMessageIq_args_auth = timResponseMessageIq_args_auth obj} then P.Nothing else P.Just $ default_TimResponseMessageIq_args{timResponseMessageIq_args_auth = timResponseMessageIq_args_auth obj} - ] -from_TimResponseMessageIq_args :: TimResponseMessageIq_args -> T.ThriftVal -from_TimResponseMessageIq_args record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v690 -> P.Just (1, ("timMsgIq",from_TimMessageIq _v690))) $ timResponseMessageIq_args_timMsgIq record - , (\_v690 -> P.Just (2, ("iqType",T.TString $ E.encodeUtf8 _v690))) $ timResponseMessageIq_args_iqType record - , (\_v690 -> P.Just (3, ("auth",from_TimAuth _v690))) $ timResponseMessageIq_args_auth record - ] -write_TimResponseMessageIq_args :: (T.Protocol p, T.Transport t) => p t -> TimResponseMessageIq_args -> P.IO () -write_TimResponseMessageIq_args oprot record = T.writeVal oprot $ from_TimResponseMessageIq_args record -encode_TimResponseMessageIq_args :: (T.Protocol p, T.Transport t) => p t -> TimResponseMessageIq_args -> LBS.ByteString -encode_TimResponseMessageIq_args oprot record = T.serializeVal oprot $ from_TimResponseMessageIq_args record -to_TimResponseMessageIq_args :: T.ThriftVal -> TimResponseMessageIq_args -to_TimResponseMessageIq_args (T.TStruct fields) = TimResponseMessageIq_args{ - timResponseMessageIq_args_timMsgIq = P.maybe (timResponseMessageIq_args_timMsgIq default_TimResponseMessageIq_args) (\(_,_val692) -> (case _val692 of {T.TStruct _val693 -> (to_TimMessageIq (T.TStruct _val693)); _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timResponseMessageIq_args_iqType = P.maybe (timResponseMessageIq_args_iqType default_TimResponseMessageIq_args) (\(_,_val692) -> (case _val692 of {T.TString _val694 -> E.decodeUtf8 _val694; _ -> P.error "wrong type"})) (Map.lookup (2) fields), - timResponseMessageIq_args_auth = P.maybe (timResponseMessageIq_args_auth default_TimResponseMessageIq_args) (\(_,_val692) -> (case _val692 of {T.TStruct _val695 -> (to_TimAuth (T.TStruct _val695)); _ -> P.error "wrong type"})) (Map.lookup (3) fields) - } -to_TimResponseMessageIq_args _ = P.error "not a struct" -read_TimResponseMessageIq_args :: (T.Transport t, T.Protocol p) => p t -> P.IO TimResponseMessageIq_args -read_TimResponseMessageIq_args iprot = to_TimResponseMessageIq_args <$> T.readVal iprot (T.T_STRUCT typemap_TimResponseMessageIq_args) -decode_TimResponseMessageIq_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimResponseMessageIq_args -decode_TimResponseMessageIq_args iprot bs = to_TimResponseMessageIq_args $ T.deserializeVal iprot (T.T_STRUCT typemap_TimResponseMessageIq_args) bs -typemap_TimResponseMessageIq_args :: T.TypeMap -typemap_TimResponseMessageIq_args = Map.fromList [(1,("timMsgIq",(T.T_STRUCT typemap_TimMessageIq))),(2,("iqType",T.T_STRING)),(3,("auth",(T.T_STRUCT typemap_TimAuth)))] -default_TimResponseMessageIq_args :: TimResponseMessageIq_args -default_TimResponseMessageIq_args = TimResponseMessageIq_args{ - timResponseMessageIq_args_timMsgIq = default_TimMessageIq, - timResponseMessageIq_args_iqType = "", - timResponseMessageIq_args_auth = default_TimAuth} -data TimResponseMessageIq_result = TimResponseMessageIq_result { timResponseMessageIq_result_success :: TimMBeanList - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimResponseMessageIq_result where - hashWithSalt salt record = salt `H.hashWithSalt` timResponseMessageIq_result_success record -instance QC.Arbitrary TimResponseMessageIq_result where - arbitrary = M.liftM TimResponseMessageIq_result (QC.arbitrary) - shrink obj | obj == default_TimResponseMessageIq_result = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimResponseMessageIq_result{timResponseMessageIq_result_success = timResponseMessageIq_result_success obj} then P.Nothing else P.Just $ default_TimResponseMessageIq_result{timResponseMessageIq_result_success = timResponseMessageIq_result_success obj} - ] -from_TimResponseMessageIq_result :: TimResponseMessageIq_result -> T.ThriftVal -from_TimResponseMessageIq_result record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v698 -> P.Just (0, ("success",from_TimMBeanList _v698))) $ timResponseMessageIq_result_success record - ] -write_TimResponseMessageIq_result :: (T.Protocol p, T.Transport t) => p t -> TimResponseMessageIq_result -> P.IO () -write_TimResponseMessageIq_result oprot record = T.writeVal oprot $ from_TimResponseMessageIq_result record -encode_TimResponseMessageIq_result :: (T.Protocol p, T.Transport t) => p t -> TimResponseMessageIq_result -> LBS.ByteString -encode_TimResponseMessageIq_result oprot record = T.serializeVal oprot $ from_TimResponseMessageIq_result record -to_TimResponseMessageIq_result :: T.ThriftVal -> TimResponseMessageIq_result -to_TimResponseMessageIq_result (T.TStruct fields) = TimResponseMessageIq_result{ - timResponseMessageIq_result_success = P.maybe (timResponseMessageIq_result_success default_TimResponseMessageIq_result) (\(_,_val700) -> (case _val700 of {T.TStruct _val701 -> (to_TimMBeanList (T.TStruct _val701)); _ -> P.error "wrong type"})) (Map.lookup (0) fields) - } -to_TimResponseMessageIq_result _ = P.error "not a struct" -read_TimResponseMessageIq_result :: (T.Transport t, T.Protocol p) => p t -> P.IO TimResponseMessageIq_result -read_TimResponseMessageIq_result iprot = to_TimResponseMessageIq_result <$> T.readVal iprot (T.T_STRUCT typemap_TimResponseMessageIq_result) -decode_TimResponseMessageIq_result :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimResponseMessageIq_result -decode_TimResponseMessageIq_result iprot bs = to_TimResponseMessageIq_result $ T.deserializeVal iprot (T.T_STRUCT typemap_TimResponseMessageIq_result) bs -typemap_TimResponseMessageIq_result :: T.TypeMap -typemap_TimResponseMessageIq_result = Map.fromList [(0,("success",(T.T_STRUCT typemap_TimMBeanList)))] -default_TimResponseMessageIq_result :: TimResponseMessageIq_result -default_TimResponseMessageIq_result = TimResponseMessageIq_result{ - timResponseMessageIq_result_success = default_TimMBeanList} -data TimResponsePresenceList_args = TimResponsePresenceList_args { timResponsePresenceList_args_pbeanList :: TimPBeanList - , timResponsePresenceList_args_auth :: TimAuth - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimResponsePresenceList_args where - hashWithSalt salt record = salt `H.hashWithSalt` timResponsePresenceList_args_pbeanList record `H.hashWithSalt` timResponsePresenceList_args_auth record -instance QC.Arbitrary TimResponsePresenceList_args where - arbitrary = M.liftM TimResponsePresenceList_args (QC.arbitrary) - `M.ap`(QC.arbitrary) - shrink obj | obj == default_TimResponsePresenceList_args = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimResponsePresenceList_args{timResponsePresenceList_args_pbeanList = timResponsePresenceList_args_pbeanList obj} then P.Nothing else P.Just $ default_TimResponsePresenceList_args{timResponsePresenceList_args_pbeanList = timResponsePresenceList_args_pbeanList obj} - , if obj == default_TimResponsePresenceList_args{timResponsePresenceList_args_auth = timResponsePresenceList_args_auth obj} then P.Nothing else P.Just $ default_TimResponsePresenceList_args{timResponsePresenceList_args_auth = timResponsePresenceList_args_auth obj} - ] -from_TimResponsePresenceList_args :: TimResponsePresenceList_args -> T.ThriftVal -from_TimResponsePresenceList_args record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v704 -> P.Just (1, ("pbeanList",from_TimPBeanList _v704))) $ timResponsePresenceList_args_pbeanList record - , (\_v704 -> P.Just (2, ("auth",from_TimAuth _v704))) $ timResponsePresenceList_args_auth record - ] -write_TimResponsePresenceList_args :: (T.Protocol p, T.Transport t) => p t -> TimResponsePresenceList_args -> P.IO () -write_TimResponsePresenceList_args oprot record = T.writeVal oprot $ from_TimResponsePresenceList_args record -encode_TimResponsePresenceList_args :: (T.Protocol p, T.Transport t) => p t -> TimResponsePresenceList_args -> LBS.ByteString -encode_TimResponsePresenceList_args oprot record = T.serializeVal oprot $ from_TimResponsePresenceList_args record -to_TimResponsePresenceList_args :: T.ThriftVal -> TimResponsePresenceList_args -to_TimResponsePresenceList_args (T.TStruct fields) = TimResponsePresenceList_args{ - timResponsePresenceList_args_pbeanList = P.maybe (timResponsePresenceList_args_pbeanList default_TimResponsePresenceList_args) (\(_,_val706) -> (case _val706 of {T.TStruct _val707 -> (to_TimPBeanList (T.TStruct _val707)); _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timResponsePresenceList_args_auth = P.maybe (timResponsePresenceList_args_auth default_TimResponsePresenceList_args) (\(_,_val706) -> (case _val706 of {T.TStruct _val708 -> (to_TimAuth (T.TStruct _val708)); _ -> P.error "wrong type"})) (Map.lookup (2) fields) - } -to_TimResponsePresenceList_args _ = P.error "not a struct" -read_TimResponsePresenceList_args :: (T.Transport t, T.Protocol p) => p t -> P.IO TimResponsePresenceList_args -read_TimResponsePresenceList_args iprot = to_TimResponsePresenceList_args <$> T.readVal iprot (T.T_STRUCT typemap_TimResponsePresenceList_args) -decode_TimResponsePresenceList_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimResponsePresenceList_args -decode_TimResponsePresenceList_args iprot bs = to_TimResponsePresenceList_args $ T.deserializeVal iprot (T.T_STRUCT typemap_TimResponsePresenceList_args) bs -typemap_TimResponsePresenceList_args :: T.TypeMap -typemap_TimResponsePresenceList_args = Map.fromList [(1,("pbeanList",(T.T_STRUCT typemap_TimPBeanList))),(2,("auth",(T.T_STRUCT typemap_TimAuth)))] -default_TimResponsePresenceList_args :: TimResponsePresenceList_args -default_TimResponsePresenceList_args = TimResponsePresenceList_args{ - timResponsePresenceList_args_pbeanList = default_TimPBeanList, - timResponsePresenceList_args_auth = default_TimAuth} -data TimResponsePresenceList_result = TimResponsePresenceList_result { timResponsePresenceList_result_success :: TimResponseBean - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimResponsePresenceList_result where - hashWithSalt salt record = salt `H.hashWithSalt` timResponsePresenceList_result_success record -instance QC.Arbitrary TimResponsePresenceList_result where - arbitrary = M.liftM TimResponsePresenceList_result (QC.arbitrary) - shrink obj | obj == default_TimResponsePresenceList_result = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimResponsePresenceList_result{timResponsePresenceList_result_success = timResponsePresenceList_result_success obj} then P.Nothing else P.Just $ default_TimResponsePresenceList_result{timResponsePresenceList_result_success = timResponsePresenceList_result_success obj} - ] -from_TimResponsePresenceList_result :: TimResponsePresenceList_result -> T.ThriftVal -from_TimResponsePresenceList_result record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v711 -> P.Just (0, ("success",from_TimResponseBean _v711))) $ timResponsePresenceList_result_success record - ] -write_TimResponsePresenceList_result :: (T.Protocol p, T.Transport t) => p t -> TimResponsePresenceList_result -> P.IO () -write_TimResponsePresenceList_result oprot record = T.writeVal oprot $ from_TimResponsePresenceList_result record -encode_TimResponsePresenceList_result :: (T.Protocol p, T.Transport t) => p t -> TimResponsePresenceList_result -> LBS.ByteString -encode_TimResponsePresenceList_result oprot record = T.serializeVal oprot $ from_TimResponsePresenceList_result record -to_TimResponsePresenceList_result :: T.ThriftVal -> TimResponsePresenceList_result -to_TimResponsePresenceList_result (T.TStruct fields) = TimResponsePresenceList_result{ - timResponsePresenceList_result_success = P.maybe (timResponsePresenceList_result_success default_TimResponsePresenceList_result) (\(_,_val713) -> (case _val713 of {T.TStruct _val714 -> (to_TimResponseBean (T.TStruct _val714)); _ -> P.error "wrong type"})) (Map.lookup (0) fields) - } -to_TimResponsePresenceList_result _ = P.error "not a struct" -read_TimResponsePresenceList_result :: (T.Transport t, T.Protocol p) => p t -> P.IO TimResponsePresenceList_result -read_TimResponsePresenceList_result iprot = to_TimResponsePresenceList_result <$> T.readVal iprot (T.T_STRUCT typemap_TimResponsePresenceList_result) -decode_TimResponsePresenceList_result :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimResponsePresenceList_result -decode_TimResponsePresenceList_result iprot bs = to_TimResponsePresenceList_result $ T.deserializeVal iprot (T.T_STRUCT typemap_TimResponsePresenceList_result) bs -typemap_TimResponsePresenceList_result :: T.TypeMap -typemap_TimResponsePresenceList_result = Map.fromList [(0,("success",(T.T_STRUCT typemap_TimResponseBean)))] -default_TimResponsePresenceList_result :: TimResponsePresenceList_result -default_TimResponsePresenceList_result = TimResponsePresenceList_result{ - timResponsePresenceList_result_success = default_TimResponseBean} -data TimResponseMessageList_args = TimResponseMessageList_args { timResponseMessageList_args_mbeanList :: TimMBeanList - , timResponseMessageList_args_auth :: TimAuth - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimResponseMessageList_args where - hashWithSalt salt record = salt `H.hashWithSalt` timResponseMessageList_args_mbeanList record `H.hashWithSalt` timResponseMessageList_args_auth record -instance QC.Arbitrary TimResponseMessageList_args where - arbitrary = M.liftM TimResponseMessageList_args (QC.arbitrary) - `M.ap`(QC.arbitrary) - shrink obj | obj == default_TimResponseMessageList_args = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimResponseMessageList_args{timResponseMessageList_args_mbeanList = timResponseMessageList_args_mbeanList obj} then P.Nothing else P.Just $ default_TimResponseMessageList_args{timResponseMessageList_args_mbeanList = timResponseMessageList_args_mbeanList obj} - , if obj == default_TimResponseMessageList_args{timResponseMessageList_args_auth = timResponseMessageList_args_auth obj} then P.Nothing else P.Just $ default_TimResponseMessageList_args{timResponseMessageList_args_auth = timResponseMessageList_args_auth obj} - ] -from_TimResponseMessageList_args :: TimResponseMessageList_args -> T.ThriftVal -from_TimResponseMessageList_args record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v717 -> P.Just (1, ("mbeanList",from_TimMBeanList _v717))) $ timResponseMessageList_args_mbeanList record - , (\_v717 -> P.Just (2, ("auth",from_TimAuth _v717))) $ timResponseMessageList_args_auth record - ] -write_TimResponseMessageList_args :: (T.Protocol p, T.Transport t) => p t -> TimResponseMessageList_args -> P.IO () -write_TimResponseMessageList_args oprot record = T.writeVal oprot $ from_TimResponseMessageList_args record -encode_TimResponseMessageList_args :: (T.Protocol p, T.Transport t) => p t -> TimResponseMessageList_args -> LBS.ByteString -encode_TimResponseMessageList_args oprot record = T.serializeVal oprot $ from_TimResponseMessageList_args record -to_TimResponseMessageList_args :: T.ThriftVal -> TimResponseMessageList_args -to_TimResponseMessageList_args (T.TStruct fields) = TimResponseMessageList_args{ - timResponseMessageList_args_mbeanList = P.maybe (timResponseMessageList_args_mbeanList default_TimResponseMessageList_args) (\(_,_val719) -> (case _val719 of {T.TStruct _val720 -> (to_TimMBeanList (T.TStruct _val720)); _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timResponseMessageList_args_auth = P.maybe (timResponseMessageList_args_auth default_TimResponseMessageList_args) (\(_,_val719) -> (case _val719 of {T.TStruct _val721 -> (to_TimAuth (T.TStruct _val721)); _ -> P.error "wrong type"})) (Map.lookup (2) fields) - } -to_TimResponseMessageList_args _ = P.error "not a struct" -read_TimResponseMessageList_args :: (T.Transport t, T.Protocol p) => p t -> P.IO TimResponseMessageList_args -read_TimResponseMessageList_args iprot = to_TimResponseMessageList_args <$> T.readVal iprot (T.T_STRUCT typemap_TimResponseMessageList_args) -decode_TimResponseMessageList_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimResponseMessageList_args -decode_TimResponseMessageList_args iprot bs = to_TimResponseMessageList_args $ T.deserializeVal iprot (T.T_STRUCT typemap_TimResponseMessageList_args) bs -typemap_TimResponseMessageList_args :: T.TypeMap -typemap_TimResponseMessageList_args = Map.fromList [(1,("mbeanList",(T.T_STRUCT typemap_TimMBeanList))),(2,("auth",(T.T_STRUCT typemap_TimAuth)))] -default_TimResponseMessageList_args :: TimResponseMessageList_args -default_TimResponseMessageList_args = TimResponseMessageList_args{ - timResponseMessageList_args_mbeanList = default_TimMBeanList, - timResponseMessageList_args_auth = default_TimAuth} -data TimResponseMessageList_result = TimResponseMessageList_result { timResponseMessageList_result_success :: TimResponseBean - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimResponseMessageList_result where - hashWithSalt salt record = salt `H.hashWithSalt` timResponseMessageList_result_success record -instance QC.Arbitrary TimResponseMessageList_result where - arbitrary = M.liftM TimResponseMessageList_result (QC.arbitrary) - shrink obj | obj == default_TimResponseMessageList_result = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimResponseMessageList_result{timResponseMessageList_result_success = timResponseMessageList_result_success obj} then P.Nothing else P.Just $ default_TimResponseMessageList_result{timResponseMessageList_result_success = timResponseMessageList_result_success obj} - ] -from_TimResponseMessageList_result :: TimResponseMessageList_result -> T.ThriftVal -from_TimResponseMessageList_result record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v724 -> P.Just (0, ("success",from_TimResponseBean _v724))) $ timResponseMessageList_result_success record - ] -write_TimResponseMessageList_result :: (T.Protocol p, T.Transport t) => p t -> TimResponseMessageList_result -> P.IO () -write_TimResponseMessageList_result oprot record = T.writeVal oprot $ from_TimResponseMessageList_result record -encode_TimResponseMessageList_result :: (T.Protocol p, T.Transport t) => p t -> TimResponseMessageList_result -> LBS.ByteString -encode_TimResponseMessageList_result oprot record = T.serializeVal oprot $ from_TimResponseMessageList_result record -to_TimResponseMessageList_result :: T.ThriftVal -> TimResponseMessageList_result -to_TimResponseMessageList_result (T.TStruct fields) = TimResponseMessageList_result{ - timResponseMessageList_result_success = P.maybe (timResponseMessageList_result_success default_TimResponseMessageList_result) (\(_,_val726) -> (case _val726 of {T.TStruct _val727 -> (to_TimResponseBean (T.TStruct _val727)); _ -> P.error "wrong type"})) (Map.lookup (0) fields) - } -to_TimResponseMessageList_result _ = P.error "not a struct" -read_TimResponseMessageList_result :: (T.Transport t, T.Protocol p) => p t -> P.IO TimResponseMessageList_result -read_TimResponseMessageList_result iprot = to_TimResponseMessageList_result <$> T.readVal iprot (T.T_STRUCT typemap_TimResponseMessageList_result) -decode_TimResponseMessageList_result :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimResponseMessageList_result -decode_TimResponseMessageList_result iprot bs = to_TimResponseMessageList_result $ T.deserializeVal iprot (T.T_STRUCT typemap_TimResponseMessageList_result) bs -typemap_TimResponseMessageList_result :: T.TypeMap -typemap_TimResponseMessageList_result = Map.fromList [(0,("success",(T.T_STRUCT typemap_TimResponseBean)))] -default_TimResponseMessageList_result :: TimResponseMessageList_result -default_TimResponseMessageList_result = TimResponseMessageList_result{ - timResponseMessageList_result_success = default_TimResponseBean} -process_timStream (seqid, iprot, oprot, handler) = do - args <- read_TimStream_args iprot - (X.catch - (do - Iface.timStream handler (timStream_args_param args) - P.return ()) - ((\_ -> do - P.return ()) :: X.SomeException -> P.IO ())) -process_timStarttls (seqid, iprot, oprot, handler) = do - args <- read_TimStarttls_args iprot - (X.catch - (do - Iface.timStarttls handler - P.return ()) - ((\_ -> do - P.return ()) :: X.SomeException -> P.IO ())) -process_timLogin (seqid, iprot, oprot, handler) = do - args <- read_TimLogin_args iprot - (X.catch - (do - Iface.timLogin handler (timLogin_args_tid args) (timLogin_args_pwd args) - P.return ()) - ((\_ -> do - P.return ()) :: X.SomeException -> P.IO ())) -process_timAck (seqid, iprot, oprot, handler) = do - args <- read_TimAck_args iprot - (X.catch - (do - Iface.timAck handler (timAck_args_ab args) - P.return ()) - ((\_ -> do - P.return ()) :: X.SomeException -> P.IO ())) -process_timPresence (seqid, iprot, oprot, handler) = do - args <- read_TimPresence_args iprot - (X.catch - (do - Iface.timPresence handler (timPresence_args_pbean args) - P.return ()) - ((\_ -> do - P.return ()) :: X.SomeException -> P.IO ())) -process_timMessage (seqid, iprot, oprot, handler) = do - args <- read_TimMessage_args iprot - (X.catch - (do - Iface.timMessage handler (timMessage_args_mbean args) - P.return ()) - ((\_ -> do - P.return ()) :: X.SomeException -> P.IO ())) -process_timPing (seqid, iprot, oprot, handler) = do - args <- read_TimPing_args iprot - (X.catch - (do - Iface.timPing handler (timPing_args_threadId args) - P.return ()) - ((\_ -> do - P.return ()) :: X.SomeException -> P.IO ())) -process_timError (seqid, iprot, oprot, handler) = do - args <- read_TimError_args iprot - (X.catch - (do - Iface.timError handler (timError_args_e args) - P.return ()) - ((\_ -> do - P.return ()) :: X.SomeException -> P.IO ())) -process_timLogout (seqid, iprot, oprot, handler) = do - args <- read_TimLogout_args iprot - (X.catch - (do - Iface.timLogout handler - P.return ()) - ((\_ -> do - P.return ()) :: X.SomeException -> P.IO ())) -process_timRegist (seqid, iprot, oprot, handler) = do - args <- read_TimRegist_args iprot - (X.catch - (do - Iface.timRegist handler (timRegist_args_tid args) (timRegist_args_auth args) - P.return ()) - ((\_ -> do - P.return ()) :: X.SomeException -> P.IO ())) -process_timRoser (seqid, iprot, oprot, handler) = do - args <- read_TimRoser_args iprot - (X.catch - (do - Iface.timRoser handler (timRoser_args_roster args) - P.return ()) - ((\_ -> do - P.return ()) :: X.SomeException -> P.IO ())) -process_timMessageList (seqid, iprot, oprot, handler) = do - args <- read_TimMessageList_args iprot - (X.catch - (do - Iface.timMessageList handler (timMessageList_args_mbeanList args) - P.return ()) - ((\_ -> do - P.return ()) :: X.SomeException -> P.IO ())) -process_timPresenceList (seqid, iprot, oprot, handler) = do - args <- read_TimPresenceList_args iprot - (X.catch - (do - Iface.timPresenceList handler (timPresenceList_args_pbeanList args) - P.return ()) - ((\_ -> do - P.return ()) :: X.SomeException -> P.IO ())) -process_timMessageIq (seqid, iprot, oprot, handler) = do - args <- read_TimMessageIq_args iprot - (X.catch - (do - Iface.timMessageIq handler (timMessageIq_args_timMsgIq args) (timMessageIq_args_iqType args) - P.return ()) - ((\_ -> do - P.return ()) :: X.SomeException -> P.IO ())) -process_timMessageResult (seqid, iprot, oprot, handler) = do - args <- read_TimMessageResult_args iprot - (X.catch - (do - Iface.timMessageResult handler (timMessageResult_args_mbean args) - P.return ()) - ((\_ -> do - P.return ()) :: X.SomeException -> P.IO ())) -process_timProperty (seqid, iprot, oprot, handler) = do - args <- read_TimProperty_args iprot - (X.catch - (do - Iface.timProperty handler (timProperty_args_tpb args) - P.return ()) - ((\_ -> do - P.return ()) :: X.SomeException -> P.IO ())) -process_timRemoteUserAuth (seqid, iprot, oprot, handler) = do - args <- read_TimRemoteUserAuth_args iprot - (X.catch - (do - val <- Iface.timRemoteUserAuth handler (timRemoteUserAuth_args_tid args) (timRemoteUserAuth_args_pwd args) (timRemoteUserAuth_args_auth args) - let res = default_TimRemoteUserAuth_result{timRemoteUserAuth_result_success = val} - T.writeMessageBegin oprot ("timRemoteUserAuth", T.M_REPLY, seqid) - write_TimRemoteUserAuth_result oprot res - T.writeMessageEnd oprot - T.tFlush (T.getTransport oprot)) - ((\_ -> do - T.writeMessageBegin oprot ("timRemoteUserAuth", T.M_EXCEPTION, seqid) - T.writeAppExn oprot (T.AppExn T.AE_UNKNOWN "") - T.writeMessageEnd oprot - T.tFlush (T.getTransport oprot)) :: X.SomeException -> P.IO ())) -process_timRemoteUserGet (seqid, iprot, oprot, handler) = do - args <- read_TimRemoteUserGet_args iprot - (X.catch - (do - val <- Iface.timRemoteUserGet handler (timRemoteUserGet_args_tid args) (timRemoteUserGet_args_auth args) - let res = default_TimRemoteUserGet_result{timRemoteUserGet_result_success = val} - T.writeMessageBegin oprot ("timRemoteUserGet", T.M_REPLY, seqid) - write_TimRemoteUserGet_result oprot res - T.writeMessageEnd oprot - T.tFlush (T.getTransport oprot)) - ((\_ -> do - T.writeMessageBegin oprot ("timRemoteUserGet", T.M_EXCEPTION, seqid) - T.writeAppExn oprot (T.AppExn T.AE_UNKNOWN "") - T.writeMessageEnd oprot - T.tFlush (T.getTransport oprot)) :: X.SomeException -> P.IO ())) -process_timRemoteUserEdit (seqid, iprot, oprot, handler) = do - args <- read_TimRemoteUserEdit_args iprot - (X.catch - (do - val <- Iface.timRemoteUserEdit handler (timRemoteUserEdit_args_tid args) (timRemoteUserEdit_args_ub args) (timRemoteUserEdit_args_auth args) - let res = default_TimRemoteUserEdit_result{timRemoteUserEdit_result_success = val} - T.writeMessageBegin oprot ("timRemoteUserEdit", T.M_REPLY, seqid) - write_TimRemoteUserEdit_result oprot res - T.writeMessageEnd oprot - T.tFlush (T.getTransport oprot)) - ((\_ -> do - T.writeMessageBegin oprot ("timRemoteUserEdit", T.M_EXCEPTION, seqid) - T.writeAppExn oprot (T.AppExn T.AE_UNKNOWN "") - T.writeMessageEnd oprot - T.tFlush (T.getTransport oprot)) :: X.SomeException -> P.IO ())) -process_timResponsePresence (seqid, iprot, oprot, handler) = do - args <- read_TimResponsePresence_args iprot - (X.catch - (do - val <- Iface.timResponsePresence handler (timResponsePresence_args_pbean args) (timResponsePresence_args_auth args) - let res = default_TimResponsePresence_result{timResponsePresence_result_success = val} - T.writeMessageBegin oprot ("timResponsePresence", T.M_REPLY, seqid) - write_TimResponsePresence_result oprot res - T.writeMessageEnd oprot - T.tFlush (T.getTransport oprot)) - ((\_ -> do - T.writeMessageBegin oprot ("timResponsePresence", T.M_EXCEPTION, seqid) - T.writeAppExn oprot (T.AppExn T.AE_UNKNOWN "") - T.writeMessageEnd oprot - T.tFlush (T.getTransport oprot)) :: X.SomeException -> P.IO ())) -process_timResponseMessage (seqid, iprot, oprot, handler) = do - args <- read_TimResponseMessage_args iprot - (X.catch - (do - val <- Iface.timResponseMessage handler (timResponseMessage_args_mbean args) (timResponseMessage_args_auth args) - let res = default_TimResponseMessage_result{timResponseMessage_result_success = val} - T.writeMessageBegin oprot ("timResponseMessage", T.M_REPLY, seqid) - write_TimResponseMessage_result oprot res - T.writeMessageEnd oprot - T.tFlush (T.getTransport oprot)) - ((\_ -> do - T.writeMessageBegin oprot ("timResponseMessage", T.M_EXCEPTION, seqid) - T.writeAppExn oprot (T.AppExn T.AE_UNKNOWN "") - T.writeMessageEnd oprot - T.tFlush (T.getTransport oprot)) :: X.SomeException -> P.IO ())) -process_timResponseMessageIq (seqid, iprot, oprot, handler) = do - args <- read_TimResponseMessageIq_args iprot - (X.catch - (do - val <- Iface.timResponseMessageIq handler (timResponseMessageIq_args_timMsgIq args) (timResponseMessageIq_args_iqType args) (timResponseMessageIq_args_auth args) - let res = default_TimResponseMessageIq_result{timResponseMessageIq_result_success = val} - T.writeMessageBegin oprot ("timResponseMessageIq", T.M_REPLY, seqid) - write_TimResponseMessageIq_result oprot res - T.writeMessageEnd oprot - T.tFlush (T.getTransport oprot)) - ((\_ -> do - T.writeMessageBegin oprot ("timResponseMessageIq", T.M_EXCEPTION, seqid) - T.writeAppExn oprot (T.AppExn T.AE_UNKNOWN "") - T.writeMessageEnd oprot - T.tFlush (T.getTransport oprot)) :: X.SomeException -> P.IO ())) -process_timResponsePresenceList (seqid, iprot, oprot, handler) = do - args <- read_TimResponsePresenceList_args iprot - (X.catch - (do - val <- Iface.timResponsePresenceList handler (timResponsePresenceList_args_pbeanList args) (timResponsePresenceList_args_auth args) - let res = default_TimResponsePresenceList_result{timResponsePresenceList_result_success = val} - T.writeMessageBegin oprot ("timResponsePresenceList", T.M_REPLY, seqid) - write_TimResponsePresenceList_result oprot res - T.writeMessageEnd oprot - T.tFlush (T.getTransport oprot)) - ((\_ -> do - T.writeMessageBegin oprot ("timResponsePresenceList", T.M_EXCEPTION, seqid) - T.writeAppExn oprot (T.AppExn T.AE_UNKNOWN "") - T.writeMessageEnd oprot - T.tFlush (T.getTransport oprot)) :: X.SomeException -> P.IO ())) -process_timResponseMessageList (seqid, iprot, oprot, handler) = do - args <- read_TimResponseMessageList_args iprot - (X.catch - (do - val <- Iface.timResponseMessageList handler (timResponseMessageList_args_mbeanList args) (timResponseMessageList_args_auth args) - let res = default_TimResponseMessageList_result{timResponseMessageList_result_success = val} - T.writeMessageBegin oprot ("timResponseMessageList", T.M_REPLY, seqid) - write_TimResponseMessageList_result oprot res - T.writeMessageEnd oprot - T.tFlush (T.getTransport oprot)) - ((\_ -> do - T.writeMessageBegin oprot ("timResponseMessageList", T.M_EXCEPTION, seqid) - T.writeAppExn oprot (T.AppExn T.AE_UNKNOWN "") - T.writeMessageEnd oprot - T.tFlush (T.getTransport oprot)) :: X.SomeException -> P.IO ())) -proc_ handler (iprot,oprot) (name,typ,seqid) = case name of - "timStream" -> process_timStream (seqid,iprot,oprot,handler) - "timStarttls" -> process_timStarttls (seqid,iprot,oprot,handler) - "timLogin" -> process_timLogin (seqid,iprot,oprot,handler) - "timAck" -> process_timAck (seqid,iprot,oprot,handler) - "timPresence" -> process_timPresence (seqid,iprot,oprot,handler) - "timMessage" -> process_timMessage (seqid,iprot,oprot,handler) - "timPing" -> process_timPing (seqid,iprot,oprot,handler) - "timError" -> process_timError (seqid,iprot,oprot,handler) - "timLogout" -> process_timLogout (seqid,iprot,oprot,handler) - "timRegist" -> process_timRegist (seqid,iprot,oprot,handler) - "timRoser" -> process_timRoser (seqid,iprot,oprot,handler) - "timMessageList" -> process_timMessageList (seqid,iprot,oprot,handler) - "timPresenceList" -> process_timPresenceList (seqid,iprot,oprot,handler) - "timMessageIq" -> process_timMessageIq (seqid,iprot,oprot,handler) - "timMessageResult" -> process_timMessageResult (seqid,iprot,oprot,handler) - "timProperty" -> process_timProperty (seqid,iprot,oprot,handler) - "timRemoteUserAuth" -> process_timRemoteUserAuth (seqid,iprot,oprot,handler) - "timRemoteUserGet" -> process_timRemoteUserGet (seqid,iprot,oprot,handler) - "timRemoteUserEdit" -> process_timRemoteUserEdit (seqid,iprot,oprot,handler) - "timResponsePresence" -> process_timResponsePresence (seqid,iprot,oprot,handler) - "timResponseMessage" -> process_timResponseMessage (seqid,iprot,oprot,handler) - "timResponseMessageIq" -> process_timResponseMessageIq (seqid,iprot,oprot,handler) - "timResponsePresenceList" -> process_timResponsePresenceList (seqid,iprot,oprot,handler) - "timResponseMessageList" -> process_timResponseMessageList (seqid,iprot,oprot,handler) - _ -> do - _ <- T.readVal iprot (T.T_STRUCT Map.empty) - T.writeMessageBegin oprot (name,T.M_EXCEPTION,seqid) - T.writeAppExn oprot (T.AppExn T.AE_UNKNOWN_METHOD ("Unknown function " ++ LT.unpack name)) - T.writeMessageEnd oprot - T.tFlush (T.getTransport oprot) -process handler (iprot, oprot) = do - (name, typ, seqid) <- T.readMessageBegin iprot - proc_ handler (iprot,oprot) (name,typ,seqid) - T.readMessageEnd iprot - P.return P.True diff --git a/protocols/gen-hs/ITim_Client.hs b/protocols/gen-hs/ITim_Client.hs deleted file mode 100644 index a36794d..0000000 --- a/protocols/gen-hs/ITim_Client.hs +++ /dev/null @@ -1,316 +0,0 @@ -{-# LANGUAGE DeriveDataTypeable #-} -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE OverloadedStrings #-} -{-# OPTIONS_GHC -fno-warn-missing-fields #-} -{-# OPTIONS_GHC -fno-warn-missing-signatures #-} -{-# OPTIONS_GHC -fno-warn-name-shadowing #-} -{-# OPTIONS_GHC -fno-warn-unused-imports #-} -{-# OPTIONS_GHC -fno-warn-unused-matches #-} - ------------------------------------------------------------------ --- Autogenerated by Thrift Compiler (0.9.3) -- --- -- --- DO NOT EDIT UNLESS YOU ARE SURE YOU KNOW WHAT YOU ARE DOING -- ------------------------------------------------------------------ - -module ITim_Client(timStream,timStarttls,timLogin,timAck,timPresence,timMessage,timPing,timError,timLogout,timRegist,timRoser,timMessageList,timPresenceList,timMessageIq,timMessageResult,timProperty,timRemoteUserAuth,timRemoteUserGet,timRemoteUserEdit,timResponsePresence,timResponseMessage,timResponseMessageIq,timResponsePresenceList,timResponseMessageList) where -import qualified Data.IORef as R -import Prelude (($), (.), (>>=), (==), (++)) -import qualified Prelude as P -import qualified Control.Exception as X -import qualified Control.Monad as M ( liftM, ap, when ) -import Data.Functor ( (<$>) ) -import qualified Data.ByteString.Lazy as LBS -import qualified Data.Hashable as H -import qualified Data.Int as I -import qualified Data.Maybe as M (catMaybes) -import qualified Data.Text.Lazy.Encoding as E ( decodeUtf8, encodeUtf8 ) -import qualified Data.Text.Lazy as LT -import qualified GHC.Generics as G (Generic) -import qualified Data.Typeable as TY ( Typeable ) -import qualified Data.HashMap.Strict as Map -import qualified Data.HashSet as Set -import qualified Data.Vector as Vector -import qualified Test.QuickCheck.Arbitrary as QC ( Arbitrary(..) ) -import qualified Test.QuickCheck as QC ( elements ) - -import qualified Thrift as T -import qualified Thrift.Types as T -import qualified Thrift.Arbitraries as T - - -import Tim_Types -import ITim -seqid = R.newIORef 0 -timStream (ip,op) arg_param = do - send_timStream op arg_param -send_timStream op arg_param = do - seq <- seqid - seqn <- R.readIORef seq - T.writeMessageBegin op ("timStream", T.M_ONEWAY, seqn) - write_TimStream_args op (TimStream_args{timStream_args_param=arg_param}) - T.writeMessageEnd op - T.tFlush (T.getTransport op) -timStarttls (ip,op) = do - send_timStarttls op -send_timStarttls op = do - seq <- seqid - seqn <- R.readIORef seq - T.writeMessageBegin op ("timStarttls", T.M_ONEWAY, seqn) - write_TimStarttls_args op (TimStarttls_args{}) - T.writeMessageEnd op - T.tFlush (T.getTransport op) -timLogin (ip,op) arg_tid arg_pwd = do - send_timLogin op arg_tid arg_pwd -send_timLogin op arg_tid arg_pwd = do - seq <- seqid - seqn <- R.readIORef seq - T.writeMessageBegin op ("timLogin", T.M_ONEWAY, seqn) - write_TimLogin_args op (TimLogin_args{timLogin_args_tid=arg_tid,timLogin_args_pwd=arg_pwd}) - T.writeMessageEnd op - T.tFlush (T.getTransport op) -timAck (ip,op) arg_ab = do - send_timAck op arg_ab -send_timAck op arg_ab = do - seq <- seqid - seqn <- R.readIORef seq - T.writeMessageBegin op ("timAck", T.M_ONEWAY, seqn) - write_TimAck_args op (TimAck_args{timAck_args_ab=arg_ab}) - T.writeMessageEnd op - T.tFlush (T.getTransport op) -timPresence (ip,op) arg_pbean = do - send_timPresence op arg_pbean -send_timPresence op arg_pbean = do - seq <- seqid - seqn <- R.readIORef seq - T.writeMessageBegin op ("timPresence", T.M_ONEWAY, seqn) - write_TimPresence_args op (TimPresence_args{timPresence_args_pbean=arg_pbean}) - T.writeMessageEnd op - T.tFlush (T.getTransport op) -timMessage (ip,op) arg_mbean = do - send_timMessage op arg_mbean -send_timMessage op arg_mbean = do - seq <- seqid - seqn <- R.readIORef seq - T.writeMessageBegin op ("timMessage", T.M_ONEWAY, seqn) - write_TimMessage_args op (TimMessage_args{timMessage_args_mbean=arg_mbean}) - T.writeMessageEnd op - T.tFlush (T.getTransport op) -timPing (ip,op) arg_threadId = do - send_timPing op arg_threadId -send_timPing op arg_threadId = do - seq <- seqid - seqn <- R.readIORef seq - T.writeMessageBegin op ("timPing", T.M_ONEWAY, seqn) - write_TimPing_args op (TimPing_args{timPing_args_threadId=arg_threadId}) - T.writeMessageEnd op - T.tFlush (T.getTransport op) -timError (ip,op) arg_e = do - send_timError op arg_e -send_timError op arg_e = do - seq <- seqid - seqn <- R.readIORef seq - T.writeMessageBegin op ("timError", T.M_ONEWAY, seqn) - write_TimError_args op (TimError_args{timError_args_e=arg_e}) - T.writeMessageEnd op - T.tFlush (T.getTransport op) -timLogout (ip,op) = do - send_timLogout op -send_timLogout op = do - seq <- seqid - seqn <- R.readIORef seq - T.writeMessageBegin op ("timLogout", T.M_ONEWAY, seqn) - write_TimLogout_args op (TimLogout_args{}) - T.writeMessageEnd op - T.tFlush (T.getTransport op) -timRegist (ip,op) arg_tid arg_auth = do - send_timRegist op arg_tid arg_auth -send_timRegist op arg_tid arg_auth = do - seq <- seqid - seqn <- R.readIORef seq - T.writeMessageBegin op ("timRegist", T.M_ONEWAY, seqn) - write_TimRegist_args op (TimRegist_args{timRegist_args_tid=arg_tid,timRegist_args_auth=arg_auth}) - T.writeMessageEnd op - T.tFlush (T.getTransport op) -timRoser (ip,op) arg_roster = do - send_timRoser op arg_roster -send_timRoser op arg_roster = do - seq <- seqid - seqn <- R.readIORef seq - T.writeMessageBegin op ("timRoser", T.M_ONEWAY, seqn) - write_TimRoser_args op (TimRoser_args{timRoser_args_roster=arg_roster}) - T.writeMessageEnd op - T.tFlush (T.getTransport op) -timMessageList (ip,op) arg_mbeanList = do - send_timMessageList op arg_mbeanList -send_timMessageList op arg_mbeanList = do - seq <- seqid - seqn <- R.readIORef seq - T.writeMessageBegin op ("timMessageList", T.M_ONEWAY, seqn) - write_TimMessageList_args op (TimMessageList_args{timMessageList_args_mbeanList=arg_mbeanList}) - T.writeMessageEnd op - T.tFlush (T.getTransport op) -timPresenceList (ip,op) arg_pbeanList = do - send_timPresenceList op arg_pbeanList -send_timPresenceList op arg_pbeanList = do - seq <- seqid - seqn <- R.readIORef seq - T.writeMessageBegin op ("timPresenceList", T.M_ONEWAY, seqn) - write_TimPresenceList_args op (TimPresenceList_args{timPresenceList_args_pbeanList=arg_pbeanList}) - T.writeMessageEnd op - T.tFlush (T.getTransport op) -timMessageIq (ip,op) arg_timMsgIq arg_iqType = do - send_timMessageIq op arg_timMsgIq arg_iqType -send_timMessageIq op arg_timMsgIq arg_iqType = do - seq <- seqid - seqn <- R.readIORef seq - T.writeMessageBegin op ("timMessageIq", T.M_ONEWAY, seqn) - write_TimMessageIq_args op (TimMessageIq_args{timMessageIq_args_timMsgIq=arg_timMsgIq,timMessageIq_args_iqType=arg_iqType}) - T.writeMessageEnd op - T.tFlush (T.getTransport op) -timMessageResult (ip,op) arg_mbean = do - send_timMessageResult op arg_mbean -send_timMessageResult op arg_mbean = do - seq <- seqid - seqn <- R.readIORef seq - T.writeMessageBegin op ("timMessageResult", T.M_ONEWAY, seqn) - write_TimMessageResult_args op (TimMessageResult_args{timMessageResult_args_mbean=arg_mbean}) - T.writeMessageEnd op - T.tFlush (T.getTransport op) -timProperty (ip,op) arg_tpb = do - send_timProperty op arg_tpb -send_timProperty op arg_tpb = do - seq <- seqid - seqn <- R.readIORef seq - T.writeMessageBegin op ("timProperty", T.M_ONEWAY, seqn) - write_TimProperty_args op (TimProperty_args{timProperty_args_tpb=arg_tpb}) - T.writeMessageEnd op - T.tFlush (T.getTransport op) -timRemoteUserAuth (ip,op) arg_tid arg_pwd arg_auth = do - send_timRemoteUserAuth op arg_tid arg_pwd arg_auth - recv_timRemoteUserAuth ip -send_timRemoteUserAuth op arg_tid arg_pwd arg_auth = do - seq <- seqid - seqn <- R.readIORef seq - T.writeMessageBegin op ("timRemoteUserAuth", T.M_CALL, seqn) - write_TimRemoteUserAuth_args op (TimRemoteUserAuth_args{timRemoteUserAuth_args_tid=arg_tid,timRemoteUserAuth_args_pwd=arg_pwd,timRemoteUserAuth_args_auth=arg_auth}) - T.writeMessageEnd op - T.tFlush (T.getTransport op) -recv_timRemoteUserAuth ip = do - (fname, mtype, rseqid) <- T.readMessageBegin ip - M.when (mtype == T.M_EXCEPTION) $ do { exn <- T.readAppExn ip ; T.readMessageEnd ip ; X.throw exn } - res <- read_TimRemoteUserAuth_result ip - T.readMessageEnd ip - P.return $ timRemoteUserAuth_result_success res -timRemoteUserGet (ip,op) arg_tid arg_auth = do - send_timRemoteUserGet op arg_tid arg_auth - recv_timRemoteUserGet ip -send_timRemoteUserGet op arg_tid arg_auth = do - seq <- seqid - seqn <- R.readIORef seq - T.writeMessageBegin op ("timRemoteUserGet", T.M_CALL, seqn) - write_TimRemoteUserGet_args op (TimRemoteUserGet_args{timRemoteUserGet_args_tid=arg_tid,timRemoteUserGet_args_auth=arg_auth}) - T.writeMessageEnd op - T.tFlush (T.getTransport op) -recv_timRemoteUserGet ip = do - (fname, mtype, rseqid) <- T.readMessageBegin ip - M.when (mtype == T.M_EXCEPTION) $ do { exn <- T.readAppExn ip ; T.readMessageEnd ip ; X.throw exn } - res <- read_TimRemoteUserGet_result ip - T.readMessageEnd ip - P.return $ timRemoteUserGet_result_success res -timRemoteUserEdit (ip,op) arg_tid arg_ub arg_auth = do - send_timRemoteUserEdit op arg_tid arg_ub arg_auth - recv_timRemoteUserEdit ip -send_timRemoteUserEdit op arg_tid arg_ub arg_auth = do - seq <- seqid - seqn <- R.readIORef seq - T.writeMessageBegin op ("timRemoteUserEdit", T.M_CALL, seqn) - write_TimRemoteUserEdit_args op (TimRemoteUserEdit_args{timRemoteUserEdit_args_tid=arg_tid,timRemoteUserEdit_args_ub=arg_ub,timRemoteUserEdit_args_auth=arg_auth}) - T.writeMessageEnd op - T.tFlush (T.getTransport op) -recv_timRemoteUserEdit ip = do - (fname, mtype, rseqid) <- T.readMessageBegin ip - M.when (mtype == T.M_EXCEPTION) $ do { exn <- T.readAppExn ip ; T.readMessageEnd ip ; X.throw exn } - res <- read_TimRemoteUserEdit_result ip - T.readMessageEnd ip - P.return $ timRemoteUserEdit_result_success res -timResponsePresence (ip,op) arg_pbean arg_auth = do - send_timResponsePresence op arg_pbean arg_auth - recv_timResponsePresence ip -send_timResponsePresence op arg_pbean arg_auth = do - seq <- seqid - seqn <- R.readIORef seq - T.writeMessageBegin op ("timResponsePresence", T.M_CALL, seqn) - write_TimResponsePresence_args op (TimResponsePresence_args{timResponsePresence_args_pbean=arg_pbean,timResponsePresence_args_auth=arg_auth}) - T.writeMessageEnd op - T.tFlush (T.getTransport op) -recv_timResponsePresence ip = do - (fname, mtype, rseqid) <- T.readMessageBegin ip - M.when (mtype == T.M_EXCEPTION) $ do { exn <- T.readAppExn ip ; T.readMessageEnd ip ; X.throw exn } - res <- read_TimResponsePresence_result ip - T.readMessageEnd ip - P.return $ timResponsePresence_result_success res -timResponseMessage (ip,op) arg_mbean arg_auth = do - send_timResponseMessage op arg_mbean arg_auth - recv_timResponseMessage ip -send_timResponseMessage op arg_mbean arg_auth = do - seq <- seqid - seqn <- R.readIORef seq - T.writeMessageBegin op ("timResponseMessage", T.M_CALL, seqn) - write_TimResponseMessage_args op (TimResponseMessage_args{timResponseMessage_args_mbean=arg_mbean,timResponseMessage_args_auth=arg_auth}) - T.writeMessageEnd op - T.tFlush (T.getTransport op) -recv_timResponseMessage ip = do - (fname, mtype, rseqid) <- T.readMessageBegin ip - M.when (mtype == T.M_EXCEPTION) $ do { exn <- T.readAppExn ip ; T.readMessageEnd ip ; X.throw exn } - res <- read_TimResponseMessage_result ip - T.readMessageEnd ip - P.return $ timResponseMessage_result_success res -timResponseMessageIq (ip,op) arg_timMsgIq arg_iqType arg_auth = do - send_timResponseMessageIq op arg_timMsgIq arg_iqType arg_auth - recv_timResponseMessageIq ip -send_timResponseMessageIq op arg_timMsgIq arg_iqType arg_auth = do - seq <- seqid - seqn <- R.readIORef seq - T.writeMessageBegin op ("timResponseMessageIq", T.M_CALL, seqn) - write_TimResponseMessageIq_args op (TimResponseMessageIq_args{timResponseMessageIq_args_timMsgIq=arg_timMsgIq,timResponseMessageIq_args_iqType=arg_iqType,timResponseMessageIq_args_auth=arg_auth}) - T.writeMessageEnd op - T.tFlush (T.getTransport op) -recv_timResponseMessageIq ip = do - (fname, mtype, rseqid) <- T.readMessageBegin ip - M.when (mtype == T.M_EXCEPTION) $ do { exn <- T.readAppExn ip ; T.readMessageEnd ip ; X.throw exn } - res <- read_TimResponseMessageIq_result ip - T.readMessageEnd ip - P.return $ timResponseMessageIq_result_success res -timResponsePresenceList (ip,op) arg_pbeanList arg_auth = do - send_timResponsePresenceList op arg_pbeanList arg_auth - recv_timResponsePresenceList ip -send_timResponsePresenceList op arg_pbeanList arg_auth = do - seq <- seqid - seqn <- R.readIORef seq - T.writeMessageBegin op ("timResponsePresenceList", T.M_CALL, seqn) - write_TimResponsePresenceList_args op (TimResponsePresenceList_args{timResponsePresenceList_args_pbeanList=arg_pbeanList,timResponsePresenceList_args_auth=arg_auth}) - T.writeMessageEnd op - T.tFlush (T.getTransport op) -recv_timResponsePresenceList ip = do - (fname, mtype, rseqid) <- T.readMessageBegin ip - M.when (mtype == T.M_EXCEPTION) $ do { exn <- T.readAppExn ip ; T.readMessageEnd ip ; X.throw exn } - res <- read_TimResponsePresenceList_result ip - T.readMessageEnd ip - P.return $ timResponsePresenceList_result_success res -timResponseMessageList (ip,op) arg_mbeanList arg_auth = do - send_timResponseMessageList op arg_mbeanList arg_auth - recv_timResponseMessageList ip -send_timResponseMessageList op arg_mbeanList arg_auth = do - seq <- seqid - seqn <- R.readIORef seq - T.writeMessageBegin op ("timResponseMessageList", T.M_CALL, seqn) - write_TimResponseMessageList_args op (TimResponseMessageList_args{timResponseMessageList_args_mbeanList=arg_mbeanList,timResponseMessageList_args_auth=arg_auth}) - T.writeMessageEnd op - T.tFlush (T.getTransport op) -recv_timResponseMessageList ip = do - (fname, mtype, rseqid) <- T.readMessageBegin ip - M.when (mtype == T.M_EXCEPTION) $ do { exn <- T.readAppExn ip ; T.readMessageEnd ip ; X.throw exn } - res <- read_TimResponseMessageList_result ip - T.readMessageEnd ip - P.return $ timResponseMessageList_result_success res diff --git a/protocols/gen-hs/ITim_Iface.hs b/protocols/gen-hs/ITim_Iface.hs deleted file mode 100644 index 0bb45c8..0000000 --- a/protocols/gen-hs/ITim_Iface.hs +++ /dev/null @@ -1,67 +0,0 @@ -{-# LANGUAGE DeriveDataTypeable #-} -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE OverloadedStrings #-} -{-# OPTIONS_GHC -fno-warn-missing-fields #-} -{-# OPTIONS_GHC -fno-warn-missing-signatures #-} -{-# OPTIONS_GHC -fno-warn-name-shadowing #-} -{-# OPTIONS_GHC -fno-warn-unused-imports #-} -{-# OPTIONS_GHC -fno-warn-unused-matches #-} - ------------------------------------------------------------------ --- Autogenerated by Thrift Compiler (0.9.3) -- --- -- --- DO NOT EDIT UNLESS YOU ARE SURE YOU KNOW WHAT YOU ARE DOING -- ------------------------------------------------------------------ - -module ITim_Iface where -import Prelude (($), (.), (>>=), (==), (++)) -import qualified Prelude as P -import qualified Control.Exception as X -import qualified Control.Monad as M ( liftM, ap, when ) -import Data.Functor ( (<$>) ) -import qualified Data.ByteString.Lazy as LBS -import qualified Data.Hashable as H -import qualified Data.Int as I -import qualified Data.Maybe as M (catMaybes) -import qualified Data.Text.Lazy.Encoding as E ( decodeUtf8, encodeUtf8 ) -import qualified Data.Text.Lazy as LT -import qualified GHC.Generics as G (Generic) -import qualified Data.Typeable as TY ( Typeable ) -import qualified Data.HashMap.Strict as Map -import qualified Data.HashSet as Set -import qualified Data.Vector as Vector -import qualified Test.QuickCheck.Arbitrary as QC ( Arbitrary(..) ) -import qualified Test.QuickCheck as QC ( elements ) - -import qualified Thrift as T -import qualified Thrift.Types as T -import qualified Thrift.Arbitraries as T - - -import Tim_Types - -class ITim_Iface a where - timStream :: a -> TimParam -> P.IO () - timStarttls :: a -> P.IO () - timLogin :: a -> Tid -> LT.Text -> P.IO () - timAck :: a -> TimAckBean -> P.IO () - timPresence :: a -> TimPBean -> P.IO () - timMessage :: a -> TimMBean -> P.IO () - timPing :: a -> LT.Text -> P.IO () - timError :: a -> TimError -> P.IO () - timLogout :: a -> P.IO () - timRegist :: a -> Tid -> LT.Text -> P.IO () - timRoser :: a -> TimRoster -> P.IO () - timMessageList :: a -> TimMBeanList -> P.IO () - timPresenceList :: a -> TimPBeanList -> P.IO () - timMessageIq :: a -> TimMessageIq -> LT.Text -> P.IO () - timMessageResult :: a -> TimMBean -> P.IO () - timProperty :: a -> TimPropertyBean -> P.IO () - timRemoteUserAuth :: a -> Tid -> LT.Text -> TimAuth -> P.IO TimRemoteUserBean - timRemoteUserGet :: a -> Tid -> TimAuth -> P.IO TimRemoteUserBean - timRemoteUserEdit :: a -> Tid -> TimUserBean -> TimAuth -> P.IO TimRemoteUserBean - timResponsePresence :: a -> TimPBean -> TimAuth -> P.IO TimResponseBean - timResponseMessage :: a -> TimMBean -> TimAuth -> P.IO TimResponseBean - timResponseMessageIq :: a -> TimMessageIq -> LT.Text -> TimAuth -> P.IO TimMBeanList - timResponsePresenceList :: a -> TimPBeanList -> TimAuth -> P.IO TimResponseBean - timResponseMessageList :: a -> TimMBeanList -> TimAuth -> P.IO TimResponseBean diff --git a/protocols/gen-hs/Tim_Consts.hs b/protocols/gen-hs/Tim_Consts.hs deleted file mode 100644 index 919040f..0000000 --- a/protocols/gen-hs/Tim_Consts.hs +++ /dev/null @@ -1,53 +0,0 @@ -{-# LANGUAGE DeriveDataTypeable #-} -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE OverloadedStrings #-} -{-# OPTIONS_GHC -fno-warn-missing-fields #-} -{-# OPTIONS_GHC -fno-warn-missing-signatures #-} -{-# OPTIONS_GHC -fno-warn-name-shadowing #-} -{-# OPTIONS_GHC -fno-warn-unused-imports #-} -{-# OPTIONS_GHC -fno-warn-unused-matches #-} - ------------------------------------------------------------------ --- Autogenerated by Thrift Compiler (0.9.3) -- --- -- --- DO NOT EDIT UNLESS YOU ARE SURE YOU KNOW WHAT YOU ARE DOING -- ------------------------------------------------------------------ - -module Tim_Consts where -import Prelude (($), (.), (>>=), (==), (++)) -import qualified Prelude as P -import qualified Control.Exception as X -import qualified Control.Monad as M ( liftM, ap, when ) -import Data.Functor ( (<$>) ) -import qualified Data.ByteString.Lazy as LBS -import qualified Data.Hashable as H -import qualified Data.Int as I -import qualified Data.Maybe as M (catMaybes) -import qualified Data.Text.Lazy.Encoding as E ( decodeUtf8, encodeUtf8 ) -import qualified Data.Text.Lazy as LT -import qualified GHC.Generics as G (Generic) -import qualified Data.Typeable as TY ( Typeable ) -import qualified Data.HashMap.Strict as Map -import qualified Data.HashSet as Set -import qualified Data.Vector as Vector -import qualified Test.QuickCheck.Arbitrary as QC ( Arbitrary(..) ) -import qualified Test.QuickCheck as QC ( elements ) - -import qualified Thrift as T -import qualified Thrift.Types as T -import qualified Thrift.Arbitraries as T - - -import Tim_Types -protocolversion :: I.Int32 -protocolversion = 4 - -protocolversionName :: LT.Text -protocolversionName = "1.1.0" - -tIM_SC_SUCCESS :: LT.Text -tIM_SC_SUCCESS = "200" - -tIM_SC_FAILED :: LT.Text -tIM_SC_FAILED = "400" - diff --git a/protocols/gen-hs/Tim_Types.hs b/protocols/gen-hs/Tim_Types.hs deleted file mode 100644 index 3392559..0000000 --- a/protocols/gen-hs/Tim_Types.hs +++ /dev/null @@ -1,1488 +0,0 @@ -{-# LANGUAGE DeriveDataTypeable #-} -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE OverloadedStrings #-} -{-# OPTIONS_GHC -fno-warn-missing-fields #-} -{-# OPTIONS_GHC -fno-warn-missing-signatures #-} -{-# OPTIONS_GHC -fno-warn-name-shadowing #-} -{-# OPTIONS_GHC -fno-warn-unused-imports #-} -{-# OPTIONS_GHC -fno-warn-unused-matches #-} - ------------------------------------------------------------------ --- Autogenerated by Thrift Compiler (0.9.3) -- --- -- --- DO NOT EDIT UNLESS YOU ARE SURE YOU KNOW WHAT YOU ARE DOING -- ------------------------------------------------------------------ - -module Tim_Types where -import Prelude (($), (.), (>>=), (==), (++)) -import qualified Prelude as P -import qualified Control.Exception as X -import qualified Control.Monad as M ( liftM, ap, when ) -import Data.Functor ( (<$>) ) -import qualified Data.ByteString.Lazy as LBS -import qualified Data.Hashable as H -import qualified Data.Int as I -import qualified Data.Maybe as M (catMaybes) -import qualified Data.Text.Lazy.Encoding as E ( decodeUtf8, encodeUtf8 ) -import qualified Data.Text.Lazy as LT -import qualified GHC.Generics as G (Generic) -import qualified Data.Typeable as TY ( Typeable ) -import qualified Data.HashMap.Strict as Map -import qualified Data.HashSet as Set -import qualified Data.Vector as Vector -import qualified Test.QuickCheck.Arbitrary as QC ( Arbitrary(..) ) -import qualified Test.QuickCheck as QC ( elements ) - -import qualified Thrift as T -import qualified Thrift.Types as T -import qualified Thrift.Arbitraries as T - - -data TimError = TimError { timError_errCode :: P.Maybe I.Int32 - , timError_errMsg :: P.Maybe LT.Text - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimError where - hashWithSalt salt record = salt `H.hashWithSalt` timError_errCode record `H.hashWithSalt` timError_errMsg record -instance QC.Arbitrary TimError where - arbitrary = M.liftM TimError (M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - shrink obj | obj == default_TimError = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimError{timError_errCode = timError_errCode obj} then P.Nothing else P.Just $ default_TimError{timError_errCode = timError_errCode obj} - , if obj == default_TimError{timError_errMsg = timError_errMsg obj} then P.Nothing else P.Just $ default_TimError{timError_errMsg = timError_errMsg obj} - ] -from_TimError :: TimError -> T.ThriftVal -from_TimError record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v2 -> (1, ("errCode",T.TI32 _v2))) <$> timError_errCode record - , (\_v2 -> (2, ("errMsg",T.TString $ E.encodeUtf8 _v2))) <$> timError_errMsg record - ] -write_TimError :: (T.Protocol p, T.Transport t) => p t -> TimError -> P.IO () -write_TimError oprot record = T.writeVal oprot $ from_TimError record -encode_TimError :: (T.Protocol p, T.Transport t) => p t -> TimError -> LBS.ByteString -encode_TimError oprot record = T.serializeVal oprot $ from_TimError record -to_TimError :: T.ThriftVal -> TimError -to_TimError (T.TStruct fields) = TimError{ - timError_errCode = P.maybe (P.Nothing) (\(_,_val4) -> P.Just (case _val4 of {T.TI32 _val5 -> _val5; _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timError_errMsg = P.maybe (P.Nothing) (\(_,_val4) -> P.Just (case _val4 of {T.TString _val6 -> E.decodeUtf8 _val6; _ -> P.error "wrong type"})) (Map.lookup (2) fields) - } -to_TimError _ = P.error "not a struct" -read_TimError :: (T.Transport t, T.Protocol p) => p t -> P.IO TimError -read_TimError iprot = to_TimError <$> T.readVal iprot (T.T_STRUCT typemap_TimError) -decode_TimError :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimError -decode_TimError iprot bs = to_TimError $ T.deserializeVal iprot (T.T_STRUCT typemap_TimError) bs -typemap_TimError :: T.TypeMap -typemap_TimError = Map.fromList [(1,("errCode",T.T_I32)),(2,("errMsg",T.T_STRING))] -default_TimError :: TimError -default_TimError = TimError{ - timError_errCode = P.Nothing, - timError_errMsg = P.Nothing} -data TimNode = TimNode { timNode_key :: P.Maybe LT.Text - , timNode_value :: P.Maybe LT.Text - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimNode where - hashWithSalt salt record = salt `H.hashWithSalt` timNode_key record `H.hashWithSalt` timNode_value record -instance QC.Arbitrary TimNode where - arbitrary = M.liftM TimNode (M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - shrink obj | obj == default_TimNode = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimNode{timNode_key = timNode_key obj} then P.Nothing else P.Just $ default_TimNode{timNode_key = timNode_key obj} - , if obj == default_TimNode{timNode_value = timNode_value obj} then P.Nothing else P.Just $ default_TimNode{timNode_value = timNode_value obj} - ] -from_TimNode :: TimNode -> T.ThriftVal -from_TimNode record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v9 -> (1, ("key",T.TString $ E.encodeUtf8 _v9))) <$> timNode_key record - , (\_v9 -> (2, ("value",T.TString $ E.encodeUtf8 _v9))) <$> timNode_value record - ] -write_TimNode :: (T.Protocol p, T.Transport t) => p t -> TimNode -> P.IO () -write_TimNode oprot record = T.writeVal oprot $ from_TimNode record -encode_TimNode :: (T.Protocol p, T.Transport t) => p t -> TimNode -> LBS.ByteString -encode_TimNode oprot record = T.serializeVal oprot $ from_TimNode record -to_TimNode :: T.ThriftVal -> TimNode -to_TimNode (T.TStruct fields) = TimNode{ - timNode_key = P.maybe (P.Nothing) (\(_,_val11) -> P.Just (case _val11 of {T.TString _val12 -> E.decodeUtf8 _val12; _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timNode_value = P.maybe (P.Nothing) (\(_,_val11) -> P.Just (case _val11 of {T.TString _val13 -> E.decodeUtf8 _val13; _ -> P.error "wrong type"})) (Map.lookup (2) fields) - } -to_TimNode _ = P.error "not a struct" -read_TimNode :: (T.Transport t, T.Protocol p) => p t -> P.IO TimNode -read_TimNode iprot = to_TimNode <$> T.readVal iprot (T.T_STRUCT typemap_TimNode) -decode_TimNode :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimNode -decode_TimNode iprot bs = to_TimNode $ T.deserializeVal iprot (T.T_STRUCT typemap_TimNode) bs -typemap_TimNode :: T.TypeMap -typemap_TimNode = Map.fromList [(1,("key",T.T_STRING)),(2,("value",T.T_STRING))] -default_TimNode :: TimNode -default_TimNode = TimNode{ - timNode_key = P.Nothing, - timNode_value = P.Nothing} -data TimAckBean = TimAckBean { timAckBean_id :: P.Maybe LT.Text - , timAckBean_ackType :: P.Maybe LT.Text - , timAckBean_ackStatus :: P.Maybe LT.Text - , timAckBean_extraList :: P.Maybe (Vector.Vector TimNode) - , timAckBean_err :: P.Maybe TimError - , timAckBean_extraMap :: P.Maybe (Map.HashMap LT.Text LT.Text) - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimAckBean where - hashWithSalt salt record = salt `H.hashWithSalt` timAckBean_id record `H.hashWithSalt` timAckBean_ackType record `H.hashWithSalt` timAckBean_ackStatus record `H.hashWithSalt` timAckBean_extraList record `H.hashWithSalt` timAckBean_err record `H.hashWithSalt` timAckBean_extraMap record -instance QC.Arbitrary TimAckBean where - arbitrary = M.liftM TimAckBean (M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - shrink obj | obj == default_TimAckBean = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimAckBean{timAckBean_id = timAckBean_id obj} then P.Nothing else P.Just $ default_TimAckBean{timAckBean_id = timAckBean_id obj} - , if obj == default_TimAckBean{timAckBean_ackType = timAckBean_ackType obj} then P.Nothing else P.Just $ default_TimAckBean{timAckBean_ackType = timAckBean_ackType obj} - , if obj == default_TimAckBean{timAckBean_ackStatus = timAckBean_ackStatus obj} then P.Nothing else P.Just $ default_TimAckBean{timAckBean_ackStatus = timAckBean_ackStatus obj} - , if obj == default_TimAckBean{timAckBean_extraList = timAckBean_extraList obj} then P.Nothing else P.Just $ default_TimAckBean{timAckBean_extraList = timAckBean_extraList obj} - , if obj == default_TimAckBean{timAckBean_err = timAckBean_err obj} then P.Nothing else P.Just $ default_TimAckBean{timAckBean_err = timAckBean_err obj} - , if obj == default_TimAckBean{timAckBean_extraMap = timAckBean_extraMap obj} then P.Nothing else P.Just $ default_TimAckBean{timAckBean_extraMap = timAckBean_extraMap obj} - ] -from_TimAckBean :: TimAckBean -> T.ThriftVal -from_TimAckBean record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v16 -> (1, ("id",T.TString $ E.encodeUtf8 _v16))) <$> timAckBean_id record - , (\_v16 -> (2, ("ackType",T.TString $ E.encodeUtf8 _v16))) <$> timAckBean_ackType record - , (\_v16 -> (3, ("ackStatus",T.TString $ E.encodeUtf8 _v16))) <$> timAckBean_ackStatus record - , (\_v16 -> (4, ("extraList",T.TList (T.T_STRUCT typemap_TimNode) $ P.map (\_v18 -> from_TimNode _v18) $ Vector.toList _v16))) <$> timAckBean_extraList record - , (\_v16 -> (5, ("err",from_TimError _v16))) <$> timAckBean_err record - , (\_v16 -> (6, ("extraMap",T.TMap T.T_STRING T.T_STRING $ P.map (\(_k19,_v20) -> (T.TString $ E.encodeUtf8 _k19, T.TString $ E.encodeUtf8 _v20)) $ Map.toList _v16))) <$> timAckBean_extraMap record - ] -write_TimAckBean :: (T.Protocol p, T.Transport t) => p t -> TimAckBean -> P.IO () -write_TimAckBean oprot record = T.writeVal oprot $ from_TimAckBean record -encode_TimAckBean :: (T.Protocol p, T.Transport t) => p t -> TimAckBean -> LBS.ByteString -encode_TimAckBean oprot record = T.serializeVal oprot $ from_TimAckBean record -to_TimAckBean :: T.ThriftVal -> TimAckBean -to_TimAckBean (T.TStruct fields) = TimAckBean{ - timAckBean_id = P.maybe (P.Nothing) (\(_,_val22) -> P.Just (case _val22 of {T.TString _val23 -> E.decodeUtf8 _val23; _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timAckBean_ackType = P.maybe (P.Nothing) (\(_,_val22) -> P.Just (case _val22 of {T.TString _val24 -> E.decodeUtf8 _val24; _ -> P.error "wrong type"})) (Map.lookup (2) fields), - timAckBean_ackStatus = P.maybe (P.Nothing) (\(_,_val22) -> P.Just (case _val22 of {T.TString _val25 -> E.decodeUtf8 _val25; _ -> P.error "wrong type"})) (Map.lookup (3) fields), - timAckBean_extraList = P.maybe (P.Nothing) (\(_,_val22) -> P.Just (case _val22 of {T.TList _ _val26 -> (Vector.fromList $ P.map (\_v27 -> (case _v27 of {T.TStruct _val28 -> (to_TimNode (T.TStruct _val28)); _ -> P.error "wrong type"})) _val26); _ -> P.error "wrong type"})) (Map.lookup (4) fields), - timAckBean_err = P.maybe (P.Nothing) (\(_,_val22) -> P.Just (case _val22 of {T.TStruct _val29 -> (to_TimError (T.TStruct _val29)); _ -> P.error "wrong type"})) (Map.lookup (5) fields), - timAckBean_extraMap = P.maybe (P.Nothing) (\(_,_val22) -> P.Just (case _val22 of {T.TMap _ _ _val30 -> (Map.fromList $ P.map (\(_k32,_v31) -> ((case _k32 of {T.TString _val33 -> E.decodeUtf8 _val33; _ -> P.error "wrong type"}),(case _v31 of {T.TString _val34 -> E.decodeUtf8 _val34; _ -> P.error "wrong type"}))) _val30); _ -> P.error "wrong type"})) (Map.lookup (6) fields) - } -to_TimAckBean _ = P.error "not a struct" -read_TimAckBean :: (T.Transport t, T.Protocol p) => p t -> P.IO TimAckBean -read_TimAckBean iprot = to_TimAckBean <$> T.readVal iprot (T.T_STRUCT typemap_TimAckBean) -decode_TimAckBean :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimAckBean -decode_TimAckBean iprot bs = to_TimAckBean $ T.deserializeVal iprot (T.T_STRUCT typemap_TimAckBean) bs -typemap_TimAckBean :: T.TypeMap -typemap_TimAckBean = Map.fromList [(1,("id",T.T_STRING)),(2,("ackType",T.T_STRING)),(3,("ackStatus",T.T_STRING)),(4,("extraList",(T.T_LIST (T.T_STRUCT typemap_TimNode)))),(5,("err",(T.T_STRUCT typemap_TimError))),(6,("extraMap",(T.T_MAP T.T_STRING T.T_STRING)))] -default_TimAckBean :: TimAckBean -default_TimAckBean = TimAckBean{ - timAckBean_id = P.Nothing, - timAckBean_ackType = P.Nothing, - timAckBean_ackStatus = P.Nothing, - timAckBean_extraList = P.Nothing, - timAckBean_err = P.Nothing, - timAckBean_extraMap = P.Nothing} -data TimHBean = TimHBean { timHBean_chl :: I.Int32 - , timHBean_platform :: P.Maybe I.Int32 - , timHBean_version :: I.Int16 - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimHBean where - hashWithSalt salt record = salt `H.hashWithSalt` timHBean_chl record `H.hashWithSalt` timHBean_platform record `H.hashWithSalt` timHBean_version record -instance QC.Arbitrary TimHBean where - arbitrary = M.liftM TimHBean (QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(QC.arbitrary) - shrink obj | obj == default_TimHBean = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimHBean{timHBean_chl = timHBean_chl obj} then P.Nothing else P.Just $ default_TimHBean{timHBean_chl = timHBean_chl obj} - , if obj == default_TimHBean{timHBean_platform = timHBean_platform obj} then P.Nothing else P.Just $ default_TimHBean{timHBean_platform = timHBean_platform obj} - , if obj == default_TimHBean{timHBean_version = timHBean_version obj} then P.Nothing else P.Just $ default_TimHBean{timHBean_version = timHBean_version obj} - ] -from_TimHBean :: TimHBean -> T.ThriftVal -from_TimHBean record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v37 -> P.Just (1, ("chl",T.TI32 _v37))) $ timHBean_chl record - , (\_v37 -> (2, ("platform",T.TI32 _v37))) <$> timHBean_platform record - , (\_v37 -> P.Just (3, ("version",T.TI16 _v37))) $ timHBean_version record - ] -write_TimHBean :: (T.Protocol p, T.Transport t) => p t -> TimHBean -> P.IO () -write_TimHBean oprot record = T.writeVal oprot $ from_TimHBean record -encode_TimHBean :: (T.Protocol p, T.Transport t) => p t -> TimHBean -> LBS.ByteString -encode_TimHBean oprot record = T.serializeVal oprot $ from_TimHBean record -to_TimHBean :: T.ThriftVal -> TimHBean -to_TimHBean (T.TStruct fields) = TimHBean{ - timHBean_chl = P.maybe (P.error "Missing required field: chl") (\(_,_val39) -> (case _val39 of {T.TI32 _val40 -> _val40; _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timHBean_platform = P.maybe (P.Nothing) (\(_,_val39) -> P.Just (case _val39 of {T.TI32 _val41 -> _val41; _ -> P.error "wrong type"})) (Map.lookup (2) fields), - timHBean_version = P.maybe (P.error "Missing required field: version") (\(_,_val39) -> (case _val39 of {T.TI16 _val42 -> _val42; _ -> P.error "wrong type"})) (Map.lookup (3) fields) - } -to_TimHBean _ = P.error "not a struct" -read_TimHBean :: (T.Transport t, T.Protocol p) => p t -> P.IO TimHBean -read_TimHBean iprot = to_TimHBean <$> T.readVal iprot (T.T_STRUCT typemap_TimHBean) -decode_TimHBean :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimHBean -decode_TimHBean iprot bs = to_TimHBean $ T.deserializeVal iprot (T.T_STRUCT typemap_TimHBean) bs -typemap_TimHBean :: T.TypeMap -typemap_TimHBean = Map.fromList [(1,("chl",T.T_I32)),(2,("platform",T.T_I32)),(3,("version",T.T_I16))] -default_TimHBean :: TimHBean -default_TimHBean = TimHBean{ - timHBean_chl = 0, - timHBean_platform = P.Nothing, - timHBean_version = 0} -data TimParam = TimParam { timParam_timestamp :: P.Maybe LT.Text - , timParam_version :: P.Maybe I.Int16 - , timParam_lang :: P.Maybe LT.Text - , timParam_extraList :: P.Maybe (Vector.Vector TimNode) - , timParam_extraMap :: P.Maybe (Map.HashMap LT.Text LT.Text) - , timParam_interflow :: P.Maybe LT.Text - , timParam_tls :: P.Maybe LT.Text - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimParam where - hashWithSalt salt record = salt `H.hashWithSalt` timParam_timestamp record `H.hashWithSalt` timParam_version record `H.hashWithSalt` timParam_lang record `H.hashWithSalt` timParam_extraList record `H.hashWithSalt` timParam_extraMap record `H.hashWithSalt` timParam_interflow record `H.hashWithSalt` timParam_tls record -instance QC.Arbitrary TimParam where - arbitrary = M.liftM TimParam (M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - shrink obj | obj == default_TimParam = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimParam{timParam_timestamp = timParam_timestamp obj} then P.Nothing else P.Just $ default_TimParam{timParam_timestamp = timParam_timestamp obj} - , if obj == default_TimParam{timParam_version = timParam_version obj} then P.Nothing else P.Just $ default_TimParam{timParam_version = timParam_version obj} - , if obj == default_TimParam{timParam_lang = timParam_lang obj} then P.Nothing else P.Just $ default_TimParam{timParam_lang = timParam_lang obj} - , if obj == default_TimParam{timParam_extraList = timParam_extraList obj} then P.Nothing else P.Just $ default_TimParam{timParam_extraList = timParam_extraList obj} - , if obj == default_TimParam{timParam_extraMap = timParam_extraMap obj} then P.Nothing else P.Just $ default_TimParam{timParam_extraMap = timParam_extraMap obj} - , if obj == default_TimParam{timParam_interflow = timParam_interflow obj} then P.Nothing else P.Just $ default_TimParam{timParam_interflow = timParam_interflow obj} - , if obj == default_TimParam{timParam_tls = timParam_tls obj} then P.Nothing else P.Just $ default_TimParam{timParam_tls = timParam_tls obj} - ] -from_TimParam :: TimParam -> T.ThriftVal -from_TimParam record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v45 -> (1, ("timestamp",T.TString $ E.encodeUtf8 _v45))) <$> timParam_timestamp record - , (\_v45 -> (2, ("version",T.TI16 _v45))) <$> timParam_version record - , (\_v45 -> (3, ("lang",T.TString $ E.encodeUtf8 _v45))) <$> timParam_lang record - , (\_v45 -> (4, ("extraList",T.TList (T.T_STRUCT typemap_TimNode) $ P.map (\_v47 -> from_TimNode _v47) $ Vector.toList _v45))) <$> timParam_extraList record - , (\_v45 -> (5, ("extraMap",T.TMap T.T_STRING T.T_STRING $ P.map (\(_k48,_v49) -> (T.TString $ E.encodeUtf8 _k48, T.TString $ E.encodeUtf8 _v49)) $ Map.toList _v45))) <$> timParam_extraMap record - , (\_v45 -> (6, ("interflow",T.TString $ E.encodeUtf8 _v45))) <$> timParam_interflow record - , (\_v45 -> (7, ("tls",T.TString $ E.encodeUtf8 _v45))) <$> timParam_tls record - ] -write_TimParam :: (T.Protocol p, T.Transport t) => p t -> TimParam -> P.IO () -write_TimParam oprot record = T.writeVal oprot $ from_TimParam record -encode_TimParam :: (T.Protocol p, T.Transport t) => p t -> TimParam -> LBS.ByteString -encode_TimParam oprot record = T.serializeVal oprot $ from_TimParam record -to_TimParam :: T.ThriftVal -> TimParam -to_TimParam (T.TStruct fields) = TimParam{ - timParam_timestamp = P.maybe (P.Nothing) (\(_,_val51) -> P.Just (case _val51 of {T.TString _val52 -> E.decodeUtf8 _val52; _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timParam_version = P.maybe (P.Nothing) (\(_,_val51) -> P.Just (case _val51 of {T.TI16 _val53 -> _val53; _ -> P.error "wrong type"})) (Map.lookup (2) fields), - timParam_lang = P.maybe (P.Nothing) (\(_,_val51) -> P.Just (case _val51 of {T.TString _val54 -> E.decodeUtf8 _val54; _ -> P.error "wrong type"})) (Map.lookup (3) fields), - timParam_extraList = P.maybe (P.Nothing) (\(_,_val51) -> P.Just (case _val51 of {T.TList _ _val55 -> (Vector.fromList $ P.map (\_v56 -> (case _v56 of {T.TStruct _val57 -> (to_TimNode (T.TStruct _val57)); _ -> P.error "wrong type"})) _val55); _ -> P.error "wrong type"})) (Map.lookup (4) fields), - timParam_extraMap = P.maybe (P.Nothing) (\(_,_val51) -> P.Just (case _val51 of {T.TMap _ _ _val58 -> (Map.fromList $ P.map (\(_k60,_v59) -> ((case _k60 of {T.TString _val61 -> E.decodeUtf8 _val61; _ -> P.error "wrong type"}),(case _v59 of {T.TString _val62 -> E.decodeUtf8 _val62; _ -> P.error "wrong type"}))) _val58); _ -> P.error "wrong type"})) (Map.lookup (5) fields), - timParam_interflow = P.maybe (P.Nothing) (\(_,_val51) -> P.Just (case _val51 of {T.TString _val63 -> E.decodeUtf8 _val63; _ -> P.error "wrong type"})) (Map.lookup (6) fields), - timParam_tls = P.maybe (P.Nothing) (\(_,_val51) -> P.Just (case _val51 of {T.TString _val64 -> E.decodeUtf8 _val64; _ -> P.error "wrong type"})) (Map.lookup (7) fields) - } -to_TimParam _ = P.error "not a struct" -read_TimParam :: (T.Transport t, T.Protocol p) => p t -> P.IO TimParam -read_TimParam iprot = to_TimParam <$> T.readVal iprot (T.T_STRUCT typemap_TimParam) -decode_TimParam :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimParam -decode_TimParam iprot bs = to_TimParam $ T.deserializeVal iprot (T.T_STRUCT typemap_TimParam) bs -typemap_TimParam :: T.TypeMap -typemap_TimParam = Map.fromList [(1,("timestamp",T.T_STRING)),(2,("version",T.T_I16)),(3,("lang",T.T_STRING)),(4,("extraList",(T.T_LIST (T.T_STRUCT typemap_TimNode)))),(5,("extraMap",(T.T_MAP T.T_STRING T.T_STRING))),(6,("interflow",T.T_STRING)),(7,("tls",T.T_STRING))] -default_TimParam :: TimParam -default_TimParam = TimParam{ - timParam_timestamp = P.Nothing, - timParam_version = P.Nothing, - timParam_lang = P.Nothing, - timParam_extraList = P.Nothing, - timParam_extraMap = P.Nothing, - timParam_interflow = P.Nothing, - timParam_tls = P.Nothing} -data TimTime = TimTime { timTime_timestamp :: P.Maybe LT.Text - , timTime_formattime :: P.Maybe LT.Text - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimTime where - hashWithSalt salt record = salt `H.hashWithSalt` timTime_timestamp record `H.hashWithSalt` timTime_formattime record -instance QC.Arbitrary TimTime where - arbitrary = M.liftM TimTime (M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - shrink obj | obj == default_TimTime = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimTime{timTime_timestamp = timTime_timestamp obj} then P.Nothing else P.Just $ default_TimTime{timTime_timestamp = timTime_timestamp obj} - , if obj == default_TimTime{timTime_formattime = timTime_formattime obj} then P.Nothing else P.Just $ default_TimTime{timTime_formattime = timTime_formattime obj} - ] -from_TimTime :: TimTime -> T.ThriftVal -from_TimTime record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v67 -> (1, ("timestamp",T.TString $ E.encodeUtf8 _v67))) <$> timTime_timestamp record - , (\_v67 -> (2, ("formattime",T.TString $ E.encodeUtf8 _v67))) <$> timTime_formattime record - ] -write_TimTime :: (T.Protocol p, T.Transport t) => p t -> TimTime -> P.IO () -write_TimTime oprot record = T.writeVal oprot $ from_TimTime record -encode_TimTime :: (T.Protocol p, T.Transport t) => p t -> TimTime -> LBS.ByteString -encode_TimTime oprot record = T.serializeVal oprot $ from_TimTime record -to_TimTime :: T.ThriftVal -> TimTime -to_TimTime (T.TStruct fields) = TimTime{ - timTime_timestamp = P.maybe (P.Nothing) (\(_,_val69) -> P.Just (case _val69 of {T.TString _val70 -> E.decodeUtf8 _val70; _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timTime_formattime = P.maybe (P.Nothing) (\(_,_val69) -> P.Just (case _val69 of {T.TString _val71 -> E.decodeUtf8 _val71; _ -> P.error "wrong type"})) (Map.lookup (2) fields) - } -to_TimTime _ = P.error "not a struct" -read_TimTime :: (T.Transport t, T.Protocol p) => p t -> P.IO TimTime -read_TimTime iprot = to_TimTime <$> T.readVal iprot (T.T_STRUCT typemap_TimTime) -decode_TimTime :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimTime -decode_TimTime iprot bs = to_TimTime $ T.deserializeVal iprot (T.T_STRUCT typemap_TimTime) bs -typemap_TimTime :: T.TypeMap -typemap_TimTime = Map.fromList [(1,("timestamp",T.T_STRING)),(2,("formattime",T.T_STRING))] -default_TimTime :: TimTime -default_TimTime = TimTime{ - timTime_timestamp = P.Nothing, - timTime_formattime = P.Nothing} -data TimArea = TimArea { timArea_country :: P.Maybe LT.Text - , timArea_province :: P.Maybe LT.Text - , timArea_city :: P.Maybe LT.Text - , timArea_extraList :: P.Maybe (Vector.Vector TimNode) - , timArea_extraMap :: P.Maybe (Map.HashMap LT.Text LT.Text) - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimArea where - hashWithSalt salt record = salt `H.hashWithSalt` timArea_country record `H.hashWithSalt` timArea_province record `H.hashWithSalt` timArea_city record `H.hashWithSalt` timArea_extraList record `H.hashWithSalt` timArea_extraMap record -instance QC.Arbitrary TimArea where - arbitrary = M.liftM TimArea (M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - shrink obj | obj == default_TimArea = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimArea{timArea_country = timArea_country obj} then P.Nothing else P.Just $ default_TimArea{timArea_country = timArea_country obj} - , if obj == default_TimArea{timArea_province = timArea_province obj} then P.Nothing else P.Just $ default_TimArea{timArea_province = timArea_province obj} - , if obj == default_TimArea{timArea_city = timArea_city obj} then P.Nothing else P.Just $ default_TimArea{timArea_city = timArea_city obj} - , if obj == default_TimArea{timArea_extraList = timArea_extraList obj} then P.Nothing else P.Just $ default_TimArea{timArea_extraList = timArea_extraList obj} - , if obj == default_TimArea{timArea_extraMap = timArea_extraMap obj} then P.Nothing else P.Just $ default_TimArea{timArea_extraMap = timArea_extraMap obj} - ] -from_TimArea :: TimArea -> T.ThriftVal -from_TimArea record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v74 -> (1, ("country",T.TString $ E.encodeUtf8 _v74))) <$> timArea_country record - , (\_v74 -> (2, ("province",T.TString $ E.encodeUtf8 _v74))) <$> timArea_province record - , (\_v74 -> (3, ("city",T.TString $ E.encodeUtf8 _v74))) <$> timArea_city record - , (\_v74 -> (4, ("extraList",T.TList (T.T_STRUCT typemap_TimNode) $ P.map (\_v76 -> from_TimNode _v76) $ Vector.toList _v74))) <$> timArea_extraList record - , (\_v74 -> (5, ("extraMap",T.TMap T.T_STRING T.T_STRING $ P.map (\(_k77,_v78) -> (T.TString $ E.encodeUtf8 _k77, T.TString $ E.encodeUtf8 _v78)) $ Map.toList _v74))) <$> timArea_extraMap record - ] -write_TimArea :: (T.Protocol p, T.Transport t) => p t -> TimArea -> P.IO () -write_TimArea oprot record = T.writeVal oprot $ from_TimArea record -encode_TimArea :: (T.Protocol p, T.Transport t) => p t -> TimArea -> LBS.ByteString -encode_TimArea oprot record = T.serializeVal oprot $ from_TimArea record -to_TimArea :: T.ThriftVal -> TimArea -to_TimArea (T.TStruct fields) = TimArea{ - timArea_country = P.maybe (P.Nothing) (\(_,_val80) -> P.Just (case _val80 of {T.TString _val81 -> E.decodeUtf8 _val81; _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timArea_province = P.maybe (P.Nothing) (\(_,_val80) -> P.Just (case _val80 of {T.TString _val82 -> E.decodeUtf8 _val82; _ -> P.error "wrong type"})) (Map.lookup (2) fields), - timArea_city = P.maybe (P.Nothing) (\(_,_val80) -> P.Just (case _val80 of {T.TString _val83 -> E.decodeUtf8 _val83; _ -> P.error "wrong type"})) (Map.lookup (3) fields), - timArea_extraList = P.maybe (P.Nothing) (\(_,_val80) -> P.Just (case _val80 of {T.TList _ _val84 -> (Vector.fromList $ P.map (\_v85 -> (case _v85 of {T.TStruct _val86 -> (to_TimNode (T.TStruct _val86)); _ -> P.error "wrong type"})) _val84); _ -> P.error "wrong type"})) (Map.lookup (4) fields), - timArea_extraMap = P.maybe (P.Nothing) (\(_,_val80) -> P.Just (case _val80 of {T.TMap _ _ _val87 -> (Map.fromList $ P.map (\(_k89,_v88) -> ((case _k89 of {T.TString _val90 -> E.decodeUtf8 _val90; _ -> P.error "wrong type"}),(case _v88 of {T.TString _val91 -> E.decodeUtf8 _val91; _ -> P.error "wrong type"}))) _val87); _ -> P.error "wrong type"})) (Map.lookup (5) fields) - } -to_TimArea _ = P.error "not a struct" -read_TimArea :: (T.Transport t, T.Protocol p) => p t -> P.IO TimArea -read_TimArea iprot = to_TimArea <$> T.readVal iprot (T.T_STRUCT typemap_TimArea) -decode_TimArea :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimArea -decode_TimArea iprot bs = to_TimArea $ T.deserializeVal iprot (T.T_STRUCT typemap_TimArea) bs -typemap_TimArea :: T.TypeMap -typemap_TimArea = Map.fromList [(1,("country",T.T_STRING)),(2,("province",T.T_STRING)),(3,("city",T.T_STRING)),(4,("extraList",(T.T_LIST (T.T_STRUCT typemap_TimNode)))),(5,("extraMap",(T.T_MAP T.T_STRING T.T_STRING)))] -default_TimArea :: TimArea -default_TimArea = TimArea{ - timArea_country = P.Nothing, - timArea_province = P.Nothing, - timArea_city = P.Nothing, - timArea_extraList = P.Nothing, - timArea_extraMap = P.Nothing} -data Tid = Tid { tid_name :: LT.Text - , tid_domain :: P.Maybe LT.Text - , tid_resource :: P.Maybe LT.Text - , tid_type :: P.Maybe LT.Text - , tid_extraList :: P.Maybe (Vector.Vector TimNode) - , tid_extraMap :: P.Maybe (Map.HashMap LT.Text LT.Text) - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable Tid where - hashWithSalt salt record = salt `H.hashWithSalt` tid_name record `H.hashWithSalt` tid_domain record `H.hashWithSalt` tid_resource record `H.hashWithSalt` tid_type record `H.hashWithSalt` tid_extraList record `H.hashWithSalt` tid_extraMap record -instance QC.Arbitrary Tid where - arbitrary = M.liftM Tid (QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - shrink obj | obj == default_Tid = [] - | P.otherwise = M.catMaybes - [ if obj == default_Tid{tid_name = tid_name obj} then P.Nothing else P.Just $ default_Tid{tid_name = tid_name obj} - , if obj == default_Tid{tid_domain = tid_domain obj} then P.Nothing else P.Just $ default_Tid{tid_domain = tid_domain obj} - , if obj == default_Tid{tid_resource = tid_resource obj} then P.Nothing else P.Just $ default_Tid{tid_resource = tid_resource obj} - , if obj == default_Tid{tid_type = tid_type obj} then P.Nothing else P.Just $ default_Tid{tid_type = tid_type obj} - , if obj == default_Tid{tid_extraList = tid_extraList obj} then P.Nothing else P.Just $ default_Tid{tid_extraList = tid_extraList obj} - , if obj == default_Tid{tid_extraMap = tid_extraMap obj} then P.Nothing else P.Just $ default_Tid{tid_extraMap = tid_extraMap obj} - ] -from_Tid :: Tid -> T.ThriftVal -from_Tid record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v94 -> P.Just (1, ("name",T.TString $ E.encodeUtf8 _v94))) $ tid_name record - , (\_v94 -> (2, ("domain",T.TString $ E.encodeUtf8 _v94))) <$> tid_domain record - , (\_v94 -> (3, ("resource",T.TString $ E.encodeUtf8 _v94))) <$> tid_resource record - , (\_v94 -> (4, ("type",T.TString $ E.encodeUtf8 _v94))) <$> tid_type record - , (\_v94 -> (5, ("extraList",T.TList (T.T_STRUCT typemap_TimNode) $ P.map (\_v96 -> from_TimNode _v96) $ Vector.toList _v94))) <$> tid_extraList record - , (\_v94 -> (6, ("extraMap",T.TMap T.T_STRING T.T_STRING $ P.map (\(_k97,_v98) -> (T.TString $ E.encodeUtf8 _k97, T.TString $ E.encodeUtf8 _v98)) $ Map.toList _v94))) <$> tid_extraMap record - ] -write_Tid :: (T.Protocol p, T.Transport t) => p t -> Tid -> P.IO () -write_Tid oprot record = T.writeVal oprot $ from_Tid record -encode_Tid :: (T.Protocol p, T.Transport t) => p t -> Tid -> LBS.ByteString -encode_Tid oprot record = T.serializeVal oprot $ from_Tid record -to_Tid :: T.ThriftVal -> Tid -to_Tid (T.TStruct fields) = Tid{ - tid_name = P.maybe (P.error "Missing required field: name") (\(_,_val100) -> (case _val100 of {T.TString _val101 -> E.decodeUtf8 _val101; _ -> P.error "wrong type"})) (Map.lookup (1) fields), - tid_domain = P.maybe (P.Nothing) (\(_,_val100) -> P.Just (case _val100 of {T.TString _val102 -> E.decodeUtf8 _val102; _ -> P.error "wrong type"})) (Map.lookup (2) fields), - tid_resource = P.maybe (P.Nothing) (\(_,_val100) -> P.Just (case _val100 of {T.TString _val103 -> E.decodeUtf8 _val103; _ -> P.error "wrong type"})) (Map.lookup (3) fields), - tid_type = P.maybe (P.Nothing) (\(_,_val100) -> P.Just (case _val100 of {T.TString _val104 -> E.decodeUtf8 _val104; _ -> P.error "wrong type"})) (Map.lookup (4) fields), - tid_extraList = P.maybe (P.Nothing) (\(_,_val100) -> P.Just (case _val100 of {T.TList _ _val105 -> (Vector.fromList $ P.map (\_v106 -> (case _v106 of {T.TStruct _val107 -> (to_TimNode (T.TStruct _val107)); _ -> P.error "wrong type"})) _val105); _ -> P.error "wrong type"})) (Map.lookup (5) fields), - tid_extraMap = P.maybe (P.Nothing) (\(_,_val100) -> P.Just (case _val100 of {T.TMap _ _ _val108 -> (Map.fromList $ P.map (\(_k110,_v109) -> ((case _k110 of {T.TString _val111 -> E.decodeUtf8 _val111; _ -> P.error "wrong type"}),(case _v109 of {T.TString _val112 -> E.decodeUtf8 _val112; _ -> P.error "wrong type"}))) _val108); _ -> P.error "wrong type"})) (Map.lookup (6) fields) - } -to_Tid _ = P.error "not a struct" -read_Tid :: (T.Transport t, T.Protocol p) => p t -> P.IO Tid -read_Tid iprot = to_Tid <$> T.readVal iprot (T.T_STRUCT typemap_Tid) -decode_Tid :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> Tid -decode_Tid iprot bs = to_Tid $ T.deserializeVal iprot (T.T_STRUCT typemap_Tid) bs -typemap_Tid :: T.TypeMap -typemap_Tid = Map.fromList [(1,("name",T.T_STRING)),(2,("domain",T.T_STRING)),(3,("resource",T.T_STRING)),(4,("type",T.T_STRING)),(5,("extraList",(T.T_LIST (T.T_STRUCT typemap_TimNode)))),(6,("extraMap",(T.T_MAP T.T_STRING T.T_STRING)))] -default_Tid :: Tid -default_Tid = Tid{ - tid_name = "", - tid_domain = P.Nothing, - tid_resource = P.Nothing, - tid_type = P.Nothing, - tid_extraList = P.Nothing, - tid_extraMap = P.Nothing} -data TimUserBean = TimUserBean { timUserBean_tid :: P.Maybe Tid - , timUserBean_nickname :: P.Maybe LT.Text - , timUserBean_remarkname :: P.Maybe LT.Text - , timUserBean_brithday :: P.Maybe LT.Text - , timUserBean_gender :: P.Maybe I.Int16 - , timUserBean_headurl :: P.Maybe LT.Text - , timUserBean_area :: P.Maybe TimArea - , timUserBean_headbyte :: P.Maybe LBS.ByteString - , timUserBean_photoBytes :: P.Maybe (Vector.Vector LBS.ByteString) - , timUserBean_extraList :: P.Maybe (Vector.Vector TimNode) - , timUserBean_extraMap :: P.Maybe (Map.HashMap LT.Text LT.Text) - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimUserBean where - hashWithSalt salt record = salt `H.hashWithSalt` timUserBean_tid record `H.hashWithSalt` timUserBean_nickname record `H.hashWithSalt` timUserBean_remarkname record `H.hashWithSalt` timUserBean_brithday record `H.hashWithSalt` timUserBean_gender record `H.hashWithSalt` timUserBean_headurl record `H.hashWithSalt` timUserBean_area record `H.hashWithSalt` timUserBean_headbyte record `H.hashWithSalt` timUserBean_photoBytes record `H.hashWithSalt` timUserBean_extraList record `H.hashWithSalt` timUserBean_extraMap record -instance QC.Arbitrary TimUserBean where - arbitrary = M.liftM TimUserBean (M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - shrink obj | obj == default_TimUserBean = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimUserBean{timUserBean_tid = timUserBean_tid obj} then P.Nothing else P.Just $ default_TimUserBean{timUserBean_tid = timUserBean_tid obj} - , if obj == default_TimUserBean{timUserBean_nickname = timUserBean_nickname obj} then P.Nothing else P.Just $ default_TimUserBean{timUserBean_nickname = timUserBean_nickname obj} - , if obj == default_TimUserBean{timUserBean_remarkname = timUserBean_remarkname obj} then P.Nothing else P.Just $ default_TimUserBean{timUserBean_remarkname = timUserBean_remarkname obj} - , if obj == default_TimUserBean{timUserBean_brithday = timUserBean_brithday obj} then P.Nothing else P.Just $ default_TimUserBean{timUserBean_brithday = timUserBean_brithday obj} - , if obj == default_TimUserBean{timUserBean_gender = timUserBean_gender obj} then P.Nothing else P.Just $ default_TimUserBean{timUserBean_gender = timUserBean_gender obj} - , if obj == default_TimUserBean{timUserBean_headurl = timUserBean_headurl obj} then P.Nothing else P.Just $ default_TimUserBean{timUserBean_headurl = timUserBean_headurl obj} - , if obj == default_TimUserBean{timUserBean_area = timUserBean_area obj} then P.Nothing else P.Just $ default_TimUserBean{timUserBean_area = timUserBean_area obj} - , if obj == default_TimUserBean{timUserBean_headbyte = timUserBean_headbyte obj} then P.Nothing else P.Just $ default_TimUserBean{timUserBean_headbyte = timUserBean_headbyte obj} - , if obj == default_TimUserBean{timUserBean_photoBytes = timUserBean_photoBytes obj} then P.Nothing else P.Just $ default_TimUserBean{timUserBean_photoBytes = timUserBean_photoBytes obj} - , if obj == default_TimUserBean{timUserBean_extraList = timUserBean_extraList obj} then P.Nothing else P.Just $ default_TimUserBean{timUserBean_extraList = timUserBean_extraList obj} - , if obj == default_TimUserBean{timUserBean_extraMap = timUserBean_extraMap obj} then P.Nothing else P.Just $ default_TimUserBean{timUserBean_extraMap = timUserBean_extraMap obj} - ] -from_TimUserBean :: TimUserBean -> T.ThriftVal -from_TimUserBean record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v115 -> (1, ("tid",from_Tid _v115))) <$> timUserBean_tid record - , (\_v115 -> (2, ("nickname",T.TString $ E.encodeUtf8 _v115))) <$> timUserBean_nickname record - , (\_v115 -> (3, ("remarkname",T.TString $ E.encodeUtf8 _v115))) <$> timUserBean_remarkname record - , (\_v115 -> (4, ("brithday",T.TString $ E.encodeUtf8 _v115))) <$> timUserBean_brithday record - , (\_v115 -> (5, ("gender",T.TI16 _v115))) <$> timUserBean_gender record - , (\_v115 -> (6, ("headurl",T.TString $ E.encodeUtf8 _v115))) <$> timUserBean_headurl record - , (\_v115 -> (7, ("area",from_TimArea _v115))) <$> timUserBean_area record - , (\_v115 -> (8, ("headbyte",T.TString _v115))) <$> timUserBean_headbyte record - , (\_v115 -> (9, ("photoBytes",T.TList T.T_STRING $ P.map (\_v117 -> T.TString _v117) $ Vector.toList _v115))) <$> timUserBean_photoBytes record - , (\_v115 -> (10, ("extraList",T.TList (T.T_STRUCT typemap_TimNode) $ P.map (\_v119 -> from_TimNode _v119) $ Vector.toList _v115))) <$> timUserBean_extraList record - , (\_v115 -> (11, ("extraMap",T.TMap T.T_STRING T.T_STRING $ P.map (\(_k120,_v121) -> (T.TString $ E.encodeUtf8 _k120, T.TString $ E.encodeUtf8 _v121)) $ Map.toList _v115))) <$> timUserBean_extraMap record - ] -write_TimUserBean :: (T.Protocol p, T.Transport t) => p t -> TimUserBean -> P.IO () -write_TimUserBean oprot record = T.writeVal oprot $ from_TimUserBean record -encode_TimUserBean :: (T.Protocol p, T.Transport t) => p t -> TimUserBean -> LBS.ByteString -encode_TimUserBean oprot record = T.serializeVal oprot $ from_TimUserBean record -to_TimUserBean :: T.ThriftVal -> TimUserBean -to_TimUserBean (T.TStruct fields) = TimUserBean{ - timUserBean_tid = P.maybe (P.Nothing) (\(_,_val123) -> P.Just (case _val123 of {T.TStruct _val124 -> (to_Tid (T.TStruct _val124)); _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timUserBean_nickname = P.maybe (P.Nothing) (\(_,_val123) -> P.Just (case _val123 of {T.TString _val125 -> E.decodeUtf8 _val125; _ -> P.error "wrong type"})) (Map.lookup (2) fields), - timUserBean_remarkname = P.maybe (P.Nothing) (\(_,_val123) -> P.Just (case _val123 of {T.TString _val126 -> E.decodeUtf8 _val126; _ -> P.error "wrong type"})) (Map.lookup (3) fields), - timUserBean_brithday = P.maybe (P.Nothing) (\(_,_val123) -> P.Just (case _val123 of {T.TString _val127 -> E.decodeUtf8 _val127; _ -> P.error "wrong type"})) (Map.lookup (4) fields), - timUserBean_gender = P.maybe (P.Nothing) (\(_,_val123) -> P.Just (case _val123 of {T.TI16 _val128 -> _val128; _ -> P.error "wrong type"})) (Map.lookup (5) fields), - timUserBean_headurl = P.maybe (P.Nothing) (\(_,_val123) -> P.Just (case _val123 of {T.TString _val129 -> E.decodeUtf8 _val129; _ -> P.error "wrong type"})) (Map.lookup (6) fields), - timUserBean_area = P.maybe (P.Nothing) (\(_,_val123) -> P.Just (case _val123 of {T.TStruct _val130 -> (to_TimArea (T.TStruct _val130)); _ -> P.error "wrong type"})) (Map.lookup (7) fields), - timUserBean_headbyte = P.maybe (P.Nothing) (\(_,_val123) -> P.Just (case _val123 of {T.TString _val131 -> _val131; _ -> P.error "wrong type"})) (Map.lookup (8) fields), - timUserBean_photoBytes = P.maybe (P.Nothing) (\(_,_val123) -> P.Just (case _val123 of {T.TList _ _val132 -> (Vector.fromList $ P.map (\_v133 -> (case _v133 of {T.TString _val134 -> _val134; _ -> P.error "wrong type"})) _val132); _ -> P.error "wrong type"})) (Map.lookup (9) fields), - timUserBean_extraList = P.maybe (P.Nothing) (\(_,_val123) -> P.Just (case _val123 of {T.TList _ _val135 -> (Vector.fromList $ P.map (\_v136 -> (case _v136 of {T.TStruct _val137 -> (to_TimNode (T.TStruct _val137)); _ -> P.error "wrong type"})) _val135); _ -> P.error "wrong type"})) (Map.lookup (10) fields), - timUserBean_extraMap = P.maybe (P.Nothing) (\(_,_val123) -> P.Just (case _val123 of {T.TMap _ _ _val138 -> (Map.fromList $ P.map (\(_k140,_v139) -> ((case _k140 of {T.TString _val141 -> E.decodeUtf8 _val141; _ -> P.error "wrong type"}),(case _v139 of {T.TString _val142 -> E.decodeUtf8 _val142; _ -> P.error "wrong type"}))) _val138); _ -> P.error "wrong type"})) (Map.lookup (11) fields) - } -to_TimUserBean _ = P.error "not a struct" -read_TimUserBean :: (T.Transport t, T.Protocol p) => p t -> P.IO TimUserBean -read_TimUserBean iprot = to_TimUserBean <$> T.readVal iprot (T.T_STRUCT typemap_TimUserBean) -decode_TimUserBean :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimUserBean -decode_TimUserBean iprot bs = to_TimUserBean $ T.deserializeVal iprot (T.T_STRUCT typemap_TimUserBean) bs -typemap_TimUserBean :: T.TypeMap -typemap_TimUserBean = Map.fromList [(1,("tid",(T.T_STRUCT typemap_Tid))),(2,("nickname",T.T_STRING)),(3,("remarkname",T.T_STRING)),(4,("brithday",T.T_STRING)),(5,("gender",T.T_I16)),(6,("headurl",T.T_STRING)),(7,("area",(T.T_STRUCT typemap_TimArea))),(8,("headbyte",T.T_STRING)),(9,("photoBytes",(T.T_LIST T.T_STRING))),(10,("extraList",(T.T_LIST (T.T_STRUCT typemap_TimNode)))),(11,("extraMap",(T.T_MAP T.T_STRING T.T_STRING)))] -default_TimUserBean :: TimUserBean -default_TimUserBean = TimUserBean{ - timUserBean_tid = P.Nothing, - timUserBean_nickname = P.Nothing, - timUserBean_remarkname = P.Nothing, - timUserBean_brithday = P.Nothing, - timUserBean_gender = P.Nothing, - timUserBean_headurl = P.Nothing, - timUserBean_area = P.Nothing, - timUserBean_headbyte = P.Nothing, - timUserBean_photoBytes = P.Nothing, - timUserBean_extraList = P.Nothing, - timUserBean_extraMap = P.Nothing} -data TimRoom = TimRoom { timRoom_tid :: P.Maybe Tid - , timRoom_founderTid :: P.Maybe Tid - , timRoom_HostsTid :: P.Maybe (Vector.Vector Tid) - , timRoom_membersTid :: P.Maybe (Vector.Vector Tid) - , timRoom_headurl :: P.Maybe LT.Text - , timRoom_roomName :: P.Maybe LT.Text - , timRoom_desc :: P.Maybe LT.Text - , timRoom_createTime :: P.Maybe TimTime - , timRoom_extraList :: P.Maybe (Vector.Vector TimNode) - , timRoom_extraMap :: P.Maybe (Map.HashMap LT.Text LT.Text) - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimRoom where - hashWithSalt salt record = salt `H.hashWithSalt` timRoom_tid record `H.hashWithSalt` timRoom_founderTid record `H.hashWithSalt` timRoom_HostsTid record `H.hashWithSalt` timRoom_membersTid record `H.hashWithSalt` timRoom_headurl record `H.hashWithSalt` timRoom_roomName record `H.hashWithSalt` timRoom_desc record `H.hashWithSalt` timRoom_createTime record `H.hashWithSalt` timRoom_extraList record `H.hashWithSalt` timRoom_extraMap record -instance QC.Arbitrary TimRoom where - arbitrary = M.liftM TimRoom (M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - shrink obj | obj == default_TimRoom = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimRoom{timRoom_tid = timRoom_tid obj} then P.Nothing else P.Just $ default_TimRoom{timRoom_tid = timRoom_tid obj} - , if obj == default_TimRoom{timRoom_founderTid = timRoom_founderTid obj} then P.Nothing else P.Just $ default_TimRoom{timRoom_founderTid = timRoom_founderTid obj} - , if obj == default_TimRoom{timRoom_HostsTid = timRoom_HostsTid obj} then P.Nothing else P.Just $ default_TimRoom{timRoom_HostsTid = timRoom_HostsTid obj} - , if obj == default_TimRoom{timRoom_membersTid = timRoom_membersTid obj} then P.Nothing else P.Just $ default_TimRoom{timRoom_membersTid = timRoom_membersTid obj} - , if obj == default_TimRoom{timRoom_headurl = timRoom_headurl obj} then P.Nothing else P.Just $ default_TimRoom{timRoom_headurl = timRoom_headurl obj} - , if obj == default_TimRoom{timRoom_roomName = timRoom_roomName obj} then P.Nothing else P.Just $ default_TimRoom{timRoom_roomName = timRoom_roomName obj} - , if obj == default_TimRoom{timRoom_desc = timRoom_desc obj} then P.Nothing else P.Just $ default_TimRoom{timRoom_desc = timRoom_desc obj} - , if obj == default_TimRoom{timRoom_createTime = timRoom_createTime obj} then P.Nothing else P.Just $ default_TimRoom{timRoom_createTime = timRoom_createTime obj} - , if obj == default_TimRoom{timRoom_extraList = timRoom_extraList obj} then P.Nothing else P.Just $ default_TimRoom{timRoom_extraList = timRoom_extraList obj} - , if obj == default_TimRoom{timRoom_extraMap = timRoom_extraMap obj} then P.Nothing else P.Just $ default_TimRoom{timRoom_extraMap = timRoom_extraMap obj} - ] -from_TimRoom :: TimRoom -> T.ThriftVal -from_TimRoom record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v145 -> (1, ("tid",from_Tid _v145))) <$> timRoom_tid record - , (\_v145 -> (2, ("founderTid",from_Tid _v145))) <$> timRoom_founderTid record - , (\_v145 -> (3, ("HostsTid",T.TList (T.T_STRUCT typemap_Tid) $ P.map (\_v147 -> from_Tid _v147) $ Vector.toList _v145))) <$> timRoom_HostsTid record - , (\_v145 -> (4, ("membersTid",T.TList (T.T_STRUCT typemap_Tid) $ P.map (\_v149 -> from_Tid _v149) $ Vector.toList _v145))) <$> timRoom_membersTid record - , (\_v145 -> (5, ("headurl",T.TString $ E.encodeUtf8 _v145))) <$> timRoom_headurl record - , (\_v145 -> (6, ("roomName",T.TString $ E.encodeUtf8 _v145))) <$> timRoom_roomName record - , (\_v145 -> (7, ("desc",T.TString $ E.encodeUtf8 _v145))) <$> timRoom_desc record - , (\_v145 -> (8, ("createTime",from_TimTime _v145))) <$> timRoom_createTime record - , (\_v145 -> (9, ("extraList",T.TList (T.T_STRUCT typemap_TimNode) $ P.map (\_v151 -> from_TimNode _v151) $ Vector.toList _v145))) <$> timRoom_extraList record - , (\_v145 -> (10, ("extraMap",T.TMap T.T_STRING T.T_STRING $ P.map (\(_k152,_v153) -> (T.TString $ E.encodeUtf8 _k152, T.TString $ E.encodeUtf8 _v153)) $ Map.toList _v145))) <$> timRoom_extraMap record - ] -write_TimRoom :: (T.Protocol p, T.Transport t) => p t -> TimRoom -> P.IO () -write_TimRoom oprot record = T.writeVal oprot $ from_TimRoom record -encode_TimRoom :: (T.Protocol p, T.Transport t) => p t -> TimRoom -> LBS.ByteString -encode_TimRoom oprot record = T.serializeVal oprot $ from_TimRoom record -to_TimRoom :: T.ThriftVal -> TimRoom -to_TimRoom (T.TStruct fields) = TimRoom{ - timRoom_tid = P.maybe (P.Nothing) (\(_,_val155) -> P.Just (case _val155 of {T.TStruct _val156 -> (to_Tid (T.TStruct _val156)); _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timRoom_founderTid = P.maybe (P.Nothing) (\(_,_val155) -> P.Just (case _val155 of {T.TStruct _val157 -> (to_Tid (T.TStruct _val157)); _ -> P.error "wrong type"})) (Map.lookup (2) fields), - timRoom_HostsTid = P.maybe (P.Nothing) (\(_,_val155) -> P.Just (case _val155 of {T.TList _ _val158 -> (Vector.fromList $ P.map (\_v159 -> (case _v159 of {T.TStruct _val160 -> (to_Tid (T.TStruct _val160)); _ -> P.error "wrong type"})) _val158); _ -> P.error "wrong type"})) (Map.lookup (3) fields), - timRoom_membersTid = P.maybe (P.Nothing) (\(_,_val155) -> P.Just (case _val155 of {T.TList _ _val161 -> (Vector.fromList $ P.map (\_v162 -> (case _v162 of {T.TStruct _val163 -> (to_Tid (T.TStruct _val163)); _ -> P.error "wrong type"})) _val161); _ -> P.error "wrong type"})) (Map.lookup (4) fields), - timRoom_headurl = P.maybe (P.Nothing) (\(_,_val155) -> P.Just (case _val155 of {T.TString _val164 -> E.decodeUtf8 _val164; _ -> P.error "wrong type"})) (Map.lookup (5) fields), - timRoom_roomName = P.maybe (P.Nothing) (\(_,_val155) -> P.Just (case _val155 of {T.TString _val165 -> E.decodeUtf8 _val165; _ -> P.error "wrong type"})) (Map.lookup (6) fields), - timRoom_desc = P.maybe (P.Nothing) (\(_,_val155) -> P.Just (case _val155 of {T.TString _val166 -> E.decodeUtf8 _val166; _ -> P.error "wrong type"})) (Map.lookup (7) fields), - timRoom_createTime = P.maybe (P.Nothing) (\(_,_val155) -> P.Just (case _val155 of {T.TStruct _val167 -> (to_TimTime (T.TStruct _val167)); _ -> P.error "wrong type"})) (Map.lookup (8) fields), - timRoom_extraList = P.maybe (P.Nothing) (\(_,_val155) -> P.Just (case _val155 of {T.TList _ _val168 -> (Vector.fromList $ P.map (\_v169 -> (case _v169 of {T.TStruct _val170 -> (to_TimNode (T.TStruct _val170)); _ -> P.error "wrong type"})) _val168); _ -> P.error "wrong type"})) (Map.lookup (9) fields), - timRoom_extraMap = P.maybe (P.Nothing) (\(_,_val155) -> P.Just (case _val155 of {T.TMap _ _ _val171 -> (Map.fromList $ P.map (\(_k173,_v172) -> ((case _k173 of {T.TString _val174 -> E.decodeUtf8 _val174; _ -> P.error "wrong type"}),(case _v172 of {T.TString _val175 -> E.decodeUtf8 _val175; _ -> P.error "wrong type"}))) _val171); _ -> P.error "wrong type"})) (Map.lookup (10) fields) - } -to_TimRoom _ = P.error "not a struct" -read_TimRoom :: (T.Transport t, T.Protocol p) => p t -> P.IO TimRoom -read_TimRoom iprot = to_TimRoom <$> T.readVal iprot (T.T_STRUCT typemap_TimRoom) -decode_TimRoom :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimRoom -decode_TimRoom iprot bs = to_TimRoom $ T.deserializeVal iprot (T.T_STRUCT typemap_TimRoom) bs -typemap_TimRoom :: T.TypeMap -typemap_TimRoom = Map.fromList [(1,("tid",(T.T_STRUCT typemap_Tid))),(2,("founderTid",(T.T_STRUCT typemap_Tid))),(3,("HostsTid",(T.T_LIST (T.T_STRUCT typemap_Tid)))),(4,("membersTid",(T.T_LIST (T.T_STRUCT typemap_Tid)))),(5,("headurl",T.T_STRING)),(6,("roomName",T.T_STRING)),(7,("desc",T.T_STRING)),(8,("createTime",(T.T_STRUCT typemap_TimTime))),(9,("extraList",(T.T_LIST (T.T_STRUCT typemap_TimNode)))),(10,("extraMap",(T.T_MAP T.T_STRING T.T_STRING)))] -default_TimRoom :: TimRoom -default_TimRoom = TimRoom{ - timRoom_tid = P.Nothing, - timRoom_founderTid = P.Nothing, - timRoom_HostsTid = P.Nothing, - timRoom_membersTid = P.Nothing, - timRoom_headurl = P.Nothing, - timRoom_roomName = P.Nothing, - timRoom_desc = P.Nothing, - timRoom_createTime = P.Nothing, - timRoom_extraList = P.Nothing, - timRoom_extraMap = P.Nothing} -data TimPBean = TimPBean { timPBean_threadId :: LT.Text - , timPBean_fromTid :: P.Maybe Tid - , timPBean_toTid :: P.Maybe Tid - , timPBean_status :: P.Maybe LT.Text - , timPBean_type :: P.Maybe LT.Text - , timPBean_priority :: P.Maybe I.Int32 - , timPBean_show :: P.Maybe LT.Text - , timPBean_leaguerTid :: P.Maybe Tid - , timPBean_extraList :: P.Maybe (Vector.Vector TimNode) - , timPBean_error :: P.Maybe TimError - , timPBean_extraMap :: P.Maybe (Map.HashMap LT.Text LT.Text) - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimPBean where - hashWithSalt salt record = salt `H.hashWithSalt` timPBean_threadId record `H.hashWithSalt` timPBean_fromTid record `H.hashWithSalt` timPBean_toTid record `H.hashWithSalt` timPBean_status record `H.hashWithSalt` timPBean_type record `H.hashWithSalt` timPBean_priority record `H.hashWithSalt` timPBean_show record `H.hashWithSalt` timPBean_leaguerTid record `H.hashWithSalt` timPBean_extraList record `H.hashWithSalt` timPBean_error record `H.hashWithSalt` timPBean_extraMap record -instance QC.Arbitrary TimPBean where - arbitrary = M.liftM TimPBean (QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - shrink obj | obj == default_TimPBean = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimPBean{timPBean_threadId = timPBean_threadId obj} then P.Nothing else P.Just $ default_TimPBean{timPBean_threadId = timPBean_threadId obj} - , if obj == default_TimPBean{timPBean_fromTid = timPBean_fromTid obj} then P.Nothing else P.Just $ default_TimPBean{timPBean_fromTid = timPBean_fromTid obj} - , if obj == default_TimPBean{timPBean_toTid = timPBean_toTid obj} then P.Nothing else P.Just $ default_TimPBean{timPBean_toTid = timPBean_toTid obj} - , if obj == default_TimPBean{timPBean_status = timPBean_status obj} then P.Nothing else P.Just $ default_TimPBean{timPBean_status = timPBean_status obj} - , if obj == default_TimPBean{timPBean_type = timPBean_type obj} then P.Nothing else P.Just $ default_TimPBean{timPBean_type = timPBean_type obj} - , if obj == default_TimPBean{timPBean_priority = timPBean_priority obj} then P.Nothing else P.Just $ default_TimPBean{timPBean_priority = timPBean_priority obj} - , if obj == default_TimPBean{timPBean_show = timPBean_show obj} then P.Nothing else P.Just $ default_TimPBean{timPBean_show = timPBean_show obj} - , if obj == default_TimPBean{timPBean_leaguerTid = timPBean_leaguerTid obj} then P.Nothing else P.Just $ default_TimPBean{timPBean_leaguerTid = timPBean_leaguerTid obj} - , if obj == default_TimPBean{timPBean_extraList = timPBean_extraList obj} then P.Nothing else P.Just $ default_TimPBean{timPBean_extraList = timPBean_extraList obj} - , if obj == default_TimPBean{timPBean_error = timPBean_error obj} then P.Nothing else P.Just $ default_TimPBean{timPBean_error = timPBean_error obj} - , if obj == default_TimPBean{timPBean_extraMap = timPBean_extraMap obj} then P.Nothing else P.Just $ default_TimPBean{timPBean_extraMap = timPBean_extraMap obj} - ] -from_TimPBean :: TimPBean -> T.ThriftVal -from_TimPBean record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v178 -> P.Just (1, ("threadId",T.TString $ E.encodeUtf8 _v178))) $ timPBean_threadId record - , (\_v178 -> (2, ("fromTid",from_Tid _v178))) <$> timPBean_fromTid record - , (\_v178 -> (3, ("toTid",from_Tid _v178))) <$> timPBean_toTid record - , (\_v178 -> (4, ("status",T.TString $ E.encodeUtf8 _v178))) <$> timPBean_status record - , (\_v178 -> (5, ("type",T.TString $ E.encodeUtf8 _v178))) <$> timPBean_type record - , (\_v178 -> (6, ("priority",T.TI32 _v178))) <$> timPBean_priority record - , (\_v178 -> (7, ("show",T.TString $ E.encodeUtf8 _v178))) <$> timPBean_show record - , (\_v178 -> (8, ("leaguerTid",from_Tid _v178))) <$> timPBean_leaguerTid record - , (\_v178 -> (9, ("extraList",T.TList (T.T_STRUCT typemap_TimNode) $ P.map (\_v180 -> from_TimNode _v180) $ Vector.toList _v178))) <$> timPBean_extraList record - , (\_v178 -> (10, ("error",from_TimError _v178))) <$> timPBean_error record - , (\_v178 -> (11, ("extraMap",T.TMap T.T_STRING T.T_STRING $ P.map (\(_k181,_v182) -> (T.TString $ E.encodeUtf8 _k181, T.TString $ E.encodeUtf8 _v182)) $ Map.toList _v178))) <$> timPBean_extraMap record - ] -write_TimPBean :: (T.Protocol p, T.Transport t) => p t -> TimPBean -> P.IO () -write_TimPBean oprot record = T.writeVal oprot $ from_TimPBean record -encode_TimPBean :: (T.Protocol p, T.Transport t) => p t -> TimPBean -> LBS.ByteString -encode_TimPBean oprot record = T.serializeVal oprot $ from_TimPBean record -to_TimPBean :: T.ThriftVal -> TimPBean -to_TimPBean (T.TStruct fields) = TimPBean{ - timPBean_threadId = P.maybe (P.error "Missing required field: threadId") (\(_,_val184) -> (case _val184 of {T.TString _val185 -> E.decodeUtf8 _val185; _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timPBean_fromTid = P.maybe (P.Nothing) (\(_,_val184) -> P.Just (case _val184 of {T.TStruct _val186 -> (to_Tid (T.TStruct _val186)); _ -> P.error "wrong type"})) (Map.lookup (2) fields), - timPBean_toTid = P.maybe (P.Nothing) (\(_,_val184) -> P.Just (case _val184 of {T.TStruct _val187 -> (to_Tid (T.TStruct _val187)); _ -> P.error "wrong type"})) (Map.lookup (3) fields), - timPBean_status = P.maybe (P.Nothing) (\(_,_val184) -> P.Just (case _val184 of {T.TString _val188 -> E.decodeUtf8 _val188; _ -> P.error "wrong type"})) (Map.lookup (4) fields), - timPBean_type = P.maybe (P.Nothing) (\(_,_val184) -> P.Just (case _val184 of {T.TString _val189 -> E.decodeUtf8 _val189; _ -> P.error "wrong type"})) (Map.lookup (5) fields), - timPBean_priority = P.maybe (P.Nothing) (\(_,_val184) -> P.Just (case _val184 of {T.TI32 _val190 -> _val190; _ -> P.error "wrong type"})) (Map.lookup (6) fields), - timPBean_show = P.maybe (P.Nothing) (\(_,_val184) -> P.Just (case _val184 of {T.TString _val191 -> E.decodeUtf8 _val191; _ -> P.error "wrong type"})) (Map.lookup (7) fields), - timPBean_leaguerTid = P.maybe (P.Nothing) (\(_,_val184) -> P.Just (case _val184 of {T.TStruct _val192 -> (to_Tid (T.TStruct _val192)); _ -> P.error "wrong type"})) (Map.lookup (8) fields), - timPBean_extraList = P.maybe (P.Nothing) (\(_,_val184) -> P.Just (case _val184 of {T.TList _ _val193 -> (Vector.fromList $ P.map (\_v194 -> (case _v194 of {T.TStruct _val195 -> (to_TimNode (T.TStruct _val195)); _ -> P.error "wrong type"})) _val193); _ -> P.error "wrong type"})) (Map.lookup (9) fields), - timPBean_error = P.maybe (P.Nothing) (\(_,_val184) -> P.Just (case _val184 of {T.TStruct _val196 -> (to_TimError (T.TStruct _val196)); _ -> P.error "wrong type"})) (Map.lookup (10) fields), - timPBean_extraMap = P.maybe (P.Nothing) (\(_,_val184) -> P.Just (case _val184 of {T.TMap _ _ _val197 -> (Map.fromList $ P.map (\(_k199,_v198) -> ((case _k199 of {T.TString _val200 -> E.decodeUtf8 _val200; _ -> P.error "wrong type"}),(case _v198 of {T.TString _val201 -> E.decodeUtf8 _val201; _ -> P.error "wrong type"}))) _val197); _ -> P.error "wrong type"})) (Map.lookup (11) fields) - } -to_TimPBean _ = P.error "not a struct" -read_TimPBean :: (T.Transport t, T.Protocol p) => p t -> P.IO TimPBean -read_TimPBean iprot = to_TimPBean <$> T.readVal iprot (T.T_STRUCT typemap_TimPBean) -decode_TimPBean :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimPBean -decode_TimPBean iprot bs = to_TimPBean $ T.deserializeVal iprot (T.T_STRUCT typemap_TimPBean) bs -typemap_TimPBean :: T.TypeMap -typemap_TimPBean = Map.fromList [(1,("threadId",T.T_STRING)),(2,("fromTid",(T.T_STRUCT typemap_Tid))),(3,("toTid",(T.T_STRUCT typemap_Tid))),(4,("status",T.T_STRING)),(5,("type",T.T_STRING)),(6,("priority",T.T_I32)),(7,("show",T.T_STRING)),(8,("leaguerTid",(T.T_STRUCT typemap_Tid))),(9,("extraList",(T.T_LIST (T.T_STRUCT typemap_TimNode)))),(10,("error",(T.T_STRUCT typemap_TimError))),(11,("extraMap",(T.T_MAP T.T_STRING T.T_STRING)))] -default_TimPBean :: TimPBean -default_TimPBean = TimPBean{ - timPBean_threadId = "", - timPBean_fromTid = P.Nothing, - timPBean_toTid = P.Nothing, - timPBean_status = P.Nothing, - timPBean_type = P.Nothing, - timPBean_priority = P.Nothing, - timPBean_show = P.Nothing, - timPBean_leaguerTid = P.Nothing, - timPBean_extraList = P.Nothing, - timPBean_error = P.Nothing, - timPBean_extraMap = P.Nothing} -data TimMBean = TimMBean { timMBean_threadId :: LT.Text - , timMBean_mid :: P.Maybe LT.Text - , timMBean_fromTid :: P.Maybe Tid - , timMBean_toTid :: P.Maybe Tid - , timMBean_body :: P.Maybe LT.Text - , timMBean_type :: P.Maybe LT.Text - , timMBean_msgType :: P.Maybe I.Int16 - , timMBean_offline :: P.Maybe TimTime - , timMBean_leaguerTid :: P.Maybe Tid - , timMBean_extraList :: P.Maybe (Vector.Vector TimNode) - , timMBean_timestamp :: P.Maybe LT.Text - , timMBean_error :: P.Maybe TimError - , timMBean_extraMap :: P.Maybe (Map.HashMap LT.Text LT.Text) - , timMBean_readstatus :: P.Maybe I.Int16 - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimMBean where - hashWithSalt salt record = salt `H.hashWithSalt` timMBean_threadId record `H.hashWithSalt` timMBean_mid record `H.hashWithSalt` timMBean_fromTid record `H.hashWithSalt` timMBean_toTid record `H.hashWithSalt` timMBean_body record `H.hashWithSalt` timMBean_type record `H.hashWithSalt` timMBean_msgType record `H.hashWithSalt` timMBean_offline record `H.hashWithSalt` timMBean_leaguerTid record `H.hashWithSalt` timMBean_extraList record `H.hashWithSalt` timMBean_timestamp record `H.hashWithSalt` timMBean_error record `H.hashWithSalt` timMBean_extraMap record `H.hashWithSalt` timMBean_readstatus record -instance QC.Arbitrary TimMBean where - arbitrary = M.liftM TimMBean (QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - shrink obj | obj == default_TimMBean = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimMBean{timMBean_threadId = timMBean_threadId obj} then P.Nothing else P.Just $ default_TimMBean{timMBean_threadId = timMBean_threadId obj} - , if obj == default_TimMBean{timMBean_mid = timMBean_mid obj} then P.Nothing else P.Just $ default_TimMBean{timMBean_mid = timMBean_mid obj} - , if obj == default_TimMBean{timMBean_fromTid = timMBean_fromTid obj} then P.Nothing else P.Just $ default_TimMBean{timMBean_fromTid = timMBean_fromTid obj} - , if obj == default_TimMBean{timMBean_toTid = timMBean_toTid obj} then P.Nothing else P.Just $ default_TimMBean{timMBean_toTid = timMBean_toTid obj} - , if obj == default_TimMBean{timMBean_body = timMBean_body obj} then P.Nothing else P.Just $ default_TimMBean{timMBean_body = timMBean_body obj} - , if obj == default_TimMBean{timMBean_type = timMBean_type obj} then P.Nothing else P.Just $ default_TimMBean{timMBean_type = timMBean_type obj} - , if obj == default_TimMBean{timMBean_msgType = timMBean_msgType obj} then P.Nothing else P.Just $ default_TimMBean{timMBean_msgType = timMBean_msgType obj} - , if obj == default_TimMBean{timMBean_offline = timMBean_offline obj} then P.Nothing else P.Just $ default_TimMBean{timMBean_offline = timMBean_offline obj} - , if obj == default_TimMBean{timMBean_leaguerTid = timMBean_leaguerTid obj} then P.Nothing else P.Just $ default_TimMBean{timMBean_leaguerTid = timMBean_leaguerTid obj} - , if obj == default_TimMBean{timMBean_extraList = timMBean_extraList obj} then P.Nothing else P.Just $ default_TimMBean{timMBean_extraList = timMBean_extraList obj} - , if obj == default_TimMBean{timMBean_timestamp = timMBean_timestamp obj} then P.Nothing else P.Just $ default_TimMBean{timMBean_timestamp = timMBean_timestamp obj} - , if obj == default_TimMBean{timMBean_error = timMBean_error obj} then P.Nothing else P.Just $ default_TimMBean{timMBean_error = timMBean_error obj} - , if obj == default_TimMBean{timMBean_extraMap = timMBean_extraMap obj} then P.Nothing else P.Just $ default_TimMBean{timMBean_extraMap = timMBean_extraMap obj} - , if obj == default_TimMBean{timMBean_readstatus = timMBean_readstatus obj} then P.Nothing else P.Just $ default_TimMBean{timMBean_readstatus = timMBean_readstatus obj} - ] -from_TimMBean :: TimMBean -> T.ThriftVal -from_TimMBean record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v204 -> P.Just (1, ("threadId",T.TString $ E.encodeUtf8 _v204))) $ timMBean_threadId record - , (\_v204 -> (2, ("mid",T.TString $ E.encodeUtf8 _v204))) <$> timMBean_mid record - , (\_v204 -> (3, ("fromTid",from_Tid _v204))) <$> timMBean_fromTid record - , (\_v204 -> (4, ("toTid",from_Tid _v204))) <$> timMBean_toTid record - , (\_v204 -> (5, ("body",T.TString $ E.encodeUtf8 _v204))) <$> timMBean_body record - , (\_v204 -> (6, ("type",T.TString $ E.encodeUtf8 _v204))) <$> timMBean_type record - , (\_v204 -> (7, ("msgType",T.TI16 _v204))) <$> timMBean_msgType record - , (\_v204 -> (8, ("offline",from_TimTime _v204))) <$> timMBean_offline record - , (\_v204 -> (9, ("leaguerTid",from_Tid _v204))) <$> timMBean_leaguerTid record - , (\_v204 -> (10, ("extraList",T.TList (T.T_STRUCT typemap_TimNode) $ P.map (\_v206 -> from_TimNode _v206) $ Vector.toList _v204))) <$> timMBean_extraList record - , (\_v204 -> (11, ("timestamp",T.TString $ E.encodeUtf8 _v204))) <$> timMBean_timestamp record - , (\_v204 -> (12, ("error",from_TimError _v204))) <$> timMBean_error record - , (\_v204 -> (13, ("extraMap",T.TMap T.T_STRING T.T_STRING $ P.map (\(_k207,_v208) -> (T.TString $ E.encodeUtf8 _k207, T.TString $ E.encodeUtf8 _v208)) $ Map.toList _v204))) <$> timMBean_extraMap record - , (\_v204 -> (14, ("readstatus",T.TI16 _v204))) <$> timMBean_readstatus record - ] -write_TimMBean :: (T.Protocol p, T.Transport t) => p t -> TimMBean -> P.IO () -write_TimMBean oprot record = T.writeVal oprot $ from_TimMBean record -encode_TimMBean :: (T.Protocol p, T.Transport t) => p t -> TimMBean -> LBS.ByteString -encode_TimMBean oprot record = T.serializeVal oprot $ from_TimMBean record -to_TimMBean :: T.ThriftVal -> TimMBean -to_TimMBean (T.TStruct fields) = TimMBean{ - timMBean_threadId = P.maybe (P.error "Missing required field: threadId") (\(_,_val210) -> (case _val210 of {T.TString _val211 -> E.decodeUtf8 _val211; _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timMBean_mid = P.maybe (P.Nothing) (\(_,_val210) -> P.Just (case _val210 of {T.TString _val212 -> E.decodeUtf8 _val212; _ -> P.error "wrong type"})) (Map.lookup (2) fields), - timMBean_fromTid = P.maybe (P.Nothing) (\(_,_val210) -> P.Just (case _val210 of {T.TStruct _val213 -> (to_Tid (T.TStruct _val213)); _ -> P.error "wrong type"})) (Map.lookup (3) fields), - timMBean_toTid = P.maybe (P.Nothing) (\(_,_val210) -> P.Just (case _val210 of {T.TStruct _val214 -> (to_Tid (T.TStruct _val214)); _ -> P.error "wrong type"})) (Map.lookup (4) fields), - timMBean_body = P.maybe (P.Nothing) (\(_,_val210) -> P.Just (case _val210 of {T.TString _val215 -> E.decodeUtf8 _val215; _ -> P.error "wrong type"})) (Map.lookup (5) fields), - timMBean_type = P.maybe (P.Nothing) (\(_,_val210) -> P.Just (case _val210 of {T.TString _val216 -> E.decodeUtf8 _val216; _ -> P.error "wrong type"})) (Map.lookup (6) fields), - timMBean_msgType = P.maybe (P.Nothing) (\(_,_val210) -> P.Just (case _val210 of {T.TI16 _val217 -> _val217; _ -> P.error "wrong type"})) (Map.lookup (7) fields), - timMBean_offline = P.maybe (P.Nothing) (\(_,_val210) -> P.Just (case _val210 of {T.TStruct _val218 -> (to_TimTime (T.TStruct _val218)); _ -> P.error "wrong type"})) (Map.lookup (8) fields), - timMBean_leaguerTid = P.maybe (P.Nothing) (\(_,_val210) -> P.Just (case _val210 of {T.TStruct _val219 -> (to_Tid (T.TStruct _val219)); _ -> P.error "wrong type"})) (Map.lookup (9) fields), - timMBean_extraList = P.maybe (P.Nothing) (\(_,_val210) -> P.Just (case _val210 of {T.TList _ _val220 -> (Vector.fromList $ P.map (\_v221 -> (case _v221 of {T.TStruct _val222 -> (to_TimNode (T.TStruct _val222)); _ -> P.error "wrong type"})) _val220); _ -> P.error "wrong type"})) (Map.lookup (10) fields), - timMBean_timestamp = P.maybe (P.Nothing) (\(_,_val210) -> P.Just (case _val210 of {T.TString _val223 -> E.decodeUtf8 _val223; _ -> P.error "wrong type"})) (Map.lookup (11) fields), - timMBean_error = P.maybe (P.Nothing) (\(_,_val210) -> P.Just (case _val210 of {T.TStruct _val224 -> (to_TimError (T.TStruct _val224)); _ -> P.error "wrong type"})) (Map.lookup (12) fields), - timMBean_extraMap = P.maybe (P.Nothing) (\(_,_val210) -> P.Just (case _val210 of {T.TMap _ _ _val225 -> (Map.fromList $ P.map (\(_k227,_v226) -> ((case _k227 of {T.TString _val228 -> E.decodeUtf8 _val228; _ -> P.error "wrong type"}),(case _v226 of {T.TString _val229 -> E.decodeUtf8 _val229; _ -> P.error "wrong type"}))) _val225); _ -> P.error "wrong type"})) (Map.lookup (13) fields), - timMBean_readstatus = P.maybe (P.Nothing) (\(_,_val210) -> P.Just (case _val210 of {T.TI16 _val230 -> _val230; _ -> P.error "wrong type"})) (Map.lookup (14) fields) - } -to_TimMBean _ = P.error "not a struct" -read_TimMBean :: (T.Transport t, T.Protocol p) => p t -> P.IO TimMBean -read_TimMBean iprot = to_TimMBean <$> T.readVal iprot (T.T_STRUCT typemap_TimMBean) -decode_TimMBean :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimMBean -decode_TimMBean iprot bs = to_TimMBean $ T.deserializeVal iprot (T.T_STRUCT typemap_TimMBean) bs -typemap_TimMBean :: T.TypeMap -typemap_TimMBean = Map.fromList [(1,("threadId",T.T_STRING)),(2,("mid",T.T_STRING)),(3,("fromTid",(T.T_STRUCT typemap_Tid))),(4,("toTid",(T.T_STRUCT typemap_Tid))),(5,("body",T.T_STRING)),(6,("type",T.T_STRING)),(7,("msgType",T.T_I16)),(8,("offline",(T.T_STRUCT typemap_TimTime))),(9,("leaguerTid",(T.T_STRUCT typemap_Tid))),(10,("extraList",(T.T_LIST (T.T_STRUCT typemap_TimNode)))),(11,("timestamp",T.T_STRING)),(12,("error",(T.T_STRUCT typemap_TimError))),(13,("extraMap",(T.T_MAP T.T_STRING T.T_STRING))),(14,("readstatus",T.T_I16))] -default_TimMBean :: TimMBean -default_TimMBean = TimMBean{ - timMBean_threadId = "", - timMBean_mid = P.Nothing, - timMBean_fromTid = P.Nothing, - timMBean_toTid = P.Nothing, - timMBean_body = P.Nothing, - timMBean_type = P.Nothing, - timMBean_msgType = P.Nothing, - timMBean_offline = P.Nothing, - timMBean_leaguerTid = P.Nothing, - timMBean_extraList = P.Nothing, - timMBean_timestamp = P.Nothing, - timMBean_error = P.Nothing, - timMBean_extraMap = P.Nothing, - timMBean_readstatus = P.Nothing} -data TimIqBean = TimIqBean { timIqBean_threadId :: LT.Text - , timIqBean_fromTid :: P.Maybe Tid - , timIqBean_toTid :: P.Maybe Tid - , timIqBean_type :: P.Maybe LT.Text - , timIqBean_extraList :: P.Maybe (Vector.Vector TimNode) - , timIqBean_error :: P.Maybe TimError - , timIqBean_extraMap :: P.Maybe (Map.HashMap LT.Text LT.Text) - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimIqBean where - hashWithSalt salt record = salt `H.hashWithSalt` timIqBean_threadId record `H.hashWithSalt` timIqBean_fromTid record `H.hashWithSalt` timIqBean_toTid record `H.hashWithSalt` timIqBean_type record `H.hashWithSalt` timIqBean_extraList record `H.hashWithSalt` timIqBean_error record `H.hashWithSalt` timIqBean_extraMap record -instance QC.Arbitrary TimIqBean where - arbitrary = M.liftM TimIqBean (QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - shrink obj | obj == default_TimIqBean = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimIqBean{timIqBean_threadId = timIqBean_threadId obj} then P.Nothing else P.Just $ default_TimIqBean{timIqBean_threadId = timIqBean_threadId obj} - , if obj == default_TimIqBean{timIqBean_fromTid = timIqBean_fromTid obj} then P.Nothing else P.Just $ default_TimIqBean{timIqBean_fromTid = timIqBean_fromTid obj} - , if obj == default_TimIqBean{timIqBean_toTid = timIqBean_toTid obj} then P.Nothing else P.Just $ default_TimIqBean{timIqBean_toTid = timIqBean_toTid obj} - , if obj == default_TimIqBean{timIqBean_type = timIqBean_type obj} then P.Nothing else P.Just $ default_TimIqBean{timIqBean_type = timIqBean_type obj} - , if obj == default_TimIqBean{timIqBean_extraList = timIqBean_extraList obj} then P.Nothing else P.Just $ default_TimIqBean{timIqBean_extraList = timIqBean_extraList obj} - , if obj == default_TimIqBean{timIqBean_error = timIqBean_error obj} then P.Nothing else P.Just $ default_TimIqBean{timIqBean_error = timIqBean_error obj} - , if obj == default_TimIqBean{timIqBean_extraMap = timIqBean_extraMap obj} then P.Nothing else P.Just $ default_TimIqBean{timIqBean_extraMap = timIqBean_extraMap obj} - ] -from_TimIqBean :: TimIqBean -> T.ThriftVal -from_TimIqBean record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v233 -> P.Just (1, ("threadId",T.TString $ E.encodeUtf8 _v233))) $ timIqBean_threadId record - , (\_v233 -> (2, ("fromTid",from_Tid _v233))) <$> timIqBean_fromTid record - , (\_v233 -> (3, ("toTid",from_Tid _v233))) <$> timIqBean_toTid record - , (\_v233 -> (4, ("type",T.TString $ E.encodeUtf8 _v233))) <$> timIqBean_type record - , (\_v233 -> (5, ("extraList",T.TList (T.T_STRUCT typemap_TimNode) $ P.map (\_v235 -> from_TimNode _v235) $ Vector.toList _v233))) <$> timIqBean_extraList record - , (\_v233 -> (6, ("error",from_TimError _v233))) <$> timIqBean_error record - , (\_v233 -> (7, ("extraMap",T.TMap T.T_STRING T.T_STRING $ P.map (\(_k236,_v237) -> (T.TString $ E.encodeUtf8 _k236, T.TString $ E.encodeUtf8 _v237)) $ Map.toList _v233))) <$> timIqBean_extraMap record - ] -write_TimIqBean :: (T.Protocol p, T.Transport t) => p t -> TimIqBean -> P.IO () -write_TimIqBean oprot record = T.writeVal oprot $ from_TimIqBean record -encode_TimIqBean :: (T.Protocol p, T.Transport t) => p t -> TimIqBean -> LBS.ByteString -encode_TimIqBean oprot record = T.serializeVal oprot $ from_TimIqBean record -to_TimIqBean :: T.ThriftVal -> TimIqBean -to_TimIqBean (T.TStruct fields) = TimIqBean{ - timIqBean_threadId = P.maybe (P.error "Missing required field: threadId") (\(_,_val239) -> (case _val239 of {T.TString _val240 -> E.decodeUtf8 _val240; _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timIqBean_fromTid = P.maybe (P.Nothing) (\(_,_val239) -> P.Just (case _val239 of {T.TStruct _val241 -> (to_Tid (T.TStruct _val241)); _ -> P.error "wrong type"})) (Map.lookup (2) fields), - timIqBean_toTid = P.maybe (P.Nothing) (\(_,_val239) -> P.Just (case _val239 of {T.TStruct _val242 -> (to_Tid (T.TStruct _val242)); _ -> P.error "wrong type"})) (Map.lookup (3) fields), - timIqBean_type = P.maybe (P.Nothing) (\(_,_val239) -> P.Just (case _val239 of {T.TString _val243 -> E.decodeUtf8 _val243; _ -> P.error "wrong type"})) (Map.lookup (4) fields), - timIqBean_extraList = P.maybe (P.Nothing) (\(_,_val239) -> P.Just (case _val239 of {T.TList _ _val244 -> (Vector.fromList $ P.map (\_v245 -> (case _v245 of {T.TStruct _val246 -> (to_TimNode (T.TStruct _val246)); _ -> P.error "wrong type"})) _val244); _ -> P.error "wrong type"})) (Map.lookup (5) fields), - timIqBean_error = P.maybe (P.Nothing) (\(_,_val239) -> P.Just (case _val239 of {T.TStruct _val247 -> (to_TimError (T.TStruct _val247)); _ -> P.error "wrong type"})) (Map.lookup (6) fields), - timIqBean_extraMap = P.maybe (P.Nothing) (\(_,_val239) -> P.Just (case _val239 of {T.TMap _ _ _val248 -> (Map.fromList $ P.map (\(_k250,_v249) -> ((case _k250 of {T.TString _val251 -> E.decodeUtf8 _val251; _ -> P.error "wrong type"}),(case _v249 of {T.TString _val252 -> E.decodeUtf8 _val252; _ -> P.error "wrong type"}))) _val248); _ -> P.error "wrong type"})) (Map.lookup (7) fields) - } -to_TimIqBean _ = P.error "not a struct" -read_TimIqBean :: (T.Transport t, T.Protocol p) => p t -> P.IO TimIqBean -read_TimIqBean iprot = to_TimIqBean <$> T.readVal iprot (T.T_STRUCT typemap_TimIqBean) -decode_TimIqBean :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimIqBean -decode_TimIqBean iprot bs = to_TimIqBean $ T.deserializeVal iprot (T.T_STRUCT typemap_TimIqBean) bs -typemap_TimIqBean :: T.TypeMap -typemap_TimIqBean = Map.fromList [(1,("threadId",T.T_STRING)),(2,("fromTid",(T.T_STRUCT typemap_Tid))),(3,("toTid",(T.T_STRUCT typemap_Tid))),(4,("type",T.T_STRING)),(5,("extraList",(T.T_LIST (T.T_STRUCT typemap_TimNode)))),(6,("error",(T.T_STRUCT typemap_TimError))),(7,("extraMap",(T.T_MAP T.T_STRING T.T_STRING)))] -default_TimIqBean :: TimIqBean -default_TimIqBean = TimIqBean{ - timIqBean_threadId = "", - timIqBean_fromTid = P.Nothing, - timIqBean_toTid = P.Nothing, - timIqBean_type = P.Nothing, - timIqBean_extraList = P.Nothing, - timIqBean_error = P.Nothing, - timIqBean_extraMap = P.Nothing} -data TimRoster = TimRoster { timRoster_subscription :: LT.Text - , timRoster_tid :: Tid - , timRoster_name :: P.Maybe LT.Text - , timRoster_extraMap :: P.Maybe (Map.HashMap LT.Text LT.Text) - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimRoster where - hashWithSalt salt record = salt `H.hashWithSalt` timRoster_subscription record `H.hashWithSalt` timRoster_tid record `H.hashWithSalt` timRoster_name record `H.hashWithSalt` timRoster_extraMap record -instance QC.Arbitrary TimRoster where - arbitrary = M.liftM TimRoster (QC.arbitrary) - `M.ap`(QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - shrink obj | obj == default_TimRoster = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimRoster{timRoster_subscription = timRoster_subscription obj} then P.Nothing else P.Just $ default_TimRoster{timRoster_subscription = timRoster_subscription obj} - , if obj == default_TimRoster{timRoster_tid = timRoster_tid obj} then P.Nothing else P.Just $ default_TimRoster{timRoster_tid = timRoster_tid obj} - , if obj == default_TimRoster{timRoster_name = timRoster_name obj} then P.Nothing else P.Just $ default_TimRoster{timRoster_name = timRoster_name obj} - , if obj == default_TimRoster{timRoster_extraMap = timRoster_extraMap obj} then P.Nothing else P.Just $ default_TimRoster{timRoster_extraMap = timRoster_extraMap obj} - ] -from_TimRoster :: TimRoster -> T.ThriftVal -from_TimRoster record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v255 -> P.Just (1, ("subscription",T.TString $ E.encodeUtf8 _v255))) $ timRoster_subscription record - , (\_v255 -> P.Just (2, ("tid",from_Tid _v255))) $ timRoster_tid record - , (\_v255 -> (3, ("name",T.TString $ E.encodeUtf8 _v255))) <$> timRoster_name record - , (\_v255 -> (4, ("extraMap",T.TMap T.T_STRING T.T_STRING $ P.map (\(_k256,_v257) -> (T.TString $ E.encodeUtf8 _k256, T.TString $ E.encodeUtf8 _v257)) $ Map.toList _v255))) <$> timRoster_extraMap record - ] -write_TimRoster :: (T.Protocol p, T.Transport t) => p t -> TimRoster -> P.IO () -write_TimRoster oprot record = T.writeVal oprot $ from_TimRoster record -encode_TimRoster :: (T.Protocol p, T.Transport t) => p t -> TimRoster -> LBS.ByteString -encode_TimRoster oprot record = T.serializeVal oprot $ from_TimRoster record -to_TimRoster :: T.ThriftVal -> TimRoster -to_TimRoster (T.TStruct fields) = TimRoster{ - timRoster_subscription = P.maybe (P.error "Missing required field: subscription") (\(_,_val259) -> (case _val259 of {T.TString _val260 -> E.decodeUtf8 _val260; _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timRoster_tid = P.maybe (P.error "Missing required field: tid") (\(_,_val259) -> (case _val259 of {T.TStruct _val261 -> (to_Tid (T.TStruct _val261)); _ -> P.error "wrong type"})) (Map.lookup (2) fields), - timRoster_name = P.maybe (P.Nothing) (\(_,_val259) -> P.Just (case _val259 of {T.TString _val262 -> E.decodeUtf8 _val262; _ -> P.error "wrong type"})) (Map.lookup (3) fields), - timRoster_extraMap = P.maybe (P.Nothing) (\(_,_val259) -> P.Just (case _val259 of {T.TMap _ _ _val263 -> (Map.fromList $ P.map (\(_k265,_v264) -> ((case _k265 of {T.TString _val266 -> E.decodeUtf8 _val266; _ -> P.error "wrong type"}),(case _v264 of {T.TString _val267 -> E.decodeUtf8 _val267; _ -> P.error "wrong type"}))) _val263); _ -> P.error "wrong type"})) (Map.lookup (4) fields) - } -to_TimRoster _ = P.error "not a struct" -read_TimRoster :: (T.Transport t, T.Protocol p) => p t -> P.IO TimRoster -read_TimRoster iprot = to_TimRoster <$> T.readVal iprot (T.T_STRUCT typemap_TimRoster) -decode_TimRoster :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimRoster -decode_TimRoster iprot bs = to_TimRoster $ T.deserializeVal iprot (T.T_STRUCT typemap_TimRoster) bs -typemap_TimRoster :: T.TypeMap -typemap_TimRoster = Map.fromList [(1,("subscription",T.T_STRING)),(2,("tid",(T.T_STRUCT typemap_Tid))),(3,("name",T.T_STRING)),(4,("extraMap",(T.T_MAP T.T_STRING T.T_STRING)))] -default_TimRoster :: TimRoster -default_TimRoster = TimRoster{ - timRoster_subscription = "", - timRoster_tid = default_Tid, - timRoster_name = P.Nothing, - timRoster_extraMap = P.Nothing} -data TimRemoteUserBean = TimRemoteUserBean { timRemoteUserBean_error :: P.Maybe TimError - , timRemoteUserBean_ub :: P.Maybe TimUserBean - , timRemoteUserBean_extraMap :: P.Maybe (Map.HashMap LT.Text LT.Text) - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimRemoteUserBean where - hashWithSalt salt record = salt `H.hashWithSalt` timRemoteUserBean_error record `H.hashWithSalt` timRemoteUserBean_ub record `H.hashWithSalt` timRemoteUserBean_extraMap record -instance QC.Arbitrary TimRemoteUserBean where - arbitrary = M.liftM TimRemoteUserBean (M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - shrink obj | obj == default_TimRemoteUserBean = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimRemoteUserBean{timRemoteUserBean_error = timRemoteUserBean_error obj} then P.Nothing else P.Just $ default_TimRemoteUserBean{timRemoteUserBean_error = timRemoteUserBean_error obj} - , if obj == default_TimRemoteUserBean{timRemoteUserBean_ub = timRemoteUserBean_ub obj} then P.Nothing else P.Just $ default_TimRemoteUserBean{timRemoteUserBean_ub = timRemoteUserBean_ub obj} - , if obj == default_TimRemoteUserBean{timRemoteUserBean_extraMap = timRemoteUserBean_extraMap obj} then P.Nothing else P.Just $ default_TimRemoteUserBean{timRemoteUserBean_extraMap = timRemoteUserBean_extraMap obj} - ] -from_TimRemoteUserBean :: TimRemoteUserBean -> T.ThriftVal -from_TimRemoteUserBean record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v270 -> (1, ("error",from_TimError _v270))) <$> timRemoteUserBean_error record - , (\_v270 -> (2, ("ub",from_TimUserBean _v270))) <$> timRemoteUserBean_ub record - , (\_v270 -> (3, ("extraMap",T.TMap T.T_STRING T.T_STRING $ P.map (\(_k271,_v272) -> (T.TString $ E.encodeUtf8 _k271, T.TString $ E.encodeUtf8 _v272)) $ Map.toList _v270))) <$> timRemoteUserBean_extraMap record - ] -write_TimRemoteUserBean :: (T.Protocol p, T.Transport t) => p t -> TimRemoteUserBean -> P.IO () -write_TimRemoteUserBean oprot record = T.writeVal oprot $ from_TimRemoteUserBean record -encode_TimRemoteUserBean :: (T.Protocol p, T.Transport t) => p t -> TimRemoteUserBean -> LBS.ByteString -encode_TimRemoteUserBean oprot record = T.serializeVal oprot $ from_TimRemoteUserBean record -to_TimRemoteUserBean :: T.ThriftVal -> TimRemoteUserBean -to_TimRemoteUserBean (T.TStruct fields) = TimRemoteUserBean{ - timRemoteUserBean_error = P.maybe (P.Nothing) (\(_,_val274) -> P.Just (case _val274 of {T.TStruct _val275 -> (to_TimError (T.TStruct _val275)); _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timRemoteUserBean_ub = P.maybe (P.Nothing) (\(_,_val274) -> P.Just (case _val274 of {T.TStruct _val276 -> (to_TimUserBean (T.TStruct _val276)); _ -> P.error "wrong type"})) (Map.lookup (2) fields), - timRemoteUserBean_extraMap = P.maybe (P.Nothing) (\(_,_val274) -> P.Just (case _val274 of {T.TMap _ _ _val277 -> (Map.fromList $ P.map (\(_k279,_v278) -> ((case _k279 of {T.TString _val280 -> E.decodeUtf8 _val280; _ -> P.error "wrong type"}),(case _v278 of {T.TString _val281 -> E.decodeUtf8 _val281; _ -> P.error "wrong type"}))) _val277); _ -> P.error "wrong type"})) (Map.lookup (3) fields) - } -to_TimRemoteUserBean _ = P.error "not a struct" -read_TimRemoteUserBean :: (T.Transport t, T.Protocol p) => p t -> P.IO TimRemoteUserBean -read_TimRemoteUserBean iprot = to_TimRemoteUserBean <$> T.readVal iprot (T.T_STRUCT typemap_TimRemoteUserBean) -decode_TimRemoteUserBean :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimRemoteUserBean -decode_TimRemoteUserBean iprot bs = to_TimRemoteUserBean $ T.deserializeVal iprot (T.T_STRUCT typemap_TimRemoteUserBean) bs -typemap_TimRemoteUserBean :: T.TypeMap -typemap_TimRemoteUserBean = Map.fromList [(1,("error",(T.T_STRUCT typemap_TimError))),(2,("ub",(T.T_STRUCT typemap_TimUserBean))),(3,("extraMap",(T.T_MAP T.T_STRING T.T_STRING)))] -default_TimRemoteUserBean :: TimRemoteUserBean -default_TimRemoteUserBean = TimRemoteUserBean{ - timRemoteUserBean_error = P.Nothing, - timRemoteUserBean_ub = P.Nothing, - timRemoteUserBean_extraMap = P.Nothing} -data TimRemoteRoom = TimRemoteRoom { timRemoteRoom_error :: P.Maybe TimError - , timRemoteRoom_room :: P.Maybe TimRoom - , timRemoteRoom_extraMap :: P.Maybe (Map.HashMap LT.Text LT.Text) - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimRemoteRoom where - hashWithSalt salt record = salt `H.hashWithSalt` timRemoteRoom_error record `H.hashWithSalt` timRemoteRoom_room record `H.hashWithSalt` timRemoteRoom_extraMap record -instance QC.Arbitrary TimRemoteRoom where - arbitrary = M.liftM TimRemoteRoom (M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - shrink obj | obj == default_TimRemoteRoom = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimRemoteRoom{timRemoteRoom_error = timRemoteRoom_error obj} then P.Nothing else P.Just $ default_TimRemoteRoom{timRemoteRoom_error = timRemoteRoom_error obj} - , if obj == default_TimRemoteRoom{timRemoteRoom_room = timRemoteRoom_room obj} then P.Nothing else P.Just $ default_TimRemoteRoom{timRemoteRoom_room = timRemoteRoom_room obj} - , if obj == default_TimRemoteRoom{timRemoteRoom_extraMap = timRemoteRoom_extraMap obj} then P.Nothing else P.Just $ default_TimRemoteRoom{timRemoteRoom_extraMap = timRemoteRoom_extraMap obj} - ] -from_TimRemoteRoom :: TimRemoteRoom -> T.ThriftVal -from_TimRemoteRoom record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v284 -> (1, ("error",from_TimError _v284))) <$> timRemoteRoom_error record - , (\_v284 -> (2, ("room",from_TimRoom _v284))) <$> timRemoteRoom_room record - , (\_v284 -> (3, ("extraMap",T.TMap T.T_STRING T.T_STRING $ P.map (\(_k285,_v286) -> (T.TString $ E.encodeUtf8 _k285, T.TString $ E.encodeUtf8 _v286)) $ Map.toList _v284))) <$> timRemoteRoom_extraMap record - ] -write_TimRemoteRoom :: (T.Protocol p, T.Transport t) => p t -> TimRemoteRoom -> P.IO () -write_TimRemoteRoom oprot record = T.writeVal oprot $ from_TimRemoteRoom record -encode_TimRemoteRoom :: (T.Protocol p, T.Transport t) => p t -> TimRemoteRoom -> LBS.ByteString -encode_TimRemoteRoom oprot record = T.serializeVal oprot $ from_TimRemoteRoom record -to_TimRemoteRoom :: T.ThriftVal -> TimRemoteRoom -to_TimRemoteRoom (T.TStruct fields) = TimRemoteRoom{ - timRemoteRoom_error = P.maybe (P.Nothing) (\(_,_val288) -> P.Just (case _val288 of {T.TStruct _val289 -> (to_TimError (T.TStruct _val289)); _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timRemoteRoom_room = P.maybe (P.Nothing) (\(_,_val288) -> P.Just (case _val288 of {T.TStruct _val290 -> (to_TimRoom (T.TStruct _val290)); _ -> P.error "wrong type"})) (Map.lookup (2) fields), - timRemoteRoom_extraMap = P.maybe (P.Nothing) (\(_,_val288) -> P.Just (case _val288 of {T.TMap _ _ _val291 -> (Map.fromList $ P.map (\(_k293,_v292) -> ((case _k293 of {T.TString _val294 -> E.decodeUtf8 _val294; _ -> P.error "wrong type"}),(case _v292 of {T.TString _val295 -> E.decodeUtf8 _val295; _ -> P.error "wrong type"}))) _val291); _ -> P.error "wrong type"})) (Map.lookup (3) fields) - } -to_TimRemoteRoom _ = P.error "not a struct" -read_TimRemoteRoom :: (T.Transport t, T.Protocol p) => p t -> P.IO TimRemoteRoom -read_TimRemoteRoom iprot = to_TimRemoteRoom <$> T.readVal iprot (T.T_STRUCT typemap_TimRemoteRoom) -decode_TimRemoteRoom :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimRemoteRoom -decode_TimRemoteRoom iprot bs = to_TimRemoteRoom $ T.deserializeVal iprot (T.T_STRUCT typemap_TimRemoteRoom) bs -typemap_TimRemoteRoom :: T.TypeMap -typemap_TimRemoteRoom = Map.fromList [(1,("error",(T.T_STRUCT typemap_TimError))),(2,("room",(T.T_STRUCT typemap_TimRoom))),(3,("extraMap",(T.T_MAP T.T_STRING T.T_STRING)))] -default_TimRemoteRoom :: TimRemoteRoom -default_TimRemoteRoom = TimRemoteRoom{ - timRemoteRoom_error = P.Nothing, - timRemoteRoom_room = P.Nothing, - timRemoteRoom_extraMap = P.Nothing} -data TimResponseBean = TimResponseBean { timResponseBean_threadId :: P.Maybe LT.Text - , timResponseBean_error :: P.Maybe TimError - , timResponseBean_extraList :: P.Maybe (Vector.Vector TimNode) - , timResponseBean_extraMap :: P.Maybe (Map.HashMap LT.Text LT.Text) - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimResponseBean where - hashWithSalt salt record = salt `H.hashWithSalt` timResponseBean_threadId record `H.hashWithSalt` timResponseBean_error record `H.hashWithSalt` timResponseBean_extraList record `H.hashWithSalt` timResponseBean_extraMap record -instance QC.Arbitrary TimResponseBean where - arbitrary = M.liftM TimResponseBean (M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - shrink obj | obj == default_TimResponseBean = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimResponseBean{timResponseBean_threadId = timResponseBean_threadId obj} then P.Nothing else P.Just $ default_TimResponseBean{timResponseBean_threadId = timResponseBean_threadId obj} - , if obj == default_TimResponseBean{timResponseBean_error = timResponseBean_error obj} then P.Nothing else P.Just $ default_TimResponseBean{timResponseBean_error = timResponseBean_error obj} - , if obj == default_TimResponseBean{timResponseBean_extraList = timResponseBean_extraList obj} then P.Nothing else P.Just $ default_TimResponseBean{timResponseBean_extraList = timResponseBean_extraList obj} - , if obj == default_TimResponseBean{timResponseBean_extraMap = timResponseBean_extraMap obj} then P.Nothing else P.Just $ default_TimResponseBean{timResponseBean_extraMap = timResponseBean_extraMap obj} - ] -from_TimResponseBean :: TimResponseBean -> T.ThriftVal -from_TimResponseBean record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v298 -> (1, ("threadId",T.TString $ E.encodeUtf8 _v298))) <$> timResponseBean_threadId record - , (\_v298 -> (2, ("error",from_TimError _v298))) <$> timResponseBean_error record - , (\_v298 -> (3, ("extraList",T.TList (T.T_STRUCT typemap_TimNode) $ P.map (\_v300 -> from_TimNode _v300) $ Vector.toList _v298))) <$> timResponseBean_extraList record - , (\_v298 -> (4, ("extraMap",T.TMap T.T_STRING T.T_STRING $ P.map (\(_k301,_v302) -> (T.TString $ E.encodeUtf8 _k301, T.TString $ E.encodeUtf8 _v302)) $ Map.toList _v298))) <$> timResponseBean_extraMap record - ] -write_TimResponseBean :: (T.Protocol p, T.Transport t) => p t -> TimResponseBean -> P.IO () -write_TimResponseBean oprot record = T.writeVal oprot $ from_TimResponseBean record -encode_TimResponseBean :: (T.Protocol p, T.Transport t) => p t -> TimResponseBean -> LBS.ByteString -encode_TimResponseBean oprot record = T.serializeVal oprot $ from_TimResponseBean record -to_TimResponseBean :: T.ThriftVal -> TimResponseBean -to_TimResponseBean (T.TStruct fields) = TimResponseBean{ - timResponseBean_threadId = P.maybe (P.Nothing) (\(_,_val304) -> P.Just (case _val304 of {T.TString _val305 -> E.decodeUtf8 _val305; _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timResponseBean_error = P.maybe (P.Nothing) (\(_,_val304) -> P.Just (case _val304 of {T.TStruct _val306 -> (to_TimError (T.TStruct _val306)); _ -> P.error "wrong type"})) (Map.lookup (2) fields), - timResponseBean_extraList = P.maybe (P.Nothing) (\(_,_val304) -> P.Just (case _val304 of {T.TList _ _val307 -> (Vector.fromList $ P.map (\_v308 -> (case _v308 of {T.TStruct _val309 -> (to_TimNode (T.TStruct _val309)); _ -> P.error "wrong type"})) _val307); _ -> P.error "wrong type"})) (Map.lookup (3) fields), - timResponseBean_extraMap = P.maybe (P.Nothing) (\(_,_val304) -> P.Just (case _val304 of {T.TMap _ _ _val310 -> (Map.fromList $ P.map (\(_k312,_v311) -> ((case _k312 of {T.TString _val313 -> E.decodeUtf8 _val313; _ -> P.error "wrong type"}),(case _v311 of {T.TString _val314 -> E.decodeUtf8 _val314; _ -> P.error "wrong type"}))) _val310); _ -> P.error "wrong type"})) (Map.lookup (4) fields) - } -to_TimResponseBean _ = P.error "not a struct" -read_TimResponseBean :: (T.Transport t, T.Protocol p) => p t -> P.IO TimResponseBean -read_TimResponseBean iprot = to_TimResponseBean <$> T.readVal iprot (T.T_STRUCT typemap_TimResponseBean) -decode_TimResponseBean :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimResponseBean -decode_TimResponseBean iprot bs = to_TimResponseBean $ T.deserializeVal iprot (T.T_STRUCT typemap_TimResponseBean) bs -typemap_TimResponseBean :: T.TypeMap -typemap_TimResponseBean = Map.fromList [(1,("threadId",T.T_STRING)),(2,("error",(T.T_STRUCT typemap_TimError))),(3,("extraList",(T.T_LIST (T.T_STRUCT typemap_TimNode)))),(4,("extraMap",(T.T_MAP T.T_STRING T.T_STRING)))] -default_TimResponseBean :: TimResponseBean -default_TimResponseBean = TimResponseBean{ - timResponseBean_threadId = P.Nothing, - timResponseBean_error = P.Nothing, - timResponseBean_extraList = P.Nothing, - timResponseBean_extraMap = P.Nothing} -data TimSock5Bean = TimSock5Bean { timSock5Bean_fromTid :: Tid - , timSock5Bean_toTid :: Tid - , timSock5Bean_addr :: LT.Text - , timSock5Bean_port :: I.Int32 - , timSock5Bean_transport :: I.Int16 - , timSock5Bean_pubId :: LT.Text - , timSock5Bean_extraMap :: P.Maybe (Map.HashMap LT.Text LT.Text) - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimSock5Bean where - hashWithSalt salt record = salt `H.hashWithSalt` timSock5Bean_fromTid record `H.hashWithSalt` timSock5Bean_toTid record `H.hashWithSalt` timSock5Bean_addr record `H.hashWithSalt` timSock5Bean_port record `H.hashWithSalt` timSock5Bean_transport record `H.hashWithSalt` timSock5Bean_pubId record `H.hashWithSalt` timSock5Bean_extraMap record -instance QC.Arbitrary TimSock5Bean where - arbitrary = M.liftM TimSock5Bean (QC.arbitrary) - `M.ap`(QC.arbitrary) - `M.ap`(QC.arbitrary) - `M.ap`(QC.arbitrary) - `M.ap`(QC.arbitrary) - `M.ap`(QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - shrink obj | obj == default_TimSock5Bean = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimSock5Bean{timSock5Bean_fromTid = timSock5Bean_fromTid obj} then P.Nothing else P.Just $ default_TimSock5Bean{timSock5Bean_fromTid = timSock5Bean_fromTid obj} - , if obj == default_TimSock5Bean{timSock5Bean_toTid = timSock5Bean_toTid obj} then P.Nothing else P.Just $ default_TimSock5Bean{timSock5Bean_toTid = timSock5Bean_toTid obj} - , if obj == default_TimSock5Bean{timSock5Bean_addr = timSock5Bean_addr obj} then P.Nothing else P.Just $ default_TimSock5Bean{timSock5Bean_addr = timSock5Bean_addr obj} - , if obj == default_TimSock5Bean{timSock5Bean_port = timSock5Bean_port obj} then P.Nothing else P.Just $ default_TimSock5Bean{timSock5Bean_port = timSock5Bean_port obj} - , if obj == default_TimSock5Bean{timSock5Bean_transport = timSock5Bean_transport obj} then P.Nothing else P.Just $ default_TimSock5Bean{timSock5Bean_transport = timSock5Bean_transport obj} - , if obj == default_TimSock5Bean{timSock5Bean_pubId = timSock5Bean_pubId obj} then P.Nothing else P.Just $ default_TimSock5Bean{timSock5Bean_pubId = timSock5Bean_pubId obj} - , if obj == default_TimSock5Bean{timSock5Bean_extraMap = timSock5Bean_extraMap obj} then P.Nothing else P.Just $ default_TimSock5Bean{timSock5Bean_extraMap = timSock5Bean_extraMap obj} - ] -from_TimSock5Bean :: TimSock5Bean -> T.ThriftVal -from_TimSock5Bean record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v317 -> P.Just (1, ("fromTid",from_Tid _v317))) $ timSock5Bean_fromTid record - , (\_v317 -> P.Just (2, ("toTid",from_Tid _v317))) $ timSock5Bean_toTid record - , (\_v317 -> P.Just (3, ("addr",T.TString $ E.encodeUtf8 _v317))) $ timSock5Bean_addr record - , (\_v317 -> P.Just (4, ("port",T.TI32 _v317))) $ timSock5Bean_port record - , (\_v317 -> P.Just (5, ("transport",T.TI16 _v317))) $ timSock5Bean_transport record - , (\_v317 -> P.Just (6, ("pubId",T.TString $ E.encodeUtf8 _v317))) $ timSock5Bean_pubId record - , (\_v317 -> (7, ("extraMap",T.TMap T.T_STRING T.T_STRING $ P.map (\(_k318,_v319) -> (T.TString $ E.encodeUtf8 _k318, T.TString $ E.encodeUtf8 _v319)) $ Map.toList _v317))) <$> timSock5Bean_extraMap record - ] -write_TimSock5Bean :: (T.Protocol p, T.Transport t) => p t -> TimSock5Bean -> P.IO () -write_TimSock5Bean oprot record = T.writeVal oprot $ from_TimSock5Bean record -encode_TimSock5Bean :: (T.Protocol p, T.Transport t) => p t -> TimSock5Bean -> LBS.ByteString -encode_TimSock5Bean oprot record = T.serializeVal oprot $ from_TimSock5Bean record -to_TimSock5Bean :: T.ThriftVal -> TimSock5Bean -to_TimSock5Bean (T.TStruct fields) = TimSock5Bean{ - timSock5Bean_fromTid = P.maybe (P.error "Missing required field: fromTid") (\(_,_val321) -> (case _val321 of {T.TStruct _val322 -> (to_Tid (T.TStruct _val322)); _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timSock5Bean_toTid = P.maybe (P.error "Missing required field: toTid") (\(_,_val321) -> (case _val321 of {T.TStruct _val323 -> (to_Tid (T.TStruct _val323)); _ -> P.error "wrong type"})) (Map.lookup (2) fields), - timSock5Bean_addr = P.maybe (P.error "Missing required field: addr") (\(_,_val321) -> (case _val321 of {T.TString _val324 -> E.decodeUtf8 _val324; _ -> P.error "wrong type"})) (Map.lookup (3) fields), - timSock5Bean_port = P.maybe (P.error "Missing required field: port") (\(_,_val321) -> (case _val321 of {T.TI32 _val325 -> _val325; _ -> P.error "wrong type"})) (Map.lookup (4) fields), - timSock5Bean_transport = P.maybe (P.error "Missing required field: transport") (\(_,_val321) -> (case _val321 of {T.TI16 _val326 -> _val326; _ -> P.error "wrong type"})) (Map.lookup (5) fields), - timSock5Bean_pubId = P.maybe (P.error "Missing required field: pubId") (\(_,_val321) -> (case _val321 of {T.TString _val327 -> E.decodeUtf8 _val327; _ -> P.error "wrong type"})) (Map.lookup (6) fields), - timSock5Bean_extraMap = P.maybe (P.Nothing) (\(_,_val321) -> P.Just (case _val321 of {T.TMap _ _ _val328 -> (Map.fromList $ P.map (\(_k330,_v329) -> ((case _k330 of {T.TString _val331 -> E.decodeUtf8 _val331; _ -> P.error "wrong type"}),(case _v329 of {T.TString _val332 -> E.decodeUtf8 _val332; _ -> P.error "wrong type"}))) _val328); _ -> P.error "wrong type"})) (Map.lookup (7) fields) - } -to_TimSock5Bean _ = P.error "not a struct" -read_TimSock5Bean :: (T.Transport t, T.Protocol p) => p t -> P.IO TimSock5Bean -read_TimSock5Bean iprot = to_TimSock5Bean <$> T.readVal iprot (T.T_STRUCT typemap_TimSock5Bean) -decode_TimSock5Bean :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimSock5Bean -decode_TimSock5Bean iprot bs = to_TimSock5Bean $ T.deserializeVal iprot (T.T_STRUCT typemap_TimSock5Bean) bs -typemap_TimSock5Bean :: T.TypeMap -typemap_TimSock5Bean = Map.fromList [(1,("fromTid",(T.T_STRUCT typemap_Tid))),(2,("toTid",(T.T_STRUCT typemap_Tid))),(3,("addr",T.T_STRING)),(4,("port",T.T_I32)),(5,("transport",T.T_I16)),(6,("pubId",T.T_STRING)),(7,("extraMap",(T.T_MAP T.T_STRING T.T_STRING)))] -default_TimSock5Bean :: TimSock5Bean -default_TimSock5Bean = TimSock5Bean{ - timSock5Bean_fromTid = default_Tid, - timSock5Bean_toTid = default_Tid, - timSock5Bean_addr = "", - timSock5Bean_port = 0, - timSock5Bean_transport = 0, - timSock5Bean_pubId = "", - timSock5Bean_extraMap = P.Nothing} -data TimSock5Bytes = TimSock5Bytes { timSock5Bytes_pubId :: LT.Text - , timSock5Bytes_index :: I.Int32 - , timSock5Bytes_bytes :: (Vector.Vector LBS.ByteString) - , timSock5Bytes_extraMap :: P.Maybe (Map.HashMap LT.Text LT.Text) - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimSock5Bytes where - hashWithSalt salt record = salt `H.hashWithSalt` timSock5Bytes_pubId record `H.hashWithSalt` timSock5Bytes_index record `H.hashWithSalt` timSock5Bytes_bytes record `H.hashWithSalt` timSock5Bytes_extraMap record -instance QC.Arbitrary TimSock5Bytes where - arbitrary = M.liftM TimSock5Bytes (QC.arbitrary) - `M.ap`(QC.arbitrary) - `M.ap`(QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - shrink obj | obj == default_TimSock5Bytes = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimSock5Bytes{timSock5Bytes_pubId = timSock5Bytes_pubId obj} then P.Nothing else P.Just $ default_TimSock5Bytes{timSock5Bytes_pubId = timSock5Bytes_pubId obj} - , if obj == default_TimSock5Bytes{timSock5Bytes_index = timSock5Bytes_index obj} then P.Nothing else P.Just $ default_TimSock5Bytes{timSock5Bytes_index = timSock5Bytes_index obj} - , if obj == default_TimSock5Bytes{timSock5Bytes_bytes = timSock5Bytes_bytes obj} then P.Nothing else P.Just $ default_TimSock5Bytes{timSock5Bytes_bytes = timSock5Bytes_bytes obj} - , if obj == default_TimSock5Bytes{timSock5Bytes_extraMap = timSock5Bytes_extraMap obj} then P.Nothing else P.Just $ default_TimSock5Bytes{timSock5Bytes_extraMap = timSock5Bytes_extraMap obj} - ] -from_TimSock5Bytes :: TimSock5Bytes -> T.ThriftVal -from_TimSock5Bytes record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v335 -> P.Just (1, ("pubId",T.TString $ E.encodeUtf8 _v335))) $ timSock5Bytes_pubId record - , (\_v335 -> P.Just (2, ("index",T.TI32 _v335))) $ timSock5Bytes_index record - , (\_v335 -> P.Just (3, ("bytes",T.TList T.T_STRING $ P.map (\_v337 -> T.TString _v337) $ Vector.toList _v335))) $ timSock5Bytes_bytes record - , (\_v335 -> (4, ("extraMap",T.TMap T.T_STRING T.T_STRING $ P.map (\(_k338,_v339) -> (T.TString $ E.encodeUtf8 _k338, T.TString $ E.encodeUtf8 _v339)) $ Map.toList _v335))) <$> timSock5Bytes_extraMap record - ] -write_TimSock5Bytes :: (T.Protocol p, T.Transport t) => p t -> TimSock5Bytes -> P.IO () -write_TimSock5Bytes oprot record = T.writeVal oprot $ from_TimSock5Bytes record -encode_TimSock5Bytes :: (T.Protocol p, T.Transport t) => p t -> TimSock5Bytes -> LBS.ByteString -encode_TimSock5Bytes oprot record = T.serializeVal oprot $ from_TimSock5Bytes record -to_TimSock5Bytes :: T.ThriftVal -> TimSock5Bytes -to_TimSock5Bytes (T.TStruct fields) = TimSock5Bytes{ - timSock5Bytes_pubId = P.maybe (P.error "Missing required field: pubId") (\(_,_val341) -> (case _val341 of {T.TString _val342 -> E.decodeUtf8 _val342; _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timSock5Bytes_index = P.maybe (P.error "Missing required field: index") (\(_,_val341) -> (case _val341 of {T.TI32 _val343 -> _val343; _ -> P.error "wrong type"})) (Map.lookup (2) fields), - timSock5Bytes_bytes = P.maybe (P.error "Missing required field: bytes") (\(_,_val341) -> (case _val341 of {T.TList _ _val344 -> (Vector.fromList $ P.map (\_v345 -> (case _v345 of {T.TString _val346 -> _val346; _ -> P.error "wrong type"})) _val344); _ -> P.error "wrong type"})) (Map.lookup (3) fields), - timSock5Bytes_extraMap = P.maybe (P.Nothing) (\(_,_val341) -> P.Just (case _val341 of {T.TMap _ _ _val347 -> (Map.fromList $ P.map (\(_k349,_v348) -> ((case _k349 of {T.TString _val350 -> E.decodeUtf8 _val350; _ -> P.error "wrong type"}),(case _v348 of {T.TString _val351 -> E.decodeUtf8 _val351; _ -> P.error "wrong type"}))) _val347); _ -> P.error "wrong type"})) (Map.lookup (4) fields) - } -to_TimSock5Bytes _ = P.error "not a struct" -read_TimSock5Bytes :: (T.Transport t, T.Protocol p) => p t -> P.IO TimSock5Bytes -read_TimSock5Bytes iprot = to_TimSock5Bytes <$> T.readVal iprot (T.T_STRUCT typemap_TimSock5Bytes) -decode_TimSock5Bytes :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimSock5Bytes -decode_TimSock5Bytes iprot bs = to_TimSock5Bytes $ T.deserializeVal iprot (T.T_STRUCT typemap_TimSock5Bytes) bs -typemap_TimSock5Bytes :: T.TypeMap -typemap_TimSock5Bytes = Map.fromList [(1,("pubId",T.T_STRING)),(2,("index",T.T_I32)),(3,("bytes",(T.T_LIST T.T_STRING))),(4,("extraMap",(T.T_MAP T.T_STRING T.T_STRING)))] -default_TimSock5Bytes :: TimSock5Bytes -default_TimSock5Bytes = TimSock5Bytes{ - timSock5Bytes_pubId = "", - timSock5Bytes_index = 0, - timSock5Bytes_bytes = Vector.empty, - timSock5Bytes_extraMap = P.Nothing} -data TimPage = TimPage { timPage_fromTimeStamp :: P.Maybe LT.Text - , timPage_toTimeStamp :: P.Maybe LT.Text - , timPage_limitCount :: P.Maybe I.Int32 - , timPage_extraMap :: P.Maybe (Map.HashMap LT.Text LT.Text) - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimPage where - hashWithSalt salt record = salt `H.hashWithSalt` timPage_fromTimeStamp record `H.hashWithSalt` timPage_toTimeStamp record `H.hashWithSalt` timPage_limitCount record `H.hashWithSalt` timPage_extraMap record -instance QC.Arbitrary TimPage where - arbitrary = M.liftM TimPage (M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - shrink obj | obj == default_TimPage = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimPage{timPage_fromTimeStamp = timPage_fromTimeStamp obj} then P.Nothing else P.Just $ default_TimPage{timPage_fromTimeStamp = timPage_fromTimeStamp obj} - , if obj == default_TimPage{timPage_toTimeStamp = timPage_toTimeStamp obj} then P.Nothing else P.Just $ default_TimPage{timPage_toTimeStamp = timPage_toTimeStamp obj} - , if obj == default_TimPage{timPage_limitCount = timPage_limitCount obj} then P.Nothing else P.Just $ default_TimPage{timPage_limitCount = timPage_limitCount obj} - , if obj == default_TimPage{timPage_extraMap = timPage_extraMap obj} then P.Nothing else P.Just $ default_TimPage{timPage_extraMap = timPage_extraMap obj} - ] -from_TimPage :: TimPage -> T.ThriftVal -from_TimPage record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v354 -> (1, ("fromTimeStamp",T.TString $ E.encodeUtf8 _v354))) <$> timPage_fromTimeStamp record - , (\_v354 -> (2, ("toTimeStamp",T.TString $ E.encodeUtf8 _v354))) <$> timPage_toTimeStamp record - , (\_v354 -> (3, ("limitCount",T.TI32 _v354))) <$> timPage_limitCount record - , (\_v354 -> (4, ("extraMap",T.TMap T.T_STRING T.T_STRING $ P.map (\(_k355,_v356) -> (T.TString $ E.encodeUtf8 _k355, T.TString $ E.encodeUtf8 _v356)) $ Map.toList _v354))) <$> timPage_extraMap record - ] -write_TimPage :: (T.Protocol p, T.Transport t) => p t -> TimPage -> P.IO () -write_TimPage oprot record = T.writeVal oprot $ from_TimPage record -encode_TimPage :: (T.Protocol p, T.Transport t) => p t -> TimPage -> LBS.ByteString -encode_TimPage oprot record = T.serializeVal oprot $ from_TimPage record -to_TimPage :: T.ThriftVal -> TimPage -to_TimPage (T.TStruct fields) = TimPage{ - timPage_fromTimeStamp = P.maybe (P.Nothing) (\(_,_val358) -> P.Just (case _val358 of {T.TString _val359 -> E.decodeUtf8 _val359; _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timPage_toTimeStamp = P.maybe (P.Nothing) (\(_,_val358) -> P.Just (case _val358 of {T.TString _val360 -> E.decodeUtf8 _val360; _ -> P.error "wrong type"})) (Map.lookup (2) fields), - timPage_limitCount = P.maybe (P.Nothing) (\(_,_val358) -> P.Just (case _val358 of {T.TI32 _val361 -> _val361; _ -> P.error "wrong type"})) (Map.lookup (3) fields), - timPage_extraMap = P.maybe (P.Nothing) (\(_,_val358) -> P.Just (case _val358 of {T.TMap _ _ _val362 -> (Map.fromList $ P.map (\(_k364,_v363) -> ((case _k364 of {T.TString _val365 -> E.decodeUtf8 _val365; _ -> P.error "wrong type"}),(case _v363 of {T.TString _val366 -> E.decodeUtf8 _val366; _ -> P.error "wrong type"}))) _val362); _ -> P.error "wrong type"})) (Map.lookup (4) fields) - } -to_TimPage _ = P.error "not a struct" -read_TimPage :: (T.Transport t, T.Protocol p) => p t -> P.IO TimPage -read_TimPage iprot = to_TimPage <$> T.readVal iprot (T.T_STRUCT typemap_TimPage) -decode_TimPage :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimPage -decode_TimPage iprot bs = to_TimPage $ T.deserializeVal iprot (T.T_STRUCT typemap_TimPage) bs -typemap_TimPage :: T.TypeMap -typemap_TimPage = Map.fromList [(1,("fromTimeStamp",T.T_STRING)),(2,("toTimeStamp",T.T_STRING)),(3,("limitCount",T.T_I32)),(4,("extraMap",(T.T_MAP T.T_STRING T.T_STRING)))] -default_TimPage :: TimPage -default_TimPage = TimPage{ - timPage_fromTimeStamp = P.Nothing, - timPage_toTimeStamp = P.Nothing, - timPage_limitCount = P.Nothing, - timPage_extraMap = P.Nothing} -data TimMessageIq = TimMessageIq { timMessageIq_tidlist :: P.Maybe (Vector.Vector LT.Text) - , timMessageIq_timPage :: P.Maybe TimPage - , timMessageIq_midlist :: P.Maybe (Vector.Vector LT.Text) - , timMessageIq_extraMap :: P.Maybe (Map.HashMap LT.Text LT.Text) - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimMessageIq where - hashWithSalt salt record = salt `H.hashWithSalt` timMessageIq_tidlist record `H.hashWithSalt` timMessageIq_timPage record `H.hashWithSalt` timMessageIq_midlist record `H.hashWithSalt` timMessageIq_extraMap record -instance QC.Arbitrary TimMessageIq where - arbitrary = M.liftM TimMessageIq (M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - shrink obj | obj == default_TimMessageIq = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimMessageIq{timMessageIq_tidlist = timMessageIq_tidlist obj} then P.Nothing else P.Just $ default_TimMessageIq{timMessageIq_tidlist = timMessageIq_tidlist obj} - , if obj == default_TimMessageIq{timMessageIq_timPage = timMessageIq_timPage obj} then P.Nothing else P.Just $ default_TimMessageIq{timMessageIq_timPage = timMessageIq_timPage obj} - , if obj == default_TimMessageIq{timMessageIq_midlist = timMessageIq_midlist obj} then P.Nothing else P.Just $ default_TimMessageIq{timMessageIq_midlist = timMessageIq_midlist obj} - , if obj == default_TimMessageIq{timMessageIq_extraMap = timMessageIq_extraMap obj} then P.Nothing else P.Just $ default_TimMessageIq{timMessageIq_extraMap = timMessageIq_extraMap obj} - ] -from_TimMessageIq :: TimMessageIq -> T.ThriftVal -from_TimMessageIq record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v369 -> (1, ("tidlist",T.TList T.T_STRING $ P.map (\_v371 -> T.TString $ E.encodeUtf8 _v371) $ Vector.toList _v369))) <$> timMessageIq_tidlist record - , (\_v369 -> (2, ("timPage",from_TimPage _v369))) <$> timMessageIq_timPage record - , (\_v369 -> (3, ("midlist",T.TList T.T_STRING $ P.map (\_v373 -> T.TString $ E.encodeUtf8 _v373) $ Vector.toList _v369))) <$> timMessageIq_midlist record - , (\_v369 -> (4, ("extraMap",T.TMap T.T_STRING T.T_STRING $ P.map (\(_k374,_v375) -> (T.TString $ E.encodeUtf8 _k374, T.TString $ E.encodeUtf8 _v375)) $ Map.toList _v369))) <$> timMessageIq_extraMap record - ] -write_TimMessageIq :: (T.Protocol p, T.Transport t) => p t -> TimMessageIq -> P.IO () -write_TimMessageIq oprot record = T.writeVal oprot $ from_TimMessageIq record -encode_TimMessageIq :: (T.Protocol p, T.Transport t) => p t -> TimMessageIq -> LBS.ByteString -encode_TimMessageIq oprot record = T.serializeVal oprot $ from_TimMessageIq record -to_TimMessageIq :: T.ThriftVal -> TimMessageIq -to_TimMessageIq (T.TStruct fields) = TimMessageIq{ - timMessageIq_tidlist = P.maybe (P.Nothing) (\(_,_val377) -> P.Just (case _val377 of {T.TList _ _val378 -> (Vector.fromList $ P.map (\_v379 -> (case _v379 of {T.TString _val380 -> E.decodeUtf8 _val380; _ -> P.error "wrong type"})) _val378); _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timMessageIq_timPage = P.maybe (P.Nothing) (\(_,_val377) -> P.Just (case _val377 of {T.TStruct _val381 -> (to_TimPage (T.TStruct _val381)); _ -> P.error "wrong type"})) (Map.lookup (2) fields), - timMessageIq_midlist = P.maybe (P.Nothing) (\(_,_val377) -> P.Just (case _val377 of {T.TList _ _val382 -> (Vector.fromList $ P.map (\_v383 -> (case _v383 of {T.TString _val384 -> E.decodeUtf8 _val384; _ -> P.error "wrong type"})) _val382); _ -> P.error "wrong type"})) (Map.lookup (3) fields), - timMessageIq_extraMap = P.maybe (P.Nothing) (\(_,_val377) -> P.Just (case _val377 of {T.TMap _ _ _val385 -> (Map.fromList $ P.map (\(_k387,_v386) -> ((case _k387 of {T.TString _val388 -> E.decodeUtf8 _val388; _ -> P.error "wrong type"}),(case _v386 of {T.TString _val389 -> E.decodeUtf8 _val389; _ -> P.error "wrong type"}))) _val385); _ -> P.error "wrong type"})) (Map.lookup (4) fields) - } -to_TimMessageIq _ = P.error "not a struct" -read_TimMessageIq :: (T.Transport t, T.Protocol p) => p t -> P.IO TimMessageIq -read_TimMessageIq iprot = to_TimMessageIq <$> T.readVal iprot (T.T_STRUCT typemap_TimMessageIq) -decode_TimMessageIq :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimMessageIq -decode_TimMessageIq iprot bs = to_TimMessageIq $ T.deserializeVal iprot (T.T_STRUCT typemap_TimMessageIq) bs -typemap_TimMessageIq :: T.TypeMap -typemap_TimMessageIq = Map.fromList [(1,("tidlist",(T.T_LIST T.T_STRING))),(2,("timPage",(T.T_STRUCT typemap_TimPage))),(3,("midlist",(T.T_LIST T.T_STRING))),(4,("extraMap",(T.T_MAP T.T_STRING T.T_STRING)))] -default_TimMessageIq :: TimMessageIq -default_TimMessageIq = TimMessageIq{ - timMessageIq_tidlist = P.Nothing, - timMessageIq_timPage = P.Nothing, - timMessageIq_midlist = P.Nothing, - timMessageIq_extraMap = P.Nothing} -data TimAuth = TimAuth { timAuth_domain :: P.Maybe LT.Text - , timAuth_username :: P.Maybe LT.Text - , timAuth_pwd :: P.Maybe LT.Text - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimAuth where - hashWithSalt salt record = salt `H.hashWithSalt` timAuth_domain record `H.hashWithSalt` timAuth_username record `H.hashWithSalt` timAuth_pwd record -instance QC.Arbitrary TimAuth where - arbitrary = M.liftM TimAuth (M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - shrink obj | obj == default_TimAuth = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimAuth{timAuth_domain = timAuth_domain obj} then P.Nothing else P.Just $ default_TimAuth{timAuth_domain = timAuth_domain obj} - , if obj == default_TimAuth{timAuth_username = timAuth_username obj} then P.Nothing else P.Just $ default_TimAuth{timAuth_username = timAuth_username obj} - , if obj == default_TimAuth{timAuth_pwd = timAuth_pwd obj} then P.Nothing else P.Just $ default_TimAuth{timAuth_pwd = timAuth_pwd obj} - ] -from_TimAuth :: TimAuth -> T.ThriftVal -from_TimAuth record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v392 -> (1, ("domain",T.TString $ E.encodeUtf8 _v392))) <$> timAuth_domain record - , (\_v392 -> (2, ("username",T.TString $ E.encodeUtf8 _v392))) <$> timAuth_username record - , (\_v392 -> (3, ("pwd",T.TString $ E.encodeUtf8 _v392))) <$> timAuth_pwd record - ] -write_TimAuth :: (T.Protocol p, T.Transport t) => p t -> TimAuth -> P.IO () -write_TimAuth oprot record = T.writeVal oprot $ from_TimAuth record -encode_TimAuth :: (T.Protocol p, T.Transport t) => p t -> TimAuth -> LBS.ByteString -encode_TimAuth oprot record = T.serializeVal oprot $ from_TimAuth record -to_TimAuth :: T.ThriftVal -> TimAuth -to_TimAuth (T.TStruct fields) = TimAuth{ - timAuth_domain = P.maybe (P.Nothing) (\(_,_val394) -> P.Just (case _val394 of {T.TString _val395 -> E.decodeUtf8 _val395; _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timAuth_username = P.maybe (P.Nothing) (\(_,_val394) -> P.Just (case _val394 of {T.TString _val396 -> E.decodeUtf8 _val396; _ -> P.error "wrong type"})) (Map.lookup (2) fields), - timAuth_pwd = P.maybe (P.Nothing) (\(_,_val394) -> P.Just (case _val394 of {T.TString _val397 -> E.decodeUtf8 _val397; _ -> P.error "wrong type"})) (Map.lookup (3) fields) - } -to_TimAuth _ = P.error "not a struct" -read_TimAuth :: (T.Transport t, T.Protocol p) => p t -> P.IO TimAuth -read_TimAuth iprot = to_TimAuth <$> T.readVal iprot (T.T_STRUCT typemap_TimAuth) -decode_TimAuth :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimAuth -decode_TimAuth iprot bs = to_TimAuth $ T.deserializeVal iprot (T.T_STRUCT typemap_TimAuth) bs -typemap_TimAuth :: T.TypeMap -typemap_TimAuth = Map.fromList [(1,("domain",T.T_STRING)),(2,("username",T.T_STRING)),(3,("pwd",T.T_STRING))] -default_TimAuth :: TimAuth -default_TimAuth = TimAuth{ - timAuth_domain = P.Nothing, - timAuth_username = P.Nothing, - timAuth_pwd = P.Nothing} -data TimMBeanList = TimMBeanList { timMBeanList_threadId :: LT.Text - , timMBeanList_timMBeanList :: P.Maybe (Vector.Vector TimMBean) - , timMBeanList_reqType :: P.Maybe LT.Text - , timMBeanList_extraMap :: P.Maybe (Map.HashMap LT.Text LT.Text) - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimMBeanList where - hashWithSalt salt record = salt `H.hashWithSalt` timMBeanList_threadId record `H.hashWithSalt` timMBeanList_timMBeanList record `H.hashWithSalt` timMBeanList_reqType record `H.hashWithSalt` timMBeanList_extraMap record -instance QC.Arbitrary TimMBeanList where - arbitrary = M.liftM TimMBeanList (QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - shrink obj | obj == default_TimMBeanList = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimMBeanList{timMBeanList_threadId = timMBeanList_threadId obj} then P.Nothing else P.Just $ default_TimMBeanList{timMBeanList_threadId = timMBeanList_threadId obj} - , if obj == default_TimMBeanList{timMBeanList_timMBeanList = timMBeanList_timMBeanList obj} then P.Nothing else P.Just $ default_TimMBeanList{timMBeanList_timMBeanList = timMBeanList_timMBeanList obj} - , if obj == default_TimMBeanList{timMBeanList_reqType = timMBeanList_reqType obj} then P.Nothing else P.Just $ default_TimMBeanList{timMBeanList_reqType = timMBeanList_reqType obj} - , if obj == default_TimMBeanList{timMBeanList_extraMap = timMBeanList_extraMap obj} then P.Nothing else P.Just $ default_TimMBeanList{timMBeanList_extraMap = timMBeanList_extraMap obj} - ] -from_TimMBeanList :: TimMBeanList -> T.ThriftVal -from_TimMBeanList record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v400 -> P.Just (1, ("threadId",T.TString $ E.encodeUtf8 _v400))) $ timMBeanList_threadId record - , (\_v400 -> (2, ("timMBeanList",T.TList (T.T_STRUCT typemap_TimMBean) $ P.map (\_v402 -> from_TimMBean _v402) $ Vector.toList _v400))) <$> timMBeanList_timMBeanList record - , (\_v400 -> (3, ("reqType",T.TString $ E.encodeUtf8 _v400))) <$> timMBeanList_reqType record - , (\_v400 -> (4, ("extraMap",T.TMap T.T_STRING T.T_STRING $ P.map (\(_k403,_v404) -> (T.TString $ E.encodeUtf8 _k403, T.TString $ E.encodeUtf8 _v404)) $ Map.toList _v400))) <$> timMBeanList_extraMap record - ] -write_TimMBeanList :: (T.Protocol p, T.Transport t) => p t -> TimMBeanList -> P.IO () -write_TimMBeanList oprot record = T.writeVal oprot $ from_TimMBeanList record -encode_TimMBeanList :: (T.Protocol p, T.Transport t) => p t -> TimMBeanList -> LBS.ByteString -encode_TimMBeanList oprot record = T.serializeVal oprot $ from_TimMBeanList record -to_TimMBeanList :: T.ThriftVal -> TimMBeanList -to_TimMBeanList (T.TStruct fields) = TimMBeanList{ - timMBeanList_threadId = P.maybe (P.error "Missing required field: threadId") (\(_,_val406) -> (case _val406 of {T.TString _val407 -> E.decodeUtf8 _val407; _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timMBeanList_timMBeanList = P.maybe (P.Nothing) (\(_,_val406) -> P.Just (case _val406 of {T.TList _ _val408 -> (Vector.fromList $ P.map (\_v409 -> (case _v409 of {T.TStruct _val410 -> (to_TimMBean (T.TStruct _val410)); _ -> P.error "wrong type"})) _val408); _ -> P.error "wrong type"})) (Map.lookup (2) fields), - timMBeanList_reqType = P.maybe (P.Nothing) (\(_,_val406) -> P.Just (case _val406 of {T.TString _val411 -> E.decodeUtf8 _val411; _ -> P.error "wrong type"})) (Map.lookup (3) fields), - timMBeanList_extraMap = P.maybe (P.Nothing) (\(_,_val406) -> P.Just (case _val406 of {T.TMap _ _ _val412 -> (Map.fromList $ P.map (\(_k414,_v413) -> ((case _k414 of {T.TString _val415 -> E.decodeUtf8 _val415; _ -> P.error "wrong type"}),(case _v413 of {T.TString _val416 -> E.decodeUtf8 _val416; _ -> P.error "wrong type"}))) _val412); _ -> P.error "wrong type"})) (Map.lookup (4) fields) - } -to_TimMBeanList _ = P.error "not a struct" -read_TimMBeanList :: (T.Transport t, T.Protocol p) => p t -> P.IO TimMBeanList -read_TimMBeanList iprot = to_TimMBeanList <$> T.readVal iprot (T.T_STRUCT typemap_TimMBeanList) -decode_TimMBeanList :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimMBeanList -decode_TimMBeanList iprot bs = to_TimMBeanList $ T.deserializeVal iprot (T.T_STRUCT typemap_TimMBeanList) bs -typemap_TimMBeanList :: T.TypeMap -typemap_TimMBeanList = Map.fromList [(1,("threadId",T.T_STRING)),(2,("timMBeanList",(T.T_LIST (T.T_STRUCT typemap_TimMBean)))),(3,("reqType",T.T_STRING)),(4,("extraMap",(T.T_MAP T.T_STRING T.T_STRING)))] -default_TimMBeanList :: TimMBeanList -default_TimMBeanList = TimMBeanList{ - timMBeanList_threadId = "", - timMBeanList_timMBeanList = P.Nothing, - timMBeanList_reqType = P.Nothing, - timMBeanList_extraMap = P.Nothing} -data TimPBeanList = TimPBeanList { timPBeanList_threadId :: LT.Text - , timPBeanList_timPBeanList :: P.Maybe (Vector.Vector TimPBean) - , timPBeanList_reqType :: P.Maybe LT.Text - , timPBeanList_extraMap :: P.Maybe (Map.HashMap LT.Text LT.Text) - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimPBeanList where - hashWithSalt salt record = salt `H.hashWithSalt` timPBeanList_threadId record `H.hashWithSalt` timPBeanList_timPBeanList record `H.hashWithSalt` timPBeanList_reqType record `H.hashWithSalt` timPBeanList_extraMap record -instance QC.Arbitrary TimPBeanList where - arbitrary = M.liftM TimPBeanList (QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - shrink obj | obj == default_TimPBeanList = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimPBeanList{timPBeanList_threadId = timPBeanList_threadId obj} then P.Nothing else P.Just $ default_TimPBeanList{timPBeanList_threadId = timPBeanList_threadId obj} - , if obj == default_TimPBeanList{timPBeanList_timPBeanList = timPBeanList_timPBeanList obj} then P.Nothing else P.Just $ default_TimPBeanList{timPBeanList_timPBeanList = timPBeanList_timPBeanList obj} - , if obj == default_TimPBeanList{timPBeanList_reqType = timPBeanList_reqType obj} then P.Nothing else P.Just $ default_TimPBeanList{timPBeanList_reqType = timPBeanList_reqType obj} - , if obj == default_TimPBeanList{timPBeanList_extraMap = timPBeanList_extraMap obj} then P.Nothing else P.Just $ default_TimPBeanList{timPBeanList_extraMap = timPBeanList_extraMap obj} - ] -from_TimPBeanList :: TimPBeanList -> T.ThriftVal -from_TimPBeanList record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v419 -> P.Just (1, ("threadId",T.TString $ E.encodeUtf8 _v419))) $ timPBeanList_threadId record - , (\_v419 -> (2, ("timPBeanList",T.TList (T.T_STRUCT typemap_TimPBean) $ P.map (\_v421 -> from_TimPBean _v421) $ Vector.toList _v419))) <$> timPBeanList_timPBeanList record - , (\_v419 -> (3, ("reqType",T.TString $ E.encodeUtf8 _v419))) <$> timPBeanList_reqType record - , (\_v419 -> (4, ("extraMap",T.TMap T.T_STRING T.T_STRING $ P.map (\(_k422,_v423) -> (T.TString $ E.encodeUtf8 _k422, T.TString $ E.encodeUtf8 _v423)) $ Map.toList _v419))) <$> timPBeanList_extraMap record - ] -write_TimPBeanList :: (T.Protocol p, T.Transport t) => p t -> TimPBeanList -> P.IO () -write_TimPBeanList oprot record = T.writeVal oprot $ from_TimPBeanList record -encode_TimPBeanList :: (T.Protocol p, T.Transport t) => p t -> TimPBeanList -> LBS.ByteString -encode_TimPBeanList oprot record = T.serializeVal oprot $ from_TimPBeanList record -to_TimPBeanList :: T.ThriftVal -> TimPBeanList -to_TimPBeanList (T.TStruct fields) = TimPBeanList{ - timPBeanList_threadId = P.maybe (P.error "Missing required field: threadId") (\(_,_val425) -> (case _val425 of {T.TString _val426 -> E.decodeUtf8 _val426; _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timPBeanList_timPBeanList = P.maybe (P.Nothing) (\(_,_val425) -> P.Just (case _val425 of {T.TList _ _val427 -> (Vector.fromList $ P.map (\_v428 -> (case _v428 of {T.TStruct _val429 -> (to_TimPBean (T.TStruct _val429)); _ -> P.error "wrong type"})) _val427); _ -> P.error "wrong type"})) (Map.lookup (2) fields), - timPBeanList_reqType = P.maybe (P.Nothing) (\(_,_val425) -> P.Just (case _val425 of {T.TString _val430 -> E.decodeUtf8 _val430; _ -> P.error "wrong type"})) (Map.lookup (3) fields), - timPBeanList_extraMap = P.maybe (P.Nothing) (\(_,_val425) -> P.Just (case _val425 of {T.TMap _ _ _val431 -> (Map.fromList $ P.map (\(_k433,_v432) -> ((case _k433 of {T.TString _val434 -> E.decodeUtf8 _val434; _ -> P.error "wrong type"}),(case _v432 of {T.TString _val435 -> E.decodeUtf8 _val435; _ -> P.error "wrong type"}))) _val431); _ -> P.error "wrong type"})) (Map.lookup (4) fields) - } -to_TimPBeanList _ = P.error "not a struct" -read_TimPBeanList :: (T.Transport t, T.Protocol p) => p t -> P.IO TimPBeanList -read_TimPBeanList iprot = to_TimPBeanList <$> T.readVal iprot (T.T_STRUCT typemap_TimPBeanList) -decode_TimPBeanList :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimPBeanList -decode_TimPBeanList iprot bs = to_TimPBeanList $ T.deserializeVal iprot (T.T_STRUCT typemap_TimPBeanList) bs -typemap_TimPBeanList :: T.TypeMap -typemap_TimPBeanList = Map.fromList [(1,("threadId",T.T_STRING)),(2,("timPBeanList",(T.T_LIST (T.T_STRUCT typemap_TimPBean)))),(3,("reqType",T.T_STRING)),(4,("extraMap",(T.T_MAP T.T_STRING T.T_STRING)))] -default_TimPBeanList :: TimPBeanList -default_TimPBeanList = TimPBeanList{ - timPBeanList_threadId = "", - timPBeanList_timPBeanList = P.Nothing, - timPBeanList_reqType = P.Nothing, - timPBeanList_extraMap = P.Nothing} -data TimPropertyBean = TimPropertyBean { timPropertyBean_threadId :: P.Maybe LT.Text - , timPropertyBean_interflow :: P.Maybe LT.Text - , timPropertyBean_tls :: P.Maybe LT.Text - } deriving (P.Show,P.Eq,G.Generic,TY.Typeable) -instance H.Hashable TimPropertyBean where - hashWithSalt salt record = salt `H.hashWithSalt` timPropertyBean_threadId record `H.hashWithSalt` timPropertyBean_interflow record `H.hashWithSalt` timPropertyBean_tls record -instance QC.Arbitrary TimPropertyBean where - arbitrary = M.liftM TimPropertyBean (M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - `M.ap`(M.liftM P.Just QC.arbitrary) - shrink obj | obj == default_TimPropertyBean = [] - | P.otherwise = M.catMaybes - [ if obj == default_TimPropertyBean{timPropertyBean_threadId = timPropertyBean_threadId obj} then P.Nothing else P.Just $ default_TimPropertyBean{timPropertyBean_threadId = timPropertyBean_threadId obj} - , if obj == default_TimPropertyBean{timPropertyBean_interflow = timPropertyBean_interflow obj} then P.Nothing else P.Just $ default_TimPropertyBean{timPropertyBean_interflow = timPropertyBean_interflow obj} - , if obj == default_TimPropertyBean{timPropertyBean_tls = timPropertyBean_tls obj} then P.Nothing else P.Just $ default_TimPropertyBean{timPropertyBean_tls = timPropertyBean_tls obj} - ] -from_TimPropertyBean :: TimPropertyBean -> T.ThriftVal -from_TimPropertyBean record = T.TStruct $ Map.fromList $ M.catMaybes - [ (\_v438 -> (1, ("threadId",T.TString $ E.encodeUtf8 _v438))) <$> timPropertyBean_threadId record - , (\_v438 -> (2, ("interflow",T.TString $ E.encodeUtf8 _v438))) <$> timPropertyBean_interflow record - , (\_v438 -> (3, ("tls",T.TString $ E.encodeUtf8 _v438))) <$> timPropertyBean_tls record - ] -write_TimPropertyBean :: (T.Protocol p, T.Transport t) => p t -> TimPropertyBean -> P.IO () -write_TimPropertyBean oprot record = T.writeVal oprot $ from_TimPropertyBean record -encode_TimPropertyBean :: (T.Protocol p, T.Transport t) => p t -> TimPropertyBean -> LBS.ByteString -encode_TimPropertyBean oprot record = T.serializeVal oprot $ from_TimPropertyBean record -to_TimPropertyBean :: T.ThriftVal -> TimPropertyBean -to_TimPropertyBean (T.TStruct fields) = TimPropertyBean{ - timPropertyBean_threadId = P.maybe (P.Nothing) (\(_,_val440) -> P.Just (case _val440 of {T.TString _val441 -> E.decodeUtf8 _val441; _ -> P.error "wrong type"})) (Map.lookup (1) fields), - timPropertyBean_interflow = P.maybe (P.Nothing) (\(_,_val440) -> P.Just (case _val440 of {T.TString _val442 -> E.decodeUtf8 _val442; _ -> P.error "wrong type"})) (Map.lookup (2) fields), - timPropertyBean_tls = P.maybe (P.Nothing) (\(_,_val440) -> P.Just (case _val440 of {T.TString _val443 -> E.decodeUtf8 _val443; _ -> P.error "wrong type"})) (Map.lookup (3) fields) - } -to_TimPropertyBean _ = P.error "not a struct" -read_TimPropertyBean :: (T.Transport t, T.Protocol p) => p t -> P.IO TimPropertyBean -read_TimPropertyBean iprot = to_TimPropertyBean <$> T.readVal iprot (T.T_STRUCT typemap_TimPropertyBean) -decode_TimPropertyBean :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> TimPropertyBean -decode_TimPropertyBean iprot bs = to_TimPropertyBean $ T.deserializeVal iprot (T.T_STRUCT typemap_TimPropertyBean) bs -typemap_TimPropertyBean :: T.TypeMap -typemap_TimPropertyBean = Map.fromList [(1,("threadId",T.T_STRING)),(2,("interflow",T.T_STRING)),(3,("tls",T.T_STRING))] -default_TimPropertyBean :: TimPropertyBean -default_TimPropertyBean = TimPropertyBean{ - timPropertyBean_threadId = P.Nothing, - timPropertyBean_interflow = P.Nothing, - timPropertyBean_tls = P.Nothing} diff --git a/protocols/gen-html/index.html b/protocols/gen-html/index.html new file mode 100644 index 0000000..3a3b9e1 --- /dev/null +++ b/protocols/gen-html/index.html @@ -0,0 +1,69 @@ + + + +All Thrift declarations + diff --git a/protocols/gen-html/style.css b/protocols/gen-html/style.css new file mode 100644 index 0000000..34fd9d7 --- /dev/null +++ b/protocols/gen-html/style.css @@ -0,0 +1,184 @@ +/*! + * Bootstrap v2.0.3 + * + * Copyright 2012 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + */ +.clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";} +.clearfix:after{clear:both;} +.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;} +.input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;} +article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;} +audio,canvas,video{display:inline-block;*display:inline;*zoom:1;} +audio:not([controls]){display:none;} +html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;} +a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} +a:hover,a:active{outline:0;} +sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;} +sup{top:-0.5em;} +sub{bottom:-0.25em;} +img{max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic;} +button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;} +button,input{*overflow:visible;line-height:normal;} +button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;} +button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;} +input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield;} +input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;} +textarea{overflow:auto;vertical-align:top;} +body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;color:#333333;background-color:#ffffff;} +a{color:#0088cc;text-decoration:none;} +a:hover{color:#005580;text-decoration:underline;} +.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";} +.row:after{clear:both;} +[class*="span"]{float:left;margin-left:20px;} +.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;} +.span12{width:940px;} +.span11{width:860px;} +.span10{width:780px;} +.span9{width:700px;} +.span8{width:620px;} +.span7{width:540px;} +.span6{width:460px;} +.span5{width:380px;} +.span4{width:300px;} +.span3{width:220px;} +.span2{width:140px;} +.span1{width:60px;} +.offset12{margin-left:980px;} +.offset11{margin-left:900px;} +.offset10{margin-left:820px;} +.offset9{margin-left:740px;} +.offset8{margin-left:660px;} +.offset7{margin-left:580px;} +.offset6{margin-left:500px;} +.offset5{margin-left:420px;} +.offset4{margin-left:340px;} +.offset3{margin-left:260px;} +.offset2{margin-left:180px;} +.offset1{margin-left:100px;} +.row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";} +.row-fluid:after{clear:both;} +.row-fluid [class*="span"]{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.127659574%;*margin-left:2.0744680846382977%;} +.row-fluid [class*="span"]:first-child{margin-left:0;} +.row-fluid .span12{width:99.99999998999999%;*width:99.94680850063828%;} +.row-fluid .span11{width:91.489361693%;*width:91.4361702036383%;} +.row-fluid .span10{width:82.97872339599999%;*width:82.92553190663828%;} +.row-fluid .span9{width:74.468085099%;*width:74.4148936096383%;} +.row-fluid .span8{width:65.95744680199999%;*width:65.90425531263828%;} +.row-fluid .span7{width:57.446808505%;*width:57.3936170156383%;} +.row-fluid .span6{width:48.93617020799999%;*width:48.88297871863829%;} +.row-fluid .span5{width:40.425531911%;*width:40.3723404216383%;} +.row-fluid .span4{width:31.914893614%;*width:31.8617021246383%;} +.row-fluid .span3{width:23.404255317%;*width:23.3510638276383%;} +.row-fluid .span2{width:14.89361702%;*width:14.8404255306383%;} +.row-fluid .span1{width:6.382978723%;*width:6.329787233638298%;} +.container{margin-right:auto;margin-left:auto;*zoom:1;}.container:before,.container:after{display:table;content:"";} +.container:after{clear:both;} +.container-fluid{padding-right:20px;padding-left:20px;*zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";} +.container-fluid:after{clear:both;} +p{margin:0 0 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;}p small{font-size:11px;color:#999999;} +.lead{margin-bottom:18px;font-size:20px;font-weight:200;line-height:27px;} +h1,h2,h3,h4,h5,h6{margin:0;font-family:inherit;font-weight:bold;color:inherit;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;color:#999999;} +h1{font-size:30px;line-height:36px;}h1 small{font-size:18px;} +h2{font-size:24px;line-height:36px;}h2 small{font-size:18px;} +h3{font-size:18px;line-height:27px;}h3 small{font-size:14px;} +h4,h5,h6{line-height:18px;} +h4{font-size:14px;}h4 small{font-size:12px;} +h5{font-size:12px;} +h6{font-size:11px;color:#999999;text-transform:uppercase;} +.page-header{padding-bottom:17px;margin:18px 0;border-bottom:1px solid #eeeeee;} +.page-header h1{line-height:1;} +ul,ol{padding:0;margin:0 0 9px 25px;} +ul ul,ul ol,ol ol,ol ul{margin-bottom:0;} +ul{list-style:disc;} +ol{list-style:decimal;} +li{line-height:18px;} +ul.unstyled,ol.unstyled{margin-left:0;list-style:none;} +dl{margin-bottom:18px;} +dt,dd{line-height:18px;} +dt{font-weight:bold;line-height:17px;} +dd{margin-left:9px;} +.dl-horizontal dt{float:left;width:120px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;} +.dl-horizontal dd{margin-left:130px;} +hr{margin:18px 0;border:0;border-top:1px solid #eeeeee;border-bottom:1px solid #ffffff;} +strong{font-weight:bold;} +em{font-style:italic;} +.muted{color:#999999;} +abbr[title]{cursor:help;border-bottom:1px dotted #ddd;} +abbr.initialism{font-size:90%;text-transform:uppercase;} +blockquote{padding:0 0 0 15px;margin:0 0 18px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:22.5px;} +blockquote small{display:block;line-height:18px;color:#999999;}blockquote small:before{content:'\2014 \00A0';} +blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eeeeee;border-left:0;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;} +q:before,q:after,blockquote:before,blockquote:after{content:"";} +address{display:block;margin-bottom:18px;font-style:normal;line-height:18px;} +small{font-size:100%;} +cite{font-style:normal;} +code,pre{padding:0 3px 2px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} +code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;} +pre{display:block;padding:8.5px;margin:0 0 9px;font-size:12.025px;line-height:18px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}pre.prettyprint{margin-bottom:18px;} +pre code{padding:0;color:inherit;background-color:transparent;border:0;} +.pre-scrollable{max-height:340px;overflow-y:scroll;} +.label,.badge{font-size:10.998px;font-weight:bold;line-height:14px;color:#ffffff;vertical-align:baseline;white-space:nowrap;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#999999;} +.label{padding:1px 4px 2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} +.badge{padding:1px 9px 2px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;} +a.label:hover,a.badge:hover{color:#ffffff;text-decoration:none;cursor:pointer;} +.label-important,.badge-important{background-color:#b94a48;} +.label-important[href],.badge-important[href]{background-color:#953b39;} +.label-warning,.badge-warning{background-color:#f89406;} +.label-warning[href],.badge-warning[href]{background-color:#c67605;} +.label-success,.badge-success{background-color:#468847;} +.label-success[href],.badge-success[href]{background-color:#356635;} +.label-info,.badge-info{background-color:#3a87ad;} +.label-info[href],.badge-info[href]{background-color:#2d6987;} +.label-inverse,.badge-inverse{background-color:#333333;} +.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a;} +table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;} +.table{width:100%;margin-bottom:18px;}.table th,.table td{padding:8px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;} +.table th{font-weight:bold;} +.table thead th{vertical-align:bottom;} +.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0;} +.table tbody+tbody{border-top:2px solid #dddddd;} +.table-condensed th,.table-condensed td{padding:4px 5px;} +.table-bordered{border:1px solid #dddddd;border-collapse:separate;*border-collapse:collapsed;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th,.table-bordered td{border-left:1px solid #dddddd;} +.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;} +.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px;} +.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px;} +.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;} +.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;} +.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;} +.table tbody tr:hover td,.table tbody tr:hover th{background-color:#f5f5f5;} +table .span1{float:none;width:44px;margin-left:0;} +table .span2{float:none;width:124px;margin-left:0;} +table .span3{float:none;width:204px;margin-left:0;} +table .span4{float:none;width:284px;margin-left:0;} +table .span5{float:none;width:364px;margin-left:0;} +table .span6{float:none;width:444px;margin-left:0;} +table .span7{float:none;width:524px;margin-left:0;} +table .span8{float:none;width:604px;margin-left:0;} +table .span9{float:none;width:684px;margin-left:0;} +table .span10{float:none;width:764px;margin-left:0;} +table .span11{float:none;width:844px;margin-left:0;} +table .span12{float:none;width:924px;margin-left:0;} +table .span13{float:none;width:1004px;margin-left:0;} +table .span14{float:none;width:1084px;margin-left:0;} +table .span15{float:none;width:1164px;margin-left:0;} +table .span16{float:none;width:1244px;margin-left:0;} +table .span17{float:none;width:1324px;margin-left:0;} +table .span18{float:none;width:1404px;margin-left:0;} +table .span19{float:none;width:1484px;margin-left:0;} +table .span20{float:none;width:1564px;margin-left:0;} +table .span21{float:none;width:1644px;margin-left:0;} +table .span22{float:none;width:1724px;margin-left:0;} +table .span23{float:none;width:1804px;margin-left:0;} +table .span24{float:none;width:1884px;margin-left:0;} +/* Auto-generated CSS for generated Thrift docs */ +h3, h4 { margin-bottom: 6px; } +div.definition { border: 1px solid #CCC; margin-bottom: 10px; padding: 10px; } +div.extends { margin: -0.5em 0 1em 5em } +td { vertical-align: top; } +table { empty-cells: show; } +code { line-height: 20px; } +.table-bordered th, .table-bordered td { border-bottom: 1px solid #DDDDDD; } diff --git a/protocols/gen-html/tim.html b/protocols/gen-html/tim.html new file mode 100644 index 0000000..4296a2f --- /dev/null +++ b/protocols/gen-html/tim.html @@ -0,0 +1,466 @@ + + + + + +Thrift module: tim +
+

Thrift module: tim

+ + + + + +
ModuleServicesData typesConstants
timITim
+ +
Tid
+TimAckBean
+TimArea
+TimAuth
+TimError
+TimHBean
+TimIqBean
+TimMBean
+TimMBeanList
+TimMessageIq
+TimNode
+TimPBean
+TimPBeanList
+TimPage
+TimParam
+TimPropertyBean
+TimRemoteRoom
+TimRemoteUserBean
+TimResponseBean
+TimRoom
+TimRoster
+TimSock5Bean
+TimSock5Bytes
+TimTime
+TimUserBean
+
TIM_SC_FAILED
+TIM_SC_SUCCESS
+protocolversion
+protocolversionName
+
+

Constants

+ +
ConstantTypeValue
protocolversioni324
内部版本号
+

protocolversionNamestring"1.1.0"
外部版本号
+

TIM_SC_SUCCESSstring"200"
状态码:成功
+

TIM_SC_FAILEDstring"400"
状态码:失败
+


Data structures

+

Struct: TimError

+ + + +
KeyFieldTypeDescriptionRequirednessDefault value
1errCodei32错误码 +optional
2errMsgstring错误内容 +optional

Struct: TimNode

+ + + +
KeyFieldTypeDescriptionRequirednessDefault value
1keystring键 +optional
2valuestring值 +optional

Struct: TimAckBean

+ + + + + + + +
KeyFieldTypeDescriptionRequirednessDefault value
1idstringid,返回所要回执协议的线程id +optional
2ackTypestring类型,自定义 如:ping,message等 +optional
3ackStatusstring状态,如成功,失败等 +optional
4extraListlist<TimNode>附加信息 +optional
5errTimError错误信息 +optional
6extraMapmap<string, string>optional

Struct: TimHBean

+ + + + +
KeyFieldTypeDescriptionRequirednessDefault value
1chli32渠道 +required
2platformi32平台 +optional
3versioni16version 客户端协议版本 +required

Struct: TimParam

+ + + + + + + + +
KeyFieldTypeDescriptionRequirednessDefault value
1timestampstring服务器时间 +optional
2versioni16版本 +optional
3langstring语言 +optional
4extraListlist<TimNode>附加信息 +optional
5extraMapmap<string, string>optional
6interflowstring消息合流 +optional
7tlsstringtls +optional

Struct: TimTime

+ + + +
KeyFieldTypeDescriptionRequirednessDefault value
1timestampstring时间戳 (毫秒) +optional
2formattimestring格式化时间 +optional

Struct: TimArea

+ + + + + + +
KeyFieldTypeDescriptionRequirednessDefault value
1countrystring国家 +optional
2provincestring省 +optional
3citystring市 +optional
4extraListlist<TimNode>附加信息:如区,镇,乡等 +optional
5extraMapmap<string, string>optional

Struct: Tid

+ + + + + + + +
KeyFieldTypeDescriptionRequirednessDefault value
1namestring登陆名 用户登录号,房间号等 +required
2domainstring域名 用于区分渠道等 appid,appsecret +optional
3resourcestring系统 自行约定 如 : 1IOS,2android,3H5,4WEB 等 +optional
4typestringnormal,group +optional
5extraListlist<TimNode>附加信息:如传递客户端信息 iphone6,xiaomi,huawei等 +optional
6extraMapmap<string, string>optional

Struct: TimUserBean

+ + + + + + + + + + + + +
KeyFieldTypeDescriptionRequirednessDefault value
1tidTid用户bean +optional
2nicknamestring昵称 +optional
3remarknamestring备注名称 +optional
4brithdaystring生日 2000-01-01 +optional
5genderi16性别 自行约定 如 : 0不知,1男,2女 +optional
6headurlstring头像地址 http://xxx.jpg +optional
7areaTimArea地区 +optional
8headbytebinary头像 +optional
9photoByteslist<binary>其他图片 +optional
10extraListlist<TimNode>扩展字段 +optional
11extraMapmap<string, string>optional

Struct: TimRoom

+ + + + + + + + + + + +
KeyFieldTypeDescriptionRequirednessDefault value
1tidTid房间Tid +optional
2founderTidTid创建人Tid +optional
3HostsTidlist<Tid>主持人Tid +optional
4membersTidlist<Tid>memberTid +optional
5headurlstring头像地址 http://xxx.jpg +optional
6roomNamestring房间名称 +optional
7descstring房间说明 +optional
8createTimeTimTime房间创建时间 +optional
9extraListlist<TimNode>扩展字段 +optional
10extraMapmap<string, string>optional

Struct: TimPBean

+ + + + + + + + + + + + +
KeyFieldTypeDescriptionRequirednessDefault value
1threadIdstring标识 +required
2fromTidTidoptional
3toTidTidoptional
4statusstringsubscribe:订阅其他用户的状态 probe:请求获取其他用户的状态 unavailable:不可用,离线(offline)状态 +optional
5typestringnormal:类似于email,主要特点是不要求响应; +chat:类似于qq里的好友即时聊天,主要特点是实时通讯; +groupchat:类似于聊天室里的群聊; +headline:用于发送alert和notification; +error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; +optional
6priorityi32优先权 0 。高优先级的resource能接受发送到bare JID的消息,低优先级的resource不能 +optional
7showstringchat:聊天中 away:暂时离开 xa:eXtend Away,长时间离开 dnd:勿打扰 online:在线 offline:离线 +optional
8leaguerTidTid成员Tid 群聊时信息发送者Tid +optional
9extraListlist<TimNode>扩展字段 +optional
10errorTimError错误码 +optional
11extraMapmap<string, string>optional

Struct: TimMBean

+ + + + + + + + + + + + + + + +
KeyFieldTypeDescriptionRequirednessDefault value
1threadIdstring线程id +required
2midstring消息id号 +optional
3fromTidTid来源Tid +optional
4toTidTid目标Tid +optional
5bodystring信息内容 +optional
6typestringnormal:类似于email,主要特点是不要求响应; +chat:类似于qq里的好友即时聊天,主要特点是实时通讯; +groupchat:类似于聊天室里的群聊; +headline:用于发送alert和notification; +error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; +optional
7msgTypei16消息类型 1 文字 2 图片 3 语音 4视频 5混合 +optional
8offlineTimTime是否离线信息 +optional
9leaguerTidTid成员Tid 群聊时信息发送者Tid +optional
10extraListlist<TimNode>扩展字段 +optional
11timestampstring服务器发送信息时间戳(毫秒) +optional
12errorTimError错误码 +optional
13extraMapmap<string, string>optional
14readstatusi160未读 1已读 +optional

Struct: TimIqBean

+ + + + + + + + +
KeyFieldTypeDescriptionRequirednessDefault value
1threadIdstring线程id +required
2fromTidTidoptional
3toTidTidoptional
4typestringGet :获取当前域值。类似于http get方法 +Set :设置或替换get查询的值。类似于http put方法。 +Result :说明成功的响应了先前的查询。类似于http状态码200。 +Error: 查询和响应中出现的错误。 +optional
5extraListlist<TimNode>扩展字段 +optional
6errorTimError错误码 +optional
7extraMapmap<string, string>optional

Struct: TimRoster

+ + + + + +
KeyFieldTypeDescriptionRequirednessDefault value
1subscriptionstringnone表示用户和contact之前没有任何的关系(虽然在server的buddy list中存在) +to表示用户能看到contact的presence,但是contact看不到用户的Presence +from和to的含义相反,指用户看不到contact的presence,但是contact可以看到 +both表示相关之间都能看到对方的presence +required
2tidTidrequired
3namestring用户名 +optional
4extraMapmap<string, string>optional

Struct: TimRemoteUserBean

+ + + + +
KeyFieldTypeDescriptionRequirednessDefault value
1errorTimError错误码 +optional
2ubTimUserBean远程用户信息 +optional
3extraMapmap<string, string>optional

Struct: TimRemoteRoom

+ + + + +
KeyFieldTypeDescriptionRequirednessDefault value
1errorTimError错误码 +optional
2roomTimRoom远程房间信息 +optional
3extraMapmap<string, string>optional

Struct: TimResponseBean

+ + + + + +
KeyFieldTypeDescriptionRequirednessDefault value
1threadIdstringoptional
2errorTimError错误码 +optional
3extraListlist<TimNode>附加信息 +optional
4extraMapmap<string, string>optional

Struct: TimSock5Bean

+ + + + + + + + +
KeyFieldTypeDescriptionRequirednessDefault value
1fromTidTidrequired
2toTidTidrequired
3addrstringip地址 +required
4porti32端口 +required
5transporti16传输类型 1:tcp 2:udp +required
6pubIdstring发布id 通过发布id 可以连接两个发布id相同的用户 +required
7extraMapmap<string, string>optional

Struct: TimSock5Bytes

+ + + + + +
KeyFieldTypeDescriptionRequirednessDefault value
1pubIdstring发布id +required
2indexi32序号数据块 +required
3byteslist<binary>数据块 +required
4extraMapmap<string, string>optional

Struct: TimPage

+ + + + + +
KeyFieldTypeDescriptionRequirednessDefault value
1fromTimeStampstring时间上 +optional
2toTimeStampstring时间下 +optional
3limitCounti32条数 +optional
4extraMapmap<string, string>optional

Struct: TimMessageIq

+ + + + + +
KeyFieldTypeDescriptionRequirednessDefault value
1tidlistlist<string>tid集合 +optional
2timPageTimPage分页 +optional
3midlistlist<string>mid集合 +optional
4extraMapmap<string, string>optional

Struct: TimAuth

+ + + + +
KeyFieldTypeDescriptionRequirednessDefault value
1domainstring域名 +optional
2usernamestring用户名 +optional
3pwdstring密码 +optional

Struct: TimMBeanList

+ + + + + +
KeyFieldTypeDescriptionRequirednessDefault value
1threadIdstringrequired
2timMBeanListlist<TimMBean>信息列表 +optional
3reqTypestring类型 +optional
4extraMapmap<string, string>optional

Struct: TimPBeanList

+ + + + + +
KeyFieldTypeDescriptionRequirednessDefault value
1threadIdstringrequired
2timPBeanListlist<TimPBean>状态信息列表 +optional
3reqTypestring类型 +optional
4extraMapmap<string, string>optional

Struct: TimPropertyBean

+ + + + +
KeyFieldTypeDescriptionRequirednessDefault value
1threadIdstringoptional
2interflowstring消息合流 +optional
3tlsstringtls +optional


Services

+

Service: ITim

+

Function: ITim.timStream

+
void timStream(TimParam param)
+
流程开始
+

Function: ITim.timStarttls

+
void timStarttls()
+
tls协议
+

Function: ITim.timLogin

+
void timLogin(Tid tid,
+              string pwd)
+
登陆协议
+

Function: ITim.timAck

+
void timAck(TimAckBean ab)
+
回执信息
+

Function: ITim.timPresence

+
void timPresence(TimPBean pbean)
+
广播出席协议或接收广播协议
+

Function: ITim.timMessage

+
void timMessage(TimMBean mbean)
+
发送信息或接收信息
+

Function: ITim.timPing

+
void timPing(string threadId)
+
ping 心跳协议
+

Function: ITim.timError

+
void timError(TimError e)
+
错误通知
+

Function: ITim.timLogout

+
void timLogout()
+
登出协议
+

Function: ITim.timRegist

+
void timRegist(Tid tid,
+               string auth)
+
注册协议
+

Function: ITim.timRoser

+
void timRoser(TimRoster roster)
+
花名册
+

Function: ITim.timMessageList

+
void timMessageList(TimMBeanList mbeanList)
+
发送信息或接收信息列表(合流)
+

Function: ITim.timPresenceList

+
void timPresenceList(TimPBeanList pbeanList)
+
发送状态信息列表(合流)
+

Function: ITim.timMessageIq

+
void timMessageIq(TimMessageIq timMsgIq,
+                  string iqType)
+
信息请求 get请求数据 del删除
+

Function: ITim.timMessageResult

+
void timMessageResult(TimMBean mbean)
+
信息请求
+

Function: ITim.timProperty

+
void timProperty(TimPropertyBean tpb)
+
用户协议属性请求
+

Function: ITim.timRemoteUserAuth

+
TimRemoteUserBean timRemoteUserAuth(Tid tid,
+                                    string pwd,
+                                    TimAuth auth)
+
请求远程验证信息
+

Function: ITim.timRemoteUserGet

+
TimRemoteUserBean timRemoteUserGet(Tid tid,
+                                   TimAuth auth)
+
请求远程用户信息
+

Function: ITim.timRemoteUserEdit

+
TimRemoteUserBean timRemoteUserEdit(Tid tid,
+                                    TimUserBean ub,
+                                    TimAuth auth)
+
编辑远程用户信息
+

Function: ITim.timResponsePresence

+
TimResponseBean timResponsePresence(TimPBean pbean,
+                                    TimAuth auth)
+
广播出席协议或接收广播协议
+

Function: ITim.timResponseMessage

+
TimResponseBean timResponseMessage(TimMBean mbean,
+                                   TimAuth auth)
+
发送信息或接收信息
+

Function: ITim.timResponseMessageIq

+
TimMBeanList timResponseMessageIq(TimMessageIq timMsgIq,
+                                  string iqType,
+                                  TimAuth auth)
+
信息请求 get请求数据 del删除(辅助接口)
+

Function: ITim.timResponsePresenceList

+
TimResponseBean timResponsePresenceList(TimPBeanList pbeanList,
+                                        TimAuth auth)
+
广播出席协议或接收广播协议
+

Function: ITim.timResponseMessageList

+
TimResponseBean timResponseMessageList(TimMBeanList mbeanList,
+                                       TimAuth auth)
+
发送信息或接收信息
+

diff --git a/protocols/gen-java/com/tim/packet/ITim.java b/protocols/gen-java/com/tim/packet/ITim.java index ccf8a04..be5c231 100644 --- a/protocols/gen-java/com/tim/packet/ITim.java +++ b/protocols/gen-java/com/tim/packet/ITim.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class ITim { public interface Iface { @@ -57,7 +30,7 @@ public interface Iface { * @param tid * @param pwd */ - public void timLogin(Tid tid, String pwd) throws org.apache.thrift.TException; + public void timLogin(Tid tid, java.lang.String pwd) throws org.apache.thrift.TException; /** * 回执信息 @@ -85,7 +58,7 @@ public interface Iface { * * @param threadId */ - public void timPing(String threadId) throws org.apache.thrift.TException; + public void timPing(java.lang.String threadId) throws org.apache.thrift.TException; /** * 错误通知 @@ -105,7 +78,7 @@ public interface Iface { * @param tid * @param auth */ - public void timRegist(Tid tid, String auth) throws org.apache.thrift.TException; + public void timRegist(Tid tid, java.lang.String auth) throws org.apache.thrift.TException; /** * 花名册 @@ -134,7 +107,7 @@ public interface Iface { * @param timMsgIq * @param iqType */ - public void timMessageIq(TimMessageIq timMsgIq, String iqType) throws org.apache.thrift.TException; + public void timMessageIq(TimMessageIq timMsgIq, java.lang.String iqType) throws org.apache.thrift.TException; /** * 信息请求 @@ -157,7 +130,7 @@ public interface Iface { * @param pwd * @param auth */ - public TimRemoteUserBean timRemoteUserAuth(Tid tid, String pwd, TimAuth auth) throws org.apache.thrift.TException; + public TimRemoteUserBean timRemoteUserAuth(Tid tid, java.lang.String pwd, TimAuth auth) throws org.apache.thrift.TException; /** * 请求远程用户信息 @@ -199,7 +172,7 @@ public interface Iface { * @param iqType * @param auth */ - public TimMBeanList timResponseMessageIq(TimMessageIq timMsgIq, String iqType, TimAuth auth) throws org.apache.thrift.TException; + public TimMBeanList timResponseMessageIq(TimMessageIq timMsgIq, java.lang.String iqType, TimAuth auth) throws org.apache.thrift.TException; /** * 广播出席协议或接收广播协议 @@ -221,62 +194,64 @@ public interface Iface { public interface AsyncIface { - public void timStream(TimParam param, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void timStream(TimParam param, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void timStarttls(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void timStarttls(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void timLogin(Tid tid, String pwd, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void timLogin(Tid tid, java.lang.String pwd, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void timAck(TimAckBean ab, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void timAck(TimAckBean ab, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void timPresence(TimPBean pbean, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void timPresence(TimPBean pbean, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void timMessage(TimMBean mbean, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void timMessage(TimMBean mbean, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void timPing(String threadId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void timPing(java.lang.String threadId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void timError(TimError e, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void timError(TimError e, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void timLogout(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void timLogout(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void timRegist(Tid tid, String auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void timRegist(Tid tid, java.lang.String auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void timRoser(TimRoster roster, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void timRoser(TimRoster roster, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void timMessageList(TimMBeanList mbeanList, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void timMessageList(TimMBeanList mbeanList, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void timPresenceList(TimPBeanList pbeanList, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void timPresenceList(TimPBeanList pbeanList, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void timMessageIq(TimMessageIq timMsgIq, String iqType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void timMessageIq(TimMessageIq timMsgIq, java.lang.String iqType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void timMessageResult(TimMBean mbean, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void timMessageResult(TimMBean mbean, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void timProperty(TimPropertyBean tpb, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void timProperty(TimPropertyBean tpb, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void timRemoteUserAuth(Tid tid, String pwd, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void timRemoteUserAuth(Tid tid, java.lang.String pwd, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void timRemoteUserGet(Tid tid, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void timRemoteUserGet(Tid tid, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void timRemoteUserEdit(Tid tid, TimUserBean ub, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void timRemoteUserEdit(Tid tid, TimUserBean ub, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void timResponsePresence(TimPBean pbean, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void timResponsePresence(TimPBean pbean, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void timResponseMessage(TimMBean mbean, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void timResponseMessage(TimMBean mbean, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void timResponseMessageIq(TimMessageIq timMsgIq, String iqType, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void timResponseMessageIq(TimMessageIq timMsgIq, java.lang.String iqType, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void timResponsePresenceList(TimPBeanList pbeanList, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void timResponsePresenceList(TimPBeanList pbeanList, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void timResponseMessageList(TimMBeanList mbeanList, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void timResponseMessageList(TimMBeanList mbeanList, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } public static class Client extends org.apache.thrift.TServiceClient implements Iface { public static class Factory implements org.apache.thrift.TServiceClientFactory { public Factory() {} + @Override public Client getClient(org.apache.thrift.protocol.TProtocol prot) { return new Client(prot); } + @Override public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { return new Client(iprot, oprot); } @@ -291,6 +266,7 @@ public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.prot super(iprot, oprot); } + @Override public void timStream(TimParam param) throws org.apache.thrift.TException { send_timStream(param); @@ -303,6 +279,7 @@ public void send_timStream(TimParam param) throws org.apache.thrift.TException sendBaseOneway("timStream", args); } + @Override public void timStarttls() throws org.apache.thrift.TException { send_timStarttls(); @@ -314,12 +291,13 @@ public void send_timStarttls() throws org.apache.thrift.TException sendBaseOneway("timStarttls", args); } - public void timLogin(Tid tid, String pwd) throws org.apache.thrift.TException + @Override + public void timLogin(Tid tid, java.lang.String pwd) throws org.apache.thrift.TException { send_timLogin(tid, pwd); } - public void send_timLogin(Tid tid, String pwd) throws org.apache.thrift.TException + public void send_timLogin(Tid tid, java.lang.String pwd) throws org.apache.thrift.TException { timLogin_args args = new timLogin_args(); args.setTid(tid); @@ -327,6 +305,7 @@ public void send_timLogin(Tid tid, String pwd) throws org.apache.thrift.TExcepti sendBaseOneway("timLogin", args); } + @Override public void timAck(TimAckBean ab) throws org.apache.thrift.TException { send_timAck(ab); @@ -339,6 +318,7 @@ public void send_timAck(TimAckBean ab) throws org.apache.thrift.TException sendBaseOneway("timAck", args); } + @Override public void timPresence(TimPBean pbean) throws org.apache.thrift.TException { send_timPresence(pbean); @@ -351,6 +331,7 @@ public void send_timPresence(TimPBean pbean) throws org.apache.thrift.TException sendBaseOneway("timPresence", args); } + @Override public void timMessage(TimMBean mbean) throws org.apache.thrift.TException { send_timMessage(mbean); @@ -363,18 +344,20 @@ public void send_timMessage(TimMBean mbean) throws org.apache.thrift.TException sendBaseOneway("timMessage", args); } - public void timPing(String threadId) throws org.apache.thrift.TException + @Override + public void timPing(java.lang.String threadId) throws org.apache.thrift.TException { send_timPing(threadId); } - public void send_timPing(String threadId) throws org.apache.thrift.TException + public void send_timPing(java.lang.String threadId) throws org.apache.thrift.TException { timPing_args args = new timPing_args(); args.setThreadId(threadId); sendBaseOneway("timPing", args); } + @Override public void timError(TimError e) throws org.apache.thrift.TException { send_timError(e); @@ -387,6 +370,7 @@ public void send_timError(TimError e) throws org.apache.thrift.TException sendBaseOneway("timError", args); } + @Override public void timLogout() throws org.apache.thrift.TException { send_timLogout(); @@ -398,12 +382,13 @@ public void send_timLogout() throws org.apache.thrift.TException sendBaseOneway("timLogout", args); } - public void timRegist(Tid tid, String auth) throws org.apache.thrift.TException + @Override + public void timRegist(Tid tid, java.lang.String auth) throws org.apache.thrift.TException { send_timRegist(tid, auth); } - public void send_timRegist(Tid tid, String auth) throws org.apache.thrift.TException + public void send_timRegist(Tid tid, java.lang.String auth) throws org.apache.thrift.TException { timRegist_args args = new timRegist_args(); args.setTid(tid); @@ -411,6 +396,7 @@ public void send_timRegist(Tid tid, String auth) throws org.apache.thrift.TExcep sendBaseOneway("timRegist", args); } + @Override public void timRoser(TimRoster roster) throws org.apache.thrift.TException { send_timRoser(roster); @@ -423,6 +409,7 @@ public void send_timRoser(TimRoster roster) throws org.apache.thrift.TException sendBaseOneway("timRoser", args); } + @Override public void timMessageList(TimMBeanList mbeanList) throws org.apache.thrift.TException { send_timMessageList(mbeanList); @@ -435,6 +422,7 @@ public void send_timMessageList(TimMBeanList mbeanList) throws org.apache.thrift sendBaseOneway("timMessageList", args); } + @Override public void timPresenceList(TimPBeanList pbeanList) throws org.apache.thrift.TException { send_timPresenceList(pbeanList); @@ -447,12 +435,13 @@ public void send_timPresenceList(TimPBeanList pbeanList) throws org.apache.thrif sendBaseOneway("timPresenceList", args); } - public void timMessageIq(TimMessageIq timMsgIq, String iqType) throws org.apache.thrift.TException + @Override + public void timMessageIq(TimMessageIq timMsgIq, java.lang.String iqType) throws org.apache.thrift.TException { send_timMessageIq(timMsgIq, iqType); } - public void send_timMessageIq(TimMessageIq timMsgIq, String iqType) throws org.apache.thrift.TException + public void send_timMessageIq(TimMessageIq timMsgIq, java.lang.String iqType) throws org.apache.thrift.TException { timMessageIq_args args = new timMessageIq_args(); args.setTimMsgIq(timMsgIq); @@ -460,6 +449,7 @@ public void send_timMessageIq(TimMessageIq timMsgIq, String iqType) throws org.a sendBaseOneway("timMessageIq", args); } + @Override public void timMessageResult(TimMBean mbean) throws org.apache.thrift.TException { send_timMessageResult(mbean); @@ -472,6 +462,7 @@ public void send_timMessageResult(TimMBean mbean) throws org.apache.thrift.TExce sendBaseOneway("timMessageResult", args); } + @Override public void timProperty(TimPropertyBean tpb) throws org.apache.thrift.TException { send_timProperty(tpb); @@ -484,13 +475,14 @@ public void send_timProperty(TimPropertyBean tpb) throws org.apache.thrift.TExce sendBaseOneway("timProperty", args); } - public TimRemoteUserBean timRemoteUserAuth(Tid tid, String pwd, TimAuth auth) throws org.apache.thrift.TException + @Override + public TimRemoteUserBean timRemoteUserAuth(Tid tid, java.lang.String pwd, TimAuth auth) throws org.apache.thrift.TException { send_timRemoteUserAuth(tid, pwd, auth); return recv_timRemoteUserAuth(); } - public void send_timRemoteUserAuth(Tid tid, String pwd, TimAuth auth) throws org.apache.thrift.TException + public void send_timRemoteUserAuth(Tid tid, java.lang.String pwd, TimAuth auth) throws org.apache.thrift.TException { timRemoteUserAuth_args args = new timRemoteUserAuth_args(); args.setTid(tid); @@ -509,6 +501,7 @@ public TimRemoteUserBean recv_timRemoteUserAuth() throws org.apache.thrift.TExce throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "timRemoteUserAuth failed: unknown result"); } + @Override public TimRemoteUserBean timRemoteUserGet(Tid tid, TimAuth auth) throws org.apache.thrift.TException { send_timRemoteUserGet(tid, auth); @@ -533,6 +526,7 @@ public TimRemoteUserBean recv_timRemoteUserGet() throws org.apache.thrift.TExcep throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "timRemoteUserGet failed: unknown result"); } + @Override public TimRemoteUserBean timRemoteUserEdit(Tid tid, TimUserBean ub, TimAuth auth) throws org.apache.thrift.TException { send_timRemoteUserEdit(tid, ub, auth); @@ -558,6 +552,7 @@ public TimRemoteUserBean recv_timRemoteUserEdit() throws org.apache.thrift.TExce throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "timRemoteUserEdit failed: unknown result"); } + @Override public TimResponseBean timResponsePresence(TimPBean pbean, TimAuth auth) throws org.apache.thrift.TException { send_timResponsePresence(pbean, auth); @@ -582,6 +577,7 @@ public TimResponseBean recv_timResponsePresence() throws org.apache.thrift.TExce throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "timResponsePresence failed: unknown result"); } + @Override public TimResponseBean timResponseMessage(TimMBean mbean, TimAuth auth) throws org.apache.thrift.TException { send_timResponseMessage(mbean, auth); @@ -606,13 +602,14 @@ public TimResponseBean recv_timResponseMessage() throws org.apache.thrift.TExcep throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "timResponseMessage failed: unknown result"); } - public TimMBeanList timResponseMessageIq(TimMessageIq timMsgIq, String iqType, TimAuth auth) throws org.apache.thrift.TException + @Override + public TimMBeanList timResponseMessageIq(TimMessageIq timMsgIq, java.lang.String iqType, TimAuth auth) throws org.apache.thrift.TException { send_timResponseMessageIq(timMsgIq, iqType, auth); return recv_timResponseMessageIq(); } - public void send_timResponseMessageIq(TimMessageIq timMsgIq, String iqType, TimAuth auth) throws org.apache.thrift.TException + public void send_timResponseMessageIq(TimMessageIq timMsgIq, java.lang.String iqType, TimAuth auth) throws org.apache.thrift.TException { timResponseMessageIq_args args = new timResponseMessageIq_args(); args.setTimMsgIq(timMsgIq); @@ -631,6 +628,7 @@ public TimMBeanList recv_timResponseMessageIq() throws org.apache.thrift.TExcept throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "timResponseMessageIq failed: unknown result"); } + @Override public TimResponseBean timResponsePresenceList(TimPBeanList pbeanList, TimAuth auth) throws org.apache.thrift.TException { send_timResponsePresenceList(pbeanList, auth); @@ -655,6 +653,7 @@ public TimResponseBean recv_timResponsePresenceList() throws org.apache.thrift.T throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "timResponsePresenceList failed: unknown result"); } + @Override public TimResponseBean timResponseMessageList(TimMBeanList mbeanList, TimAuth auth) throws org.apache.thrift.TException { send_timResponseMessageList(mbeanList, auth); @@ -688,6 +687,7 @@ public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.ap this.clientManager = clientManager; this.protocolFactory = protocolFactory; } + @Override public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { return new AsyncClient(protocolFactory, clientManager, transport); } @@ -697,20 +697,22 @@ public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, super(protocolFactory, clientManager, transport); } - public void timStream(TimParam param, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + @Override + public void timStream(TimParam param, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); timStream_call method_call = new timStream_call(param, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class timStream_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class timStream_call extends org.apache.thrift.async.TAsyncMethodCall { private TimParam param; - public timStream_call(TimParam param, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public timStream_call(TimParam param, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, true); this.param = param; } + @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timStream", org.apache.thrift.protocol.TMessageType.ONEWAY, 0)); timStream_args args = new timStream_args(); @@ -719,27 +721,31 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public void getResult() throws org.apache.thrift.TException { + @Override + public Void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); + throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return null; } } - public void timStarttls(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + @Override + public void timStarttls(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); timStarttls_call method_call = new timStarttls_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class timStarttls_call extends org.apache.thrift.async.TAsyncMethodCall { - public timStarttls_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public static class timStarttls_call extends org.apache.thrift.async.TAsyncMethodCall { + public timStarttls_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, true); } + @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timStarttls", org.apache.thrift.protocol.TMessageType.ONEWAY, 0)); timStarttls_args args = new timStarttls_args(); @@ -747,31 +753,35 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public void getResult() throws org.apache.thrift.TException { + @Override + public Void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); + throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return null; } } - public void timLogin(Tid tid, String pwd, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + @Override + public void timLogin(Tid tid, java.lang.String pwd, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); timLogin_call method_call = new timLogin_call(tid, pwd, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class timLogin_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class timLogin_call extends org.apache.thrift.async.TAsyncMethodCall { private Tid tid; - private String pwd; - public timLogin_call(Tid tid, String pwd, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + private java.lang.String pwd; + public timLogin_call(Tid tid, java.lang.String pwd, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, true); this.tid = tid; this.pwd = pwd; } + @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timLogin", org.apache.thrift.protocol.TMessageType.ONEWAY, 0)); timLogin_args args = new timLogin_args(); @@ -781,29 +791,33 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public void getResult() throws org.apache.thrift.TException { + @Override + public Void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); + throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return null; } } - public void timAck(TimAckBean ab, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + @Override + public void timAck(TimAckBean ab, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); timAck_call method_call = new timAck_call(ab, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class timAck_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class timAck_call extends org.apache.thrift.async.TAsyncMethodCall { private TimAckBean ab; - public timAck_call(TimAckBean ab, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public timAck_call(TimAckBean ab, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, true); this.ab = ab; } + @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timAck", org.apache.thrift.protocol.TMessageType.ONEWAY, 0)); timAck_args args = new timAck_args(); @@ -812,29 +826,33 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public void getResult() throws org.apache.thrift.TException { + @Override + public Void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); + throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return null; } } - public void timPresence(TimPBean pbean, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + @Override + public void timPresence(TimPBean pbean, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); timPresence_call method_call = new timPresence_call(pbean, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class timPresence_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class timPresence_call extends org.apache.thrift.async.TAsyncMethodCall { private TimPBean pbean; - public timPresence_call(TimPBean pbean, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public timPresence_call(TimPBean pbean, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, true); this.pbean = pbean; } + @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timPresence", org.apache.thrift.protocol.TMessageType.ONEWAY, 0)); timPresence_args args = new timPresence_args(); @@ -843,29 +861,33 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public void getResult() throws org.apache.thrift.TException { + @Override + public Void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); + throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return null; } } - public void timMessage(TimMBean mbean, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + @Override + public void timMessage(TimMBean mbean, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); timMessage_call method_call = new timMessage_call(mbean, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class timMessage_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class timMessage_call extends org.apache.thrift.async.TAsyncMethodCall { private TimMBean mbean; - public timMessage_call(TimMBean mbean, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public timMessage_call(TimMBean mbean, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, true); this.mbean = mbean; } + @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timMessage", org.apache.thrift.protocol.TMessageType.ONEWAY, 0)); timMessage_args args = new timMessage_args(); @@ -874,29 +896,33 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public void getResult() throws org.apache.thrift.TException { + @Override + public Void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); + throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return null; } } - public void timPing(String threadId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + @Override + public void timPing(java.lang.String threadId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); timPing_call method_call = new timPing_call(threadId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class timPing_call extends org.apache.thrift.async.TAsyncMethodCall { - private String threadId; - public timPing_call(String threadId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public static class timPing_call extends org.apache.thrift.async.TAsyncMethodCall { + private java.lang.String threadId; + public timPing_call(java.lang.String threadId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, true); this.threadId = threadId; } + @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timPing", org.apache.thrift.protocol.TMessageType.ONEWAY, 0)); timPing_args args = new timPing_args(); @@ -905,29 +931,33 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public void getResult() throws org.apache.thrift.TException { + @Override + public Void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); + throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return null; } } - public void timError(TimError e, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + @Override + public void timError(TimError e, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); timError_call method_call = new timError_call(e, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class timError_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class timError_call extends org.apache.thrift.async.TAsyncMethodCall { private TimError e; - public timError_call(TimError e, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public timError_call(TimError e, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, true); this.e = e; } + @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timError", org.apache.thrift.protocol.TMessageType.ONEWAY, 0)); timError_args args = new timError_args(); @@ -936,27 +966,31 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public void getResult() throws org.apache.thrift.TException { + @Override + public Void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); + throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return null; } } - public void timLogout(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + @Override + public void timLogout(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); timLogout_call method_call = new timLogout_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class timLogout_call extends org.apache.thrift.async.TAsyncMethodCall { - public timLogout_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public static class timLogout_call extends org.apache.thrift.async.TAsyncMethodCall { + public timLogout_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, true); } + @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timLogout", org.apache.thrift.protocol.TMessageType.ONEWAY, 0)); timLogout_args args = new timLogout_args(); @@ -964,31 +998,35 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public void getResult() throws org.apache.thrift.TException { + @Override + public Void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); + throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return null; } } - public void timRegist(Tid tid, String auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + @Override + public void timRegist(Tid tid, java.lang.String auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); timRegist_call method_call = new timRegist_call(tid, auth, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class timRegist_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class timRegist_call extends org.apache.thrift.async.TAsyncMethodCall { private Tid tid; - private String auth; - public timRegist_call(Tid tid, String auth, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + private java.lang.String auth; + public timRegist_call(Tid tid, java.lang.String auth, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, true); this.tid = tid; this.auth = auth; } + @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timRegist", org.apache.thrift.protocol.TMessageType.ONEWAY, 0)); timRegist_args args = new timRegist_args(); @@ -998,29 +1036,33 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public void getResult() throws org.apache.thrift.TException { + @Override + public Void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); + throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return null; } } - public void timRoser(TimRoster roster, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + @Override + public void timRoser(TimRoster roster, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); timRoser_call method_call = new timRoser_call(roster, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class timRoser_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class timRoser_call extends org.apache.thrift.async.TAsyncMethodCall { private TimRoster roster; - public timRoser_call(TimRoster roster, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public timRoser_call(TimRoster roster, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, true); this.roster = roster; } + @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timRoser", org.apache.thrift.protocol.TMessageType.ONEWAY, 0)); timRoser_args args = new timRoser_args(); @@ -1029,29 +1071,33 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public void getResult() throws org.apache.thrift.TException { + @Override + public Void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); + throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return null; } } - public void timMessageList(TimMBeanList mbeanList, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + @Override + public void timMessageList(TimMBeanList mbeanList, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); timMessageList_call method_call = new timMessageList_call(mbeanList, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class timMessageList_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class timMessageList_call extends org.apache.thrift.async.TAsyncMethodCall { private TimMBeanList mbeanList; - public timMessageList_call(TimMBeanList mbeanList, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public timMessageList_call(TimMBeanList mbeanList, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, true); this.mbeanList = mbeanList; } + @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timMessageList", org.apache.thrift.protocol.TMessageType.ONEWAY, 0)); timMessageList_args args = new timMessageList_args(); @@ -1060,29 +1106,33 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public void getResult() throws org.apache.thrift.TException { + @Override + public Void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); + throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return null; } } - public void timPresenceList(TimPBeanList pbeanList, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + @Override + public void timPresenceList(TimPBeanList pbeanList, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); timPresenceList_call method_call = new timPresenceList_call(pbeanList, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class timPresenceList_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class timPresenceList_call extends org.apache.thrift.async.TAsyncMethodCall { private TimPBeanList pbeanList; - public timPresenceList_call(TimPBeanList pbeanList, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public timPresenceList_call(TimPBeanList pbeanList, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, true); this.pbeanList = pbeanList; } + @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timPresenceList", org.apache.thrift.protocol.TMessageType.ONEWAY, 0)); timPresenceList_args args = new timPresenceList_args(); @@ -1091,31 +1141,35 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public void getResult() throws org.apache.thrift.TException { + @Override + public Void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); + throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return null; } } - public void timMessageIq(TimMessageIq timMsgIq, String iqType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + @Override + public void timMessageIq(TimMessageIq timMsgIq, java.lang.String iqType, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); timMessageIq_call method_call = new timMessageIq_call(timMsgIq, iqType, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class timMessageIq_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class timMessageIq_call extends org.apache.thrift.async.TAsyncMethodCall { private TimMessageIq timMsgIq; - private String iqType; - public timMessageIq_call(TimMessageIq timMsgIq, String iqType, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + private java.lang.String iqType; + public timMessageIq_call(TimMessageIq timMsgIq, java.lang.String iqType, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, true); this.timMsgIq = timMsgIq; this.iqType = iqType; } + @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timMessageIq", org.apache.thrift.protocol.TMessageType.ONEWAY, 0)); timMessageIq_args args = new timMessageIq_args(); @@ -1125,29 +1179,33 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public void getResult() throws org.apache.thrift.TException { + @Override + public Void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); + throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return null; } } - public void timMessageResult(TimMBean mbean, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + @Override + public void timMessageResult(TimMBean mbean, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); timMessageResult_call method_call = new timMessageResult_call(mbean, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class timMessageResult_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class timMessageResult_call extends org.apache.thrift.async.TAsyncMethodCall { private TimMBean mbean; - public timMessageResult_call(TimMBean mbean, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public timMessageResult_call(TimMBean mbean, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, true); this.mbean = mbean; } + @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timMessageResult", org.apache.thrift.protocol.TMessageType.ONEWAY, 0)); timMessageResult_args args = new timMessageResult_args(); @@ -1156,29 +1214,33 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public void getResult() throws org.apache.thrift.TException { + @Override + public Void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); + throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return null; } } - public void timProperty(TimPropertyBean tpb, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + @Override + public void timProperty(TimPropertyBean tpb, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); timProperty_call method_call = new timProperty_call(tpb, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class timProperty_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class timProperty_call extends org.apache.thrift.async.TAsyncMethodCall { private TimPropertyBean tpb; - public timProperty_call(TimPropertyBean tpb, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public timProperty_call(TimPropertyBean tpb, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, true); this.tpb = tpb; } + @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timProperty", org.apache.thrift.protocol.TMessageType.ONEWAY, 0)); timProperty_args args = new timProperty_args(); @@ -1187,33 +1249,37 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } - public void getResult() throws org.apache.thrift.TException { + @Override + public Void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); + throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return null; } } - public void timRemoteUserAuth(Tid tid, String pwd, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + @Override + public void timRemoteUserAuth(Tid tid, java.lang.String pwd, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); timRemoteUserAuth_call method_call = new timRemoteUserAuth_call(tid, pwd, auth, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class timRemoteUserAuth_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class timRemoteUserAuth_call extends org.apache.thrift.async.TAsyncMethodCall { private Tid tid; - private String pwd; + private java.lang.String pwd; private TimAuth auth; - public timRemoteUserAuth_call(Tid tid, String pwd, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public timRemoteUserAuth_call(Tid tid, java.lang.String pwd, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.tid = tid; this.pwd = pwd; this.auth = auth; } + @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timRemoteUserAuth", org.apache.thrift.protocol.TMessageType.CALL, 0)); timRemoteUserAuth_args args = new timRemoteUserAuth_args(); @@ -1224,9 +1290,10 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } + @Override public TimRemoteUserBean getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); + throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); @@ -1234,22 +1301,24 @@ public TimRemoteUserBean getResult() throws org.apache.thrift.TException { } } - public void timRemoteUserGet(Tid tid, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + @Override + public void timRemoteUserGet(Tid tid, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); timRemoteUserGet_call method_call = new timRemoteUserGet_call(tid, auth, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class timRemoteUserGet_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class timRemoteUserGet_call extends org.apache.thrift.async.TAsyncMethodCall { private Tid tid; private TimAuth auth; - public timRemoteUserGet_call(Tid tid, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public timRemoteUserGet_call(Tid tid, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.tid = tid; this.auth = auth; } + @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timRemoteUserGet", org.apache.thrift.protocol.TMessageType.CALL, 0)); timRemoteUserGet_args args = new timRemoteUserGet_args(); @@ -1259,9 +1328,10 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } + @Override public TimRemoteUserBean getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); + throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); @@ -1269,24 +1339,26 @@ public TimRemoteUserBean getResult() throws org.apache.thrift.TException { } } - public void timRemoteUserEdit(Tid tid, TimUserBean ub, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + @Override + public void timRemoteUserEdit(Tid tid, TimUserBean ub, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); timRemoteUserEdit_call method_call = new timRemoteUserEdit_call(tid, ub, auth, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class timRemoteUserEdit_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class timRemoteUserEdit_call extends org.apache.thrift.async.TAsyncMethodCall { private Tid tid; private TimUserBean ub; private TimAuth auth; - public timRemoteUserEdit_call(Tid tid, TimUserBean ub, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public timRemoteUserEdit_call(Tid tid, TimUserBean ub, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.tid = tid; this.ub = ub; this.auth = auth; } + @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timRemoteUserEdit", org.apache.thrift.protocol.TMessageType.CALL, 0)); timRemoteUserEdit_args args = new timRemoteUserEdit_args(); @@ -1297,9 +1369,10 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } + @Override public TimRemoteUserBean getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); + throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); @@ -1307,22 +1380,24 @@ public TimRemoteUserBean getResult() throws org.apache.thrift.TException { } } - public void timResponsePresence(TimPBean pbean, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + @Override + public void timResponsePresence(TimPBean pbean, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); timResponsePresence_call method_call = new timResponsePresence_call(pbean, auth, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class timResponsePresence_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class timResponsePresence_call extends org.apache.thrift.async.TAsyncMethodCall { private TimPBean pbean; private TimAuth auth; - public timResponsePresence_call(TimPBean pbean, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public timResponsePresence_call(TimPBean pbean, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.pbean = pbean; this.auth = auth; } + @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timResponsePresence", org.apache.thrift.protocol.TMessageType.CALL, 0)); timResponsePresence_args args = new timResponsePresence_args(); @@ -1332,9 +1407,10 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } + @Override public TimResponseBean getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); + throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); @@ -1342,22 +1418,24 @@ public TimResponseBean getResult() throws org.apache.thrift.TException { } } - public void timResponseMessage(TimMBean mbean, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + @Override + public void timResponseMessage(TimMBean mbean, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); timResponseMessage_call method_call = new timResponseMessage_call(mbean, auth, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class timResponseMessage_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class timResponseMessage_call extends org.apache.thrift.async.TAsyncMethodCall { private TimMBean mbean; private TimAuth auth; - public timResponseMessage_call(TimMBean mbean, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public timResponseMessage_call(TimMBean mbean, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.mbean = mbean; this.auth = auth; } + @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timResponseMessage", org.apache.thrift.protocol.TMessageType.CALL, 0)); timResponseMessage_args args = new timResponseMessage_args(); @@ -1367,9 +1445,10 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } + @Override public TimResponseBean getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); + throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); @@ -1377,24 +1456,26 @@ public TimResponseBean getResult() throws org.apache.thrift.TException { } } - public void timResponseMessageIq(TimMessageIq timMsgIq, String iqType, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + @Override + public void timResponseMessageIq(TimMessageIq timMsgIq, java.lang.String iqType, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); timResponseMessageIq_call method_call = new timResponseMessageIq_call(timMsgIq, iqType, auth, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class timResponseMessageIq_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class timResponseMessageIq_call extends org.apache.thrift.async.TAsyncMethodCall { private TimMessageIq timMsgIq; - private String iqType; + private java.lang.String iqType; private TimAuth auth; - public timResponseMessageIq_call(TimMessageIq timMsgIq, String iqType, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public timResponseMessageIq_call(TimMessageIq timMsgIq, java.lang.String iqType, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.timMsgIq = timMsgIq; this.iqType = iqType; this.auth = auth; } + @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timResponseMessageIq", org.apache.thrift.protocol.TMessageType.CALL, 0)); timResponseMessageIq_args args = new timResponseMessageIq_args(); @@ -1405,9 +1486,10 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } + @Override public TimMBeanList getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); + throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); @@ -1415,22 +1497,24 @@ public TimMBeanList getResult() throws org.apache.thrift.TException { } } - public void timResponsePresenceList(TimPBeanList pbeanList, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + @Override + public void timResponsePresenceList(TimPBeanList pbeanList, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); timResponsePresenceList_call method_call = new timResponsePresenceList_call(pbeanList, auth, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class timResponsePresenceList_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class timResponsePresenceList_call extends org.apache.thrift.async.TAsyncMethodCall { private TimPBeanList pbeanList; private TimAuth auth; - public timResponsePresenceList_call(TimPBeanList pbeanList, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public timResponsePresenceList_call(TimPBeanList pbeanList, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.pbeanList = pbeanList; this.auth = auth; } + @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timResponsePresenceList", org.apache.thrift.protocol.TMessageType.CALL, 0)); timResponsePresenceList_args args = new timResponsePresenceList_args(); @@ -1440,9 +1524,10 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } + @Override public TimResponseBean getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); + throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); @@ -1450,22 +1535,24 @@ public TimResponseBean getResult() throws org.apache.thrift.TException { } } - public void timResponseMessageList(TimMBeanList mbeanList, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + @Override + public void timResponseMessageList(TimMBeanList mbeanList, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); timResponseMessageList_call method_call = new timResponseMessageList_call(mbeanList, auth, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class timResponseMessageList_call extends org.apache.thrift.async.TAsyncMethodCall { + public static class timResponseMessageList_call extends org.apache.thrift.async.TAsyncMethodCall { private TimMBeanList mbeanList; private TimAuth auth; - public timResponseMessageList_call(TimMBeanList mbeanList, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public timResponseMessageList_call(TimMBeanList mbeanList, TimAuth auth, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.mbeanList = mbeanList; this.auth = auth; } + @Override public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timResponseMessageList", org.apache.thrift.protocol.TMessageType.CALL, 0)); timResponseMessageList_args args = new timResponseMessageList_args(); @@ -1475,9 +1562,10 @@ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apa prot.writeMessageEnd(); } + @Override public TimResponseBean getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); + throw new java.lang.IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); @@ -1488,16 +1576,16 @@ public TimResponseBean getResult() throws org.apache.thrift.TException { } public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { - private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); + private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { - super(iface, getProcessMap(new HashMap>())); + super(iface, getProcessMap(new java.util.HashMap>())); } - protected Processor(I iface, Map> processMap) { + protected Processor(I iface, java.util.Map> processMap) { super(iface, getProcessMap(processMap)); } - private static Map> getProcessMap(Map> processMap) { + private static java.util.Map> getProcessMap(java.util.Map> processMap) { processMap.put("timStream", new timStream()); processMap.put("timStarttls", new timStarttls()); processMap.put("timLogin", new timLogin()); @@ -1530,14 +1618,22 @@ public timStream() { super("timStream"); } + @Override public timStream_args getEmptyArgsInstance() { return new timStream_args(); } + @Override protected boolean isOneway() { return true; } + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override public org.apache.thrift.TBase getResult(I iface, timStream_args args) throws org.apache.thrift.TException { iface.timStream(args.param); return null; @@ -1549,14 +1645,22 @@ public timStarttls() { super("timStarttls"); } + @Override public timStarttls_args getEmptyArgsInstance() { return new timStarttls_args(); } + @Override protected boolean isOneway() { return true; } + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override public org.apache.thrift.TBase getResult(I iface, timStarttls_args args) throws org.apache.thrift.TException { iface.timStarttls(); return null; @@ -1568,14 +1672,22 @@ public timLogin() { super("timLogin"); } + @Override public timLogin_args getEmptyArgsInstance() { return new timLogin_args(); } + @Override protected boolean isOneway() { return true; } + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override public org.apache.thrift.TBase getResult(I iface, timLogin_args args) throws org.apache.thrift.TException { iface.timLogin(args.tid, args.pwd); return null; @@ -1587,14 +1699,22 @@ public timAck() { super("timAck"); } + @Override public timAck_args getEmptyArgsInstance() { return new timAck_args(); } + @Override protected boolean isOneway() { return true; } + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override public org.apache.thrift.TBase getResult(I iface, timAck_args args) throws org.apache.thrift.TException { iface.timAck(args.ab); return null; @@ -1606,14 +1726,22 @@ public timPresence() { super("timPresence"); } + @Override public timPresence_args getEmptyArgsInstance() { return new timPresence_args(); } + @Override protected boolean isOneway() { return true; } + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override public org.apache.thrift.TBase getResult(I iface, timPresence_args args) throws org.apache.thrift.TException { iface.timPresence(args.pbean); return null; @@ -1625,14 +1753,22 @@ public timMessage() { super("timMessage"); } + @Override public timMessage_args getEmptyArgsInstance() { return new timMessage_args(); } + @Override protected boolean isOneway() { return true; } + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override public org.apache.thrift.TBase getResult(I iface, timMessage_args args) throws org.apache.thrift.TException { iface.timMessage(args.mbean); return null; @@ -1644,14 +1780,22 @@ public timPing() { super("timPing"); } + @Override public timPing_args getEmptyArgsInstance() { return new timPing_args(); } + @Override protected boolean isOneway() { return true; } + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override public org.apache.thrift.TBase getResult(I iface, timPing_args args) throws org.apache.thrift.TException { iface.timPing(args.threadId); return null; @@ -1663,14 +1807,22 @@ public timError() { super("timError"); } + @Override public timError_args getEmptyArgsInstance() { return new timError_args(); } + @Override protected boolean isOneway() { return true; } + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override public org.apache.thrift.TBase getResult(I iface, timError_args args) throws org.apache.thrift.TException { iface.timError(args.e); return null; @@ -1682,14 +1834,22 @@ public timLogout() { super("timLogout"); } + @Override public timLogout_args getEmptyArgsInstance() { return new timLogout_args(); } + @Override protected boolean isOneway() { return true; } + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override public org.apache.thrift.TBase getResult(I iface, timLogout_args args) throws org.apache.thrift.TException { iface.timLogout(); return null; @@ -1701,14 +1861,22 @@ public timRegist() { super("timRegist"); } + @Override public timRegist_args getEmptyArgsInstance() { return new timRegist_args(); } + @Override protected boolean isOneway() { return true; } + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override public org.apache.thrift.TBase getResult(I iface, timRegist_args args) throws org.apache.thrift.TException { iface.timRegist(args.tid, args.auth); return null; @@ -1720,14 +1888,22 @@ public timRoser() { super("timRoser"); } + @Override public timRoser_args getEmptyArgsInstance() { return new timRoser_args(); } + @Override protected boolean isOneway() { return true; } + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override public org.apache.thrift.TBase getResult(I iface, timRoser_args args) throws org.apache.thrift.TException { iface.timRoser(args.roster); return null; @@ -1739,14 +1915,22 @@ public timMessageList() { super("timMessageList"); } + @Override public timMessageList_args getEmptyArgsInstance() { return new timMessageList_args(); } + @Override protected boolean isOneway() { return true; } + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override public org.apache.thrift.TBase getResult(I iface, timMessageList_args args) throws org.apache.thrift.TException { iface.timMessageList(args.mbeanList); return null; @@ -1758,14 +1942,22 @@ public timPresenceList() { super("timPresenceList"); } + @Override public timPresenceList_args getEmptyArgsInstance() { return new timPresenceList_args(); } + @Override protected boolean isOneway() { return true; } + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override public org.apache.thrift.TBase getResult(I iface, timPresenceList_args args) throws org.apache.thrift.TException { iface.timPresenceList(args.pbeanList); return null; @@ -1777,14 +1969,22 @@ public timMessageIq() { super("timMessageIq"); } + @Override public timMessageIq_args getEmptyArgsInstance() { return new timMessageIq_args(); } + @Override protected boolean isOneway() { return true; } + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override public org.apache.thrift.TBase getResult(I iface, timMessageIq_args args) throws org.apache.thrift.TException { iface.timMessageIq(args.timMsgIq, args.iqType); return null; @@ -1796,14 +1996,22 @@ public timMessageResult() { super("timMessageResult"); } + @Override public timMessageResult_args getEmptyArgsInstance() { return new timMessageResult_args(); } + @Override protected boolean isOneway() { return true; } + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override public org.apache.thrift.TBase getResult(I iface, timMessageResult_args args) throws org.apache.thrift.TException { iface.timMessageResult(args.mbean); return null; @@ -1815,14 +2023,22 @@ public timProperty() { super("timProperty"); } + @Override public timProperty_args getEmptyArgsInstance() { return new timProperty_args(); } + @Override protected boolean isOneway() { return true; } + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override public org.apache.thrift.TBase getResult(I iface, timProperty_args args) throws org.apache.thrift.TException { iface.timProperty(args.tpb); return null; @@ -1834,14 +2050,22 @@ public timRemoteUserAuth() { super("timRemoteUserAuth"); } + @Override public timRemoteUserAuth_args getEmptyArgsInstance() { return new timRemoteUserAuth_args(); } + @Override protected boolean isOneway() { return false; } + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override public timRemoteUserAuth_result getResult(I iface, timRemoteUserAuth_args args) throws org.apache.thrift.TException { timRemoteUserAuth_result result = new timRemoteUserAuth_result(); result.success = iface.timRemoteUserAuth(args.tid, args.pwd, args.auth); @@ -1854,14 +2078,22 @@ public timRemoteUserGet() { super("timRemoteUserGet"); } + @Override public timRemoteUserGet_args getEmptyArgsInstance() { return new timRemoteUserGet_args(); } + @Override protected boolean isOneway() { return false; } + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override public timRemoteUserGet_result getResult(I iface, timRemoteUserGet_args args) throws org.apache.thrift.TException { timRemoteUserGet_result result = new timRemoteUserGet_result(); result.success = iface.timRemoteUserGet(args.tid, args.auth); @@ -1874,14 +2106,22 @@ public timRemoteUserEdit() { super("timRemoteUserEdit"); } + @Override public timRemoteUserEdit_args getEmptyArgsInstance() { return new timRemoteUserEdit_args(); } + @Override protected boolean isOneway() { return false; } + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override public timRemoteUserEdit_result getResult(I iface, timRemoteUserEdit_args args) throws org.apache.thrift.TException { timRemoteUserEdit_result result = new timRemoteUserEdit_result(); result.success = iface.timRemoteUserEdit(args.tid, args.ub, args.auth); @@ -1894,14 +2134,22 @@ public timResponsePresence() { super("timResponsePresence"); } + @Override public timResponsePresence_args getEmptyArgsInstance() { return new timResponsePresence_args(); } + @Override protected boolean isOneway() { return false; } + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override public timResponsePresence_result getResult(I iface, timResponsePresence_args args) throws org.apache.thrift.TException { timResponsePresence_result result = new timResponsePresence_result(); result.success = iface.timResponsePresence(args.pbean, args.auth); @@ -1914,14 +2162,22 @@ public timResponseMessage() { super("timResponseMessage"); } + @Override public timResponseMessage_args getEmptyArgsInstance() { return new timResponseMessage_args(); } - protected boolean isOneway() { + @Override + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { return false; } + @Override public timResponseMessage_result getResult(I iface, timResponseMessage_args args) throws org.apache.thrift.TException { timResponseMessage_result result = new timResponseMessage_result(); result.success = iface.timResponseMessage(args.mbean, args.auth); @@ -1934,14 +2190,22 @@ public timResponseMessageIq() { super("timResponseMessageIq"); } + @Override public timResponseMessageIq_args getEmptyArgsInstance() { return new timResponseMessageIq_args(); } + @Override protected boolean isOneway() { return false; } + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override public timResponseMessageIq_result getResult(I iface, timResponseMessageIq_args args) throws org.apache.thrift.TException { timResponseMessageIq_result result = new timResponseMessageIq_result(); result.success = iface.timResponseMessageIq(args.timMsgIq, args.iqType, args.auth); @@ -1954,14 +2218,22 @@ public timResponsePresenceList() { super("timResponsePresenceList"); } + @Override public timResponsePresenceList_args getEmptyArgsInstance() { return new timResponsePresenceList_args(); } + @Override protected boolean isOneway() { return false; } + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override public timResponsePresenceList_result getResult(I iface, timResponsePresenceList_args args) throws org.apache.thrift.TException { timResponsePresenceList_result result = new timResponsePresenceList_result(); result.success = iface.timResponsePresenceList(args.pbeanList, args.auth); @@ -1974,14 +2246,22 @@ public timResponseMessageList() { super("timResponseMessageList"); } + @Override public timResponseMessageList_args getEmptyArgsInstance() { return new timResponseMessageList_args(); } + @Override protected boolean isOneway() { return false; } + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + @Override public timResponseMessageList_result getResult(I iface, timResponseMessageList_args args) throws org.apache.thrift.TException { timResponseMessageList_result result = new timResponseMessageList_result(); result.success = iface.timResponseMessageList(args.mbeanList, args.auth); @@ -1992,16 +2272,16 @@ public timResponseMessageList_result getResult(I iface, timResponseMessageList_a } public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { - private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); + private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName()); public AsyncProcessor(I iface) { - super(iface, getProcessMap(new HashMap>())); + super(iface, getProcessMap(new java.util.HashMap>())); } - protected AsyncProcessor(I iface, Map> processMap) { + protected AsyncProcessor(I iface, java.util.Map> processMap) { super(iface, getProcessMap(processMap)); } - private static Map> getProcessMap(Map> processMap) { + private static java.util.Map> getProcessMap(java.util.Map> processMap) { processMap.put("timStream", new timStream()); processMap.put("timStarttls", new timStarttls()); processMap.put("timLogin", new timLogin()); @@ -2034,25 +2314,37 @@ public timStream() { super("timStream"); } + @Override public timStream_args getEmptyArgsInstance() { return new timStream_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override public void onComplete(Void o) { } - public void onError(Exception e) { + @Override + public void onError(java.lang.Exception e) { + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + } else { + _LOGGER.error("Exception inside oneway handler", e); + } } }; } + @Override protected boolean isOneway() { return true; } - public void start(I iface, timStream_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + @Override + public void start(I iface, timStream_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.timStream(args.param,resultHandler); } } @@ -2062,25 +2354,37 @@ public timStarttls() { super("timStarttls"); } + @Override public timStarttls_args getEmptyArgsInstance() { return new timStarttls_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override public void onComplete(Void o) { } - public void onError(Exception e) { + @Override + public void onError(java.lang.Exception e) { + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + } else { + _LOGGER.error("Exception inside oneway handler", e); + } } }; } + @Override protected boolean isOneway() { return true; } - public void start(I iface, timStarttls_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + @Override + public void start(I iface, timStarttls_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.timStarttls(resultHandler); } } @@ -2090,25 +2394,37 @@ public timLogin() { super("timLogin"); } + @Override public timLogin_args getEmptyArgsInstance() { return new timLogin_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override public void onComplete(Void o) { } - public void onError(Exception e) { + @Override + public void onError(java.lang.Exception e) { + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + } else { + _LOGGER.error("Exception inside oneway handler", e); + } } }; } + @Override protected boolean isOneway() { return true; } - public void start(I iface, timLogin_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + @Override + public void start(I iface, timLogin_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.timLogin(args.tid, args.pwd,resultHandler); } } @@ -2118,25 +2434,37 @@ public timAck() { super("timAck"); } + @Override public timAck_args getEmptyArgsInstance() { return new timAck_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override public void onComplete(Void o) { } - public void onError(Exception e) { + @Override + public void onError(java.lang.Exception e) { + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + } else { + _LOGGER.error("Exception inside oneway handler", e); + } } }; } + @Override protected boolean isOneway() { return true; } - public void start(I iface, timAck_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + @Override + public void start(I iface, timAck_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.timAck(args.ab,resultHandler); } } @@ -2146,25 +2474,37 @@ public timPresence() { super("timPresence"); } + @Override public timPresence_args getEmptyArgsInstance() { return new timPresence_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override public void onComplete(Void o) { } - public void onError(Exception e) { + @Override + public void onError(java.lang.Exception e) { + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + } else { + _LOGGER.error("Exception inside oneway handler", e); + } } }; } + @Override protected boolean isOneway() { return true; } - public void start(I iface, timPresence_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + @Override + public void start(I iface, timPresence_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.timPresence(args.pbean,resultHandler); } } @@ -2174,25 +2514,37 @@ public timMessage() { super("timMessage"); } + @Override public timMessage_args getEmptyArgsInstance() { return new timMessage_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override public void onComplete(Void o) { } - public void onError(Exception e) { + @Override + public void onError(java.lang.Exception e) { + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + } else { + _LOGGER.error("Exception inside oneway handler", e); + } } }; } + @Override protected boolean isOneway() { return true; } - public void start(I iface, timMessage_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + @Override + public void start(I iface, timMessage_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.timMessage(args.mbean,resultHandler); } } @@ -2202,25 +2554,37 @@ public timPing() { super("timPing"); } + @Override public timPing_args getEmptyArgsInstance() { return new timPing_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override public void onComplete(Void o) { } - public void onError(Exception e) { + @Override + public void onError(java.lang.Exception e) { + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + } else { + _LOGGER.error("Exception inside oneway handler", e); + } } }; } + @Override protected boolean isOneway() { return true; } - public void start(I iface, timPing_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + @Override + public void start(I iface, timPing_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.timPing(args.threadId,resultHandler); } } @@ -2230,25 +2594,37 @@ public timError() { super("timError"); } + @Override public timError_args getEmptyArgsInstance() { return new timError_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override public void onComplete(Void o) { } - public void onError(Exception e) { + @Override + public void onError(java.lang.Exception e) { + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + } else { + _LOGGER.error("Exception inside oneway handler", e); + } } }; } + @Override protected boolean isOneway() { return true; } - public void start(I iface, timError_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + @Override + public void start(I iface, timError_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.timError(args.e,resultHandler); } } @@ -2258,25 +2634,37 @@ public timLogout() { super("timLogout"); } + @Override public timLogout_args getEmptyArgsInstance() { return new timLogout_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override public void onComplete(Void o) { } - public void onError(Exception e) { + @Override + public void onError(java.lang.Exception e) { + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + } else { + _LOGGER.error("Exception inside oneway handler", e); + } } }; } + @Override protected boolean isOneway() { return true; } - public void start(I iface, timLogout_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + @Override + public void start(I iface, timLogout_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.timLogout(resultHandler); } } @@ -2286,25 +2674,37 @@ public timRegist() { super("timRegist"); } + @Override public timRegist_args getEmptyArgsInstance() { return new timRegist_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override public void onComplete(Void o) { } - public void onError(Exception e) { + @Override + public void onError(java.lang.Exception e) { + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + } else { + _LOGGER.error("Exception inside oneway handler", e); + } } }; } + @Override protected boolean isOneway() { return true; } - public void start(I iface, timRegist_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + @Override + public void start(I iface, timRegist_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.timRegist(args.tid, args.auth,resultHandler); } } @@ -2314,25 +2714,37 @@ public timRoser() { super("timRoser"); } + @Override public timRoser_args getEmptyArgsInstance() { return new timRoser_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override public void onComplete(Void o) { } - public void onError(Exception e) { + @Override + public void onError(java.lang.Exception e) { + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + } else { + _LOGGER.error("Exception inside oneway handler", e); + } } }; } + @Override protected boolean isOneway() { return true; } - public void start(I iface, timRoser_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + @Override + public void start(I iface, timRoser_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.timRoser(args.roster,resultHandler); } } @@ -2342,25 +2754,37 @@ public timMessageList() { super("timMessageList"); } + @Override public timMessageList_args getEmptyArgsInstance() { return new timMessageList_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override public void onComplete(Void o) { } - public void onError(Exception e) { + @Override + public void onError(java.lang.Exception e) { + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + } else { + _LOGGER.error("Exception inside oneway handler", e); + } } }; } + @Override protected boolean isOneway() { return true; } - public void start(I iface, timMessageList_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + @Override + public void start(I iface, timMessageList_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.timMessageList(args.mbeanList,resultHandler); } } @@ -2370,25 +2794,37 @@ public timPresenceList() { super("timPresenceList"); } + @Override public timPresenceList_args getEmptyArgsInstance() { return new timPresenceList_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override public void onComplete(Void o) { } - public void onError(Exception e) { + @Override + public void onError(java.lang.Exception e) { + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + } else { + _LOGGER.error("Exception inside oneway handler", e); + } } }; } + @Override protected boolean isOneway() { return true; } - public void start(I iface, timPresenceList_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + @Override + public void start(I iface, timPresenceList_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.timPresenceList(args.pbeanList,resultHandler); } } @@ -2398,25 +2834,37 @@ public timMessageIq() { super("timMessageIq"); } + @Override public timMessageIq_args getEmptyArgsInstance() { return new timMessageIq_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override public void onComplete(Void o) { } - public void onError(Exception e) { + @Override + public void onError(java.lang.Exception e) { + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + } else { + _LOGGER.error("Exception inside oneway handler", e); + } } }; } + @Override protected boolean isOneway() { return true; } - public void start(I iface, timMessageIq_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + @Override + public void start(I iface, timMessageIq_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.timMessageIq(args.timMsgIq, args.iqType,resultHandler); } } @@ -2426,25 +2874,37 @@ public timMessageResult() { super("timMessageResult"); } + @Override public timMessageResult_args getEmptyArgsInstance() { return new timMessageResult_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override public void onComplete(Void o) { } - public void onError(Exception e) { + @Override + public void onError(java.lang.Exception e) { + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + } else { + _LOGGER.error("Exception inside oneway handler", e); + } } }; } + @Override protected boolean isOneway() { return true; } - public void start(I iface, timMessageResult_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + @Override + public void start(I iface, timMessageResult_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.timMessageResult(args.mbean,resultHandler); } } @@ -2454,25 +2914,37 @@ public timProperty() { super("timProperty"); } + @Override public timProperty_args getEmptyArgsInstance() { return new timProperty_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override public void onComplete(Void o) { } - public void onError(Exception e) { + @Override + public void onError(java.lang.Exception e) { + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + } else { + _LOGGER.error("Exception inside oneway handler", e); + } } }; } + @Override protected boolean isOneway() { return true; } - public void start(I iface, timProperty_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + @Override + public void start(I iface, timProperty_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.timProperty(args.tpb,resultHandler); } } @@ -2482,48 +2954,64 @@ public timRemoteUserAuth() { super("timRemoteUserAuth"); } + @Override public timRemoteUserAuth_args getEmptyArgsInstance() { return new timRemoteUserAuth_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override public void onComplete(TimRemoteUserBean o) { timRemoteUserAuth_result result = new timRemoteUserAuth_result(); result.success = o; try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); } - fb.close(); } - public void onError(Exception e) { + @Override + public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; + org.apache.thrift.TSerializable msg; timRemoteUserAuth_result result = new timRemoteUserAuth_result(); - { + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); } - fb.close(); } }; } + @Override protected boolean isOneway() { return false; } - public void start(I iface, timRemoteUserAuth_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + @Override + public void start(I iface, timRemoteUserAuth_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.timRemoteUserAuth(args.tid, args.pwd, args.auth,resultHandler); } } @@ -2533,48 +3021,64 @@ public timRemoteUserGet() { super("timRemoteUserGet"); } + @Override public timRemoteUserGet_args getEmptyArgsInstance() { return new timRemoteUserGet_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override public void onComplete(TimRemoteUserBean o) { timRemoteUserGet_result result = new timRemoteUserGet_result(); result.success = o; try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); } - fb.close(); } - public void onError(Exception e) { + @Override + public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; + org.apache.thrift.TSerializable msg; timRemoteUserGet_result result = new timRemoteUserGet_result(); - { + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); } - fb.close(); } }; } + @Override protected boolean isOneway() { return false; } - public void start(I iface, timRemoteUserGet_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + @Override + public void start(I iface, timRemoteUserGet_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.timRemoteUserGet(args.tid, args.auth,resultHandler); } } @@ -2584,48 +3088,64 @@ public timRemoteUserEdit() { super("timRemoteUserEdit"); } + @Override public timRemoteUserEdit_args getEmptyArgsInstance() { return new timRemoteUserEdit_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override public void onComplete(TimRemoteUserBean o) { timRemoteUserEdit_result result = new timRemoteUserEdit_result(); result.success = o; try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); } - fb.close(); } - public void onError(Exception e) { + @Override + public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; + org.apache.thrift.TSerializable msg; timRemoteUserEdit_result result = new timRemoteUserEdit_result(); - { + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); } - fb.close(); } }; } + @Override protected boolean isOneway() { return false; } - public void start(I iface, timRemoteUserEdit_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + @Override + public void start(I iface, timRemoteUserEdit_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.timRemoteUserEdit(args.tid, args.ub, args.auth,resultHandler); } } @@ -2635,48 +3155,64 @@ public timResponsePresence() { super("timResponsePresence"); } + @Override public timResponsePresence_args getEmptyArgsInstance() { return new timResponsePresence_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override public void onComplete(TimResponseBean o) { timResponsePresence_result result = new timResponsePresence_result(); result.success = o; try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); } - fb.close(); } - public void onError(Exception e) { + @Override + public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; + org.apache.thrift.TSerializable msg; timResponsePresence_result result = new timResponsePresence_result(); - { + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); } - fb.close(); } }; } + @Override protected boolean isOneway() { return false; } - public void start(I iface, timResponsePresence_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + @Override + public void start(I iface, timResponsePresence_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.timResponsePresence(args.pbean, args.auth,resultHandler); } } @@ -2686,48 +3222,64 @@ public timResponseMessage() { super("timResponseMessage"); } + @Override public timResponseMessage_args getEmptyArgsInstance() { return new timResponseMessage_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override public void onComplete(TimResponseBean o) { timResponseMessage_result result = new timResponseMessage_result(); result.success = o; try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); } - fb.close(); } - public void onError(Exception e) { + @Override + public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; + org.apache.thrift.TSerializable msg; timResponseMessage_result result = new timResponseMessage_result(); - { + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); } - fb.close(); } }; } + @Override protected boolean isOneway() { return false; } - public void start(I iface, timResponseMessage_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + @Override + public void start(I iface, timResponseMessage_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.timResponseMessage(args.mbean, args.auth,resultHandler); } } @@ -2737,48 +3289,64 @@ public timResponseMessageIq() { super("timResponseMessageIq"); } + @Override public timResponseMessageIq_args getEmptyArgsInstance() { return new timResponseMessageIq_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override public void onComplete(TimMBeanList o) { timResponseMessageIq_result result = new timResponseMessageIq_result(); result.success = o; try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); } - fb.close(); } - public void onError(Exception e) { + @Override + public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; + org.apache.thrift.TSerializable msg; timResponseMessageIq_result result = new timResponseMessageIq_result(); - { + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); } - fb.close(); } }; } + @Override protected boolean isOneway() { return false; } - public void start(I iface, timResponseMessageIq_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + @Override + public void start(I iface, timResponseMessageIq_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.timResponseMessageIq(args.timMsgIq, args.iqType, args.auth,resultHandler); } } @@ -2788,48 +3356,64 @@ public timResponsePresenceList() { super("timResponsePresenceList"); } + @Override public timResponsePresenceList_args getEmptyArgsInstance() { return new timResponsePresenceList_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override public void onComplete(TimResponseBean o) { timResponsePresenceList_result result = new timResponsePresenceList_result(); result.success = o; try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); } - fb.close(); } - public void onError(Exception e) { + @Override + public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; + org.apache.thrift.TSerializable msg; timResponsePresenceList_result result = new timResponsePresenceList_result(); - { + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); } - fb.close(); } }; } + @Override protected boolean isOneway() { return false; } - public void start(I iface, timResponsePresenceList_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + @Override + public void start(I iface, timResponsePresenceList_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.timResponsePresenceList(args.pbeanList, args.auth,resultHandler); } } @@ -2839,75 +3423,89 @@ public timResponseMessageList() { super("timResponseMessageList"); } + @Override public timResponseMessageList_args getEmptyArgsInstance() { return new timResponseMessageList_args(); } - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { + @Override + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { + return new org.apache.thrift.async.AsyncMethodCallback() { + @Override public void onComplete(TimResponseBean o) { timResponseMessageList_result result = new timResponseMessageList_result(); result.success = o; try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); } - fb.close(); } - public void onError(Exception e) { + @Override + public void onError(java.lang.Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; + org.apache.thrift.TSerializable msg; timResponseMessageList_result result = new timResponseMessageList_result(); - { + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); } - fb.close(); } }; } + @Override protected boolean isOneway() { return false; } - public void start(I iface, timResponseMessageList_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { + @Override + public void start(I iface, timResponseMessageList_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { iface.timResponseMessageList(args.mbeanList, args.auth,resultHandler); } } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timStream_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timStream_args"); private static final org.apache.thrift.protocol.TField PARAM_FIELD_DESC = new org.apache.thrift.protocol.TField("param", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timStream_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timStream_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timStream_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timStream_argsTupleSchemeFactory(); - public TimParam param; // required + public @org.apache.thrift.annotation.Nullable TimParam param; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { PARAM((short)1, "param"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -2915,6 +3513,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PARAM @@ -2930,41 +3529,44 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PARAM, new org.apache.thrift.meta_data.FieldMetaData("param", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimParam.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timStream_args.class, metaDataMap); } @@ -2987,6 +3589,7 @@ public timStream_args(timStream_args other) { } } + @Override public timStream_args deepCopy() { return new timStream_args(this); } @@ -2996,11 +3599,12 @@ public void clear() { this.param = null; } + @org.apache.thrift.annotation.Nullable public TimParam getParam() { return this.param; } - public timStream_args setParam(TimParam param) { + public timStream_args setParam(@org.apache.thrift.annotation.Nullable TimParam param) { this.param = param; return this; } @@ -3020,7 +3624,8 @@ public void setParamIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case PARAM: if (value == null) { @@ -3033,32 +3638,33 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case PARAM: return getParam(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { case PARAM: return isSetParam(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timStream_args) return this.equals((timStream_args)that); return false; @@ -3067,6 +3673,8 @@ public boolean equals(Object that) { public boolean equals(timStream_args that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_param = true && this.isSetParam(); boolean that_present_param = true && that.isSetParam(); @@ -3082,14 +3690,13 @@ public boolean equals(timStream_args that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_param = true && (isSetParam()); - list.add(present_param); - if (present_param) - list.add(param); + hashCode = hashCode * 8191 + ((isSetParam()) ? 131071 : 524287); + if (isSetParam()) + hashCode = hashCode * 8191 + param.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -3100,7 +3707,7 @@ public int compareTo(timStream_args other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetParam()).compareTo(other.isSetParam()); + lastComparison = java.lang.Boolean.compare(isSetParam(), other.isSetParam()); if (lastComparison != 0) { return lastComparison; } @@ -3113,21 +3720,25 @@ public int compareTo(timStream_args other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timStream_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timStream_args("); boolean first = true; sb.append("param:"); @@ -3157,7 +3768,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -3165,14 +3776,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timStream_argsStandardSchemeFactory implements SchemeFactory { + private static class timStream_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timStream_argsStandardScheme getScheme() { return new timStream_argsStandardScheme(); } } - private static class timStream_argsStandardScheme extends StandardScheme { + private static class timStream_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timStream_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -3203,6 +3816,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timStream_args stru struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timStream_args struct) throws org.apache.thrift.TException { struct.validate(); @@ -3218,18 +3832,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timStream_args str } - private static class timStream_argsTupleSchemeFactory implements SchemeFactory { + private static class timStream_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timStream_argsTupleScheme getScheme() { return new timStream_argsTupleScheme(); } } - private static class timStream_argsTupleScheme extends TupleScheme { + private static class timStream_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timStream_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetParam()) { optionals.set(0); } @@ -3241,8 +3856,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timStream_args stru @Override public void read(org.apache.thrift.protocol.TProtocol prot, timStream_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.param = new TimParam(); struct.param.read(iprot); @@ -3251,27 +3866,28 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timStream_args struc } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timStarttls_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timStarttls_args"); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timStarttls_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timStarttls_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timStarttls_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timStarttls_argsTupleSchemeFactory(); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -3279,6 +3895,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: @@ -3292,37 +3909,40 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - metaDataMap = Collections.unmodifiableMap(tmpMap); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timStarttls_args.class, metaDataMap); } @@ -3335,6 +3955,7 @@ public timStarttls_args() { public timStarttls_args(timStarttls_args other) { } + @Override public timStarttls_args deepCopy() { return new timStarttls_args(this); } @@ -3343,32 +3964,34 @@ public timStarttls_args deepCopy() { public void clear() { } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timStarttls_args) return this.equals((timStarttls_args)that); return false; @@ -3377,15 +4000,17 @@ public boolean equals(Object that) { public boolean equals(timStarttls_args that) { if (that == null) return false; + if (this == that) + return true; return true; } @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - return list.hashCode(); + return hashCode; } @Override @@ -3399,21 +4024,25 @@ public int compareTo(timStarttls_args other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timStarttls_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timStarttls_args("); boolean first = true; sb.append(")"); @@ -3433,7 +4062,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -3441,14 +4070,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timStarttls_argsStandardSchemeFactory implements SchemeFactory { + private static class timStarttls_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timStarttls_argsStandardScheme getScheme() { return new timStarttls_argsStandardScheme(); } } - private static class timStarttls_argsStandardScheme extends StandardScheme { + private static class timStarttls_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timStarttls_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -3470,6 +4101,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timStarttls_args st struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timStarttls_args struct) throws org.apache.thrift.TException { struct.validate(); @@ -3480,51 +4112,53 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timStarttls_args s } - private static class timStarttls_argsTupleSchemeFactory implements SchemeFactory { + private static class timStarttls_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timStarttls_argsTupleScheme getScheme() { return new timStarttls_argsTupleScheme(); } } - private static class timStarttls_argsTupleScheme extends TupleScheme { + private static class timStarttls_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timStarttls_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, timStarttls_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timLogin_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timLogin_args"); private static final org.apache.thrift.protocol.TField TID_FIELD_DESC = new org.apache.thrift.protocol.TField("tid", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField PWD_FIELD_DESC = new org.apache.thrift.protocol.TField("pwd", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timLogin_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timLogin_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timLogin_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timLogin_argsTupleSchemeFactory(); - public Tid tid; // required - public String pwd; // required + public @org.apache.thrift.annotation.Nullable Tid tid; // required + public @org.apache.thrift.annotation.Nullable java.lang.String pwd; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { TID((short)1, "tid"), PWD((short)2, "pwd"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -3532,6 +4166,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TID @@ -3549,43 +4184,46 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TID, new org.apache.thrift.meta_data.FieldMetaData("tid", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Tid.class))); tmpMap.put(_Fields.PWD, new org.apache.thrift.meta_data.FieldMetaData("pwd", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timLogin_args.class, metaDataMap); } @@ -3594,7 +4232,7 @@ public timLogin_args() { public timLogin_args( Tid tid, - String pwd) + java.lang.String pwd) { this(); this.tid = tid; @@ -3613,6 +4251,7 @@ public timLogin_args(timLogin_args other) { } } + @Override public timLogin_args deepCopy() { return new timLogin_args(this); } @@ -3623,11 +4262,12 @@ public void clear() { this.pwd = null; } + @org.apache.thrift.annotation.Nullable public Tid getTid() { return this.tid; } - public timLogin_args setTid(Tid tid) { + public timLogin_args setTid(@org.apache.thrift.annotation.Nullable Tid tid) { this.tid = tid; return this; } @@ -3647,11 +4287,12 @@ public void setTidIsSet(boolean value) { } } - public String getPwd() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getPwd() { return this.pwd; } - public timLogin_args setPwd(String pwd) { + public timLogin_args setPwd(@org.apache.thrift.annotation.Nullable java.lang.String pwd) { this.pwd = pwd; return this; } @@ -3671,7 +4312,8 @@ public void setPwdIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case TID: if (value == null) { @@ -3685,14 +4327,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetPwd(); } else { - setPwd((String)value); + setPwd((java.lang.String)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TID: return getTid(); @@ -3701,13 +4345,14 @@ public Object getFieldValue(_Fields field) { return getPwd(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -3716,13 +4361,11 @@ public boolean isSet(_Fields field) { case PWD: return isSetPwd(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timLogin_args) return this.equals((timLogin_args)that); return false; @@ -3731,6 +4374,8 @@ public boolean equals(Object that) { public boolean equals(timLogin_args that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_tid = true && this.isSetTid(); boolean that_present_tid = true && that.isSetTid(); @@ -3755,19 +4400,17 @@ public boolean equals(timLogin_args that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_tid = true && (isSetTid()); - list.add(present_tid); - if (present_tid) - list.add(tid); + hashCode = hashCode * 8191 + ((isSetTid()) ? 131071 : 524287); + if (isSetTid()) + hashCode = hashCode * 8191 + tid.hashCode(); - boolean present_pwd = true && (isSetPwd()); - list.add(present_pwd); - if (present_pwd) - list.add(pwd); + hashCode = hashCode * 8191 + ((isSetPwd()) ? 131071 : 524287); + if (isSetPwd()) + hashCode = hashCode * 8191 + pwd.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -3778,7 +4421,7 @@ public int compareTo(timLogin_args other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTid()).compareTo(other.isSetTid()); + lastComparison = java.lang.Boolean.compare(isSetTid(), other.isSetTid()); if (lastComparison != 0) { return lastComparison; } @@ -3788,7 +4431,7 @@ public int compareTo(timLogin_args other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPwd()).compareTo(other.isSetPwd()); + lastComparison = java.lang.Boolean.compare(isSetPwd(), other.isSetPwd()); if (lastComparison != 0) { return lastComparison; } @@ -3801,21 +4444,25 @@ public int compareTo(timLogin_args other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timLogin_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timLogin_args("); boolean first = true; sb.append("tid:"); @@ -3853,7 +4500,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -3861,14 +4508,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timLogin_argsStandardSchemeFactory implements SchemeFactory { + private static class timLogin_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timLogin_argsStandardScheme getScheme() { return new timLogin_argsStandardScheme(); } } - private static class timLogin_argsStandardScheme extends StandardScheme { + private static class timLogin_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timLogin_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -3907,6 +4556,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timLogin_args struc struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timLogin_args struct) throws org.apache.thrift.TException { struct.validate(); @@ -3927,18 +4577,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timLogin_args stru } - private static class timLogin_argsTupleSchemeFactory implements SchemeFactory { + private static class timLogin_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timLogin_argsTupleScheme getScheme() { return new timLogin_argsTupleScheme(); } } - private static class timLogin_argsTupleScheme extends TupleScheme { + private static class timLogin_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timLogin_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetTid()) { optionals.set(0); } @@ -3956,8 +4607,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timLogin_args struc @Override public void read(org.apache.thrift.protocol.TProtocol prot, timLogin_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.tid = new Tid(); struct.tid.read(iprot); @@ -3970,29 +4621,30 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timLogin_args struct } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timAck_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timAck_args"); private static final org.apache.thrift.protocol.TField AB_FIELD_DESC = new org.apache.thrift.protocol.TField("ab", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timAck_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timAck_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timAck_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timAck_argsTupleSchemeFactory(); - public TimAckBean ab; // required + public @org.apache.thrift.annotation.Nullable TimAckBean ab; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { AB((short)1, "ab"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -4000,6 +4652,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // AB @@ -4015,41 +4668,44 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.AB, new org.apache.thrift.meta_data.FieldMetaData("ab", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimAckBean.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timAck_args.class, metaDataMap); } @@ -4072,6 +4728,7 @@ public timAck_args(timAck_args other) { } } + @Override public timAck_args deepCopy() { return new timAck_args(this); } @@ -4081,11 +4738,12 @@ public void clear() { this.ab = null; } + @org.apache.thrift.annotation.Nullable public TimAckBean getAb() { return this.ab; } - public timAck_args setAb(TimAckBean ab) { + public timAck_args setAb(@org.apache.thrift.annotation.Nullable TimAckBean ab) { this.ab = ab; return this; } @@ -4105,7 +4763,8 @@ public void setAbIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case AB: if (value == null) { @@ -4118,32 +4777,33 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case AB: return getAb(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { case AB: return isSetAb(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timAck_args) return this.equals((timAck_args)that); return false; @@ -4152,6 +4812,8 @@ public boolean equals(Object that) { public boolean equals(timAck_args that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_ab = true && this.isSetAb(); boolean that_present_ab = true && that.isSetAb(); @@ -4167,14 +4829,13 @@ public boolean equals(timAck_args that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_ab = true && (isSetAb()); - list.add(present_ab); - if (present_ab) - list.add(ab); + hashCode = hashCode * 8191 + ((isSetAb()) ? 131071 : 524287); + if (isSetAb()) + hashCode = hashCode * 8191 + ab.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -4185,7 +4846,7 @@ public int compareTo(timAck_args other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetAb()).compareTo(other.isSetAb()); + lastComparison = java.lang.Boolean.compare(isSetAb(), other.isSetAb()); if (lastComparison != 0) { return lastComparison; } @@ -4198,21 +4859,25 @@ public int compareTo(timAck_args other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timAck_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timAck_args("); boolean first = true; sb.append("ab:"); @@ -4242,7 +4907,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -4250,14 +4915,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timAck_argsStandardSchemeFactory implements SchemeFactory { + private static class timAck_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timAck_argsStandardScheme getScheme() { return new timAck_argsStandardScheme(); } } - private static class timAck_argsStandardScheme extends StandardScheme { + private static class timAck_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timAck_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -4288,6 +4955,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timAck_args struct) struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timAck_args struct) throws org.apache.thrift.TException { struct.validate(); @@ -4303,18 +4971,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timAck_args struct } - private static class timAck_argsTupleSchemeFactory implements SchemeFactory { + private static class timAck_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timAck_argsTupleScheme getScheme() { return new timAck_argsTupleScheme(); } } - private static class timAck_argsTupleScheme extends TupleScheme { + private static class timAck_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timAck_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetAb()) { optionals.set(0); } @@ -4326,8 +4995,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timAck_args struct) @Override public void read(org.apache.thrift.protocol.TProtocol prot, timAck_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.ab = new TimAckBean(); struct.ab.read(iprot); @@ -4336,29 +5005,30 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timAck_args struct) } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timPresence_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timPresence_args"); private static final org.apache.thrift.protocol.TField PBEAN_FIELD_DESC = new org.apache.thrift.protocol.TField("pbean", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timPresence_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timPresence_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timPresence_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timPresence_argsTupleSchemeFactory(); - public TimPBean pbean; // required + public @org.apache.thrift.annotation.Nullable TimPBean pbean; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { PBEAN((short)1, "pbean"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -4366,6 +5036,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PBEAN @@ -4381,41 +5052,44 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PBEAN, new org.apache.thrift.meta_data.FieldMetaData("pbean", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimPBean.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timPresence_args.class, metaDataMap); } @@ -4438,6 +5112,7 @@ public timPresence_args(timPresence_args other) { } } + @Override public timPresence_args deepCopy() { return new timPresence_args(this); } @@ -4447,11 +5122,12 @@ public void clear() { this.pbean = null; } + @org.apache.thrift.annotation.Nullable public TimPBean getPbean() { return this.pbean; } - public timPresence_args setPbean(TimPBean pbean) { + public timPresence_args setPbean(@org.apache.thrift.annotation.Nullable TimPBean pbean) { this.pbean = pbean; return this; } @@ -4471,7 +5147,8 @@ public void setPbeanIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case PBEAN: if (value == null) { @@ -4484,32 +5161,33 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case PBEAN: return getPbean(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { case PBEAN: return isSetPbean(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timPresence_args) return this.equals((timPresence_args)that); return false; @@ -4518,6 +5196,8 @@ public boolean equals(Object that) { public boolean equals(timPresence_args that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_pbean = true && this.isSetPbean(); boolean that_present_pbean = true && that.isSetPbean(); @@ -4533,14 +5213,13 @@ public boolean equals(timPresence_args that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_pbean = true && (isSetPbean()); - list.add(present_pbean); - if (present_pbean) - list.add(pbean); + hashCode = hashCode * 8191 + ((isSetPbean()) ? 131071 : 524287); + if (isSetPbean()) + hashCode = hashCode * 8191 + pbean.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -4551,7 +5230,7 @@ public int compareTo(timPresence_args other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetPbean()).compareTo(other.isSetPbean()); + lastComparison = java.lang.Boolean.compare(isSetPbean(), other.isSetPbean()); if (lastComparison != 0) { return lastComparison; } @@ -4564,21 +5243,25 @@ public int compareTo(timPresence_args other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timPresence_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timPresence_args("); boolean first = true; sb.append("pbean:"); @@ -4608,7 +5291,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -4616,14 +5299,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timPresence_argsStandardSchemeFactory implements SchemeFactory { + private static class timPresence_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timPresence_argsStandardScheme getScheme() { return new timPresence_argsStandardScheme(); } } - private static class timPresence_argsStandardScheme extends StandardScheme { + private static class timPresence_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timPresence_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -4654,6 +5339,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timPresence_args st struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timPresence_args struct) throws org.apache.thrift.TException { struct.validate(); @@ -4669,18 +5355,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timPresence_args s } - private static class timPresence_argsTupleSchemeFactory implements SchemeFactory { + private static class timPresence_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timPresence_argsTupleScheme getScheme() { return new timPresence_argsTupleScheme(); } } - private static class timPresence_argsTupleScheme extends TupleScheme { + private static class timPresence_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timPresence_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetPbean()) { optionals.set(0); } @@ -4692,8 +5379,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timPresence_args st @Override public void read(org.apache.thrift.protocol.TProtocol prot, timPresence_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.pbean = new TimPBean(); struct.pbean.read(iprot); @@ -4702,29 +5389,30 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timPresence_args str } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timMessage_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timMessage_args"); private static final org.apache.thrift.protocol.TField MBEAN_FIELD_DESC = new org.apache.thrift.protocol.TField("mbean", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timMessage_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timMessage_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timMessage_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timMessage_argsTupleSchemeFactory(); - public TimMBean mbean; // required + public @org.apache.thrift.annotation.Nullable TimMBean mbean; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { MBEAN((short)1, "mbean"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -4732,6 +5420,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // MBEAN @@ -4747,41 +5436,44 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.MBEAN, new org.apache.thrift.meta_data.FieldMetaData("mbean", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimMBean.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timMessage_args.class, metaDataMap); } @@ -4804,6 +5496,7 @@ public timMessage_args(timMessage_args other) { } } + @Override public timMessage_args deepCopy() { return new timMessage_args(this); } @@ -4813,11 +5506,12 @@ public void clear() { this.mbean = null; } + @org.apache.thrift.annotation.Nullable public TimMBean getMbean() { return this.mbean; } - public timMessage_args setMbean(TimMBean mbean) { + public timMessage_args setMbean(@org.apache.thrift.annotation.Nullable TimMBean mbean) { this.mbean = mbean; return this; } @@ -4837,7 +5531,8 @@ public void setMbeanIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case MBEAN: if (value == null) { @@ -4850,32 +5545,33 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case MBEAN: return getMbean(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { case MBEAN: return isSetMbean(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timMessage_args) return this.equals((timMessage_args)that); return false; @@ -4884,6 +5580,8 @@ public boolean equals(Object that) { public boolean equals(timMessage_args that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_mbean = true && this.isSetMbean(); boolean that_present_mbean = true && that.isSetMbean(); @@ -4899,14 +5597,13 @@ public boolean equals(timMessage_args that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_mbean = true && (isSetMbean()); - list.add(present_mbean); - if (present_mbean) - list.add(mbean); + hashCode = hashCode * 8191 + ((isSetMbean()) ? 131071 : 524287); + if (isSetMbean()) + hashCode = hashCode * 8191 + mbean.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -4917,7 +5614,7 @@ public int compareTo(timMessage_args other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetMbean()).compareTo(other.isSetMbean()); + lastComparison = java.lang.Boolean.compare(isSetMbean(), other.isSetMbean()); if (lastComparison != 0) { return lastComparison; } @@ -4930,21 +5627,25 @@ public int compareTo(timMessage_args other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timMessage_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timMessage_args("); boolean first = true; sb.append("mbean:"); @@ -4974,7 +5675,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -4982,14 +5683,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timMessage_argsStandardSchemeFactory implements SchemeFactory { + private static class timMessage_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timMessage_argsStandardScheme getScheme() { return new timMessage_argsStandardScheme(); } } - private static class timMessage_argsStandardScheme extends StandardScheme { + private static class timMessage_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timMessage_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -5020,6 +5723,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timMessage_args str struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timMessage_args struct) throws org.apache.thrift.TException { struct.validate(); @@ -5035,18 +5739,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timMessage_args st } - private static class timMessage_argsTupleSchemeFactory implements SchemeFactory { + private static class timMessage_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timMessage_argsTupleScheme getScheme() { return new timMessage_argsTupleScheme(); } } - private static class timMessage_argsTupleScheme extends TupleScheme { + private static class timMessage_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timMessage_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetMbean()) { optionals.set(0); } @@ -5058,8 +5763,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timMessage_args str @Override public void read(org.apache.thrift.protocol.TProtocol prot, timMessage_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.mbean = new TimMBean(); struct.mbean.read(iprot); @@ -5068,29 +5773,30 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timMessage_args stru } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timPing_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timPing_args"); private static final org.apache.thrift.protocol.TField THREAD_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("threadId", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timPing_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timPing_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timPing_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timPing_argsTupleSchemeFactory(); - public String threadId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String threadId; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { THREAD_ID((short)1, "threadId"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -5098,6 +5804,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // THREAD_ID @@ -5113,41 +5820,44 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.THREAD_ID, new org.apache.thrift.meta_data.FieldMetaData("threadId", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timPing_args.class, metaDataMap); } @@ -5155,7 +5865,7 @@ public timPing_args() { } public timPing_args( - String threadId) + java.lang.String threadId) { this(); this.threadId = threadId; @@ -5170,6 +5880,7 @@ public timPing_args(timPing_args other) { } } + @Override public timPing_args deepCopy() { return new timPing_args(this); } @@ -5179,11 +5890,12 @@ public void clear() { this.threadId = null; } - public String getThreadId() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getThreadId() { return this.threadId; } - public timPing_args setThreadId(String threadId) { + public timPing_args setThreadId(@org.apache.thrift.annotation.Nullable java.lang.String threadId) { this.threadId = threadId; return this; } @@ -5203,45 +5915,47 @@ public void setThreadIdIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case THREAD_ID: if (value == null) { unsetThreadId(); } else { - setThreadId((String)value); + setThreadId((java.lang.String)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case THREAD_ID: return getThreadId(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { case THREAD_ID: return isSetThreadId(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timPing_args) return this.equals((timPing_args)that); return false; @@ -5250,6 +5964,8 @@ public boolean equals(Object that) { public boolean equals(timPing_args that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_threadId = true && this.isSetThreadId(); boolean that_present_threadId = true && that.isSetThreadId(); @@ -5265,14 +5981,13 @@ public boolean equals(timPing_args that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_threadId = true && (isSetThreadId()); - list.add(present_threadId); - if (present_threadId) - list.add(threadId); + hashCode = hashCode * 8191 + ((isSetThreadId()) ? 131071 : 524287); + if (isSetThreadId()) + hashCode = hashCode * 8191 + threadId.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -5283,7 +5998,7 @@ public int compareTo(timPing_args other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetThreadId()).compareTo(other.isSetThreadId()); + lastComparison = java.lang.Boolean.compare(isSetThreadId(), other.isSetThreadId()); if (lastComparison != 0) { return lastComparison; } @@ -5296,21 +6011,25 @@ public int compareTo(timPing_args other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timPing_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timPing_args("); boolean first = true; sb.append("threadId:"); @@ -5337,7 +6056,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -5345,14 +6064,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timPing_argsStandardSchemeFactory implements SchemeFactory { + private static class timPing_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timPing_argsStandardScheme getScheme() { return new timPing_argsStandardScheme(); } } - private static class timPing_argsStandardScheme extends StandardScheme { + private static class timPing_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timPing_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -5382,6 +6103,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timPing_args struct struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timPing_args struct) throws org.apache.thrift.TException { struct.validate(); @@ -5397,18 +6119,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timPing_args struc } - private static class timPing_argsTupleSchemeFactory implements SchemeFactory { + private static class timPing_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timPing_argsTupleScheme getScheme() { return new timPing_argsTupleScheme(); } } - private static class timPing_argsTupleScheme extends TupleScheme { + private static class timPing_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timPing_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetThreadId()) { optionals.set(0); } @@ -5420,8 +6143,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timPing_args struct @Override public void read(org.apache.thrift.protocol.TProtocol prot, timPing_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.threadId = iprot.readString(); struct.setThreadIdIsSet(true); @@ -5429,29 +6152,30 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timPing_args struct) } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timError_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timError_args"); private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timError_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timError_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timError_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timError_argsTupleSchemeFactory(); - public TimError e; // required + public @org.apache.thrift.annotation.Nullable TimError e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { E((short)1, "e"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -5459,6 +6183,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E @@ -5474,41 +6199,44 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimError.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timError_args.class, metaDataMap); } @@ -5531,6 +6259,7 @@ public timError_args(timError_args other) { } } + @Override public timError_args deepCopy() { return new timError_args(this); } @@ -5540,11 +6269,12 @@ public void clear() { this.e = null; } + @org.apache.thrift.annotation.Nullable public TimError getE() { return this.e; } - public timError_args setE(TimError e) { + public timError_args setE(@org.apache.thrift.annotation.Nullable TimError e) { this.e = e; return this; } @@ -5564,7 +6294,8 @@ public void setEIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case E: if (value == null) { @@ -5577,32 +6308,33 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { case E: return isSetE(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timError_args) return this.equals((timError_args)that); return false; @@ -5611,6 +6343,8 @@ public boolean equals(Object that) { public boolean equals(timError_args that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); @@ -5626,14 +6360,13 @@ public boolean equals(timError_args that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_e = true && (isSetE()); - list.add(present_e); - if (present_e) - list.add(e); + hashCode = hashCode * 8191 + ((isSetE()) ? 131071 : 524287); + if (isSetE()) + hashCode = hashCode * 8191 + e.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -5644,7 +6377,7 @@ public int compareTo(timError_args other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); + lastComparison = java.lang.Boolean.compare(isSetE(), other.isSetE()); if (lastComparison != 0) { return lastComparison; } @@ -5657,21 +6390,25 @@ public int compareTo(timError_args other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timError_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timError_args("); boolean first = true; sb.append("e:"); @@ -5701,7 +6438,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -5709,14 +6446,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timError_argsStandardSchemeFactory implements SchemeFactory { + private static class timError_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timError_argsStandardScheme getScheme() { return new timError_argsStandardScheme(); } } - private static class timError_argsStandardScheme extends StandardScheme { + private static class timError_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timError_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -5747,6 +6486,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timError_args struc struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timError_args struct) throws org.apache.thrift.TException { struct.validate(); @@ -5762,18 +6502,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timError_args stru } - private static class timError_argsTupleSchemeFactory implements SchemeFactory { + private static class timError_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timError_argsTupleScheme getScheme() { return new timError_argsTupleScheme(); } } - private static class timError_argsTupleScheme extends TupleScheme { + private static class timError_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timError_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetE()) { optionals.set(0); } @@ -5785,8 +6526,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timError_args struc @Override public void read(org.apache.thrift.protocol.TProtocol prot, timError_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new TimError(); struct.e.read(iprot); @@ -5795,27 +6536,28 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timError_args struct } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timLogout_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timLogout_args"); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timLogout_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timLogout_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timLogout_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timLogout_argsTupleSchemeFactory(); /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ; - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -5823,6 +6565,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { default: @@ -5836,37 +6579,40 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - metaDataMap = Collections.unmodifiableMap(tmpMap); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timLogout_args.class, metaDataMap); } @@ -5879,6 +6625,7 @@ public timLogout_args() { public timLogout_args(timLogout_args other) { } + @Override public timLogout_args deepCopy() { return new timLogout_args(this); } @@ -5887,32 +6634,34 @@ public timLogout_args deepCopy() { public void clear() { } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timLogout_args) return this.equals((timLogout_args)that); return false; @@ -5921,15 +6670,17 @@ public boolean equals(Object that) { public boolean equals(timLogout_args that) { if (that == null) return false; + if (this == that) + return true; return true; } @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - return list.hashCode(); + return hashCode; } @Override @@ -5943,21 +6694,25 @@ public int compareTo(timLogout_args other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timLogout_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timLogout_args("); boolean first = true; sb.append(")"); @@ -5977,7 +6732,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -5985,14 +6740,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timLogout_argsStandardSchemeFactory implements SchemeFactory { + private static class timLogout_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timLogout_argsStandardScheme getScheme() { return new timLogout_argsStandardScheme(); } } - private static class timLogout_argsStandardScheme extends StandardScheme { + private static class timLogout_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timLogout_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -6014,6 +6771,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timLogout_args stru struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timLogout_args struct) throws org.apache.thrift.TException { struct.validate(); @@ -6024,51 +6782,53 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timLogout_args str } - private static class timLogout_argsTupleSchemeFactory implements SchemeFactory { + private static class timLogout_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timLogout_argsTupleScheme getScheme() { return new timLogout_argsTupleScheme(); } } - private static class timLogout_argsTupleScheme extends TupleScheme { + private static class timLogout_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timLogout_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } @Override public void read(org.apache.thrift.protocol.TProtocol prot, timLogout_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timRegist_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timRegist_args"); private static final org.apache.thrift.protocol.TField TID_FIELD_DESC = new org.apache.thrift.protocol.TField("tid", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField AUTH_FIELD_DESC = new org.apache.thrift.protocol.TField("auth", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timRegist_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timRegist_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timRegist_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timRegist_argsTupleSchemeFactory(); - public Tid tid; // required - public String auth; // required + public @org.apache.thrift.annotation.Nullable Tid tid; // required + public @org.apache.thrift.annotation.Nullable java.lang.String auth; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { TID((short)1, "tid"), AUTH((short)2, "auth"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -6076,6 +6836,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TID @@ -6093,43 +6854,46 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TID, new org.apache.thrift.meta_data.FieldMetaData("tid", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Tid.class))); tmpMap.put(_Fields.AUTH, new org.apache.thrift.meta_data.FieldMetaData("auth", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timRegist_args.class, metaDataMap); } @@ -6138,7 +6902,7 @@ public timRegist_args() { public timRegist_args( Tid tid, - String auth) + java.lang.String auth) { this(); this.tid = tid; @@ -6157,6 +6921,7 @@ public timRegist_args(timRegist_args other) { } } + @Override public timRegist_args deepCopy() { return new timRegist_args(this); } @@ -6167,11 +6932,12 @@ public void clear() { this.auth = null; } + @org.apache.thrift.annotation.Nullable public Tid getTid() { return this.tid; } - public timRegist_args setTid(Tid tid) { + public timRegist_args setTid(@org.apache.thrift.annotation.Nullable Tid tid) { this.tid = tid; return this; } @@ -6191,11 +6957,12 @@ public void setTidIsSet(boolean value) { } } - public String getAuth() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getAuth() { return this.auth; } - public timRegist_args setAuth(String auth) { + public timRegist_args setAuth(@org.apache.thrift.annotation.Nullable java.lang.String auth) { this.auth = auth; return this; } @@ -6215,7 +6982,8 @@ public void setAuthIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case TID: if (value == null) { @@ -6229,14 +6997,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetAuth(); } else { - setAuth((String)value); + setAuth((java.lang.String)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TID: return getTid(); @@ -6245,13 +7015,14 @@ public Object getFieldValue(_Fields field) { return getAuth(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -6260,13 +7031,11 @@ public boolean isSet(_Fields field) { case AUTH: return isSetAuth(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timRegist_args) return this.equals((timRegist_args)that); return false; @@ -6275,6 +7044,8 @@ public boolean equals(Object that) { public boolean equals(timRegist_args that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_tid = true && this.isSetTid(); boolean that_present_tid = true && that.isSetTid(); @@ -6299,19 +7070,17 @@ public boolean equals(timRegist_args that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_tid = true && (isSetTid()); - list.add(present_tid); - if (present_tid) - list.add(tid); + hashCode = hashCode * 8191 + ((isSetTid()) ? 131071 : 524287); + if (isSetTid()) + hashCode = hashCode * 8191 + tid.hashCode(); - boolean present_auth = true && (isSetAuth()); - list.add(present_auth); - if (present_auth) - list.add(auth); + hashCode = hashCode * 8191 + ((isSetAuth()) ? 131071 : 524287); + if (isSetAuth()) + hashCode = hashCode * 8191 + auth.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -6322,7 +7091,7 @@ public int compareTo(timRegist_args other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTid()).compareTo(other.isSetTid()); + lastComparison = java.lang.Boolean.compare(isSetTid(), other.isSetTid()); if (lastComparison != 0) { return lastComparison; } @@ -6332,7 +7101,7 @@ public int compareTo(timRegist_args other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetAuth()).compareTo(other.isSetAuth()); + lastComparison = java.lang.Boolean.compare(isSetAuth(), other.isSetAuth()); if (lastComparison != 0) { return lastComparison; } @@ -6345,21 +7114,25 @@ public int compareTo(timRegist_args other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timRegist_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timRegist_args("); boolean first = true; sb.append("tid:"); @@ -6397,7 +7170,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -6405,14 +7178,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timRegist_argsStandardSchemeFactory implements SchemeFactory { + private static class timRegist_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timRegist_argsStandardScheme getScheme() { return new timRegist_argsStandardScheme(); } } - private static class timRegist_argsStandardScheme extends StandardScheme { + private static class timRegist_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timRegist_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -6451,6 +7226,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timRegist_args stru struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timRegist_args struct) throws org.apache.thrift.TException { struct.validate(); @@ -6471,18 +7247,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timRegist_args str } - private static class timRegist_argsTupleSchemeFactory implements SchemeFactory { + private static class timRegist_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timRegist_argsTupleScheme getScheme() { return new timRegist_argsTupleScheme(); } } - private static class timRegist_argsTupleScheme extends TupleScheme { + private static class timRegist_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timRegist_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetTid()) { optionals.set(0); } @@ -6500,8 +7277,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timRegist_args stru @Override public void read(org.apache.thrift.protocol.TProtocol prot, timRegist_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.tid = new Tid(); struct.tid.read(iprot); @@ -6514,29 +7291,30 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timRegist_args struc } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timRoser_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timRoser_args"); private static final org.apache.thrift.protocol.TField ROSTER_FIELD_DESC = new org.apache.thrift.protocol.TField("roster", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timRoser_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timRoser_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timRoser_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timRoser_argsTupleSchemeFactory(); - public TimRoster roster; // required + public @org.apache.thrift.annotation.Nullable TimRoster roster; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ROSTER((short)1, "roster"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -6544,6 +7322,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // ROSTER @@ -6559,41 +7338,44 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.ROSTER, new org.apache.thrift.meta_data.FieldMetaData("roster", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimRoster.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timRoser_args.class, metaDataMap); } @@ -6616,6 +7398,7 @@ public timRoser_args(timRoser_args other) { } } + @Override public timRoser_args deepCopy() { return new timRoser_args(this); } @@ -6625,11 +7408,12 @@ public void clear() { this.roster = null; } + @org.apache.thrift.annotation.Nullable public TimRoster getRoster() { return this.roster; } - public timRoser_args setRoster(TimRoster roster) { + public timRoser_args setRoster(@org.apache.thrift.annotation.Nullable TimRoster roster) { this.roster = roster; return this; } @@ -6649,7 +7433,8 @@ public void setRosterIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case ROSTER: if (value == null) { @@ -6662,32 +7447,33 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case ROSTER: return getRoster(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { case ROSTER: return isSetRoster(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timRoser_args) return this.equals((timRoser_args)that); return false; @@ -6696,6 +7482,8 @@ public boolean equals(Object that) { public boolean equals(timRoser_args that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_roster = true && this.isSetRoster(); boolean that_present_roster = true && that.isSetRoster(); @@ -6711,14 +7499,13 @@ public boolean equals(timRoser_args that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_roster = true && (isSetRoster()); - list.add(present_roster); - if (present_roster) - list.add(roster); + hashCode = hashCode * 8191 + ((isSetRoster()) ? 131071 : 524287); + if (isSetRoster()) + hashCode = hashCode * 8191 + roster.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -6729,7 +7516,7 @@ public int compareTo(timRoser_args other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetRoster()).compareTo(other.isSetRoster()); + lastComparison = java.lang.Boolean.compare(isSetRoster(), other.isSetRoster()); if (lastComparison != 0) { return lastComparison; } @@ -6742,21 +7529,25 @@ public int compareTo(timRoser_args other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timRoser_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timRoser_args("); boolean first = true; sb.append("roster:"); @@ -6786,7 +7577,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -6794,14 +7585,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timRoser_argsStandardSchemeFactory implements SchemeFactory { + private static class timRoser_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timRoser_argsStandardScheme getScheme() { return new timRoser_argsStandardScheme(); } } - private static class timRoser_argsStandardScheme extends StandardScheme { + private static class timRoser_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timRoser_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -6832,6 +7625,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timRoser_args struc struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timRoser_args struct) throws org.apache.thrift.TException { struct.validate(); @@ -6847,18 +7641,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timRoser_args stru } - private static class timRoser_argsTupleSchemeFactory implements SchemeFactory { + private static class timRoser_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timRoser_argsTupleScheme getScheme() { return new timRoser_argsTupleScheme(); } } - private static class timRoser_argsTupleScheme extends TupleScheme { + private static class timRoser_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timRoser_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetRoster()) { optionals.set(0); } @@ -6870,8 +7665,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timRoser_args struc @Override public void read(org.apache.thrift.protocol.TProtocol prot, timRoser_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.roster = new TimRoster(); struct.roster.read(iprot); @@ -6880,29 +7675,30 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timRoser_args struct } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timMessageList_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timMessageList_args"); private static final org.apache.thrift.protocol.TField MBEAN_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("mbeanList", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timMessageList_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timMessageList_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timMessageList_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timMessageList_argsTupleSchemeFactory(); - public TimMBeanList mbeanList; // required + public @org.apache.thrift.annotation.Nullable TimMBeanList mbeanList; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { MBEAN_LIST((short)1, "mbeanList"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -6910,6 +7706,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // MBEAN_LIST @@ -6925,41 +7722,44 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.MBEAN_LIST, new org.apache.thrift.meta_data.FieldMetaData("mbeanList", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimMBeanList.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timMessageList_args.class, metaDataMap); } @@ -6982,6 +7782,7 @@ public timMessageList_args(timMessageList_args other) { } } + @Override public timMessageList_args deepCopy() { return new timMessageList_args(this); } @@ -6991,11 +7792,12 @@ public void clear() { this.mbeanList = null; } + @org.apache.thrift.annotation.Nullable public TimMBeanList getMbeanList() { return this.mbeanList; } - public timMessageList_args setMbeanList(TimMBeanList mbeanList) { + public timMessageList_args setMbeanList(@org.apache.thrift.annotation.Nullable TimMBeanList mbeanList) { this.mbeanList = mbeanList; return this; } @@ -7015,7 +7817,8 @@ public void setMbeanListIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case MBEAN_LIST: if (value == null) { @@ -7028,32 +7831,33 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case MBEAN_LIST: return getMbeanList(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { case MBEAN_LIST: return isSetMbeanList(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timMessageList_args) return this.equals((timMessageList_args)that); return false; @@ -7062,6 +7866,8 @@ public boolean equals(Object that) { public boolean equals(timMessageList_args that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_mbeanList = true && this.isSetMbeanList(); boolean that_present_mbeanList = true && that.isSetMbeanList(); @@ -7077,14 +7883,13 @@ public boolean equals(timMessageList_args that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_mbeanList = true && (isSetMbeanList()); - list.add(present_mbeanList); - if (present_mbeanList) - list.add(mbeanList); + hashCode = hashCode * 8191 + ((isSetMbeanList()) ? 131071 : 524287); + if (isSetMbeanList()) + hashCode = hashCode * 8191 + mbeanList.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -7095,7 +7900,7 @@ public int compareTo(timMessageList_args other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetMbeanList()).compareTo(other.isSetMbeanList()); + lastComparison = java.lang.Boolean.compare(isSetMbeanList(), other.isSetMbeanList()); if (lastComparison != 0) { return lastComparison; } @@ -7108,21 +7913,25 @@ public int compareTo(timMessageList_args other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timMessageList_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timMessageList_args("); boolean first = true; sb.append("mbeanList:"); @@ -7152,7 +7961,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -7160,14 +7969,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timMessageList_argsStandardSchemeFactory implements SchemeFactory { + private static class timMessageList_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timMessageList_argsStandardScheme getScheme() { return new timMessageList_argsStandardScheme(); } } - private static class timMessageList_argsStandardScheme extends StandardScheme { + private static class timMessageList_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timMessageList_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -7198,6 +8009,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timMessageList_args struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timMessageList_args struct) throws org.apache.thrift.TException { struct.validate(); @@ -7213,18 +8025,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timMessageList_arg } - private static class timMessageList_argsTupleSchemeFactory implements SchemeFactory { + private static class timMessageList_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timMessageList_argsTupleScheme getScheme() { return new timMessageList_argsTupleScheme(); } } - private static class timMessageList_argsTupleScheme extends TupleScheme { + private static class timMessageList_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timMessageList_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetMbeanList()) { optionals.set(0); } @@ -7236,8 +8049,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timMessageList_args @Override public void read(org.apache.thrift.protocol.TProtocol prot, timMessageList_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.mbeanList = new TimMBeanList(); struct.mbeanList.read(iprot); @@ -7246,29 +8059,30 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timMessageList_args } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timPresenceList_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timPresenceList_args"); private static final org.apache.thrift.protocol.TField PBEAN_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("pbeanList", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timPresenceList_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timPresenceList_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timPresenceList_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timPresenceList_argsTupleSchemeFactory(); - public TimPBeanList pbeanList; // required + public @org.apache.thrift.annotation.Nullable TimPBeanList pbeanList; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { PBEAN_LIST((short)1, "pbeanList"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -7276,6 +8090,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PBEAN_LIST @@ -7291,41 +8106,44 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PBEAN_LIST, new org.apache.thrift.meta_data.FieldMetaData("pbeanList", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimPBeanList.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timPresenceList_args.class, metaDataMap); } @@ -7348,6 +8166,7 @@ public timPresenceList_args(timPresenceList_args other) { } } + @Override public timPresenceList_args deepCopy() { return new timPresenceList_args(this); } @@ -7357,11 +8176,12 @@ public void clear() { this.pbeanList = null; } + @org.apache.thrift.annotation.Nullable public TimPBeanList getPbeanList() { return this.pbeanList; } - public timPresenceList_args setPbeanList(TimPBeanList pbeanList) { + public timPresenceList_args setPbeanList(@org.apache.thrift.annotation.Nullable TimPBeanList pbeanList) { this.pbeanList = pbeanList; return this; } @@ -7381,7 +8201,8 @@ public void setPbeanListIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case PBEAN_LIST: if (value == null) { @@ -7394,32 +8215,33 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case PBEAN_LIST: return getPbeanList(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { case PBEAN_LIST: return isSetPbeanList(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timPresenceList_args) return this.equals((timPresenceList_args)that); return false; @@ -7428,6 +8250,8 @@ public boolean equals(Object that) { public boolean equals(timPresenceList_args that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_pbeanList = true && this.isSetPbeanList(); boolean that_present_pbeanList = true && that.isSetPbeanList(); @@ -7443,14 +8267,13 @@ public boolean equals(timPresenceList_args that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_pbeanList = true && (isSetPbeanList()); - list.add(present_pbeanList); - if (present_pbeanList) - list.add(pbeanList); + hashCode = hashCode * 8191 + ((isSetPbeanList()) ? 131071 : 524287); + if (isSetPbeanList()) + hashCode = hashCode * 8191 + pbeanList.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -7461,7 +8284,7 @@ public int compareTo(timPresenceList_args other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetPbeanList()).compareTo(other.isSetPbeanList()); + lastComparison = java.lang.Boolean.compare(isSetPbeanList(), other.isSetPbeanList()); if (lastComparison != 0) { return lastComparison; } @@ -7474,21 +8297,25 @@ public int compareTo(timPresenceList_args other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timPresenceList_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timPresenceList_args("); boolean first = true; sb.append("pbeanList:"); @@ -7518,7 +8345,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -7526,14 +8353,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timPresenceList_argsStandardSchemeFactory implements SchemeFactory { + private static class timPresenceList_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timPresenceList_argsStandardScheme getScheme() { return new timPresenceList_argsStandardScheme(); } } - private static class timPresenceList_argsStandardScheme extends StandardScheme { + private static class timPresenceList_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timPresenceList_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -7564,6 +8393,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timPresenceList_arg struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timPresenceList_args struct) throws org.apache.thrift.TException { struct.validate(); @@ -7579,18 +8409,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timPresenceList_ar } - private static class timPresenceList_argsTupleSchemeFactory implements SchemeFactory { + private static class timPresenceList_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timPresenceList_argsTupleScheme getScheme() { return new timPresenceList_argsTupleScheme(); } } - private static class timPresenceList_argsTupleScheme extends TupleScheme { + private static class timPresenceList_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timPresenceList_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetPbeanList()) { optionals.set(0); } @@ -7602,8 +8433,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timPresenceList_arg @Override public void read(org.apache.thrift.protocol.TProtocol prot, timPresenceList_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.pbeanList = new TimPBeanList(); struct.pbeanList.read(iprot); @@ -7612,32 +8443,33 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timPresenceList_args } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timMessageIq_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timMessageIq_args"); private static final org.apache.thrift.protocol.TField TIM_MSG_IQ_FIELD_DESC = new org.apache.thrift.protocol.TField("timMsgIq", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField IQ_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("iqType", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timMessageIq_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timMessageIq_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timMessageIq_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timMessageIq_argsTupleSchemeFactory(); - public TimMessageIq timMsgIq; // required - public String iqType; // required + public @org.apache.thrift.annotation.Nullable TimMessageIq timMsgIq; // required + public @org.apache.thrift.annotation.Nullable java.lang.String iqType; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { TIM_MSG_IQ((short)1, "timMsgIq"), IQ_TYPE((short)2, "iqType"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -7645,6 +8477,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TIM_MSG_IQ @@ -7662,43 +8495,46 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TIM_MSG_IQ, new org.apache.thrift.meta_data.FieldMetaData("timMsgIq", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimMessageIq.class))); tmpMap.put(_Fields.IQ_TYPE, new org.apache.thrift.meta_data.FieldMetaData("iqType", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timMessageIq_args.class, metaDataMap); } @@ -7707,7 +8543,7 @@ public timMessageIq_args() { public timMessageIq_args( TimMessageIq timMsgIq, - String iqType) + java.lang.String iqType) { this(); this.timMsgIq = timMsgIq; @@ -7726,6 +8562,7 @@ public timMessageIq_args(timMessageIq_args other) { } } + @Override public timMessageIq_args deepCopy() { return new timMessageIq_args(this); } @@ -7736,11 +8573,12 @@ public void clear() { this.iqType = null; } + @org.apache.thrift.annotation.Nullable public TimMessageIq getTimMsgIq() { return this.timMsgIq; } - public timMessageIq_args setTimMsgIq(TimMessageIq timMsgIq) { + public timMessageIq_args setTimMsgIq(@org.apache.thrift.annotation.Nullable TimMessageIq timMsgIq) { this.timMsgIq = timMsgIq; return this; } @@ -7760,11 +8598,12 @@ public void setTimMsgIqIsSet(boolean value) { } } - public String getIqType() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getIqType() { return this.iqType; } - public timMessageIq_args setIqType(String iqType) { + public timMessageIq_args setIqType(@org.apache.thrift.annotation.Nullable java.lang.String iqType) { this.iqType = iqType; return this; } @@ -7784,7 +8623,8 @@ public void setIqTypeIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case TIM_MSG_IQ: if (value == null) { @@ -7798,14 +8638,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetIqType(); } else { - setIqType((String)value); + setIqType((java.lang.String)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TIM_MSG_IQ: return getTimMsgIq(); @@ -7814,13 +8656,14 @@ public Object getFieldValue(_Fields field) { return getIqType(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -7829,13 +8672,11 @@ public boolean isSet(_Fields field) { case IQ_TYPE: return isSetIqType(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timMessageIq_args) return this.equals((timMessageIq_args)that); return false; @@ -7844,6 +8685,8 @@ public boolean equals(Object that) { public boolean equals(timMessageIq_args that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_timMsgIq = true && this.isSetTimMsgIq(); boolean that_present_timMsgIq = true && that.isSetTimMsgIq(); @@ -7868,19 +8711,17 @@ public boolean equals(timMessageIq_args that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_timMsgIq = true && (isSetTimMsgIq()); - list.add(present_timMsgIq); - if (present_timMsgIq) - list.add(timMsgIq); + hashCode = hashCode * 8191 + ((isSetTimMsgIq()) ? 131071 : 524287); + if (isSetTimMsgIq()) + hashCode = hashCode * 8191 + timMsgIq.hashCode(); - boolean present_iqType = true && (isSetIqType()); - list.add(present_iqType); - if (present_iqType) - list.add(iqType); + hashCode = hashCode * 8191 + ((isSetIqType()) ? 131071 : 524287); + if (isSetIqType()) + hashCode = hashCode * 8191 + iqType.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -7891,7 +8732,7 @@ public int compareTo(timMessageIq_args other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTimMsgIq()).compareTo(other.isSetTimMsgIq()); + lastComparison = java.lang.Boolean.compare(isSetTimMsgIq(), other.isSetTimMsgIq()); if (lastComparison != 0) { return lastComparison; } @@ -7901,7 +8742,7 @@ public int compareTo(timMessageIq_args other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetIqType()).compareTo(other.isSetIqType()); + lastComparison = java.lang.Boolean.compare(isSetIqType(), other.isSetIqType()); if (lastComparison != 0) { return lastComparison; } @@ -7914,21 +8755,25 @@ public int compareTo(timMessageIq_args other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timMessageIq_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timMessageIq_args("); boolean first = true; sb.append("timMsgIq:"); @@ -7966,7 +8811,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -7974,14 +8819,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timMessageIq_argsStandardSchemeFactory implements SchemeFactory { + private static class timMessageIq_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timMessageIq_argsStandardScheme getScheme() { return new timMessageIq_argsStandardScheme(); } } - private static class timMessageIq_argsStandardScheme extends StandardScheme { + private static class timMessageIq_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timMessageIq_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -8020,6 +8867,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timMessageIq_args s struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timMessageIq_args struct) throws org.apache.thrift.TException { struct.validate(); @@ -8040,18 +8888,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timMessageIq_args } - private static class timMessageIq_argsTupleSchemeFactory implements SchemeFactory { + private static class timMessageIq_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timMessageIq_argsTupleScheme getScheme() { return new timMessageIq_argsTupleScheme(); } } - private static class timMessageIq_argsTupleScheme extends TupleScheme { + private static class timMessageIq_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timMessageIq_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetTimMsgIq()) { optionals.set(0); } @@ -8069,8 +8918,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timMessageIq_args s @Override public void read(org.apache.thrift.protocol.TProtocol prot, timMessageIq_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.timMsgIq = new TimMessageIq(); struct.timMsgIq.read(iprot); @@ -8083,29 +8932,30 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timMessageIq_args st } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timMessageResult_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timMessageResult_args"); private static final org.apache.thrift.protocol.TField MBEAN_FIELD_DESC = new org.apache.thrift.protocol.TField("mbean", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timMessageResult_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timMessageResult_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timMessageResult_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timMessageResult_argsTupleSchemeFactory(); - public TimMBean mbean; // required + public @org.apache.thrift.annotation.Nullable TimMBean mbean; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { MBEAN((short)1, "mbean"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -8113,6 +8963,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // MBEAN @@ -8128,41 +8979,44 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.MBEAN, new org.apache.thrift.meta_data.FieldMetaData("mbean", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimMBean.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timMessageResult_args.class, metaDataMap); } @@ -8185,6 +9039,7 @@ public timMessageResult_args(timMessageResult_args other) { } } + @Override public timMessageResult_args deepCopy() { return new timMessageResult_args(this); } @@ -8194,11 +9049,12 @@ public void clear() { this.mbean = null; } + @org.apache.thrift.annotation.Nullable public TimMBean getMbean() { return this.mbean; } - public timMessageResult_args setMbean(TimMBean mbean) { + public timMessageResult_args setMbean(@org.apache.thrift.annotation.Nullable TimMBean mbean) { this.mbean = mbean; return this; } @@ -8218,7 +9074,8 @@ public void setMbeanIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case MBEAN: if (value == null) { @@ -8231,32 +9088,33 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case MBEAN: return getMbean(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { case MBEAN: return isSetMbean(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timMessageResult_args) return this.equals((timMessageResult_args)that); return false; @@ -8265,6 +9123,8 @@ public boolean equals(Object that) { public boolean equals(timMessageResult_args that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_mbean = true && this.isSetMbean(); boolean that_present_mbean = true && that.isSetMbean(); @@ -8280,14 +9140,13 @@ public boolean equals(timMessageResult_args that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_mbean = true && (isSetMbean()); - list.add(present_mbean); - if (present_mbean) - list.add(mbean); + hashCode = hashCode * 8191 + ((isSetMbean()) ? 131071 : 524287); + if (isSetMbean()) + hashCode = hashCode * 8191 + mbean.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -8298,7 +9157,7 @@ public int compareTo(timMessageResult_args other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetMbean()).compareTo(other.isSetMbean()); + lastComparison = java.lang.Boolean.compare(isSetMbean(), other.isSetMbean()); if (lastComparison != 0) { return lastComparison; } @@ -8311,21 +9170,25 @@ public int compareTo(timMessageResult_args other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timMessageResult_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timMessageResult_args("); boolean first = true; sb.append("mbean:"); @@ -8355,7 +9218,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -8363,14 +9226,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timMessageResult_argsStandardSchemeFactory implements SchemeFactory { + private static class timMessageResult_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timMessageResult_argsStandardScheme getScheme() { return new timMessageResult_argsStandardScheme(); } } - private static class timMessageResult_argsStandardScheme extends StandardScheme { + private static class timMessageResult_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timMessageResult_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -8401,6 +9266,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timMessageResult_ar struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timMessageResult_args struct) throws org.apache.thrift.TException { struct.validate(); @@ -8416,18 +9282,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timMessageResult_a } - private static class timMessageResult_argsTupleSchemeFactory implements SchemeFactory { + private static class timMessageResult_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timMessageResult_argsTupleScheme getScheme() { return new timMessageResult_argsTupleScheme(); } } - private static class timMessageResult_argsTupleScheme extends TupleScheme { + private static class timMessageResult_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timMessageResult_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetMbean()) { optionals.set(0); } @@ -8439,8 +9306,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timMessageResult_ar @Override public void read(org.apache.thrift.protocol.TProtocol prot, timMessageResult_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.mbean = new TimMBean(); struct.mbean.read(iprot); @@ -8449,29 +9316,30 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timMessageResult_arg } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timProperty_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timProperty_args"); private static final org.apache.thrift.protocol.TField TPB_FIELD_DESC = new org.apache.thrift.protocol.TField("tpb", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timProperty_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timProperty_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timProperty_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timProperty_argsTupleSchemeFactory(); - public TimPropertyBean tpb; // required + public @org.apache.thrift.annotation.Nullable TimPropertyBean tpb; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { TPB((short)1, "tpb"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -8479,6 +9347,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TPB @@ -8494,41 +9363,44 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TPB, new org.apache.thrift.meta_data.FieldMetaData("tpb", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimPropertyBean.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timProperty_args.class, metaDataMap); } @@ -8551,6 +9423,7 @@ public timProperty_args(timProperty_args other) { } } + @Override public timProperty_args deepCopy() { return new timProperty_args(this); } @@ -8560,11 +9433,12 @@ public void clear() { this.tpb = null; } + @org.apache.thrift.annotation.Nullable public TimPropertyBean getTpb() { return this.tpb; } - public timProperty_args setTpb(TimPropertyBean tpb) { + public timProperty_args setTpb(@org.apache.thrift.annotation.Nullable TimPropertyBean tpb) { this.tpb = tpb; return this; } @@ -8584,7 +9458,8 @@ public void setTpbIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case TPB: if (value == null) { @@ -8597,32 +9472,33 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TPB: return getTpb(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { case TPB: return isSetTpb(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timProperty_args) return this.equals((timProperty_args)that); return false; @@ -8631,6 +9507,8 @@ public boolean equals(Object that) { public boolean equals(timProperty_args that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_tpb = true && this.isSetTpb(); boolean that_present_tpb = true && that.isSetTpb(); @@ -8646,14 +9524,13 @@ public boolean equals(timProperty_args that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_tpb = true && (isSetTpb()); - list.add(present_tpb); - if (present_tpb) - list.add(tpb); + hashCode = hashCode * 8191 + ((isSetTpb()) ? 131071 : 524287); + if (isSetTpb()) + hashCode = hashCode * 8191 + tpb.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -8664,7 +9541,7 @@ public int compareTo(timProperty_args other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTpb()).compareTo(other.isSetTpb()); + lastComparison = java.lang.Boolean.compare(isSetTpb(), other.isSetTpb()); if (lastComparison != 0) { return lastComparison; } @@ -8677,21 +9554,25 @@ public int compareTo(timProperty_args other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timProperty_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timProperty_args("); boolean first = true; sb.append("tpb:"); @@ -8721,7 +9602,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -8729,14 +9610,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timProperty_argsStandardSchemeFactory implements SchemeFactory { + private static class timProperty_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timProperty_argsStandardScheme getScheme() { return new timProperty_argsStandardScheme(); } } - private static class timProperty_argsStandardScheme extends StandardScheme { + private static class timProperty_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timProperty_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -8767,6 +9650,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timProperty_args st struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timProperty_args struct) throws org.apache.thrift.TException { struct.validate(); @@ -8782,18 +9666,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timProperty_args s } - private static class timProperty_argsTupleSchemeFactory implements SchemeFactory { + private static class timProperty_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timProperty_argsTupleScheme getScheme() { return new timProperty_argsTupleScheme(); } } - private static class timProperty_argsTupleScheme extends TupleScheme { + private static class timProperty_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timProperty_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetTpb()) { optionals.set(0); } @@ -8805,8 +9690,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timProperty_args st @Override public void read(org.apache.thrift.protocol.TProtocol prot, timProperty_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.tpb = new TimPropertyBean(); struct.tpb.read(iprot); @@ -8815,8 +9700,12 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timProperty_args str } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timRemoteUserAuth_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timRemoteUserAuth_args"); @@ -8824,15 +9713,12 @@ public static class timRemoteUserAuth_args implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timRemoteUserAuth_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timRemoteUserAuth_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timRemoteUserAuth_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timRemoteUserAuth_argsTupleSchemeFactory(); - public Tid tid; // required - public String pwd; // required - public TimAuth auth; // required + public @org.apache.thrift.annotation.Nullable Tid tid; // required + public @org.apache.thrift.annotation.Nullable java.lang.String pwd; // required + public @org.apache.thrift.annotation.Nullable TimAuth auth; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -8840,10 +9726,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { PWD((short)2, "pwd"), AUTH((short)3, "auth"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -8851,6 +9737,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TID @@ -8870,45 +9757,48 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TID, new org.apache.thrift.meta_data.FieldMetaData("tid", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Tid.class))); tmpMap.put(_Fields.PWD, new org.apache.thrift.meta_data.FieldMetaData("pwd", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.AUTH, new org.apache.thrift.meta_data.FieldMetaData("auth", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimAuth.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timRemoteUserAuth_args.class, metaDataMap); } @@ -8917,7 +9807,7 @@ public timRemoteUserAuth_args() { public timRemoteUserAuth_args( Tid tid, - String pwd, + java.lang.String pwd, TimAuth auth) { this(); @@ -8941,6 +9831,7 @@ public timRemoteUserAuth_args(timRemoteUserAuth_args other) { } } + @Override public timRemoteUserAuth_args deepCopy() { return new timRemoteUserAuth_args(this); } @@ -8952,11 +9843,12 @@ public void clear() { this.auth = null; } + @org.apache.thrift.annotation.Nullable public Tid getTid() { return this.tid; } - public timRemoteUserAuth_args setTid(Tid tid) { + public timRemoteUserAuth_args setTid(@org.apache.thrift.annotation.Nullable Tid tid) { this.tid = tid; return this; } @@ -8976,11 +9868,12 @@ public void setTidIsSet(boolean value) { } } - public String getPwd() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getPwd() { return this.pwd; } - public timRemoteUserAuth_args setPwd(String pwd) { + public timRemoteUserAuth_args setPwd(@org.apache.thrift.annotation.Nullable java.lang.String pwd) { this.pwd = pwd; return this; } @@ -9000,11 +9893,12 @@ public void setPwdIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public TimAuth getAuth() { return this.auth; } - public timRemoteUserAuth_args setAuth(TimAuth auth) { + public timRemoteUserAuth_args setAuth(@org.apache.thrift.annotation.Nullable TimAuth auth) { this.auth = auth; return this; } @@ -9024,7 +9918,8 @@ public void setAuthIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case TID: if (value == null) { @@ -9038,7 +9933,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetPwd(); } else { - setPwd((String)value); + setPwd((java.lang.String)value); } break; @@ -9053,7 +9948,9 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TID: return getTid(); @@ -9065,13 +9962,14 @@ public Object getFieldValue(_Fields field) { return getAuth(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -9082,13 +9980,11 @@ public boolean isSet(_Fields field) { case AUTH: return isSetAuth(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timRemoteUserAuth_args) return this.equals((timRemoteUserAuth_args)that); return false; @@ -9097,6 +9993,8 @@ public boolean equals(Object that) { public boolean equals(timRemoteUserAuth_args that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_tid = true && this.isSetTid(); boolean that_present_tid = true && that.isSetTid(); @@ -9130,24 +10028,21 @@ public boolean equals(timRemoteUserAuth_args that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_tid = true && (isSetTid()); - list.add(present_tid); - if (present_tid) - list.add(tid); + hashCode = hashCode * 8191 + ((isSetTid()) ? 131071 : 524287); + if (isSetTid()) + hashCode = hashCode * 8191 + tid.hashCode(); - boolean present_pwd = true && (isSetPwd()); - list.add(present_pwd); - if (present_pwd) - list.add(pwd); + hashCode = hashCode * 8191 + ((isSetPwd()) ? 131071 : 524287); + if (isSetPwd()) + hashCode = hashCode * 8191 + pwd.hashCode(); - boolean present_auth = true && (isSetAuth()); - list.add(present_auth); - if (present_auth) - list.add(auth); + hashCode = hashCode * 8191 + ((isSetAuth()) ? 131071 : 524287); + if (isSetAuth()) + hashCode = hashCode * 8191 + auth.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -9158,7 +10053,7 @@ public int compareTo(timRemoteUserAuth_args other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTid()).compareTo(other.isSetTid()); + lastComparison = java.lang.Boolean.compare(isSetTid(), other.isSetTid()); if (lastComparison != 0) { return lastComparison; } @@ -9168,7 +10063,7 @@ public int compareTo(timRemoteUserAuth_args other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPwd()).compareTo(other.isSetPwd()); + lastComparison = java.lang.Boolean.compare(isSetPwd(), other.isSetPwd()); if (lastComparison != 0) { return lastComparison; } @@ -9178,7 +10073,7 @@ public int compareTo(timRemoteUserAuth_args other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetAuth()).compareTo(other.isSetAuth()); + lastComparison = java.lang.Boolean.compare(isSetAuth(), other.isSetAuth()); if (lastComparison != 0) { return lastComparison; } @@ -9191,21 +10086,25 @@ public int compareTo(timRemoteUserAuth_args other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timRemoteUserAuth_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timRemoteUserAuth_args("); boolean first = true; sb.append("tid:"); @@ -9254,7 +10153,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -9262,14 +10161,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timRemoteUserAuth_argsStandardSchemeFactory implements SchemeFactory { + private static class timRemoteUserAuth_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timRemoteUserAuth_argsStandardScheme getScheme() { return new timRemoteUserAuth_argsStandardScheme(); } } - private static class timRemoteUserAuth_argsStandardScheme extends StandardScheme { + private static class timRemoteUserAuth_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timRemoteUserAuth_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -9317,6 +10218,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timRemoteUserAuth_a struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timRemoteUserAuth_args struct) throws org.apache.thrift.TException { struct.validate(); @@ -9342,18 +10244,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timRemoteUserAuth_ } - private static class timRemoteUserAuth_argsTupleSchemeFactory implements SchemeFactory { + private static class timRemoteUserAuth_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timRemoteUserAuth_argsTupleScheme getScheme() { return new timRemoteUserAuth_argsTupleScheme(); } } - private static class timRemoteUserAuth_argsTupleScheme extends TupleScheme { + private static class timRemoteUserAuth_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timRemoteUserAuth_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetTid()) { optionals.set(0); } @@ -9377,8 +10280,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timRemoteUserAuth_a @Override public void read(org.apache.thrift.protocol.TProtocol prot, timRemoteUserAuth_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.tid = new Tid(); struct.tid.read(iprot); @@ -9396,29 +10299,30 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timRemoteUserAuth_ar } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timRemoteUserAuth_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timRemoteUserAuth_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timRemoteUserAuth_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timRemoteUserAuth_resultTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timRemoteUserAuth_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timRemoteUserAuth_resultTupleSchemeFactory(); - public TimRemoteUserBean success; // required + public @org.apache.thrift.annotation.Nullable TimRemoteUserBean success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -9426,6 +10330,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS @@ -9441,41 +10346,44 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimRemoteUserBean.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timRemoteUserAuth_result.class, metaDataMap); } @@ -9498,6 +10406,7 @@ public timRemoteUserAuth_result(timRemoteUserAuth_result other) { } } + @Override public timRemoteUserAuth_result deepCopy() { return new timRemoteUserAuth_result(this); } @@ -9507,11 +10416,12 @@ public void clear() { this.success = null; } + @org.apache.thrift.annotation.Nullable public TimRemoteUserBean getSuccess() { return this.success; } - public timRemoteUserAuth_result setSuccess(TimRemoteUserBean success) { + public timRemoteUserAuth_result setSuccess(@org.apache.thrift.annotation.Nullable TimRemoteUserBean success) { this.success = success; return this; } @@ -9531,7 +10441,8 @@ public void setSuccessIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { @@ -9544,32 +10455,33 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timRemoteUserAuth_result) return this.equals((timRemoteUserAuth_result)that); return false; @@ -9578,6 +10490,8 @@ public boolean equals(Object that) { public boolean equals(timRemoteUserAuth_result that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); @@ -9593,14 +10507,13 @@ public boolean equals(timRemoteUserAuth_result that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -9611,7 +10524,7 @@ public int compareTo(timRemoteUserAuth_result other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } @@ -9624,21 +10537,24 @@ public int compareTo(timRemoteUserAuth_result other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timRemoteUserAuth_result("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timRemoteUserAuth_result("); boolean first = true; sb.append("success:"); @@ -9668,7 +10584,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -9676,14 +10592,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timRemoteUserAuth_resultStandardSchemeFactory implements SchemeFactory { + private static class timRemoteUserAuth_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timRemoteUserAuth_resultStandardScheme getScheme() { return new timRemoteUserAuth_resultStandardScheme(); } } - private static class timRemoteUserAuth_resultStandardScheme extends StandardScheme { + private static class timRemoteUserAuth_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timRemoteUserAuth_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -9714,6 +10632,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timRemoteUserAuth_r struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timRemoteUserAuth_result struct) throws org.apache.thrift.TException { struct.validate(); @@ -9729,18 +10648,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timRemoteUserAuth_ } - private static class timRemoteUserAuth_resultTupleSchemeFactory implements SchemeFactory { + private static class timRemoteUserAuth_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timRemoteUserAuth_resultTupleScheme getScheme() { return new timRemoteUserAuth_resultTupleScheme(); } } - private static class timRemoteUserAuth_resultTupleScheme extends TupleScheme { + private static class timRemoteUserAuth_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timRemoteUserAuth_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } @@ -9752,8 +10672,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timRemoteUserAuth_r @Override public void read(org.apache.thrift.protocol.TProtocol prot, timRemoteUserAuth_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new TimRemoteUserBean(); struct.success.read(iprot); @@ -9762,32 +10682,33 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timRemoteUserAuth_re } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timRemoteUserGet_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timRemoteUserGet_args"); private static final org.apache.thrift.protocol.TField TID_FIELD_DESC = new org.apache.thrift.protocol.TField("tid", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField AUTH_FIELD_DESC = new org.apache.thrift.protocol.TField("auth", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timRemoteUserGet_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timRemoteUserGet_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timRemoteUserGet_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timRemoteUserGet_argsTupleSchemeFactory(); - public Tid tid; // required - public TimAuth auth; // required + public @org.apache.thrift.annotation.Nullable Tid tid; // required + public @org.apache.thrift.annotation.Nullable TimAuth auth; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { TID((short)1, "tid"), AUTH((short)2, "auth"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -9795,6 +10716,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TID @@ -9812,43 +10734,46 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TID, new org.apache.thrift.meta_data.FieldMetaData("tid", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Tid.class))); tmpMap.put(_Fields.AUTH, new org.apache.thrift.meta_data.FieldMetaData("auth", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimAuth.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timRemoteUserGet_args.class, metaDataMap); } @@ -9876,6 +10801,7 @@ public timRemoteUserGet_args(timRemoteUserGet_args other) { } } + @Override public timRemoteUserGet_args deepCopy() { return new timRemoteUserGet_args(this); } @@ -9886,11 +10812,12 @@ public void clear() { this.auth = null; } + @org.apache.thrift.annotation.Nullable public Tid getTid() { return this.tid; } - public timRemoteUserGet_args setTid(Tid tid) { + public timRemoteUserGet_args setTid(@org.apache.thrift.annotation.Nullable Tid tid) { this.tid = tid; return this; } @@ -9910,11 +10837,12 @@ public void setTidIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public TimAuth getAuth() { return this.auth; } - public timRemoteUserGet_args setAuth(TimAuth auth) { + public timRemoteUserGet_args setAuth(@org.apache.thrift.annotation.Nullable TimAuth auth) { this.auth = auth; return this; } @@ -9934,7 +10862,8 @@ public void setAuthIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case TID: if (value == null) { @@ -9955,7 +10884,9 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TID: return getTid(); @@ -9964,13 +10895,14 @@ public Object getFieldValue(_Fields field) { return getAuth(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -9979,13 +10911,11 @@ public boolean isSet(_Fields field) { case AUTH: return isSetAuth(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timRemoteUserGet_args) return this.equals((timRemoteUserGet_args)that); return false; @@ -9994,6 +10924,8 @@ public boolean equals(Object that) { public boolean equals(timRemoteUserGet_args that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_tid = true && this.isSetTid(); boolean that_present_tid = true && that.isSetTid(); @@ -10018,19 +10950,17 @@ public boolean equals(timRemoteUserGet_args that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_tid = true && (isSetTid()); - list.add(present_tid); - if (present_tid) - list.add(tid); + hashCode = hashCode * 8191 + ((isSetTid()) ? 131071 : 524287); + if (isSetTid()) + hashCode = hashCode * 8191 + tid.hashCode(); - boolean present_auth = true && (isSetAuth()); - list.add(present_auth); - if (present_auth) - list.add(auth); + hashCode = hashCode * 8191 + ((isSetAuth()) ? 131071 : 524287); + if (isSetAuth()) + hashCode = hashCode * 8191 + auth.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -10041,7 +10971,7 @@ public int compareTo(timRemoteUserGet_args other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTid()).compareTo(other.isSetTid()); + lastComparison = java.lang.Boolean.compare(isSetTid(), other.isSetTid()); if (lastComparison != 0) { return lastComparison; } @@ -10051,7 +10981,7 @@ public int compareTo(timRemoteUserGet_args other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetAuth()).compareTo(other.isSetAuth()); + lastComparison = java.lang.Boolean.compare(isSetAuth(), other.isSetAuth()); if (lastComparison != 0) { return lastComparison; } @@ -10064,21 +10994,25 @@ public int compareTo(timRemoteUserGet_args other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timRemoteUserGet_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timRemoteUserGet_args("); boolean first = true; sb.append("tid:"); @@ -10119,7 +11053,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -10127,14 +11061,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timRemoteUserGet_argsStandardSchemeFactory implements SchemeFactory { + private static class timRemoteUserGet_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timRemoteUserGet_argsStandardScheme getScheme() { return new timRemoteUserGet_argsStandardScheme(); } } - private static class timRemoteUserGet_argsStandardScheme extends StandardScheme { + private static class timRemoteUserGet_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timRemoteUserGet_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -10174,6 +11110,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timRemoteUserGet_ar struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timRemoteUserGet_args struct) throws org.apache.thrift.TException { struct.validate(); @@ -10194,18 +11131,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timRemoteUserGet_a } - private static class timRemoteUserGet_argsTupleSchemeFactory implements SchemeFactory { + private static class timRemoteUserGet_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timRemoteUserGet_argsTupleScheme getScheme() { return new timRemoteUserGet_argsTupleScheme(); } } - private static class timRemoteUserGet_argsTupleScheme extends TupleScheme { + private static class timRemoteUserGet_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timRemoteUserGet_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetTid()) { optionals.set(0); } @@ -10223,8 +11161,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timRemoteUserGet_ar @Override public void read(org.apache.thrift.protocol.TProtocol prot, timRemoteUserGet_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.tid = new Tid(); struct.tid.read(iprot); @@ -10238,29 +11176,30 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timRemoteUserGet_arg } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timRemoteUserGet_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timRemoteUserGet_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timRemoteUserGet_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timRemoteUserGet_resultTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timRemoteUserGet_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timRemoteUserGet_resultTupleSchemeFactory(); - public TimRemoteUserBean success; // required + public @org.apache.thrift.annotation.Nullable TimRemoteUserBean success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -10268,6 +11207,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS @@ -10283,41 +11223,44 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimRemoteUserBean.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timRemoteUserGet_result.class, metaDataMap); } @@ -10340,6 +11283,7 @@ public timRemoteUserGet_result(timRemoteUserGet_result other) { } } + @Override public timRemoteUserGet_result deepCopy() { return new timRemoteUserGet_result(this); } @@ -10349,11 +11293,12 @@ public void clear() { this.success = null; } + @org.apache.thrift.annotation.Nullable public TimRemoteUserBean getSuccess() { return this.success; } - public timRemoteUserGet_result setSuccess(TimRemoteUserBean success) { + public timRemoteUserGet_result setSuccess(@org.apache.thrift.annotation.Nullable TimRemoteUserBean success) { this.success = success; return this; } @@ -10373,7 +11318,8 @@ public void setSuccessIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { @@ -10386,32 +11332,33 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timRemoteUserGet_result) return this.equals((timRemoteUserGet_result)that); return false; @@ -10420,6 +11367,8 @@ public boolean equals(Object that) { public boolean equals(timRemoteUserGet_result that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); @@ -10435,14 +11384,13 @@ public boolean equals(timRemoteUserGet_result that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -10453,7 +11401,7 @@ public int compareTo(timRemoteUserGet_result other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } @@ -10466,21 +11414,24 @@ public int compareTo(timRemoteUserGet_result other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timRemoteUserGet_result("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timRemoteUserGet_result("); boolean first = true; sb.append("success:"); @@ -10510,7 +11461,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -10518,14 +11469,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timRemoteUserGet_resultStandardSchemeFactory implements SchemeFactory { + private static class timRemoteUserGet_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timRemoteUserGet_resultStandardScheme getScheme() { return new timRemoteUserGet_resultStandardScheme(); } } - private static class timRemoteUserGet_resultStandardScheme extends StandardScheme { + private static class timRemoteUserGet_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timRemoteUserGet_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -10556,6 +11509,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timRemoteUserGet_re struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timRemoteUserGet_result struct) throws org.apache.thrift.TException { struct.validate(); @@ -10571,18 +11525,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timRemoteUserGet_r } - private static class timRemoteUserGet_resultTupleSchemeFactory implements SchemeFactory { + private static class timRemoteUserGet_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timRemoteUserGet_resultTupleScheme getScheme() { return new timRemoteUserGet_resultTupleScheme(); } } - private static class timRemoteUserGet_resultTupleScheme extends TupleScheme { + private static class timRemoteUserGet_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timRemoteUserGet_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } @@ -10594,8 +11549,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timRemoteUserGet_re @Override public void read(org.apache.thrift.protocol.TProtocol prot, timRemoteUserGet_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new TimRemoteUserBean(); struct.success.read(iprot); @@ -10604,8 +11559,12 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timRemoteUserGet_res } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timRemoteUserEdit_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timRemoteUserEdit_args"); @@ -10613,15 +11572,12 @@ public static class timRemoteUserEdit_args implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timRemoteUserEdit_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timRemoteUserEdit_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timRemoteUserEdit_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timRemoteUserEdit_argsTupleSchemeFactory(); - public Tid tid; // required - public TimUserBean ub; // required - public TimAuth auth; // required + public @org.apache.thrift.annotation.Nullable Tid tid; // required + public @org.apache.thrift.annotation.Nullable TimUserBean ub; // required + public @org.apache.thrift.annotation.Nullable TimAuth auth; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -10629,10 +11585,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { UB((short)2, "ub"), AUTH((short)3, "auth"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -10640,6 +11596,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TID @@ -10659,45 +11616,48 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TID, new org.apache.thrift.meta_data.FieldMetaData("tid", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Tid.class))); tmpMap.put(_Fields.UB, new org.apache.thrift.meta_data.FieldMetaData("ub", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimUserBean.class))); tmpMap.put(_Fields.AUTH, new org.apache.thrift.meta_data.FieldMetaData("auth", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimAuth.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timRemoteUserEdit_args.class, metaDataMap); } @@ -10730,6 +11690,7 @@ public timRemoteUserEdit_args(timRemoteUserEdit_args other) { } } + @Override public timRemoteUserEdit_args deepCopy() { return new timRemoteUserEdit_args(this); } @@ -10741,11 +11702,12 @@ public void clear() { this.auth = null; } + @org.apache.thrift.annotation.Nullable public Tid getTid() { return this.tid; } - public timRemoteUserEdit_args setTid(Tid tid) { + public timRemoteUserEdit_args setTid(@org.apache.thrift.annotation.Nullable Tid tid) { this.tid = tid; return this; } @@ -10765,11 +11727,12 @@ public void setTidIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public TimUserBean getUb() { return this.ub; } - public timRemoteUserEdit_args setUb(TimUserBean ub) { + public timRemoteUserEdit_args setUb(@org.apache.thrift.annotation.Nullable TimUserBean ub) { this.ub = ub; return this; } @@ -10789,11 +11752,12 @@ public void setUbIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public TimAuth getAuth() { return this.auth; } - public timRemoteUserEdit_args setAuth(TimAuth auth) { + public timRemoteUserEdit_args setAuth(@org.apache.thrift.annotation.Nullable TimAuth auth) { this.auth = auth; return this; } @@ -10813,7 +11777,8 @@ public void setAuthIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case TID: if (value == null) { @@ -10842,7 +11807,9 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TID: return getTid(); @@ -10854,13 +11821,14 @@ public Object getFieldValue(_Fields field) { return getAuth(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -10871,13 +11839,11 @@ public boolean isSet(_Fields field) { case AUTH: return isSetAuth(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timRemoteUserEdit_args) return this.equals((timRemoteUserEdit_args)that); return false; @@ -10886,6 +11852,8 @@ public boolean equals(Object that) { public boolean equals(timRemoteUserEdit_args that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_tid = true && this.isSetTid(); boolean that_present_tid = true && that.isSetTid(); @@ -10919,24 +11887,21 @@ public boolean equals(timRemoteUserEdit_args that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_tid = true && (isSetTid()); - list.add(present_tid); - if (present_tid) - list.add(tid); + hashCode = hashCode * 8191 + ((isSetTid()) ? 131071 : 524287); + if (isSetTid()) + hashCode = hashCode * 8191 + tid.hashCode(); - boolean present_ub = true && (isSetUb()); - list.add(present_ub); - if (present_ub) - list.add(ub); + hashCode = hashCode * 8191 + ((isSetUb()) ? 131071 : 524287); + if (isSetUb()) + hashCode = hashCode * 8191 + ub.hashCode(); - boolean present_auth = true && (isSetAuth()); - list.add(present_auth); - if (present_auth) - list.add(auth); + hashCode = hashCode * 8191 + ((isSetAuth()) ? 131071 : 524287); + if (isSetAuth()) + hashCode = hashCode * 8191 + auth.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -10947,7 +11912,7 @@ public int compareTo(timRemoteUserEdit_args other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTid()).compareTo(other.isSetTid()); + lastComparison = java.lang.Boolean.compare(isSetTid(), other.isSetTid()); if (lastComparison != 0) { return lastComparison; } @@ -10957,7 +11922,7 @@ public int compareTo(timRemoteUserEdit_args other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetUb()).compareTo(other.isSetUb()); + lastComparison = java.lang.Boolean.compare(isSetUb(), other.isSetUb()); if (lastComparison != 0) { return lastComparison; } @@ -10967,7 +11932,7 @@ public int compareTo(timRemoteUserEdit_args other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetAuth()).compareTo(other.isSetAuth()); + lastComparison = java.lang.Boolean.compare(isSetAuth(), other.isSetAuth()); if (lastComparison != 0) { return lastComparison; } @@ -10980,21 +11945,25 @@ public int compareTo(timRemoteUserEdit_args other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timRemoteUserEdit_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timRemoteUserEdit_args("); boolean first = true; sb.append("tid:"); @@ -11046,7 +12015,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -11054,14 +12023,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timRemoteUserEdit_argsStandardSchemeFactory implements SchemeFactory { + private static class timRemoteUserEdit_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timRemoteUserEdit_argsStandardScheme getScheme() { return new timRemoteUserEdit_argsStandardScheme(); } } - private static class timRemoteUserEdit_argsStandardScheme extends StandardScheme { + private static class timRemoteUserEdit_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timRemoteUserEdit_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -11110,6 +12081,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timRemoteUserEdit_a struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timRemoteUserEdit_args struct) throws org.apache.thrift.TException { struct.validate(); @@ -11135,18 +12107,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timRemoteUserEdit_ } - private static class timRemoteUserEdit_argsTupleSchemeFactory implements SchemeFactory { + private static class timRemoteUserEdit_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timRemoteUserEdit_argsTupleScheme getScheme() { return new timRemoteUserEdit_argsTupleScheme(); } } - private static class timRemoteUserEdit_argsTupleScheme extends TupleScheme { + private static class timRemoteUserEdit_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timRemoteUserEdit_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetTid()) { optionals.set(0); } @@ -11170,8 +12143,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timRemoteUserEdit_a @Override public void read(org.apache.thrift.protocol.TProtocol prot, timRemoteUserEdit_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.tid = new Tid(); struct.tid.read(iprot); @@ -11190,29 +12163,30 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timRemoteUserEdit_ar } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timRemoteUserEdit_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timRemoteUserEdit_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timRemoteUserEdit_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timRemoteUserEdit_resultTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timRemoteUserEdit_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timRemoteUserEdit_resultTupleSchemeFactory(); - public TimRemoteUserBean success; // required + public @org.apache.thrift.annotation.Nullable TimRemoteUserBean success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -11220,6 +12194,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS @@ -11235,41 +12210,44 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimRemoteUserBean.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timRemoteUserEdit_result.class, metaDataMap); } @@ -11292,6 +12270,7 @@ public timRemoteUserEdit_result(timRemoteUserEdit_result other) { } } + @Override public timRemoteUserEdit_result deepCopy() { return new timRemoteUserEdit_result(this); } @@ -11301,11 +12280,12 @@ public void clear() { this.success = null; } + @org.apache.thrift.annotation.Nullable public TimRemoteUserBean getSuccess() { return this.success; } - public timRemoteUserEdit_result setSuccess(TimRemoteUserBean success) { + public timRemoteUserEdit_result setSuccess(@org.apache.thrift.annotation.Nullable TimRemoteUserBean success) { this.success = success; return this; } @@ -11325,7 +12305,8 @@ public void setSuccessIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { @@ -11338,32 +12319,33 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timRemoteUserEdit_result) return this.equals((timRemoteUserEdit_result)that); return false; @@ -11372,6 +12354,8 @@ public boolean equals(Object that) { public boolean equals(timRemoteUserEdit_result that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); @@ -11387,14 +12371,13 @@ public boolean equals(timRemoteUserEdit_result that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -11405,7 +12388,7 @@ public int compareTo(timRemoteUserEdit_result other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } @@ -11418,21 +12401,24 @@ public int compareTo(timRemoteUserEdit_result other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timRemoteUserEdit_result("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timRemoteUserEdit_result("); boolean first = true; sb.append("success:"); @@ -11462,7 +12448,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -11470,14 +12456,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timRemoteUserEdit_resultStandardSchemeFactory implements SchemeFactory { + private static class timRemoteUserEdit_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timRemoteUserEdit_resultStandardScheme getScheme() { return new timRemoteUserEdit_resultStandardScheme(); } } - private static class timRemoteUserEdit_resultStandardScheme extends StandardScheme { + private static class timRemoteUserEdit_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timRemoteUserEdit_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -11508,6 +12496,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timRemoteUserEdit_r struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timRemoteUserEdit_result struct) throws org.apache.thrift.TException { struct.validate(); @@ -11523,18 +12512,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timRemoteUserEdit_ } - private static class timRemoteUserEdit_resultTupleSchemeFactory implements SchemeFactory { + private static class timRemoteUserEdit_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timRemoteUserEdit_resultTupleScheme getScheme() { return new timRemoteUserEdit_resultTupleScheme(); } } - private static class timRemoteUserEdit_resultTupleScheme extends TupleScheme { + private static class timRemoteUserEdit_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timRemoteUserEdit_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } @@ -11546,8 +12536,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timRemoteUserEdit_r @Override public void read(org.apache.thrift.protocol.TProtocol prot, timRemoteUserEdit_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new TimRemoteUserBean(); struct.success.read(iprot); @@ -11556,32 +12546,33 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timRemoteUserEdit_re } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timResponsePresence_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timResponsePresence_args"); private static final org.apache.thrift.protocol.TField PBEAN_FIELD_DESC = new org.apache.thrift.protocol.TField("pbean", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField AUTH_FIELD_DESC = new org.apache.thrift.protocol.TField("auth", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timResponsePresence_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timResponsePresence_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timResponsePresence_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timResponsePresence_argsTupleSchemeFactory(); - public TimPBean pbean; // required - public TimAuth auth; // required + public @org.apache.thrift.annotation.Nullable TimPBean pbean; // required + public @org.apache.thrift.annotation.Nullable TimAuth auth; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { PBEAN((short)1, "pbean"), AUTH((short)2, "auth"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -11589,6 +12580,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PBEAN @@ -11606,43 +12598,46 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PBEAN, new org.apache.thrift.meta_data.FieldMetaData("pbean", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimPBean.class))); tmpMap.put(_Fields.AUTH, new org.apache.thrift.meta_data.FieldMetaData("auth", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimAuth.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timResponsePresence_args.class, metaDataMap); } @@ -11670,6 +12665,7 @@ public timResponsePresence_args(timResponsePresence_args other) { } } + @Override public timResponsePresence_args deepCopy() { return new timResponsePresence_args(this); } @@ -11680,11 +12676,12 @@ public void clear() { this.auth = null; } + @org.apache.thrift.annotation.Nullable public TimPBean getPbean() { return this.pbean; } - public timResponsePresence_args setPbean(TimPBean pbean) { + public timResponsePresence_args setPbean(@org.apache.thrift.annotation.Nullable TimPBean pbean) { this.pbean = pbean; return this; } @@ -11704,11 +12701,12 @@ public void setPbeanIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public TimAuth getAuth() { return this.auth; } - public timResponsePresence_args setAuth(TimAuth auth) { + public timResponsePresence_args setAuth(@org.apache.thrift.annotation.Nullable TimAuth auth) { this.auth = auth; return this; } @@ -11728,7 +12726,8 @@ public void setAuthIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case PBEAN: if (value == null) { @@ -11749,7 +12748,9 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case PBEAN: return getPbean(); @@ -11758,13 +12759,14 @@ public Object getFieldValue(_Fields field) { return getAuth(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -11773,13 +12775,11 @@ public boolean isSet(_Fields field) { case AUTH: return isSetAuth(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timResponsePresence_args) return this.equals((timResponsePresence_args)that); return false; @@ -11788,6 +12788,8 @@ public boolean equals(Object that) { public boolean equals(timResponsePresence_args that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_pbean = true && this.isSetPbean(); boolean that_present_pbean = true && that.isSetPbean(); @@ -11812,19 +12814,17 @@ public boolean equals(timResponsePresence_args that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_pbean = true && (isSetPbean()); - list.add(present_pbean); - if (present_pbean) - list.add(pbean); + hashCode = hashCode * 8191 + ((isSetPbean()) ? 131071 : 524287); + if (isSetPbean()) + hashCode = hashCode * 8191 + pbean.hashCode(); - boolean present_auth = true && (isSetAuth()); - list.add(present_auth); - if (present_auth) - list.add(auth); + hashCode = hashCode * 8191 + ((isSetAuth()) ? 131071 : 524287); + if (isSetAuth()) + hashCode = hashCode * 8191 + auth.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -11835,7 +12835,7 @@ public int compareTo(timResponsePresence_args other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetPbean()).compareTo(other.isSetPbean()); + lastComparison = java.lang.Boolean.compare(isSetPbean(), other.isSetPbean()); if (lastComparison != 0) { return lastComparison; } @@ -11845,7 +12845,7 @@ public int compareTo(timResponsePresence_args other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetAuth()).compareTo(other.isSetAuth()); + lastComparison = java.lang.Boolean.compare(isSetAuth(), other.isSetAuth()); if (lastComparison != 0) { return lastComparison; } @@ -11858,21 +12858,25 @@ public int compareTo(timResponsePresence_args other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timResponsePresence_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timResponsePresence_args("); boolean first = true; sb.append("pbean:"); @@ -11913,7 +12917,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -11921,14 +12925,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timResponsePresence_argsStandardSchemeFactory implements SchemeFactory { + private static class timResponsePresence_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timResponsePresence_argsStandardScheme getScheme() { return new timResponsePresence_argsStandardScheme(); } } - private static class timResponsePresence_argsStandardScheme extends StandardScheme { + private static class timResponsePresence_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timResponsePresence_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -11968,6 +12974,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timResponsePresence struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timResponsePresence_args struct) throws org.apache.thrift.TException { struct.validate(); @@ -11988,18 +12995,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timResponsePresenc } - private static class timResponsePresence_argsTupleSchemeFactory implements SchemeFactory { + private static class timResponsePresence_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timResponsePresence_argsTupleScheme getScheme() { return new timResponsePresence_argsTupleScheme(); } } - private static class timResponsePresence_argsTupleScheme extends TupleScheme { + private static class timResponsePresence_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timResponsePresence_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetPbean()) { optionals.set(0); } @@ -12017,8 +13025,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timResponsePresence @Override public void read(org.apache.thrift.protocol.TProtocol prot, timResponsePresence_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.pbean = new TimPBean(); struct.pbean.read(iprot); @@ -12032,29 +13040,30 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timResponsePresence_ } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timResponsePresence_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timResponsePresence_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timResponsePresence_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timResponsePresence_resultTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timResponsePresence_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timResponsePresence_resultTupleSchemeFactory(); - public TimResponseBean success; // required + public @org.apache.thrift.annotation.Nullable TimResponseBean success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -12062,6 +13071,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS @@ -12077,41 +13087,44 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimResponseBean.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timResponsePresence_result.class, metaDataMap); } @@ -12134,6 +13147,7 @@ public timResponsePresence_result(timResponsePresence_result other) { } } + @Override public timResponsePresence_result deepCopy() { return new timResponsePresence_result(this); } @@ -12143,11 +13157,12 @@ public void clear() { this.success = null; } + @org.apache.thrift.annotation.Nullable public TimResponseBean getSuccess() { return this.success; } - public timResponsePresence_result setSuccess(TimResponseBean success) { + public timResponsePresence_result setSuccess(@org.apache.thrift.annotation.Nullable TimResponseBean success) { this.success = success; return this; } @@ -12167,7 +13182,8 @@ public void setSuccessIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { @@ -12180,32 +13196,33 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timResponsePresence_result) return this.equals((timResponsePresence_result)that); return false; @@ -12214,6 +13231,8 @@ public boolean equals(Object that) { public boolean equals(timResponsePresence_result that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); @@ -12229,14 +13248,13 @@ public boolean equals(timResponsePresence_result that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -12247,7 +13265,7 @@ public int compareTo(timResponsePresence_result other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } @@ -12260,21 +13278,24 @@ public int compareTo(timResponsePresence_result other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timResponsePresence_result("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timResponsePresence_result("); boolean first = true; sb.append("success:"); @@ -12304,7 +13325,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -12312,14 +13333,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timResponsePresence_resultStandardSchemeFactory implements SchemeFactory { + private static class timResponsePresence_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timResponsePresence_resultStandardScheme getScheme() { return new timResponsePresence_resultStandardScheme(); } } - private static class timResponsePresence_resultStandardScheme extends StandardScheme { + private static class timResponsePresence_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timResponsePresence_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -12350,6 +13373,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timResponsePresence struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timResponsePresence_result struct) throws org.apache.thrift.TException { struct.validate(); @@ -12365,18 +13389,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timResponsePresenc } - private static class timResponsePresence_resultTupleSchemeFactory implements SchemeFactory { + private static class timResponsePresence_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timResponsePresence_resultTupleScheme getScheme() { return new timResponsePresence_resultTupleScheme(); } } - private static class timResponsePresence_resultTupleScheme extends TupleScheme { + private static class timResponsePresence_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timResponsePresence_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } @@ -12388,8 +13413,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timResponsePresence @Override public void read(org.apache.thrift.protocol.TProtocol prot, timResponsePresence_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new TimResponseBean(); struct.success.read(iprot); @@ -12398,32 +13423,33 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timResponsePresence_ } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timResponseMessage_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timResponseMessage_args"); private static final org.apache.thrift.protocol.TField MBEAN_FIELD_DESC = new org.apache.thrift.protocol.TField("mbean", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField AUTH_FIELD_DESC = new org.apache.thrift.protocol.TField("auth", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timResponseMessage_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timResponseMessage_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timResponseMessage_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timResponseMessage_argsTupleSchemeFactory(); - public TimMBean mbean; // required - public TimAuth auth; // required + public @org.apache.thrift.annotation.Nullable TimMBean mbean; // required + public @org.apache.thrift.annotation.Nullable TimAuth auth; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { MBEAN((short)1, "mbean"), AUTH((short)2, "auth"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -12431,6 +13457,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // MBEAN @@ -12448,43 +13475,46 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.MBEAN, new org.apache.thrift.meta_data.FieldMetaData("mbean", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimMBean.class))); tmpMap.put(_Fields.AUTH, new org.apache.thrift.meta_data.FieldMetaData("auth", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimAuth.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timResponseMessage_args.class, metaDataMap); } @@ -12512,6 +13542,7 @@ public timResponseMessage_args(timResponseMessage_args other) { } } + @Override public timResponseMessage_args deepCopy() { return new timResponseMessage_args(this); } @@ -12522,11 +13553,12 @@ public void clear() { this.auth = null; } + @org.apache.thrift.annotation.Nullable public TimMBean getMbean() { return this.mbean; } - public timResponseMessage_args setMbean(TimMBean mbean) { + public timResponseMessage_args setMbean(@org.apache.thrift.annotation.Nullable TimMBean mbean) { this.mbean = mbean; return this; } @@ -12546,11 +13578,12 @@ public void setMbeanIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public TimAuth getAuth() { return this.auth; } - public timResponseMessage_args setAuth(TimAuth auth) { + public timResponseMessage_args setAuth(@org.apache.thrift.annotation.Nullable TimAuth auth) { this.auth = auth; return this; } @@ -12570,7 +13603,8 @@ public void setAuthIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case MBEAN: if (value == null) { @@ -12591,7 +13625,9 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case MBEAN: return getMbean(); @@ -12600,13 +13636,14 @@ public Object getFieldValue(_Fields field) { return getAuth(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -12615,13 +13652,11 @@ public boolean isSet(_Fields field) { case AUTH: return isSetAuth(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timResponseMessage_args) return this.equals((timResponseMessage_args)that); return false; @@ -12630,6 +13665,8 @@ public boolean equals(Object that) { public boolean equals(timResponseMessage_args that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_mbean = true && this.isSetMbean(); boolean that_present_mbean = true && that.isSetMbean(); @@ -12654,19 +13691,17 @@ public boolean equals(timResponseMessage_args that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_mbean = true && (isSetMbean()); - list.add(present_mbean); - if (present_mbean) - list.add(mbean); + hashCode = hashCode * 8191 + ((isSetMbean()) ? 131071 : 524287); + if (isSetMbean()) + hashCode = hashCode * 8191 + mbean.hashCode(); - boolean present_auth = true && (isSetAuth()); - list.add(present_auth); - if (present_auth) - list.add(auth); + hashCode = hashCode * 8191 + ((isSetAuth()) ? 131071 : 524287); + if (isSetAuth()) + hashCode = hashCode * 8191 + auth.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -12677,7 +13712,7 @@ public int compareTo(timResponseMessage_args other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetMbean()).compareTo(other.isSetMbean()); + lastComparison = java.lang.Boolean.compare(isSetMbean(), other.isSetMbean()); if (lastComparison != 0) { return lastComparison; } @@ -12687,7 +13722,7 @@ public int compareTo(timResponseMessage_args other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetAuth()).compareTo(other.isSetAuth()); + lastComparison = java.lang.Boolean.compare(isSetAuth(), other.isSetAuth()); if (lastComparison != 0) { return lastComparison; } @@ -12700,21 +13735,25 @@ public int compareTo(timResponseMessage_args other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timResponseMessage_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timResponseMessage_args("); boolean first = true; sb.append("mbean:"); @@ -12755,7 +13794,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -12763,14 +13802,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timResponseMessage_argsStandardSchemeFactory implements SchemeFactory { + private static class timResponseMessage_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timResponseMessage_argsStandardScheme getScheme() { return new timResponseMessage_argsStandardScheme(); } } - private static class timResponseMessage_argsStandardScheme extends StandardScheme { + private static class timResponseMessage_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timResponseMessage_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -12810,6 +13851,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timResponseMessage_ struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timResponseMessage_args struct) throws org.apache.thrift.TException { struct.validate(); @@ -12830,18 +13872,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timResponseMessage } - private static class timResponseMessage_argsTupleSchemeFactory implements SchemeFactory { + private static class timResponseMessage_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timResponseMessage_argsTupleScheme getScheme() { return new timResponseMessage_argsTupleScheme(); } } - private static class timResponseMessage_argsTupleScheme extends TupleScheme { + private static class timResponseMessage_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timResponseMessage_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetMbean()) { optionals.set(0); } @@ -12859,8 +13902,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timResponseMessage_ @Override public void read(org.apache.thrift.protocol.TProtocol prot, timResponseMessage_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.mbean = new TimMBean(); struct.mbean.read(iprot); @@ -12874,29 +13917,30 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timResponseMessage_a } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timResponseMessage_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timResponseMessage_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timResponseMessage_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timResponseMessage_resultTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timResponseMessage_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timResponseMessage_resultTupleSchemeFactory(); - public TimResponseBean success; // required + public @org.apache.thrift.annotation.Nullable TimResponseBean success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -12904,6 +13948,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS @@ -12919,41 +13964,44 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimResponseBean.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timResponseMessage_result.class, metaDataMap); } @@ -12976,6 +14024,7 @@ public timResponseMessage_result(timResponseMessage_result other) { } } + @Override public timResponseMessage_result deepCopy() { return new timResponseMessage_result(this); } @@ -12985,11 +14034,12 @@ public void clear() { this.success = null; } + @org.apache.thrift.annotation.Nullable public TimResponseBean getSuccess() { return this.success; } - public timResponseMessage_result setSuccess(TimResponseBean success) { + public timResponseMessage_result setSuccess(@org.apache.thrift.annotation.Nullable TimResponseBean success) { this.success = success; return this; } @@ -13009,7 +14059,8 @@ public void setSuccessIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { @@ -13022,32 +14073,33 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timResponseMessage_result) return this.equals((timResponseMessage_result)that); return false; @@ -13056,6 +14108,8 @@ public boolean equals(Object that) { public boolean equals(timResponseMessage_result that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); @@ -13071,14 +14125,13 @@ public boolean equals(timResponseMessage_result that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -13089,7 +14142,7 @@ public int compareTo(timResponseMessage_result other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } @@ -13102,21 +14155,24 @@ public int compareTo(timResponseMessage_result other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timResponseMessage_result("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timResponseMessage_result("); boolean first = true; sb.append("success:"); @@ -13146,7 +14202,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -13154,14 +14210,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timResponseMessage_resultStandardSchemeFactory implements SchemeFactory { + private static class timResponseMessage_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timResponseMessage_resultStandardScheme getScheme() { return new timResponseMessage_resultStandardScheme(); } } - private static class timResponseMessage_resultStandardScheme extends StandardScheme { + private static class timResponseMessage_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timResponseMessage_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -13192,6 +14250,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timResponseMessage_ struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timResponseMessage_result struct) throws org.apache.thrift.TException { struct.validate(); @@ -13207,18 +14266,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timResponseMessage } - private static class timResponseMessage_resultTupleSchemeFactory implements SchemeFactory { + private static class timResponseMessage_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timResponseMessage_resultTupleScheme getScheme() { return new timResponseMessage_resultTupleScheme(); } } - private static class timResponseMessage_resultTupleScheme extends TupleScheme { + private static class timResponseMessage_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timResponseMessage_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } @@ -13230,8 +14290,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timResponseMessage_ @Override public void read(org.apache.thrift.protocol.TProtocol prot, timResponseMessage_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new TimResponseBean(); struct.success.read(iprot); @@ -13240,8 +14300,12 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timResponseMessage_r } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timResponseMessageIq_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timResponseMessageIq_args"); @@ -13249,15 +14313,12 @@ public static class timResponseMessageIq_args implements org.apache.thrift.TBase private static final org.apache.thrift.protocol.TField IQ_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("iqType", org.apache.thrift.protocol.TType.STRING, (short)2); private static final org.apache.thrift.protocol.TField AUTH_FIELD_DESC = new org.apache.thrift.protocol.TField("auth", org.apache.thrift.protocol.TType.STRUCT, (short)3); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timResponseMessageIq_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timResponseMessageIq_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timResponseMessageIq_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timResponseMessageIq_argsTupleSchemeFactory(); - public TimMessageIq timMsgIq; // required - public String iqType; // required - public TimAuth auth; // required + public @org.apache.thrift.annotation.Nullable TimMessageIq timMsgIq; // required + public @org.apache.thrift.annotation.Nullable java.lang.String iqType; // required + public @org.apache.thrift.annotation.Nullable TimAuth auth; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -13265,10 +14326,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { IQ_TYPE((short)2, "iqType"), AUTH((short)3, "auth"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -13276,6 +14337,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TIM_MSG_IQ @@ -13295,45 +14357,48 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TIM_MSG_IQ, new org.apache.thrift.meta_data.FieldMetaData("timMsgIq", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimMessageIq.class))); tmpMap.put(_Fields.IQ_TYPE, new org.apache.thrift.meta_data.FieldMetaData("iqType", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.AUTH, new org.apache.thrift.meta_data.FieldMetaData("auth", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimAuth.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timResponseMessageIq_args.class, metaDataMap); } @@ -13342,7 +14407,7 @@ public timResponseMessageIq_args() { public timResponseMessageIq_args( TimMessageIq timMsgIq, - String iqType, + java.lang.String iqType, TimAuth auth) { this(); @@ -13366,6 +14431,7 @@ public timResponseMessageIq_args(timResponseMessageIq_args other) { } } + @Override public timResponseMessageIq_args deepCopy() { return new timResponseMessageIq_args(this); } @@ -13377,11 +14443,12 @@ public void clear() { this.auth = null; } + @org.apache.thrift.annotation.Nullable public TimMessageIq getTimMsgIq() { return this.timMsgIq; } - public timResponseMessageIq_args setTimMsgIq(TimMessageIq timMsgIq) { + public timResponseMessageIq_args setTimMsgIq(@org.apache.thrift.annotation.Nullable TimMessageIq timMsgIq) { this.timMsgIq = timMsgIq; return this; } @@ -13401,11 +14468,12 @@ public void setTimMsgIqIsSet(boolean value) { } } - public String getIqType() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getIqType() { return this.iqType; } - public timResponseMessageIq_args setIqType(String iqType) { + public timResponseMessageIq_args setIqType(@org.apache.thrift.annotation.Nullable java.lang.String iqType) { this.iqType = iqType; return this; } @@ -13425,11 +14493,12 @@ public void setIqTypeIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public TimAuth getAuth() { return this.auth; } - public timResponseMessageIq_args setAuth(TimAuth auth) { + public timResponseMessageIq_args setAuth(@org.apache.thrift.annotation.Nullable TimAuth auth) { this.auth = auth; return this; } @@ -13449,7 +14518,8 @@ public void setAuthIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case TIM_MSG_IQ: if (value == null) { @@ -13463,7 +14533,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetIqType(); } else { - setIqType((String)value); + setIqType((java.lang.String)value); } break; @@ -13478,7 +14548,9 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TIM_MSG_IQ: return getTimMsgIq(); @@ -13490,13 +14562,14 @@ public Object getFieldValue(_Fields field) { return getAuth(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -13507,13 +14580,11 @@ public boolean isSet(_Fields field) { case AUTH: return isSetAuth(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timResponseMessageIq_args) return this.equals((timResponseMessageIq_args)that); return false; @@ -13522,6 +14593,8 @@ public boolean equals(Object that) { public boolean equals(timResponseMessageIq_args that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_timMsgIq = true && this.isSetTimMsgIq(); boolean that_present_timMsgIq = true && that.isSetTimMsgIq(); @@ -13555,24 +14628,21 @@ public boolean equals(timResponseMessageIq_args that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_timMsgIq = true && (isSetTimMsgIq()); - list.add(present_timMsgIq); - if (present_timMsgIq) - list.add(timMsgIq); + hashCode = hashCode * 8191 + ((isSetTimMsgIq()) ? 131071 : 524287); + if (isSetTimMsgIq()) + hashCode = hashCode * 8191 + timMsgIq.hashCode(); - boolean present_iqType = true && (isSetIqType()); - list.add(present_iqType); - if (present_iqType) - list.add(iqType); + hashCode = hashCode * 8191 + ((isSetIqType()) ? 131071 : 524287); + if (isSetIqType()) + hashCode = hashCode * 8191 + iqType.hashCode(); - boolean present_auth = true && (isSetAuth()); - list.add(present_auth); - if (present_auth) - list.add(auth); + hashCode = hashCode * 8191 + ((isSetAuth()) ? 131071 : 524287); + if (isSetAuth()) + hashCode = hashCode * 8191 + auth.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -13583,7 +14653,7 @@ public int compareTo(timResponseMessageIq_args other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTimMsgIq()).compareTo(other.isSetTimMsgIq()); + lastComparison = java.lang.Boolean.compare(isSetTimMsgIq(), other.isSetTimMsgIq()); if (lastComparison != 0) { return lastComparison; } @@ -13593,7 +14663,7 @@ public int compareTo(timResponseMessageIq_args other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetIqType()).compareTo(other.isSetIqType()); + lastComparison = java.lang.Boolean.compare(isSetIqType(), other.isSetIqType()); if (lastComparison != 0) { return lastComparison; } @@ -13603,7 +14673,7 @@ public int compareTo(timResponseMessageIq_args other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetAuth()).compareTo(other.isSetAuth()); + lastComparison = java.lang.Boolean.compare(isSetAuth(), other.isSetAuth()); if (lastComparison != 0) { return lastComparison; } @@ -13616,21 +14686,25 @@ public int compareTo(timResponseMessageIq_args other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timResponseMessageIq_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timResponseMessageIq_args("); boolean first = true; sb.append("timMsgIq:"); @@ -13679,7 +14753,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -13687,14 +14761,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timResponseMessageIq_argsStandardSchemeFactory implements SchemeFactory { + private static class timResponseMessageIq_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timResponseMessageIq_argsStandardScheme getScheme() { return new timResponseMessageIq_argsStandardScheme(); } } - private static class timResponseMessageIq_argsStandardScheme extends StandardScheme { + private static class timResponseMessageIq_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timResponseMessageIq_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -13742,6 +14818,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timResponseMessageI struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timResponseMessageIq_args struct) throws org.apache.thrift.TException { struct.validate(); @@ -13767,18 +14844,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timResponseMessage } - private static class timResponseMessageIq_argsTupleSchemeFactory implements SchemeFactory { + private static class timResponseMessageIq_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timResponseMessageIq_argsTupleScheme getScheme() { return new timResponseMessageIq_argsTupleScheme(); } } - private static class timResponseMessageIq_argsTupleScheme extends TupleScheme { + private static class timResponseMessageIq_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timResponseMessageIq_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetTimMsgIq()) { optionals.set(0); } @@ -13802,8 +14880,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timResponseMessageI @Override public void read(org.apache.thrift.protocol.TProtocol prot, timResponseMessageIq_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.timMsgIq = new TimMessageIq(); struct.timMsgIq.read(iprot); @@ -13821,29 +14899,30 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timResponseMessageIq } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timResponseMessageIq_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timResponseMessageIq_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timResponseMessageIq_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timResponseMessageIq_resultTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timResponseMessageIq_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timResponseMessageIq_resultTupleSchemeFactory(); - public TimMBeanList success; // required + public @org.apache.thrift.annotation.Nullable TimMBeanList success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -13851,6 +14930,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS @@ -13866,41 +14946,44 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimMBeanList.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timResponseMessageIq_result.class, metaDataMap); } @@ -13923,6 +15006,7 @@ public timResponseMessageIq_result(timResponseMessageIq_result other) { } } + @Override public timResponseMessageIq_result deepCopy() { return new timResponseMessageIq_result(this); } @@ -13932,11 +15016,12 @@ public void clear() { this.success = null; } + @org.apache.thrift.annotation.Nullable public TimMBeanList getSuccess() { return this.success; } - public timResponseMessageIq_result setSuccess(TimMBeanList success) { + public timResponseMessageIq_result setSuccess(@org.apache.thrift.annotation.Nullable TimMBeanList success) { this.success = success; return this; } @@ -13956,7 +15041,8 @@ public void setSuccessIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { @@ -13969,32 +15055,33 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timResponseMessageIq_result) return this.equals((timResponseMessageIq_result)that); return false; @@ -14003,6 +15090,8 @@ public boolean equals(Object that) { public boolean equals(timResponseMessageIq_result that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); @@ -14018,14 +15107,13 @@ public boolean equals(timResponseMessageIq_result that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -14036,7 +15124,7 @@ public int compareTo(timResponseMessageIq_result other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } @@ -14049,21 +15137,24 @@ public int compareTo(timResponseMessageIq_result other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timResponseMessageIq_result("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timResponseMessageIq_result("); boolean first = true; sb.append("success:"); @@ -14093,7 +15184,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -14101,14 +15192,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timResponseMessageIq_resultStandardSchemeFactory implements SchemeFactory { + private static class timResponseMessageIq_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timResponseMessageIq_resultStandardScheme getScheme() { return new timResponseMessageIq_resultStandardScheme(); } } - private static class timResponseMessageIq_resultStandardScheme extends StandardScheme { + private static class timResponseMessageIq_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timResponseMessageIq_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -14139,6 +15232,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timResponseMessageI struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timResponseMessageIq_result struct) throws org.apache.thrift.TException { struct.validate(); @@ -14154,18 +15248,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timResponseMessage } - private static class timResponseMessageIq_resultTupleSchemeFactory implements SchemeFactory { + private static class timResponseMessageIq_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timResponseMessageIq_resultTupleScheme getScheme() { return new timResponseMessageIq_resultTupleScheme(); } } - private static class timResponseMessageIq_resultTupleScheme extends TupleScheme { + private static class timResponseMessageIq_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timResponseMessageIq_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } @@ -14177,8 +15272,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timResponseMessageI @Override public void read(org.apache.thrift.protocol.TProtocol prot, timResponseMessageIq_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new TimMBeanList(); struct.success.read(iprot); @@ -14187,32 +15282,33 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timResponseMessageIq } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timResponsePresenceList_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timResponsePresenceList_args"); private static final org.apache.thrift.protocol.TField PBEAN_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("pbeanList", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField AUTH_FIELD_DESC = new org.apache.thrift.protocol.TField("auth", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timResponsePresenceList_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timResponsePresenceList_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timResponsePresenceList_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timResponsePresenceList_argsTupleSchemeFactory(); - public TimPBeanList pbeanList; // required - public TimAuth auth; // required + public @org.apache.thrift.annotation.Nullable TimPBeanList pbeanList; // required + public @org.apache.thrift.annotation.Nullable TimAuth auth; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { PBEAN_LIST((short)1, "pbeanList"), AUTH((short)2, "auth"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -14220,6 +15316,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PBEAN_LIST @@ -14237,43 +15334,46 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PBEAN_LIST, new org.apache.thrift.meta_data.FieldMetaData("pbeanList", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimPBeanList.class))); tmpMap.put(_Fields.AUTH, new org.apache.thrift.meta_data.FieldMetaData("auth", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimAuth.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timResponsePresenceList_args.class, metaDataMap); } @@ -14301,6 +15401,7 @@ public timResponsePresenceList_args(timResponsePresenceList_args other) { } } + @Override public timResponsePresenceList_args deepCopy() { return new timResponsePresenceList_args(this); } @@ -14311,11 +15412,12 @@ public void clear() { this.auth = null; } + @org.apache.thrift.annotation.Nullable public TimPBeanList getPbeanList() { return this.pbeanList; } - public timResponsePresenceList_args setPbeanList(TimPBeanList pbeanList) { + public timResponsePresenceList_args setPbeanList(@org.apache.thrift.annotation.Nullable TimPBeanList pbeanList) { this.pbeanList = pbeanList; return this; } @@ -14335,11 +15437,12 @@ public void setPbeanListIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public TimAuth getAuth() { return this.auth; } - public timResponsePresenceList_args setAuth(TimAuth auth) { + public timResponsePresenceList_args setAuth(@org.apache.thrift.annotation.Nullable TimAuth auth) { this.auth = auth; return this; } @@ -14359,7 +15462,8 @@ public void setAuthIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case PBEAN_LIST: if (value == null) { @@ -14380,7 +15484,9 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case PBEAN_LIST: return getPbeanList(); @@ -14389,13 +15495,14 @@ public Object getFieldValue(_Fields field) { return getAuth(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -14404,13 +15511,11 @@ public boolean isSet(_Fields field) { case AUTH: return isSetAuth(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timResponsePresenceList_args) return this.equals((timResponsePresenceList_args)that); return false; @@ -14419,6 +15524,8 @@ public boolean equals(Object that) { public boolean equals(timResponsePresenceList_args that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_pbeanList = true && this.isSetPbeanList(); boolean that_present_pbeanList = true && that.isSetPbeanList(); @@ -14443,19 +15550,17 @@ public boolean equals(timResponsePresenceList_args that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_pbeanList = true && (isSetPbeanList()); - list.add(present_pbeanList); - if (present_pbeanList) - list.add(pbeanList); + hashCode = hashCode * 8191 + ((isSetPbeanList()) ? 131071 : 524287); + if (isSetPbeanList()) + hashCode = hashCode * 8191 + pbeanList.hashCode(); - boolean present_auth = true && (isSetAuth()); - list.add(present_auth); - if (present_auth) - list.add(auth); + hashCode = hashCode * 8191 + ((isSetAuth()) ? 131071 : 524287); + if (isSetAuth()) + hashCode = hashCode * 8191 + auth.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -14466,7 +15571,7 @@ public int compareTo(timResponsePresenceList_args other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetPbeanList()).compareTo(other.isSetPbeanList()); + lastComparison = java.lang.Boolean.compare(isSetPbeanList(), other.isSetPbeanList()); if (lastComparison != 0) { return lastComparison; } @@ -14476,7 +15581,7 @@ public int compareTo(timResponsePresenceList_args other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetAuth()).compareTo(other.isSetAuth()); + lastComparison = java.lang.Boolean.compare(isSetAuth(), other.isSetAuth()); if (lastComparison != 0) { return lastComparison; } @@ -14489,21 +15594,25 @@ public int compareTo(timResponsePresenceList_args other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timResponsePresenceList_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timResponsePresenceList_args("); boolean first = true; sb.append("pbeanList:"); @@ -14544,7 +15653,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -14552,14 +15661,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timResponsePresenceList_argsStandardSchemeFactory implements SchemeFactory { + private static class timResponsePresenceList_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timResponsePresenceList_argsStandardScheme getScheme() { return new timResponsePresenceList_argsStandardScheme(); } } - private static class timResponsePresenceList_argsStandardScheme extends StandardScheme { + private static class timResponsePresenceList_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timResponsePresenceList_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -14599,6 +15710,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timResponsePresence struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timResponsePresenceList_args struct) throws org.apache.thrift.TException { struct.validate(); @@ -14619,18 +15731,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timResponsePresenc } - private static class timResponsePresenceList_argsTupleSchemeFactory implements SchemeFactory { + private static class timResponsePresenceList_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timResponsePresenceList_argsTupleScheme getScheme() { return new timResponsePresenceList_argsTupleScheme(); } } - private static class timResponsePresenceList_argsTupleScheme extends TupleScheme { + private static class timResponsePresenceList_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timResponsePresenceList_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetPbeanList()) { optionals.set(0); } @@ -14648,8 +15761,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timResponsePresence @Override public void read(org.apache.thrift.protocol.TProtocol prot, timResponsePresenceList_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.pbeanList = new TimPBeanList(); struct.pbeanList.read(iprot); @@ -14663,29 +15776,30 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timResponsePresenceL } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timResponsePresenceList_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timResponsePresenceList_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timResponsePresenceList_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timResponsePresenceList_resultTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timResponsePresenceList_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timResponsePresenceList_resultTupleSchemeFactory(); - public TimResponseBean success; // required + public @org.apache.thrift.annotation.Nullable TimResponseBean success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -14693,6 +15807,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS @@ -14708,41 +15823,44 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimResponseBean.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timResponsePresenceList_result.class, metaDataMap); } @@ -14765,6 +15883,7 @@ public timResponsePresenceList_result(timResponsePresenceList_result other) { } } + @Override public timResponsePresenceList_result deepCopy() { return new timResponsePresenceList_result(this); } @@ -14774,11 +15893,12 @@ public void clear() { this.success = null; } + @org.apache.thrift.annotation.Nullable public TimResponseBean getSuccess() { return this.success; } - public timResponsePresenceList_result setSuccess(TimResponseBean success) { + public timResponsePresenceList_result setSuccess(@org.apache.thrift.annotation.Nullable TimResponseBean success) { this.success = success; return this; } @@ -14798,7 +15918,8 @@ public void setSuccessIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { @@ -14811,32 +15932,33 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timResponsePresenceList_result) return this.equals((timResponsePresenceList_result)that); return false; @@ -14845,6 +15967,8 @@ public boolean equals(Object that) { public boolean equals(timResponsePresenceList_result that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); @@ -14860,14 +15984,13 @@ public boolean equals(timResponsePresenceList_result that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -14878,7 +16001,7 @@ public int compareTo(timResponsePresenceList_result other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } @@ -14891,21 +16014,24 @@ public int compareTo(timResponsePresenceList_result other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timResponsePresenceList_result("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timResponsePresenceList_result("); boolean first = true; sb.append("success:"); @@ -14935,7 +16061,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -14943,14 +16069,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timResponsePresenceList_resultStandardSchemeFactory implements SchemeFactory { + private static class timResponsePresenceList_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timResponsePresenceList_resultStandardScheme getScheme() { return new timResponsePresenceList_resultStandardScheme(); } } - private static class timResponsePresenceList_resultStandardScheme extends StandardScheme { + private static class timResponsePresenceList_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timResponsePresenceList_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -14981,6 +16109,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timResponsePresence struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timResponsePresenceList_result struct) throws org.apache.thrift.TException { struct.validate(); @@ -14996,18 +16125,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timResponsePresenc } - private static class timResponsePresenceList_resultTupleSchemeFactory implements SchemeFactory { + private static class timResponsePresenceList_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timResponsePresenceList_resultTupleScheme getScheme() { return new timResponsePresenceList_resultTupleScheme(); } } - private static class timResponsePresenceList_resultTupleScheme extends TupleScheme { + private static class timResponsePresenceList_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timResponsePresenceList_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } @@ -15019,8 +16149,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timResponsePresence @Override public void read(org.apache.thrift.protocol.TProtocol prot, timResponsePresenceList_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new TimResponseBean(); struct.success.read(iprot); @@ -15029,32 +16159,33 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timResponsePresenceL } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timResponseMessageList_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timResponseMessageList_args"); private static final org.apache.thrift.protocol.TField MBEAN_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("mbeanList", org.apache.thrift.protocol.TType.STRUCT, (short)1); private static final org.apache.thrift.protocol.TField AUTH_FIELD_DESC = new org.apache.thrift.protocol.TField("auth", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timResponseMessageList_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timResponseMessageList_argsTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timResponseMessageList_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timResponseMessageList_argsTupleSchemeFactory(); - public TimMBeanList mbeanList; // required - public TimAuth auth; // required + public @org.apache.thrift.annotation.Nullable TimMBeanList mbeanList; // required + public @org.apache.thrift.annotation.Nullable TimAuth auth; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { MBEAN_LIST((short)1, "mbeanList"), AUTH((short)2, "auth"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -15062,6 +16193,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // MBEAN_LIST @@ -15079,43 +16211,46 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.MBEAN_LIST, new org.apache.thrift.meta_data.FieldMetaData("mbeanList", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimMBeanList.class))); tmpMap.put(_Fields.AUTH, new org.apache.thrift.meta_data.FieldMetaData("auth", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimAuth.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timResponseMessageList_args.class, metaDataMap); } @@ -15143,6 +16278,7 @@ public timResponseMessageList_args(timResponseMessageList_args other) { } } + @Override public timResponseMessageList_args deepCopy() { return new timResponseMessageList_args(this); } @@ -15153,11 +16289,12 @@ public void clear() { this.auth = null; } + @org.apache.thrift.annotation.Nullable public TimMBeanList getMbeanList() { return this.mbeanList; } - public timResponseMessageList_args setMbeanList(TimMBeanList mbeanList) { + public timResponseMessageList_args setMbeanList(@org.apache.thrift.annotation.Nullable TimMBeanList mbeanList) { this.mbeanList = mbeanList; return this; } @@ -15177,11 +16314,12 @@ public void setMbeanListIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public TimAuth getAuth() { return this.auth; } - public timResponseMessageList_args setAuth(TimAuth auth) { + public timResponseMessageList_args setAuth(@org.apache.thrift.annotation.Nullable TimAuth auth) { this.auth = auth; return this; } @@ -15201,7 +16339,8 @@ public void setAuthIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case MBEAN_LIST: if (value == null) { @@ -15222,7 +16361,9 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case MBEAN_LIST: return getMbeanList(); @@ -15231,13 +16372,14 @@ public Object getFieldValue(_Fields field) { return getAuth(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -15246,13 +16388,11 @@ public boolean isSet(_Fields field) { case AUTH: return isSetAuth(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timResponseMessageList_args) return this.equals((timResponseMessageList_args)that); return false; @@ -15261,6 +16401,8 @@ public boolean equals(Object that) { public boolean equals(timResponseMessageList_args that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_mbeanList = true && this.isSetMbeanList(); boolean that_present_mbeanList = true && that.isSetMbeanList(); @@ -15285,19 +16427,17 @@ public boolean equals(timResponseMessageList_args that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_mbeanList = true && (isSetMbeanList()); - list.add(present_mbeanList); - if (present_mbeanList) - list.add(mbeanList); + hashCode = hashCode * 8191 + ((isSetMbeanList()) ? 131071 : 524287); + if (isSetMbeanList()) + hashCode = hashCode * 8191 + mbeanList.hashCode(); - boolean present_auth = true && (isSetAuth()); - list.add(present_auth); - if (present_auth) - list.add(auth); + hashCode = hashCode * 8191 + ((isSetAuth()) ? 131071 : 524287); + if (isSetAuth()) + hashCode = hashCode * 8191 + auth.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -15308,7 +16448,7 @@ public int compareTo(timResponseMessageList_args other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetMbeanList()).compareTo(other.isSetMbeanList()); + lastComparison = java.lang.Boolean.compare(isSetMbeanList(), other.isSetMbeanList()); if (lastComparison != 0) { return lastComparison; } @@ -15318,7 +16458,7 @@ public int compareTo(timResponseMessageList_args other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetAuth()).compareTo(other.isSetAuth()); + lastComparison = java.lang.Boolean.compare(isSetAuth(), other.isSetAuth()); if (lastComparison != 0) { return lastComparison; } @@ -15331,21 +16471,25 @@ public int compareTo(timResponseMessageList_args other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timResponseMessageList_args("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timResponseMessageList_args("); boolean first = true; sb.append("mbeanList:"); @@ -15386,7 +16530,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -15394,14 +16538,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timResponseMessageList_argsStandardSchemeFactory implements SchemeFactory { + private static class timResponseMessageList_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timResponseMessageList_argsStandardScheme getScheme() { return new timResponseMessageList_argsStandardScheme(); } } - private static class timResponseMessageList_argsStandardScheme extends StandardScheme { + private static class timResponseMessageList_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timResponseMessageList_args struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -15441,6 +16587,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timResponseMessageL struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timResponseMessageList_args struct) throws org.apache.thrift.TException { struct.validate(); @@ -15461,18 +16608,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timResponseMessage } - private static class timResponseMessageList_argsTupleSchemeFactory implements SchemeFactory { + private static class timResponseMessageList_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timResponseMessageList_argsTupleScheme getScheme() { return new timResponseMessageList_argsTupleScheme(); } } - private static class timResponseMessageList_argsTupleScheme extends TupleScheme { + private static class timResponseMessageList_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timResponseMessageList_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetMbeanList()) { optionals.set(0); } @@ -15490,8 +16638,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timResponseMessageL @Override public void read(org.apache.thrift.protocol.TProtocol prot, timResponseMessageList_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.mbeanList = new TimMBeanList(); struct.mbeanList.read(iprot); @@ -15505,29 +16653,30 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timResponseMessageLi } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } + @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public static class timResponseMessageList_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timResponseMessageList_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new timResponseMessageList_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new timResponseMessageList_resultTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timResponseMessageList_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timResponseMessageList_resultTupleSchemeFactory(); - public TimResponseBean success; // required + public @org.apache.thrift.annotation.Nullable TimResponseBean success; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SUCCESS((short)0, "success"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -15535,6 +16684,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS @@ -15550,41 +16700,44 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimResponseBean.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timResponseMessageList_result.class, metaDataMap); } @@ -15607,6 +16760,7 @@ public timResponseMessageList_result(timResponseMessageList_result other) { } } + @Override public timResponseMessageList_result deepCopy() { return new timResponseMessageList_result(this); } @@ -15616,11 +16770,12 @@ public void clear() { this.success = null; } + @org.apache.thrift.annotation.Nullable public TimResponseBean getSuccess() { return this.success; } - public timResponseMessageList_result setSuccess(TimResponseBean success) { + public timResponseMessageList_result setSuccess(@org.apache.thrift.annotation.Nullable TimResponseBean success) { this.success = success; return this; } @@ -15640,7 +16795,8 @@ public void setSuccessIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUCCESS: if (value == null) { @@ -15653,32 +16809,33 @@ public void setFieldValue(_Fields field, Object value) { } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof timResponseMessageList_result) return this.equals((timResponseMessageList_result)that); return false; @@ -15687,6 +16844,8 @@ public boolean equals(Object that) { public boolean equals(timResponseMessageList_result that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); @@ -15702,14 +16861,13 @@ public boolean equals(timResponseMessageList_result that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -15720,7 +16878,7 @@ public int compareTo(timResponseMessageList_result other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } @@ -15733,21 +16891,24 @@ public int compareTo(timResponseMessageList_result other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("timResponseMessageList_result("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("timResponseMessageList_result("); boolean first = true; sb.append("success:"); @@ -15777,7 +16938,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -15785,14 +16946,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class timResponseMessageList_resultStandardSchemeFactory implements SchemeFactory { + private static class timResponseMessageList_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timResponseMessageList_resultStandardScheme getScheme() { return new timResponseMessageList_resultStandardScheme(); } } - private static class timResponseMessageList_resultStandardScheme extends StandardScheme { + private static class timResponseMessageList_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, timResponseMessageList_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -15823,6 +16986,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, timResponseMessageL struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, timResponseMessageList_result struct) throws org.apache.thrift.TException { struct.validate(); @@ -15838,18 +17002,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, timResponseMessage } - private static class timResponseMessageList_resultTupleSchemeFactory implements SchemeFactory { + private static class timResponseMessageList_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public timResponseMessageList_resultTupleScheme getScheme() { return new timResponseMessageList_resultTupleScheme(); } } - private static class timResponseMessageList_resultTupleScheme extends TupleScheme { + private static class timResponseMessageList_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, timResponseMessageList_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } @@ -15861,8 +17026,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, timResponseMessageL @Override public void read(org.apache.thrift.protocol.TProtocol prot, timResponseMessageList_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.success = new TimResponseBean(); struct.success.read(iprot); @@ -15871,6 +17036,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, timResponseMessageLi } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } } diff --git a/protocols/gen-java/com/tim/packet/Tid.java b/protocols/gen-java/com/tim/packet/Tid.java index 2577357..3f77b23 100644 --- a/protocols/gen-java/com/tim/packet/Tid.java +++ b/protocols/gen-java/com/tim/packet/Tid.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class Tid implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Tid"); @@ -45,33 +18,30 @@ public class Tid implements org.apache.thrift.TBase, java.io.S private static final org.apache.thrift.protocol.TField EXTRA_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("extraList", org.apache.thrift.protocol.TType.LIST, (short)5); private static final org.apache.thrift.protocol.TField EXTRA_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("extraMap", org.apache.thrift.protocol.TType.MAP, (short)6); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TidStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TidTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TidStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TidTupleSchemeFactory(); /** * 登陆名 用户登录号,房间号等 */ - public String name; // required + public @org.apache.thrift.annotation.Nullable java.lang.String name; // required /** * 域名 用于区分渠道等 appid,appsecret */ - public String domain; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String domain; // optional /** * 系统 自行约定 如 : 1IOS,2android,3H5,4WEB 等 */ - public String resource; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String resource; // optional /** * normal,group */ - public String type; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String type; // optional /** * 附加信息:如传递客户端信息 iphone6,xiaomi,huawei等 */ - public List extraList; // optional - public Map extraMap; // optional + public @org.apache.thrift.annotation.Nullable java.util.List extraList; // optional + public @org.apache.thrift.annotation.Nullable java.util.Map extraMap; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -97,10 +67,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { EXTRA_LIST((short)5, "extraList"), EXTRA_MAP((short)6, "extraMap"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -108,6 +78,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // NAME @@ -133,39 +104,42 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final _Fields optionals[] = {_Fields.DOMAIN,_Fields.RESOURCE,_Fields.TYPE,_Fields.EXTRA_LIST,_Fields.EXTRA_MAP}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DOMAIN, new org.apache.thrift.meta_data.FieldMetaData("domain", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -181,7 +155,7 @@ public String getFieldName() { new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Tid.class, metaDataMap); } @@ -189,7 +163,7 @@ public Tid() { } public Tid( - String name) + java.lang.String name) { this(); this.name = name; @@ -212,18 +186,19 @@ public Tid(Tid other) { this.type = other.type; } if (other.isSetExtraList()) { - List __this__extraList = new ArrayList(other.extraList.size()); + java.util.List __this__extraList = new java.util.ArrayList(other.extraList.size()); for (TimNode other_element : other.extraList) { __this__extraList.add(new TimNode(other_element)); } this.extraList = __this__extraList; } if (other.isSetExtraMap()) { - Map __this__extraMap = new HashMap(other.extraMap); + java.util.Map __this__extraMap = new java.util.HashMap(other.extraMap); this.extraMap = __this__extraMap; } } + @Override public Tid deepCopy() { return new Tid(this); } @@ -241,14 +216,15 @@ public void clear() { /** * 登陆名 用户登录号,房间号等 */ - public String getName() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getName() { return this.name; } /** * 登陆名 用户登录号,房间号等 */ - public Tid setName(String name) { + public Tid setName(@org.apache.thrift.annotation.Nullable java.lang.String name) { this.name = name; return this; } @@ -271,14 +247,15 @@ public void setNameIsSet(boolean value) { /** * 域名 用于区分渠道等 appid,appsecret */ - public String getDomain() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getDomain() { return this.domain; } /** * 域名 用于区分渠道等 appid,appsecret */ - public Tid setDomain(String domain) { + public Tid setDomain(@org.apache.thrift.annotation.Nullable java.lang.String domain) { this.domain = domain; return this; } @@ -301,14 +278,15 @@ public void setDomainIsSet(boolean value) { /** * 系统 自行约定 如 : 1IOS,2android,3H5,4WEB 等 */ - public String getResource() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getResource() { return this.resource; } /** * 系统 自行约定 如 : 1IOS,2android,3H5,4WEB 等 */ - public Tid setResource(String resource) { + public Tid setResource(@org.apache.thrift.annotation.Nullable java.lang.String resource) { this.resource = resource; return this; } @@ -331,14 +309,15 @@ public void setResourceIsSet(boolean value) { /** * normal,group */ - public String getType() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getType() { return this.type; } /** * normal,group */ - public Tid setType(String type) { + public Tid setType(@org.apache.thrift.annotation.Nullable java.lang.String type) { this.type = type; return this; } @@ -362,13 +341,14 @@ public int getExtraListSize() { return (this.extraList == null) ? 0 : this.extraList.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getExtraListIterator() { return (this.extraList == null) ? null : this.extraList.iterator(); } public void addToExtraList(TimNode elem) { if (this.extraList == null) { - this.extraList = new ArrayList(); + this.extraList = new java.util.ArrayList(); } this.extraList.add(elem); } @@ -376,14 +356,15 @@ public void addToExtraList(TimNode elem) { /** * 附加信息:如传递客户端信息 iphone6,xiaomi,huawei等 */ - public List getExtraList() { + @org.apache.thrift.annotation.Nullable + public java.util.List getExtraList() { return this.extraList; } /** * 附加信息:如传递客户端信息 iphone6,xiaomi,huawei等 */ - public Tid setExtraList(List extraList) { + public Tid setExtraList(@org.apache.thrift.annotation.Nullable java.util.List extraList) { this.extraList = extraList; return this; } @@ -407,18 +388,19 @@ public int getExtraMapSize() { return (this.extraMap == null) ? 0 : this.extraMap.size(); } - public void putToExtraMap(String key, String val) { + public void putToExtraMap(java.lang.String key, java.lang.String val) { if (this.extraMap == null) { - this.extraMap = new HashMap(); + this.extraMap = new java.util.HashMap(); } this.extraMap.put(key, val); } - public Map getExtraMap() { + @org.apache.thrift.annotation.Nullable + public java.util.Map getExtraMap() { return this.extraMap; } - public Tid setExtraMap(Map extraMap) { + public Tid setExtraMap(@org.apache.thrift.annotation.Nullable java.util.Map extraMap) { this.extraMap = extraMap; return this; } @@ -438,13 +420,14 @@ public void setExtraMapIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case NAME: if (value == null) { unsetName(); } else { - setName((String)value); + setName((java.lang.String)value); } break; @@ -452,7 +435,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetDomain(); } else { - setDomain((String)value); + setDomain((java.lang.String)value); } break; @@ -460,7 +443,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetResource(); } else { - setResource((String)value); + setResource((java.lang.String)value); } break; @@ -468,7 +451,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetType(); } else { - setType((String)value); + setType((java.lang.String)value); } break; @@ -476,7 +459,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraList(); } else { - setExtraList((List)value); + setExtraList((java.util.List)value); } break; @@ -484,14 +467,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraMap(); } else { - setExtraMap((Map)value); + setExtraMap((java.util.Map)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case NAME: return getName(); @@ -512,13 +497,14 @@ public Object getFieldValue(_Fields field) { return getExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -535,13 +521,11 @@ public boolean isSet(_Fields field) { case EXTRA_MAP: return isSetExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof Tid) return this.equals((Tid)that); return false; @@ -550,6 +534,8 @@ public boolean equals(Object that) { public boolean equals(Tid that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_name = true && this.isSetName(); boolean that_present_name = true && that.isSetName(); @@ -610,39 +596,33 @@ public boolean equals(Tid that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_name = true && (isSetName()); - list.add(present_name); - if (present_name) - list.add(name); - - boolean present_domain = true && (isSetDomain()); - list.add(present_domain); - if (present_domain) - list.add(domain); - - boolean present_resource = true && (isSetResource()); - list.add(present_resource); - if (present_resource) - list.add(resource); - - boolean present_type = true && (isSetType()); - list.add(present_type); - if (present_type) - list.add(type); - - boolean present_extraList = true && (isSetExtraList()); - list.add(present_extraList); - if (present_extraList) - list.add(extraList); - - boolean present_extraMap = true && (isSetExtraMap()); - list.add(present_extraMap); - if (present_extraMap) - list.add(extraMap); - - return list.hashCode(); + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287); + if (isSetName()) + hashCode = hashCode * 8191 + name.hashCode(); + + hashCode = hashCode * 8191 + ((isSetDomain()) ? 131071 : 524287); + if (isSetDomain()) + hashCode = hashCode * 8191 + domain.hashCode(); + + hashCode = hashCode * 8191 + ((isSetResource()) ? 131071 : 524287); + if (isSetResource()) + hashCode = hashCode * 8191 + resource.hashCode(); + + hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287); + if (isSetType()) + hashCode = hashCode * 8191 + type.hashCode(); + + hashCode = hashCode * 8191 + ((isSetExtraList()) ? 131071 : 524287); + if (isSetExtraList()) + hashCode = hashCode * 8191 + extraList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetExtraMap()) ? 131071 : 524287); + if (isSetExtraMap()) + hashCode = hashCode * 8191 + extraMap.hashCode(); + + return hashCode; } @Override @@ -653,7 +633,7 @@ public int compareTo(Tid other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + lastComparison = java.lang.Boolean.compare(isSetName(), other.isSetName()); if (lastComparison != 0) { return lastComparison; } @@ -663,7 +643,7 @@ public int compareTo(Tid other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDomain()).compareTo(other.isSetDomain()); + lastComparison = java.lang.Boolean.compare(isSetDomain(), other.isSetDomain()); if (lastComparison != 0) { return lastComparison; } @@ -673,7 +653,7 @@ public int compareTo(Tid other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetResource()).compareTo(other.isSetResource()); + lastComparison = java.lang.Boolean.compare(isSetResource(), other.isSetResource()); if (lastComparison != 0) { return lastComparison; } @@ -683,7 +663,7 @@ public int compareTo(Tid other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); + lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType()); if (lastComparison != 0) { return lastComparison; } @@ -693,7 +673,7 @@ public int compareTo(Tid other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraList()).compareTo(other.isSetExtraList()); + lastComparison = java.lang.Boolean.compare(isSetExtraList(), other.isSetExtraList()); if (lastComparison != 0) { return lastComparison; } @@ -703,7 +683,7 @@ public int compareTo(Tid other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraMap()).compareTo(other.isSetExtraMap()); + lastComparison = java.lang.Boolean.compare(isSetExtraMap(), other.isSetExtraMap()); if (lastComparison != 0) { return lastComparison; } @@ -716,21 +696,25 @@ public int compareTo(Tid other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("Tid("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("Tid("); boolean first = true; sb.append("name:"); @@ -810,7 +794,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -818,14 +802,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TidStandardSchemeFactory implements SchemeFactory { + private static class TidStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TidStandardScheme getScheme() { return new TidStandardScheme(); } } - private static class TidStandardScheme extends StandardScheme { + private static class TidStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, Tid struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -872,8 +858,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Tid struct) throws if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list54 = iprot.readListBegin(); - struct.extraList = new ArrayList(_list54.size); - TimNode _elem55; + struct.extraList = new java.util.ArrayList(_list54.size); + @org.apache.thrift.annotation.Nullable TimNode _elem55; for (int _i56 = 0; _i56 < _list54.size; ++_i56) { _elem55 = new TimNode(); @@ -891,9 +877,9 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Tid struct) throws if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map57 = iprot.readMapBegin(); - struct.extraMap = new HashMap(2*_map57.size); - String _key58; - String _val59; + struct.extraMap = new java.util.HashMap(2*_map57.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key58; + @org.apache.thrift.annotation.Nullable java.lang.String _val59; for (int _i60 = 0; _i60 < _map57.size; ++_i60) { _key58 = iprot.readString(); @@ -918,6 +904,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Tid struct) throws struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, Tid struct) throws org.apache.thrift.TException { struct.validate(); @@ -967,7 +954,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, Tid struct) throws oprot.writeFieldBegin(EXTRA_MAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.extraMap.size())); - for (Map.Entry _iter62 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter62 : struct.extraMap.entrySet()) { oprot.writeString(_iter62.getKey()); oprot.writeString(_iter62.getValue()); @@ -983,19 +970,20 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, Tid struct) throws } - private static class TidTupleSchemeFactory implements SchemeFactory { + private static class TidTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TidTupleScheme getScheme() { return new TidTupleScheme(); } } - private static class TidTupleScheme extends TupleScheme { + private static class TidTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, Tid struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; oprot.writeString(struct.name); - BitSet optionals = new BitSet(); + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetDomain()) { optionals.set(0); } @@ -1033,7 +1021,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, Tid struct) throws if (struct.isSetExtraMap()) { { oprot.writeI32(struct.extraMap.size()); - for (Map.Entry _iter64 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter64 : struct.extraMap.entrySet()) { oprot.writeString(_iter64.getKey()); oprot.writeString(_iter64.getValue()); @@ -1044,10 +1032,10 @@ public void write(org.apache.thrift.protocol.TProtocol prot, Tid struct) throws @Override public void read(org.apache.thrift.protocol.TProtocol prot, Tid struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.name = iprot.readString(); struct.setNameIsSet(true); - BitSet incoming = iprot.readBitSet(5); + java.util.BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.domain = iprot.readString(); struct.setDomainIsSet(true); @@ -1062,9 +1050,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, Tid struct) throws o } if (incoming.get(3)) { { - org.apache.thrift.protocol.TList _list65 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.extraList = new ArrayList(_list65.size); - TimNode _elem66; + org.apache.thrift.protocol.TList _list65 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); + struct.extraList = new java.util.ArrayList(_list65.size); + @org.apache.thrift.annotation.Nullable TimNode _elem66; for (int _i67 = 0; _i67 < _list65.size; ++_i67) { _elem66 = new TimNode(); @@ -1076,10 +1064,10 @@ public void read(org.apache.thrift.protocol.TProtocol prot, Tid struct) throws o } if (incoming.get(4)) { { - org.apache.thrift.protocol.TMap _map68 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.extraMap = new HashMap(2*_map68.size); - String _key69; - String _val70; + org.apache.thrift.protocol.TMap _map68 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.extraMap = new java.util.HashMap(2*_map68.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key69; + @org.apache.thrift.annotation.Nullable java.lang.String _val70; for (int _i71 = 0; _i71 < _map68.size; ++_i71) { _key69 = iprot.readString(); @@ -1092,5 +1080,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, Tid struct) throws o } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/TimAckBean.java b/protocols/gen-java/com/tim/packet/TimAckBean.java index da6e1bf..de12997 100644 --- a/protocols/gen-java/com/tim/packet/TimAckBean.java +++ b/protocols/gen-java/com/tim/packet/TimAckBean.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class TimAckBean implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimAckBean"); @@ -45,33 +18,30 @@ public class TimAckBean implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TimAckBeanStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TimAckBeanTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TimAckBeanStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TimAckBeanTupleSchemeFactory(); /** * id,返回所要回执协议的线程id */ - public String id; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String id; // optional /** * 类型,自定义 如:ping,message等 */ - public String ackType; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String ackType; // optional /** * 状态,如成功,失败等 */ - public String ackStatus; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String ackStatus; // optional /** * 附加信息 */ - public List extraList; // optional + public @org.apache.thrift.annotation.Nullable java.util.List extraList; // optional /** * 错误信息 */ - public TimError err; // optional - public Map extraMap; // optional + public @org.apache.thrift.annotation.Nullable TimError err; // optional + public @org.apache.thrift.annotation.Nullable java.util.Map extraMap; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -97,10 +67,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ERR((short)5, "err"), EXTRA_MAP((short)6, "extraMap"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -108,6 +78,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // ID @@ -133,39 +104,42 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final _Fields optionals[] = {_Fields.ID,_Fields.ACK_TYPE,_Fields.ACK_STATUS,_Fields.EXTRA_LIST,_Fields.ERR,_Fields.EXTRA_MAP}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ACK_TYPE, new org.apache.thrift.meta_data.FieldMetaData("ackType", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -181,7 +155,7 @@ public String getFieldName() { new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimAckBean.class, metaDataMap); } @@ -202,7 +176,7 @@ public TimAckBean(TimAckBean other) { this.ackStatus = other.ackStatus; } if (other.isSetExtraList()) { - List __this__extraList = new ArrayList(other.extraList.size()); + java.util.List __this__extraList = new java.util.ArrayList(other.extraList.size()); for (TimNode other_element : other.extraList) { __this__extraList.add(new TimNode(other_element)); } @@ -212,11 +186,12 @@ public TimAckBean(TimAckBean other) { this.err = new TimError(other.err); } if (other.isSetExtraMap()) { - Map __this__extraMap = new HashMap(other.extraMap); + java.util.Map __this__extraMap = new java.util.HashMap(other.extraMap); this.extraMap = __this__extraMap; } } + @Override public TimAckBean deepCopy() { return new TimAckBean(this); } @@ -234,14 +209,15 @@ public void clear() { /** * id,返回所要回执协议的线程id */ - public String getId() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getId() { return this.id; } /** * id,返回所要回执协议的线程id */ - public TimAckBean setId(String id) { + public TimAckBean setId(@org.apache.thrift.annotation.Nullable java.lang.String id) { this.id = id; return this; } @@ -264,14 +240,15 @@ public void setIdIsSet(boolean value) { /** * 类型,自定义 如:ping,message等 */ - public String getAckType() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getAckType() { return this.ackType; } /** * 类型,自定义 如:ping,message等 */ - public TimAckBean setAckType(String ackType) { + public TimAckBean setAckType(@org.apache.thrift.annotation.Nullable java.lang.String ackType) { this.ackType = ackType; return this; } @@ -294,14 +271,15 @@ public void setAckTypeIsSet(boolean value) { /** * 状态,如成功,失败等 */ - public String getAckStatus() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getAckStatus() { return this.ackStatus; } /** * 状态,如成功,失败等 */ - public TimAckBean setAckStatus(String ackStatus) { + public TimAckBean setAckStatus(@org.apache.thrift.annotation.Nullable java.lang.String ackStatus) { this.ackStatus = ackStatus; return this; } @@ -325,13 +303,14 @@ public int getExtraListSize() { return (this.extraList == null) ? 0 : this.extraList.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getExtraListIterator() { return (this.extraList == null) ? null : this.extraList.iterator(); } public void addToExtraList(TimNode elem) { if (this.extraList == null) { - this.extraList = new ArrayList(); + this.extraList = new java.util.ArrayList(); } this.extraList.add(elem); } @@ -339,14 +318,15 @@ public void addToExtraList(TimNode elem) { /** * 附加信息 */ - public List getExtraList() { + @org.apache.thrift.annotation.Nullable + public java.util.List getExtraList() { return this.extraList; } /** * 附加信息 */ - public TimAckBean setExtraList(List extraList) { + public TimAckBean setExtraList(@org.apache.thrift.annotation.Nullable java.util.List extraList) { this.extraList = extraList; return this; } @@ -369,6 +349,7 @@ public void setExtraListIsSet(boolean value) { /** * 错误信息 */ + @org.apache.thrift.annotation.Nullable public TimError getErr() { return this.err; } @@ -376,7 +357,7 @@ public TimError getErr() { /** * 错误信息 */ - public TimAckBean setErr(TimError err) { + public TimAckBean setErr(@org.apache.thrift.annotation.Nullable TimError err) { this.err = err; return this; } @@ -400,18 +381,19 @@ public int getExtraMapSize() { return (this.extraMap == null) ? 0 : this.extraMap.size(); } - public void putToExtraMap(String key, String val) { + public void putToExtraMap(java.lang.String key, java.lang.String val) { if (this.extraMap == null) { - this.extraMap = new HashMap(); + this.extraMap = new java.util.HashMap(); } this.extraMap.put(key, val); } - public Map getExtraMap() { + @org.apache.thrift.annotation.Nullable + public java.util.Map getExtraMap() { return this.extraMap; } - public TimAckBean setExtraMap(Map extraMap) { + public TimAckBean setExtraMap(@org.apache.thrift.annotation.Nullable java.util.Map extraMap) { this.extraMap = extraMap; return this; } @@ -431,13 +413,14 @@ public void setExtraMapIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case ID: if (value == null) { unsetId(); } else { - setId((String)value); + setId((java.lang.String)value); } break; @@ -445,7 +428,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetAckType(); } else { - setAckType((String)value); + setAckType((java.lang.String)value); } break; @@ -453,7 +436,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetAckStatus(); } else { - setAckStatus((String)value); + setAckStatus((java.lang.String)value); } break; @@ -461,7 +444,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraList(); } else { - setExtraList((List)value); + setExtraList((java.util.List)value); } break; @@ -477,14 +460,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraMap(); } else { - setExtraMap((Map)value); + setExtraMap((java.util.Map)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case ID: return getId(); @@ -505,13 +490,14 @@ public Object getFieldValue(_Fields field) { return getExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -528,13 +514,11 @@ public boolean isSet(_Fields field) { case EXTRA_MAP: return isSetExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof TimAckBean) return this.equals((TimAckBean)that); return false; @@ -543,6 +527,8 @@ public boolean equals(Object that) { public boolean equals(TimAckBean that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_id = true && this.isSetId(); boolean that_present_id = true && that.isSetId(); @@ -603,39 +589,33 @@ public boolean equals(TimAckBean that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_id = true && (isSetId()); - list.add(present_id); - if (present_id) - list.add(id); - - boolean present_ackType = true && (isSetAckType()); - list.add(present_ackType); - if (present_ackType) - list.add(ackType); - - boolean present_ackStatus = true && (isSetAckStatus()); - list.add(present_ackStatus); - if (present_ackStatus) - list.add(ackStatus); - - boolean present_extraList = true && (isSetExtraList()); - list.add(present_extraList); - if (present_extraList) - list.add(extraList); - - boolean present_err = true && (isSetErr()); - list.add(present_err); - if (present_err) - list.add(err); - - boolean present_extraMap = true && (isSetExtraMap()); - list.add(present_extraMap); - if (present_extraMap) - list.add(extraMap); - - return list.hashCode(); + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetId()) ? 131071 : 524287); + if (isSetId()) + hashCode = hashCode * 8191 + id.hashCode(); + + hashCode = hashCode * 8191 + ((isSetAckType()) ? 131071 : 524287); + if (isSetAckType()) + hashCode = hashCode * 8191 + ackType.hashCode(); + + hashCode = hashCode * 8191 + ((isSetAckStatus()) ? 131071 : 524287); + if (isSetAckStatus()) + hashCode = hashCode * 8191 + ackStatus.hashCode(); + + hashCode = hashCode * 8191 + ((isSetExtraList()) ? 131071 : 524287); + if (isSetExtraList()) + hashCode = hashCode * 8191 + extraList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetErr()) ? 131071 : 524287); + if (isSetErr()) + hashCode = hashCode * 8191 + err.hashCode(); + + hashCode = hashCode * 8191 + ((isSetExtraMap()) ? 131071 : 524287); + if (isSetExtraMap()) + hashCode = hashCode * 8191 + extraMap.hashCode(); + + return hashCode; } @Override @@ -646,7 +626,7 @@ public int compareTo(TimAckBean other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); + lastComparison = java.lang.Boolean.compare(isSetId(), other.isSetId()); if (lastComparison != 0) { return lastComparison; } @@ -656,7 +636,7 @@ public int compareTo(TimAckBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetAckType()).compareTo(other.isSetAckType()); + lastComparison = java.lang.Boolean.compare(isSetAckType(), other.isSetAckType()); if (lastComparison != 0) { return lastComparison; } @@ -666,7 +646,7 @@ public int compareTo(TimAckBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetAckStatus()).compareTo(other.isSetAckStatus()); + lastComparison = java.lang.Boolean.compare(isSetAckStatus(), other.isSetAckStatus()); if (lastComparison != 0) { return lastComparison; } @@ -676,7 +656,7 @@ public int compareTo(TimAckBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraList()).compareTo(other.isSetExtraList()); + lastComparison = java.lang.Boolean.compare(isSetExtraList(), other.isSetExtraList()); if (lastComparison != 0) { return lastComparison; } @@ -686,7 +666,7 @@ public int compareTo(TimAckBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetErr()).compareTo(other.isSetErr()); + lastComparison = java.lang.Boolean.compare(isSetErr(), other.isSetErr()); if (lastComparison != 0) { return lastComparison; } @@ -696,7 +676,7 @@ public int compareTo(TimAckBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraMap()).compareTo(other.isSetExtraMap()); + lastComparison = java.lang.Boolean.compare(isSetExtraMap(), other.isSetExtraMap()); if (lastComparison != 0) { return lastComparison; } @@ -709,21 +689,25 @@ public int compareTo(TimAckBean other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("TimAckBean("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TimAckBean("); boolean first = true; if (isSetId()) { @@ -805,7 +789,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -813,14 +797,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TimAckBeanStandardSchemeFactory implements SchemeFactory { + private static class TimAckBeanStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimAckBeanStandardScheme getScheme() { return new TimAckBeanStandardScheme(); } } - private static class TimAckBeanStandardScheme extends StandardScheme { + private static class TimAckBeanStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TimAckBean struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -859,8 +845,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimAckBean struct) if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); - struct.extraList = new ArrayList(_list0.size); - TimNode _elem1; + struct.extraList = new java.util.ArrayList(_list0.size); + @org.apache.thrift.annotation.Nullable TimNode _elem1; for (int _i2 = 0; _i2 < _list0.size; ++_i2) { _elem1 = new TimNode(); @@ -887,9 +873,9 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimAckBean struct) if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map3 = iprot.readMapBegin(); - struct.extraMap = new HashMap(2*_map3.size); - String _key4; - String _val5; + struct.extraMap = new java.util.HashMap(2*_map3.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key4; + @org.apache.thrift.annotation.Nullable java.lang.String _val5; for (int _i6 = 0; _i6 < _map3.size; ++_i6) { _key4 = iprot.readString(); @@ -914,6 +900,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimAckBean struct) struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TimAckBean struct) throws org.apache.thrift.TException { struct.validate(); @@ -965,7 +952,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimAckBean struct) oprot.writeFieldBegin(EXTRA_MAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.extraMap.size())); - for (Map.Entry _iter8 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter8 : struct.extraMap.entrySet()) { oprot.writeString(_iter8.getKey()); oprot.writeString(_iter8.getValue()); @@ -981,18 +968,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimAckBean struct) } - private static class TimAckBeanTupleSchemeFactory implements SchemeFactory { + private static class TimAckBeanTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimAckBeanTupleScheme getScheme() { return new TimAckBeanTupleScheme(); } } - private static class TimAckBeanTupleScheme extends TupleScheme { + private static class TimAckBeanTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TimAckBean struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetId()) { optionals.set(0); } @@ -1036,7 +1024,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimAckBean struct) if (struct.isSetExtraMap()) { { oprot.writeI32(struct.extraMap.size()); - for (Map.Entry _iter10 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter10 : struct.extraMap.entrySet()) { oprot.writeString(_iter10.getKey()); oprot.writeString(_iter10.getValue()); @@ -1047,8 +1035,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimAckBean struct) @Override public void read(org.apache.thrift.protocol.TProtocol prot, TimAckBean struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(6); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(6); if (incoming.get(0)) { struct.id = iprot.readString(); struct.setIdIsSet(true); @@ -1063,9 +1051,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimAckBean struct) t } if (incoming.get(3)) { { - org.apache.thrift.protocol.TList _list11 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.extraList = new ArrayList(_list11.size); - TimNode _elem12; + org.apache.thrift.protocol.TList _list11 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); + struct.extraList = new java.util.ArrayList(_list11.size); + @org.apache.thrift.annotation.Nullable TimNode _elem12; for (int _i13 = 0; _i13 < _list11.size; ++_i13) { _elem12 = new TimNode(); @@ -1082,10 +1070,10 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimAckBean struct) t } if (incoming.get(5)) { { - org.apache.thrift.protocol.TMap _map14 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.extraMap = new HashMap(2*_map14.size); - String _key15; - String _val16; + org.apache.thrift.protocol.TMap _map14 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.extraMap = new java.util.HashMap(2*_map14.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key15; + @org.apache.thrift.annotation.Nullable java.lang.String _val16; for (int _i17 = 0; _i17 < _map14.size; ++_i17) { _key15 = iprot.readString(); @@ -1098,5 +1086,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimAckBean struct) t } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/TimArea.java b/protocols/gen-java/com/tim/packet/TimArea.java index 3bca1ee..6b2ed2f 100644 --- a/protocols/gen-java/com/tim/packet/TimArea.java +++ b/protocols/gen-java/com/tim/packet/TimArea.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class TimArea implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimArea"); @@ -44,29 +17,26 @@ public class TimArea implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TimAreaStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TimAreaTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TimAreaStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TimAreaTupleSchemeFactory(); /** * 国家 */ - public String country; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String country; // optional /** * 省 */ - public String province; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String province; // optional /** * 市 */ - public String city; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String city; // optional /** * 附加信息:如区,镇,乡等 */ - public List extraList; // optional - public Map extraMap; // optional + public @org.apache.thrift.annotation.Nullable java.util.List extraList; // optional + public @org.apache.thrift.annotation.Nullable java.util.Map extraMap; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -88,10 +58,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { EXTRA_LIST((short)4, "extraList"), EXTRA_MAP((short)5, "extraMap"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -99,6 +69,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // COUNTRY @@ -122,39 +93,42 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final _Fields optionals[] = {_Fields.COUNTRY,_Fields.PROVINCE,_Fields.CITY,_Fields.EXTRA_LIST,_Fields.EXTRA_MAP}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.COUNTRY, new org.apache.thrift.meta_data.FieldMetaData("country", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PROVINCE, new org.apache.thrift.meta_data.FieldMetaData("province", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -168,7 +142,7 @@ public String getFieldName() { new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimArea.class, metaDataMap); } @@ -189,18 +163,19 @@ public TimArea(TimArea other) { this.city = other.city; } if (other.isSetExtraList()) { - List __this__extraList = new ArrayList(other.extraList.size()); + java.util.List __this__extraList = new java.util.ArrayList(other.extraList.size()); for (TimNode other_element : other.extraList) { __this__extraList.add(new TimNode(other_element)); } this.extraList = __this__extraList; } if (other.isSetExtraMap()) { - Map __this__extraMap = new HashMap(other.extraMap); + java.util.Map __this__extraMap = new java.util.HashMap(other.extraMap); this.extraMap = __this__extraMap; } } + @Override public TimArea deepCopy() { return new TimArea(this); } @@ -217,14 +192,15 @@ public void clear() { /** * 国家 */ - public String getCountry() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getCountry() { return this.country; } /** * 国家 */ - public TimArea setCountry(String country) { + public TimArea setCountry(@org.apache.thrift.annotation.Nullable java.lang.String country) { this.country = country; return this; } @@ -247,14 +223,15 @@ public void setCountryIsSet(boolean value) { /** * 省 */ - public String getProvince() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getProvince() { return this.province; } /** * 省 */ - public TimArea setProvince(String province) { + public TimArea setProvince(@org.apache.thrift.annotation.Nullable java.lang.String province) { this.province = province; return this; } @@ -277,14 +254,15 @@ public void setProvinceIsSet(boolean value) { /** * 市 */ - public String getCity() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getCity() { return this.city; } /** * 市 */ - public TimArea setCity(String city) { + public TimArea setCity(@org.apache.thrift.annotation.Nullable java.lang.String city) { this.city = city; return this; } @@ -308,13 +286,14 @@ public int getExtraListSize() { return (this.extraList == null) ? 0 : this.extraList.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getExtraListIterator() { return (this.extraList == null) ? null : this.extraList.iterator(); } public void addToExtraList(TimNode elem) { if (this.extraList == null) { - this.extraList = new ArrayList(); + this.extraList = new java.util.ArrayList(); } this.extraList.add(elem); } @@ -322,14 +301,15 @@ public void addToExtraList(TimNode elem) { /** * 附加信息:如区,镇,乡等 */ - public List getExtraList() { + @org.apache.thrift.annotation.Nullable + public java.util.List getExtraList() { return this.extraList; } /** * 附加信息:如区,镇,乡等 */ - public TimArea setExtraList(List extraList) { + public TimArea setExtraList(@org.apache.thrift.annotation.Nullable java.util.List extraList) { this.extraList = extraList; return this; } @@ -353,18 +333,19 @@ public int getExtraMapSize() { return (this.extraMap == null) ? 0 : this.extraMap.size(); } - public void putToExtraMap(String key, String val) { + public void putToExtraMap(java.lang.String key, java.lang.String val) { if (this.extraMap == null) { - this.extraMap = new HashMap(); + this.extraMap = new java.util.HashMap(); } this.extraMap.put(key, val); } - public Map getExtraMap() { + @org.apache.thrift.annotation.Nullable + public java.util.Map getExtraMap() { return this.extraMap; } - public TimArea setExtraMap(Map extraMap) { + public TimArea setExtraMap(@org.apache.thrift.annotation.Nullable java.util.Map extraMap) { this.extraMap = extraMap; return this; } @@ -384,13 +365,14 @@ public void setExtraMapIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case COUNTRY: if (value == null) { unsetCountry(); } else { - setCountry((String)value); + setCountry((java.lang.String)value); } break; @@ -398,7 +380,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetProvince(); } else { - setProvince((String)value); + setProvince((java.lang.String)value); } break; @@ -406,7 +388,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetCity(); } else { - setCity((String)value); + setCity((java.lang.String)value); } break; @@ -414,7 +396,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraList(); } else { - setExtraList((List)value); + setExtraList((java.util.List)value); } break; @@ -422,14 +404,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraMap(); } else { - setExtraMap((Map)value); + setExtraMap((java.util.Map)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case COUNTRY: return getCountry(); @@ -447,13 +431,14 @@ public Object getFieldValue(_Fields field) { return getExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -468,13 +453,11 @@ public boolean isSet(_Fields field) { case EXTRA_MAP: return isSetExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof TimArea) return this.equals((TimArea)that); return false; @@ -483,6 +466,8 @@ public boolean equals(Object that) { public boolean equals(TimArea that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_country = true && this.isSetCountry(); boolean that_present_country = true && that.isSetCountry(); @@ -534,34 +519,29 @@ public boolean equals(TimArea that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_country = true && (isSetCountry()); - list.add(present_country); - if (present_country) - list.add(country); + hashCode = hashCode * 8191 + ((isSetCountry()) ? 131071 : 524287); + if (isSetCountry()) + hashCode = hashCode * 8191 + country.hashCode(); - boolean present_province = true && (isSetProvince()); - list.add(present_province); - if (present_province) - list.add(province); + hashCode = hashCode * 8191 + ((isSetProvince()) ? 131071 : 524287); + if (isSetProvince()) + hashCode = hashCode * 8191 + province.hashCode(); - boolean present_city = true && (isSetCity()); - list.add(present_city); - if (present_city) - list.add(city); + hashCode = hashCode * 8191 + ((isSetCity()) ? 131071 : 524287); + if (isSetCity()) + hashCode = hashCode * 8191 + city.hashCode(); - boolean present_extraList = true && (isSetExtraList()); - list.add(present_extraList); - if (present_extraList) - list.add(extraList); + hashCode = hashCode * 8191 + ((isSetExtraList()) ? 131071 : 524287); + if (isSetExtraList()) + hashCode = hashCode * 8191 + extraList.hashCode(); - boolean present_extraMap = true && (isSetExtraMap()); - list.add(present_extraMap); - if (present_extraMap) - list.add(extraMap); + hashCode = hashCode * 8191 + ((isSetExtraMap()) ? 131071 : 524287); + if (isSetExtraMap()) + hashCode = hashCode * 8191 + extraMap.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -572,7 +552,7 @@ public int compareTo(TimArea other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetCountry()).compareTo(other.isSetCountry()); + lastComparison = java.lang.Boolean.compare(isSetCountry(), other.isSetCountry()); if (lastComparison != 0) { return lastComparison; } @@ -582,7 +562,7 @@ public int compareTo(TimArea other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetProvince()).compareTo(other.isSetProvince()); + lastComparison = java.lang.Boolean.compare(isSetProvince(), other.isSetProvince()); if (lastComparison != 0) { return lastComparison; } @@ -592,7 +572,7 @@ public int compareTo(TimArea other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetCity()).compareTo(other.isSetCity()); + lastComparison = java.lang.Boolean.compare(isSetCity(), other.isSetCity()); if (lastComparison != 0) { return lastComparison; } @@ -602,7 +582,7 @@ public int compareTo(TimArea other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraList()).compareTo(other.isSetExtraList()); + lastComparison = java.lang.Boolean.compare(isSetExtraList(), other.isSetExtraList()); if (lastComparison != 0) { return lastComparison; } @@ -612,7 +592,7 @@ public int compareTo(TimArea other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraMap()).compareTo(other.isSetExtraMap()); + lastComparison = java.lang.Boolean.compare(isSetExtraMap(), other.isSetExtraMap()); if (lastComparison != 0) { return lastComparison; } @@ -625,21 +605,25 @@ public int compareTo(TimArea other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("TimArea("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TimArea("); boolean first = true; if (isSetCountry()) { @@ -708,7 +692,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -716,14 +700,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TimAreaStandardSchemeFactory implements SchemeFactory { + private static class TimAreaStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimAreaStandardScheme getScheme() { return new TimAreaStandardScheme(); } } - private static class TimAreaStandardScheme extends StandardScheme { + private static class TimAreaStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TimArea struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -762,8 +748,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimArea struct) thr if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list36 = iprot.readListBegin(); - struct.extraList = new ArrayList(_list36.size); - TimNode _elem37; + struct.extraList = new java.util.ArrayList(_list36.size); + @org.apache.thrift.annotation.Nullable TimNode _elem37; for (int _i38 = 0; _i38 < _list36.size; ++_i38) { _elem37 = new TimNode(); @@ -781,9 +767,9 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimArea struct) thr if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map39 = iprot.readMapBegin(); - struct.extraMap = new HashMap(2*_map39.size); - String _key40; - String _val41; + struct.extraMap = new java.util.HashMap(2*_map39.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key40; + @org.apache.thrift.annotation.Nullable java.lang.String _val41; for (int _i42 = 0; _i42 < _map39.size; ++_i42) { _key40 = iprot.readString(); @@ -808,6 +794,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimArea struct) thr struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TimArea struct) throws org.apache.thrift.TException { struct.validate(); @@ -852,7 +839,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimArea struct) th oprot.writeFieldBegin(EXTRA_MAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.extraMap.size())); - for (Map.Entry _iter44 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter44 : struct.extraMap.entrySet()) { oprot.writeString(_iter44.getKey()); oprot.writeString(_iter44.getValue()); @@ -868,18 +855,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimArea struct) th } - private static class TimAreaTupleSchemeFactory implements SchemeFactory { + private static class TimAreaTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimAreaTupleScheme getScheme() { return new TimAreaTupleScheme(); } } - private static class TimAreaTupleScheme extends TupleScheme { + private static class TimAreaTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TimArea struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetCountry()) { optionals.set(0); } @@ -917,7 +905,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimArea struct) thr if (struct.isSetExtraMap()) { { oprot.writeI32(struct.extraMap.size()); - for (Map.Entry _iter46 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter46 : struct.extraMap.entrySet()) { oprot.writeString(_iter46.getKey()); oprot.writeString(_iter46.getValue()); @@ -928,8 +916,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimArea struct) thr @Override public void read(org.apache.thrift.protocol.TProtocol prot, TimArea struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(5); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(5); if (incoming.get(0)) { struct.country = iprot.readString(); struct.setCountryIsSet(true); @@ -944,9 +932,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimArea struct) thro } if (incoming.get(3)) { { - org.apache.thrift.protocol.TList _list47 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.extraList = new ArrayList(_list47.size); - TimNode _elem48; + org.apache.thrift.protocol.TList _list47 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); + struct.extraList = new java.util.ArrayList(_list47.size); + @org.apache.thrift.annotation.Nullable TimNode _elem48; for (int _i49 = 0; _i49 < _list47.size; ++_i49) { _elem48 = new TimNode(); @@ -958,10 +946,10 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimArea struct) thro } if (incoming.get(4)) { { - org.apache.thrift.protocol.TMap _map50 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.extraMap = new HashMap(2*_map50.size); - String _key51; - String _val52; + org.apache.thrift.protocol.TMap _map50 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.extraMap = new java.util.HashMap(2*_map50.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key51; + @org.apache.thrift.annotation.Nullable java.lang.String _val52; for (int _i53 = 0; _i53 < _map50.size; ++_i53) { _key51 = iprot.readString(); @@ -974,5 +962,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimArea struct) thro } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/TimAuth.java b/protocols/gen-java/com/tim/packet/TimAuth.java index 6f632fe..f21efe6 100644 --- a/protocols/gen-java/com/tim/packet/TimAuth.java +++ b/protocols/gen-java/com/tim/packet/TimAuth.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class TimAuth implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimAuth"); @@ -42,24 +15,21 @@ public class TimAuth implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TimAuthStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TimAuthTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TimAuthStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TimAuthTupleSchemeFactory(); /** * 域名 */ - public String domain; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String domain; // optional /** * 用户名 */ - public String username; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String username; // optional /** * 密码 */ - public String pwd; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String pwd; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -76,10 +46,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ PWD((short)3, "pwd"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -87,6 +57,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // DOMAIN @@ -106,46 +77,49 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final _Fields optionals[] = {_Fields.DOMAIN,_Fields.USERNAME,_Fields.PWD}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DOMAIN, new org.apache.thrift.meta_data.FieldMetaData("domain", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.PWD, new org.apache.thrift.meta_data.FieldMetaData("pwd", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimAuth.class, metaDataMap); } @@ -167,6 +141,7 @@ public TimAuth(TimAuth other) { } } + @Override public TimAuth deepCopy() { return new TimAuth(this); } @@ -181,14 +156,15 @@ public void clear() { /** * 域名 */ - public String getDomain() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getDomain() { return this.domain; } /** * 域名 */ - public TimAuth setDomain(String domain) { + public TimAuth setDomain(@org.apache.thrift.annotation.Nullable java.lang.String domain) { this.domain = domain; return this; } @@ -211,14 +187,15 @@ public void setDomainIsSet(boolean value) { /** * 用户名 */ - public String getUsername() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getUsername() { return this.username; } /** * 用户名 */ - public TimAuth setUsername(String username) { + public TimAuth setUsername(@org.apache.thrift.annotation.Nullable java.lang.String username) { this.username = username; return this; } @@ -241,14 +218,15 @@ public void setUsernameIsSet(boolean value) { /** * 密码 */ - public String getPwd() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getPwd() { return this.pwd; } /** * 密码 */ - public TimAuth setPwd(String pwd) { + public TimAuth setPwd(@org.apache.thrift.annotation.Nullable java.lang.String pwd) { this.pwd = pwd; return this; } @@ -268,13 +246,14 @@ public void setPwdIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case DOMAIN: if (value == null) { unsetDomain(); } else { - setDomain((String)value); + setDomain((java.lang.String)value); } break; @@ -282,7 +261,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetUsername(); } else { - setUsername((String)value); + setUsername((java.lang.String)value); } break; @@ -290,14 +269,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetPwd(); } else { - setPwd((String)value); + setPwd((java.lang.String)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case DOMAIN: return getDomain(); @@ -309,13 +290,14 @@ public Object getFieldValue(_Fields field) { return getPwd(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -326,13 +308,11 @@ public boolean isSet(_Fields field) { case PWD: return isSetPwd(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof TimAuth) return this.equals((TimAuth)that); return false; @@ -341,6 +321,8 @@ public boolean equals(Object that) { public boolean equals(TimAuth that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_domain = true && this.isSetDomain(); boolean that_present_domain = true && that.isSetDomain(); @@ -374,24 +356,21 @@ public boolean equals(TimAuth that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_domain = true && (isSetDomain()); - list.add(present_domain); - if (present_domain) - list.add(domain); + hashCode = hashCode * 8191 + ((isSetDomain()) ? 131071 : 524287); + if (isSetDomain()) + hashCode = hashCode * 8191 + domain.hashCode(); - boolean present_username = true && (isSetUsername()); - list.add(present_username); - if (present_username) - list.add(username); + hashCode = hashCode * 8191 + ((isSetUsername()) ? 131071 : 524287); + if (isSetUsername()) + hashCode = hashCode * 8191 + username.hashCode(); - boolean present_pwd = true && (isSetPwd()); - list.add(present_pwd); - if (present_pwd) - list.add(pwd); + hashCode = hashCode * 8191 + ((isSetPwd()) ? 131071 : 524287); + if (isSetPwd()) + hashCode = hashCode * 8191 + pwd.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -402,7 +381,7 @@ public int compareTo(TimAuth other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetDomain()).compareTo(other.isSetDomain()); + lastComparison = java.lang.Boolean.compare(isSetDomain(), other.isSetDomain()); if (lastComparison != 0) { return lastComparison; } @@ -412,7 +391,7 @@ public int compareTo(TimAuth other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername()); + lastComparison = java.lang.Boolean.compare(isSetUsername(), other.isSetUsername()); if (lastComparison != 0) { return lastComparison; } @@ -422,7 +401,7 @@ public int compareTo(TimAuth other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPwd()).compareTo(other.isSetPwd()); + lastComparison = java.lang.Boolean.compare(isSetPwd(), other.isSetPwd()); if (lastComparison != 0) { return lastComparison; } @@ -435,21 +414,25 @@ public int compareTo(TimAuth other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("TimAuth("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TimAuth("); boolean first = true; if (isSetDomain()) { @@ -498,7 +481,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -506,14 +489,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TimAuthStandardSchemeFactory implements SchemeFactory { + private static class TimAuthStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimAuthStandardScheme getScheme() { return new TimAuthStandardScheme(); } } - private static class TimAuthStandardScheme extends StandardScheme { + private static class TimAuthStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TimAuth struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -559,6 +544,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimAuth struct) thr struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TimAuth struct) throws org.apache.thrift.TException { struct.validate(); @@ -590,18 +576,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimAuth struct) th } - private static class TimAuthTupleSchemeFactory implements SchemeFactory { + private static class TimAuthTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimAuthTupleScheme getScheme() { return new TimAuthTupleScheme(); } } - private static class TimAuthTupleScheme extends TupleScheme { + private static class TimAuthTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TimAuth struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetDomain()) { optionals.set(0); } @@ -625,8 +612,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimAuth struct) thr @Override public void read(org.apache.thrift.protocol.TProtocol prot, TimAuth struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.domain = iprot.readString(); struct.setDomainIsSet(true); @@ -642,5 +629,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimAuth struct) thro } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/TimError.java b/protocols/gen-java/com/tim/packet/TimError.java index 1a70fd5..4e2e0cf 100644 --- a/protocols/gen-java/com/tim/packet/TimError.java +++ b/protocols/gen-java/com/tim/packet/TimError.java @@ -1,51 +1,21 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class TimError implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimError"); private static final org.apache.thrift.protocol.TField ERR_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("errCode", org.apache.thrift.protocol.TType.I32, (short)1); private static final org.apache.thrift.protocol.TField ERR_MSG_FIELD_DESC = new org.apache.thrift.protocol.TField("errMsg", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TimErrorStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TimErrorTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TimErrorStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TimErrorTupleSchemeFactory(); /** * 错误码 @@ -54,7 +24,7 @@ public class TimError implements org.apache.thrift.TBase byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -78,6 +48,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // ERR_CODE @@ -95,30 +66,33 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } @@ -127,14 +101,14 @@ public String getFieldName() { private static final int __ERRCODE_ISSET_ID = 0; private byte __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.ERR_CODE,_Fields.ERR_MSG}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.ERR_CODE, new org.apache.thrift.meta_data.FieldMetaData("errCode", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.ERR_MSG, new org.apache.thrift.meta_data.FieldMetaData("errMsg", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimError.class, metaDataMap); } @@ -152,6 +126,7 @@ public TimError(TimError other) { } } + @Override public TimError deepCopy() { return new TimError(this); } @@ -180,29 +155,30 @@ public TimError setErrCode(int errCode) { } public void unsetErrCode() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ERRCODE_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ERRCODE_ISSET_ID); } /** Returns true if field errCode is set (has been assigned a value) and false otherwise */ public boolean isSetErrCode() { - return EncodingUtils.testBit(__isset_bitfield, __ERRCODE_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ERRCODE_ISSET_ID); } public void setErrCodeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ERRCODE_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ERRCODE_ISSET_ID, value); } /** * 错误内容 */ - public String getErrMsg() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getErrMsg() { return this.errMsg; } /** * 错误内容 */ - public TimError setErrMsg(String errMsg) { + public TimError setErrMsg(@org.apache.thrift.annotation.Nullable java.lang.String errMsg) { this.errMsg = errMsg; return this; } @@ -222,13 +198,14 @@ public void setErrMsgIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case ERR_CODE: if (value == null) { unsetErrCode(); } else { - setErrCode((Integer)value); + setErrCode((java.lang.Integer)value); } break; @@ -236,14 +213,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetErrMsg(); } else { - setErrMsg((String)value); + setErrMsg((java.lang.String)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case ERR_CODE: return getErrCode(); @@ -252,13 +231,14 @@ public Object getFieldValue(_Fields field) { return getErrMsg(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -267,13 +247,11 @@ public boolean isSet(_Fields field) { case ERR_MSG: return isSetErrMsg(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof TimError) return this.equals((TimError)that); return false; @@ -282,6 +260,8 @@ public boolean equals(Object that) { public boolean equals(TimError that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_errCode = true && this.isSetErrCode(); boolean that_present_errCode = true && that.isSetErrCode(); @@ -306,19 +286,17 @@ public boolean equals(TimError that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_errCode = true && (isSetErrCode()); - list.add(present_errCode); - if (present_errCode) - list.add(errCode); + hashCode = hashCode * 8191 + ((isSetErrCode()) ? 131071 : 524287); + if (isSetErrCode()) + hashCode = hashCode * 8191 + errCode; - boolean present_errMsg = true && (isSetErrMsg()); - list.add(present_errMsg); - if (present_errMsg) - list.add(errMsg); + hashCode = hashCode * 8191 + ((isSetErrMsg()) ? 131071 : 524287); + if (isSetErrMsg()) + hashCode = hashCode * 8191 + errMsg.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -329,7 +307,7 @@ public int compareTo(TimError other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetErrCode()).compareTo(other.isSetErrCode()); + lastComparison = java.lang.Boolean.compare(isSetErrCode(), other.isSetErrCode()); if (lastComparison != 0) { return lastComparison; } @@ -339,7 +317,7 @@ public int compareTo(TimError other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetErrMsg()).compareTo(other.isSetErrMsg()); + lastComparison = java.lang.Boolean.compare(isSetErrMsg(), other.isSetErrMsg()); if (lastComparison != 0) { return lastComparison; } @@ -352,21 +330,25 @@ public int compareTo(TimError other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("TimError("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TimError("); boolean first = true; if (isSetErrCode()) { @@ -401,7 +383,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; @@ -411,14 +393,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TimErrorStandardSchemeFactory implements SchemeFactory { + private static class TimErrorStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimErrorStandardScheme getScheme() { return new TimErrorStandardScheme(); } } - private static class TimErrorStandardScheme extends StandardScheme { + private static class TimErrorStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TimError struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -456,6 +440,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimError struct) th struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TimError struct) throws org.apache.thrift.TException { struct.validate(); @@ -478,18 +463,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimError struct) t } - private static class TimErrorTupleSchemeFactory implements SchemeFactory { + private static class TimErrorTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimErrorTupleScheme getScheme() { return new TimErrorTupleScheme(); } } - private static class TimErrorTupleScheme extends TupleScheme { + private static class TimErrorTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TimError struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetErrCode()) { optionals.set(0); } @@ -507,8 +493,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimError struct) th @Override public void read(org.apache.thrift.protocol.TProtocol prot, TimError struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.errCode = iprot.readI32(); struct.setErrCodeIsSet(true); @@ -520,5 +506,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimError struct) thr } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/TimHBean.java b/protocols/gen-java/com/tim/packet/TimHBean.java index 9e07b03..a75034a 100644 --- a/protocols/gen-java/com/tim/packet/TimHBean.java +++ b/protocols/gen-java/com/tim/packet/TimHBean.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class TimHBean implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimHBean"); @@ -42,11 +15,8 @@ public class TimHBean implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TimHBeanStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TimHBeanTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TimHBeanStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TimHBeanTupleSchemeFactory(); /** * 渠道 @@ -76,10 +46,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ VERSION((short)3, "version"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -87,6 +57,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // CHL @@ -106,30 +77,33 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } @@ -140,16 +114,16 @@ public String getFieldName() { private static final int __VERSION_ISSET_ID = 2; private byte __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.PLATFORM}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.CHL, new org.apache.thrift.meta_data.FieldMetaData("chl", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.PLATFORM, new org.apache.thrift.meta_data.FieldMetaData("platform", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimHBean.class, metaDataMap); } @@ -177,6 +151,7 @@ public TimHBean(TimHBean other) { this.version = other.version; } + @Override public TimHBean deepCopy() { return new TimHBean(this); } @@ -208,16 +183,16 @@ public TimHBean setChl(int chl) { } public void unsetChl() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CHL_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CHL_ISSET_ID); } /** Returns true if field chl is set (has been assigned a value) and false otherwise */ public boolean isSetChl() { - return EncodingUtils.testBit(__isset_bitfield, __CHL_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CHL_ISSET_ID); } public void setChlIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CHL_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CHL_ISSET_ID, value); } /** @@ -237,16 +212,16 @@ public TimHBean setPlatform(int platform) { } public void unsetPlatform() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PLATFORM_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PLATFORM_ISSET_ID); } /** Returns true if field platform is set (has been assigned a value) and false otherwise */ public boolean isSetPlatform() { - return EncodingUtils.testBit(__isset_bitfield, __PLATFORM_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PLATFORM_ISSET_ID); } public void setPlatformIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PLATFORM_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PLATFORM_ISSET_ID, value); } /** @@ -266,25 +241,26 @@ public TimHBean setVersion(short version) { } public void unsetVersion() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID); } /** Returns true if field version is set (has been assigned a value) and false otherwise */ public boolean isSetVersion() { - return EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID); } public void setVersionIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value); } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case CHL: if (value == null) { unsetChl(); } else { - setChl((Integer)value); + setChl((java.lang.Integer)value); } break; @@ -292,7 +268,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetPlatform(); } else { - setPlatform((Integer)value); + setPlatform((java.lang.Integer)value); } break; @@ -300,14 +276,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetVersion(); } else { - setVersion((Short)value); + setVersion((java.lang.Short)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case CHL: return getChl(); @@ -319,13 +297,14 @@ public Object getFieldValue(_Fields field) { return getVersion(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -336,13 +315,11 @@ public boolean isSet(_Fields field) { case VERSION: return isSetVersion(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof TimHBean) return this.equals((TimHBean)that); return false; @@ -351,6 +328,8 @@ public boolean equals(Object that) { public boolean equals(TimHBean that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_chl = true; boolean that_present_chl = true; @@ -384,24 +363,17 @@ public boolean equals(TimHBean that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_chl = true; - list.add(present_chl); - if (present_chl) - list.add(chl); + hashCode = hashCode * 8191 + chl; - boolean present_platform = true && (isSetPlatform()); - list.add(present_platform); - if (present_platform) - list.add(platform); + hashCode = hashCode * 8191 + ((isSetPlatform()) ? 131071 : 524287); + if (isSetPlatform()) + hashCode = hashCode * 8191 + platform; - boolean present_version = true; - list.add(present_version); - if (present_version) - list.add(version); + hashCode = hashCode * 8191 + version; - return list.hashCode(); + return hashCode; } @Override @@ -412,7 +384,7 @@ public int compareTo(TimHBean other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetChl()).compareTo(other.isSetChl()); + lastComparison = java.lang.Boolean.compare(isSetChl(), other.isSetChl()); if (lastComparison != 0) { return lastComparison; } @@ -422,7 +394,7 @@ public int compareTo(TimHBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPlatform()).compareTo(other.isSetPlatform()); + lastComparison = java.lang.Boolean.compare(isSetPlatform(), other.isSetPlatform()); if (lastComparison != 0) { return lastComparison; } @@ -432,7 +404,7 @@ public int compareTo(TimHBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion()); + lastComparison = java.lang.Boolean.compare(isSetVersion(), other.isSetVersion()); if (lastComparison != 0) { return lastComparison; } @@ -445,21 +417,25 @@ public int compareTo(TimHBean other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("TimHBean("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TimHBean("); boolean first = true; sb.append("chl:"); @@ -494,7 +470,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; @@ -504,14 +480,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TimHBeanStandardSchemeFactory implements SchemeFactory { + private static class TimHBeanStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimHBeanStandardScheme getScheme() { return new TimHBeanStandardScheme(); } } - private static class TimHBeanStandardScheme extends StandardScheme { + private static class TimHBeanStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TimHBean struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -563,6 +541,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimHBean struct) th struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TimHBean struct) throws org.apache.thrift.TException { struct.validate(); @@ -584,20 +563,21 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimHBean struct) t } - private static class TimHBeanTupleSchemeFactory implements SchemeFactory { + private static class TimHBeanTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimHBeanTupleScheme getScheme() { return new TimHBeanTupleScheme(); } } - private static class TimHBeanTupleScheme extends TupleScheme { + private static class TimHBeanTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TimHBean struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; oprot.writeI32(struct.chl); oprot.writeI16(struct.version); - BitSet optionals = new BitSet(); + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetPlatform()) { optionals.set(0); } @@ -609,12 +589,12 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimHBean struct) th @Override public void read(org.apache.thrift.protocol.TProtocol prot, TimHBean struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.chl = iprot.readI32(); struct.setChlIsSet(true); struct.version = iprot.readI16(); struct.setVersionIsSet(true); - BitSet incoming = iprot.readBitSet(1); + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.platform = iprot.readI32(); struct.setPlatformIsSet(true); @@ -622,5 +602,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimHBean struct) thr } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/TimIqBean.java b/protocols/gen-java/com/tim/packet/TimIqBean.java index 0af7de6..97d5ee0 100644 --- a/protocols/gen-java/com/tim/packet/TimIqBean.java +++ b/protocols/gen-java/com/tim/packet/TimIqBean.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class TimIqBean implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimIqBean"); @@ -46,34 +19,31 @@ public class TimIqBean implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TimIqBeanStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TimIqBeanTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TimIqBeanStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TimIqBeanTupleSchemeFactory(); /** * 线程id */ - public String threadId; // required - public Tid fromTid; // optional - public Tid toTid; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String threadId; // required + public @org.apache.thrift.annotation.Nullable Tid fromTid; // optional + public @org.apache.thrift.annotation.Nullable Tid toTid; // optional /** * Get :获取当前域值。类似于http get方法 * Set :设置或替换get查询的值。类似于http put方法。 * Result :说明成功的响应了先前的查询。类似于http状态码200。 * Error: 查询和响应中出现的错误。 */ - public String type; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String type; // optional /** * 扩展字段 */ - public List extraList; // optional + public @org.apache.thrift.annotation.Nullable java.util.List extraList; // optional /** * 错误码 */ - public TimError error; // optional - public Map extraMap; // optional + public @org.apache.thrift.annotation.Nullable TimError error; // optional + public @org.apache.thrift.annotation.Nullable java.util.Map extraMap; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -100,10 +70,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ERROR((short)6, "error"), EXTRA_MAP((short)7, "extraMap"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -111,6 +81,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // THREAD_ID @@ -138,39 +109,42 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final _Fields optionals[] = {_Fields.FROM_TID,_Fields.TO_TID,_Fields.TYPE,_Fields.EXTRA_LIST,_Fields.ERROR,_Fields.EXTRA_MAP}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.THREAD_ID, new org.apache.thrift.meta_data.FieldMetaData("threadId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.FROM_TID, new org.apache.thrift.meta_data.FieldMetaData("fromTid", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -188,7 +162,7 @@ public String getFieldName() { new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimIqBean.class, metaDataMap); } @@ -196,7 +170,7 @@ public TimIqBean() { } public TimIqBean( - String threadId) + java.lang.String threadId) { this(); this.threadId = threadId; @@ -219,7 +193,7 @@ public TimIqBean(TimIqBean other) { this.type = other.type; } if (other.isSetExtraList()) { - List __this__extraList = new ArrayList(other.extraList.size()); + java.util.List __this__extraList = new java.util.ArrayList(other.extraList.size()); for (TimNode other_element : other.extraList) { __this__extraList.add(new TimNode(other_element)); } @@ -229,11 +203,12 @@ public TimIqBean(TimIqBean other) { this.error = new TimError(other.error); } if (other.isSetExtraMap()) { - Map __this__extraMap = new HashMap(other.extraMap); + java.util.Map __this__extraMap = new java.util.HashMap(other.extraMap); this.extraMap = __this__extraMap; } } + @Override public TimIqBean deepCopy() { return new TimIqBean(this); } @@ -252,14 +227,15 @@ public void clear() { /** * 线程id */ - public String getThreadId() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getThreadId() { return this.threadId; } /** * 线程id */ - public TimIqBean setThreadId(String threadId) { + public TimIqBean setThreadId(@org.apache.thrift.annotation.Nullable java.lang.String threadId) { this.threadId = threadId; return this; } @@ -279,11 +255,12 @@ public void setThreadIdIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public Tid getFromTid() { return this.fromTid; } - public TimIqBean setFromTid(Tid fromTid) { + public TimIqBean setFromTid(@org.apache.thrift.annotation.Nullable Tid fromTid) { this.fromTid = fromTid; return this; } @@ -303,11 +280,12 @@ public void setFromTidIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public Tid getToTid() { return this.toTid; } - public TimIqBean setToTid(Tid toTid) { + public TimIqBean setToTid(@org.apache.thrift.annotation.Nullable Tid toTid) { this.toTid = toTid; return this; } @@ -333,7 +311,8 @@ public void setToTidIsSet(boolean value) { * Result :说明成功的响应了先前的查询。类似于http状态码200。 * Error: 查询和响应中出现的错误。 */ - public String getType() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getType() { return this.type; } @@ -343,7 +322,7 @@ public String getType() { * Result :说明成功的响应了先前的查询。类似于http状态码200。 * Error: 查询和响应中出现的错误。 */ - public TimIqBean setType(String type) { + public TimIqBean setType(@org.apache.thrift.annotation.Nullable java.lang.String type) { this.type = type; return this; } @@ -367,13 +346,14 @@ public int getExtraListSize() { return (this.extraList == null) ? 0 : this.extraList.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getExtraListIterator() { return (this.extraList == null) ? null : this.extraList.iterator(); } public void addToExtraList(TimNode elem) { if (this.extraList == null) { - this.extraList = new ArrayList(); + this.extraList = new java.util.ArrayList(); } this.extraList.add(elem); } @@ -381,14 +361,15 @@ public void addToExtraList(TimNode elem) { /** * 扩展字段 */ - public List getExtraList() { + @org.apache.thrift.annotation.Nullable + public java.util.List getExtraList() { return this.extraList; } /** * 扩展字段 */ - public TimIqBean setExtraList(List extraList) { + public TimIqBean setExtraList(@org.apache.thrift.annotation.Nullable java.util.List extraList) { this.extraList = extraList; return this; } @@ -411,6 +392,7 @@ public void setExtraListIsSet(boolean value) { /** * 错误码 */ + @org.apache.thrift.annotation.Nullable public TimError getError() { return this.error; } @@ -418,7 +400,7 @@ public TimError getError() { /** * 错误码 */ - public TimIqBean setError(TimError error) { + public TimIqBean setError(@org.apache.thrift.annotation.Nullable TimError error) { this.error = error; return this; } @@ -442,18 +424,19 @@ public int getExtraMapSize() { return (this.extraMap == null) ? 0 : this.extraMap.size(); } - public void putToExtraMap(String key, String val) { + public void putToExtraMap(java.lang.String key, java.lang.String val) { if (this.extraMap == null) { - this.extraMap = new HashMap(); + this.extraMap = new java.util.HashMap(); } this.extraMap.put(key, val); } - public Map getExtraMap() { + @org.apache.thrift.annotation.Nullable + public java.util.Map getExtraMap() { return this.extraMap; } - public TimIqBean setExtraMap(Map extraMap) { + public TimIqBean setExtraMap(@org.apache.thrift.annotation.Nullable java.util.Map extraMap) { this.extraMap = extraMap; return this; } @@ -473,13 +456,14 @@ public void setExtraMapIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case THREAD_ID: if (value == null) { unsetThreadId(); } else { - setThreadId((String)value); + setThreadId((java.lang.String)value); } break; @@ -503,7 +487,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetType(); } else { - setType((String)value); + setType((java.lang.String)value); } break; @@ -511,7 +495,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraList(); } else { - setExtraList((List)value); + setExtraList((java.util.List)value); } break; @@ -527,14 +511,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraMap(); } else { - setExtraMap((Map)value); + setExtraMap((java.util.Map)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case THREAD_ID: return getThreadId(); @@ -558,13 +544,14 @@ public Object getFieldValue(_Fields field) { return getExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -583,13 +570,11 @@ public boolean isSet(_Fields field) { case EXTRA_MAP: return isSetExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof TimIqBean) return this.equals((TimIqBean)that); return false; @@ -598,6 +583,8 @@ public boolean equals(Object that) { public boolean equals(TimIqBean that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_threadId = true && this.isSetThreadId(); boolean that_present_threadId = true && that.isSetThreadId(); @@ -667,44 +654,37 @@ public boolean equals(TimIqBean that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_threadId = true && (isSetThreadId()); - list.add(present_threadId); - if (present_threadId) - list.add(threadId); + hashCode = hashCode * 8191 + ((isSetThreadId()) ? 131071 : 524287); + if (isSetThreadId()) + hashCode = hashCode * 8191 + threadId.hashCode(); - boolean present_fromTid = true && (isSetFromTid()); - list.add(present_fromTid); - if (present_fromTid) - list.add(fromTid); + hashCode = hashCode * 8191 + ((isSetFromTid()) ? 131071 : 524287); + if (isSetFromTid()) + hashCode = hashCode * 8191 + fromTid.hashCode(); - boolean present_toTid = true && (isSetToTid()); - list.add(present_toTid); - if (present_toTid) - list.add(toTid); + hashCode = hashCode * 8191 + ((isSetToTid()) ? 131071 : 524287); + if (isSetToTid()) + hashCode = hashCode * 8191 + toTid.hashCode(); - boolean present_type = true && (isSetType()); - list.add(present_type); - if (present_type) - list.add(type); + hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287); + if (isSetType()) + hashCode = hashCode * 8191 + type.hashCode(); - boolean present_extraList = true && (isSetExtraList()); - list.add(present_extraList); - if (present_extraList) - list.add(extraList); + hashCode = hashCode * 8191 + ((isSetExtraList()) ? 131071 : 524287); + if (isSetExtraList()) + hashCode = hashCode * 8191 + extraList.hashCode(); - boolean present_error = true && (isSetError()); - list.add(present_error); - if (present_error) - list.add(error); + hashCode = hashCode * 8191 + ((isSetError()) ? 131071 : 524287); + if (isSetError()) + hashCode = hashCode * 8191 + error.hashCode(); - boolean present_extraMap = true && (isSetExtraMap()); - list.add(present_extraMap); - if (present_extraMap) - list.add(extraMap); + hashCode = hashCode * 8191 + ((isSetExtraMap()) ? 131071 : 524287); + if (isSetExtraMap()) + hashCode = hashCode * 8191 + extraMap.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -715,7 +695,7 @@ public int compareTo(TimIqBean other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetThreadId()).compareTo(other.isSetThreadId()); + lastComparison = java.lang.Boolean.compare(isSetThreadId(), other.isSetThreadId()); if (lastComparison != 0) { return lastComparison; } @@ -725,7 +705,7 @@ public int compareTo(TimIqBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFromTid()).compareTo(other.isSetFromTid()); + lastComparison = java.lang.Boolean.compare(isSetFromTid(), other.isSetFromTid()); if (lastComparison != 0) { return lastComparison; } @@ -735,7 +715,7 @@ public int compareTo(TimIqBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetToTid()).compareTo(other.isSetToTid()); + lastComparison = java.lang.Boolean.compare(isSetToTid(), other.isSetToTid()); if (lastComparison != 0) { return lastComparison; } @@ -745,7 +725,7 @@ public int compareTo(TimIqBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); + lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType()); if (lastComparison != 0) { return lastComparison; } @@ -755,7 +735,7 @@ public int compareTo(TimIqBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraList()).compareTo(other.isSetExtraList()); + lastComparison = java.lang.Boolean.compare(isSetExtraList(), other.isSetExtraList()); if (lastComparison != 0) { return lastComparison; } @@ -765,7 +745,7 @@ public int compareTo(TimIqBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetError()).compareTo(other.isSetError()); + lastComparison = java.lang.Boolean.compare(isSetError(), other.isSetError()); if (lastComparison != 0) { return lastComparison; } @@ -775,7 +755,7 @@ public int compareTo(TimIqBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraMap()).compareTo(other.isSetExtraMap()); + lastComparison = java.lang.Boolean.compare(isSetExtraMap(), other.isSetExtraMap()); if (lastComparison != 0) { return lastComparison; } @@ -788,21 +768,25 @@ public int compareTo(TimIqBean other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("TimIqBean("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TimIqBean("); boolean first = true; sb.append("threadId:"); @@ -901,7 +885,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -909,14 +893,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TimIqBeanStandardSchemeFactory implements SchemeFactory { + private static class TimIqBeanStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimIqBeanStandardScheme getScheme() { return new TimIqBeanStandardScheme(); } } - private static class TimIqBeanStandardScheme extends StandardScheme { + private static class TimIqBeanStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TimIqBean struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -965,8 +951,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimIqBean struct) t if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list168 = iprot.readListBegin(); - struct.extraList = new ArrayList(_list168.size); - TimNode _elem169; + struct.extraList = new java.util.ArrayList(_list168.size); + @org.apache.thrift.annotation.Nullable TimNode _elem169; for (int _i170 = 0; _i170 < _list168.size; ++_i170) { _elem169 = new TimNode(); @@ -993,9 +979,9 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimIqBean struct) t if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map171 = iprot.readMapBegin(); - struct.extraMap = new HashMap(2*_map171.size); - String _key172; - String _val173; + struct.extraMap = new java.util.HashMap(2*_map171.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key172; + @org.apache.thrift.annotation.Nullable java.lang.String _val173; for (int _i174 = 0; _i174 < _map171.size; ++_i174) { _key172 = iprot.readString(); @@ -1020,6 +1006,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimIqBean struct) t struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TimIqBean struct) throws org.apache.thrift.TException { struct.validate(); @@ -1076,7 +1063,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimIqBean struct) oprot.writeFieldBegin(EXTRA_MAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.extraMap.size())); - for (Map.Entry _iter176 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter176 : struct.extraMap.entrySet()) { oprot.writeString(_iter176.getKey()); oprot.writeString(_iter176.getValue()); @@ -1092,19 +1079,20 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimIqBean struct) } - private static class TimIqBeanTupleSchemeFactory implements SchemeFactory { + private static class TimIqBeanTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimIqBeanTupleScheme getScheme() { return new TimIqBeanTupleScheme(); } } - private static class TimIqBeanTupleScheme extends TupleScheme { + private static class TimIqBeanTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TimIqBean struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; oprot.writeString(struct.threadId); - BitSet optionals = new BitSet(); + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetFromTid()) { optionals.set(0); } @@ -1148,7 +1136,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimIqBean struct) t if (struct.isSetExtraMap()) { { oprot.writeI32(struct.extraMap.size()); - for (Map.Entry _iter178 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter178 : struct.extraMap.entrySet()) { oprot.writeString(_iter178.getKey()); oprot.writeString(_iter178.getValue()); @@ -1159,10 +1147,10 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimIqBean struct) t @Override public void read(org.apache.thrift.protocol.TProtocol prot, TimIqBean struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.threadId = iprot.readString(); struct.setThreadIdIsSet(true); - BitSet incoming = iprot.readBitSet(6); + java.util.BitSet incoming = iprot.readBitSet(6); if (incoming.get(0)) { struct.fromTid = new Tid(); struct.fromTid.read(iprot); @@ -1179,9 +1167,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimIqBean struct) th } if (incoming.get(3)) { { - org.apache.thrift.protocol.TList _list179 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.extraList = new ArrayList(_list179.size); - TimNode _elem180; + org.apache.thrift.protocol.TList _list179 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); + struct.extraList = new java.util.ArrayList(_list179.size); + @org.apache.thrift.annotation.Nullable TimNode _elem180; for (int _i181 = 0; _i181 < _list179.size; ++_i181) { _elem180 = new TimNode(); @@ -1198,10 +1186,10 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimIqBean struct) th } if (incoming.get(5)) { { - org.apache.thrift.protocol.TMap _map182 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.extraMap = new HashMap(2*_map182.size); - String _key183; - String _val184; + org.apache.thrift.protocol.TMap _map182 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.extraMap = new java.util.HashMap(2*_map182.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key183; + @org.apache.thrift.annotation.Nullable java.lang.String _val184; for (int _i185 = 0; _i185 < _map182.size; ++_i185) { _key183 = iprot.readString(); @@ -1214,5 +1202,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimIqBean struct) th } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/TimMBean.java b/protocols/gen-java/com/tim/packet/TimMBean.java index ef285d4..22b757c 100644 --- a/protocols/gen-java/com/tim/packet/TimMBean.java +++ b/protocols/gen-java/com/tim/packet/TimMBean.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class TimMBean implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimMBean"); @@ -53,32 +26,29 @@ public class TimMBean implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TimMBeanStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TimMBeanTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TimMBeanStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TimMBeanTupleSchemeFactory(); /** * 线程id */ - public String threadId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String threadId; // required /** * 消息id号 */ - public String mid; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String mid; // optional /** * 来源Tid */ - public Tid fromTid; // optional + public @org.apache.thrift.annotation.Nullable Tid fromTid; // optional /** * 目标Tid */ - public Tid toTid; // optional + public @org.apache.thrift.annotation.Nullable Tid toTid; // optional /** * 信息内容 */ - public String body; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String body; // optional /** * normal:类似于email,主要特点是不要求响应; * chat:类似于qq里的好友即时聊天,主要特点是实时通讯; @@ -86,7 +56,7 @@ public class TimMBean implements org.apache.thrift.TBase extraList; // optional + public @org.apache.thrift.annotation.Nullable java.util.List extraList; // optional /** * 服务器发送信息时间戳(毫秒) */ - public String timestamp; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String timestamp; // optional /** * 错误码 */ - public TimError error; // optional - public Map extraMap; // optional + public @org.apache.thrift.annotation.Nullable TimError error; // optional + public @org.apache.thrift.annotation.Nullable java.util.Map extraMap; // optional /** * 0未读 1已读 */ @@ -177,10 +147,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ READSTATUS((short)14, "readstatus"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -188,6 +158,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // THREAD_ID @@ -229,30 +200,33 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } @@ -262,9 +236,9 @@ public String getFieldName() { private static final int __READSTATUS_ISSET_ID = 1; private byte __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.MID,_Fields.FROM_TID,_Fields.TO_TID,_Fields.BODY,_Fields.TYPE,_Fields.MSG_TYPE,_Fields.OFFLINE,_Fields.LEAGUER_TID,_Fields.EXTRA_LIST,_Fields.TIMESTAMP,_Fields.ERROR,_Fields.EXTRA_MAP,_Fields.READSTATUS}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.THREAD_ID, new org.apache.thrift.meta_data.FieldMetaData("threadId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.MID, new org.apache.thrift.meta_data.FieldMetaData("mid", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -296,7 +270,7 @@ public String getFieldName() { new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.READSTATUS, new org.apache.thrift.meta_data.FieldMetaData("readstatus", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimMBean.class, metaDataMap); } @@ -304,7 +278,7 @@ public TimMBean() { } public TimMBean( - String threadId) + java.lang.String threadId) { this(); this.threadId = threadId; @@ -341,7 +315,7 @@ public TimMBean(TimMBean other) { this.leaguerTid = new Tid(other.leaguerTid); } if (other.isSetExtraList()) { - List __this__extraList = new ArrayList(other.extraList.size()); + java.util.List __this__extraList = new java.util.ArrayList(other.extraList.size()); for (TimNode other_element : other.extraList) { __this__extraList.add(new TimNode(other_element)); } @@ -354,12 +328,13 @@ public TimMBean(TimMBean other) { this.error = new TimError(other.error); } if (other.isSetExtraMap()) { - Map __this__extraMap = new HashMap(other.extraMap); + java.util.Map __this__extraMap = new java.util.HashMap(other.extraMap); this.extraMap = __this__extraMap; } this.readstatus = other.readstatus; } + @Override public TimMBean deepCopy() { return new TimMBean(this); } @@ -387,14 +362,15 @@ public void clear() { /** * 线程id */ - public String getThreadId() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getThreadId() { return this.threadId; } /** * 线程id */ - public TimMBean setThreadId(String threadId) { + public TimMBean setThreadId(@org.apache.thrift.annotation.Nullable java.lang.String threadId) { this.threadId = threadId; return this; } @@ -417,14 +393,15 @@ public void setThreadIdIsSet(boolean value) { /** * 消息id号 */ - public String getMid() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getMid() { return this.mid; } /** * 消息id号 */ - public TimMBean setMid(String mid) { + public TimMBean setMid(@org.apache.thrift.annotation.Nullable java.lang.String mid) { this.mid = mid; return this; } @@ -447,6 +424,7 @@ public void setMidIsSet(boolean value) { /** * 来源Tid */ + @org.apache.thrift.annotation.Nullable public Tid getFromTid() { return this.fromTid; } @@ -454,7 +432,7 @@ public Tid getFromTid() { /** * 来源Tid */ - public TimMBean setFromTid(Tid fromTid) { + public TimMBean setFromTid(@org.apache.thrift.annotation.Nullable Tid fromTid) { this.fromTid = fromTid; return this; } @@ -477,6 +455,7 @@ public void setFromTidIsSet(boolean value) { /** * 目标Tid */ + @org.apache.thrift.annotation.Nullable public Tid getToTid() { return this.toTid; } @@ -484,7 +463,7 @@ public Tid getToTid() { /** * 目标Tid */ - public TimMBean setToTid(Tid toTid) { + public TimMBean setToTid(@org.apache.thrift.annotation.Nullable Tid toTid) { this.toTid = toTid; return this; } @@ -507,14 +486,15 @@ public void setToTidIsSet(boolean value) { /** * 信息内容 */ - public String getBody() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getBody() { return this.body; } /** * 信息内容 */ - public TimMBean setBody(String body) { + public TimMBean setBody(@org.apache.thrift.annotation.Nullable java.lang.String body) { this.body = body; return this; } @@ -541,7 +521,8 @@ public void setBodyIsSet(boolean value) { * headline:用于发送alert和notification; * error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; */ - public String getType() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getType() { return this.type; } @@ -552,7 +533,7 @@ public String getType() { * headline:用于发送alert和notification; * error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; */ - public TimMBean setType(String type) { + public TimMBean setType(@org.apache.thrift.annotation.Nullable java.lang.String type) { this.type = type; return this; } @@ -589,21 +570,22 @@ public TimMBean setMsgType(short msgType) { } public void unsetMsgType() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MSGTYPE_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MSGTYPE_ISSET_ID); } /** Returns true if field msgType is set (has been assigned a value) and false otherwise */ public boolean isSetMsgType() { - return EncodingUtils.testBit(__isset_bitfield, __MSGTYPE_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MSGTYPE_ISSET_ID); } public void setMsgTypeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MSGTYPE_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MSGTYPE_ISSET_ID, value); } /** * 是否离线信息 */ + @org.apache.thrift.annotation.Nullable public TimTime getOffline() { return this.offline; } @@ -611,7 +593,7 @@ public TimTime getOffline() { /** * 是否离线信息 */ - public TimMBean setOffline(TimTime offline) { + public TimMBean setOffline(@org.apache.thrift.annotation.Nullable TimTime offline) { this.offline = offline; return this; } @@ -634,6 +616,7 @@ public void setOfflineIsSet(boolean value) { /** * 成员Tid 群聊时信息发送者Tid */ + @org.apache.thrift.annotation.Nullable public Tid getLeaguerTid() { return this.leaguerTid; } @@ -641,7 +624,7 @@ public Tid getLeaguerTid() { /** * 成员Tid 群聊时信息发送者Tid */ - public TimMBean setLeaguerTid(Tid leaguerTid) { + public TimMBean setLeaguerTid(@org.apache.thrift.annotation.Nullable Tid leaguerTid) { this.leaguerTid = leaguerTid; return this; } @@ -665,13 +648,14 @@ public int getExtraListSize() { return (this.extraList == null) ? 0 : this.extraList.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getExtraListIterator() { return (this.extraList == null) ? null : this.extraList.iterator(); } public void addToExtraList(TimNode elem) { if (this.extraList == null) { - this.extraList = new ArrayList(); + this.extraList = new java.util.ArrayList(); } this.extraList.add(elem); } @@ -679,14 +663,15 @@ public void addToExtraList(TimNode elem) { /** * 扩展字段 */ - public List getExtraList() { + @org.apache.thrift.annotation.Nullable + public java.util.List getExtraList() { return this.extraList; } /** * 扩展字段 */ - public TimMBean setExtraList(List extraList) { + public TimMBean setExtraList(@org.apache.thrift.annotation.Nullable java.util.List extraList) { this.extraList = extraList; return this; } @@ -709,14 +694,15 @@ public void setExtraListIsSet(boolean value) { /** * 服务器发送信息时间戳(毫秒) */ - public String getTimestamp() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getTimestamp() { return this.timestamp; } /** * 服务器发送信息时间戳(毫秒) */ - public TimMBean setTimestamp(String timestamp) { + public TimMBean setTimestamp(@org.apache.thrift.annotation.Nullable java.lang.String timestamp) { this.timestamp = timestamp; return this; } @@ -739,6 +725,7 @@ public void setTimestampIsSet(boolean value) { /** * 错误码 */ + @org.apache.thrift.annotation.Nullable public TimError getError() { return this.error; } @@ -746,7 +733,7 @@ public TimError getError() { /** * 错误码 */ - public TimMBean setError(TimError error) { + public TimMBean setError(@org.apache.thrift.annotation.Nullable TimError error) { this.error = error; return this; } @@ -770,18 +757,19 @@ public int getExtraMapSize() { return (this.extraMap == null) ? 0 : this.extraMap.size(); } - public void putToExtraMap(String key, String val) { + public void putToExtraMap(java.lang.String key, java.lang.String val) { if (this.extraMap == null) { - this.extraMap = new HashMap(); + this.extraMap = new java.util.HashMap(); } this.extraMap.put(key, val); } - public Map getExtraMap() { + @org.apache.thrift.annotation.Nullable + public java.util.Map getExtraMap() { return this.extraMap; } - public TimMBean setExtraMap(Map extraMap) { + public TimMBean setExtraMap(@org.apache.thrift.annotation.Nullable java.util.Map extraMap) { this.extraMap = extraMap; return this; } @@ -818,25 +806,26 @@ public TimMBean setReadstatus(short readstatus) { } public void unsetReadstatus() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __READSTATUS_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __READSTATUS_ISSET_ID); } /** Returns true if field readstatus is set (has been assigned a value) and false otherwise */ public boolean isSetReadstatus() { - return EncodingUtils.testBit(__isset_bitfield, __READSTATUS_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __READSTATUS_ISSET_ID); } public void setReadstatusIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __READSTATUS_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __READSTATUS_ISSET_ID, value); } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case THREAD_ID: if (value == null) { unsetThreadId(); } else { - setThreadId((String)value); + setThreadId((java.lang.String)value); } break; @@ -844,7 +833,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetMid(); } else { - setMid((String)value); + setMid((java.lang.String)value); } break; @@ -868,7 +857,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetBody(); } else { - setBody((String)value); + setBody((java.lang.String)value); } break; @@ -876,7 +865,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetType(); } else { - setType((String)value); + setType((java.lang.String)value); } break; @@ -884,7 +873,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetMsgType(); } else { - setMsgType((Short)value); + setMsgType((java.lang.Short)value); } break; @@ -908,7 +897,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraList(); } else { - setExtraList((List)value); + setExtraList((java.util.List)value); } break; @@ -916,7 +905,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetTimestamp(); } else { - setTimestamp((String)value); + setTimestamp((java.lang.String)value); } break; @@ -932,7 +921,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraMap(); } else { - setExtraMap((Map)value); + setExtraMap((java.util.Map)value); } break; @@ -940,14 +929,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetReadstatus(); } else { - setReadstatus((Short)value); + setReadstatus((java.lang.Short)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case THREAD_ID: return getThreadId(); @@ -992,13 +983,14 @@ public Object getFieldValue(_Fields field) { return getReadstatus(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -1031,13 +1023,11 @@ public boolean isSet(_Fields field) { case READSTATUS: return isSetReadstatus(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof TimMBean) return this.equals((TimMBean)that); return false; @@ -1046,6 +1036,8 @@ public boolean equals(Object that) { public boolean equals(TimMBean that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_threadId = true && this.isSetThreadId(); boolean that_present_threadId = true && that.isSetThreadId(); @@ -1178,79 +1170,65 @@ public boolean equals(TimMBean that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_threadId = true && (isSetThreadId()); - list.add(present_threadId); - if (present_threadId) - list.add(threadId); - - boolean present_mid = true && (isSetMid()); - list.add(present_mid); - if (present_mid) - list.add(mid); - - boolean present_fromTid = true && (isSetFromTid()); - list.add(present_fromTid); - if (present_fromTid) - list.add(fromTid); - - boolean present_toTid = true && (isSetToTid()); - list.add(present_toTid); - if (present_toTid) - list.add(toTid); - - boolean present_body = true && (isSetBody()); - list.add(present_body); - if (present_body) - list.add(body); - - boolean present_type = true && (isSetType()); - list.add(present_type); - if (present_type) - list.add(type); - - boolean present_msgType = true && (isSetMsgType()); - list.add(present_msgType); - if (present_msgType) - list.add(msgType); - - boolean present_offline = true && (isSetOffline()); - list.add(present_offline); - if (present_offline) - list.add(offline); - - boolean present_leaguerTid = true && (isSetLeaguerTid()); - list.add(present_leaguerTid); - if (present_leaguerTid) - list.add(leaguerTid); - - boolean present_extraList = true && (isSetExtraList()); - list.add(present_extraList); - if (present_extraList) - list.add(extraList); - - boolean present_timestamp = true && (isSetTimestamp()); - list.add(present_timestamp); - if (present_timestamp) - list.add(timestamp); - - boolean present_error = true && (isSetError()); - list.add(present_error); - if (present_error) - list.add(error); - - boolean present_extraMap = true && (isSetExtraMap()); - list.add(present_extraMap); - if (present_extraMap) - list.add(extraMap); - - boolean present_readstatus = true && (isSetReadstatus()); - list.add(present_readstatus); - if (present_readstatus) - list.add(readstatus); - - return list.hashCode(); + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetThreadId()) ? 131071 : 524287); + if (isSetThreadId()) + hashCode = hashCode * 8191 + threadId.hashCode(); + + hashCode = hashCode * 8191 + ((isSetMid()) ? 131071 : 524287); + if (isSetMid()) + hashCode = hashCode * 8191 + mid.hashCode(); + + hashCode = hashCode * 8191 + ((isSetFromTid()) ? 131071 : 524287); + if (isSetFromTid()) + hashCode = hashCode * 8191 + fromTid.hashCode(); + + hashCode = hashCode * 8191 + ((isSetToTid()) ? 131071 : 524287); + if (isSetToTid()) + hashCode = hashCode * 8191 + toTid.hashCode(); + + hashCode = hashCode * 8191 + ((isSetBody()) ? 131071 : 524287); + if (isSetBody()) + hashCode = hashCode * 8191 + body.hashCode(); + + hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287); + if (isSetType()) + hashCode = hashCode * 8191 + type.hashCode(); + + hashCode = hashCode * 8191 + ((isSetMsgType()) ? 131071 : 524287); + if (isSetMsgType()) + hashCode = hashCode * 8191 + msgType; + + hashCode = hashCode * 8191 + ((isSetOffline()) ? 131071 : 524287); + if (isSetOffline()) + hashCode = hashCode * 8191 + offline.hashCode(); + + hashCode = hashCode * 8191 + ((isSetLeaguerTid()) ? 131071 : 524287); + if (isSetLeaguerTid()) + hashCode = hashCode * 8191 + leaguerTid.hashCode(); + + hashCode = hashCode * 8191 + ((isSetExtraList()) ? 131071 : 524287); + if (isSetExtraList()) + hashCode = hashCode * 8191 + extraList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetTimestamp()) ? 131071 : 524287); + if (isSetTimestamp()) + hashCode = hashCode * 8191 + timestamp.hashCode(); + + hashCode = hashCode * 8191 + ((isSetError()) ? 131071 : 524287); + if (isSetError()) + hashCode = hashCode * 8191 + error.hashCode(); + + hashCode = hashCode * 8191 + ((isSetExtraMap()) ? 131071 : 524287); + if (isSetExtraMap()) + hashCode = hashCode * 8191 + extraMap.hashCode(); + + hashCode = hashCode * 8191 + ((isSetReadstatus()) ? 131071 : 524287); + if (isSetReadstatus()) + hashCode = hashCode * 8191 + readstatus; + + return hashCode; } @Override @@ -1261,7 +1239,7 @@ public int compareTo(TimMBean other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetThreadId()).compareTo(other.isSetThreadId()); + lastComparison = java.lang.Boolean.compare(isSetThreadId(), other.isSetThreadId()); if (lastComparison != 0) { return lastComparison; } @@ -1271,7 +1249,7 @@ public int compareTo(TimMBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMid()).compareTo(other.isSetMid()); + lastComparison = java.lang.Boolean.compare(isSetMid(), other.isSetMid()); if (lastComparison != 0) { return lastComparison; } @@ -1281,7 +1259,7 @@ public int compareTo(TimMBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFromTid()).compareTo(other.isSetFromTid()); + lastComparison = java.lang.Boolean.compare(isSetFromTid(), other.isSetFromTid()); if (lastComparison != 0) { return lastComparison; } @@ -1291,7 +1269,7 @@ public int compareTo(TimMBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetToTid()).compareTo(other.isSetToTid()); + lastComparison = java.lang.Boolean.compare(isSetToTid(), other.isSetToTid()); if (lastComparison != 0) { return lastComparison; } @@ -1301,7 +1279,7 @@ public int compareTo(TimMBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetBody()).compareTo(other.isSetBody()); + lastComparison = java.lang.Boolean.compare(isSetBody(), other.isSetBody()); if (lastComparison != 0) { return lastComparison; } @@ -1311,7 +1289,7 @@ public int compareTo(TimMBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); + lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType()); if (lastComparison != 0) { return lastComparison; } @@ -1321,7 +1299,7 @@ public int compareTo(TimMBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMsgType()).compareTo(other.isSetMsgType()); + lastComparison = java.lang.Boolean.compare(isSetMsgType(), other.isSetMsgType()); if (lastComparison != 0) { return lastComparison; } @@ -1331,7 +1309,7 @@ public int compareTo(TimMBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOffline()).compareTo(other.isSetOffline()); + lastComparison = java.lang.Boolean.compare(isSetOffline(), other.isSetOffline()); if (lastComparison != 0) { return lastComparison; } @@ -1341,7 +1319,7 @@ public int compareTo(TimMBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetLeaguerTid()).compareTo(other.isSetLeaguerTid()); + lastComparison = java.lang.Boolean.compare(isSetLeaguerTid(), other.isSetLeaguerTid()); if (lastComparison != 0) { return lastComparison; } @@ -1351,7 +1329,7 @@ public int compareTo(TimMBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraList()).compareTo(other.isSetExtraList()); + lastComparison = java.lang.Boolean.compare(isSetExtraList(), other.isSetExtraList()); if (lastComparison != 0) { return lastComparison; } @@ -1361,7 +1339,7 @@ public int compareTo(TimMBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp()); + lastComparison = java.lang.Boolean.compare(isSetTimestamp(), other.isSetTimestamp()); if (lastComparison != 0) { return lastComparison; } @@ -1371,7 +1349,7 @@ public int compareTo(TimMBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetError()).compareTo(other.isSetError()); + lastComparison = java.lang.Boolean.compare(isSetError(), other.isSetError()); if (lastComparison != 0) { return lastComparison; } @@ -1381,7 +1359,7 @@ public int compareTo(TimMBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraMap()).compareTo(other.isSetExtraMap()); + lastComparison = java.lang.Boolean.compare(isSetExtraMap(), other.isSetExtraMap()); if (lastComparison != 0) { return lastComparison; } @@ -1391,7 +1369,7 @@ public int compareTo(TimMBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetReadstatus()).compareTo(other.isSetReadstatus()); + lastComparison = java.lang.Boolean.compare(isSetReadstatus(), other.isSetReadstatus()); if (lastComparison != 0) { return lastComparison; } @@ -1404,21 +1382,25 @@ public int compareTo(TimMBean other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("TimMBean("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TimMBean("); boolean first = true; sb.append("threadId:"); @@ -1585,7 +1567,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; @@ -1595,14 +1577,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TimMBeanStandardSchemeFactory implements SchemeFactory { + private static class TimMBeanStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimMBeanStandardScheme getScheme() { return new TimMBeanStandardScheme(); } } - private static class TimMBeanStandardScheme extends StandardScheme { + private static class TimMBeanStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TimMBean struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -1693,8 +1677,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimMBean struct) th if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list150 = iprot.readListBegin(); - struct.extraList = new ArrayList(_list150.size); - TimNode _elem151; + struct.extraList = new java.util.ArrayList(_list150.size); + @org.apache.thrift.annotation.Nullable TimNode _elem151; for (int _i152 = 0; _i152 < _list150.size; ++_i152) { _elem151 = new TimNode(); @@ -1729,9 +1713,9 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimMBean struct) th if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map153 = iprot.readMapBegin(); - struct.extraMap = new HashMap(2*_map153.size); - String _key154; - String _val155; + struct.extraMap = new java.util.HashMap(2*_map153.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key154; + @org.apache.thrift.annotation.Nullable java.lang.String _val155; for (int _i156 = 0; _i156 < _map153.size; ++_i156) { _key154 = iprot.readString(); @@ -1764,6 +1748,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimMBean struct) th struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TimMBean struct) throws org.apache.thrift.TException { struct.validate(); @@ -1860,7 +1845,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimMBean struct) t oprot.writeFieldBegin(EXTRA_MAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.extraMap.size())); - for (Map.Entry _iter158 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter158 : struct.extraMap.entrySet()) { oprot.writeString(_iter158.getKey()); oprot.writeString(_iter158.getValue()); @@ -1881,19 +1866,20 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimMBean struct) t } - private static class TimMBeanTupleSchemeFactory implements SchemeFactory { + private static class TimMBeanTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimMBeanTupleScheme getScheme() { return new TimMBeanTupleScheme(); } } - private static class TimMBeanTupleScheme extends TupleScheme { + private static class TimMBeanTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TimMBean struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; oprot.writeString(struct.threadId); - BitSet optionals = new BitSet(); + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetMid()) { optionals.set(0); } @@ -1976,7 +1962,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimMBean struct) th if (struct.isSetExtraMap()) { { oprot.writeI32(struct.extraMap.size()); - for (Map.Entry _iter160 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter160 : struct.extraMap.entrySet()) { oprot.writeString(_iter160.getKey()); oprot.writeString(_iter160.getValue()); @@ -1990,10 +1976,10 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimMBean struct) th @Override public void read(org.apache.thrift.protocol.TProtocol prot, TimMBean struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.threadId = iprot.readString(); struct.setThreadIdIsSet(true); - BitSet incoming = iprot.readBitSet(13); + java.util.BitSet incoming = iprot.readBitSet(13); if (incoming.get(0)) { struct.mid = iprot.readString(); struct.setMidIsSet(true); @@ -2032,9 +2018,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimMBean struct) thr } if (incoming.get(8)) { { - org.apache.thrift.protocol.TList _list161 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.extraList = new ArrayList(_list161.size); - TimNode _elem162; + org.apache.thrift.protocol.TList _list161 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); + struct.extraList = new java.util.ArrayList(_list161.size); + @org.apache.thrift.annotation.Nullable TimNode _elem162; for (int _i163 = 0; _i163 < _list161.size; ++_i163) { _elem162 = new TimNode(); @@ -2055,10 +2041,10 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimMBean struct) thr } if (incoming.get(11)) { { - org.apache.thrift.protocol.TMap _map164 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.extraMap = new HashMap(2*_map164.size); - String _key165; - String _val166; + org.apache.thrift.protocol.TMap _map164 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.extraMap = new java.util.HashMap(2*_map164.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key165; + @org.apache.thrift.annotation.Nullable java.lang.String _val166; for (int _i167 = 0; _i167 < _map164.size; ++_i167) { _key165 = iprot.readString(); @@ -2075,5 +2061,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimMBean struct) thr } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/TimMBeanList.java b/protocols/gen-java/com/tim/packet/TimMBeanList.java index be85713..effd026 100644 --- a/protocols/gen-java/com/tim/packet/TimMBeanList.java +++ b/protocols/gen-java/com/tim/packet/TimMBeanList.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class TimMBeanList implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimMBeanList"); @@ -43,22 +16,19 @@ public class TimMBeanList implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TimMBeanListStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TimMBeanListTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TimMBeanListStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TimMBeanListTupleSchemeFactory(); - public String threadId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String threadId; // required /** * 信息列表 */ - public List timMBeanList; // optional + public @org.apache.thrift.annotation.Nullable java.util.List timMBeanList; // optional /** * 类型 */ - public String reqType; // optional - public Map extraMap; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String reqType; // optional + public @org.apache.thrift.annotation.Nullable java.util.Map extraMap; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -73,10 +43,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { REQ_TYPE((short)3, "reqType"), EXTRA_MAP((short)4, "extraMap"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -84,6 +54,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // THREAD_ID @@ -105,39 +76,42 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final _Fields optionals[] = {_Fields.TIM_MBEAN_LIST,_Fields.REQ_TYPE,_Fields.EXTRA_MAP}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.THREAD_ID, new org.apache.thrift.meta_data.FieldMetaData("threadId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TIM_MBEAN_LIST, new org.apache.thrift.meta_data.FieldMetaData("timMBeanList", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -149,7 +123,7 @@ public String getFieldName() { new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimMBeanList.class, metaDataMap); } @@ -157,7 +131,7 @@ public TimMBeanList() { } public TimMBeanList( - String threadId) + java.lang.String threadId) { this(); this.threadId = threadId; @@ -171,7 +145,7 @@ public TimMBeanList(TimMBeanList other) { this.threadId = other.threadId; } if (other.isSetTimMBeanList()) { - List __this__timMBeanList = new ArrayList(other.timMBeanList.size()); + java.util.List __this__timMBeanList = new java.util.ArrayList(other.timMBeanList.size()); for (TimMBean other_element : other.timMBeanList) { __this__timMBeanList.add(new TimMBean(other_element)); } @@ -181,11 +155,12 @@ public TimMBeanList(TimMBeanList other) { this.reqType = other.reqType; } if (other.isSetExtraMap()) { - Map __this__extraMap = new HashMap(other.extraMap); + java.util.Map __this__extraMap = new java.util.HashMap(other.extraMap); this.extraMap = __this__extraMap; } } + @Override public TimMBeanList deepCopy() { return new TimMBeanList(this); } @@ -198,11 +173,12 @@ public void clear() { this.extraMap = null; } - public String getThreadId() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getThreadId() { return this.threadId; } - public TimMBeanList setThreadId(String threadId) { + public TimMBeanList setThreadId(@org.apache.thrift.annotation.Nullable java.lang.String threadId) { this.threadId = threadId; return this; } @@ -226,13 +202,14 @@ public int getTimMBeanListSize() { return (this.timMBeanList == null) ? 0 : this.timMBeanList.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getTimMBeanListIterator() { return (this.timMBeanList == null) ? null : this.timMBeanList.iterator(); } public void addToTimMBeanList(TimMBean elem) { if (this.timMBeanList == null) { - this.timMBeanList = new ArrayList(); + this.timMBeanList = new java.util.ArrayList(); } this.timMBeanList.add(elem); } @@ -240,14 +217,15 @@ public void addToTimMBeanList(TimMBean elem) { /** * 信息列表 */ - public List getTimMBeanList() { + @org.apache.thrift.annotation.Nullable + public java.util.List getTimMBeanList() { return this.timMBeanList; } /** * 信息列表 */ - public TimMBeanList setTimMBeanList(List timMBeanList) { + public TimMBeanList setTimMBeanList(@org.apache.thrift.annotation.Nullable java.util.List timMBeanList) { this.timMBeanList = timMBeanList; return this; } @@ -270,14 +248,15 @@ public void setTimMBeanListIsSet(boolean value) { /** * 类型 */ - public String getReqType() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getReqType() { return this.reqType; } /** * 类型 */ - public TimMBeanList setReqType(String reqType) { + public TimMBeanList setReqType(@org.apache.thrift.annotation.Nullable java.lang.String reqType) { this.reqType = reqType; return this; } @@ -301,18 +280,19 @@ public int getExtraMapSize() { return (this.extraMap == null) ? 0 : this.extraMap.size(); } - public void putToExtraMap(String key, String val) { + public void putToExtraMap(java.lang.String key, java.lang.String val) { if (this.extraMap == null) { - this.extraMap = new HashMap(); + this.extraMap = new java.util.HashMap(); } this.extraMap.put(key, val); } - public Map getExtraMap() { + @org.apache.thrift.annotation.Nullable + public java.util.Map getExtraMap() { return this.extraMap; } - public TimMBeanList setExtraMap(Map extraMap) { + public TimMBeanList setExtraMap(@org.apache.thrift.annotation.Nullable java.util.Map extraMap) { this.extraMap = extraMap; return this; } @@ -332,13 +312,14 @@ public void setExtraMapIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case THREAD_ID: if (value == null) { unsetThreadId(); } else { - setThreadId((String)value); + setThreadId((java.lang.String)value); } break; @@ -346,7 +327,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetTimMBeanList(); } else { - setTimMBeanList((List)value); + setTimMBeanList((java.util.List)value); } break; @@ -354,7 +335,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetReqType(); } else { - setReqType((String)value); + setReqType((java.lang.String)value); } break; @@ -362,14 +343,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraMap(); } else { - setExtraMap((Map)value); + setExtraMap((java.util.Map)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case THREAD_ID: return getThreadId(); @@ -384,13 +367,14 @@ public Object getFieldValue(_Fields field) { return getExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -403,13 +387,11 @@ public boolean isSet(_Fields field) { case EXTRA_MAP: return isSetExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof TimMBeanList) return this.equals((TimMBeanList)that); return false; @@ -418,6 +400,8 @@ public boolean equals(Object that) { public boolean equals(TimMBeanList that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_threadId = true && this.isSetThreadId(); boolean that_present_threadId = true && that.isSetThreadId(); @@ -460,29 +444,25 @@ public boolean equals(TimMBeanList that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_threadId = true && (isSetThreadId()); - list.add(present_threadId); - if (present_threadId) - list.add(threadId); + hashCode = hashCode * 8191 + ((isSetThreadId()) ? 131071 : 524287); + if (isSetThreadId()) + hashCode = hashCode * 8191 + threadId.hashCode(); - boolean present_timMBeanList = true && (isSetTimMBeanList()); - list.add(present_timMBeanList); - if (present_timMBeanList) - list.add(timMBeanList); + hashCode = hashCode * 8191 + ((isSetTimMBeanList()) ? 131071 : 524287); + if (isSetTimMBeanList()) + hashCode = hashCode * 8191 + timMBeanList.hashCode(); - boolean present_reqType = true && (isSetReqType()); - list.add(present_reqType); - if (present_reqType) - list.add(reqType); + hashCode = hashCode * 8191 + ((isSetReqType()) ? 131071 : 524287); + if (isSetReqType()) + hashCode = hashCode * 8191 + reqType.hashCode(); - boolean present_extraMap = true && (isSetExtraMap()); - list.add(present_extraMap); - if (present_extraMap) - list.add(extraMap); + hashCode = hashCode * 8191 + ((isSetExtraMap()) ? 131071 : 524287); + if (isSetExtraMap()) + hashCode = hashCode * 8191 + extraMap.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -493,7 +473,7 @@ public int compareTo(TimMBeanList other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetThreadId()).compareTo(other.isSetThreadId()); + lastComparison = java.lang.Boolean.compare(isSetThreadId(), other.isSetThreadId()); if (lastComparison != 0) { return lastComparison; } @@ -503,7 +483,7 @@ public int compareTo(TimMBeanList other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTimMBeanList()).compareTo(other.isSetTimMBeanList()); + lastComparison = java.lang.Boolean.compare(isSetTimMBeanList(), other.isSetTimMBeanList()); if (lastComparison != 0) { return lastComparison; } @@ -513,7 +493,7 @@ public int compareTo(TimMBeanList other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetReqType()).compareTo(other.isSetReqType()); + lastComparison = java.lang.Boolean.compare(isSetReqType(), other.isSetReqType()); if (lastComparison != 0) { return lastComparison; } @@ -523,7 +503,7 @@ public int compareTo(TimMBeanList other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraMap()).compareTo(other.isSetExtraMap()); + lastComparison = java.lang.Boolean.compare(isSetExtraMap(), other.isSetExtraMap()); if (lastComparison != 0) { return lastComparison; } @@ -536,21 +516,25 @@ public int compareTo(TimMBeanList other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("TimMBeanList("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TimMBeanList("); boolean first = true; sb.append("threadId:"); @@ -610,7 +594,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -618,14 +602,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TimMBeanListStandardSchemeFactory implements SchemeFactory { + private static class TimMBeanListStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimMBeanListStandardScheme getScheme() { return new TimMBeanListStandardScheme(); } } - private static class TimMBeanListStandardScheme extends StandardScheme { + private static class TimMBeanListStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TimMBeanList struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -648,8 +634,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimMBeanList struct if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list298 = iprot.readListBegin(); - struct.timMBeanList = new ArrayList(_list298.size); - TimMBean _elem299; + struct.timMBeanList = new java.util.ArrayList(_list298.size); + @org.apache.thrift.annotation.Nullable TimMBean _elem299; for (int _i300 = 0; _i300 < _list298.size; ++_i300) { _elem299 = new TimMBean(); @@ -675,9 +661,9 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimMBeanList struct if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map301 = iprot.readMapBegin(); - struct.extraMap = new HashMap(2*_map301.size); - String _key302; - String _val303; + struct.extraMap = new java.util.HashMap(2*_map301.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key302; + @org.apache.thrift.annotation.Nullable java.lang.String _val303; for (int _i304 = 0; _i304 < _map301.size; ++_i304) { _key302 = iprot.readString(); @@ -702,6 +688,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimMBeanList struct struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TimMBeanList struct) throws org.apache.thrift.TException { struct.validate(); @@ -737,7 +724,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimMBeanList struc oprot.writeFieldBegin(EXTRA_MAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.extraMap.size())); - for (Map.Entry _iter306 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter306 : struct.extraMap.entrySet()) { oprot.writeString(_iter306.getKey()); oprot.writeString(_iter306.getValue()); @@ -753,19 +740,20 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimMBeanList struc } - private static class TimMBeanListTupleSchemeFactory implements SchemeFactory { + private static class TimMBeanListTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimMBeanListTupleScheme getScheme() { return new TimMBeanListTupleScheme(); } } - private static class TimMBeanListTupleScheme extends TupleScheme { + private static class TimMBeanListTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TimMBeanList struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; oprot.writeString(struct.threadId); - BitSet optionals = new BitSet(); + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetTimMBeanList()) { optionals.set(0); } @@ -791,7 +779,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimMBeanList struct if (struct.isSetExtraMap()) { { oprot.writeI32(struct.extraMap.size()); - for (Map.Entry _iter308 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter308 : struct.extraMap.entrySet()) { oprot.writeString(_iter308.getKey()); oprot.writeString(_iter308.getValue()); @@ -802,15 +790,15 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimMBeanList struct @Override public void read(org.apache.thrift.protocol.TProtocol prot, TimMBeanList struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.threadId = iprot.readString(); struct.setThreadIdIsSet(true); - BitSet incoming = iprot.readBitSet(3); + java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list309 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.timMBeanList = new ArrayList(_list309.size); - TimMBean _elem310; + org.apache.thrift.protocol.TList _list309 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); + struct.timMBeanList = new java.util.ArrayList(_list309.size); + @org.apache.thrift.annotation.Nullable TimMBean _elem310; for (int _i311 = 0; _i311 < _list309.size; ++_i311) { _elem310 = new TimMBean(); @@ -826,10 +814,10 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimMBeanList struct) } if (incoming.get(2)) { { - org.apache.thrift.protocol.TMap _map312 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.extraMap = new HashMap(2*_map312.size); - String _key313; - String _val314; + org.apache.thrift.protocol.TMap _map312 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.extraMap = new java.util.HashMap(2*_map312.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key313; + @org.apache.thrift.annotation.Nullable java.lang.String _val314; for (int _i315 = 0; _i315 < _map312.size; ++_i315) { _key313 = iprot.readString(); @@ -842,5 +830,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimMBeanList struct) } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/TimMessageIq.java b/protocols/gen-java/com/tim/packet/TimMessageIq.java index a0befdb..b3b85ea 100644 --- a/protocols/gen-java/com/tim/packet/TimMessageIq.java +++ b/protocols/gen-java/com/tim/packet/TimMessageIq.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class TimMessageIq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimMessageIq"); @@ -43,25 +16,22 @@ public class TimMessageIq implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TimMessageIqStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TimMessageIqTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TimMessageIqStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TimMessageIqTupleSchemeFactory(); /** * tid集合 */ - public List tidlist; // optional + public @org.apache.thrift.annotation.Nullable java.util.List tidlist; // optional /** * 分页 */ - public TimPage timPage; // optional + public @org.apache.thrift.annotation.Nullable TimPage timPage; // optional /** * mid集合 */ - public List midlist; // optional - public Map extraMap; // optional + public @org.apache.thrift.annotation.Nullable java.util.List midlist; // optional + public @org.apache.thrift.annotation.Nullable java.util.Map extraMap; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -79,10 +49,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { MIDLIST((short)3, "midlist"), EXTRA_MAP((short)4, "extraMap"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -90,6 +60,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TIDLIST @@ -111,39 +82,42 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final _Fields optionals[] = {_Fields.TIDLIST,_Fields.TIM_PAGE,_Fields.MIDLIST,_Fields.EXTRA_MAP}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TIDLIST, new org.apache.thrift.meta_data.FieldMetaData("tidlist", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); @@ -156,7 +130,7 @@ public String getFieldName() { new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimMessageIq.class, metaDataMap); } @@ -168,22 +142,23 @@ public TimMessageIq() { */ public TimMessageIq(TimMessageIq other) { if (other.isSetTidlist()) { - List __this__tidlist = new ArrayList(other.tidlist); + java.util.List __this__tidlist = new java.util.ArrayList(other.tidlist); this.tidlist = __this__tidlist; } if (other.isSetTimPage()) { this.timPage = new TimPage(other.timPage); } if (other.isSetMidlist()) { - List __this__midlist = new ArrayList(other.midlist); + java.util.List __this__midlist = new java.util.ArrayList(other.midlist); this.midlist = __this__midlist; } if (other.isSetExtraMap()) { - Map __this__extraMap = new HashMap(other.extraMap); + java.util.Map __this__extraMap = new java.util.HashMap(other.extraMap); this.extraMap = __this__extraMap; } } + @Override public TimMessageIq deepCopy() { return new TimMessageIq(this); } @@ -200,13 +175,14 @@ public int getTidlistSize() { return (this.tidlist == null) ? 0 : this.tidlist.size(); } - public java.util.Iterator getTidlistIterator() { + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getTidlistIterator() { return (this.tidlist == null) ? null : this.tidlist.iterator(); } - public void addToTidlist(String elem) { + public void addToTidlist(java.lang.String elem) { if (this.tidlist == null) { - this.tidlist = new ArrayList(); + this.tidlist = new java.util.ArrayList(); } this.tidlist.add(elem); } @@ -214,14 +190,15 @@ public void addToTidlist(String elem) { /** * tid集合 */ - public List getTidlist() { + @org.apache.thrift.annotation.Nullable + public java.util.List getTidlist() { return this.tidlist; } /** * tid集合 */ - public TimMessageIq setTidlist(List tidlist) { + public TimMessageIq setTidlist(@org.apache.thrift.annotation.Nullable java.util.List tidlist) { this.tidlist = tidlist; return this; } @@ -244,6 +221,7 @@ public void setTidlistIsSet(boolean value) { /** * 分页 */ + @org.apache.thrift.annotation.Nullable public TimPage getTimPage() { return this.timPage; } @@ -251,7 +229,7 @@ public TimPage getTimPage() { /** * 分页 */ - public TimMessageIq setTimPage(TimPage timPage) { + public TimMessageIq setTimPage(@org.apache.thrift.annotation.Nullable TimPage timPage) { this.timPage = timPage; return this; } @@ -275,13 +253,14 @@ public int getMidlistSize() { return (this.midlist == null) ? 0 : this.midlist.size(); } - public java.util.Iterator getMidlistIterator() { + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getMidlistIterator() { return (this.midlist == null) ? null : this.midlist.iterator(); } - public void addToMidlist(String elem) { + public void addToMidlist(java.lang.String elem) { if (this.midlist == null) { - this.midlist = new ArrayList(); + this.midlist = new java.util.ArrayList(); } this.midlist.add(elem); } @@ -289,14 +268,15 @@ public void addToMidlist(String elem) { /** * mid集合 */ - public List getMidlist() { + @org.apache.thrift.annotation.Nullable + public java.util.List getMidlist() { return this.midlist; } /** * mid集合 */ - public TimMessageIq setMidlist(List midlist) { + public TimMessageIq setMidlist(@org.apache.thrift.annotation.Nullable java.util.List midlist) { this.midlist = midlist; return this; } @@ -320,18 +300,19 @@ public int getExtraMapSize() { return (this.extraMap == null) ? 0 : this.extraMap.size(); } - public void putToExtraMap(String key, String val) { + public void putToExtraMap(java.lang.String key, java.lang.String val) { if (this.extraMap == null) { - this.extraMap = new HashMap(); + this.extraMap = new java.util.HashMap(); } this.extraMap.put(key, val); } - public Map getExtraMap() { + @org.apache.thrift.annotation.Nullable + public java.util.Map getExtraMap() { return this.extraMap; } - public TimMessageIq setExtraMap(Map extraMap) { + public TimMessageIq setExtraMap(@org.apache.thrift.annotation.Nullable java.util.Map extraMap) { this.extraMap = extraMap; return this; } @@ -351,13 +332,14 @@ public void setExtraMapIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case TIDLIST: if (value == null) { unsetTidlist(); } else { - setTidlist((List)value); + setTidlist((java.util.List)value); } break; @@ -373,7 +355,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetMidlist(); } else { - setMidlist((List)value); + setMidlist((java.util.List)value); } break; @@ -381,14 +363,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraMap(); } else { - setExtraMap((Map)value); + setExtraMap((java.util.Map)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TIDLIST: return getTidlist(); @@ -403,13 +387,14 @@ public Object getFieldValue(_Fields field) { return getExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -422,13 +407,11 @@ public boolean isSet(_Fields field) { case EXTRA_MAP: return isSetExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof TimMessageIq) return this.equals((TimMessageIq)that); return false; @@ -437,6 +420,8 @@ public boolean equals(Object that) { public boolean equals(TimMessageIq that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_tidlist = true && this.isSetTidlist(); boolean that_present_tidlist = true && that.isSetTidlist(); @@ -479,29 +464,25 @@ public boolean equals(TimMessageIq that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_tidlist = true && (isSetTidlist()); - list.add(present_tidlist); - if (present_tidlist) - list.add(tidlist); + hashCode = hashCode * 8191 + ((isSetTidlist()) ? 131071 : 524287); + if (isSetTidlist()) + hashCode = hashCode * 8191 + tidlist.hashCode(); - boolean present_timPage = true && (isSetTimPage()); - list.add(present_timPage); - if (present_timPage) - list.add(timPage); + hashCode = hashCode * 8191 + ((isSetTimPage()) ? 131071 : 524287); + if (isSetTimPage()) + hashCode = hashCode * 8191 + timPage.hashCode(); - boolean present_midlist = true && (isSetMidlist()); - list.add(present_midlist); - if (present_midlist) - list.add(midlist); + hashCode = hashCode * 8191 + ((isSetMidlist()) ? 131071 : 524287); + if (isSetMidlist()) + hashCode = hashCode * 8191 + midlist.hashCode(); - boolean present_extraMap = true && (isSetExtraMap()); - list.add(present_extraMap); - if (present_extraMap) - list.add(extraMap); + hashCode = hashCode * 8191 + ((isSetExtraMap()) ? 131071 : 524287); + if (isSetExtraMap()) + hashCode = hashCode * 8191 + extraMap.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -512,7 +493,7 @@ public int compareTo(TimMessageIq other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTidlist()).compareTo(other.isSetTidlist()); + lastComparison = java.lang.Boolean.compare(isSetTidlist(), other.isSetTidlist()); if (lastComparison != 0) { return lastComparison; } @@ -522,7 +503,7 @@ public int compareTo(TimMessageIq other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTimPage()).compareTo(other.isSetTimPage()); + lastComparison = java.lang.Boolean.compare(isSetTimPage(), other.isSetTimPage()); if (lastComparison != 0) { return lastComparison; } @@ -532,7 +513,7 @@ public int compareTo(TimMessageIq other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMidlist()).compareTo(other.isSetMidlist()); + lastComparison = java.lang.Boolean.compare(isSetMidlist(), other.isSetMidlist()); if (lastComparison != 0) { return lastComparison; } @@ -542,7 +523,7 @@ public int compareTo(TimMessageIq other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraMap()).compareTo(other.isSetExtraMap()); + lastComparison = java.lang.Boolean.compare(isSetExtraMap(), other.isSetExtraMap()); if (lastComparison != 0) { return lastComparison; } @@ -555,21 +536,25 @@ public int compareTo(TimMessageIq other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("TimMessageIq("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TimMessageIq("); boolean first = true; if (isSetTidlist()) { @@ -631,7 +616,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -639,14 +624,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TimMessageIqStandardSchemeFactory implements SchemeFactory { + private static class TimMessageIqStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimMessageIqStandardScheme getScheme() { return new TimMessageIqStandardScheme(); } } - private static class TimMessageIqStandardScheme extends StandardScheme { + private static class TimMessageIqStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TimMessageIq struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -661,8 +648,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimMessageIq struct if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list272 = iprot.readListBegin(); - struct.tidlist = new ArrayList(_list272.size); - String _elem273; + struct.tidlist = new java.util.ArrayList(_list272.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem273; for (int _i274 = 0; _i274 < _list272.size; ++_i274) { _elem273 = iprot.readString(); @@ -688,8 +675,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimMessageIq struct if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list275 = iprot.readListBegin(); - struct.midlist = new ArrayList(_list275.size); - String _elem276; + struct.midlist = new java.util.ArrayList(_list275.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem276; for (int _i277 = 0; _i277 < _list275.size; ++_i277) { _elem276 = iprot.readString(); @@ -706,9 +693,9 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimMessageIq struct if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map278 = iprot.readMapBegin(); - struct.extraMap = new HashMap(2*_map278.size); - String _key279; - String _val280; + struct.extraMap = new java.util.HashMap(2*_map278.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key279; + @org.apache.thrift.annotation.Nullable java.lang.String _val280; for (int _i281 = 0; _i281 < _map278.size; ++_i281) { _key279 = iprot.readString(); @@ -733,6 +720,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimMessageIq struct struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TimMessageIq struct) throws org.apache.thrift.TException { struct.validate(); @@ -742,7 +730,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimMessageIq struc oprot.writeFieldBegin(TIDLIST_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tidlist.size())); - for (String _iter282 : struct.tidlist) + for (java.lang.String _iter282 : struct.tidlist) { oprot.writeString(_iter282); } @@ -763,7 +751,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimMessageIq struc oprot.writeFieldBegin(MIDLIST_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.midlist.size())); - for (String _iter283 : struct.midlist) + for (java.lang.String _iter283 : struct.midlist) { oprot.writeString(_iter283); } @@ -777,7 +765,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimMessageIq struc oprot.writeFieldBegin(EXTRA_MAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.extraMap.size())); - for (Map.Entry _iter284 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter284 : struct.extraMap.entrySet()) { oprot.writeString(_iter284.getKey()); oprot.writeString(_iter284.getValue()); @@ -793,18 +781,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimMessageIq struc } - private static class TimMessageIqTupleSchemeFactory implements SchemeFactory { + private static class TimMessageIqTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimMessageIqTupleScheme getScheme() { return new TimMessageIqTupleScheme(); } } - private static class TimMessageIqTupleScheme extends TupleScheme { + private static class TimMessageIqTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TimMessageIq struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetTidlist()) { optionals.set(0); } @@ -821,7 +810,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimMessageIq struct if (struct.isSetTidlist()) { { oprot.writeI32(struct.tidlist.size()); - for (String _iter285 : struct.tidlist) + for (java.lang.String _iter285 : struct.tidlist) { oprot.writeString(_iter285); } @@ -833,7 +822,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimMessageIq struct if (struct.isSetMidlist()) { { oprot.writeI32(struct.midlist.size()); - for (String _iter286 : struct.midlist) + for (java.lang.String _iter286 : struct.midlist) { oprot.writeString(_iter286); } @@ -842,7 +831,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimMessageIq struct if (struct.isSetExtraMap()) { { oprot.writeI32(struct.extraMap.size()); - for (Map.Entry _iter287 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter287 : struct.extraMap.entrySet()) { oprot.writeString(_iter287.getKey()); oprot.writeString(_iter287.getValue()); @@ -853,13 +842,13 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimMessageIq struct @Override public void read(org.apache.thrift.protocol.TProtocol prot, TimMessageIq struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(4); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list288 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.tidlist = new ArrayList(_list288.size); - String _elem289; + org.apache.thrift.protocol.TList _list288 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.tidlist = new java.util.ArrayList(_list288.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem289; for (int _i290 = 0; _i290 < _list288.size; ++_i290) { _elem289 = iprot.readString(); @@ -875,9 +864,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimMessageIq struct) } if (incoming.get(2)) { { - org.apache.thrift.protocol.TList _list291 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.midlist = new ArrayList(_list291.size); - String _elem292; + org.apache.thrift.protocol.TList _list291 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.midlist = new java.util.ArrayList(_list291.size); + @org.apache.thrift.annotation.Nullable java.lang.String _elem292; for (int _i293 = 0; _i293 < _list291.size; ++_i293) { _elem292 = iprot.readString(); @@ -888,10 +877,10 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimMessageIq struct) } if (incoming.get(3)) { { - org.apache.thrift.protocol.TMap _map294 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.extraMap = new HashMap(2*_map294.size); - String _key295; - String _val296; + org.apache.thrift.protocol.TMap _map294 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.extraMap = new java.util.HashMap(2*_map294.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key295; + @org.apache.thrift.annotation.Nullable java.lang.String _val296; for (int _i297 = 0; _i297 < _map294.size; ++_i297) { _key295 = iprot.readString(); @@ -904,5 +893,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimMessageIq struct) } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/TimNode.java b/protocols/gen-java/com/tim/packet/TimNode.java index 7ed6fe5..9889044 100644 --- a/protocols/gen-java/com/tim/packet/TimNode.java +++ b/protocols/gen-java/com/tim/packet/TimNode.java @@ -1,60 +1,30 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class TimNode implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimNode"); private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TimNodeStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TimNodeTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TimNodeStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TimNodeTupleSchemeFactory(); /** * 键 */ - public String key; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String key; // optional /** * 值 */ - public String value; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String value; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -67,10 +37,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ VALUE((short)2, "value"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -78,6 +48,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // KEY @@ -95,44 +66,47 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final _Fields optionals[] = {_Fields.KEY,_Fields.VALUE}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimNode.class, metaDataMap); } @@ -151,6 +125,7 @@ public TimNode(TimNode other) { } } + @Override public TimNode deepCopy() { return new TimNode(this); } @@ -164,14 +139,15 @@ public void clear() { /** * 键 */ - public String getKey() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getKey() { return this.key; } /** * 键 */ - public TimNode setKey(String key) { + public TimNode setKey(@org.apache.thrift.annotation.Nullable java.lang.String key) { this.key = key; return this; } @@ -194,14 +170,15 @@ public void setKeyIsSet(boolean value) { /** * 值 */ - public String getValue() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getValue() { return this.value; } /** * 值 */ - public TimNode setValue(String value) { + public TimNode setValue(@org.apache.thrift.annotation.Nullable java.lang.String value) { this.value = value; return this; } @@ -221,13 +198,14 @@ public void setValueIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case KEY: if (value == null) { unsetKey(); } else { - setKey((String)value); + setKey((java.lang.String)value); } break; @@ -235,14 +213,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetValue(); } else { - setValue((String)value); + setValue((java.lang.String)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case KEY: return getKey(); @@ -251,13 +231,14 @@ public Object getFieldValue(_Fields field) { return getValue(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -266,13 +247,11 @@ public boolean isSet(_Fields field) { case VALUE: return isSetValue(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof TimNode) return this.equals((TimNode)that); return false; @@ -281,6 +260,8 @@ public boolean equals(Object that) { public boolean equals(TimNode that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_key = true && this.isSetKey(); boolean that_present_key = true && that.isSetKey(); @@ -305,19 +286,17 @@ public boolean equals(TimNode that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_key = true && (isSetKey()); - list.add(present_key); - if (present_key) - list.add(key); + hashCode = hashCode * 8191 + ((isSetKey()) ? 131071 : 524287); + if (isSetKey()) + hashCode = hashCode * 8191 + key.hashCode(); - boolean present_value = true && (isSetValue()); - list.add(present_value); - if (present_value) - list.add(value); + hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287); + if (isSetValue()) + hashCode = hashCode * 8191 + value.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -328,7 +307,7 @@ public int compareTo(TimNode other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetKey()).compareTo(other.isSetKey()); + lastComparison = java.lang.Boolean.compare(isSetKey(), other.isSetKey()); if (lastComparison != 0) { return lastComparison; } @@ -338,7 +317,7 @@ public int compareTo(TimNode other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); + lastComparison = java.lang.Boolean.compare(isSetValue(), other.isSetValue()); if (lastComparison != 0) { return lastComparison; } @@ -351,21 +330,25 @@ public int compareTo(TimNode other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("TimNode("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TimNode("); boolean first = true; if (isSetKey()) { @@ -404,7 +387,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -412,14 +395,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TimNodeStandardSchemeFactory implements SchemeFactory { + private static class TimNodeStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimNodeStandardScheme getScheme() { return new TimNodeStandardScheme(); } } - private static class TimNodeStandardScheme extends StandardScheme { + private static class TimNodeStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TimNode struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -457,6 +442,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimNode struct) thr struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TimNode struct) throws org.apache.thrift.TException { struct.validate(); @@ -481,18 +467,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimNode struct) th } - private static class TimNodeTupleSchemeFactory implements SchemeFactory { + private static class TimNodeTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimNodeTupleScheme getScheme() { return new TimNodeTupleScheme(); } } - private static class TimNodeTupleScheme extends TupleScheme { + private static class TimNodeTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TimNode struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetKey()) { optionals.set(0); } @@ -510,8 +497,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimNode struct) thr @Override public void read(org.apache.thrift.protocol.TProtocol prot, TimNode struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.key = iprot.readString(); struct.setKeyIsSet(true); @@ -523,5 +510,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimNode struct) thro } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/TimPBean.java b/protocols/gen-java/com/tim/packet/TimPBean.java index 6f6f531..f76dd91 100644 --- a/protocols/gen-java/com/tim/packet/TimPBean.java +++ b/protocols/gen-java/com/tim/packet/TimPBean.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class TimPBean implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimPBean"); @@ -50,22 +23,19 @@ public class TimPBean implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TimPBeanStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TimPBeanTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TimPBeanStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TimPBeanTupleSchemeFactory(); /** * 标识 */ - public String threadId; // required - public Tid fromTid; // optional - public Tid toTid; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String threadId; // required + public @org.apache.thrift.annotation.Nullable Tid fromTid; // optional + public @org.apache.thrift.annotation.Nullable Tid toTid; // optional /** * subscribe:订阅其他用户的状态 probe:请求获取其他用户的状态 unavailable:不可用,离线(offline)状态 */ - public String status; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String status; // optional /** * normal:类似于email,主要特点是不要求响应; * chat:类似于qq里的好友即时聊天,主要特点是实时通讯; @@ -73,7 +43,7 @@ public class TimPBean implements org.apache.thrift.TBase extraList; // optional + public @org.apache.thrift.annotation.Nullable java.util.List extraList; // optional /** * 错误码 */ - public TimError error; // optional - public Map extraMap; // optional + public @org.apache.thrift.annotation.Nullable TimError error; // optional + public @org.apache.thrift.annotation.Nullable java.util.Map extraMap; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -138,10 +108,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ERROR((short)10, "error"), EXTRA_MAP((short)11, "extraMap"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -149,6 +119,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // THREAD_ID @@ -184,30 +155,33 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } @@ -216,9 +190,9 @@ public String getFieldName() { private static final int __PRIORITY_ISSET_ID = 0; private byte __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.FROM_TID,_Fields.TO_TID,_Fields.STATUS,_Fields.TYPE,_Fields.PRIORITY,_Fields.SHOW,_Fields.LEAGUER_TID,_Fields.EXTRA_LIST,_Fields.ERROR,_Fields.EXTRA_MAP}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.THREAD_ID, new org.apache.thrift.meta_data.FieldMetaData("threadId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.FROM_TID, new org.apache.thrift.meta_data.FieldMetaData("fromTid", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -244,7 +218,7 @@ public String getFieldName() { new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimPBean.class, metaDataMap); } @@ -252,7 +226,7 @@ public TimPBean() { } public TimPBean( - String threadId) + java.lang.String threadId) { this(); this.threadId = threadId; @@ -286,7 +260,7 @@ public TimPBean(TimPBean other) { this.leaguerTid = new Tid(other.leaguerTid); } if (other.isSetExtraList()) { - List __this__extraList = new ArrayList(other.extraList.size()); + java.util.List __this__extraList = new java.util.ArrayList(other.extraList.size()); for (TimNode other_element : other.extraList) { __this__extraList.add(new TimNode(other_element)); } @@ -296,11 +270,12 @@ public TimPBean(TimPBean other) { this.error = new TimError(other.error); } if (other.isSetExtraMap()) { - Map __this__extraMap = new HashMap(other.extraMap); + java.util.Map __this__extraMap = new java.util.HashMap(other.extraMap); this.extraMap = __this__extraMap; } } + @Override public TimPBean deepCopy() { return new TimPBean(this); } @@ -324,14 +299,15 @@ public void clear() { /** * 标识 */ - public String getThreadId() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getThreadId() { return this.threadId; } /** * 标识 */ - public TimPBean setThreadId(String threadId) { + public TimPBean setThreadId(@org.apache.thrift.annotation.Nullable java.lang.String threadId) { this.threadId = threadId; return this; } @@ -351,11 +327,12 @@ public void setThreadIdIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public Tid getFromTid() { return this.fromTid; } - public TimPBean setFromTid(Tid fromTid) { + public TimPBean setFromTid(@org.apache.thrift.annotation.Nullable Tid fromTid) { this.fromTid = fromTid; return this; } @@ -375,11 +352,12 @@ public void setFromTidIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public Tid getToTid() { return this.toTid; } - public TimPBean setToTid(Tid toTid) { + public TimPBean setToTid(@org.apache.thrift.annotation.Nullable Tid toTid) { this.toTid = toTid; return this; } @@ -402,14 +380,15 @@ public void setToTidIsSet(boolean value) { /** * subscribe:订阅其他用户的状态 probe:请求获取其他用户的状态 unavailable:不可用,离线(offline)状态 */ - public String getStatus() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getStatus() { return this.status; } /** * subscribe:订阅其他用户的状态 probe:请求获取其他用户的状态 unavailable:不可用,离线(offline)状态 */ - public TimPBean setStatus(String status) { + public TimPBean setStatus(@org.apache.thrift.annotation.Nullable java.lang.String status) { this.status = status; return this; } @@ -436,7 +415,8 @@ public void setStatusIsSet(boolean value) { * headline:用于发送alert和notification; * error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; */ - public String getType() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getType() { return this.type; } @@ -447,7 +427,7 @@ public String getType() { * headline:用于发送alert和notification; * error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; */ - public TimPBean setType(String type) { + public TimPBean setType(@org.apache.thrift.annotation.Nullable java.lang.String type) { this.type = type; return this; } @@ -484,29 +464,30 @@ public TimPBean setPriority(int priority) { } public void unsetPriority() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PRIORITY_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PRIORITY_ISSET_ID); } /** Returns true if field priority is set (has been assigned a value) and false otherwise */ public boolean isSetPriority() { - return EncodingUtils.testBit(__isset_bitfield, __PRIORITY_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PRIORITY_ISSET_ID); } public void setPriorityIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PRIORITY_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PRIORITY_ISSET_ID, value); } /** * chat:聊天中 away:暂时离开 xa:eXtend Away,长时间离开 dnd:勿打扰 online:在线 offline:离线 */ - public String getShow() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getShow() { return this.show; } /** * chat:聊天中 away:暂时离开 xa:eXtend Away,长时间离开 dnd:勿打扰 online:在线 offline:离线 */ - public TimPBean setShow(String show) { + public TimPBean setShow(@org.apache.thrift.annotation.Nullable java.lang.String show) { this.show = show; return this; } @@ -529,6 +510,7 @@ public void setShowIsSet(boolean value) { /** * 成员Tid 群聊时信息发送者Tid */ + @org.apache.thrift.annotation.Nullable public Tid getLeaguerTid() { return this.leaguerTid; } @@ -536,7 +518,7 @@ public Tid getLeaguerTid() { /** * 成员Tid 群聊时信息发送者Tid */ - public TimPBean setLeaguerTid(Tid leaguerTid) { + public TimPBean setLeaguerTid(@org.apache.thrift.annotation.Nullable Tid leaguerTid) { this.leaguerTid = leaguerTid; return this; } @@ -560,13 +542,14 @@ public int getExtraListSize() { return (this.extraList == null) ? 0 : this.extraList.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getExtraListIterator() { return (this.extraList == null) ? null : this.extraList.iterator(); } public void addToExtraList(TimNode elem) { if (this.extraList == null) { - this.extraList = new ArrayList(); + this.extraList = new java.util.ArrayList(); } this.extraList.add(elem); } @@ -574,14 +557,15 @@ public void addToExtraList(TimNode elem) { /** * 扩展字段 */ - public List getExtraList() { + @org.apache.thrift.annotation.Nullable + public java.util.List getExtraList() { return this.extraList; } /** * 扩展字段 */ - public TimPBean setExtraList(List extraList) { + public TimPBean setExtraList(@org.apache.thrift.annotation.Nullable java.util.List extraList) { this.extraList = extraList; return this; } @@ -604,6 +588,7 @@ public void setExtraListIsSet(boolean value) { /** * 错误码 */ + @org.apache.thrift.annotation.Nullable public TimError getError() { return this.error; } @@ -611,7 +596,7 @@ public TimError getError() { /** * 错误码 */ - public TimPBean setError(TimError error) { + public TimPBean setError(@org.apache.thrift.annotation.Nullable TimError error) { this.error = error; return this; } @@ -635,18 +620,19 @@ public int getExtraMapSize() { return (this.extraMap == null) ? 0 : this.extraMap.size(); } - public void putToExtraMap(String key, String val) { + public void putToExtraMap(java.lang.String key, java.lang.String val) { if (this.extraMap == null) { - this.extraMap = new HashMap(); + this.extraMap = new java.util.HashMap(); } this.extraMap.put(key, val); } - public Map getExtraMap() { + @org.apache.thrift.annotation.Nullable + public java.util.Map getExtraMap() { return this.extraMap; } - public TimPBean setExtraMap(Map extraMap) { + public TimPBean setExtraMap(@org.apache.thrift.annotation.Nullable java.util.Map extraMap) { this.extraMap = extraMap; return this; } @@ -666,13 +652,14 @@ public void setExtraMapIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case THREAD_ID: if (value == null) { unsetThreadId(); } else { - setThreadId((String)value); + setThreadId((java.lang.String)value); } break; @@ -696,7 +683,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetStatus(); } else { - setStatus((String)value); + setStatus((java.lang.String)value); } break; @@ -704,7 +691,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetType(); } else { - setType((String)value); + setType((java.lang.String)value); } break; @@ -712,7 +699,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetPriority(); } else { - setPriority((Integer)value); + setPriority((java.lang.Integer)value); } break; @@ -720,7 +707,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetShow(); } else { - setShow((String)value); + setShow((java.lang.String)value); } break; @@ -736,7 +723,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraList(); } else { - setExtraList((List)value); + setExtraList((java.util.List)value); } break; @@ -752,14 +739,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraMap(); } else { - setExtraMap((Map)value); + setExtraMap((java.util.Map)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case THREAD_ID: return getThreadId(); @@ -795,13 +784,14 @@ public Object getFieldValue(_Fields field) { return getExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -828,13 +818,11 @@ public boolean isSet(_Fields field) { case EXTRA_MAP: return isSetExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof TimPBean) return this.equals((TimPBean)that); return false; @@ -843,6 +831,8 @@ public boolean equals(Object that) { public boolean equals(TimPBean that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_threadId = true && this.isSetThreadId(); boolean that_present_threadId = true && that.isSetThreadId(); @@ -948,64 +938,53 @@ public boolean equals(TimPBean that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_threadId = true && (isSetThreadId()); - list.add(present_threadId); - if (present_threadId) - list.add(threadId); - - boolean present_fromTid = true && (isSetFromTid()); - list.add(present_fromTid); - if (present_fromTid) - list.add(fromTid); - - boolean present_toTid = true && (isSetToTid()); - list.add(present_toTid); - if (present_toTid) - list.add(toTid); - - boolean present_status = true && (isSetStatus()); - list.add(present_status); - if (present_status) - list.add(status); - - boolean present_type = true && (isSetType()); - list.add(present_type); - if (present_type) - list.add(type); - - boolean present_priority = true && (isSetPriority()); - list.add(present_priority); - if (present_priority) - list.add(priority); - - boolean present_show = true && (isSetShow()); - list.add(present_show); - if (present_show) - list.add(show); - - boolean present_leaguerTid = true && (isSetLeaguerTid()); - list.add(present_leaguerTid); - if (present_leaguerTid) - list.add(leaguerTid); - - boolean present_extraList = true && (isSetExtraList()); - list.add(present_extraList); - if (present_extraList) - list.add(extraList); - - boolean present_error = true && (isSetError()); - list.add(present_error); - if (present_error) - list.add(error); - - boolean present_extraMap = true && (isSetExtraMap()); - list.add(present_extraMap); - if (present_extraMap) - list.add(extraMap); - - return list.hashCode(); + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetThreadId()) ? 131071 : 524287); + if (isSetThreadId()) + hashCode = hashCode * 8191 + threadId.hashCode(); + + hashCode = hashCode * 8191 + ((isSetFromTid()) ? 131071 : 524287); + if (isSetFromTid()) + hashCode = hashCode * 8191 + fromTid.hashCode(); + + hashCode = hashCode * 8191 + ((isSetToTid()) ? 131071 : 524287); + if (isSetToTid()) + hashCode = hashCode * 8191 + toTid.hashCode(); + + hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287); + if (isSetStatus()) + hashCode = hashCode * 8191 + status.hashCode(); + + hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287); + if (isSetType()) + hashCode = hashCode * 8191 + type.hashCode(); + + hashCode = hashCode * 8191 + ((isSetPriority()) ? 131071 : 524287); + if (isSetPriority()) + hashCode = hashCode * 8191 + priority; + + hashCode = hashCode * 8191 + ((isSetShow()) ? 131071 : 524287); + if (isSetShow()) + hashCode = hashCode * 8191 + show.hashCode(); + + hashCode = hashCode * 8191 + ((isSetLeaguerTid()) ? 131071 : 524287); + if (isSetLeaguerTid()) + hashCode = hashCode * 8191 + leaguerTid.hashCode(); + + hashCode = hashCode * 8191 + ((isSetExtraList()) ? 131071 : 524287); + if (isSetExtraList()) + hashCode = hashCode * 8191 + extraList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetError()) ? 131071 : 524287); + if (isSetError()) + hashCode = hashCode * 8191 + error.hashCode(); + + hashCode = hashCode * 8191 + ((isSetExtraMap()) ? 131071 : 524287); + if (isSetExtraMap()) + hashCode = hashCode * 8191 + extraMap.hashCode(); + + return hashCode; } @Override @@ -1016,7 +995,7 @@ public int compareTo(TimPBean other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetThreadId()).compareTo(other.isSetThreadId()); + lastComparison = java.lang.Boolean.compare(isSetThreadId(), other.isSetThreadId()); if (lastComparison != 0) { return lastComparison; } @@ -1026,7 +1005,7 @@ public int compareTo(TimPBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFromTid()).compareTo(other.isSetFromTid()); + lastComparison = java.lang.Boolean.compare(isSetFromTid(), other.isSetFromTid()); if (lastComparison != 0) { return lastComparison; } @@ -1036,7 +1015,7 @@ public int compareTo(TimPBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetToTid()).compareTo(other.isSetToTid()); + lastComparison = java.lang.Boolean.compare(isSetToTid(), other.isSetToTid()); if (lastComparison != 0) { return lastComparison; } @@ -1046,7 +1025,7 @@ public int compareTo(TimPBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus()); if (lastComparison != 0) { return lastComparison; } @@ -1056,7 +1035,7 @@ public int compareTo(TimPBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); + lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType()); if (lastComparison != 0) { return lastComparison; } @@ -1066,7 +1045,7 @@ public int compareTo(TimPBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPriority()).compareTo(other.isSetPriority()); + lastComparison = java.lang.Boolean.compare(isSetPriority(), other.isSetPriority()); if (lastComparison != 0) { return lastComparison; } @@ -1076,7 +1055,7 @@ public int compareTo(TimPBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetShow()).compareTo(other.isSetShow()); + lastComparison = java.lang.Boolean.compare(isSetShow(), other.isSetShow()); if (lastComparison != 0) { return lastComparison; } @@ -1086,7 +1065,7 @@ public int compareTo(TimPBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetLeaguerTid()).compareTo(other.isSetLeaguerTid()); + lastComparison = java.lang.Boolean.compare(isSetLeaguerTid(), other.isSetLeaguerTid()); if (lastComparison != 0) { return lastComparison; } @@ -1096,7 +1075,7 @@ public int compareTo(TimPBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraList()).compareTo(other.isSetExtraList()); + lastComparison = java.lang.Boolean.compare(isSetExtraList(), other.isSetExtraList()); if (lastComparison != 0) { return lastComparison; } @@ -1106,7 +1085,7 @@ public int compareTo(TimPBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetError()).compareTo(other.isSetError()); + lastComparison = java.lang.Boolean.compare(isSetError(), other.isSetError()); if (lastComparison != 0) { return lastComparison; } @@ -1116,7 +1095,7 @@ public int compareTo(TimPBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraMap()).compareTo(other.isSetExtraMap()); + lastComparison = java.lang.Boolean.compare(isSetExtraMap(), other.isSetExtraMap()); if (lastComparison != 0) { return lastComparison; } @@ -1129,21 +1108,25 @@ public int compareTo(TimPBean other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("TimPBean("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TimPBean("); boolean first = true; sb.append("threadId:"); @@ -1281,7 +1264,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; @@ -1291,14 +1274,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TimPBeanStandardSchemeFactory implements SchemeFactory { + private static class TimPBeanStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimPBeanStandardScheme getScheme() { return new TimPBeanStandardScheme(); } } - private static class TimPBeanStandardScheme extends StandardScheme { + private static class TimPBeanStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TimPBean struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -1380,8 +1365,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimPBean struct) th if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list132 = iprot.readListBegin(); - struct.extraList = new ArrayList(_list132.size); - TimNode _elem133; + struct.extraList = new java.util.ArrayList(_list132.size); + @org.apache.thrift.annotation.Nullable TimNode _elem133; for (int _i134 = 0; _i134 < _list132.size; ++_i134) { _elem133 = new TimNode(); @@ -1408,9 +1393,9 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimPBean struct) th if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map135 = iprot.readMapBegin(); - struct.extraMap = new HashMap(2*_map135.size); - String _key136; - String _val137; + struct.extraMap = new java.util.HashMap(2*_map135.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key136; + @org.apache.thrift.annotation.Nullable java.lang.String _val137; for (int _i138 = 0; _i138 < _map135.size; ++_i138) { _key136 = iprot.readString(); @@ -1435,6 +1420,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimPBean struct) th struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TimPBean struct) throws org.apache.thrift.TException { struct.validate(); @@ -1517,7 +1503,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimPBean struct) t oprot.writeFieldBegin(EXTRA_MAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.extraMap.size())); - for (Map.Entry _iter140 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter140 : struct.extraMap.entrySet()) { oprot.writeString(_iter140.getKey()); oprot.writeString(_iter140.getValue()); @@ -1533,19 +1519,20 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimPBean struct) t } - private static class TimPBeanTupleSchemeFactory implements SchemeFactory { + private static class TimPBeanTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimPBeanTupleScheme getScheme() { return new TimPBeanTupleScheme(); } } - private static class TimPBeanTupleScheme extends TupleScheme { + private static class TimPBeanTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TimPBean struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; oprot.writeString(struct.threadId); - BitSet optionals = new BitSet(); + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetFromTid()) { optionals.set(0); } @@ -1613,7 +1600,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimPBean struct) th if (struct.isSetExtraMap()) { { oprot.writeI32(struct.extraMap.size()); - for (Map.Entry _iter142 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter142 : struct.extraMap.entrySet()) { oprot.writeString(_iter142.getKey()); oprot.writeString(_iter142.getValue()); @@ -1624,10 +1611,10 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimPBean struct) th @Override public void read(org.apache.thrift.protocol.TProtocol prot, TimPBean struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.threadId = iprot.readString(); struct.setThreadIdIsSet(true); - BitSet incoming = iprot.readBitSet(10); + java.util.BitSet incoming = iprot.readBitSet(10); if (incoming.get(0)) { struct.fromTid = new Tid(); struct.fromTid.read(iprot); @@ -1661,9 +1648,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimPBean struct) thr } if (incoming.get(7)) { { - org.apache.thrift.protocol.TList _list143 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.extraList = new ArrayList(_list143.size); - TimNode _elem144; + org.apache.thrift.protocol.TList _list143 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); + struct.extraList = new java.util.ArrayList(_list143.size); + @org.apache.thrift.annotation.Nullable TimNode _elem144; for (int _i145 = 0; _i145 < _list143.size; ++_i145) { _elem144 = new TimNode(); @@ -1680,10 +1667,10 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimPBean struct) thr } if (incoming.get(9)) { { - org.apache.thrift.protocol.TMap _map146 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.extraMap = new HashMap(2*_map146.size); - String _key147; - String _val148; + org.apache.thrift.protocol.TMap _map146 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.extraMap = new java.util.HashMap(2*_map146.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key147; + @org.apache.thrift.annotation.Nullable java.lang.String _val148; for (int _i149 = 0; _i149 < _map146.size; ++_i149) { _key147 = iprot.readString(); @@ -1696,5 +1683,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimPBean struct) thr } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/TimPBeanList.java b/protocols/gen-java/com/tim/packet/TimPBeanList.java index a13e899..2935b8f 100644 --- a/protocols/gen-java/com/tim/packet/TimPBeanList.java +++ b/protocols/gen-java/com/tim/packet/TimPBeanList.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class TimPBeanList implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimPBeanList"); @@ -43,22 +16,19 @@ public class TimPBeanList implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TimPBeanListStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TimPBeanListTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TimPBeanListStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TimPBeanListTupleSchemeFactory(); - public String threadId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String threadId; // required /** * 状态信息列表 */ - public List timPBeanList; // optional + public @org.apache.thrift.annotation.Nullable java.util.List timPBeanList; // optional /** * 类型 */ - public String reqType; // optional - public Map extraMap; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String reqType; // optional + public @org.apache.thrift.annotation.Nullable java.util.Map extraMap; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -73,10 +43,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { REQ_TYPE((short)3, "reqType"), EXTRA_MAP((short)4, "extraMap"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -84,6 +54,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // THREAD_ID @@ -105,39 +76,42 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final _Fields optionals[] = {_Fields.TIM_PBEAN_LIST,_Fields.REQ_TYPE,_Fields.EXTRA_MAP}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.THREAD_ID, new org.apache.thrift.meta_data.FieldMetaData("threadId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TIM_PBEAN_LIST, new org.apache.thrift.meta_data.FieldMetaData("timPBeanList", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -149,7 +123,7 @@ public String getFieldName() { new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimPBeanList.class, metaDataMap); } @@ -157,7 +131,7 @@ public TimPBeanList() { } public TimPBeanList( - String threadId) + java.lang.String threadId) { this(); this.threadId = threadId; @@ -171,7 +145,7 @@ public TimPBeanList(TimPBeanList other) { this.threadId = other.threadId; } if (other.isSetTimPBeanList()) { - List __this__timPBeanList = new ArrayList(other.timPBeanList.size()); + java.util.List __this__timPBeanList = new java.util.ArrayList(other.timPBeanList.size()); for (TimPBean other_element : other.timPBeanList) { __this__timPBeanList.add(new TimPBean(other_element)); } @@ -181,11 +155,12 @@ public TimPBeanList(TimPBeanList other) { this.reqType = other.reqType; } if (other.isSetExtraMap()) { - Map __this__extraMap = new HashMap(other.extraMap); + java.util.Map __this__extraMap = new java.util.HashMap(other.extraMap); this.extraMap = __this__extraMap; } } + @Override public TimPBeanList deepCopy() { return new TimPBeanList(this); } @@ -198,11 +173,12 @@ public void clear() { this.extraMap = null; } - public String getThreadId() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getThreadId() { return this.threadId; } - public TimPBeanList setThreadId(String threadId) { + public TimPBeanList setThreadId(@org.apache.thrift.annotation.Nullable java.lang.String threadId) { this.threadId = threadId; return this; } @@ -226,13 +202,14 @@ public int getTimPBeanListSize() { return (this.timPBeanList == null) ? 0 : this.timPBeanList.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getTimPBeanListIterator() { return (this.timPBeanList == null) ? null : this.timPBeanList.iterator(); } public void addToTimPBeanList(TimPBean elem) { if (this.timPBeanList == null) { - this.timPBeanList = new ArrayList(); + this.timPBeanList = new java.util.ArrayList(); } this.timPBeanList.add(elem); } @@ -240,14 +217,15 @@ public void addToTimPBeanList(TimPBean elem) { /** * 状态信息列表 */ - public List getTimPBeanList() { + @org.apache.thrift.annotation.Nullable + public java.util.List getTimPBeanList() { return this.timPBeanList; } /** * 状态信息列表 */ - public TimPBeanList setTimPBeanList(List timPBeanList) { + public TimPBeanList setTimPBeanList(@org.apache.thrift.annotation.Nullable java.util.List timPBeanList) { this.timPBeanList = timPBeanList; return this; } @@ -270,14 +248,15 @@ public void setTimPBeanListIsSet(boolean value) { /** * 类型 */ - public String getReqType() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getReqType() { return this.reqType; } /** * 类型 */ - public TimPBeanList setReqType(String reqType) { + public TimPBeanList setReqType(@org.apache.thrift.annotation.Nullable java.lang.String reqType) { this.reqType = reqType; return this; } @@ -301,18 +280,19 @@ public int getExtraMapSize() { return (this.extraMap == null) ? 0 : this.extraMap.size(); } - public void putToExtraMap(String key, String val) { + public void putToExtraMap(java.lang.String key, java.lang.String val) { if (this.extraMap == null) { - this.extraMap = new HashMap(); + this.extraMap = new java.util.HashMap(); } this.extraMap.put(key, val); } - public Map getExtraMap() { + @org.apache.thrift.annotation.Nullable + public java.util.Map getExtraMap() { return this.extraMap; } - public TimPBeanList setExtraMap(Map extraMap) { + public TimPBeanList setExtraMap(@org.apache.thrift.annotation.Nullable java.util.Map extraMap) { this.extraMap = extraMap; return this; } @@ -332,13 +312,14 @@ public void setExtraMapIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case THREAD_ID: if (value == null) { unsetThreadId(); } else { - setThreadId((String)value); + setThreadId((java.lang.String)value); } break; @@ -346,7 +327,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetTimPBeanList(); } else { - setTimPBeanList((List)value); + setTimPBeanList((java.util.List)value); } break; @@ -354,7 +335,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetReqType(); } else { - setReqType((String)value); + setReqType((java.lang.String)value); } break; @@ -362,14 +343,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraMap(); } else { - setExtraMap((Map)value); + setExtraMap((java.util.Map)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case THREAD_ID: return getThreadId(); @@ -384,13 +367,14 @@ public Object getFieldValue(_Fields field) { return getExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -403,13 +387,11 @@ public boolean isSet(_Fields field) { case EXTRA_MAP: return isSetExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof TimPBeanList) return this.equals((TimPBeanList)that); return false; @@ -418,6 +400,8 @@ public boolean equals(Object that) { public boolean equals(TimPBeanList that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_threadId = true && this.isSetThreadId(); boolean that_present_threadId = true && that.isSetThreadId(); @@ -460,29 +444,25 @@ public boolean equals(TimPBeanList that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_threadId = true && (isSetThreadId()); - list.add(present_threadId); - if (present_threadId) - list.add(threadId); + hashCode = hashCode * 8191 + ((isSetThreadId()) ? 131071 : 524287); + if (isSetThreadId()) + hashCode = hashCode * 8191 + threadId.hashCode(); - boolean present_timPBeanList = true && (isSetTimPBeanList()); - list.add(present_timPBeanList); - if (present_timPBeanList) - list.add(timPBeanList); + hashCode = hashCode * 8191 + ((isSetTimPBeanList()) ? 131071 : 524287); + if (isSetTimPBeanList()) + hashCode = hashCode * 8191 + timPBeanList.hashCode(); - boolean present_reqType = true && (isSetReqType()); - list.add(present_reqType); - if (present_reqType) - list.add(reqType); + hashCode = hashCode * 8191 + ((isSetReqType()) ? 131071 : 524287); + if (isSetReqType()) + hashCode = hashCode * 8191 + reqType.hashCode(); - boolean present_extraMap = true && (isSetExtraMap()); - list.add(present_extraMap); - if (present_extraMap) - list.add(extraMap); + hashCode = hashCode * 8191 + ((isSetExtraMap()) ? 131071 : 524287); + if (isSetExtraMap()) + hashCode = hashCode * 8191 + extraMap.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -493,7 +473,7 @@ public int compareTo(TimPBeanList other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetThreadId()).compareTo(other.isSetThreadId()); + lastComparison = java.lang.Boolean.compare(isSetThreadId(), other.isSetThreadId()); if (lastComparison != 0) { return lastComparison; } @@ -503,7 +483,7 @@ public int compareTo(TimPBeanList other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTimPBeanList()).compareTo(other.isSetTimPBeanList()); + lastComparison = java.lang.Boolean.compare(isSetTimPBeanList(), other.isSetTimPBeanList()); if (lastComparison != 0) { return lastComparison; } @@ -513,7 +493,7 @@ public int compareTo(TimPBeanList other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetReqType()).compareTo(other.isSetReqType()); + lastComparison = java.lang.Boolean.compare(isSetReqType(), other.isSetReqType()); if (lastComparison != 0) { return lastComparison; } @@ -523,7 +503,7 @@ public int compareTo(TimPBeanList other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraMap()).compareTo(other.isSetExtraMap()); + lastComparison = java.lang.Boolean.compare(isSetExtraMap(), other.isSetExtraMap()); if (lastComparison != 0) { return lastComparison; } @@ -536,21 +516,25 @@ public int compareTo(TimPBeanList other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("TimPBeanList("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TimPBeanList("); boolean first = true; sb.append("threadId:"); @@ -610,7 +594,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -618,14 +602,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TimPBeanListStandardSchemeFactory implements SchemeFactory { + private static class TimPBeanListStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimPBeanListStandardScheme getScheme() { return new TimPBeanListStandardScheme(); } } - private static class TimPBeanListStandardScheme extends StandardScheme { + private static class TimPBeanListStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TimPBeanList struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -648,8 +634,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimPBeanList struct if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list316 = iprot.readListBegin(); - struct.timPBeanList = new ArrayList(_list316.size); - TimPBean _elem317; + struct.timPBeanList = new java.util.ArrayList(_list316.size); + @org.apache.thrift.annotation.Nullable TimPBean _elem317; for (int _i318 = 0; _i318 < _list316.size; ++_i318) { _elem317 = new TimPBean(); @@ -675,9 +661,9 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimPBeanList struct if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map319 = iprot.readMapBegin(); - struct.extraMap = new HashMap(2*_map319.size); - String _key320; - String _val321; + struct.extraMap = new java.util.HashMap(2*_map319.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key320; + @org.apache.thrift.annotation.Nullable java.lang.String _val321; for (int _i322 = 0; _i322 < _map319.size; ++_i322) { _key320 = iprot.readString(); @@ -702,6 +688,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimPBeanList struct struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TimPBeanList struct) throws org.apache.thrift.TException { struct.validate(); @@ -737,7 +724,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimPBeanList struc oprot.writeFieldBegin(EXTRA_MAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.extraMap.size())); - for (Map.Entry _iter324 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter324 : struct.extraMap.entrySet()) { oprot.writeString(_iter324.getKey()); oprot.writeString(_iter324.getValue()); @@ -753,19 +740,20 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimPBeanList struc } - private static class TimPBeanListTupleSchemeFactory implements SchemeFactory { + private static class TimPBeanListTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimPBeanListTupleScheme getScheme() { return new TimPBeanListTupleScheme(); } } - private static class TimPBeanListTupleScheme extends TupleScheme { + private static class TimPBeanListTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TimPBeanList struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; oprot.writeString(struct.threadId); - BitSet optionals = new BitSet(); + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetTimPBeanList()) { optionals.set(0); } @@ -791,7 +779,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimPBeanList struct if (struct.isSetExtraMap()) { { oprot.writeI32(struct.extraMap.size()); - for (Map.Entry _iter326 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter326 : struct.extraMap.entrySet()) { oprot.writeString(_iter326.getKey()); oprot.writeString(_iter326.getValue()); @@ -802,15 +790,15 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimPBeanList struct @Override public void read(org.apache.thrift.protocol.TProtocol prot, TimPBeanList struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.threadId = iprot.readString(); struct.setThreadIdIsSet(true); - BitSet incoming = iprot.readBitSet(3); + java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list327 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.timPBeanList = new ArrayList(_list327.size); - TimPBean _elem328; + org.apache.thrift.protocol.TList _list327 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); + struct.timPBeanList = new java.util.ArrayList(_list327.size); + @org.apache.thrift.annotation.Nullable TimPBean _elem328; for (int _i329 = 0; _i329 < _list327.size; ++_i329) { _elem328 = new TimPBean(); @@ -826,10 +814,10 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimPBeanList struct) } if (incoming.get(2)) { { - org.apache.thrift.protocol.TMap _map330 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.extraMap = new HashMap(2*_map330.size); - String _key331; - String _val332; + org.apache.thrift.protocol.TMap _map330 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.extraMap = new java.util.HashMap(2*_map330.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key331; + @org.apache.thrift.annotation.Nullable java.lang.String _val332; for (int _i333 = 0; _i333 < _map330.size; ++_i333) { _key331 = iprot.readString(); @@ -842,5 +830,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimPBeanList struct) } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/TimPage.java b/protocols/gen-java/com/tim/packet/TimPage.java index 79aeda1..47d9fa4 100644 --- a/protocols/gen-java/com/tim/packet/TimPage.java +++ b/protocols/gen-java/com/tim/packet/TimPage.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class TimPage implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimPage"); @@ -43,25 +16,22 @@ public class TimPage implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TimPageStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TimPageTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TimPageStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TimPageTupleSchemeFactory(); /** * 时间上 */ - public String fromTimeStamp; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String fromTimeStamp; // optional /** * 时间下 */ - public String toTimeStamp; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String toTimeStamp; // optional /** * 条数 */ public int limitCount; // optional - public Map extraMap; // optional + public @org.apache.thrift.annotation.Nullable java.util.Map extraMap; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -79,10 +49,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { LIMIT_COUNT((short)3, "limitCount"), EXTRA_MAP((short)4, "extraMap"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -90,6 +60,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // FROM_TIME_STAMP @@ -111,30 +82,33 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } @@ -143,9 +117,9 @@ public String getFieldName() { private static final int __LIMITCOUNT_ISSET_ID = 0; private byte __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.FROM_TIME_STAMP,_Fields.TO_TIME_STAMP,_Fields.LIMIT_COUNT,_Fields.EXTRA_MAP}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.FROM_TIME_STAMP, new org.apache.thrift.meta_data.FieldMetaData("fromTimeStamp", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TO_TIME_STAMP, new org.apache.thrift.meta_data.FieldMetaData("toTimeStamp", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -156,7 +130,7 @@ public String getFieldName() { new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimPage.class, metaDataMap); } @@ -176,11 +150,12 @@ public TimPage(TimPage other) { } this.limitCount = other.limitCount; if (other.isSetExtraMap()) { - Map __this__extraMap = new HashMap(other.extraMap); + java.util.Map __this__extraMap = new java.util.HashMap(other.extraMap); this.extraMap = __this__extraMap; } } + @Override public TimPage deepCopy() { return new TimPage(this); } @@ -197,14 +172,15 @@ public void clear() { /** * 时间上 */ - public String getFromTimeStamp() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getFromTimeStamp() { return this.fromTimeStamp; } /** * 时间上 */ - public TimPage setFromTimeStamp(String fromTimeStamp) { + public TimPage setFromTimeStamp(@org.apache.thrift.annotation.Nullable java.lang.String fromTimeStamp) { this.fromTimeStamp = fromTimeStamp; return this; } @@ -227,14 +203,15 @@ public void setFromTimeStampIsSet(boolean value) { /** * 时间下 */ - public String getToTimeStamp() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getToTimeStamp() { return this.toTimeStamp; } /** * 时间下 */ - public TimPage setToTimeStamp(String toTimeStamp) { + public TimPage setToTimeStamp(@org.apache.thrift.annotation.Nullable java.lang.String toTimeStamp) { this.toTimeStamp = toTimeStamp; return this; } @@ -271,34 +248,35 @@ public TimPage setLimitCount(int limitCount) { } public void unsetLimitCount() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LIMITCOUNT_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LIMITCOUNT_ISSET_ID); } /** Returns true if field limitCount is set (has been assigned a value) and false otherwise */ public boolean isSetLimitCount() { - return EncodingUtils.testBit(__isset_bitfield, __LIMITCOUNT_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LIMITCOUNT_ISSET_ID); } public void setLimitCountIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LIMITCOUNT_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LIMITCOUNT_ISSET_ID, value); } public int getExtraMapSize() { return (this.extraMap == null) ? 0 : this.extraMap.size(); } - public void putToExtraMap(String key, String val) { + public void putToExtraMap(java.lang.String key, java.lang.String val) { if (this.extraMap == null) { - this.extraMap = new HashMap(); + this.extraMap = new java.util.HashMap(); } this.extraMap.put(key, val); } - public Map getExtraMap() { + @org.apache.thrift.annotation.Nullable + public java.util.Map getExtraMap() { return this.extraMap; } - public TimPage setExtraMap(Map extraMap) { + public TimPage setExtraMap(@org.apache.thrift.annotation.Nullable java.util.Map extraMap) { this.extraMap = extraMap; return this; } @@ -318,13 +296,14 @@ public void setExtraMapIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case FROM_TIME_STAMP: if (value == null) { unsetFromTimeStamp(); } else { - setFromTimeStamp((String)value); + setFromTimeStamp((java.lang.String)value); } break; @@ -332,7 +311,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetToTimeStamp(); } else { - setToTimeStamp((String)value); + setToTimeStamp((java.lang.String)value); } break; @@ -340,7 +319,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetLimitCount(); } else { - setLimitCount((Integer)value); + setLimitCount((java.lang.Integer)value); } break; @@ -348,14 +327,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraMap(); } else { - setExtraMap((Map)value); + setExtraMap((java.util.Map)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case FROM_TIME_STAMP: return getFromTimeStamp(); @@ -370,13 +351,14 @@ public Object getFieldValue(_Fields field) { return getExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -389,13 +371,11 @@ public boolean isSet(_Fields field) { case EXTRA_MAP: return isSetExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof TimPage) return this.equals((TimPage)that); return false; @@ -404,6 +384,8 @@ public boolean equals(Object that) { public boolean equals(TimPage that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_fromTimeStamp = true && this.isSetFromTimeStamp(); boolean that_present_fromTimeStamp = true && that.isSetFromTimeStamp(); @@ -446,29 +428,25 @@ public boolean equals(TimPage that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_fromTimeStamp = true && (isSetFromTimeStamp()); - list.add(present_fromTimeStamp); - if (present_fromTimeStamp) - list.add(fromTimeStamp); + hashCode = hashCode * 8191 + ((isSetFromTimeStamp()) ? 131071 : 524287); + if (isSetFromTimeStamp()) + hashCode = hashCode * 8191 + fromTimeStamp.hashCode(); - boolean present_toTimeStamp = true && (isSetToTimeStamp()); - list.add(present_toTimeStamp); - if (present_toTimeStamp) - list.add(toTimeStamp); + hashCode = hashCode * 8191 + ((isSetToTimeStamp()) ? 131071 : 524287); + if (isSetToTimeStamp()) + hashCode = hashCode * 8191 + toTimeStamp.hashCode(); - boolean present_limitCount = true && (isSetLimitCount()); - list.add(present_limitCount); - if (present_limitCount) - list.add(limitCount); + hashCode = hashCode * 8191 + ((isSetLimitCount()) ? 131071 : 524287); + if (isSetLimitCount()) + hashCode = hashCode * 8191 + limitCount; - boolean present_extraMap = true && (isSetExtraMap()); - list.add(present_extraMap); - if (present_extraMap) - list.add(extraMap); + hashCode = hashCode * 8191 + ((isSetExtraMap()) ? 131071 : 524287); + if (isSetExtraMap()) + hashCode = hashCode * 8191 + extraMap.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -479,7 +457,7 @@ public int compareTo(TimPage other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetFromTimeStamp()).compareTo(other.isSetFromTimeStamp()); + lastComparison = java.lang.Boolean.compare(isSetFromTimeStamp(), other.isSetFromTimeStamp()); if (lastComparison != 0) { return lastComparison; } @@ -489,7 +467,7 @@ public int compareTo(TimPage other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetToTimeStamp()).compareTo(other.isSetToTimeStamp()); + lastComparison = java.lang.Boolean.compare(isSetToTimeStamp(), other.isSetToTimeStamp()); if (lastComparison != 0) { return lastComparison; } @@ -499,7 +477,7 @@ public int compareTo(TimPage other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetLimitCount()).compareTo(other.isSetLimitCount()); + lastComparison = java.lang.Boolean.compare(isSetLimitCount(), other.isSetLimitCount()); if (lastComparison != 0) { return lastComparison; } @@ -509,7 +487,7 @@ public int compareTo(TimPage other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraMap()).compareTo(other.isSetExtraMap()); + lastComparison = java.lang.Boolean.compare(isSetExtraMap(), other.isSetExtraMap()); if (lastComparison != 0) { return lastComparison; } @@ -522,21 +500,25 @@ public int compareTo(TimPage other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("TimPage("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TimPage("); boolean first = true; if (isSetFromTimeStamp()) { @@ -591,7 +573,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; @@ -601,14 +583,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TimPageStandardSchemeFactory implements SchemeFactory { + private static class TimPageStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimPageStandardScheme getScheme() { return new TimPageStandardScheme(); } } - private static class TimPageStandardScheme extends StandardScheme { + private static class TimPageStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TimPage struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -647,9 +631,9 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimPage struct) thr if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map262 = iprot.readMapBegin(); - struct.extraMap = new HashMap(2*_map262.size); - String _key263; - String _val264; + struct.extraMap = new java.util.HashMap(2*_map262.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key263; + @org.apache.thrift.annotation.Nullable java.lang.String _val264; for (int _i265 = 0; _i265 < _map262.size; ++_i265) { _key263 = iprot.readString(); @@ -674,6 +658,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimPage struct) thr struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TimPage struct) throws org.apache.thrift.TException { struct.validate(); @@ -702,7 +687,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimPage struct) th oprot.writeFieldBegin(EXTRA_MAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.extraMap.size())); - for (Map.Entry _iter266 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter266 : struct.extraMap.entrySet()) { oprot.writeString(_iter266.getKey()); oprot.writeString(_iter266.getValue()); @@ -718,18 +703,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimPage struct) th } - private static class TimPageTupleSchemeFactory implements SchemeFactory { + private static class TimPageTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimPageTupleScheme getScheme() { return new TimPageTupleScheme(); } } - private static class TimPageTupleScheme extends TupleScheme { + private static class TimPageTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TimPage struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetFromTimeStamp()) { optionals.set(0); } @@ -755,7 +741,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimPage struct) thr if (struct.isSetExtraMap()) { { oprot.writeI32(struct.extraMap.size()); - for (Map.Entry _iter267 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter267 : struct.extraMap.entrySet()) { oprot.writeString(_iter267.getKey()); oprot.writeString(_iter267.getValue()); @@ -766,8 +752,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimPage struct) thr @Override public void read(org.apache.thrift.protocol.TProtocol prot, TimPage struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(4); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.fromTimeStamp = iprot.readString(); struct.setFromTimeStampIsSet(true); @@ -782,10 +768,10 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimPage struct) thro } if (incoming.get(3)) { { - org.apache.thrift.protocol.TMap _map268 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.extraMap = new HashMap(2*_map268.size); - String _key269; - String _val270; + org.apache.thrift.protocol.TMap _map268 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.extraMap = new java.util.HashMap(2*_map268.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key269; + @org.apache.thrift.annotation.Nullable java.lang.String _val270; for (int _i271 = 0; _i271 < _map268.size; ++_i271) { _key269 = iprot.readString(); @@ -798,5 +784,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimPage struct) thro } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/TimParam.java b/protocols/gen-java/com/tim/packet/TimParam.java index 03a83cb..5bd5f73 100644 --- a/protocols/gen-java/com/tim/packet/TimParam.java +++ b/protocols/gen-java/com/tim/packet/TimParam.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class TimParam implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimParam"); @@ -46,16 +19,13 @@ public class TimParam implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TimParamStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TimParamTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TimParamStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TimParamTupleSchemeFactory(); /** * 服务器时间 */ - public String timestamp; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String timestamp; // optional /** * 版本 */ @@ -63,20 +33,20 @@ public class TimParam implements org.apache.thrift.TBase extraList; // optional - public Map extraMap; // optional + public @org.apache.thrift.annotation.Nullable java.util.List extraList; // optional + public @org.apache.thrift.annotation.Nullable java.util.Map extraMap; // optional /** * 消息合流 */ - public String interflow; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String interflow; // optional /** * tls */ - public String tls; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String tls; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -106,10 +76,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ TLS((short)7, "tls"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -117,6 +87,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TIMESTAMP @@ -144,30 +115,33 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } @@ -176,9 +150,9 @@ public String getFieldName() { private static final int __VERSION_ISSET_ID = 0; private byte __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.TIMESTAMP,_Fields.VERSION,_Fields.LANG,_Fields.EXTRA_LIST,_Fields.EXTRA_MAP,_Fields.INTERFLOW,_Fields.TLS}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -196,7 +170,7 @@ public String getFieldName() { new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TLS, new org.apache.thrift.meta_data.FieldMetaData("tls", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimParam.class, metaDataMap); } @@ -216,14 +190,14 @@ public TimParam(TimParam other) { this.lang = other.lang; } if (other.isSetExtraList()) { - List __this__extraList = new ArrayList(other.extraList.size()); + java.util.List __this__extraList = new java.util.ArrayList(other.extraList.size()); for (TimNode other_element : other.extraList) { __this__extraList.add(new TimNode(other_element)); } this.extraList = __this__extraList; } if (other.isSetExtraMap()) { - Map __this__extraMap = new HashMap(other.extraMap); + java.util.Map __this__extraMap = new java.util.HashMap(other.extraMap); this.extraMap = __this__extraMap; } if (other.isSetInterflow()) { @@ -234,6 +208,7 @@ public TimParam(TimParam other) { } } + @Override public TimParam deepCopy() { return new TimParam(this); } @@ -253,14 +228,15 @@ public void clear() { /** * 服务器时间 */ - public String getTimestamp() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getTimestamp() { return this.timestamp; } /** * 服务器时间 */ - public TimParam setTimestamp(String timestamp) { + public TimParam setTimestamp(@org.apache.thrift.annotation.Nullable java.lang.String timestamp) { this.timestamp = timestamp; return this; } @@ -297,29 +273,30 @@ public TimParam setVersion(short version) { } public void unsetVersion() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID); } /** Returns true if field version is set (has been assigned a value) and false otherwise */ public boolean isSetVersion() { - return EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID); } public void setVersionIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value); } /** * 语言 */ - public String getLang() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getLang() { return this.lang; } /** * 语言 */ - public TimParam setLang(String lang) { + public TimParam setLang(@org.apache.thrift.annotation.Nullable java.lang.String lang) { this.lang = lang; return this; } @@ -343,13 +320,14 @@ public int getExtraListSize() { return (this.extraList == null) ? 0 : this.extraList.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getExtraListIterator() { return (this.extraList == null) ? null : this.extraList.iterator(); } public void addToExtraList(TimNode elem) { if (this.extraList == null) { - this.extraList = new ArrayList(); + this.extraList = new java.util.ArrayList(); } this.extraList.add(elem); } @@ -357,14 +335,15 @@ public void addToExtraList(TimNode elem) { /** * 附加信息 */ - public List getExtraList() { + @org.apache.thrift.annotation.Nullable + public java.util.List getExtraList() { return this.extraList; } /** * 附加信息 */ - public TimParam setExtraList(List extraList) { + public TimParam setExtraList(@org.apache.thrift.annotation.Nullable java.util.List extraList) { this.extraList = extraList; return this; } @@ -388,18 +367,19 @@ public int getExtraMapSize() { return (this.extraMap == null) ? 0 : this.extraMap.size(); } - public void putToExtraMap(String key, String val) { + public void putToExtraMap(java.lang.String key, java.lang.String val) { if (this.extraMap == null) { - this.extraMap = new HashMap(); + this.extraMap = new java.util.HashMap(); } this.extraMap.put(key, val); } - public Map getExtraMap() { + @org.apache.thrift.annotation.Nullable + public java.util.Map getExtraMap() { return this.extraMap; } - public TimParam setExtraMap(Map extraMap) { + public TimParam setExtraMap(@org.apache.thrift.annotation.Nullable java.util.Map extraMap) { this.extraMap = extraMap; return this; } @@ -422,14 +402,15 @@ public void setExtraMapIsSet(boolean value) { /** * 消息合流 */ - public String getInterflow() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getInterflow() { return this.interflow; } /** * 消息合流 */ - public TimParam setInterflow(String interflow) { + public TimParam setInterflow(@org.apache.thrift.annotation.Nullable java.lang.String interflow) { this.interflow = interflow; return this; } @@ -452,14 +433,15 @@ public void setInterflowIsSet(boolean value) { /** * tls */ - public String getTls() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getTls() { return this.tls; } /** * tls */ - public TimParam setTls(String tls) { + public TimParam setTls(@org.apache.thrift.annotation.Nullable java.lang.String tls) { this.tls = tls; return this; } @@ -479,13 +461,14 @@ public void setTlsIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case TIMESTAMP: if (value == null) { unsetTimestamp(); } else { - setTimestamp((String)value); + setTimestamp((java.lang.String)value); } break; @@ -493,7 +476,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetVersion(); } else { - setVersion((Short)value); + setVersion((java.lang.Short)value); } break; @@ -501,7 +484,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetLang(); } else { - setLang((String)value); + setLang((java.lang.String)value); } break; @@ -509,7 +492,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraList(); } else { - setExtraList((List)value); + setExtraList((java.util.List)value); } break; @@ -517,7 +500,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraMap(); } else { - setExtraMap((Map)value); + setExtraMap((java.util.Map)value); } break; @@ -525,7 +508,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetInterflow(); } else { - setInterflow((String)value); + setInterflow((java.lang.String)value); } break; @@ -533,14 +516,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetTls(); } else { - setTls((String)value); + setTls((java.lang.String)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TIMESTAMP: return getTimestamp(); @@ -564,13 +549,14 @@ public Object getFieldValue(_Fields field) { return getTls(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -589,13 +575,11 @@ public boolean isSet(_Fields field) { case TLS: return isSetTls(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof TimParam) return this.equals((TimParam)that); return false; @@ -604,6 +588,8 @@ public boolean equals(Object that) { public boolean equals(TimParam that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_timestamp = true && this.isSetTimestamp(); boolean that_present_timestamp = true && that.isSetTimestamp(); @@ -673,44 +659,37 @@ public boolean equals(TimParam that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_timestamp = true && (isSetTimestamp()); - list.add(present_timestamp); - if (present_timestamp) - list.add(timestamp); + hashCode = hashCode * 8191 + ((isSetTimestamp()) ? 131071 : 524287); + if (isSetTimestamp()) + hashCode = hashCode * 8191 + timestamp.hashCode(); - boolean present_version = true && (isSetVersion()); - list.add(present_version); - if (present_version) - list.add(version); + hashCode = hashCode * 8191 + ((isSetVersion()) ? 131071 : 524287); + if (isSetVersion()) + hashCode = hashCode * 8191 + version; - boolean present_lang = true && (isSetLang()); - list.add(present_lang); - if (present_lang) - list.add(lang); + hashCode = hashCode * 8191 + ((isSetLang()) ? 131071 : 524287); + if (isSetLang()) + hashCode = hashCode * 8191 + lang.hashCode(); - boolean present_extraList = true && (isSetExtraList()); - list.add(present_extraList); - if (present_extraList) - list.add(extraList); + hashCode = hashCode * 8191 + ((isSetExtraList()) ? 131071 : 524287); + if (isSetExtraList()) + hashCode = hashCode * 8191 + extraList.hashCode(); - boolean present_extraMap = true && (isSetExtraMap()); - list.add(present_extraMap); - if (present_extraMap) - list.add(extraMap); + hashCode = hashCode * 8191 + ((isSetExtraMap()) ? 131071 : 524287); + if (isSetExtraMap()) + hashCode = hashCode * 8191 + extraMap.hashCode(); - boolean present_interflow = true && (isSetInterflow()); - list.add(present_interflow); - if (present_interflow) - list.add(interflow); + hashCode = hashCode * 8191 + ((isSetInterflow()) ? 131071 : 524287); + if (isSetInterflow()) + hashCode = hashCode * 8191 + interflow.hashCode(); - boolean present_tls = true && (isSetTls()); - list.add(present_tls); - if (present_tls) - list.add(tls); + hashCode = hashCode * 8191 + ((isSetTls()) ? 131071 : 524287); + if (isSetTls()) + hashCode = hashCode * 8191 + tls.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -721,7 +700,7 @@ public int compareTo(TimParam other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp()); + lastComparison = java.lang.Boolean.compare(isSetTimestamp(), other.isSetTimestamp()); if (lastComparison != 0) { return lastComparison; } @@ -731,7 +710,7 @@ public int compareTo(TimParam other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion()); + lastComparison = java.lang.Boolean.compare(isSetVersion(), other.isSetVersion()); if (lastComparison != 0) { return lastComparison; } @@ -741,7 +720,7 @@ public int compareTo(TimParam other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetLang()).compareTo(other.isSetLang()); + lastComparison = java.lang.Boolean.compare(isSetLang(), other.isSetLang()); if (lastComparison != 0) { return lastComparison; } @@ -751,7 +730,7 @@ public int compareTo(TimParam other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraList()).compareTo(other.isSetExtraList()); + lastComparison = java.lang.Boolean.compare(isSetExtraList(), other.isSetExtraList()); if (lastComparison != 0) { return lastComparison; } @@ -761,7 +740,7 @@ public int compareTo(TimParam other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraMap()).compareTo(other.isSetExtraMap()); + lastComparison = java.lang.Boolean.compare(isSetExtraMap(), other.isSetExtraMap()); if (lastComparison != 0) { return lastComparison; } @@ -771,7 +750,7 @@ public int compareTo(TimParam other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetInterflow()).compareTo(other.isSetInterflow()); + lastComparison = java.lang.Boolean.compare(isSetInterflow(), other.isSetInterflow()); if (lastComparison != 0) { return lastComparison; } @@ -781,7 +760,7 @@ public int compareTo(TimParam other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTls()).compareTo(other.isSetTls()); + lastComparison = java.lang.Boolean.compare(isSetTls(), other.isSetTls()); if (lastComparison != 0) { return lastComparison; } @@ -794,21 +773,25 @@ public int compareTo(TimParam other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("TimParam("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TimParam("); boolean first = true; if (isSetTimestamp()) { @@ -893,7 +876,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; @@ -903,14 +886,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TimParamStandardSchemeFactory implements SchemeFactory { + private static class TimParamStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimParamStandardScheme getScheme() { return new TimParamStandardScheme(); } } - private static class TimParamStandardScheme extends StandardScheme { + private static class TimParamStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TimParam struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -949,8 +934,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimParam struct) th if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list18 = iprot.readListBegin(); - struct.extraList = new ArrayList(_list18.size); - TimNode _elem19; + struct.extraList = new java.util.ArrayList(_list18.size); + @org.apache.thrift.annotation.Nullable TimNode _elem19; for (int _i20 = 0; _i20 < _list18.size; ++_i20) { _elem19 = new TimNode(); @@ -968,9 +953,9 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimParam struct) th if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map21 = iprot.readMapBegin(); - struct.extraMap = new HashMap(2*_map21.size); - String _key22; - String _val23; + struct.extraMap = new java.util.HashMap(2*_map21.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key22; + @org.apache.thrift.annotation.Nullable java.lang.String _val23; for (int _i24 = 0; _i24 < _map21.size; ++_i24) { _key22 = iprot.readString(); @@ -1011,6 +996,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimParam struct) th struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TimParam struct) throws org.apache.thrift.TException { struct.validate(); @@ -1053,7 +1039,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimParam struct) t oprot.writeFieldBegin(EXTRA_MAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.extraMap.size())); - for (Map.Entry _iter26 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter26 : struct.extraMap.entrySet()) { oprot.writeString(_iter26.getKey()); oprot.writeString(_iter26.getValue()); @@ -1083,18 +1069,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimParam struct) t } - private static class TimParamTupleSchemeFactory implements SchemeFactory { + private static class TimParamTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimParamTupleScheme getScheme() { return new TimParamTupleScheme(); } } - private static class TimParamTupleScheme extends TupleScheme { + private static class TimParamTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TimParam struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetTimestamp()) { optionals.set(0); } @@ -1138,7 +1125,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimParam struct) th if (struct.isSetExtraMap()) { { oprot.writeI32(struct.extraMap.size()); - for (Map.Entry _iter28 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter28 : struct.extraMap.entrySet()) { oprot.writeString(_iter28.getKey()); oprot.writeString(_iter28.getValue()); @@ -1155,8 +1142,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimParam struct) th @Override public void read(org.apache.thrift.protocol.TProtocol prot, TimParam struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(7); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(7); if (incoming.get(0)) { struct.timestamp = iprot.readString(); struct.setTimestampIsSet(true); @@ -1171,9 +1158,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimParam struct) thr } if (incoming.get(3)) { { - org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.extraList = new ArrayList(_list29.size); - TimNode _elem30; + org.apache.thrift.protocol.TList _list29 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); + struct.extraList = new java.util.ArrayList(_list29.size); + @org.apache.thrift.annotation.Nullable TimNode _elem30; for (int _i31 = 0; _i31 < _list29.size; ++_i31) { _elem30 = new TimNode(); @@ -1185,10 +1172,10 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimParam struct) thr } if (incoming.get(4)) { { - org.apache.thrift.protocol.TMap _map32 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.extraMap = new HashMap(2*_map32.size); - String _key33; - String _val34; + org.apache.thrift.protocol.TMap _map32 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.extraMap = new java.util.HashMap(2*_map32.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key33; + @org.apache.thrift.annotation.Nullable java.lang.String _val34; for (int _i35 = 0; _i35 < _map32.size; ++_i35) { _key33 = iprot.readString(); @@ -1209,5 +1196,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimParam struct) thr } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/TimPropertyBean.java b/protocols/gen-java/com/tim/packet/TimPropertyBean.java index f22e493..e3207df 100644 --- a/protocols/gen-java/com/tim/packet/TimPropertyBean.java +++ b/protocols/gen-java/com/tim/packet/TimPropertyBean.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class TimPropertyBean implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimPropertyBean"); @@ -42,21 +15,18 @@ public class TimPropertyBean implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TimPropertyBeanStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TimPropertyBeanTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TimPropertyBeanStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TimPropertyBeanTupleSchemeFactory(); - public String threadId; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String threadId; // optional /** * 消息合流 */ - public String interflow; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String interflow; // optional /** * tls */ - public String tls; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String tls; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -70,10 +40,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ TLS((short)3, "tls"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -81,6 +51,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // THREAD_ID @@ -100,46 +71,49 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final _Fields optionals[] = {_Fields.THREAD_ID,_Fields.INTERFLOW,_Fields.TLS}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.THREAD_ID, new org.apache.thrift.meta_data.FieldMetaData("threadId", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.INTERFLOW, new org.apache.thrift.meta_data.FieldMetaData("interflow", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TLS, new org.apache.thrift.meta_data.FieldMetaData("tls", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimPropertyBean.class, metaDataMap); } @@ -161,6 +135,7 @@ public TimPropertyBean(TimPropertyBean other) { } } + @Override public TimPropertyBean deepCopy() { return new TimPropertyBean(this); } @@ -172,11 +147,12 @@ public void clear() { this.tls = null; } - public String getThreadId() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getThreadId() { return this.threadId; } - public TimPropertyBean setThreadId(String threadId) { + public TimPropertyBean setThreadId(@org.apache.thrift.annotation.Nullable java.lang.String threadId) { this.threadId = threadId; return this; } @@ -199,14 +175,15 @@ public void setThreadIdIsSet(boolean value) { /** * 消息合流 */ - public String getInterflow() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getInterflow() { return this.interflow; } /** * 消息合流 */ - public TimPropertyBean setInterflow(String interflow) { + public TimPropertyBean setInterflow(@org.apache.thrift.annotation.Nullable java.lang.String interflow) { this.interflow = interflow; return this; } @@ -229,14 +206,15 @@ public void setInterflowIsSet(boolean value) { /** * tls */ - public String getTls() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getTls() { return this.tls; } /** * tls */ - public TimPropertyBean setTls(String tls) { + public TimPropertyBean setTls(@org.apache.thrift.annotation.Nullable java.lang.String tls) { this.tls = tls; return this; } @@ -256,13 +234,14 @@ public void setTlsIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case THREAD_ID: if (value == null) { unsetThreadId(); } else { - setThreadId((String)value); + setThreadId((java.lang.String)value); } break; @@ -270,7 +249,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetInterflow(); } else { - setInterflow((String)value); + setInterflow((java.lang.String)value); } break; @@ -278,14 +257,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetTls(); } else { - setTls((String)value); + setTls((java.lang.String)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case THREAD_ID: return getThreadId(); @@ -297,13 +278,14 @@ public Object getFieldValue(_Fields field) { return getTls(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -314,13 +296,11 @@ public boolean isSet(_Fields field) { case TLS: return isSetTls(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof TimPropertyBean) return this.equals((TimPropertyBean)that); return false; @@ -329,6 +309,8 @@ public boolean equals(Object that) { public boolean equals(TimPropertyBean that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_threadId = true && this.isSetThreadId(); boolean that_present_threadId = true && that.isSetThreadId(); @@ -362,24 +344,21 @@ public boolean equals(TimPropertyBean that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_threadId = true && (isSetThreadId()); - list.add(present_threadId); - if (present_threadId) - list.add(threadId); + hashCode = hashCode * 8191 + ((isSetThreadId()) ? 131071 : 524287); + if (isSetThreadId()) + hashCode = hashCode * 8191 + threadId.hashCode(); - boolean present_interflow = true && (isSetInterflow()); - list.add(present_interflow); - if (present_interflow) - list.add(interflow); + hashCode = hashCode * 8191 + ((isSetInterflow()) ? 131071 : 524287); + if (isSetInterflow()) + hashCode = hashCode * 8191 + interflow.hashCode(); - boolean present_tls = true && (isSetTls()); - list.add(present_tls); - if (present_tls) - list.add(tls); + hashCode = hashCode * 8191 + ((isSetTls()) ? 131071 : 524287); + if (isSetTls()) + hashCode = hashCode * 8191 + tls.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -390,7 +369,7 @@ public int compareTo(TimPropertyBean other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetThreadId()).compareTo(other.isSetThreadId()); + lastComparison = java.lang.Boolean.compare(isSetThreadId(), other.isSetThreadId()); if (lastComparison != 0) { return lastComparison; } @@ -400,7 +379,7 @@ public int compareTo(TimPropertyBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetInterflow()).compareTo(other.isSetInterflow()); + lastComparison = java.lang.Boolean.compare(isSetInterflow(), other.isSetInterflow()); if (lastComparison != 0) { return lastComparison; } @@ -410,7 +389,7 @@ public int compareTo(TimPropertyBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTls()).compareTo(other.isSetTls()); + lastComparison = java.lang.Boolean.compare(isSetTls(), other.isSetTls()); if (lastComparison != 0) { return lastComparison; } @@ -423,21 +402,25 @@ public int compareTo(TimPropertyBean other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("TimPropertyBean("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TimPropertyBean("); boolean first = true; if (isSetThreadId()) { @@ -486,7 +469,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -494,14 +477,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TimPropertyBeanStandardSchemeFactory implements SchemeFactory { + private static class TimPropertyBeanStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimPropertyBeanStandardScheme getScheme() { return new TimPropertyBeanStandardScheme(); } } - private static class TimPropertyBeanStandardScheme extends StandardScheme { + private static class TimPropertyBeanStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TimPropertyBean struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -547,6 +532,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimPropertyBean str struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TimPropertyBean struct) throws org.apache.thrift.TException { struct.validate(); @@ -578,18 +564,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimPropertyBean st } - private static class TimPropertyBeanTupleSchemeFactory implements SchemeFactory { + private static class TimPropertyBeanTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimPropertyBeanTupleScheme getScheme() { return new TimPropertyBeanTupleScheme(); } } - private static class TimPropertyBeanTupleScheme extends TupleScheme { + private static class TimPropertyBeanTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TimPropertyBean struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetThreadId()) { optionals.set(0); } @@ -613,8 +600,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimPropertyBean str @Override public void read(org.apache.thrift.protocol.TProtocol prot, TimPropertyBean struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.threadId = iprot.readString(); struct.setThreadIdIsSet(true); @@ -630,5 +617,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimPropertyBean stru } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/TimRemoteRoom.java b/protocols/gen-java/com/tim/packet/TimRemoteRoom.java index c3d925f..3e86f65 100644 --- a/protocols/gen-java/com/tim/packet/TimRemoteRoom.java +++ b/protocols/gen-java/com/tim/packet/TimRemoteRoom.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class TimRemoteRoom implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimRemoteRoom"); @@ -42,21 +15,18 @@ public class TimRemoteRoom implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TimRemoteRoomStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TimRemoteRoomTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TimRemoteRoomStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TimRemoteRoomTupleSchemeFactory(); /** * 错误码 */ - public TimError error; // optional + public @org.apache.thrift.annotation.Nullable TimError error; // optional /** * 远程房间信息 */ - public TimRoom room; // optional - public Map extraMap; // optional + public @org.apache.thrift.annotation.Nullable TimRoom room; // optional + public @org.apache.thrift.annotation.Nullable java.util.Map extraMap; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -70,10 +40,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ROOM((short)2, "room"), EXTRA_MAP((short)3, "extraMap"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -81,6 +51,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // ERROR @@ -100,39 +71,42 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final _Fields optionals[] = {_Fields.ERROR,_Fields.ROOM,_Fields.EXTRA_MAP}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimError.class))); tmpMap.put(_Fields.ROOM, new org.apache.thrift.meta_data.FieldMetaData("room", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -141,7 +115,7 @@ public String getFieldName() { new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimRemoteRoom.class, metaDataMap); } @@ -159,11 +133,12 @@ public TimRemoteRoom(TimRemoteRoom other) { this.room = new TimRoom(other.room); } if (other.isSetExtraMap()) { - Map __this__extraMap = new HashMap(other.extraMap); + java.util.Map __this__extraMap = new java.util.HashMap(other.extraMap); this.extraMap = __this__extraMap; } } + @Override public TimRemoteRoom deepCopy() { return new TimRemoteRoom(this); } @@ -178,6 +153,7 @@ public void clear() { /** * 错误码 */ + @org.apache.thrift.annotation.Nullable public TimError getError() { return this.error; } @@ -185,7 +161,7 @@ public TimError getError() { /** * 错误码 */ - public TimRemoteRoom setError(TimError error) { + public TimRemoteRoom setError(@org.apache.thrift.annotation.Nullable TimError error) { this.error = error; return this; } @@ -208,6 +184,7 @@ public void setErrorIsSet(boolean value) { /** * 远程房间信息 */ + @org.apache.thrift.annotation.Nullable public TimRoom getRoom() { return this.room; } @@ -215,7 +192,7 @@ public TimRoom getRoom() { /** * 远程房间信息 */ - public TimRemoteRoom setRoom(TimRoom room) { + public TimRemoteRoom setRoom(@org.apache.thrift.annotation.Nullable TimRoom room) { this.room = room; return this; } @@ -239,18 +216,19 @@ public int getExtraMapSize() { return (this.extraMap == null) ? 0 : this.extraMap.size(); } - public void putToExtraMap(String key, String val) { + public void putToExtraMap(java.lang.String key, java.lang.String val) { if (this.extraMap == null) { - this.extraMap = new HashMap(); + this.extraMap = new java.util.HashMap(); } this.extraMap.put(key, val); } - public Map getExtraMap() { + @org.apache.thrift.annotation.Nullable + public java.util.Map getExtraMap() { return this.extraMap; } - public TimRemoteRoom setExtraMap(Map extraMap) { + public TimRemoteRoom setExtraMap(@org.apache.thrift.annotation.Nullable java.util.Map extraMap) { this.extraMap = extraMap; return this; } @@ -270,7 +248,8 @@ public void setExtraMapIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case ERROR: if (value == null) { @@ -292,14 +271,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraMap(); } else { - setExtraMap((Map)value); + setExtraMap((java.util.Map)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case ERROR: return getError(); @@ -311,13 +292,14 @@ public Object getFieldValue(_Fields field) { return getExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -328,13 +310,11 @@ public boolean isSet(_Fields field) { case EXTRA_MAP: return isSetExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof TimRemoteRoom) return this.equals((TimRemoteRoom)that); return false; @@ -343,6 +323,8 @@ public boolean equals(Object that) { public boolean equals(TimRemoteRoom that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_error = true && this.isSetError(); boolean that_present_error = true && that.isSetError(); @@ -376,24 +358,21 @@ public boolean equals(TimRemoteRoom that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_error = true && (isSetError()); - list.add(present_error); - if (present_error) - list.add(error); + hashCode = hashCode * 8191 + ((isSetError()) ? 131071 : 524287); + if (isSetError()) + hashCode = hashCode * 8191 + error.hashCode(); - boolean present_room = true && (isSetRoom()); - list.add(present_room); - if (present_room) - list.add(room); + hashCode = hashCode * 8191 + ((isSetRoom()) ? 131071 : 524287); + if (isSetRoom()) + hashCode = hashCode * 8191 + room.hashCode(); - boolean present_extraMap = true && (isSetExtraMap()); - list.add(present_extraMap); - if (present_extraMap) - list.add(extraMap); + hashCode = hashCode * 8191 + ((isSetExtraMap()) ? 131071 : 524287); + if (isSetExtraMap()) + hashCode = hashCode * 8191 + extraMap.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -404,7 +383,7 @@ public int compareTo(TimRemoteRoom other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetError()).compareTo(other.isSetError()); + lastComparison = java.lang.Boolean.compare(isSetError(), other.isSetError()); if (lastComparison != 0) { return lastComparison; } @@ -414,7 +393,7 @@ public int compareTo(TimRemoteRoom other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetRoom()).compareTo(other.isSetRoom()); + lastComparison = java.lang.Boolean.compare(isSetRoom(), other.isSetRoom()); if (lastComparison != 0) { return lastComparison; } @@ -424,7 +403,7 @@ public int compareTo(TimRemoteRoom other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraMap()).compareTo(other.isSetExtraMap()); + lastComparison = java.lang.Boolean.compare(isSetExtraMap(), other.isSetExtraMap()); if (lastComparison != 0) { return lastComparison; } @@ -437,21 +416,25 @@ public int compareTo(TimRemoteRoom other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("TimRemoteRoom("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TimRemoteRoom("); boolean first = true; if (isSetError()) { @@ -506,7 +489,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -514,14 +497,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TimRemoteRoomStandardSchemeFactory implements SchemeFactory { + private static class TimRemoteRoomStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimRemoteRoomStandardScheme getScheme() { return new TimRemoteRoomStandardScheme(); } } - private static class TimRemoteRoomStandardScheme extends StandardScheme { + private static class TimRemoteRoomStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TimRemoteRoom struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -554,9 +539,9 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimRemoteRoom struc if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map206 = iprot.readMapBegin(); - struct.extraMap = new HashMap(2*_map206.size); - String _key207; - String _val208; + struct.extraMap = new java.util.HashMap(2*_map206.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key207; + @org.apache.thrift.annotation.Nullable java.lang.String _val208; for (int _i209 = 0; _i209 < _map206.size; ++_i209) { _key207 = iprot.readString(); @@ -581,6 +566,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimRemoteRoom struc struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TimRemoteRoom struct) throws org.apache.thrift.TException { struct.validate(); @@ -604,7 +590,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimRemoteRoom stru oprot.writeFieldBegin(EXTRA_MAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.extraMap.size())); - for (Map.Entry _iter210 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter210 : struct.extraMap.entrySet()) { oprot.writeString(_iter210.getKey()); oprot.writeString(_iter210.getValue()); @@ -620,18 +606,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimRemoteRoom stru } - private static class TimRemoteRoomTupleSchemeFactory implements SchemeFactory { + private static class TimRemoteRoomTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimRemoteRoomTupleScheme getScheme() { return new TimRemoteRoomTupleScheme(); } } - private static class TimRemoteRoomTupleScheme extends TupleScheme { + private static class TimRemoteRoomTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TimRemoteRoom struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetError()) { optionals.set(0); } @@ -651,7 +638,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimRemoteRoom struc if (struct.isSetExtraMap()) { { oprot.writeI32(struct.extraMap.size()); - for (Map.Entry _iter211 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter211 : struct.extraMap.entrySet()) { oprot.writeString(_iter211.getKey()); oprot.writeString(_iter211.getValue()); @@ -662,8 +649,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimRemoteRoom struc @Override public void read(org.apache.thrift.protocol.TProtocol prot, TimRemoteRoom struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.error = new TimError(); struct.error.read(iprot); @@ -676,10 +663,10 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimRemoteRoom struct } if (incoming.get(2)) { { - org.apache.thrift.protocol.TMap _map212 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.extraMap = new HashMap(2*_map212.size); - String _key213; - String _val214; + org.apache.thrift.protocol.TMap _map212 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.extraMap = new java.util.HashMap(2*_map212.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key213; + @org.apache.thrift.annotation.Nullable java.lang.String _val214; for (int _i215 = 0; _i215 < _map212.size; ++_i215) { _key213 = iprot.readString(); @@ -692,5 +679,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimRemoteRoom struct } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/TimRemoteUserBean.java b/protocols/gen-java/com/tim/packet/TimRemoteUserBean.java index 3752337..6e03b50 100644 --- a/protocols/gen-java/com/tim/packet/TimRemoteUserBean.java +++ b/protocols/gen-java/com/tim/packet/TimRemoteUserBean.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class TimRemoteUserBean implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimRemoteUserBean"); @@ -42,21 +15,18 @@ public class TimRemoteUserBean implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TimRemoteUserBeanStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TimRemoteUserBeanTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TimRemoteUserBeanStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TimRemoteUserBeanTupleSchemeFactory(); /** * 错误码 */ - public TimError error; // optional + public @org.apache.thrift.annotation.Nullable TimError error; // optional /** * 远程用户信息 */ - public TimUserBean ub; // optional - public Map extraMap; // optional + public @org.apache.thrift.annotation.Nullable TimUserBean ub; // optional + public @org.apache.thrift.annotation.Nullable java.util.Map extraMap; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -70,10 +40,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { UB((short)2, "ub"), EXTRA_MAP((short)3, "extraMap"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -81,6 +51,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // ERROR @@ -100,39 +71,42 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final _Fields optionals[] = {_Fields.ERROR,_Fields.UB,_Fields.EXTRA_MAP}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TimError.class))); tmpMap.put(_Fields.UB, new org.apache.thrift.meta_data.FieldMetaData("ub", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -141,7 +115,7 @@ public String getFieldName() { new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimRemoteUserBean.class, metaDataMap); } @@ -159,11 +133,12 @@ public TimRemoteUserBean(TimRemoteUserBean other) { this.ub = new TimUserBean(other.ub); } if (other.isSetExtraMap()) { - Map __this__extraMap = new HashMap(other.extraMap); + java.util.Map __this__extraMap = new java.util.HashMap(other.extraMap); this.extraMap = __this__extraMap; } } + @Override public TimRemoteUserBean deepCopy() { return new TimRemoteUserBean(this); } @@ -178,6 +153,7 @@ public void clear() { /** * 错误码 */ + @org.apache.thrift.annotation.Nullable public TimError getError() { return this.error; } @@ -185,7 +161,7 @@ public TimError getError() { /** * 错误码 */ - public TimRemoteUserBean setError(TimError error) { + public TimRemoteUserBean setError(@org.apache.thrift.annotation.Nullable TimError error) { this.error = error; return this; } @@ -208,6 +184,7 @@ public void setErrorIsSet(boolean value) { /** * 远程用户信息 */ + @org.apache.thrift.annotation.Nullable public TimUserBean getUb() { return this.ub; } @@ -215,7 +192,7 @@ public TimUserBean getUb() { /** * 远程用户信息 */ - public TimRemoteUserBean setUb(TimUserBean ub) { + public TimRemoteUserBean setUb(@org.apache.thrift.annotation.Nullable TimUserBean ub) { this.ub = ub; return this; } @@ -239,18 +216,19 @@ public int getExtraMapSize() { return (this.extraMap == null) ? 0 : this.extraMap.size(); } - public void putToExtraMap(String key, String val) { + public void putToExtraMap(java.lang.String key, java.lang.String val) { if (this.extraMap == null) { - this.extraMap = new HashMap(); + this.extraMap = new java.util.HashMap(); } this.extraMap.put(key, val); } - public Map getExtraMap() { + @org.apache.thrift.annotation.Nullable + public java.util.Map getExtraMap() { return this.extraMap; } - public TimRemoteUserBean setExtraMap(Map extraMap) { + public TimRemoteUserBean setExtraMap(@org.apache.thrift.annotation.Nullable java.util.Map extraMap) { this.extraMap = extraMap; return this; } @@ -270,7 +248,8 @@ public void setExtraMapIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case ERROR: if (value == null) { @@ -292,14 +271,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraMap(); } else { - setExtraMap((Map)value); + setExtraMap((java.util.Map)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case ERROR: return getError(); @@ -311,13 +292,14 @@ public Object getFieldValue(_Fields field) { return getExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -328,13 +310,11 @@ public boolean isSet(_Fields field) { case EXTRA_MAP: return isSetExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof TimRemoteUserBean) return this.equals((TimRemoteUserBean)that); return false; @@ -343,6 +323,8 @@ public boolean equals(Object that) { public boolean equals(TimRemoteUserBean that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_error = true && this.isSetError(); boolean that_present_error = true && that.isSetError(); @@ -376,24 +358,21 @@ public boolean equals(TimRemoteUserBean that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_error = true && (isSetError()); - list.add(present_error); - if (present_error) - list.add(error); + hashCode = hashCode * 8191 + ((isSetError()) ? 131071 : 524287); + if (isSetError()) + hashCode = hashCode * 8191 + error.hashCode(); - boolean present_ub = true && (isSetUb()); - list.add(present_ub); - if (present_ub) - list.add(ub); + hashCode = hashCode * 8191 + ((isSetUb()) ? 131071 : 524287); + if (isSetUb()) + hashCode = hashCode * 8191 + ub.hashCode(); - boolean present_extraMap = true && (isSetExtraMap()); - list.add(present_extraMap); - if (present_extraMap) - list.add(extraMap); + hashCode = hashCode * 8191 + ((isSetExtraMap()) ? 131071 : 524287); + if (isSetExtraMap()) + hashCode = hashCode * 8191 + extraMap.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -404,7 +383,7 @@ public int compareTo(TimRemoteUserBean other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetError()).compareTo(other.isSetError()); + lastComparison = java.lang.Boolean.compare(isSetError(), other.isSetError()); if (lastComparison != 0) { return lastComparison; } @@ -414,7 +393,7 @@ public int compareTo(TimRemoteUserBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetUb()).compareTo(other.isSetUb()); + lastComparison = java.lang.Boolean.compare(isSetUb(), other.isSetUb()); if (lastComparison != 0) { return lastComparison; } @@ -424,7 +403,7 @@ public int compareTo(TimRemoteUserBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraMap()).compareTo(other.isSetExtraMap()); + lastComparison = java.lang.Boolean.compare(isSetExtraMap(), other.isSetExtraMap()); if (lastComparison != 0) { return lastComparison; } @@ -437,21 +416,25 @@ public int compareTo(TimRemoteUserBean other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("TimRemoteUserBean("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TimRemoteUserBean("); boolean first = true; if (isSetError()) { @@ -506,7 +489,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -514,14 +497,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TimRemoteUserBeanStandardSchemeFactory implements SchemeFactory { + private static class TimRemoteUserBeanStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimRemoteUserBeanStandardScheme getScheme() { return new TimRemoteUserBeanStandardScheme(); } } - private static class TimRemoteUserBeanStandardScheme extends StandardScheme { + private static class TimRemoteUserBeanStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TimRemoteUserBean struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -554,9 +539,9 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimRemoteUserBean s if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map196 = iprot.readMapBegin(); - struct.extraMap = new HashMap(2*_map196.size); - String _key197; - String _val198; + struct.extraMap = new java.util.HashMap(2*_map196.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key197; + @org.apache.thrift.annotation.Nullable java.lang.String _val198; for (int _i199 = 0; _i199 < _map196.size; ++_i199) { _key197 = iprot.readString(); @@ -581,6 +566,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimRemoteUserBean s struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TimRemoteUserBean struct) throws org.apache.thrift.TException { struct.validate(); @@ -604,7 +590,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimRemoteUserBean oprot.writeFieldBegin(EXTRA_MAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.extraMap.size())); - for (Map.Entry _iter200 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter200 : struct.extraMap.entrySet()) { oprot.writeString(_iter200.getKey()); oprot.writeString(_iter200.getValue()); @@ -620,18 +606,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimRemoteUserBean } - private static class TimRemoteUserBeanTupleSchemeFactory implements SchemeFactory { + private static class TimRemoteUserBeanTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimRemoteUserBeanTupleScheme getScheme() { return new TimRemoteUserBeanTupleScheme(); } } - private static class TimRemoteUserBeanTupleScheme extends TupleScheme { + private static class TimRemoteUserBeanTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TimRemoteUserBean struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetError()) { optionals.set(0); } @@ -651,7 +638,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimRemoteUserBean s if (struct.isSetExtraMap()) { { oprot.writeI32(struct.extraMap.size()); - for (Map.Entry _iter201 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter201 : struct.extraMap.entrySet()) { oprot.writeString(_iter201.getKey()); oprot.writeString(_iter201.getValue()); @@ -662,8 +649,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimRemoteUserBean s @Override public void read(org.apache.thrift.protocol.TProtocol prot, TimRemoteUserBean struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.error = new TimError(); struct.error.read(iprot); @@ -676,10 +663,10 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimRemoteUserBean st } if (incoming.get(2)) { { - org.apache.thrift.protocol.TMap _map202 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.extraMap = new HashMap(2*_map202.size); - String _key203; - String _val204; + org.apache.thrift.protocol.TMap _map202 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.extraMap = new java.util.HashMap(2*_map202.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key203; + @org.apache.thrift.annotation.Nullable java.lang.String _val204; for (int _i205 = 0; _i205 < _map202.size; ++_i205) { _key203 = iprot.readString(); @@ -692,5 +679,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimRemoteUserBean st } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/TimResponseBean.java b/protocols/gen-java/com/tim/packet/TimResponseBean.java index 951c87c..13747dd 100644 --- a/protocols/gen-java/com/tim/packet/TimResponseBean.java +++ b/protocols/gen-java/com/tim/packet/TimResponseBean.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class TimResponseBean implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimResponseBean"); @@ -43,22 +16,19 @@ public class TimResponseBean implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TimResponseBeanStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TimResponseBeanTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TimResponseBeanStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TimResponseBeanTupleSchemeFactory(); - public String threadId; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String threadId; // optional /** * 错误码 */ - public TimError error; // optional + public @org.apache.thrift.annotation.Nullable TimError error; // optional /** * 附加信息 */ - public List extraList; // optional - public Map extraMap; // optional + public @org.apache.thrift.annotation.Nullable java.util.List extraList; // optional + public @org.apache.thrift.annotation.Nullable java.util.Map extraMap; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -73,10 +43,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { EXTRA_LIST((short)3, "extraList"), EXTRA_MAP((short)4, "extraMap"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -84,6 +54,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // THREAD_ID @@ -105,39 +76,42 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final _Fields optionals[] = {_Fields.THREAD_ID,_Fields.ERROR,_Fields.EXTRA_LIST,_Fields.EXTRA_MAP}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.THREAD_ID, new org.apache.thrift.meta_data.FieldMetaData("threadId", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -149,7 +123,7 @@ public String getFieldName() { new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimResponseBean.class, metaDataMap); } @@ -167,18 +141,19 @@ public TimResponseBean(TimResponseBean other) { this.error = new TimError(other.error); } if (other.isSetExtraList()) { - List __this__extraList = new ArrayList(other.extraList.size()); + java.util.List __this__extraList = new java.util.ArrayList(other.extraList.size()); for (TimNode other_element : other.extraList) { __this__extraList.add(new TimNode(other_element)); } this.extraList = __this__extraList; } if (other.isSetExtraMap()) { - Map __this__extraMap = new HashMap(other.extraMap); + java.util.Map __this__extraMap = new java.util.HashMap(other.extraMap); this.extraMap = __this__extraMap; } } + @Override public TimResponseBean deepCopy() { return new TimResponseBean(this); } @@ -191,11 +166,12 @@ public void clear() { this.extraMap = null; } - public String getThreadId() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getThreadId() { return this.threadId; } - public TimResponseBean setThreadId(String threadId) { + public TimResponseBean setThreadId(@org.apache.thrift.annotation.Nullable java.lang.String threadId) { this.threadId = threadId; return this; } @@ -218,6 +194,7 @@ public void setThreadIdIsSet(boolean value) { /** * 错误码 */ + @org.apache.thrift.annotation.Nullable public TimError getError() { return this.error; } @@ -225,7 +202,7 @@ public TimError getError() { /** * 错误码 */ - public TimResponseBean setError(TimError error) { + public TimResponseBean setError(@org.apache.thrift.annotation.Nullable TimError error) { this.error = error; return this; } @@ -249,13 +226,14 @@ public int getExtraListSize() { return (this.extraList == null) ? 0 : this.extraList.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getExtraListIterator() { return (this.extraList == null) ? null : this.extraList.iterator(); } public void addToExtraList(TimNode elem) { if (this.extraList == null) { - this.extraList = new ArrayList(); + this.extraList = new java.util.ArrayList(); } this.extraList.add(elem); } @@ -263,14 +241,15 @@ public void addToExtraList(TimNode elem) { /** * 附加信息 */ - public List getExtraList() { + @org.apache.thrift.annotation.Nullable + public java.util.List getExtraList() { return this.extraList; } /** * 附加信息 */ - public TimResponseBean setExtraList(List extraList) { + public TimResponseBean setExtraList(@org.apache.thrift.annotation.Nullable java.util.List extraList) { this.extraList = extraList; return this; } @@ -294,18 +273,19 @@ public int getExtraMapSize() { return (this.extraMap == null) ? 0 : this.extraMap.size(); } - public void putToExtraMap(String key, String val) { + public void putToExtraMap(java.lang.String key, java.lang.String val) { if (this.extraMap == null) { - this.extraMap = new HashMap(); + this.extraMap = new java.util.HashMap(); } this.extraMap.put(key, val); } - public Map getExtraMap() { + @org.apache.thrift.annotation.Nullable + public java.util.Map getExtraMap() { return this.extraMap; } - public TimResponseBean setExtraMap(Map extraMap) { + public TimResponseBean setExtraMap(@org.apache.thrift.annotation.Nullable java.util.Map extraMap) { this.extraMap = extraMap; return this; } @@ -325,13 +305,14 @@ public void setExtraMapIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case THREAD_ID: if (value == null) { unsetThreadId(); } else { - setThreadId((String)value); + setThreadId((java.lang.String)value); } break; @@ -347,7 +328,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraList(); } else { - setExtraList((List)value); + setExtraList((java.util.List)value); } break; @@ -355,14 +336,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraMap(); } else { - setExtraMap((Map)value); + setExtraMap((java.util.Map)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case THREAD_ID: return getThreadId(); @@ -377,13 +360,14 @@ public Object getFieldValue(_Fields field) { return getExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -396,13 +380,11 @@ public boolean isSet(_Fields field) { case EXTRA_MAP: return isSetExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof TimResponseBean) return this.equals((TimResponseBean)that); return false; @@ -411,6 +393,8 @@ public boolean equals(Object that) { public boolean equals(TimResponseBean that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_threadId = true && this.isSetThreadId(); boolean that_present_threadId = true && that.isSetThreadId(); @@ -453,29 +437,25 @@ public boolean equals(TimResponseBean that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_threadId = true && (isSetThreadId()); - list.add(present_threadId); - if (present_threadId) - list.add(threadId); + hashCode = hashCode * 8191 + ((isSetThreadId()) ? 131071 : 524287); + if (isSetThreadId()) + hashCode = hashCode * 8191 + threadId.hashCode(); - boolean present_error = true && (isSetError()); - list.add(present_error); - if (present_error) - list.add(error); + hashCode = hashCode * 8191 + ((isSetError()) ? 131071 : 524287); + if (isSetError()) + hashCode = hashCode * 8191 + error.hashCode(); - boolean present_extraList = true && (isSetExtraList()); - list.add(present_extraList); - if (present_extraList) - list.add(extraList); + hashCode = hashCode * 8191 + ((isSetExtraList()) ? 131071 : 524287); + if (isSetExtraList()) + hashCode = hashCode * 8191 + extraList.hashCode(); - boolean present_extraMap = true && (isSetExtraMap()); - list.add(present_extraMap); - if (present_extraMap) - list.add(extraMap); + hashCode = hashCode * 8191 + ((isSetExtraMap()) ? 131071 : 524287); + if (isSetExtraMap()) + hashCode = hashCode * 8191 + extraMap.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -486,7 +466,7 @@ public int compareTo(TimResponseBean other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetThreadId()).compareTo(other.isSetThreadId()); + lastComparison = java.lang.Boolean.compare(isSetThreadId(), other.isSetThreadId()); if (lastComparison != 0) { return lastComparison; } @@ -496,7 +476,7 @@ public int compareTo(TimResponseBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetError()).compareTo(other.isSetError()); + lastComparison = java.lang.Boolean.compare(isSetError(), other.isSetError()); if (lastComparison != 0) { return lastComparison; } @@ -506,7 +486,7 @@ public int compareTo(TimResponseBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraList()).compareTo(other.isSetExtraList()); + lastComparison = java.lang.Boolean.compare(isSetExtraList(), other.isSetExtraList()); if (lastComparison != 0) { return lastComparison; } @@ -516,7 +496,7 @@ public int compareTo(TimResponseBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraMap()).compareTo(other.isSetExtraMap()); + lastComparison = java.lang.Boolean.compare(isSetExtraMap(), other.isSetExtraMap()); if (lastComparison != 0) { return lastComparison; } @@ -529,21 +509,25 @@ public int compareTo(TimResponseBean other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("TimResponseBean("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TimResponseBean("); boolean first = true; if (isSetThreadId()) { @@ -605,7 +589,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -613,14 +597,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TimResponseBeanStandardSchemeFactory implements SchemeFactory { + private static class TimResponseBeanStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimResponseBeanStandardScheme getScheme() { return new TimResponseBeanStandardScheme(); } } - private static class TimResponseBeanStandardScheme extends StandardScheme { + private static class TimResponseBeanStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TimResponseBean struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -652,8 +638,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimResponseBean str if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list216 = iprot.readListBegin(); - struct.extraList = new ArrayList(_list216.size); - TimNode _elem217; + struct.extraList = new java.util.ArrayList(_list216.size); + @org.apache.thrift.annotation.Nullable TimNode _elem217; for (int _i218 = 0; _i218 < _list216.size; ++_i218) { _elem217 = new TimNode(); @@ -671,9 +657,9 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimResponseBean str if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map219 = iprot.readMapBegin(); - struct.extraMap = new HashMap(2*_map219.size); - String _key220; - String _val221; + struct.extraMap = new java.util.HashMap(2*_map219.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key220; + @org.apache.thrift.annotation.Nullable java.lang.String _val221; for (int _i222 = 0; _i222 < _map219.size; ++_i222) { _key220 = iprot.readString(); @@ -698,6 +684,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimResponseBean str struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TimResponseBean struct) throws org.apache.thrift.TException { struct.validate(); @@ -735,7 +722,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimResponseBean st oprot.writeFieldBegin(EXTRA_MAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.extraMap.size())); - for (Map.Entry _iter224 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter224 : struct.extraMap.entrySet()) { oprot.writeString(_iter224.getKey()); oprot.writeString(_iter224.getValue()); @@ -751,18 +738,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimResponseBean st } - private static class TimResponseBeanTupleSchemeFactory implements SchemeFactory { + private static class TimResponseBeanTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimResponseBeanTupleScheme getScheme() { return new TimResponseBeanTupleScheme(); } } - private static class TimResponseBeanTupleScheme extends TupleScheme { + private static class TimResponseBeanTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TimResponseBean struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetThreadId()) { optionals.set(0); } @@ -794,7 +782,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimResponseBean str if (struct.isSetExtraMap()) { { oprot.writeI32(struct.extraMap.size()); - for (Map.Entry _iter226 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter226 : struct.extraMap.entrySet()) { oprot.writeString(_iter226.getKey()); oprot.writeString(_iter226.getValue()); @@ -805,8 +793,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimResponseBean str @Override public void read(org.apache.thrift.protocol.TProtocol prot, TimResponseBean struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(4); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { struct.threadId = iprot.readString(); struct.setThreadIdIsSet(true); @@ -818,9 +806,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimResponseBean stru } if (incoming.get(2)) { { - org.apache.thrift.protocol.TList _list227 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.extraList = new ArrayList(_list227.size); - TimNode _elem228; + org.apache.thrift.protocol.TList _list227 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); + struct.extraList = new java.util.ArrayList(_list227.size); + @org.apache.thrift.annotation.Nullable TimNode _elem228; for (int _i229 = 0; _i229 < _list227.size; ++_i229) { _elem228 = new TimNode(); @@ -832,10 +820,10 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimResponseBean stru } if (incoming.get(3)) { { - org.apache.thrift.protocol.TMap _map230 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.extraMap = new HashMap(2*_map230.size); - String _key231; - String _val232; + org.apache.thrift.protocol.TMap _map230 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.extraMap = new java.util.HashMap(2*_map230.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key231; + @org.apache.thrift.annotation.Nullable java.lang.String _val232; for (int _i233 = 0; _i233 < _map230.size; ++_i233) { _key231 = iprot.readString(); @@ -848,5 +836,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimResponseBean stru } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/TimRoom.java b/protocols/gen-java/com/tim/packet/TimRoom.java index c070ffb..cdcc821 100644 --- a/protocols/gen-java/com/tim/packet/TimRoom.java +++ b/protocols/gen-java/com/tim/packet/TimRoom.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class TimRoom implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimRoom"); @@ -49,49 +22,46 @@ public class TimRoom implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TimRoomStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TimRoomTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TimRoomStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TimRoomTupleSchemeFactory(); /** * 房间Tid */ - public Tid tid; // optional + public @org.apache.thrift.annotation.Nullable Tid tid; // optional /** * 创建人Tid */ - public Tid founderTid; // optional + public @org.apache.thrift.annotation.Nullable Tid founderTid; // optional /** * 主持人Tid */ - public List HostsTid; // optional + public @org.apache.thrift.annotation.Nullable java.util.List HostsTid; // optional /** * memberTid */ - public List membersTid; // optional + public @org.apache.thrift.annotation.Nullable java.util.List membersTid; // optional /** * 头像地址 http://xxx.jpg */ - public String headurl; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String headurl; // optional /** * 房间名称 */ - public String roomName; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String roomName; // optional /** * 房间说明 */ - public String desc; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String desc; // optional /** * 房间创建时间 */ - public TimTime createTime; // optional + public @org.apache.thrift.annotation.Nullable TimTime createTime; // optional /** * 扩展字段 */ - public List extraList; // optional - public Map extraMap; // optional + public @org.apache.thrift.annotation.Nullable java.util.List extraList; // optional + public @org.apache.thrift.annotation.Nullable java.util.Map extraMap; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -133,10 +103,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { EXTRA_LIST((short)9, "extraList"), EXTRA_MAP((short)10, "extraMap"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -144,6 +114,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TID @@ -177,39 +148,42 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final _Fields optionals[] = {_Fields.TID,_Fields.FOUNDER_TID,_Fields.HOSTS_TID,_Fields.MEMBERS_TID,_Fields.HEADURL,_Fields.ROOM_NAME,_Fields.DESC,_Fields.CREATE_TIME,_Fields.EXTRA_LIST,_Fields.EXTRA_MAP}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TID, new org.apache.thrift.meta_data.FieldMetaData("tid", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Tid.class))); tmpMap.put(_Fields.FOUNDER_TID, new org.apache.thrift.meta_data.FieldMetaData("founderTid", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -235,7 +209,7 @@ public String getFieldName() { new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimRoom.class, metaDataMap); } @@ -253,14 +227,14 @@ public TimRoom(TimRoom other) { this.founderTid = new Tid(other.founderTid); } if (other.isSetHostsTid()) { - List __this__HostsTid = new ArrayList(other.HostsTid.size()); + java.util.List __this__HostsTid = new java.util.ArrayList(other.HostsTid.size()); for (Tid other_element : other.HostsTid) { __this__HostsTid.add(new Tid(other_element)); } this.HostsTid = __this__HostsTid; } if (other.isSetMembersTid()) { - List __this__membersTid = new ArrayList(other.membersTid.size()); + java.util.List __this__membersTid = new java.util.ArrayList(other.membersTid.size()); for (Tid other_element : other.membersTid) { __this__membersTid.add(new Tid(other_element)); } @@ -279,18 +253,19 @@ public TimRoom(TimRoom other) { this.createTime = new TimTime(other.createTime); } if (other.isSetExtraList()) { - List __this__extraList = new ArrayList(other.extraList.size()); + java.util.List __this__extraList = new java.util.ArrayList(other.extraList.size()); for (TimNode other_element : other.extraList) { __this__extraList.add(new TimNode(other_element)); } this.extraList = __this__extraList; } if (other.isSetExtraMap()) { - Map __this__extraMap = new HashMap(other.extraMap); + java.util.Map __this__extraMap = new java.util.HashMap(other.extraMap); this.extraMap = __this__extraMap; } } + @Override public TimRoom deepCopy() { return new TimRoom(this); } @@ -312,6 +287,7 @@ public void clear() { /** * 房间Tid */ + @org.apache.thrift.annotation.Nullable public Tid getTid() { return this.tid; } @@ -319,7 +295,7 @@ public Tid getTid() { /** * 房间Tid */ - public TimRoom setTid(Tid tid) { + public TimRoom setTid(@org.apache.thrift.annotation.Nullable Tid tid) { this.tid = tid; return this; } @@ -342,6 +318,7 @@ public void setTidIsSet(boolean value) { /** * 创建人Tid */ + @org.apache.thrift.annotation.Nullable public Tid getFounderTid() { return this.founderTid; } @@ -349,7 +326,7 @@ public Tid getFounderTid() { /** * 创建人Tid */ - public TimRoom setFounderTid(Tid founderTid) { + public TimRoom setFounderTid(@org.apache.thrift.annotation.Nullable Tid founderTid) { this.founderTid = founderTid; return this; } @@ -373,13 +350,14 @@ public int getHostsTidSize() { return (this.HostsTid == null) ? 0 : this.HostsTid.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getHostsTidIterator() { return (this.HostsTid == null) ? null : this.HostsTid.iterator(); } public void addToHostsTid(Tid elem) { if (this.HostsTid == null) { - this.HostsTid = new ArrayList(); + this.HostsTid = new java.util.ArrayList(); } this.HostsTid.add(elem); } @@ -387,14 +365,15 @@ public void addToHostsTid(Tid elem) { /** * 主持人Tid */ - public List getHostsTid() { + @org.apache.thrift.annotation.Nullable + public java.util.List getHostsTid() { return this.HostsTid; } /** * 主持人Tid */ - public TimRoom setHostsTid(List HostsTid) { + public TimRoom setHostsTid(@org.apache.thrift.annotation.Nullable java.util.List HostsTid) { this.HostsTid = HostsTid; return this; } @@ -418,13 +397,14 @@ public int getMembersTidSize() { return (this.membersTid == null) ? 0 : this.membersTid.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getMembersTidIterator() { return (this.membersTid == null) ? null : this.membersTid.iterator(); } public void addToMembersTid(Tid elem) { if (this.membersTid == null) { - this.membersTid = new ArrayList(); + this.membersTid = new java.util.ArrayList(); } this.membersTid.add(elem); } @@ -432,14 +412,15 @@ public void addToMembersTid(Tid elem) { /** * memberTid */ - public List getMembersTid() { + @org.apache.thrift.annotation.Nullable + public java.util.List getMembersTid() { return this.membersTid; } /** * memberTid */ - public TimRoom setMembersTid(List membersTid) { + public TimRoom setMembersTid(@org.apache.thrift.annotation.Nullable java.util.List membersTid) { this.membersTid = membersTid; return this; } @@ -462,14 +443,15 @@ public void setMembersTidIsSet(boolean value) { /** * 头像地址 http://xxx.jpg */ - public String getHeadurl() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getHeadurl() { return this.headurl; } /** * 头像地址 http://xxx.jpg */ - public TimRoom setHeadurl(String headurl) { + public TimRoom setHeadurl(@org.apache.thrift.annotation.Nullable java.lang.String headurl) { this.headurl = headurl; return this; } @@ -492,14 +474,15 @@ public void setHeadurlIsSet(boolean value) { /** * 房间名称 */ - public String getRoomName() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getRoomName() { return this.roomName; } /** * 房间名称 */ - public TimRoom setRoomName(String roomName) { + public TimRoom setRoomName(@org.apache.thrift.annotation.Nullable java.lang.String roomName) { this.roomName = roomName; return this; } @@ -522,14 +505,15 @@ public void setRoomNameIsSet(boolean value) { /** * 房间说明 */ - public String getDesc() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getDesc() { return this.desc; } /** * 房间说明 */ - public TimRoom setDesc(String desc) { + public TimRoom setDesc(@org.apache.thrift.annotation.Nullable java.lang.String desc) { this.desc = desc; return this; } @@ -552,6 +536,7 @@ public void setDescIsSet(boolean value) { /** * 房间创建时间 */ + @org.apache.thrift.annotation.Nullable public TimTime getCreateTime() { return this.createTime; } @@ -559,7 +544,7 @@ public TimTime getCreateTime() { /** * 房间创建时间 */ - public TimRoom setCreateTime(TimTime createTime) { + public TimRoom setCreateTime(@org.apache.thrift.annotation.Nullable TimTime createTime) { this.createTime = createTime; return this; } @@ -583,13 +568,14 @@ public int getExtraListSize() { return (this.extraList == null) ? 0 : this.extraList.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getExtraListIterator() { return (this.extraList == null) ? null : this.extraList.iterator(); } public void addToExtraList(TimNode elem) { if (this.extraList == null) { - this.extraList = new ArrayList(); + this.extraList = new java.util.ArrayList(); } this.extraList.add(elem); } @@ -597,14 +583,15 @@ public void addToExtraList(TimNode elem) { /** * 扩展字段 */ - public List getExtraList() { + @org.apache.thrift.annotation.Nullable + public java.util.List getExtraList() { return this.extraList; } /** * 扩展字段 */ - public TimRoom setExtraList(List extraList) { + public TimRoom setExtraList(@org.apache.thrift.annotation.Nullable java.util.List extraList) { this.extraList = extraList; return this; } @@ -628,18 +615,19 @@ public int getExtraMapSize() { return (this.extraMap == null) ? 0 : this.extraMap.size(); } - public void putToExtraMap(String key, String val) { + public void putToExtraMap(java.lang.String key, java.lang.String val) { if (this.extraMap == null) { - this.extraMap = new HashMap(); + this.extraMap = new java.util.HashMap(); } this.extraMap.put(key, val); } - public Map getExtraMap() { + @org.apache.thrift.annotation.Nullable + public java.util.Map getExtraMap() { return this.extraMap; } - public TimRoom setExtraMap(Map extraMap) { + public TimRoom setExtraMap(@org.apache.thrift.annotation.Nullable java.util.Map extraMap) { this.extraMap = extraMap; return this; } @@ -659,7 +647,8 @@ public void setExtraMapIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case TID: if (value == null) { @@ -681,7 +670,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetHostsTid(); } else { - setHostsTid((List)value); + setHostsTid((java.util.List)value); } break; @@ -689,7 +678,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetMembersTid(); } else { - setMembersTid((List)value); + setMembersTid((java.util.List)value); } break; @@ -697,7 +686,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetHeadurl(); } else { - setHeadurl((String)value); + setHeadurl((java.lang.String)value); } break; @@ -705,7 +694,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetRoomName(); } else { - setRoomName((String)value); + setRoomName((java.lang.String)value); } break; @@ -713,7 +702,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetDesc(); } else { - setDesc((String)value); + setDesc((java.lang.String)value); } break; @@ -729,7 +718,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraList(); } else { - setExtraList((List)value); + setExtraList((java.util.List)value); } break; @@ -737,14 +726,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraMap(); } else { - setExtraMap((Map)value); + setExtraMap((java.util.Map)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TID: return getTid(); @@ -777,13 +768,14 @@ public Object getFieldValue(_Fields field) { return getExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -808,13 +800,11 @@ public boolean isSet(_Fields field) { case EXTRA_MAP: return isSetExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof TimRoom) return this.equals((TimRoom)that); return false; @@ -823,6 +813,8 @@ public boolean equals(Object that) { public boolean equals(TimRoom that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_tid = true && this.isSetTid(); boolean that_present_tid = true && that.isSetTid(); @@ -919,59 +911,49 @@ public boolean equals(TimRoom that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_tid = true && (isSetTid()); - list.add(present_tid); - if (present_tid) - list.add(tid); + hashCode = hashCode * 8191 + ((isSetTid()) ? 131071 : 524287); + if (isSetTid()) + hashCode = hashCode * 8191 + tid.hashCode(); - boolean present_founderTid = true && (isSetFounderTid()); - list.add(present_founderTid); - if (present_founderTid) - list.add(founderTid); + hashCode = hashCode * 8191 + ((isSetFounderTid()) ? 131071 : 524287); + if (isSetFounderTid()) + hashCode = hashCode * 8191 + founderTid.hashCode(); - boolean present_HostsTid = true && (isSetHostsTid()); - list.add(present_HostsTid); - if (present_HostsTid) - list.add(HostsTid); + hashCode = hashCode * 8191 + ((isSetHostsTid()) ? 131071 : 524287); + if (isSetHostsTid()) + hashCode = hashCode * 8191 + HostsTid.hashCode(); - boolean present_membersTid = true && (isSetMembersTid()); - list.add(present_membersTid); - if (present_membersTid) - list.add(membersTid); + hashCode = hashCode * 8191 + ((isSetMembersTid()) ? 131071 : 524287); + if (isSetMembersTid()) + hashCode = hashCode * 8191 + membersTid.hashCode(); - boolean present_headurl = true && (isSetHeadurl()); - list.add(present_headurl); - if (present_headurl) - list.add(headurl); + hashCode = hashCode * 8191 + ((isSetHeadurl()) ? 131071 : 524287); + if (isSetHeadurl()) + hashCode = hashCode * 8191 + headurl.hashCode(); - boolean present_roomName = true && (isSetRoomName()); - list.add(present_roomName); - if (present_roomName) - list.add(roomName); + hashCode = hashCode * 8191 + ((isSetRoomName()) ? 131071 : 524287); + if (isSetRoomName()) + hashCode = hashCode * 8191 + roomName.hashCode(); - boolean present_desc = true && (isSetDesc()); - list.add(present_desc); - if (present_desc) - list.add(desc); + hashCode = hashCode * 8191 + ((isSetDesc()) ? 131071 : 524287); + if (isSetDesc()) + hashCode = hashCode * 8191 + desc.hashCode(); - boolean present_createTime = true && (isSetCreateTime()); - list.add(present_createTime); - if (present_createTime) - list.add(createTime); + hashCode = hashCode * 8191 + ((isSetCreateTime()) ? 131071 : 524287); + if (isSetCreateTime()) + hashCode = hashCode * 8191 + createTime.hashCode(); - boolean present_extraList = true && (isSetExtraList()); - list.add(present_extraList); - if (present_extraList) - list.add(extraList); + hashCode = hashCode * 8191 + ((isSetExtraList()) ? 131071 : 524287); + if (isSetExtraList()) + hashCode = hashCode * 8191 + extraList.hashCode(); - boolean present_extraMap = true && (isSetExtraMap()); - list.add(present_extraMap); - if (present_extraMap) - list.add(extraMap); + hashCode = hashCode * 8191 + ((isSetExtraMap()) ? 131071 : 524287); + if (isSetExtraMap()) + hashCode = hashCode * 8191 + extraMap.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -982,7 +964,7 @@ public int compareTo(TimRoom other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTid()).compareTo(other.isSetTid()); + lastComparison = java.lang.Boolean.compare(isSetTid(), other.isSetTid()); if (lastComparison != 0) { return lastComparison; } @@ -992,7 +974,7 @@ public int compareTo(TimRoom other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFounderTid()).compareTo(other.isSetFounderTid()); + lastComparison = java.lang.Boolean.compare(isSetFounderTid(), other.isSetFounderTid()); if (lastComparison != 0) { return lastComparison; } @@ -1002,7 +984,7 @@ public int compareTo(TimRoom other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetHostsTid()).compareTo(other.isSetHostsTid()); + lastComparison = java.lang.Boolean.compare(isSetHostsTid(), other.isSetHostsTid()); if (lastComparison != 0) { return lastComparison; } @@ -1012,7 +994,7 @@ public int compareTo(TimRoom other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMembersTid()).compareTo(other.isSetMembersTid()); + lastComparison = java.lang.Boolean.compare(isSetMembersTid(), other.isSetMembersTid()); if (lastComparison != 0) { return lastComparison; } @@ -1022,7 +1004,7 @@ public int compareTo(TimRoom other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetHeadurl()).compareTo(other.isSetHeadurl()); + lastComparison = java.lang.Boolean.compare(isSetHeadurl(), other.isSetHeadurl()); if (lastComparison != 0) { return lastComparison; } @@ -1032,7 +1014,7 @@ public int compareTo(TimRoom other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetRoomName()).compareTo(other.isSetRoomName()); + lastComparison = java.lang.Boolean.compare(isSetRoomName(), other.isSetRoomName()); if (lastComparison != 0) { return lastComparison; } @@ -1042,7 +1024,7 @@ public int compareTo(TimRoom other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDesc()).compareTo(other.isSetDesc()); + lastComparison = java.lang.Boolean.compare(isSetDesc(), other.isSetDesc()); if (lastComparison != 0) { return lastComparison; } @@ -1052,7 +1034,7 @@ public int compareTo(TimRoom other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); + lastComparison = java.lang.Boolean.compare(isSetCreateTime(), other.isSetCreateTime()); if (lastComparison != 0) { return lastComparison; } @@ -1062,7 +1044,7 @@ public int compareTo(TimRoom other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraList()).compareTo(other.isSetExtraList()); + lastComparison = java.lang.Boolean.compare(isSetExtraList(), other.isSetExtraList()); if (lastComparison != 0) { return lastComparison; } @@ -1072,7 +1054,7 @@ public int compareTo(TimRoom other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraMap()).compareTo(other.isSetExtraMap()); + lastComparison = java.lang.Boolean.compare(isSetExtraMap(), other.isSetExtraMap()); if (lastComparison != 0) { return lastComparison; } @@ -1085,21 +1067,25 @@ public int compareTo(TimRoom other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("TimRoom("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TimRoom("); boolean first = true; if (isSetTid()) { @@ -1227,7 +1213,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -1235,14 +1221,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TimRoomStandardSchemeFactory implements SchemeFactory { + private static class TimRoomStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimRoomStandardScheme getScheme() { return new TimRoomStandardScheme(); } } - private static class TimRoomStandardScheme extends StandardScheme { + private static class TimRoomStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TimRoom struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -1275,8 +1263,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimRoom struct) thr if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list98 = iprot.readListBegin(); - struct.HostsTid = new ArrayList(_list98.size); - Tid _elem99; + struct.HostsTid = new java.util.ArrayList(_list98.size); + @org.apache.thrift.annotation.Nullable Tid _elem99; for (int _i100 = 0; _i100 < _list98.size; ++_i100) { _elem99 = new Tid(); @@ -1294,8 +1282,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimRoom struct) thr if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list101 = iprot.readListBegin(); - struct.membersTid = new ArrayList(_list101.size); - Tid _elem102; + struct.membersTid = new java.util.ArrayList(_list101.size); + @org.apache.thrift.annotation.Nullable Tid _elem102; for (int _i103 = 0; _i103 < _list101.size; ++_i103) { _elem102 = new Tid(); @@ -1346,8 +1334,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimRoom struct) thr if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list104 = iprot.readListBegin(); - struct.extraList = new ArrayList(_list104.size); - TimNode _elem105; + struct.extraList = new java.util.ArrayList(_list104.size); + @org.apache.thrift.annotation.Nullable TimNode _elem105; for (int _i106 = 0; _i106 < _list104.size; ++_i106) { _elem105 = new TimNode(); @@ -1365,9 +1353,9 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimRoom struct) thr if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map107 = iprot.readMapBegin(); - struct.extraMap = new HashMap(2*_map107.size); - String _key108; - String _val109; + struct.extraMap = new java.util.HashMap(2*_map107.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key108; + @org.apache.thrift.annotation.Nullable java.lang.String _val109; for (int _i110 = 0; _i110 < _map107.size; ++_i110) { _key108 = iprot.readString(); @@ -1392,6 +1380,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimRoom struct) thr struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TimRoom struct) throws org.apache.thrift.TException { struct.validate(); @@ -1485,7 +1474,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimRoom struct) th oprot.writeFieldBegin(EXTRA_MAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.extraMap.size())); - for (Map.Entry _iter114 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter114 : struct.extraMap.entrySet()) { oprot.writeString(_iter114.getKey()); oprot.writeString(_iter114.getValue()); @@ -1501,18 +1490,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimRoom struct) th } - private static class TimRoomTupleSchemeFactory implements SchemeFactory { + private static class TimRoomTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimRoomTupleScheme getScheme() { return new TimRoomTupleScheme(); } } - private static class TimRoomTupleScheme extends TupleScheme { + private static class TimRoomTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TimRoom struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetTid()) { optionals.set(0); } @@ -1592,7 +1582,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimRoom struct) thr if (struct.isSetExtraMap()) { { oprot.writeI32(struct.extraMap.size()); - for (Map.Entry _iter118 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter118 : struct.extraMap.entrySet()) { oprot.writeString(_iter118.getKey()); oprot.writeString(_iter118.getValue()); @@ -1603,8 +1593,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimRoom struct) thr @Override public void read(org.apache.thrift.protocol.TProtocol prot, TimRoom struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(10); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(10); if (incoming.get(0)) { struct.tid = new Tid(); struct.tid.read(iprot); @@ -1617,9 +1607,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimRoom struct) thro } if (incoming.get(2)) { { - org.apache.thrift.protocol.TList _list119 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.HostsTid = new ArrayList(_list119.size); - Tid _elem120; + org.apache.thrift.protocol.TList _list119 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); + struct.HostsTid = new java.util.ArrayList(_list119.size); + @org.apache.thrift.annotation.Nullable Tid _elem120; for (int _i121 = 0; _i121 < _list119.size; ++_i121) { _elem120 = new Tid(); @@ -1631,9 +1621,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimRoom struct) thro } if (incoming.get(3)) { { - org.apache.thrift.protocol.TList _list122 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.membersTid = new ArrayList(_list122.size); - Tid _elem123; + org.apache.thrift.protocol.TList _list122 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); + struct.membersTid = new java.util.ArrayList(_list122.size); + @org.apache.thrift.annotation.Nullable Tid _elem123; for (int _i124 = 0; _i124 < _list122.size; ++_i124) { _elem123 = new Tid(); @@ -1662,9 +1652,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimRoom struct) thro } if (incoming.get(8)) { { - org.apache.thrift.protocol.TList _list125 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.extraList = new ArrayList(_list125.size); - TimNode _elem126; + org.apache.thrift.protocol.TList _list125 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); + struct.extraList = new java.util.ArrayList(_list125.size); + @org.apache.thrift.annotation.Nullable TimNode _elem126; for (int _i127 = 0; _i127 < _list125.size; ++_i127) { _elem126 = new TimNode(); @@ -1676,10 +1666,10 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimRoom struct) thro } if (incoming.get(9)) { { - org.apache.thrift.protocol.TMap _map128 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.extraMap = new HashMap(2*_map128.size); - String _key129; - String _val130; + org.apache.thrift.protocol.TMap _map128 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.extraMap = new java.util.HashMap(2*_map128.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key129; + @org.apache.thrift.annotation.Nullable java.lang.String _val130; for (int _i131 = 0; _i131 < _map128.size; ++_i131) { _key129 = iprot.readString(); @@ -1692,5 +1682,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimRoom struct) thro } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/TimRoster.java b/protocols/gen-java/com/tim/packet/TimRoster.java index db3a714..f6f7936 100644 --- a/protocols/gen-java/com/tim/packet/TimRoster.java +++ b/protocols/gen-java/com/tim/packet/TimRoster.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class TimRoster implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimRoster"); @@ -43,11 +16,8 @@ public class TimRoster implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TimRosterStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TimRosterTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TimRosterStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TimRosterTupleSchemeFactory(); /** * none表示用户和contact之前没有任何的关系(虽然在server的buddy list中存在) @@ -55,13 +25,13 @@ public class TimRoster implements org.apache.thrift.TBase extraMap; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String name; // optional + public @org.apache.thrift.annotation.Nullable java.util.Map extraMap; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -79,10 +49,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { NAME((short)3, "name"), EXTRA_MAP((short)4, "extraMap"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -90,6 +60,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // SUBSCRIPTION @@ -111,39 +82,42 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final _Fields optionals[] = {_Fields.NAME,_Fields.EXTRA_MAP}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUBSCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("subscription", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TID, new org.apache.thrift.meta_data.FieldMetaData("tid", org.apache.thrift.TFieldRequirementType.REQUIRED, @@ -154,7 +128,7 @@ public String getFieldName() { new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimRoster.class, metaDataMap); } @@ -162,7 +136,7 @@ public TimRoster() { } public TimRoster( - String subscription, + java.lang.String subscription, Tid tid) { this(); @@ -184,11 +158,12 @@ public TimRoster(TimRoster other) { this.name = other.name; } if (other.isSetExtraMap()) { - Map __this__extraMap = new HashMap(other.extraMap); + java.util.Map __this__extraMap = new java.util.HashMap(other.extraMap); this.extraMap = __this__extraMap; } } + @Override public TimRoster deepCopy() { return new TimRoster(this); } @@ -207,7 +182,8 @@ public void clear() { * from和to的含义相反,指用户看不到contact的presence,但是contact可以看到 * both表示相关之间都能看到对方的presence */ - public String getSubscription() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getSubscription() { return this.subscription; } @@ -217,7 +193,7 @@ public String getSubscription() { * from和to的含义相反,指用户看不到contact的presence,但是contact可以看到 * both表示相关之间都能看到对方的presence */ - public TimRoster setSubscription(String subscription) { + public TimRoster setSubscription(@org.apache.thrift.annotation.Nullable java.lang.String subscription) { this.subscription = subscription; return this; } @@ -237,11 +213,12 @@ public void setSubscriptionIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public Tid getTid() { return this.tid; } - public TimRoster setTid(Tid tid) { + public TimRoster setTid(@org.apache.thrift.annotation.Nullable Tid tid) { this.tid = tid; return this; } @@ -264,14 +241,15 @@ public void setTidIsSet(boolean value) { /** * 用户名 */ - public String getName() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getName() { return this.name; } /** * 用户名 */ - public TimRoster setName(String name) { + public TimRoster setName(@org.apache.thrift.annotation.Nullable java.lang.String name) { this.name = name; return this; } @@ -295,18 +273,19 @@ public int getExtraMapSize() { return (this.extraMap == null) ? 0 : this.extraMap.size(); } - public void putToExtraMap(String key, String val) { + public void putToExtraMap(java.lang.String key, java.lang.String val) { if (this.extraMap == null) { - this.extraMap = new HashMap(); + this.extraMap = new java.util.HashMap(); } this.extraMap.put(key, val); } - public Map getExtraMap() { + @org.apache.thrift.annotation.Nullable + public java.util.Map getExtraMap() { return this.extraMap; } - public TimRoster setExtraMap(Map extraMap) { + public TimRoster setExtraMap(@org.apache.thrift.annotation.Nullable java.util.Map extraMap) { this.extraMap = extraMap; return this; } @@ -326,13 +305,14 @@ public void setExtraMapIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case SUBSCRIPTION: if (value == null) { unsetSubscription(); } else { - setSubscription((String)value); + setSubscription((java.lang.String)value); } break; @@ -348,7 +328,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetName(); } else { - setName((String)value); + setName((java.lang.String)value); } break; @@ -356,14 +336,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraMap(); } else { - setExtraMap((Map)value); + setExtraMap((java.util.Map)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case SUBSCRIPTION: return getSubscription(); @@ -378,13 +360,14 @@ public Object getFieldValue(_Fields field) { return getExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -397,13 +380,11 @@ public boolean isSet(_Fields field) { case EXTRA_MAP: return isSetExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof TimRoster) return this.equals((TimRoster)that); return false; @@ -412,6 +393,8 @@ public boolean equals(Object that) { public boolean equals(TimRoster that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_subscription = true && this.isSetSubscription(); boolean that_present_subscription = true && that.isSetSubscription(); @@ -454,29 +437,25 @@ public boolean equals(TimRoster that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_subscription = true && (isSetSubscription()); - list.add(present_subscription); - if (present_subscription) - list.add(subscription); + hashCode = hashCode * 8191 + ((isSetSubscription()) ? 131071 : 524287); + if (isSetSubscription()) + hashCode = hashCode * 8191 + subscription.hashCode(); - boolean present_tid = true && (isSetTid()); - list.add(present_tid); - if (present_tid) - list.add(tid); + hashCode = hashCode * 8191 + ((isSetTid()) ? 131071 : 524287); + if (isSetTid()) + hashCode = hashCode * 8191 + tid.hashCode(); - boolean present_name = true && (isSetName()); - list.add(present_name); - if (present_name) - list.add(name); + hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287); + if (isSetName()) + hashCode = hashCode * 8191 + name.hashCode(); - boolean present_extraMap = true && (isSetExtraMap()); - list.add(present_extraMap); - if (present_extraMap) - list.add(extraMap); + hashCode = hashCode * 8191 + ((isSetExtraMap()) ? 131071 : 524287); + if (isSetExtraMap()) + hashCode = hashCode * 8191 + extraMap.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -487,7 +466,7 @@ public int compareTo(TimRoster other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetSubscription()).compareTo(other.isSetSubscription()); + lastComparison = java.lang.Boolean.compare(isSetSubscription(), other.isSetSubscription()); if (lastComparison != 0) { return lastComparison; } @@ -497,7 +476,7 @@ public int compareTo(TimRoster other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTid()).compareTo(other.isSetTid()); + lastComparison = java.lang.Boolean.compare(isSetTid(), other.isSetTid()); if (lastComparison != 0) { return lastComparison; } @@ -507,7 +486,7 @@ public int compareTo(TimRoster other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); + lastComparison = java.lang.Boolean.compare(isSetName(), other.isSetName()); if (lastComparison != 0) { return lastComparison; } @@ -517,7 +496,7 @@ public int compareTo(TimRoster other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraMap()).compareTo(other.isSetExtraMap()); + lastComparison = java.lang.Boolean.compare(isSetExtraMap(), other.isSetExtraMap()); if (lastComparison != 0) { return lastComparison; } @@ -530,21 +509,25 @@ public int compareTo(TimRoster other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("TimRoster("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TimRoster("); boolean first = true; sb.append("subscription:"); @@ -608,7 +591,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -616,14 +599,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TimRosterStandardSchemeFactory implements SchemeFactory { + private static class TimRosterStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimRosterStandardScheme getScheme() { return new TimRosterStandardScheme(); } } - private static class TimRosterStandardScheme extends StandardScheme { + private static class TimRosterStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TimRoster struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -663,9 +648,9 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimRoster struct) t if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map186 = iprot.readMapBegin(); - struct.extraMap = new HashMap(2*_map186.size); - String _key187; - String _val188; + struct.extraMap = new java.util.HashMap(2*_map186.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key187; + @org.apache.thrift.annotation.Nullable java.lang.String _val188; for (int _i189 = 0; _i189 < _map186.size; ++_i189) { _key187 = iprot.readString(); @@ -690,6 +675,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimRoster struct) t struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TimRoster struct) throws org.apache.thrift.TException { struct.validate(); @@ -716,7 +702,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimRoster struct) oprot.writeFieldBegin(EXTRA_MAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.extraMap.size())); - for (Map.Entry _iter190 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter190 : struct.extraMap.entrySet()) { oprot.writeString(_iter190.getKey()); oprot.writeString(_iter190.getValue()); @@ -732,20 +718,21 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimRoster struct) } - private static class TimRosterTupleSchemeFactory implements SchemeFactory { + private static class TimRosterTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimRosterTupleScheme getScheme() { return new TimRosterTupleScheme(); } } - private static class TimRosterTupleScheme extends TupleScheme { + private static class TimRosterTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TimRoster struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; oprot.writeString(struct.subscription); struct.tid.write(oprot); - BitSet optionals = new BitSet(); + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetName()) { optionals.set(0); } @@ -759,7 +746,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimRoster struct) t if (struct.isSetExtraMap()) { { oprot.writeI32(struct.extraMap.size()); - for (Map.Entry _iter191 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter191 : struct.extraMap.entrySet()) { oprot.writeString(_iter191.getKey()); oprot.writeString(_iter191.getValue()); @@ -770,23 +757,23 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimRoster struct) t @Override public void read(org.apache.thrift.protocol.TProtocol prot, TimRoster struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.subscription = iprot.readString(); struct.setSubscriptionIsSet(true); struct.tid = new Tid(); struct.tid.read(iprot); struct.setTidIsSet(true); - BitSet incoming = iprot.readBitSet(2); + java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.name = iprot.readString(); struct.setNameIsSet(true); } if (incoming.get(1)) { { - org.apache.thrift.protocol.TMap _map192 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.extraMap = new HashMap(2*_map192.size); - String _key193; - String _val194; + org.apache.thrift.protocol.TMap _map192 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.extraMap = new java.util.HashMap(2*_map192.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key193; + @org.apache.thrift.annotation.Nullable java.lang.String _val194; for (int _i195 = 0; _i195 < _map192.size; ++_i195) { _key193 = iprot.readString(); @@ -799,5 +786,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimRoster struct) th } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/TimSock5Bean.java b/protocols/gen-java/com/tim/packet/TimSock5Bean.java index 55f2328..3ab7011 100644 --- a/protocols/gen-java/com/tim/packet/TimSock5Bean.java +++ b/protocols/gen-java/com/tim/packet/TimSock5Bean.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class TimSock5Bean implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimSock5Bean"); @@ -46,18 +19,15 @@ public class TimSock5Bean implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TimSock5BeanStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TimSock5BeanTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TimSock5BeanStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TimSock5BeanTupleSchemeFactory(); - public Tid fromTid; // required - public Tid toTid; // required + public @org.apache.thrift.annotation.Nullable Tid fromTid; // required + public @org.apache.thrift.annotation.Nullable Tid toTid; // required /** * ip地址 */ - public String addr; // required + public @org.apache.thrift.annotation.Nullable java.lang.String addr; // required /** * 端口 */ @@ -69,8 +39,8 @@ public class TimSock5Bean implements org.apache.thrift.TBase extraMap; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String pubId; // required + public @org.apache.thrift.annotation.Nullable java.util.Map extraMap; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -94,10 +64,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { PUB_ID((short)6, "pubId"), EXTRA_MAP((short)7, "extraMap"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -105,6 +75,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // FROM_TID @@ -132,30 +103,33 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } @@ -165,9 +139,9 @@ public String getFieldName() { private static final int __TRANSPORT_ISSET_ID = 1; private byte __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.EXTRA_MAP}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.FROM_TID, new org.apache.thrift.meta_data.FieldMetaData("fromTid", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Tid.class))); tmpMap.put(_Fields.TO_TID, new org.apache.thrift.meta_data.FieldMetaData("toTid", org.apache.thrift.TFieldRequirementType.REQUIRED, @@ -184,7 +158,7 @@ public String getFieldName() { new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimSock5Bean.class, metaDataMap); } @@ -194,10 +168,10 @@ public TimSock5Bean() { public TimSock5Bean( Tid fromTid, Tid toTid, - String addr, + java.lang.String addr, int port, short transport, - String pubId) + java.lang.String pubId) { this(); this.fromTid = fromTid; @@ -230,11 +204,12 @@ public TimSock5Bean(TimSock5Bean other) { this.pubId = other.pubId; } if (other.isSetExtraMap()) { - Map __this__extraMap = new HashMap(other.extraMap); + java.util.Map __this__extraMap = new java.util.HashMap(other.extraMap); this.extraMap = __this__extraMap; } } + @Override public TimSock5Bean deepCopy() { return new TimSock5Bean(this); } @@ -252,11 +227,12 @@ public void clear() { this.extraMap = null; } + @org.apache.thrift.annotation.Nullable public Tid getFromTid() { return this.fromTid; } - public TimSock5Bean setFromTid(Tid fromTid) { + public TimSock5Bean setFromTid(@org.apache.thrift.annotation.Nullable Tid fromTid) { this.fromTid = fromTid; return this; } @@ -276,11 +252,12 @@ public void setFromTidIsSet(boolean value) { } } + @org.apache.thrift.annotation.Nullable public Tid getToTid() { return this.toTid; } - public TimSock5Bean setToTid(Tid toTid) { + public TimSock5Bean setToTid(@org.apache.thrift.annotation.Nullable Tid toTid) { this.toTid = toTid; return this; } @@ -303,14 +280,15 @@ public void setToTidIsSet(boolean value) { /** * ip地址 */ - public String getAddr() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getAddr() { return this.addr; } /** * ip地址 */ - public TimSock5Bean setAddr(String addr) { + public TimSock5Bean setAddr(@org.apache.thrift.annotation.Nullable java.lang.String addr) { this.addr = addr; return this; } @@ -347,16 +325,16 @@ public TimSock5Bean setPort(int port) { } public void unsetPort() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID); } /** Returns true if field port is set (has been assigned a value) and false otherwise */ public boolean isSetPort() { - return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID); } public void setPortIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value); } /** @@ -376,29 +354,30 @@ public TimSock5Bean setTransport(short transport) { } public void unsetTransport() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TRANSPORT_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TRANSPORT_ISSET_ID); } /** Returns true if field transport is set (has been assigned a value) and false otherwise */ public boolean isSetTransport() { - return EncodingUtils.testBit(__isset_bitfield, __TRANSPORT_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TRANSPORT_ISSET_ID); } public void setTransportIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TRANSPORT_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TRANSPORT_ISSET_ID, value); } /** * 发布id 通过发布id 可以连接两个发布id相同的用户 */ - public String getPubId() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getPubId() { return this.pubId; } /** * 发布id 通过发布id 可以连接两个发布id相同的用户 */ - public TimSock5Bean setPubId(String pubId) { + public TimSock5Bean setPubId(@org.apache.thrift.annotation.Nullable java.lang.String pubId) { this.pubId = pubId; return this; } @@ -422,18 +401,19 @@ public int getExtraMapSize() { return (this.extraMap == null) ? 0 : this.extraMap.size(); } - public void putToExtraMap(String key, String val) { + public void putToExtraMap(java.lang.String key, java.lang.String val) { if (this.extraMap == null) { - this.extraMap = new HashMap(); + this.extraMap = new java.util.HashMap(); } this.extraMap.put(key, val); } - public Map getExtraMap() { + @org.apache.thrift.annotation.Nullable + public java.util.Map getExtraMap() { return this.extraMap; } - public TimSock5Bean setExtraMap(Map extraMap) { + public TimSock5Bean setExtraMap(@org.apache.thrift.annotation.Nullable java.util.Map extraMap) { this.extraMap = extraMap; return this; } @@ -453,7 +433,8 @@ public void setExtraMapIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case FROM_TID: if (value == null) { @@ -475,7 +456,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetAddr(); } else { - setAddr((String)value); + setAddr((java.lang.String)value); } break; @@ -483,7 +464,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetPort(); } else { - setPort((Integer)value); + setPort((java.lang.Integer)value); } break; @@ -491,7 +472,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetTransport(); } else { - setTransport((Short)value); + setTransport((java.lang.Short)value); } break; @@ -499,7 +480,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetPubId(); } else { - setPubId((String)value); + setPubId((java.lang.String)value); } break; @@ -507,14 +488,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraMap(); } else { - setExtraMap((Map)value); + setExtraMap((java.util.Map)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case FROM_TID: return getFromTid(); @@ -538,13 +521,14 @@ public Object getFieldValue(_Fields field) { return getExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -563,13 +547,11 @@ public boolean isSet(_Fields field) { case EXTRA_MAP: return isSetExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof TimSock5Bean) return this.equals((TimSock5Bean)that); return false; @@ -578,6 +560,8 @@ public boolean equals(Object that) { public boolean equals(TimSock5Bean that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_fromTid = true && this.isSetFromTid(); boolean that_present_fromTid = true && that.isSetFromTid(); @@ -647,44 +631,33 @@ public boolean equals(TimSock5Bean that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_fromTid = true && (isSetFromTid()); - list.add(present_fromTid); - if (present_fromTid) - list.add(fromTid); - - boolean present_toTid = true && (isSetToTid()); - list.add(present_toTid); - if (present_toTid) - list.add(toTid); - - boolean present_addr = true && (isSetAddr()); - list.add(present_addr); - if (present_addr) - list.add(addr); - - boolean present_port = true; - list.add(present_port); - if (present_port) - list.add(port); - - boolean present_transport = true; - list.add(present_transport); - if (present_transport) - list.add(transport); - - boolean present_pubId = true && (isSetPubId()); - list.add(present_pubId); - if (present_pubId) - list.add(pubId); - - boolean present_extraMap = true && (isSetExtraMap()); - list.add(present_extraMap); - if (present_extraMap) - list.add(extraMap); - - return list.hashCode(); + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetFromTid()) ? 131071 : 524287); + if (isSetFromTid()) + hashCode = hashCode * 8191 + fromTid.hashCode(); + + hashCode = hashCode * 8191 + ((isSetToTid()) ? 131071 : 524287); + if (isSetToTid()) + hashCode = hashCode * 8191 + toTid.hashCode(); + + hashCode = hashCode * 8191 + ((isSetAddr()) ? 131071 : 524287); + if (isSetAddr()) + hashCode = hashCode * 8191 + addr.hashCode(); + + hashCode = hashCode * 8191 + port; + + hashCode = hashCode * 8191 + transport; + + hashCode = hashCode * 8191 + ((isSetPubId()) ? 131071 : 524287); + if (isSetPubId()) + hashCode = hashCode * 8191 + pubId.hashCode(); + + hashCode = hashCode * 8191 + ((isSetExtraMap()) ? 131071 : 524287); + if (isSetExtraMap()) + hashCode = hashCode * 8191 + extraMap.hashCode(); + + return hashCode; } @Override @@ -695,7 +668,7 @@ public int compareTo(TimSock5Bean other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetFromTid()).compareTo(other.isSetFromTid()); + lastComparison = java.lang.Boolean.compare(isSetFromTid(), other.isSetFromTid()); if (lastComparison != 0) { return lastComparison; } @@ -705,7 +678,7 @@ public int compareTo(TimSock5Bean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetToTid()).compareTo(other.isSetToTid()); + lastComparison = java.lang.Boolean.compare(isSetToTid(), other.isSetToTid()); if (lastComparison != 0) { return lastComparison; } @@ -715,7 +688,7 @@ public int compareTo(TimSock5Bean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetAddr()).compareTo(other.isSetAddr()); + lastComparison = java.lang.Boolean.compare(isSetAddr(), other.isSetAddr()); if (lastComparison != 0) { return lastComparison; } @@ -725,7 +698,7 @@ public int compareTo(TimSock5Bean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPort()).compareTo(other.isSetPort()); + lastComparison = java.lang.Boolean.compare(isSetPort(), other.isSetPort()); if (lastComparison != 0) { return lastComparison; } @@ -735,7 +708,7 @@ public int compareTo(TimSock5Bean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTransport()).compareTo(other.isSetTransport()); + lastComparison = java.lang.Boolean.compare(isSetTransport(), other.isSetTransport()); if (lastComparison != 0) { return lastComparison; } @@ -745,7 +718,7 @@ public int compareTo(TimSock5Bean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPubId()).compareTo(other.isSetPubId()); + lastComparison = java.lang.Boolean.compare(isSetPubId(), other.isSetPubId()); if (lastComparison != 0) { return lastComparison; } @@ -755,7 +728,7 @@ public int compareTo(TimSock5Bean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraMap()).compareTo(other.isSetExtraMap()); + lastComparison = java.lang.Boolean.compare(isSetExtraMap(), other.isSetExtraMap()); if (lastComparison != 0) { return lastComparison; } @@ -768,21 +741,25 @@ public int compareTo(TimSock5Bean other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("TimSock5Bean("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TimSock5Bean("); boolean first = true; sb.append("fromTid:"); @@ -871,7 +848,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; @@ -881,14 +858,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TimSock5BeanStandardSchemeFactory implements SchemeFactory { + private static class TimSock5BeanStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimSock5BeanStandardScheme getScheme() { return new TimSock5BeanStandardScheme(); } } - private static class TimSock5BeanStandardScheme extends StandardScheme { + private static class TimSock5BeanStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TimSock5Bean struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -953,9 +932,9 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimSock5Bean struct if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map234 = iprot.readMapBegin(); - struct.extraMap = new HashMap(2*_map234.size); - String _key235; - String _val236; + struct.extraMap = new java.util.HashMap(2*_map234.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key235; + @org.apache.thrift.annotation.Nullable java.lang.String _val236; for (int _i237 = 0; _i237 < _map234.size; ++_i237) { _key235 = iprot.readString(); @@ -986,6 +965,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimSock5Bean struct struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TimSock5Bean struct) throws org.apache.thrift.TException { struct.validate(); @@ -1021,7 +1001,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimSock5Bean struc oprot.writeFieldBegin(EXTRA_MAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.extraMap.size())); - for (Map.Entry _iter238 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter238 : struct.extraMap.entrySet()) { oprot.writeString(_iter238.getKey()); oprot.writeString(_iter238.getValue()); @@ -1037,24 +1017,25 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimSock5Bean struc } - private static class TimSock5BeanTupleSchemeFactory implements SchemeFactory { + private static class TimSock5BeanTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimSock5BeanTupleScheme getScheme() { return new TimSock5BeanTupleScheme(); } } - private static class TimSock5BeanTupleScheme extends TupleScheme { + private static class TimSock5BeanTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TimSock5Bean struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.fromTid.write(oprot); struct.toTid.write(oprot); oprot.writeString(struct.addr); oprot.writeI32(struct.port); oprot.writeI16(struct.transport); oprot.writeString(struct.pubId); - BitSet optionals = new BitSet(); + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetExtraMap()) { optionals.set(0); } @@ -1062,7 +1043,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimSock5Bean struct if (struct.isSetExtraMap()) { { oprot.writeI32(struct.extraMap.size()); - for (Map.Entry _iter239 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter239 : struct.extraMap.entrySet()) { oprot.writeString(_iter239.getKey()); oprot.writeString(_iter239.getValue()); @@ -1073,7 +1054,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimSock5Bean struct @Override public void read(org.apache.thrift.protocol.TProtocol prot, TimSock5Bean struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.fromTid = new Tid(); struct.fromTid.read(iprot); struct.setFromTidIsSet(true); @@ -1088,13 +1069,13 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimSock5Bean struct) struct.setTransportIsSet(true); struct.pubId = iprot.readString(); struct.setPubIdIsSet(true); - BitSet incoming = iprot.readBitSet(1); + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TMap _map240 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.extraMap = new HashMap(2*_map240.size); - String _key241; - String _val242; + org.apache.thrift.protocol.TMap _map240 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.extraMap = new java.util.HashMap(2*_map240.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key241; + @org.apache.thrift.annotation.Nullable java.lang.String _val242; for (int _i243 = 0; _i243 < _map240.size; ++_i243) { _key241 = iprot.readString(); @@ -1107,5 +1088,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimSock5Bean struct) } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/TimSock5Bytes.java b/protocols/gen-java/com/tim/packet/TimSock5Bytes.java index 44e10ae..ee19521 100644 --- a/protocols/gen-java/com/tim/packet/TimSock5Bytes.java +++ b/protocols/gen-java/com/tim/packet/TimSock5Bytes.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class TimSock5Bytes implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimSock5Bytes"); @@ -43,16 +16,13 @@ public class TimSock5Bytes implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TimSock5BytesStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TimSock5BytesTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TimSock5BytesStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TimSock5BytesTupleSchemeFactory(); /** * 发布id */ - public String pubId; // required + public @org.apache.thrift.annotation.Nullable java.lang.String pubId; // required /** * 序号数据块 */ @@ -60,8 +30,8 @@ public class TimSock5Bytes implements org.apache.thrift.TBase bytes; // required - public Map extraMap; // optional + public @org.apache.thrift.annotation.Nullable java.util.List bytes; // required + public @org.apache.thrift.annotation.Nullable java.util.Map extraMap; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -79,10 +49,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { BYTES((short)3, "bytes"), EXTRA_MAP((short)4, "extraMap"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -90,6 +60,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PUB_ID @@ -111,30 +82,33 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } @@ -143,9 +117,9 @@ public String getFieldName() { private static final int __INDEX_ISSET_ID = 0; private byte __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.EXTRA_MAP}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.PUB_ID, new org.apache.thrift.meta_data.FieldMetaData("pubId", org.apache.thrift.TFieldRequirementType.REQUIRED, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.INDEX, new org.apache.thrift.meta_data.FieldMetaData("index", org.apache.thrift.TFieldRequirementType.REQUIRED, @@ -157,7 +131,7 @@ public String getFieldName() { new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimSock5Bytes.class, metaDataMap); } @@ -165,9 +139,9 @@ public TimSock5Bytes() { } public TimSock5Bytes( - String pubId, + java.lang.String pubId, int index, - List bytes) + java.util.List bytes) { this(); this.pubId = pubId; @@ -186,15 +160,16 @@ public TimSock5Bytes(TimSock5Bytes other) { } this.index = other.index; if (other.isSetBytes()) { - List __this__bytes = new ArrayList(other.bytes); + java.util.List __this__bytes = new java.util.ArrayList(other.bytes); this.bytes = __this__bytes; } if (other.isSetExtraMap()) { - Map __this__extraMap = new HashMap(other.extraMap); + java.util.Map __this__extraMap = new java.util.HashMap(other.extraMap); this.extraMap = __this__extraMap; } } + @Override public TimSock5Bytes deepCopy() { return new TimSock5Bytes(this); } @@ -211,14 +186,15 @@ public void clear() { /** * 发布id */ - public String getPubId() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getPubId() { return this.pubId; } /** * 发布id */ - public TimSock5Bytes setPubId(String pubId) { + public TimSock5Bytes setPubId(@org.apache.thrift.annotation.Nullable java.lang.String pubId) { this.pubId = pubId; return this; } @@ -255,29 +231,30 @@ public TimSock5Bytes setIndex(int index) { } public void unsetIndex() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INDEX_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INDEX_ISSET_ID); } /** Returns true if field index is set (has been assigned a value) and false otherwise */ public boolean isSetIndex() { - return EncodingUtils.testBit(__isset_bitfield, __INDEX_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INDEX_ISSET_ID); } public void setIndexIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INDEX_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INDEX_ISSET_ID, value); } public int getBytesSize() { return (this.bytes == null) ? 0 : this.bytes.size(); } - public java.util.Iterator getBytesIterator() { + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getBytesIterator() { return (this.bytes == null) ? null : this.bytes.iterator(); } - public void addToBytes(ByteBuffer elem) { + public void addToBytes(java.nio.ByteBuffer elem) { if (this.bytes == null) { - this.bytes = new ArrayList(); + this.bytes = new java.util.ArrayList(); } this.bytes.add(elem); } @@ -285,14 +262,15 @@ public void addToBytes(ByteBuffer elem) { /** * 数据块 */ - public List getBytes() { + @org.apache.thrift.annotation.Nullable + public java.util.List getBytes() { return this.bytes; } /** * 数据块 */ - public TimSock5Bytes setBytes(List bytes) { + public TimSock5Bytes setBytes(@org.apache.thrift.annotation.Nullable java.util.List bytes) { this.bytes = bytes; return this; } @@ -316,18 +294,19 @@ public int getExtraMapSize() { return (this.extraMap == null) ? 0 : this.extraMap.size(); } - public void putToExtraMap(String key, String val) { + public void putToExtraMap(java.lang.String key, java.lang.String val) { if (this.extraMap == null) { - this.extraMap = new HashMap(); + this.extraMap = new java.util.HashMap(); } this.extraMap.put(key, val); } - public Map getExtraMap() { + @org.apache.thrift.annotation.Nullable + public java.util.Map getExtraMap() { return this.extraMap; } - public TimSock5Bytes setExtraMap(Map extraMap) { + public TimSock5Bytes setExtraMap(@org.apache.thrift.annotation.Nullable java.util.Map extraMap) { this.extraMap = extraMap; return this; } @@ -347,13 +326,14 @@ public void setExtraMapIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case PUB_ID: if (value == null) { unsetPubId(); } else { - setPubId((String)value); + setPubId((java.lang.String)value); } break; @@ -361,7 +341,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetIndex(); } else { - setIndex((Integer)value); + setIndex((java.lang.Integer)value); } break; @@ -369,7 +349,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetBytes(); } else { - setBytes((List)value); + setBytes((java.util.List)value); } break; @@ -377,14 +357,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraMap(); } else { - setExtraMap((Map)value); + setExtraMap((java.util.Map)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case PUB_ID: return getPubId(); @@ -399,13 +381,14 @@ public Object getFieldValue(_Fields field) { return getExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -418,13 +401,11 @@ public boolean isSet(_Fields field) { case EXTRA_MAP: return isSetExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof TimSock5Bytes) return this.equals((TimSock5Bytes)that); return false; @@ -433,6 +414,8 @@ public boolean equals(Object that) { public boolean equals(TimSock5Bytes that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_pubId = true && this.isSetPubId(); boolean that_present_pubId = true && that.isSetPubId(); @@ -475,29 +458,23 @@ public boolean equals(TimSock5Bytes that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_pubId = true && (isSetPubId()); - list.add(present_pubId); - if (present_pubId) - list.add(pubId); + hashCode = hashCode * 8191 + ((isSetPubId()) ? 131071 : 524287); + if (isSetPubId()) + hashCode = hashCode * 8191 + pubId.hashCode(); - boolean present_index = true; - list.add(present_index); - if (present_index) - list.add(index); + hashCode = hashCode * 8191 + index; - boolean present_bytes = true && (isSetBytes()); - list.add(present_bytes); - if (present_bytes) - list.add(bytes); + hashCode = hashCode * 8191 + ((isSetBytes()) ? 131071 : 524287); + if (isSetBytes()) + hashCode = hashCode * 8191 + bytes.hashCode(); - boolean present_extraMap = true && (isSetExtraMap()); - list.add(present_extraMap); - if (present_extraMap) - list.add(extraMap); + hashCode = hashCode * 8191 + ((isSetExtraMap()) ? 131071 : 524287); + if (isSetExtraMap()) + hashCode = hashCode * 8191 + extraMap.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -508,7 +485,7 @@ public int compareTo(TimSock5Bytes other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetPubId()).compareTo(other.isSetPubId()); + lastComparison = java.lang.Boolean.compare(isSetPubId(), other.isSetPubId()); if (lastComparison != 0) { return lastComparison; } @@ -518,7 +495,7 @@ public int compareTo(TimSock5Bytes other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetIndex()).compareTo(other.isSetIndex()); + lastComparison = java.lang.Boolean.compare(isSetIndex(), other.isSetIndex()); if (lastComparison != 0) { return lastComparison; } @@ -528,7 +505,7 @@ public int compareTo(TimSock5Bytes other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetBytes()).compareTo(other.isSetBytes()); + lastComparison = java.lang.Boolean.compare(isSetBytes(), other.isSetBytes()); if (lastComparison != 0) { return lastComparison; } @@ -538,7 +515,7 @@ public int compareTo(TimSock5Bytes other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraMap()).compareTo(other.isSetExtraMap()); + lastComparison = java.lang.Boolean.compare(isSetExtraMap(), other.isSetExtraMap()); if (lastComparison != 0) { return lastComparison; } @@ -551,21 +528,25 @@ public int compareTo(TimSock5Bytes other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("TimSock5Bytes("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TimSock5Bytes("); boolean first = true; sb.append("pubId:"); @@ -621,7 +602,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; @@ -631,14 +612,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TimSock5BytesStandardSchemeFactory implements SchemeFactory { + private static class TimSock5BytesStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimSock5BytesStandardScheme getScheme() { return new TimSock5BytesStandardScheme(); } } - private static class TimSock5BytesStandardScheme extends StandardScheme { + private static class TimSock5BytesStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TimSock5Bytes struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -669,8 +652,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimSock5Bytes struc if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list244 = iprot.readListBegin(); - struct.bytes = new ArrayList(_list244.size); - ByteBuffer _elem245; + struct.bytes = new java.util.ArrayList(_list244.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem245; for (int _i246 = 0; _i246 < _list244.size; ++_i246) { _elem245 = iprot.readBinary(); @@ -687,9 +670,9 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimSock5Bytes struc if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map247 = iprot.readMapBegin(); - struct.extraMap = new HashMap(2*_map247.size); - String _key248; - String _val249; + struct.extraMap = new java.util.HashMap(2*_map247.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key248; + @org.apache.thrift.annotation.Nullable java.lang.String _val249; for (int _i250 = 0; _i250 < _map247.size; ++_i250) { _key248 = iprot.readString(); @@ -717,6 +700,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimSock5Bytes struc struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TimSock5Bytes struct) throws org.apache.thrift.TException { struct.validate(); @@ -733,7 +717,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimSock5Bytes stru oprot.writeFieldBegin(BYTES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.bytes.size())); - for (ByteBuffer _iter251 : struct.bytes) + for (java.nio.ByteBuffer _iter251 : struct.bytes) { oprot.writeBinary(_iter251); } @@ -746,7 +730,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimSock5Bytes stru oprot.writeFieldBegin(EXTRA_MAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.extraMap.size())); - for (Map.Entry _iter252 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter252 : struct.extraMap.entrySet()) { oprot.writeString(_iter252.getKey()); oprot.writeString(_iter252.getValue()); @@ -762,27 +746,28 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimSock5Bytes stru } - private static class TimSock5BytesTupleSchemeFactory implements SchemeFactory { + private static class TimSock5BytesTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimSock5BytesTupleScheme getScheme() { return new TimSock5BytesTupleScheme(); } } - private static class TimSock5BytesTupleScheme extends TupleScheme { + private static class TimSock5BytesTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TimSock5Bytes struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; oprot.writeString(struct.pubId); oprot.writeI32(struct.index); { oprot.writeI32(struct.bytes.size()); - for (ByteBuffer _iter253 : struct.bytes) + for (java.nio.ByteBuffer _iter253 : struct.bytes) { oprot.writeBinary(_iter253); } } - BitSet optionals = new BitSet(); + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetExtraMap()) { optionals.set(0); } @@ -790,7 +775,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimSock5Bytes struc if (struct.isSetExtraMap()) { { oprot.writeI32(struct.extraMap.size()); - for (Map.Entry _iter254 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter254 : struct.extraMap.entrySet()) { oprot.writeString(_iter254.getKey()); oprot.writeString(_iter254.getValue()); @@ -801,15 +786,15 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimSock5Bytes struc @Override public void read(org.apache.thrift.protocol.TProtocol prot, TimSock5Bytes struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.pubId = iprot.readString(); struct.setPubIdIsSet(true); struct.index = iprot.readI32(); struct.setIndexIsSet(true); { - org.apache.thrift.protocol.TList _list255 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.bytes = new ArrayList(_list255.size); - ByteBuffer _elem256; + org.apache.thrift.protocol.TList _list255 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.bytes = new java.util.ArrayList(_list255.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem256; for (int _i257 = 0; _i257 < _list255.size; ++_i257) { _elem256 = iprot.readBinary(); @@ -817,13 +802,13 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimSock5Bytes struct } } struct.setBytesIsSet(true); - BitSet incoming = iprot.readBitSet(1); + java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TMap _map258 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.extraMap = new HashMap(2*_map258.size); - String _key259; - String _val260; + org.apache.thrift.protocol.TMap _map258 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.extraMap = new java.util.HashMap(2*_map258.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key259; + @org.apache.thrift.annotation.Nullable java.lang.String _val260; for (int _i261 = 0; _i261 < _map258.size; ++_i261) { _key259 = iprot.readString(); @@ -836,5 +821,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimSock5Bytes struct } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/TimTime.java b/protocols/gen-java/com/tim/packet/TimTime.java index f3e8de2..6954ba6 100644 --- a/protocols/gen-java/com/tim/packet/TimTime.java +++ b/protocols/gen-java/com/tim/packet/TimTime.java @@ -1,60 +1,30 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class TimTime implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimTime"); private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField FORMATTIME_FIELD_DESC = new org.apache.thrift.protocol.TField("formattime", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TimTimeStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TimTimeTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TimTimeStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TimTimeTupleSchemeFactory(); /** * 时间戳 (毫秒) */ - public String timestamp; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String timestamp; // optional /** * 格式化时间 */ - public String formattime; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String formattime; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -67,10 +37,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { */ FORMATTIME((short)2, "formattime"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -78,6 +48,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TIMESTAMP @@ -95,44 +66,47 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } // isset id assignments private static final _Fields optionals[] = {_Fields.TIMESTAMP,_Fields.FORMATTIME}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.FORMATTIME, new org.apache.thrift.meta_data.FieldMetaData("formattime", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimTime.class, metaDataMap); } @@ -151,6 +125,7 @@ public TimTime(TimTime other) { } } + @Override public TimTime deepCopy() { return new TimTime(this); } @@ -164,14 +139,15 @@ public void clear() { /** * 时间戳 (毫秒) */ - public String getTimestamp() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getTimestamp() { return this.timestamp; } /** * 时间戳 (毫秒) */ - public TimTime setTimestamp(String timestamp) { + public TimTime setTimestamp(@org.apache.thrift.annotation.Nullable java.lang.String timestamp) { this.timestamp = timestamp; return this; } @@ -194,14 +170,15 @@ public void setTimestampIsSet(boolean value) { /** * 格式化时间 */ - public String getFormattime() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getFormattime() { return this.formattime; } /** * 格式化时间 */ - public TimTime setFormattime(String formattime) { + public TimTime setFormattime(@org.apache.thrift.annotation.Nullable java.lang.String formattime) { this.formattime = formattime; return this; } @@ -221,13 +198,14 @@ public void setFormattimeIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case TIMESTAMP: if (value == null) { unsetTimestamp(); } else { - setTimestamp((String)value); + setTimestamp((java.lang.String)value); } break; @@ -235,14 +213,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetFormattime(); } else { - setFormattime((String)value); + setFormattime((java.lang.String)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TIMESTAMP: return getTimestamp(); @@ -251,13 +231,14 @@ public Object getFieldValue(_Fields field) { return getFormattime(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -266,13 +247,11 @@ public boolean isSet(_Fields field) { case FORMATTIME: return isSetFormattime(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof TimTime) return this.equals((TimTime)that); return false; @@ -281,6 +260,8 @@ public boolean equals(Object that) { public boolean equals(TimTime that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_timestamp = true && this.isSetTimestamp(); boolean that_present_timestamp = true && that.isSetTimestamp(); @@ -305,19 +286,17 @@ public boolean equals(TimTime that) { @Override public int hashCode() { - List list = new ArrayList(); + int hashCode = 1; - boolean present_timestamp = true && (isSetTimestamp()); - list.add(present_timestamp); - if (present_timestamp) - list.add(timestamp); + hashCode = hashCode * 8191 + ((isSetTimestamp()) ? 131071 : 524287); + if (isSetTimestamp()) + hashCode = hashCode * 8191 + timestamp.hashCode(); - boolean present_formattime = true && (isSetFormattime()); - list.add(present_formattime); - if (present_formattime) - list.add(formattime); + hashCode = hashCode * 8191 + ((isSetFormattime()) ? 131071 : 524287); + if (isSetFormattime()) + hashCode = hashCode * 8191 + formattime.hashCode(); - return list.hashCode(); + return hashCode; } @Override @@ -328,7 +307,7 @@ public int compareTo(TimTime other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp()); + lastComparison = java.lang.Boolean.compare(isSetTimestamp(), other.isSetTimestamp()); if (lastComparison != 0) { return lastComparison; } @@ -338,7 +317,7 @@ public int compareTo(TimTime other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFormattime()).compareTo(other.isSetFormattime()); + lastComparison = java.lang.Boolean.compare(isSetFormattime(), other.isSetFormattime()); if (lastComparison != 0) { return lastComparison; } @@ -351,21 +330,25 @@ public int compareTo(TimTime other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("TimTime("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TimTime("); boolean first = true; if (isSetTimestamp()) { @@ -404,7 +387,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { @@ -412,14 +395,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TimTimeStandardSchemeFactory implements SchemeFactory { + private static class TimTimeStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimTimeStandardScheme getScheme() { return new TimTimeStandardScheme(); } } - private static class TimTimeStandardScheme extends StandardScheme { + private static class TimTimeStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TimTime struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -457,6 +442,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimTime struct) thr struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TimTime struct) throws org.apache.thrift.TException { struct.validate(); @@ -481,18 +467,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimTime struct) th } - private static class TimTimeTupleSchemeFactory implements SchemeFactory { + private static class TimTimeTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimTimeTupleScheme getScheme() { return new TimTimeTupleScheme(); } } - private static class TimTimeTupleScheme extends TupleScheme { + private static class TimTimeTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TimTime struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetTimestamp()) { optionals.set(0); } @@ -510,8 +497,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimTime struct) thr @Override public void read(org.apache.thrift.protocol.TProtocol prot, TimTime struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.timestamp = iprot.readString(); struct.setTimestampIsSet(true); @@ -523,5 +510,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimTime struct) thro } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/TimUserBean.java b/protocols/gen-java/com/tim/packet/TimUserBean.java index 196164f..c36b073 100644 --- a/protocols/gen-java/com/tim/packet/TimUserBean.java +++ b/protocols/gen-java/com/tim/packet/TimUserBean.java @@ -1,40 +1,13 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) -@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-22") +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-11") public class TimUserBean implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TimUserBean"); @@ -50,28 +23,25 @@ public class TimUserBean implements org.apache.thrift.TBase, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new TimUserBeanStandardSchemeFactory()); - schemes.put(TupleScheme.class, new TimUserBeanTupleSchemeFactory()); - } + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TimUserBeanStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TimUserBeanTupleSchemeFactory(); /** * 用户bean */ - public Tid tid; // optional + public @org.apache.thrift.annotation.Nullable Tid tid; // optional /** * 昵称 */ - public String nickname; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String nickname; // optional /** * 备注名称 */ - public String remarkname; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String remarkname; // optional /** * 生日 2000-01-01 */ - public String brithday; // optional + public @org.apache.thrift.annotation.Nullable java.lang.String brithday; // optional /** * 性别 自行约定 如 : 0不知,1男,2女 */ @@ -79,24 +49,24 @@ public class TimUserBean implements org.apache.thrift.TBase photoBytes; // optional + public @org.apache.thrift.annotation.Nullable java.util.List photoBytes; // optional /** * 扩展字段 */ - public List extraList; // optional - public Map extraMap; // optional + public @org.apache.thrift.annotation.Nullable java.util.List extraList; // optional + public @org.apache.thrift.annotation.Nullable java.util.Map extraMap; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -142,10 +112,10 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { EXTRA_LIST((short)10, "extraList"), EXTRA_MAP((short)11, "extraMap"); - private static final Map byName = new HashMap(); + private static final java.util.Map byName = new java.util.HashMap(); static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } @@ -153,6 +123,7 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum { /** * Find the _Fields constant that matches fieldId, or null if its not found. */ + @org.apache.thrift.annotation.Nullable public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // TID @@ -188,30 +159,33 @@ public static _Fields findByThriftId(int fieldId) { */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ - public static _Fields findByName(String name) { + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { return byName.get(name); } private final short _thriftId; - private final String _fieldName; + private final java.lang.String _fieldName; - _Fields(short thriftId, String fieldName) { + _Fields(short thriftId, java.lang.String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } + @Override public short getThriftFieldId() { return _thriftId; } - public String getFieldName() { + @Override + public java.lang.String getFieldName() { return _fieldName; } } @@ -220,9 +194,9 @@ public String getFieldName() { private static final int __GENDER_ISSET_ID = 0; private byte __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.TID,_Fields.NICKNAME,_Fields.REMARKNAME,_Fields.BRITHDAY,_Fields.GENDER,_Fields.HEADURL,_Fields.AREA,_Fields.HEADBYTE,_Fields.PHOTO_BYTES,_Fields.EXTRA_LIST,_Fields.EXTRA_MAP}; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.TID, new org.apache.thrift.meta_data.FieldMetaData("tid", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Tid.class))); tmpMap.put(_Fields.NICKNAME, new org.apache.thrift.meta_data.FieldMetaData("nickname", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -249,7 +223,7 @@ public String getFieldName() { new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TimUserBean.class, metaDataMap); } @@ -284,22 +258,23 @@ public TimUserBean(TimUserBean other) { this.headbyte = org.apache.thrift.TBaseHelper.copyBinary(other.headbyte); } if (other.isSetPhotoBytes()) { - List __this__photoBytes = new ArrayList(other.photoBytes); + java.util.List __this__photoBytes = new java.util.ArrayList(other.photoBytes); this.photoBytes = __this__photoBytes; } if (other.isSetExtraList()) { - List __this__extraList = new ArrayList(other.extraList.size()); + java.util.List __this__extraList = new java.util.ArrayList(other.extraList.size()); for (TimNode other_element : other.extraList) { __this__extraList.add(new TimNode(other_element)); } this.extraList = __this__extraList; } if (other.isSetExtraMap()) { - Map __this__extraMap = new HashMap(other.extraMap); + java.util.Map __this__extraMap = new java.util.HashMap(other.extraMap); this.extraMap = __this__extraMap; } } + @Override public TimUserBean deepCopy() { return new TimUserBean(this); } @@ -323,6 +298,7 @@ public void clear() { /** * 用户bean */ + @org.apache.thrift.annotation.Nullable public Tid getTid() { return this.tid; } @@ -330,7 +306,7 @@ public Tid getTid() { /** * 用户bean */ - public TimUserBean setTid(Tid tid) { + public TimUserBean setTid(@org.apache.thrift.annotation.Nullable Tid tid) { this.tid = tid; return this; } @@ -353,14 +329,15 @@ public void setTidIsSet(boolean value) { /** * 昵称 */ - public String getNickname() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getNickname() { return this.nickname; } /** * 昵称 */ - public TimUserBean setNickname(String nickname) { + public TimUserBean setNickname(@org.apache.thrift.annotation.Nullable java.lang.String nickname) { this.nickname = nickname; return this; } @@ -383,14 +360,15 @@ public void setNicknameIsSet(boolean value) { /** * 备注名称 */ - public String getRemarkname() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getRemarkname() { return this.remarkname; } /** * 备注名称 */ - public TimUserBean setRemarkname(String remarkname) { + public TimUserBean setRemarkname(@org.apache.thrift.annotation.Nullable java.lang.String remarkname) { this.remarkname = remarkname; return this; } @@ -413,14 +391,15 @@ public void setRemarknameIsSet(boolean value) { /** * 生日 2000-01-01 */ - public String getBrithday() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getBrithday() { return this.brithday; } /** * 生日 2000-01-01 */ - public TimUserBean setBrithday(String brithday) { + public TimUserBean setBrithday(@org.apache.thrift.annotation.Nullable java.lang.String brithday) { this.brithday = brithday; return this; } @@ -457,29 +436,30 @@ public TimUserBean setGender(short gender) { } public void unsetGender() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __GENDER_ISSET_ID); + __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __GENDER_ISSET_ID); } /** Returns true if field gender is set (has been assigned a value) and false otherwise */ public boolean isSetGender() { - return EncodingUtils.testBit(__isset_bitfield, __GENDER_ISSET_ID); + return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __GENDER_ISSET_ID); } public void setGenderIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GENDER_ISSET_ID, value); + __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __GENDER_ISSET_ID, value); } /** * 头像地址 http://xxx.jpg */ - public String getHeadurl() { + @org.apache.thrift.annotation.Nullable + public java.lang.String getHeadurl() { return this.headurl; } /** * 头像地址 http://xxx.jpg */ - public TimUserBean setHeadurl(String headurl) { + public TimUserBean setHeadurl(@org.apache.thrift.annotation.Nullable java.lang.String headurl) { this.headurl = headurl; return this; } @@ -502,6 +482,7 @@ public void setHeadurlIsSet(boolean value) { /** * 地区 */ + @org.apache.thrift.annotation.Nullable public TimArea getArea() { return this.area; } @@ -509,7 +490,7 @@ public TimArea getArea() { /** * 地区 */ - public TimUserBean setArea(TimArea area) { + public TimUserBean setArea(@org.apache.thrift.annotation.Nullable TimArea area) { this.area = area; return this; } @@ -537,7 +518,7 @@ public byte[] getHeadbyte() { return headbyte == null ? null : headbyte.array(); } - public ByteBuffer bufferForHeadbyte() { + public java.nio.ByteBuffer bufferForHeadbyte() { return org.apache.thrift.TBaseHelper.copyBinary(headbyte); } @@ -545,11 +526,11 @@ public ByteBuffer bufferForHeadbyte() { * 头像 */ public TimUserBean setHeadbyte(byte[] headbyte) { - this.headbyte = headbyte == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(headbyte, headbyte.length)); + this.headbyte = headbyte == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(headbyte.clone()); return this; } - public TimUserBean setHeadbyte(ByteBuffer headbyte) { + public TimUserBean setHeadbyte(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer headbyte) { this.headbyte = org.apache.thrift.TBaseHelper.copyBinary(headbyte); return this; } @@ -573,13 +554,14 @@ public int getPhotoBytesSize() { return (this.photoBytes == null) ? 0 : this.photoBytes.size(); } - public java.util.Iterator getPhotoBytesIterator() { + @org.apache.thrift.annotation.Nullable + public java.util.Iterator getPhotoBytesIterator() { return (this.photoBytes == null) ? null : this.photoBytes.iterator(); } - public void addToPhotoBytes(ByteBuffer elem) { + public void addToPhotoBytes(java.nio.ByteBuffer elem) { if (this.photoBytes == null) { - this.photoBytes = new ArrayList(); + this.photoBytes = new java.util.ArrayList(); } this.photoBytes.add(elem); } @@ -587,14 +569,15 @@ public void addToPhotoBytes(ByteBuffer elem) { /** * 其他图片 */ - public List getPhotoBytes() { + @org.apache.thrift.annotation.Nullable + public java.util.List getPhotoBytes() { return this.photoBytes; } /** * 其他图片 */ - public TimUserBean setPhotoBytes(List photoBytes) { + public TimUserBean setPhotoBytes(@org.apache.thrift.annotation.Nullable java.util.List photoBytes) { this.photoBytes = photoBytes; return this; } @@ -618,13 +601,14 @@ public int getExtraListSize() { return (this.extraList == null) ? 0 : this.extraList.size(); } + @org.apache.thrift.annotation.Nullable public java.util.Iterator getExtraListIterator() { return (this.extraList == null) ? null : this.extraList.iterator(); } public void addToExtraList(TimNode elem) { if (this.extraList == null) { - this.extraList = new ArrayList(); + this.extraList = new java.util.ArrayList(); } this.extraList.add(elem); } @@ -632,14 +616,15 @@ public void addToExtraList(TimNode elem) { /** * 扩展字段 */ - public List getExtraList() { + @org.apache.thrift.annotation.Nullable + public java.util.List getExtraList() { return this.extraList; } /** * 扩展字段 */ - public TimUserBean setExtraList(List extraList) { + public TimUserBean setExtraList(@org.apache.thrift.annotation.Nullable java.util.List extraList) { this.extraList = extraList; return this; } @@ -663,18 +648,19 @@ public int getExtraMapSize() { return (this.extraMap == null) ? 0 : this.extraMap.size(); } - public void putToExtraMap(String key, String val) { + public void putToExtraMap(java.lang.String key, java.lang.String val) { if (this.extraMap == null) { - this.extraMap = new HashMap(); + this.extraMap = new java.util.HashMap(); } this.extraMap.put(key, val); } - public Map getExtraMap() { + @org.apache.thrift.annotation.Nullable + public java.util.Map getExtraMap() { return this.extraMap; } - public TimUserBean setExtraMap(Map extraMap) { + public TimUserBean setExtraMap(@org.apache.thrift.annotation.Nullable java.util.Map extraMap) { this.extraMap = extraMap; return this; } @@ -694,7 +680,8 @@ public void setExtraMapIsSet(boolean value) { } } - public void setFieldValue(_Fields field, Object value) { + @Override + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case TID: if (value == null) { @@ -708,7 +695,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetNickname(); } else { - setNickname((String)value); + setNickname((java.lang.String)value); } break; @@ -716,7 +703,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetRemarkname(); } else { - setRemarkname((String)value); + setRemarkname((java.lang.String)value); } break; @@ -724,7 +711,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetBrithday(); } else { - setBrithday((String)value); + setBrithday((java.lang.String)value); } break; @@ -732,7 +719,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetGender(); } else { - setGender((Short)value); + setGender((java.lang.Short)value); } break; @@ -740,7 +727,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetHeadurl(); } else { - setHeadurl((String)value); + setHeadurl((java.lang.String)value); } break; @@ -756,7 +743,11 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetHeadbyte(); } else { - setHeadbyte((ByteBuffer)value); + if (value instanceof byte[]) { + setHeadbyte((byte[])value); + } else { + setHeadbyte((java.nio.ByteBuffer)value); + } } break; @@ -764,7 +755,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetPhotoBytes(); } else { - setPhotoBytes((List)value); + setPhotoBytes((java.util.List)value); } break; @@ -772,7 +763,7 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraList(); } else { - setExtraList((List)value); + setExtraList((java.util.List)value); } break; @@ -780,14 +771,16 @@ public void setFieldValue(_Fields field, Object value) { if (value == null) { unsetExtraMap(); } else { - setExtraMap((Map)value); + setExtraMap((java.util.Map)value); } break; } } - public Object getFieldValue(_Fields field) { + @org.apache.thrift.annotation.Nullable + @Override + public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TID: return getTid(); @@ -823,13 +816,14 @@ public Object getFieldValue(_Fields field) { return getExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + @Override public boolean isSet(_Fields field) { if (field == null) { - throw new IllegalArgumentException(); + throw new java.lang.IllegalArgumentException(); } switch (field) { @@ -856,13 +850,11 @@ public boolean isSet(_Fields field) { case EXTRA_MAP: return isSetExtraMap(); } - throw new IllegalStateException(); + throw new java.lang.IllegalStateException(); } @Override - public boolean equals(Object that) { - if (that == null) - return false; + public boolean equals(java.lang.Object that) { if (that instanceof TimUserBean) return this.equals((TimUserBean)that); return false; @@ -871,6 +863,8 @@ public boolean equals(Object that) { public boolean equals(TimUserBean that) { if (that == null) return false; + if (this == that) + return true; boolean this_present_tid = true && this.isSetTid(); boolean that_present_tid = true && that.isSetTid(); @@ -976,64 +970,53 @@ public boolean equals(TimUserBean that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_tid = true && (isSetTid()); - list.add(present_tid); - if (present_tid) - list.add(tid); - - boolean present_nickname = true && (isSetNickname()); - list.add(present_nickname); - if (present_nickname) - list.add(nickname); - - boolean present_remarkname = true && (isSetRemarkname()); - list.add(present_remarkname); - if (present_remarkname) - list.add(remarkname); - - boolean present_brithday = true && (isSetBrithday()); - list.add(present_brithday); - if (present_brithday) - list.add(brithday); - - boolean present_gender = true && (isSetGender()); - list.add(present_gender); - if (present_gender) - list.add(gender); - - boolean present_headurl = true && (isSetHeadurl()); - list.add(present_headurl); - if (present_headurl) - list.add(headurl); - - boolean present_area = true && (isSetArea()); - list.add(present_area); - if (present_area) - list.add(area); - - boolean present_headbyte = true && (isSetHeadbyte()); - list.add(present_headbyte); - if (present_headbyte) - list.add(headbyte); - - boolean present_photoBytes = true && (isSetPhotoBytes()); - list.add(present_photoBytes); - if (present_photoBytes) - list.add(photoBytes); - - boolean present_extraList = true && (isSetExtraList()); - list.add(present_extraList); - if (present_extraList) - list.add(extraList); - - boolean present_extraMap = true && (isSetExtraMap()); - list.add(present_extraMap); - if (present_extraMap) - list.add(extraMap); - - return list.hashCode(); + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetTid()) ? 131071 : 524287); + if (isSetTid()) + hashCode = hashCode * 8191 + tid.hashCode(); + + hashCode = hashCode * 8191 + ((isSetNickname()) ? 131071 : 524287); + if (isSetNickname()) + hashCode = hashCode * 8191 + nickname.hashCode(); + + hashCode = hashCode * 8191 + ((isSetRemarkname()) ? 131071 : 524287); + if (isSetRemarkname()) + hashCode = hashCode * 8191 + remarkname.hashCode(); + + hashCode = hashCode * 8191 + ((isSetBrithday()) ? 131071 : 524287); + if (isSetBrithday()) + hashCode = hashCode * 8191 + brithday.hashCode(); + + hashCode = hashCode * 8191 + ((isSetGender()) ? 131071 : 524287); + if (isSetGender()) + hashCode = hashCode * 8191 + gender; + + hashCode = hashCode * 8191 + ((isSetHeadurl()) ? 131071 : 524287); + if (isSetHeadurl()) + hashCode = hashCode * 8191 + headurl.hashCode(); + + hashCode = hashCode * 8191 + ((isSetArea()) ? 131071 : 524287); + if (isSetArea()) + hashCode = hashCode * 8191 + area.hashCode(); + + hashCode = hashCode * 8191 + ((isSetHeadbyte()) ? 131071 : 524287); + if (isSetHeadbyte()) + hashCode = hashCode * 8191 + headbyte.hashCode(); + + hashCode = hashCode * 8191 + ((isSetPhotoBytes()) ? 131071 : 524287); + if (isSetPhotoBytes()) + hashCode = hashCode * 8191 + photoBytes.hashCode(); + + hashCode = hashCode * 8191 + ((isSetExtraList()) ? 131071 : 524287); + if (isSetExtraList()) + hashCode = hashCode * 8191 + extraList.hashCode(); + + hashCode = hashCode * 8191 + ((isSetExtraMap()) ? 131071 : 524287); + if (isSetExtraMap()) + hashCode = hashCode * 8191 + extraMap.hashCode(); + + return hashCode; } @Override @@ -1044,7 +1027,7 @@ public int compareTo(TimUserBean other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetTid()).compareTo(other.isSetTid()); + lastComparison = java.lang.Boolean.compare(isSetTid(), other.isSetTid()); if (lastComparison != 0) { return lastComparison; } @@ -1054,7 +1037,7 @@ public int compareTo(TimUserBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNickname()).compareTo(other.isSetNickname()); + lastComparison = java.lang.Boolean.compare(isSetNickname(), other.isSetNickname()); if (lastComparison != 0) { return lastComparison; } @@ -1064,7 +1047,7 @@ public int compareTo(TimUserBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetRemarkname()).compareTo(other.isSetRemarkname()); + lastComparison = java.lang.Boolean.compare(isSetRemarkname(), other.isSetRemarkname()); if (lastComparison != 0) { return lastComparison; } @@ -1074,7 +1057,7 @@ public int compareTo(TimUserBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetBrithday()).compareTo(other.isSetBrithday()); + lastComparison = java.lang.Boolean.compare(isSetBrithday(), other.isSetBrithday()); if (lastComparison != 0) { return lastComparison; } @@ -1084,7 +1067,7 @@ public int compareTo(TimUserBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetGender()).compareTo(other.isSetGender()); + lastComparison = java.lang.Boolean.compare(isSetGender(), other.isSetGender()); if (lastComparison != 0) { return lastComparison; } @@ -1094,7 +1077,7 @@ public int compareTo(TimUserBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetHeadurl()).compareTo(other.isSetHeadurl()); + lastComparison = java.lang.Boolean.compare(isSetHeadurl(), other.isSetHeadurl()); if (lastComparison != 0) { return lastComparison; } @@ -1104,7 +1087,7 @@ public int compareTo(TimUserBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetArea()).compareTo(other.isSetArea()); + lastComparison = java.lang.Boolean.compare(isSetArea(), other.isSetArea()); if (lastComparison != 0) { return lastComparison; } @@ -1114,7 +1097,7 @@ public int compareTo(TimUserBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetHeadbyte()).compareTo(other.isSetHeadbyte()); + lastComparison = java.lang.Boolean.compare(isSetHeadbyte(), other.isSetHeadbyte()); if (lastComparison != 0) { return lastComparison; } @@ -1124,7 +1107,7 @@ public int compareTo(TimUserBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPhotoBytes()).compareTo(other.isSetPhotoBytes()); + lastComparison = java.lang.Boolean.compare(isSetPhotoBytes(), other.isSetPhotoBytes()); if (lastComparison != 0) { return lastComparison; } @@ -1134,7 +1117,7 @@ public int compareTo(TimUserBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraList()).compareTo(other.isSetExtraList()); + lastComparison = java.lang.Boolean.compare(isSetExtraList(), other.isSetExtraList()); if (lastComparison != 0) { return lastComparison; } @@ -1144,7 +1127,7 @@ public int compareTo(TimUserBean other) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExtraMap()).compareTo(other.isSetExtraMap()); + lastComparison = java.lang.Boolean.compare(isSetExtraMap(), other.isSetExtraMap()); if (lastComparison != 0) { return lastComparison; } @@ -1157,21 +1140,25 @@ public int compareTo(TimUserBean other) { return 0; } + @org.apache.thrift.annotation.Nullable + @Override public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } + @Override public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + scheme(iprot).read(iprot, this); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + scheme(oprot).write(oprot, this); } @Override - public String toString() { - StringBuilder sb = new StringBuilder("TimUserBean("); + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("TimUserBean("); boolean first = true; if (isSetTid()) { @@ -1302,7 +1289,7 @@ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOExcept } } - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; @@ -1312,14 +1299,16 @@ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException } } - private static class TimUserBeanStandardSchemeFactory implements SchemeFactory { + private static class TimUserBeanStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimUserBeanStandardScheme getScheme() { return new TimUserBeanStandardScheme(); } } - private static class TimUserBeanStandardScheme extends StandardScheme { + private static class TimUserBeanStandardScheme extends org.apache.thrift.scheme.StandardScheme { + @Override public void read(org.apache.thrift.protocol.TProtocol iprot, TimUserBean struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); @@ -1400,8 +1389,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimUserBean struct) if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list72 = iprot.readListBegin(); - struct.photoBytes = new ArrayList(_list72.size); - ByteBuffer _elem73; + struct.photoBytes = new java.util.ArrayList(_list72.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem73; for (int _i74 = 0; _i74 < _list72.size; ++_i74) { _elem73 = iprot.readBinary(); @@ -1418,8 +1407,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimUserBean struct) if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list75 = iprot.readListBegin(); - struct.extraList = new ArrayList(_list75.size); - TimNode _elem76; + struct.extraList = new java.util.ArrayList(_list75.size); + @org.apache.thrift.annotation.Nullable TimNode _elem76; for (int _i77 = 0; _i77 < _list75.size; ++_i77) { _elem76 = new TimNode(); @@ -1437,9 +1426,9 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimUserBean struct) if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map78 = iprot.readMapBegin(); - struct.extraMap = new HashMap(2*_map78.size); - String _key79; - String _val80; + struct.extraMap = new java.util.HashMap(2*_map78.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key79; + @org.apache.thrift.annotation.Nullable java.lang.String _val80; for (int _i81 = 0; _i81 < _map78.size; ++_i81) { _key79 = iprot.readString(); @@ -1464,6 +1453,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TimUserBean struct) struct.validate(); } + @Override public void write(org.apache.thrift.protocol.TProtocol oprot, TimUserBean struct) throws org.apache.thrift.TException { struct.validate(); @@ -1527,7 +1517,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimUserBean struct oprot.writeFieldBegin(PHOTO_BYTES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.photoBytes.size())); - for (ByteBuffer _iter82 : struct.photoBytes) + for (java.nio.ByteBuffer _iter82 : struct.photoBytes) { oprot.writeBinary(_iter82); } @@ -1555,7 +1545,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimUserBean struct oprot.writeFieldBegin(EXTRA_MAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.extraMap.size())); - for (Map.Entry _iter84 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter84 : struct.extraMap.entrySet()) { oprot.writeString(_iter84.getKey()); oprot.writeString(_iter84.getValue()); @@ -1571,18 +1561,19 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TimUserBean struct } - private static class TimUserBeanTupleSchemeFactory implements SchemeFactory { + private static class TimUserBeanTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + @Override public TimUserBeanTupleScheme getScheme() { return new TimUserBeanTupleScheme(); } } - private static class TimUserBeanTupleScheme extends TupleScheme { + private static class TimUserBeanTupleScheme extends org.apache.thrift.scheme.TupleScheme { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TimUserBean struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetTid()) { optionals.set(0); } @@ -1644,7 +1635,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimUserBean struct) if (struct.isSetPhotoBytes()) { { oprot.writeI32(struct.photoBytes.size()); - for (ByteBuffer _iter85 : struct.photoBytes) + for (java.nio.ByteBuffer _iter85 : struct.photoBytes) { oprot.writeBinary(_iter85); } @@ -1662,7 +1653,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimUserBean struct) if (struct.isSetExtraMap()) { { oprot.writeI32(struct.extraMap.size()); - for (Map.Entry _iter87 : struct.extraMap.entrySet()) + for (java.util.Map.Entry _iter87 : struct.extraMap.entrySet()) { oprot.writeString(_iter87.getKey()); oprot.writeString(_iter87.getValue()); @@ -1673,8 +1664,8 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TimUserBean struct) @Override public void read(org.apache.thrift.protocol.TProtocol prot, TimUserBean struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(11); + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(11); if (incoming.get(0)) { struct.tid = new Tid(); struct.tid.read(iprot); @@ -1711,9 +1702,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimUserBean struct) } if (incoming.get(8)) { { - org.apache.thrift.protocol.TList _list88 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.photoBytes = new ArrayList(_list88.size); - ByteBuffer _elem89; + org.apache.thrift.protocol.TList _list88 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING); + struct.photoBytes = new java.util.ArrayList(_list88.size); + @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem89; for (int _i90 = 0; _i90 < _list88.size; ++_i90) { _elem89 = iprot.readBinary(); @@ -1724,9 +1715,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimUserBean struct) } if (incoming.get(9)) { { - org.apache.thrift.protocol.TList _list91 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.extraList = new ArrayList(_list91.size); - TimNode _elem92; + org.apache.thrift.protocol.TList _list91 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT); + struct.extraList = new java.util.ArrayList(_list91.size); + @org.apache.thrift.annotation.Nullable TimNode _elem92; for (int _i93 = 0; _i93 < _list91.size; ++_i93) { _elem92 = new TimNode(); @@ -1738,10 +1729,10 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimUserBean struct) } if (incoming.get(10)) { { - org.apache.thrift.protocol.TMap _map94 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.extraMap = new HashMap(2*_map94.size); - String _key95; - String _val96; + org.apache.thrift.protocol.TMap _map94 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING); + struct.extraMap = new java.util.HashMap(2*_map94.size); + @org.apache.thrift.annotation.Nullable java.lang.String _key95; + @org.apache.thrift.annotation.Nullable java.lang.String _val96; for (int _i97 = 0; _i97 < _map94.size; ++_i97) { _key95 = iprot.readString(); @@ -1754,5 +1745,8 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TimUserBean struct) } } + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } } diff --git a/protocols/gen-java/com/tim/packet/timConstants.java b/protocols/gen-java/com/tim/packet/timConstants.java index cf2d5b2..bb65222 100644 --- a/protocols/gen-java/com/tim/packet/timConstants.java +++ b/protocols/gen-java/com/tim/packet/timConstants.java @@ -1,39 +1,12 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.17.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.tim.packet; -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import javax.annotation.Generated; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) +@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) public class timConstants { /** @@ -44,16 +17,16 @@ public class timConstants { /** * 外部版本号 */ - public static final String protocolversionName = "1.1.0"; + public static final java.lang.String protocolversionName = "1.1.0"; /** * 状态码:成功 */ - public static final String TIM_SC_SUCCESS = "200"; + public static final java.lang.String TIM_SC_SUCCESS = "200"; /** * 状态码:失败 */ - public static final String TIM_SC_FAILED = "400"; + public static final java.lang.String TIM_SC_FAILED = "400"; } diff --git a/protocols/gen-js/ITim.js b/protocols/gen-js/ITim.js index caaab88..7043f2b 100644 --- a/protocols/gen-js/ITim.js +++ b/protocols/gen-js/ITim.js @@ -1,8 +1,11 @@ // -// Autogenerated by Thrift Compiler (0.9.3) +// Autogenerated by Thrift Compiler (0.17.0) // // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING // +if (typeof Int64 === 'undefined' && typeof require === 'function') { + var Int64 = require('node-int64'); +} //HELPER FUNCTIONS AND STRUCTURES @@ -18,17 +21,14 @@ ITim_timStream_args = function(args) { ITim_timStream_args.prototype = {}; ITim_timStream_args.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.param = new TimParam(); @@ -66,12 +66,9 @@ ITim_timStream_result = function(args) { ITim_timStream_result.prototype = {}; ITim_timStream_result.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; - var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } @@ -94,12 +91,9 @@ ITim_timStarttls_args = function(args) { ITim_timStarttls_args.prototype = {}; ITim_timStarttls_args.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; - var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } @@ -122,12 +116,9 @@ ITim_timStarttls_result = function(args) { ITim_timStarttls_result.prototype = {}; ITim_timStarttls_result.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; - var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } @@ -160,17 +151,14 @@ ITim_timLogin_args = function(args) { ITim_timLogin_args.prototype = {}; ITim_timLogin_args.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.tid = new Tid(); @@ -217,12 +205,9 @@ ITim_timLogin_result = function(args) { ITim_timLogin_result.prototype = {}; ITim_timLogin_result.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; - var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } @@ -251,17 +236,14 @@ ITim_timAck_args = function(args) { ITim_timAck_args.prototype = {}; ITim_timAck_args.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.ab = new TimAckBean(); @@ -299,12 +281,9 @@ ITim_timAck_result = function(args) { ITim_timAck_result.prototype = {}; ITim_timAck_result.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; - var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } @@ -333,17 +312,14 @@ ITim_timPresence_args = function(args) { ITim_timPresence_args.prototype = {}; ITim_timPresence_args.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.pbean = new TimPBean(); @@ -381,12 +357,9 @@ ITim_timPresence_result = function(args) { ITim_timPresence_result.prototype = {}; ITim_timPresence_result.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; - var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } @@ -415,17 +388,14 @@ ITim_timMessage_args = function(args) { ITim_timMessage_args.prototype = {}; ITim_timMessage_args.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.mbean = new TimMBean(); @@ -463,12 +433,9 @@ ITim_timMessage_result = function(args) { ITim_timMessage_result.prototype = {}; ITim_timMessage_result.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; - var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } @@ -497,17 +464,14 @@ ITim_timPing_args = function(args) { ITim_timPing_args.prototype = {}; ITim_timPing_args.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.threadId = input.readString().value; @@ -544,12 +508,9 @@ ITim_timPing_result = function(args) { ITim_timPing_result.prototype = {}; ITim_timPing_result.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; - var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } @@ -578,17 +539,14 @@ ITim_timError_args = function(args) { ITim_timError_args.prototype = {}; ITim_timError_args.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.e = new TimError(); @@ -626,12 +584,9 @@ ITim_timError_result = function(args) { ITim_timError_result.prototype = {}; ITim_timError_result.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; - var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } @@ -654,12 +609,9 @@ ITim_timLogout_args = function(args) { ITim_timLogout_args.prototype = {}; ITim_timLogout_args.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; - var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } @@ -682,12 +634,9 @@ ITim_timLogout_result = function(args) { ITim_timLogout_result.prototype = {}; ITim_timLogout_result.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; - var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } @@ -720,17 +669,14 @@ ITim_timRegist_args = function(args) { ITim_timRegist_args.prototype = {}; ITim_timRegist_args.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.tid = new Tid(); @@ -777,12 +723,9 @@ ITim_timRegist_result = function(args) { ITim_timRegist_result.prototype = {}; ITim_timRegist_result.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; - var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } @@ -811,17 +754,14 @@ ITim_timRoser_args = function(args) { ITim_timRoser_args.prototype = {}; ITim_timRoser_args.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.roster = new TimRoster(); @@ -859,12 +799,9 @@ ITim_timRoser_result = function(args) { ITim_timRoser_result.prototype = {}; ITim_timRoser_result.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; - var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } @@ -893,17 +830,14 @@ ITim_timMessageList_args = function(args) { ITim_timMessageList_args.prototype = {}; ITim_timMessageList_args.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.mbeanList = new TimMBeanList(); @@ -941,12 +875,9 @@ ITim_timMessageList_result = function(args) { ITim_timMessageList_result.prototype = {}; ITim_timMessageList_result.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; - var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } @@ -975,17 +906,14 @@ ITim_timPresenceList_args = function(args) { ITim_timPresenceList_args.prototype = {}; ITim_timPresenceList_args.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.pbeanList = new TimPBeanList(); @@ -1023,12 +951,9 @@ ITim_timPresenceList_result = function(args) { ITim_timPresenceList_result.prototype = {}; ITim_timPresenceList_result.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; - var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } @@ -1061,17 +986,14 @@ ITim_timMessageIq_args = function(args) { ITim_timMessageIq_args.prototype = {}; ITim_timMessageIq_args.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.timMsgIq = new TimMessageIq(); @@ -1118,12 +1040,9 @@ ITim_timMessageIq_result = function(args) { ITim_timMessageIq_result.prototype = {}; ITim_timMessageIq_result.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; - var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } @@ -1152,17 +1071,14 @@ ITim_timMessageResult_args = function(args) { ITim_timMessageResult_args.prototype = {}; ITim_timMessageResult_args.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.mbean = new TimMBean(); @@ -1200,12 +1116,9 @@ ITim_timMessageResult_result = function(args) { ITim_timMessageResult_result.prototype = {}; ITim_timMessageResult_result.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; - var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } @@ -1234,17 +1147,14 @@ ITim_timProperty_args = function(args) { ITim_timProperty_args.prototype = {}; ITim_timProperty_args.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.tpb = new TimPropertyBean(); @@ -1282,12 +1192,9 @@ ITim_timProperty_result = function(args) { ITim_timProperty_result.prototype = {}; ITim_timProperty_result.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; - var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } @@ -1324,17 +1231,14 @@ ITim_timRemoteUserAuth_args = function(args) { ITim_timRemoteUserAuth_args.prototype = {}; ITim_timRemoteUserAuth_args.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.tid = new Tid(); @@ -1400,17 +1304,14 @@ ITim_timRemoteUserAuth_result = function(args) { ITim_timRemoteUserAuth_result.prototype = {}; ITim_timRemoteUserAuth_result.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new TimRemoteUserBean(); @@ -1458,17 +1359,14 @@ ITim_timRemoteUserGet_args = function(args) { ITim_timRemoteUserGet_args.prototype = {}; ITim_timRemoteUserGet_args.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.tid = new Tid(); @@ -1522,17 +1420,14 @@ ITim_timRemoteUserGet_result = function(args) { ITim_timRemoteUserGet_result.prototype = {}; ITim_timRemoteUserGet_result.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new TimRemoteUserBean(); @@ -1584,17 +1479,14 @@ ITim_timRemoteUserEdit_args = function(args) { ITim_timRemoteUserEdit_args.prototype = {}; ITim_timRemoteUserEdit_args.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.tid = new Tid(); @@ -1661,17 +1553,14 @@ ITim_timRemoteUserEdit_result = function(args) { ITim_timRemoteUserEdit_result.prototype = {}; ITim_timRemoteUserEdit_result.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new TimRemoteUserBean(); @@ -1719,17 +1608,14 @@ ITim_timResponsePresence_args = function(args) { ITim_timResponsePresence_args.prototype = {}; ITim_timResponsePresence_args.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.pbean = new TimPBean(); @@ -1783,17 +1669,14 @@ ITim_timResponsePresence_result = function(args) { ITim_timResponsePresence_result.prototype = {}; ITim_timResponsePresence_result.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new TimResponseBean(); @@ -1841,17 +1724,14 @@ ITim_timResponseMessage_args = function(args) { ITim_timResponseMessage_args.prototype = {}; ITim_timResponseMessage_args.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.mbean = new TimMBean(); @@ -1905,17 +1785,14 @@ ITim_timResponseMessage_result = function(args) { ITim_timResponseMessage_result.prototype = {}; ITim_timResponseMessage_result.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new TimResponseBean(); @@ -1967,17 +1844,14 @@ ITim_timResponseMessageIq_args = function(args) { ITim_timResponseMessageIq_args.prototype = {}; ITim_timResponseMessageIq_args.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.timMsgIq = new TimMessageIq(); @@ -2043,17 +1917,14 @@ ITim_timResponseMessageIq_result = function(args) { ITim_timResponseMessageIq_result.prototype = {}; ITim_timResponseMessageIq_result.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new TimMBeanList(); @@ -2101,17 +1972,14 @@ ITim_timResponsePresenceList_args = function(args) { ITim_timResponsePresenceList_args.prototype = {}; ITim_timResponsePresenceList_args.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.pbeanList = new TimPBeanList(); @@ -2165,17 +2033,14 @@ ITim_timResponsePresenceList_result = function(args) { ITim_timResponsePresenceList_result.prototype = {}; ITim_timResponsePresenceList_result.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new TimResponseBean(); @@ -2223,17 +2088,14 @@ ITim_timResponseMessageList_args = function(args) { ITim_timResponseMessageList_args.prototype = {}; ITim_timResponseMessageList_args.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.mbeanList = new TimMBeanList(); @@ -2287,17 +2149,14 @@ ITim_timResponseMessageList_result = function(args) { ITim_timResponseMessageList_result.prototype = {}; ITim_timResponseMessageList_result.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 0: if (ftype == Thrift.Type.STRUCT) { this.success = new TimResponseBean(); @@ -2331,412 +2190,457 @@ ITim_timResponseMessageList_result.prototype.write = function(output) { }; ITimClient = function(input, output) { - this.input = input; - this.output = (!output) ? input : output; - this.seqid = 0; + this.input = input; + this.output = (!output) ? input : output; + this.seqid = 0; }; ITimClient.prototype = {}; + ITimClient.prototype.timStream = function(param, callback) { this.send_timStream(param, callback); }; ITimClient.prototype.send_timStream = function(param, callback) { - this.output.writeMessageBegin('timStream', Thrift.MessageType.ONEWAY, this.seqid); - var args = new ITim_timStream_args(); - args.param = param; - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_timStream(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); + var params = { + param: param + }; + var args = new ITim_timStream_args(params); + try { + this.output.writeMessageBegin('timStream', Thrift.MessageType.ONEWAY, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + this.output.getTransport().flush(true, null); + callback(); + } else { + return this.output.getTransport().flush(); + } + } + catch (e) { + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); + } + throw e; } }; + ITimClient.prototype.timStarttls = function(callback) { this.send_timStarttls(callback); }; ITimClient.prototype.send_timStarttls = function(callback) { - this.output.writeMessageBegin('timStarttls', Thrift.MessageType.ONEWAY, this.seqid); var args = new ITim_timStarttls_args(); - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_timStarttls(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); + try { + this.output.writeMessageBegin('timStarttls', Thrift.MessageType.ONEWAY, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + this.output.getTransport().flush(true, null); + callback(); + } else { + return this.output.getTransport().flush(); + } + } + catch (e) { + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); + } + throw e; } }; + ITimClient.prototype.timLogin = function(tid, pwd, callback) { this.send_timLogin(tid, pwd, callback); }; ITimClient.prototype.send_timLogin = function(tid, pwd, callback) { - this.output.writeMessageBegin('timLogin', Thrift.MessageType.ONEWAY, this.seqid); - var args = new ITim_timLogin_args(); - args.tid = tid; - args.pwd = pwd; - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_timLogin(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); + var params = { + tid: tid, + pwd: pwd + }; + var args = new ITim_timLogin_args(params); + try { + this.output.writeMessageBegin('timLogin', Thrift.MessageType.ONEWAY, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + this.output.getTransport().flush(true, null); + callback(); + } else { + return this.output.getTransport().flush(); + } + } + catch (e) { + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); + } + throw e; } }; + ITimClient.prototype.timAck = function(ab, callback) { this.send_timAck(ab, callback); }; ITimClient.prototype.send_timAck = function(ab, callback) { - this.output.writeMessageBegin('timAck', Thrift.MessageType.ONEWAY, this.seqid); - var args = new ITim_timAck_args(); - args.ab = ab; - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_timAck(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); + var params = { + ab: ab + }; + var args = new ITim_timAck_args(params); + try { + this.output.writeMessageBegin('timAck', Thrift.MessageType.ONEWAY, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + this.output.getTransport().flush(true, null); + callback(); + } else { + return this.output.getTransport().flush(); + } + } + catch (e) { + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); + } + throw e; } }; + ITimClient.prototype.timPresence = function(pbean, callback) { this.send_timPresence(pbean, callback); }; ITimClient.prototype.send_timPresence = function(pbean, callback) { - this.output.writeMessageBegin('timPresence', Thrift.MessageType.ONEWAY, this.seqid); - var args = new ITim_timPresence_args(); - args.pbean = pbean; - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_timPresence(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); + var params = { + pbean: pbean + }; + var args = new ITim_timPresence_args(params); + try { + this.output.writeMessageBegin('timPresence', Thrift.MessageType.ONEWAY, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + this.output.getTransport().flush(true, null); + callback(); + } else { + return this.output.getTransport().flush(); + } + } + catch (e) { + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); + } + throw e; } }; + ITimClient.prototype.timMessage = function(mbean, callback) { this.send_timMessage(mbean, callback); }; ITimClient.prototype.send_timMessage = function(mbean, callback) { - this.output.writeMessageBegin('timMessage', Thrift.MessageType.ONEWAY, this.seqid); - var args = new ITim_timMessage_args(); - args.mbean = mbean; - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_timMessage(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); + var params = { + mbean: mbean + }; + var args = new ITim_timMessage_args(params); + try { + this.output.writeMessageBegin('timMessage', Thrift.MessageType.ONEWAY, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + this.output.getTransport().flush(true, null); + callback(); + } else { + return this.output.getTransport().flush(); + } + } + catch (e) { + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); + } + throw e; } }; + ITimClient.prototype.timPing = function(threadId, callback) { this.send_timPing(threadId, callback); }; ITimClient.prototype.send_timPing = function(threadId, callback) { - this.output.writeMessageBegin('timPing', Thrift.MessageType.ONEWAY, this.seqid); - var args = new ITim_timPing_args(); - args.threadId = threadId; - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_timPing(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); + var params = { + threadId: threadId + }; + var args = new ITim_timPing_args(params); + try { + this.output.writeMessageBegin('timPing', Thrift.MessageType.ONEWAY, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + this.output.getTransport().flush(true, null); + callback(); + } else { + return this.output.getTransport().flush(); + } + } + catch (e) { + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); + } + throw e; } }; + ITimClient.prototype.timError = function(e, callback) { this.send_timError(e, callback); }; ITimClient.prototype.send_timError = function(e, callback) { - this.output.writeMessageBegin('timError', Thrift.MessageType.ONEWAY, this.seqid); - var args = new ITim_timError_args(); - args.e = e; - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_timError(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); + var params = { + e: e + }; + var args = new ITim_timError_args(params); + try { + this.output.writeMessageBegin('timError', Thrift.MessageType.ONEWAY, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + this.output.getTransport().flush(true, null); + callback(); + } else { + return this.output.getTransport().flush(); + } + } + catch (e) { + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); + } + throw e; } }; + ITimClient.prototype.timLogout = function(callback) { this.send_timLogout(callback); }; ITimClient.prototype.send_timLogout = function(callback) { - this.output.writeMessageBegin('timLogout', Thrift.MessageType.ONEWAY, this.seqid); var args = new ITim_timLogout_args(); - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_timLogout(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); + try { + this.output.writeMessageBegin('timLogout', Thrift.MessageType.ONEWAY, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + this.output.getTransport().flush(true, null); + callback(); + } else { + return this.output.getTransport().flush(); + } + } + catch (e) { + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); + } + throw e; } }; + ITimClient.prototype.timRegist = function(tid, auth, callback) { this.send_timRegist(tid, auth, callback); }; ITimClient.prototype.send_timRegist = function(tid, auth, callback) { - this.output.writeMessageBegin('timRegist', Thrift.MessageType.ONEWAY, this.seqid); - var args = new ITim_timRegist_args(); - args.tid = tid; - args.auth = auth; - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_timRegist(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); + var params = { + tid: tid, + auth: auth + }; + var args = new ITim_timRegist_args(params); + try { + this.output.writeMessageBegin('timRegist', Thrift.MessageType.ONEWAY, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + this.output.getTransport().flush(true, null); + callback(); + } else { + return this.output.getTransport().flush(); + } + } + catch (e) { + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); + } + throw e; } }; + ITimClient.prototype.timRoser = function(roster, callback) { this.send_timRoser(roster, callback); }; ITimClient.prototype.send_timRoser = function(roster, callback) { - this.output.writeMessageBegin('timRoser', Thrift.MessageType.ONEWAY, this.seqid); - var args = new ITim_timRoser_args(); - args.roster = roster; - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_timRoser(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); + var params = { + roster: roster + }; + var args = new ITim_timRoser_args(params); + try { + this.output.writeMessageBegin('timRoser', Thrift.MessageType.ONEWAY, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + this.output.getTransport().flush(true, null); + callback(); + } else { + return this.output.getTransport().flush(); + } + } + catch (e) { + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); + } + throw e; } }; + ITimClient.prototype.timMessageList = function(mbeanList, callback) { this.send_timMessageList(mbeanList, callback); }; ITimClient.prototype.send_timMessageList = function(mbeanList, callback) { - this.output.writeMessageBegin('timMessageList', Thrift.MessageType.ONEWAY, this.seqid); - var args = new ITim_timMessageList_args(); - args.mbeanList = mbeanList; - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_timMessageList(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); + var params = { + mbeanList: mbeanList + }; + var args = new ITim_timMessageList_args(params); + try { + this.output.writeMessageBegin('timMessageList', Thrift.MessageType.ONEWAY, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + this.output.getTransport().flush(true, null); + callback(); + } else { + return this.output.getTransport().flush(); + } + } + catch (e) { + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); + } + throw e; } }; + ITimClient.prototype.timPresenceList = function(pbeanList, callback) { this.send_timPresenceList(pbeanList, callback); }; ITimClient.prototype.send_timPresenceList = function(pbeanList, callback) { - this.output.writeMessageBegin('timPresenceList', Thrift.MessageType.ONEWAY, this.seqid); - var args = new ITim_timPresenceList_args(); - args.pbeanList = pbeanList; - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_timPresenceList(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); + var params = { + pbeanList: pbeanList + }; + var args = new ITim_timPresenceList_args(params); + try { + this.output.writeMessageBegin('timPresenceList', Thrift.MessageType.ONEWAY, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + this.output.getTransport().flush(true, null); + callback(); + } else { + return this.output.getTransport().flush(); + } + } + catch (e) { + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); + } + throw e; } }; + ITimClient.prototype.timMessageIq = function(timMsgIq, iqType, callback) { this.send_timMessageIq(timMsgIq, iqType, callback); }; ITimClient.prototype.send_timMessageIq = function(timMsgIq, iqType, callback) { - this.output.writeMessageBegin('timMessageIq', Thrift.MessageType.ONEWAY, this.seqid); - var args = new ITim_timMessageIq_args(); - args.timMsgIq = timMsgIq; - args.iqType = iqType; - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_timMessageIq(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); + var params = { + timMsgIq: timMsgIq, + iqType: iqType + }; + var args = new ITim_timMessageIq_args(params); + try { + this.output.writeMessageBegin('timMessageIq', Thrift.MessageType.ONEWAY, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + this.output.getTransport().flush(true, null); + callback(); + } else { + return this.output.getTransport().flush(); + } + } + catch (e) { + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); + } + throw e; } }; + ITimClient.prototype.timMessageResult = function(mbean, callback) { this.send_timMessageResult(mbean, callback); }; ITimClient.prototype.send_timMessageResult = function(mbean, callback) { - this.output.writeMessageBegin('timMessageResult', Thrift.MessageType.ONEWAY, this.seqid); - var args = new ITim_timMessageResult_args(); - args.mbean = mbean; - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_timMessageResult(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); + var params = { + mbean: mbean + }; + var args = new ITim_timMessageResult_args(params); + try { + this.output.writeMessageBegin('timMessageResult', Thrift.MessageType.ONEWAY, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + this.output.getTransport().flush(true, null); + callback(); + } else { + return this.output.getTransport().flush(); + } + } + catch (e) { + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); + } + throw e; } }; + ITimClient.prototype.timProperty = function(tpb, callback) { this.send_timProperty(tpb, callback); }; ITimClient.prototype.send_timProperty = function(tpb, callback) { - this.output.writeMessageBegin('timProperty', Thrift.MessageType.ONEWAY, this.seqid); - var args = new ITim_timProperty_args(); - args.tpb = tpb; - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_timProperty(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); + var params = { + tpb: tpb + }; + var args = new ITim_timProperty_args(params); + try { + this.output.writeMessageBegin('timProperty', Thrift.MessageType.ONEWAY, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + this.output.getTransport().flush(true, null); + callback(); + } else { + return this.output.getTransport().flush(); + } + } + catch (e) { + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); + } + throw e; } }; + ITimClient.prototype.timRemoteUserAuth = function(tid, pwd, auth, callback) { this.send_timRemoteUserAuth(tid, pwd, auth, callback); if (!callback) { @@ -2745,34 +2649,42 @@ ITimClient.prototype.timRemoteUserAuth = function(tid, pwd, auth, callback) { }; ITimClient.prototype.send_timRemoteUserAuth = function(tid, pwd, auth, callback) { - this.output.writeMessageBegin('timRemoteUserAuth', Thrift.MessageType.CALL, this.seqid); - var args = new ITim_timRemoteUserAuth_args(); - args.tid = tid; - args.pwd = pwd; - args.auth = auth; - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_timRemoteUserAuth(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); + var params = { + tid: tid, + pwd: pwd, + auth: auth + }; + var args = new ITim_timRemoteUserAuth_args(params); + try { + this.output.writeMessageBegin('timRemoteUserAuth', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_timRemoteUserAuth(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } + } + catch (e) { + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); + } + throw e; } }; ITimClient.prototype.recv_timRemoteUserAuth = function() { var ret = this.input.readMessageBegin(); - var fname = ret.fname; var mtype = ret.mtype; - var rseqid = ret.rseqid; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(this.input); @@ -2788,6 +2700,7 @@ ITimClient.prototype.recv_timRemoteUserAuth = function() { } throw 'timRemoteUserAuth failed: unknown result'; }; + ITimClient.prototype.timRemoteUserGet = function(tid, auth, callback) { this.send_timRemoteUserGet(tid, auth, callback); if (!callback) { @@ -2796,33 +2709,41 @@ ITimClient.prototype.timRemoteUserGet = function(tid, auth, callback) { }; ITimClient.prototype.send_timRemoteUserGet = function(tid, auth, callback) { - this.output.writeMessageBegin('timRemoteUserGet', Thrift.MessageType.CALL, this.seqid); - var args = new ITim_timRemoteUserGet_args(); - args.tid = tid; - args.auth = auth; - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_timRemoteUserGet(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); + var params = { + tid: tid, + auth: auth + }; + var args = new ITim_timRemoteUserGet_args(params); + try { + this.output.writeMessageBegin('timRemoteUserGet', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_timRemoteUserGet(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } + } + catch (e) { + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); + } + throw e; } }; ITimClient.prototype.recv_timRemoteUserGet = function() { var ret = this.input.readMessageBegin(); - var fname = ret.fname; var mtype = ret.mtype; - var rseqid = ret.rseqid; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(this.input); @@ -2838,6 +2759,7 @@ ITimClient.prototype.recv_timRemoteUserGet = function() { } throw 'timRemoteUserGet failed: unknown result'; }; + ITimClient.prototype.timRemoteUserEdit = function(tid, ub, auth, callback) { this.send_timRemoteUserEdit(tid, ub, auth, callback); if (!callback) { @@ -2846,34 +2768,42 @@ ITimClient.prototype.timRemoteUserEdit = function(tid, ub, auth, callback) { }; ITimClient.prototype.send_timRemoteUserEdit = function(tid, ub, auth, callback) { - this.output.writeMessageBegin('timRemoteUserEdit', Thrift.MessageType.CALL, this.seqid); - var args = new ITim_timRemoteUserEdit_args(); - args.tid = tid; - args.ub = ub; - args.auth = auth; - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_timRemoteUserEdit(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); + var params = { + tid: tid, + ub: ub, + auth: auth + }; + var args = new ITim_timRemoteUserEdit_args(params); + try { + this.output.writeMessageBegin('timRemoteUserEdit', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_timRemoteUserEdit(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } + } + catch (e) { + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); + } + throw e; } }; ITimClient.prototype.recv_timRemoteUserEdit = function() { var ret = this.input.readMessageBegin(); - var fname = ret.fname; var mtype = ret.mtype; - var rseqid = ret.rseqid; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(this.input); @@ -2889,6 +2819,7 @@ ITimClient.prototype.recv_timRemoteUserEdit = function() { } throw 'timRemoteUserEdit failed: unknown result'; }; + ITimClient.prototype.timResponsePresence = function(pbean, auth, callback) { this.send_timResponsePresence(pbean, auth, callback); if (!callback) { @@ -2897,33 +2828,41 @@ ITimClient.prototype.timResponsePresence = function(pbean, auth, callback) { }; ITimClient.prototype.send_timResponsePresence = function(pbean, auth, callback) { - this.output.writeMessageBegin('timResponsePresence', Thrift.MessageType.CALL, this.seqid); - var args = new ITim_timResponsePresence_args(); - args.pbean = pbean; - args.auth = auth; - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_timResponsePresence(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); + var params = { + pbean: pbean, + auth: auth + }; + var args = new ITim_timResponsePresence_args(params); + try { + this.output.writeMessageBegin('timResponsePresence', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_timResponsePresence(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } + } + catch (e) { + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); + } + throw e; } }; ITimClient.prototype.recv_timResponsePresence = function() { var ret = this.input.readMessageBegin(); - var fname = ret.fname; var mtype = ret.mtype; - var rseqid = ret.rseqid; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(this.input); @@ -2939,6 +2878,7 @@ ITimClient.prototype.recv_timResponsePresence = function() { } throw 'timResponsePresence failed: unknown result'; }; + ITimClient.prototype.timResponseMessage = function(mbean, auth, callback) { this.send_timResponseMessage(mbean, auth, callback); if (!callback) { @@ -2947,33 +2887,41 @@ ITimClient.prototype.timResponseMessage = function(mbean, auth, callback) { }; ITimClient.prototype.send_timResponseMessage = function(mbean, auth, callback) { - this.output.writeMessageBegin('timResponseMessage', Thrift.MessageType.CALL, this.seqid); - var args = new ITim_timResponseMessage_args(); - args.mbean = mbean; - args.auth = auth; - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_timResponseMessage(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); + var params = { + mbean: mbean, + auth: auth + }; + var args = new ITim_timResponseMessage_args(params); + try { + this.output.writeMessageBegin('timResponseMessage', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_timResponseMessage(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } + } + catch (e) { + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); + } + throw e; } }; ITimClient.prototype.recv_timResponseMessage = function() { var ret = this.input.readMessageBegin(); - var fname = ret.fname; var mtype = ret.mtype; - var rseqid = ret.rseqid; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(this.input); @@ -2989,6 +2937,7 @@ ITimClient.prototype.recv_timResponseMessage = function() { } throw 'timResponseMessage failed: unknown result'; }; + ITimClient.prototype.timResponseMessageIq = function(timMsgIq, iqType, auth, callback) { this.send_timResponseMessageIq(timMsgIq, iqType, auth, callback); if (!callback) { @@ -2997,34 +2946,42 @@ ITimClient.prototype.timResponseMessageIq = function(timMsgIq, iqType, auth, cal }; ITimClient.prototype.send_timResponseMessageIq = function(timMsgIq, iqType, auth, callback) { - this.output.writeMessageBegin('timResponseMessageIq', Thrift.MessageType.CALL, this.seqid); - var args = new ITim_timResponseMessageIq_args(); - args.timMsgIq = timMsgIq; - args.iqType = iqType; - args.auth = auth; - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_timResponseMessageIq(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); + var params = { + timMsgIq: timMsgIq, + iqType: iqType, + auth: auth + }; + var args = new ITim_timResponseMessageIq_args(params); + try { + this.output.writeMessageBegin('timResponseMessageIq', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_timResponseMessageIq(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } + } + catch (e) { + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); + } + throw e; } }; ITimClient.prototype.recv_timResponseMessageIq = function() { var ret = this.input.readMessageBegin(); - var fname = ret.fname; var mtype = ret.mtype; - var rseqid = ret.rseqid; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(this.input); @@ -3040,6 +2997,7 @@ ITimClient.prototype.recv_timResponseMessageIq = function() { } throw 'timResponseMessageIq failed: unknown result'; }; + ITimClient.prototype.timResponsePresenceList = function(pbeanList, auth, callback) { this.send_timResponsePresenceList(pbeanList, auth, callback); if (!callback) { @@ -3048,33 +3006,41 @@ ITimClient.prototype.timResponsePresenceList = function(pbeanList, auth, callbac }; ITimClient.prototype.send_timResponsePresenceList = function(pbeanList, auth, callback) { - this.output.writeMessageBegin('timResponsePresenceList', Thrift.MessageType.CALL, this.seqid); - var args = new ITim_timResponsePresenceList_args(); - args.pbeanList = pbeanList; - args.auth = auth; - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_timResponsePresenceList(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); + var params = { + pbeanList: pbeanList, + auth: auth + }; + var args = new ITim_timResponsePresenceList_args(params); + try { + this.output.writeMessageBegin('timResponsePresenceList', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_timResponsePresenceList(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } + } + catch (e) { + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); + } + throw e; } }; ITimClient.prototype.recv_timResponsePresenceList = function() { var ret = this.input.readMessageBegin(); - var fname = ret.fname; var mtype = ret.mtype; - var rseqid = ret.rseqid; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(this.input); @@ -3090,6 +3056,7 @@ ITimClient.prototype.recv_timResponsePresenceList = function() { } throw 'timResponsePresenceList failed: unknown result'; }; + ITimClient.prototype.timResponseMessageList = function(mbeanList, auth, callback) { this.send_timResponseMessageList(mbeanList, auth, callback); if (!callback) { @@ -3098,33 +3065,41 @@ ITimClient.prototype.timResponseMessageList = function(mbeanList, auth, callback }; ITimClient.prototype.send_timResponseMessageList = function(mbeanList, auth, callback) { - this.output.writeMessageBegin('timResponseMessageList', Thrift.MessageType.CALL, this.seqid); - var args = new ITim_timResponseMessageList_args(); - args.mbeanList = mbeanList; - args.auth = auth; - args.write(this.output); - this.output.writeMessageEnd(); - if (callback) { - var self = this; - this.output.getTransport().flush(true, function() { - var result = null; - try { - result = self.recv_timResponseMessageList(); - } catch (e) { - result = e; - } - callback(result); - }); - } else { - return this.output.getTransport().flush(); + var params = { + mbeanList: mbeanList, + auth: auth + }; + var args = new ITim_timResponseMessageList_args(params); + try { + this.output.writeMessageBegin('timResponseMessageList', Thrift.MessageType.CALL, this.seqid); + args.write(this.output); + this.output.writeMessageEnd(); + if (callback) { + var self = this; + this.output.getTransport().flush(true, function() { + var result = null; + try { + result = self.recv_timResponseMessageList(); + } catch (e) { + result = e; + } + callback(result); + }); + } else { + return this.output.getTransport().flush(); + } + } + catch (e) { + if (typeof this.output.getTransport().reset === 'function') { + this.output.getTransport().reset(); + } + throw e; } }; ITimClient.prototype.recv_timResponseMessageList = function() { var ret = this.input.readMessageBegin(); - var fname = ret.fname; var mtype = ret.mtype; - var rseqid = ret.rseqid; if (mtype == Thrift.MessageType.EXCEPTION) { var x = new Thrift.TApplicationException(); x.read(this.input); diff --git a/protocols/gen-js/tim_types.js b/protocols/gen-js/tim_types.js index 543252d..6ebab01 100644 --- a/protocols/gen-js/tim_types.js +++ b/protocols/gen-js/tim_types.js @@ -1,8 +1,11 @@ // -// Autogenerated by Thrift Compiler (0.9.3) +// Autogenerated by Thrift Compiler (0.17.0) // // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING // +if (typeof Int64 === 'undefined' && typeof require === 'function') { + var Int64 = require('node-int64'); +} TimError = function(args) { @@ -20,17 +23,14 @@ TimError = function(args) { TimError.prototype = {}; TimError.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.errCode = input.readI32().value; @@ -86,17 +86,14 @@ TimNode = function(args) { TimNode.prototype = {}; TimNode.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.key = input.readString().value; @@ -168,17 +165,14 @@ TimAckBean = function(args) { TimAckBean.prototype = {}; TimAckBean.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.id = input.readString().value; @@ -202,19 +196,14 @@ TimAckBean.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.LIST) { - var _size0 = 0; - var _rtmp34; this.extraList = []; - var _etype3 = 0; - _rtmp34 = input.readListBegin(); - _etype3 = _rtmp34.etype; - _size0 = _rtmp34.size; - for (var _i5 = 0; _i5 < _size0; ++_i5) - { - var elem6 = null; - elem6 = new TimNode(); - elem6.read(input); - this.extraList.push(elem6); + var _rtmp31 = input.readListBegin(); + var _size0 = _rtmp31.size || 0; + for (var _i2 = 0; _i2 < _size0; ++_i2) { + var elem3 = null; + elem3 = new TimNode(); + elem3.read(input); + this.extraList.push(elem3); } input.readListEnd(); } else { @@ -231,27 +220,20 @@ TimAckBean.prototype.read = function(input) { break; case 6: if (ftype == Thrift.Type.MAP) { - var _size7 = 0; - var _rtmp311; this.extraMap = {}; - var _ktype8 = 0; - var _vtype9 = 0; - _rtmp311 = input.readMapBegin(); - _ktype8 = _rtmp311.ktype; - _vtype9 = _rtmp311.vtype; - _size7 = _rtmp311.size; - for (var _i12 = 0; _i12 < _size7; ++_i12) - { - if (_i12 > 0 ) { + var _rtmp35 = input.readMapBegin(); + var _size4 = _rtmp35.size || 0; + for (var _i6 = 0; _i6 < _size4; ++_i6) { + if (_i6 > 0 ) { if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { input.rstack.pop(); } } - var key13 = null; - var val14 = null; - key13 = input.readString().value; - val14 = input.readString().value; - this.extraMap[key13] = val14; + var key7 = null; + var val8 = null; + key7 = input.readString().value; + val8 = input.readString().value; + this.extraMap[key7] = val8; } input.readMapEnd(); } else { @@ -287,12 +269,10 @@ TimAckBean.prototype.write = function(output) { if (this.extraList !== null && this.extraList !== undefined) { output.writeFieldBegin('extraList', Thrift.Type.LIST, 4); output.writeListBegin(Thrift.Type.STRUCT, this.extraList.length); - for (var iter15 in this.extraList) - { - if (this.extraList.hasOwnProperty(iter15)) - { - iter15 = this.extraList[iter15]; - iter15.write(output); + for (var iter9 in this.extraList) { + if (this.extraList.hasOwnProperty(iter9)) { + iter9 = this.extraList[iter9]; + iter9.write(output); } } output.writeListEnd(); @@ -306,13 +286,11 @@ TimAckBean.prototype.write = function(output) { if (this.extraMap !== null && this.extraMap !== undefined) { output.writeFieldBegin('extraMap', Thrift.Type.MAP, 6); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.extraMap)); - for (var kiter16 in this.extraMap) - { - if (this.extraMap.hasOwnProperty(kiter16)) - { - var viter17 = this.extraMap[kiter16]; - output.writeString(kiter16); - output.writeString(viter17); + for (var kiter10 in this.extraMap) { + if (this.extraMap.hasOwnProperty(kiter10)) { + var viter11 = this.extraMap[kiter10]; + output.writeString(kiter10); + output.writeString(viter11); } } output.writeMapEnd(); @@ -346,17 +324,14 @@ TimHBean = function(args) { TimHBean.prototype = {}; TimHBean.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.I32) { this.chl = input.readI32().value; @@ -444,17 +419,14 @@ TimParam = function(args) { TimParam.prototype = {}; TimParam.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.timestamp = input.readString().value; @@ -478,19 +450,14 @@ TimParam.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.LIST) { - var _size18 = 0; - var _rtmp322; this.extraList = []; - var _etype21 = 0; - _rtmp322 = input.readListBegin(); - _etype21 = _rtmp322.etype; - _size18 = _rtmp322.size; - for (var _i23 = 0; _i23 < _size18; ++_i23) - { - var elem24 = null; - elem24 = new TimNode(); - elem24.read(input); - this.extraList.push(elem24); + var _rtmp313 = input.readListBegin(); + var _size12 = _rtmp313.size || 0; + for (var _i14 = 0; _i14 < _size12; ++_i14) { + var elem15 = null; + elem15 = new TimNode(); + elem15.read(input); + this.extraList.push(elem15); } input.readListEnd(); } else { @@ -499,27 +466,20 @@ TimParam.prototype.read = function(input) { break; case 5: if (ftype == Thrift.Type.MAP) { - var _size25 = 0; - var _rtmp329; this.extraMap = {}; - var _ktype26 = 0; - var _vtype27 = 0; - _rtmp329 = input.readMapBegin(); - _ktype26 = _rtmp329.ktype; - _vtype27 = _rtmp329.vtype; - _size25 = _rtmp329.size; - for (var _i30 = 0; _i30 < _size25; ++_i30) - { - if (_i30 > 0 ) { + var _rtmp317 = input.readMapBegin(); + var _size16 = _rtmp317.size || 0; + for (var _i18 = 0; _i18 < _size16; ++_i18) { + if (_i18 > 0 ) { if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { input.rstack.pop(); } } - var key31 = null; - var val32 = null; - key31 = input.readString().value; - val32 = input.readString().value; - this.extraMap[key31] = val32; + var key19 = null; + var val20 = null; + key19 = input.readString().value; + val20 = input.readString().value; + this.extraMap[key19] = val20; } input.readMapEnd(); } else { @@ -569,12 +529,10 @@ TimParam.prototype.write = function(output) { if (this.extraList !== null && this.extraList !== undefined) { output.writeFieldBegin('extraList', Thrift.Type.LIST, 4); output.writeListBegin(Thrift.Type.STRUCT, this.extraList.length); - for (var iter33 in this.extraList) - { - if (this.extraList.hasOwnProperty(iter33)) - { - iter33 = this.extraList[iter33]; - iter33.write(output); + for (var iter21 in this.extraList) { + if (this.extraList.hasOwnProperty(iter21)) { + iter21 = this.extraList[iter21]; + iter21.write(output); } } output.writeListEnd(); @@ -583,13 +541,11 @@ TimParam.prototype.write = function(output) { if (this.extraMap !== null && this.extraMap !== undefined) { output.writeFieldBegin('extraMap', Thrift.Type.MAP, 5); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.extraMap)); - for (var kiter34 in this.extraMap) - { - if (this.extraMap.hasOwnProperty(kiter34)) - { - var viter35 = this.extraMap[kiter34]; - output.writeString(kiter34); - output.writeString(viter35); + for (var kiter22 in this.extraMap) { + if (this.extraMap.hasOwnProperty(kiter22)) { + var viter23 = this.extraMap[kiter22]; + output.writeString(kiter22); + output.writeString(viter23); } } output.writeMapEnd(); @@ -625,17 +581,14 @@ TimTime = function(args) { TimTime.prototype = {}; TimTime.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.timestamp = input.readString().value; @@ -703,17 +656,14 @@ TimArea = function(args) { TimArea.prototype = {}; TimArea.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.country = input.readString().value; @@ -737,19 +687,14 @@ TimArea.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.LIST) { - var _size36 = 0; - var _rtmp340; this.extraList = []; - var _etype39 = 0; - _rtmp340 = input.readListBegin(); - _etype39 = _rtmp340.etype; - _size36 = _rtmp340.size; - for (var _i41 = 0; _i41 < _size36; ++_i41) - { - var elem42 = null; - elem42 = new TimNode(); - elem42.read(input); - this.extraList.push(elem42); + var _rtmp325 = input.readListBegin(); + var _size24 = _rtmp325.size || 0; + for (var _i26 = 0; _i26 < _size24; ++_i26) { + var elem27 = null; + elem27 = new TimNode(); + elem27.read(input); + this.extraList.push(elem27); } input.readListEnd(); } else { @@ -758,27 +703,20 @@ TimArea.prototype.read = function(input) { break; case 5: if (ftype == Thrift.Type.MAP) { - var _size43 = 0; - var _rtmp347; this.extraMap = {}; - var _ktype44 = 0; - var _vtype45 = 0; - _rtmp347 = input.readMapBegin(); - _ktype44 = _rtmp347.ktype; - _vtype45 = _rtmp347.vtype; - _size43 = _rtmp347.size; - for (var _i48 = 0; _i48 < _size43; ++_i48) - { - if (_i48 > 0 ) { + var _rtmp329 = input.readMapBegin(); + var _size28 = _rtmp329.size || 0; + for (var _i30 = 0; _i30 < _size28; ++_i30) { + if (_i30 > 0 ) { if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { input.rstack.pop(); } } - var key49 = null; - var val50 = null; - key49 = input.readString().value; - val50 = input.readString().value; - this.extraMap[key49] = val50; + var key31 = null; + var val32 = null; + key31 = input.readString().value; + val32 = input.readString().value; + this.extraMap[key31] = val32; } input.readMapEnd(); } else { @@ -814,12 +752,10 @@ TimArea.prototype.write = function(output) { if (this.extraList !== null && this.extraList !== undefined) { output.writeFieldBegin('extraList', Thrift.Type.LIST, 4); output.writeListBegin(Thrift.Type.STRUCT, this.extraList.length); - for (var iter51 in this.extraList) - { - if (this.extraList.hasOwnProperty(iter51)) - { - iter51 = this.extraList[iter51]; - iter51.write(output); + for (var iter33 in this.extraList) { + if (this.extraList.hasOwnProperty(iter33)) { + iter33 = this.extraList[iter33]; + iter33.write(output); } } output.writeListEnd(); @@ -828,13 +764,11 @@ TimArea.prototype.write = function(output) { if (this.extraMap !== null && this.extraMap !== undefined) { output.writeFieldBegin('extraMap', Thrift.Type.MAP, 5); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.extraMap)); - for (var kiter52 in this.extraMap) - { - if (this.extraMap.hasOwnProperty(kiter52)) - { - var viter53 = this.extraMap[kiter52]; - output.writeString(kiter52); - output.writeString(viter53); + for (var kiter34 in this.extraMap) { + if (this.extraMap.hasOwnProperty(kiter34)) { + var viter35 = this.extraMap[kiter34]; + output.writeString(kiter34); + output.writeString(viter35); } } output.writeMapEnd(); @@ -878,17 +812,14 @@ Tid = function(args) { Tid.prototype = {}; Tid.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.name = input.readString().value; @@ -919,19 +850,14 @@ Tid.prototype.read = function(input) { break; case 5: if (ftype == Thrift.Type.LIST) { - var _size54 = 0; - var _rtmp358; this.extraList = []; - var _etype57 = 0; - _rtmp358 = input.readListBegin(); - _etype57 = _rtmp358.etype; - _size54 = _rtmp358.size; - for (var _i59 = 0; _i59 < _size54; ++_i59) - { - var elem60 = null; - elem60 = new TimNode(); - elem60.read(input); - this.extraList.push(elem60); + var _rtmp337 = input.readListBegin(); + var _size36 = _rtmp337.size || 0; + for (var _i38 = 0; _i38 < _size36; ++_i38) { + var elem39 = null; + elem39 = new TimNode(); + elem39.read(input); + this.extraList.push(elem39); } input.readListEnd(); } else { @@ -940,27 +866,20 @@ Tid.prototype.read = function(input) { break; case 6: if (ftype == Thrift.Type.MAP) { - var _size61 = 0; - var _rtmp365; this.extraMap = {}; - var _ktype62 = 0; - var _vtype63 = 0; - _rtmp365 = input.readMapBegin(); - _ktype62 = _rtmp365.ktype; - _vtype63 = _rtmp365.vtype; - _size61 = _rtmp365.size; - for (var _i66 = 0; _i66 < _size61; ++_i66) - { - if (_i66 > 0 ) { + var _rtmp341 = input.readMapBegin(); + var _size40 = _rtmp341.size || 0; + for (var _i42 = 0; _i42 < _size40; ++_i42) { + if (_i42 > 0 ) { if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { input.rstack.pop(); } } - var key67 = null; - var val68 = null; - key67 = input.readString().value; - val68 = input.readString().value; - this.extraMap[key67] = val68; + var key43 = null; + var val44 = null; + key43 = input.readString().value; + val44 = input.readString().value; + this.extraMap[key43] = val44; } input.readMapEnd(); } else { @@ -1001,12 +920,10 @@ Tid.prototype.write = function(output) { if (this.extraList !== null && this.extraList !== undefined) { output.writeFieldBegin('extraList', Thrift.Type.LIST, 5); output.writeListBegin(Thrift.Type.STRUCT, this.extraList.length); - for (var iter69 in this.extraList) - { - if (this.extraList.hasOwnProperty(iter69)) - { - iter69 = this.extraList[iter69]; - iter69.write(output); + for (var iter45 in this.extraList) { + if (this.extraList.hasOwnProperty(iter45)) { + iter45 = this.extraList[iter45]; + iter45.write(output); } } output.writeListEnd(); @@ -1015,13 +932,11 @@ Tid.prototype.write = function(output) { if (this.extraMap !== null && this.extraMap !== undefined) { output.writeFieldBegin('extraMap', Thrift.Type.MAP, 6); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.extraMap)); - for (var kiter70 in this.extraMap) - { - if (this.extraMap.hasOwnProperty(kiter70)) - { - var viter71 = this.extraMap[kiter70]; - output.writeString(kiter70); - output.writeString(viter71); + for (var kiter46 in this.extraMap) { + if (this.extraMap.hasOwnProperty(kiter46)) { + var viter47 = this.extraMap[kiter46]; + output.writeString(kiter46); + output.writeString(viter47); } } output.writeMapEnd(); @@ -1083,17 +998,14 @@ TimUserBean = function(args) { TimUserBean.prototype = {}; TimUserBean.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.tid = new Tid(); @@ -1154,18 +1066,13 @@ TimUserBean.prototype.read = function(input) { break; case 9: if (ftype == Thrift.Type.LIST) { - var _size72 = 0; - var _rtmp376; this.photoBytes = []; - var _etype75 = 0; - _rtmp376 = input.readListBegin(); - _etype75 = _rtmp376.etype; - _size72 = _rtmp376.size; - for (var _i77 = 0; _i77 < _size72; ++_i77) - { - var elem78 = null; - elem78 = input.readBinary().value; - this.photoBytes.push(elem78); + var _rtmp349 = input.readListBegin(); + var _size48 = _rtmp349.size || 0; + for (var _i50 = 0; _i50 < _size48; ++_i50) { + var elem51 = null; + elem51 = input.readBinary().value; + this.photoBytes.push(elem51); } input.readListEnd(); } else { @@ -1174,19 +1081,14 @@ TimUserBean.prototype.read = function(input) { break; case 10: if (ftype == Thrift.Type.LIST) { - var _size79 = 0; - var _rtmp383; this.extraList = []; - var _etype82 = 0; - _rtmp383 = input.readListBegin(); - _etype82 = _rtmp383.etype; - _size79 = _rtmp383.size; - for (var _i84 = 0; _i84 < _size79; ++_i84) - { - var elem85 = null; - elem85 = new TimNode(); - elem85.read(input); - this.extraList.push(elem85); + var _rtmp353 = input.readListBegin(); + var _size52 = _rtmp353.size || 0; + for (var _i54 = 0; _i54 < _size52; ++_i54) { + var elem55 = null; + elem55 = new TimNode(); + elem55.read(input); + this.extraList.push(elem55); } input.readListEnd(); } else { @@ -1195,27 +1097,20 @@ TimUserBean.prototype.read = function(input) { break; case 11: if (ftype == Thrift.Type.MAP) { - var _size86 = 0; - var _rtmp390; this.extraMap = {}; - var _ktype87 = 0; - var _vtype88 = 0; - _rtmp390 = input.readMapBegin(); - _ktype87 = _rtmp390.ktype; - _vtype88 = _rtmp390.vtype; - _size86 = _rtmp390.size; - for (var _i91 = 0; _i91 < _size86; ++_i91) - { - if (_i91 > 0 ) { + var _rtmp357 = input.readMapBegin(); + var _size56 = _rtmp357.size || 0; + for (var _i58 = 0; _i58 < _size56; ++_i58) { + if (_i58 > 0 ) { if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { input.rstack.pop(); } } - var key92 = null; - var val93 = null; - key92 = input.readString().value; - val93 = input.readString().value; - this.extraMap[key92] = val93; + var key59 = null; + var val60 = null; + key59 = input.readString().value; + val60 = input.readString().value; + this.extraMap[key59] = val60; } input.readMapEnd(); } else { @@ -1276,12 +1171,10 @@ TimUserBean.prototype.write = function(output) { if (this.photoBytes !== null && this.photoBytes !== undefined) { output.writeFieldBegin('photoBytes', Thrift.Type.LIST, 9); output.writeListBegin(Thrift.Type.STRING, this.photoBytes.length); - for (var iter94 in this.photoBytes) - { - if (this.photoBytes.hasOwnProperty(iter94)) - { - iter94 = this.photoBytes[iter94]; - output.writeBinary(iter94); + for (var iter61 in this.photoBytes) { + if (this.photoBytes.hasOwnProperty(iter61)) { + iter61 = this.photoBytes[iter61]; + output.writeBinary(iter61); } } output.writeListEnd(); @@ -1290,12 +1183,10 @@ TimUserBean.prototype.write = function(output) { if (this.extraList !== null && this.extraList !== undefined) { output.writeFieldBegin('extraList', Thrift.Type.LIST, 10); output.writeListBegin(Thrift.Type.STRUCT, this.extraList.length); - for (var iter95 in this.extraList) - { - if (this.extraList.hasOwnProperty(iter95)) - { - iter95 = this.extraList[iter95]; - iter95.write(output); + for (var iter62 in this.extraList) { + if (this.extraList.hasOwnProperty(iter62)) { + iter62 = this.extraList[iter62]; + iter62.write(output); } } output.writeListEnd(); @@ -1304,13 +1195,11 @@ TimUserBean.prototype.write = function(output) { if (this.extraMap !== null && this.extraMap !== undefined) { output.writeFieldBegin('extraMap', Thrift.Type.MAP, 11); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.extraMap)); - for (var kiter96 in this.extraMap) - { - if (this.extraMap.hasOwnProperty(kiter96)) - { - var viter97 = this.extraMap[kiter96]; - output.writeString(kiter96); - output.writeString(viter97); + for (var kiter63 in this.extraMap) { + if (this.extraMap.hasOwnProperty(kiter63)) { + var viter64 = this.extraMap[kiter63]; + output.writeString(kiter63); + output.writeString(viter64); } } output.writeMapEnd(); @@ -1368,17 +1257,14 @@ TimRoom = function(args) { TimRoom.prototype = {}; TimRoom.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.tid = new Tid(); @@ -1397,19 +1283,14 @@ TimRoom.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.LIST) { - var _size98 = 0; - var _rtmp3102; this.HostsTid = []; - var _etype101 = 0; - _rtmp3102 = input.readListBegin(); - _etype101 = _rtmp3102.etype; - _size98 = _rtmp3102.size; - for (var _i103 = 0; _i103 < _size98; ++_i103) - { - var elem104 = null; - elem104 = new Tid(); - elem104.read(input); - this.HostsTid.push(elem104); + var _rtmp366 = input.readListBegin(); + var _size65 = _rtmp366.size || 0; + for (var _i67 = 0; _i67 < _size65; ++_i67) { + var elem68 = null; + elem68 = new Tid(); + elem68.read(input); + this.HostsTid.push(elem68); } input.readListEnd(); } else { @@ -1418,19 +1299,14 @@ TimRoom.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.LIST) { - var _size105 = 0; - var _rtmp3109; this.membersTid = []; - var _etype108 = 0; - _rtmp3109 = input.readListBegin(); - _etype108 = _rtmp3109.etype; - _size105 = _rtmp3109.size; - for (var _i110 = 0; _i110 < _size105; ++_i110) - { - var elem111 = null; - elem111 = new Tid(); - elem111.read(input); - this.membersTid.push(elem111); + var _rtmp370 = input.readListBegin(); + var _size69 = _rtmp370.size || 0; + for (var _i71 = 0; _i71 < _size69; ++_i71) { + var elem72 = null; + elem72 = new Tid(); + elem72.read(input); + this.membersTid.push(elem72); } input.readListEnd(); } else { @@ -1468,19 +1344,14 @@ TimRoom.prototype.read = function(input) { break; case 9: if (ftype == Thrift.Type.LIST) { - var _size112 = 0; - var _rtmp3116; this.extraList = []; - var _etype115 = 0; - _rtmp3116 = input.readListBegin(); - _etype115 = _rtmp3116.etype; - _size112 = _rtmp3116.size; - for (var _i117 = 0; _i117 < _size112; ++_i117) - { - var elem118 = null; - elem118 = new TimNode(); - elem118.read(input); - this.extraList.push(elem118); + var _rtmp374 = input.readListBegin(); + var _size73 = _rtmp374.size || 0; + for (var _i75 = 0; _i75 < _size73; ++_i75) { + var elem76 = null; + elem76 = new TimNode(); + elem76.read(input); + this.extraList.push(elem76); } input.readListEnd(); } else { @@ -1489,27 +1360,20 @@ TimRoom.prototype.read = function(input) { break; case 10: if (ftype == Thrift.Type.MAP) { - var _size119 = 0; - var _rtmp3123; this.extraMap = {}; - var _ktype120 = 0; - var _vtype121 = 0; - _rtmp3123 = input.readMapBegin(); - _ktype120 = _rtmp3123.ktype; - _vtype121 = _rtmp3123.vtype; - _size119 = _rtmp3123.size; - for (var _i124 = 0; _i124 < _size119; ++_i124) - { - if (_i124 > 0 ) { + var _rtmp378 = input.readMapBegin(); + var _size77 = _rtmp378.size || 0; + for (var _i79 = 0; _i79 < _size77; ++_i79) { + if (_i79 > 0 ) { if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { input.rstack.pop(); } } - var key125 = null; - var val126 = null; - key125 = input.readString().value; - val126 = input.readString().value; - this.extraMap[key125] = val126; + var key80 = null; + var val81 = null; + key80 = input.readString().value; + val81 = input.readString().value; + this.extraMap[key80] = val81; } input.readMapEnd(); } else { @@ -1540,12 +1404,10 @@ TimRoom.prototype.write = function(output) { if (this.HostsTid !== null && this.HostsTid !== undefined) { output.writeFieldBegin('HostsTid', Thrift.Type.LIST, 3); output.writeListBegin(Thrift.Type.STRUCT, this.HostsTid.length); - for (var iter127 in this.HostsTid) - { - if (this.HostsTid.hasOwnProperty(iter127)) - { - iter127 = this.HostsTid[iter127]; - iter127.write(output); + for (var iter82 in this.HostsTid) { + if (this.HostsTid.hasOwnProperty(iter82)) { + iter82 = this.HostsTid[iter82]; + iter82.write(output); } } output.writeListEnd(); @@ -1554,12 +1416,10 @@ TimRoom.prototype.write = function(output) { if (this.membersTid !== null && this.membersTid !== undefined) { output.writeFieldBegin('membersTid', Thrift.Type.LIST, 4); output.writeListBegin(Thrift.Type.STRUCT, this.membersTid.length); - for (var iter128 in this.membersTid) - { - if (this.membersTid.hasOwnProperty(iter128)) - { - iter128 = this.membersTid[iter128]; - iter128.write(output); + for (var iter83 in this.membersTid) { + if (this.membersTid.hasOwnProperty(iter83)) { + iter83 = this.membersTid[iter83]; + iter83.write(output); } } output.writeListEnd(); @@ -1588,12 +1448,10 @@ TimRoom.prototype.write = function(output) { if (this.extraList !== null && this.extraList !== undefined) { output.writeFieldBegin('extraList', Thrift.Type.LIST, 9); output.writeListBegin(Thrift.Type.STRUCT, this.extraList.length); - for (var iter129 in this.extraList) - { - if (this.extraList.hasOwnProperty(iter129)) - { - iter129 = this.extraList[iter129]; - iter129.write(output); + for (var iter84 in this.extraList) { + if (this.extraList.hasOwnProperty(iter84)) { + iter84 = this.extraList[iter84]; + iter84.write(output); } } output.writeListEnd(); @@ -1602,13 +1460,11 @@ TimRoom.prototype.write = function(output) { if (this.extraMap !== null && this.extraMap !== undefined) { output.writeFieldBegin('extraMap', Thrift.Type.MAP, 10); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.extraMap)); - for (var kiter130 in this.extraMap) - { - if (this.extraMap.hasOwnProperty(kiter130)) - { - var viter131 = this.extraMap[kiter130]; - output.writeString(kiter130); - output.writeString(viter131); + for (var kiter85 in this.extraMap) { + if (this.extraMap.hasOwnProperty(kiter85)) { + var viter86 = this.extraMap[kiter85]; + output.writeString(kiter85); + output.writeString(viter86); } } output.writeMapEnd(); @@ -1672,17 +1528,14 @@ TimPBean = function(args) { TimPBean.prototype = {}; TimPBean.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.threadId = input.readString().value; @@ -1744,19 +1597,14 @@ TimPBean.prototype.read = function(input) { break; case 9: if (ftype == Thrift.Type.LIST) { - var _size132 = 0; - var _rtmp3136; this.extraList = []; - var _etype135 = 0; - _rtmp3136 = input.readListBegin(); - _etype135 = _rtmp3136.etype; - _size132 = _rtmp3136.size; - for (var _i137 = 0; _i137 < _size132; ++_i137) - { - var elem138 = null; - elem138 = new TimNode(); - elem138.read(input); - this.extraList.push(elem138); + var _rtmp388 = input.readListBegin(); + var _size87 = _rtmp388.size || 0; + for (var _i89 = 0; _i89 < _size87; ++_i89) { + var elem90 = null; + elem90 = new TimNode(); + elem90.read(input); + this.extraList.push(elem90); } input.readListEnd(); } else { @@ -1773,27 +1621,20 @@ TimPBean.prototype.read = function(input) { break; case 11: if (ftype == Thrift.Type.MAP) { - var _size139 = 0; - var _rtmp3143; this.extraMap = {}; - var _ktype140 = 0; - var _vtype141 = 0; - _rtmp3143 = input.readMapBegin(); - _ktype140 = _rtmp3143.ktype; - _vtype141 = _rtmp3143.vtype; - _size139 = _rtmp3143.size; - for (var _i144 = 0; _i144 < _size139; ++_i144) - { - if (_i144 > 0 ) { + var _rtmp392 = input.readMapBegin(); + var _size91 = _rtmp392.size || 0; + for (var _i93 = 0; _i93 < _size91; ++_i93) { + if (_i93 > 0 ) { if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { input.rstack.pop(); } } - var key145 = null; - var val146 = null; - key145 = input.readString().value; - val146 = input.readString().value; - this.extraMap[key145] = val146; + var key94 = null; + var val95 = null; + key94 = input.readString().value; + val95 = input.readString().value; + this.extraMap[key94] = val95; } input.readMapEnd(); } else { @@ -1854,12 +1695,10 @@ TimPBean.prototype.write = function(output) { if (this.extraList !== null && this.extraList !== undefined) { output.writeFieldBegin('extraList', Thrift.Type.LIST, 9); output.writeListBegin(Thrift.Type.STRUCT, this.extraList.length); - for (var iter147 in this.extraList) - { - if (this.extraList.hasOwnProperty(iter147)) - { - iter147 = this.extraList[iter147]; - iter147.write(output); + for (var iter96 in this.extraList) { + if (this.extraList.hasOwnProperty(iter96)) { + iter96 = this.extraList[iter96]; + iter96.write(output); } } output.writeListEnd(); @@ -1873,13 +1712,11 @@ TimPBean.prototype.write = function(output) { if (this.extraMap !== null && this.extraMap !== undefined) { output.writeFieldBegin('extraMap', Thrift.Type.MAP, 11); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.extraMap)); - for (var kiter148 in this.extraMap) - { - if (this.extraMap.hasOwnProperty(kiter148)) - { - var viter149 = this.extraMap[kiter148]; - output.writeString(kiter148); - output.writeString(viter149); + for (var kiter97 in this.extraMap) { + if (this.extraMap.hasOwnProperty(kiter97)) { + var viter98 = this.extraMap[kiter97]; + output.writeString(kiter97); + output.writeString(viter98); } } output.writeMapEnd(); @@ -1955,17 +1792,14 @@ TimMBean = function(args) { TimMBean.prototype = {}; TimMBean.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.threadId = input.readString().value; @@ -2035,19 +1869,14 @@ TimMBean.prototype.read = function(input) { break; case 10: if (ftype == Thrift.Type.LIST) { - var _size150 = 0; - var _rtmp3154; this.extraList = []; - var _etype153 = 0; - _rtmp3154 = input.readListBegin(); - _etype153 = _rtmp3154.etype; - _size150 = _rtmp3154.size; - for (var _i155 = 0; _i155 < _size150; ++_i155) - { - var elem156 = null; - elem156 = new TimNode(); - elem156.read(input); - this.extraList.push(elem156); + var _rtmp3100 = input.readListBegin(); + var _size99 = _rtmp3100.size || 0; + for (var _i101 = 0; _i101 < _size99; ++_i101) { + var elem102 = null; + elem102 = new TimNode(); + elem102.read(input); + this.extraList.push(elem102); } input.readListEnd(); } else { @@ -2071,27 +1900,20 @@ TimMBean.prototype.read = function(input) { break; case 13: if (ftype == Thrift.Type.MAP) { - var _size157 = 0; - var _rtmp3161; this.extraMap = {}; - var _ktype158 = 0; - var _vtype159 = 0; - _rtmp3161 = input.readMapBegin(); - _ktype158 = _rtmp3161.ktype; - _vtype159 = _rtmp3161.vtype; - _size157 = _rtmp3161.size; - for (var _i162 = 0; _i162 < _size157; ++_i162) - { - if (_i162 > 0 ) { + var _rtmp3104 = input.readMapBegin(); + var _size103 = _rtmp3104.size || 0; + for (var _i105 = 0; _i105 < _size103; ++_i105) { + if (_i105 > 0 ) { if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { input.rstack.pop(); } } - var key163 = null; - var val164 = null; - key163 = input.readString().value; - val164 = input.readString().value; - this.extraMap[key163] = val164; + var key106 = null; + var val107 = null; + key106 = input.readString().value; + val107 = input.readString().value; + this.extraMap[key106] = val107; } input.readMapEnd(); } else { @@ -2164,12 +1986,10 @@ TimMBean.prototype.write = function(output) { if (this.extraList !== null && this.extraList !== undefined) { output.writeFieldBegin('extraList', Thrift.Type.LIST, 10); output.writeListBegin(Thrift.Type.STRUCT, this.extraList.length); - for (var iter165 in this.extraList) - { - if (this.extraList.hasOwnProperty(iter165)) - { - iter165 = this.extraList[iter165]; - iter165.write(output); + for (var iter108 in this.extraList) { + if (this.extraList.hasOwnProperty(iter108)) { + iter108 = this.extraList[iter108]; + iter108.write(output); } } output.writeListEnd(); @@ -2188,13 +2008,11 @@ TimMBean.prototype.write = function(output) { if (this.extraMap !== null && this.extraMap !== undefined) { output.writeFieldBegin('extraMap', Thrift.Type.MAP, 13); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.extraMap)); - for (var kiter166 in this.extraMap) - { - if (this.extraMap.hasOwnProperty(kiter166)) - { - var viter167 = this.extraMap[kiter166]; - output.writeString(kiter166); - output.writeString(viter167); + for (var kiter109 in this.extraMap) { + if (this.extraMap.hasOwnProperty(kiter109)) { + var viter110 = this.extraMap[kiter109]; + output.writeString(kiter109); + output.writeString(viter110); } } output.writeMapEnd(); @@ -2247,17 +2065,14 @@ TimIqBean = function(args) { TimIqBean.prototype = {}; TimIqBean.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.threadId = input.readString().value; @@ -2290,19 +2105,14 @@ TimIqBean.prototype.read = function(input) { break; case 5: if (ftype == Thrift.Type.LIST) { - var _size168 = 0; - var _rtmp3172; this.extraList = []; - var _etype171 = 0; - _rtmp3172 = input.readListBegin(); - _etype171 = _rtmp3172.etype; - _size168 = _rtmp3172.size; - for (var _i173 = 0; _i173 < _size168; ++_i173) - { - var elem174 = null; - elem174 = new TimNode(); - elem174.read(input); - this.extraList.push(elem174); + var _rtmp3112 = input.readListBegin(); + var _size111 = _rtmp3112.size || 0; + for (var _i113 = 0; _i113 < _size111; ++_i113) { + var elem114 = null; + elem114 = new TimNode(); + elem114.read(input); + this.extraList.push(elem114); } input.readListEnd(); } else { @@ -2319,27 +2129,20 @@ TimIqBean.prototype.read = function(input) { break; case 7: if (ftype == Thrift.Type.MAP) { - var _size175 = 0; - var _rtmp3179; this.extraMap = {}; - var _ktype176 = 0; - var _vtype177 = 0; - _rtmp3179 = input.readMapBegin(); - _ktype176 = _rtmp3179.ktype; - _vtype177 = _rtmp3179.vtype; - _size175 = _rtmp3179.size; - for (var _i180 = 0; _i180 < _size175; ++_i180) - { - if (_i180 > 0 ) { + var _rtmp3116 = input.readMapBegin(); + var _size115 = _rtmp3116.size || 0; + for (var _i117 = 0; _i117 < _size115; ++_i117) { + if (_i117 > 0 ) { if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { input.rstack.pop(); } } - var key181 = null; - var val182 = null; - key181 = input.readString().value; - val182 = input.readString().value; - this.extraMap[key181] = val182; + var key118 = null; + var val119 = null; + key118 = input.readString().value; + val119 = input.readString().value; + this.extraMap[key118] = val119; } input.readMapEnd(); } else { @@ -2380,12 +2183,10 @@ TimIqBean.prototype.write = function(output) { if (this.extraList !== null && this.extraList !== undefined) { output.writeFieldBegin('extraList', Thrift.Type.LIST, 5); output.writeListBegin(Thrift.Type.STRUCT, this.extraList.length); - for (var iter183 in this.extraList) - { - if (this.extraList.hasOwnProperty(iter183)) - { - iter183 = this.extraList[iter183]; - iter183.write(output); + for (var iter120 in this.extraList) { + if (this.extraList.hasOwnProperty(iter120)) { + iter120 = this.extraList[iter120]; + iter120.write(output); } } output.writeListEnd(); @@ -2399,13 +2200,11 @@ TimIqBean.prototype.write = function(output) { if (this.extraMap !== null && this.extraMap !== undefined) { output.writeFieldBegin('extraMap', Thrift.Type.MAP, 7); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.extraMap)); - for (var kiter184 in this.extraMap) - { - if (this.extraMap.hasOwnProperty(kiter184)) - { - var viter185 = this.extraMap[kiter184]; - output.writeString(kiter184); - output.writeString(viter185); + for (var kiter121 in this.extraMap) { + if (this.extraMap.hasOwnProperty(kiter121)) { + var viter122 = this.extraMap[kiter121]; + output.writeString(kiter121); + output.writeString(viter122); } } output.writeMapEnd(); @@ -2443,17 +2242,14 @@ TimRoster = function(args) { TimRoster.prototype = {}; TimRoster.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.subscription = input.readString().value; @@ -2478,27 +2274,20 @@ TimRoster.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.MAP) { - var _size186 = 0; - var _rtmp3190; this.extraMap = {}; - var _ktype187 = 0; - var _vtype188 = 0; - _rtmp3190 = input.readMapBegin(); - _ktype187 = _rtmp3190.ktype; - _vtype188 = _rtmp3190.vtype; - _size186 = _rtmp3190.size; - for (var _i191 = 0; _i191 < _size186; ++_i191) - { - if (_i191 > 0 ) { + var _rtmp3124 = input.readMapBegin(); + var _size123 = _rtmp3124.size || 0; + for (var _i125 = 0; _i125 < _size123; ++_i125) { + if (_i125 > 0 ) { if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { input.rstack.pop(); } } - var key192 = null; - var val193 = null; - key192 = input.readString().value; - val193 = input.readString().value; - this.extraMap[key192] = val193; + var key126 = null; + var val127 = null; + key126 = input.readString().value; + val127 = input.readString().value; + this.extraMap[key126] = val127; } input.readMapEnd(); } else { @@ -2534,13 +2323,11 @@ TimRoster.prototype.write = function(output) { if (this.extraMap !== null && this.extraMap !== undefined) { output.writeFieldBegin('extraMap', Thrift.Type.MAP, 4); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.extraMap)); - for (var kiter194 in this.extraMap) - { - if (this.extraMap.hasOwnProperty(kiter194)) - { - var viter195 = this.extraMap[kiter194]; - output.writeString(kiter194); - output.writeString(viter195); + for (var kiter128 in this.extraMap) { + if (this.extraMap.hasOwnProperty(kiter128)) { + var viter129 = this.extraMap[kiter128]; + output.writeString(kiter128); + output.writeString(viter129); } } output.writeMapEnd(); @@ -2570,17 +2357,14 @@ TimRemoteUserBean = function(args) { TimRemoteUserBean.prototype = {}; TimRemoteUserBean.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.error = new TimError(); @@ -2599,27 +2383,20 @@ TimRemoteUserBean.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.MAP) { - var _size196 = 0; - var _rtmp3200; this.extraMap = {}; - var _ktype197 = 0; - var _vtype198 = 0; - _rtmp3200 = input.readMapBegin(); - _ktype197 = _rtmp3200.ktype; - _vtype198 = _rtmp3200.vtype; - _size196 = _rtmp3200.size; - for (var _i201 = 0; _i201 < _size196; ++_i201) - { - if (_i201 > 0 ) { + var _rtmp3131 = input.readMapBegin(); + var _size130 = _rtmp3131.size || 0; + for (var _i132 = 0; _i132 < _size130; ++_i132) { + if (_i132 > 0 ) { if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { input.rstack.pop(); } } - var key202 = null; - var val203 = null; - key202 = input.readString().value; - val203 = input.readString().value; - this.extraMap[key202] = val203; + var key133 = null; + var val134 = null; + key133 = input.readString().value; + val134 = input.readString().value; + this.extraMap[key133] = val134; } input.readMapEnd(); } else { @@ -2650,13 +2427,11 @@ TimRemoteUserBean.prototype.write = function(output) { if (this.extraMap !== null && this.extraMap !== undefined) { output.writeFieldBegin('extraMap', Thrift.Type.MAP, 3); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.extraMap)); - for (var kiter204 in this.extraMap) - { - if (this.extraMap.hasOwnProperty(kiter204)) - { - var viter205 = this.extraMap[kiter204]; - output.writeString(kiter204); - output.writeString(viter205); + for (var kiter135 in this.extraMap) { + if (this.extraMap.hasOwnProperty(kiter135)) { + var viter136 = this.extraMap[kiter135]; + output.writeString(kiter135); + output.writeString(viter136); } } output.writeMapEnd(); @@ -2686,17 +2461,14 @@ TimRemoteRoom = function(args) { TimRemoteRoom.prototype = {}; TimRemoteRoom.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.error = new TimError(); @@ -2715,27 +2487,20 @@ TimRemoteRoom.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.MAP) { - var _size206 = 0; - var _rtmp3210; this.extraMap = {}; - var _ktype207 = 0; - var _vtype208 = 0; - _rtmp3210 = input.readMapBegin(); - _ktype207 = _rtmp3210.ktype; - _vtype208 = _rtmp3210.vtype; - _size206 = _rtmp3210.size; - for (var _i211 = 0; _i211 < _size206; ++_i211) - { - if (_i211 > 0 ) { + var _rtmp3138 = input.readMapBegin(); + var _size137 = _rtmp3138.size || 0; + for (var _i139 = 0; _i139 < _size137; ++_i139) { + if (_i139 > 0 ) { if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { input.rstack.pop(); } } - var key212 = null; - var val213 = null; - key212 = input.readString().value; - val213 = input.readString().value; - this.extraMap[key212] = val213; + var key140 = null; + var val141 = null; + key140 = input.readString().value; + val141 = input.readString().value; + this.extraMap[key140] = val141; } input.readMapEnd(); } else { @@ -2766,13 +2531,11 @@ TimRemoteRoom.prototype.write = function(output) { if (this.extraMap !== null && this.extraMap !== undefined) { output.writeFieldBegin('extraMap', Thrift.Type.MAP, 3); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.extraMap)); - for (var kiter214 in this.extraMap) - { - if (this.extraMap.hasOwnProperty(kiter214)) - { - var viter215 = this.extraMap[kiter214]; - output.writeString(kiter214); - output.writeString(viter215); + for (var kiter142 in this.extraMap) { + if (this.extraMap.hasOwnProperty(kiter142)) { + var viter143 = this.extraMap[kiter142]; + output.writeString(kiter142); + output.writeString(viter143); } } output.writeMapEnd(); @@ -2806,17 +2569,14 @@ TimResponseBean = function(args) { TimResponseBean.prototype = {}; TimResponseBean.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.threadId = input.readString().value; @@ -2834,19 +2594,14 @@ TimResponseBean.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.LIST) { - var _size216 = 0; - var _rtmp3220; this.extraList = []; - var _etype219 = 0; - _rtmp3220 = input.readListBegin(); - _etype219 = _rtmp3220.etype; - _size216 = _rtmp3220.size; - for (var _i221 = 0; _i221 < _size216; ++_i221) - { - var elem222 = null; - elem222 = new TimNode(); - elem222.read(input); - this.extraList.push(elem222); + var _rtmp3145 = input.readListBegin(); + var _size144 = _rtmp3145.size || 0; + for (var _i146 = 0; _i146 < _size144; ++_i146) { + var elem147 = null; + elem147 = new TimNode(); + elem147.read(input); + this.extraList.push(elem147); } input.readListEnd(); } else { @@ -2855,27 +2610,20 @@ TimResponseBean.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.MAP) { - var _size223 = 0; - var _rtmp3227; this.extraMap = {}; - var _ktype224 = 0; - var _vtype225 = 0; - _rtmp3227 = input.readMapBegin(); - _ktype224 = _rtmp3227.ktype; - _vtype225 = _rtmp3227.vtype; - _size223 = _rtmp3227.size; - for (var _i228 = 0; _i228 < _size223; ++_i228) - { - if (_i228 > 0 ) { + var _rtmp3149 = input.readMapBegin(); + var _size148 = _rtmp3149.size || 0; + for (var _i150 = 0; _i150 < _size148; ++_i150) { + if (_i150 > 0 ) { if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { input.rstack.pop(); } } - var key229 = null; - var val230 = null; - key229 = input.readString().value; - val230 = input.readString().value; - this.extraMap[key229] = val230; + var key151 = null; + var val152 = null; + key151 = input.readString().value; + val152 = input.readString().value; + this.extraMap[key151] = val152; } input.readMapEnd(); } else { @@ -2906,12 +2654,10 @@ TimResponseBean.prototype.write = function(output) { if (this.extraList !== null && this.extraList !== undefined) { output.writeFieldBegin('extraList', Thrift.Type.LIST, 3); output.writeListBegin(Thrift.Type.STRUCT, this.extraList.length); - for (var iter231 in this.extraList) - { - if (this.extraList.hasOwnProperty(iter231)) - { - iter231 = this.extraList[iter231]; - iter231.write(output); + for (var iter153 in this.extraList) { + if (this.extraList.hasOwnProperty(iter153)) { + iter153 = this.extraList[iter153]; + iter153.write(output); } } output.writeListEnd(); @@ -2920,13 +2666,11 @@ TimResponseBean.prototype.write = function(output) { if (this.extraMap !== null && this.extraMap !== undefined) { output.writeFieldBegin('extraMap', Thrift.Type.MAP, 4); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.extraMap)); - for (var kiter232 in this.extraMap) - { - if (this.extraMap.hasOwnProperty(kiter232)) - { - var viter233 = this.extraMap[kiter232]; - output.writeString(kiter232); - output.writeString(viter233); + for (var kiter154 in this.extraMap) { + if (this.extraMap.hasOwnProperty(kiter154)) { + var viter155 = this.extraMap[kiter154]; + output.writeString(kiter154); + output.writeString(viter155); } } output.writeMapEnd(); @@ -2984,17 +2728,14 @@ TimSock5Bean = function(args) { TimSock5Bean.prototype = {}; TimSock5Bean.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRUCT) { this.fromTid = new Tid(); @@ -3041,27 +2782,20 @@ TimSock5Bean.prototype.read = function(input) { break; case 7: if (ftype == Thrift.Type.MAP) { - var _size234 = 0; - var _rtmp3238; this.extraMap = {}; - var _ktype235 = 0; - var _vtype236 = 0; - _rtmp3238 = input.readMapBegin(); - _ktype235 = _rtmp3238.ktype; - _vtype236 = _rtmp3238.vtype; - _size234 = _rtmp3238.size; - for (var _i239 = 0; _i239 < _size234; ++_i239) - { - if (_i239 > 0 ) { + var _rtmp3157 = input.readMapBegin(); + var _size156 = _rtmp3157.size || 0; + for (var _i158 = 0; _i158 < _size156; ++_i158) { + if (_i158 > 0 ) { if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { input.rstack.pop(); } } - var key240 = null; - var val241 = null; - key240 = input.readString().value; - val241 = input.readString().value; - this.extraMap[key240] = val241; + var key159 = null; + var val160 = null; + key159 = input.readString().value; + val160 = input.readString().value; + this.extraMap[key159] = val160; } input.readMapEnd(); } else { @@ -3112,13 +2846,11 @@ TimSock5Bean.prototype.write = function(output) { if (this.extraMap !== null && this.extraMap !== undefined) { output.writeFieldBegin('extraMap', Thrift.Type.MAP, 7); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.extraMap)); - for (var kiter242 in this.extraMap) - { - if (this.extraMap.hasOwnProperty(kiter242)) - { - var viter243 = this.extraMap[kiter242]; - output.writeString(kiter242); - output.writeString(viter243); + for (var kiter161 in this.extraMap) { + if (this.extraMap.hasOwnProperty(kiter161)) { + var viter162 = this.extraMap[kiter161]; + output.writeString(kiter161); + output.writeString(viter162); } } output.writeMapEnd(); @@ -3158,17 +2890,14 @@ TimSock5Bytes = function(args) { TimSock5Bytes.prototype = {}; TimSock5Bytes.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.pubId = input.readString().value; @@ -3185,18 +2914,13 @@ TimSock5Bytes.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.LIST) { - var _size244 = 0; - var _rtmp3248; this.bytes = []; - var _etype247 = 0; - _rtmp3248 = input.readListBegin(); - _etype247 = _rtmp3248.etype; - _size244 = _rtmp3248.size; - for (var _i249 = 0; _i249 < _size244; ++_i249) - { - var elem250 = null; - elem250 = input.readBinary().value; - this.bytes.push(elem250); + var _rtmp3164 = input.readListBegin(); + var _size163 = _rtmp3164.size || 0; + for (var _i165 = 0; _i165 < _size163; ++_i165) { + var elem166 = null; + elem166 = input.readBinary().value; + this.bytes.push(elem166); } input.readListEnd(); } else { @@ -3205,27 +2929,20 @@ TimSock5Bytes.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.MAP) { - var _size251 = 0; - var _rtmp3255; this.extraMap = {}; - var _ktype252 = 0; - var _vtype253 = 0; - _rtmp3255 = input.readMapBegin(); - _ktype252 = _rtmp3255.ktype; - _vtype253 = _rtmp3255.vtype; - _size251 = _rtmp3255.size; - for (var _i256 = 0; _i256 < _size251; ++_i256) - { - if (_i256 > 0 ) { + var _rtmp3168 = input.readMapBegin(); + var _size167 = _rtmp3168.size || 0; + for (var _i169 = 0; _i169 < _size167; ++_i169) { + if (_i169 > 0 ) { if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { input.rstack.pop(); } } - var key257 = null; - var val258 = null; - key257 = input.readString().value; - val258 = input.readString().value; - this.extraMap[key257] = val258; + var key170 = null; + var val171 = null; + key170 = input.readString().value; + val171 = input.readString().value; + this.extraMap[key170] = val171; } input.readMapEnd(); } else { @@ -3256,12 +2973,10 @@ TimSock5Bytes.prototype.write = function(output) { if (this.bytes !== null && this.bytes !== undefined) { output.writeFieldBegin('bytes', Thrift.Type.LIST, 3); output.writeListBegin(Thrift.Type.STRING, this.bytes.length); - for (var iter259 in this.bytes) - { - if (this.bytes.hasOwnProperty(iter259)) - { - iter259 = this.bytes[iter259]; - output.writeBinary(iter259); + for (var iter172 in this.bytes) { + if (this.bytes.hasOwnProperty(iter172)) { + iter172 = this.bytes[iter172]; + output.writeBinary(iter172); } } output.writeListEnd(); @@ -3270,13 +2985,11 @@ TimSock5Bytes.prototype.write = function(output) { if (this.extraMap !== null && this.extraMap !== undefined) { output.writeFieldBegin('extraMap', Thrift.Type.MAP, 4); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.extraMap)); - for (var kiter260 in this.extraMap) - { - if (this.extraMap.hasOwnProperty(kiter260)) - { - var viter261 = this.extraMap[kiter260]; - output.writeString(kiter260); - output.writeString(viter261); + for (var kiter173 in this.extraMap) { + if (this.extraMap.hasOwnProperty(kiter173)) { + var viter174 = this.extraMap[kiter173]; + output.writeString(kiter173); + output.writeString(viter174); } } output.writeMapEnd(); @@ -3310,17 +3023,14 @@ TimPage = function(args) { TimPage.prototype = {}; TimPage.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.fromTimeStamp = input.readString().value; @@ -3344,27 +3054,20 @@ TimPage.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.MAP) { - var _size262 = 0; - var _rtmp3266; this.extraMap = {}; - var _ktype263 = 0; - var _vtype264 = 0; - _rtmp3266 = input.readMapBegin(); - _ktype263 = _rtmp3266.ktype; - _vtype264 = _rtmp3266.vtype; - _size262 = _rtmp3266.size; - for (var _i267 = 0; _i267 < _size262; ++_i267) - { - if (_i267 > 0 ) { + var _rtmp3176 = input.readMapBegin(); + var _size175 = _rtmp3176.size || 0; + for (var _i177 = 0; _i177 < _size175; ++_i177) { + if (_i177 > 0 ) { if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { input.rstack.pop(); } } - var key268 = null; - var val269 = null; - key268 = input.readString().value; - val269 = input.readString().value; - this.extraMap[key268] = val269; + var key178 = null; + var val179 = null; + key178 = input.readString().value; + val179 = input.readString().value; + this.extraMap[key178] = val179; } input.readMapEnd(); } else { @@ -3400,13 +3103,11 @@ TimPage.prototype.write = function(output) { if (this.extraMap !== null && this.extraMap !== undefined) { output.writeFieldBegin('extraMap', Thrift.Type.MAP, 4); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.extraMap)); - for (var kiter270 in this.extraMap) - { - if (this.extraMap.hasOwnProperty(kiter270)) - { - var viter271 = this.extraMap[kiter270]; - output.writeString(kiter270); - output.writeString(viter271); + for (var kiter180 in this.extraMap) { + if (this.extraMap.hasOwnProperty(kiter180)) { + var viter181 = this.extraMap[kiter180]; + output.writeString(kiter180); + output.writeString(viter181); } } output.writeMapEnd(); @@ -3440,31 +3141,23 @@ TimMessageIq = function(args) { TimMessageIq.prototype = {}; TimMessageIq.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.LIST) { - var _size272 = 0; - var _rtmp3276; this.tidlist = []; - var _etype275 = 0; - _rtmp3276 = input.readListBegin(); - _etype275 = _rtmp3276.etype; - _size272 = _rtmp3276.size; - for (var _i277 = 0; _i277 < _size272; ++_i277) - { - var elem278 = null; - elem278 = input.readString().value; - this.tidlist.push(elem278); + var _rtmp3183 = input.readListBegin(); + var _size182 = _rtmp3183.size || 0; + for (var _i184 = 0; _i184 < _size182; ++_i184) { + var elem185 = null; + elem185 = input.readString().value; + this.tidlist.push(elem185); } input.readListEnd(); } else { @@ -3481,18 +3174,13 @@ TimMessageIq.prototype.read = function(input) { break; case 3: if (ftype == Thrift.Type.LIST) { - var _size279 = 0; - var _rtmp3283; this.midlist = []; - var _etype282 = 0; - _rtmp3283 = input.readListBegin(); - _etype282 = _rtmp3283.etype; - _size279 = _rtmp3283.size; - for (var _i284 = 0; _i284 < _size279; ++_i284) - { - var elem285 = null; - elem285 = input.readString().value; - this.midlist.push(elem285); + var _rtmp3187 = input.readListBegin(); + var _size186 = _rtmp3187.size || 0; + for (var _i188 = 0; _i188 < _size186; ++_i188) { + var elem189 = null; + elem189 = input.readString().value; + this.midlist.push(elem189); } input.readListEnd(); } else { @@ -3501,27 +3189,20 @@ TimMessageIq.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.MAP) { - var _size286 = 0; - var _rtmp3290; this.extraMap = {}; - var _ktype287 = 0; - var _vtype288 = 0; - _rtmp3290 = input.readMapBegin(); - _ktype287 = _rtmp3290.ktype; - _vtype288 = _rtmp3290.vtype; - _size286 = _rtmp3290.size; - for (var _i291 = 0; _i291 < _size286; ++_i291) - { - if (_i291 > 0 ) { + var _rtmp3191 = input.readMapBegin(); + var _size190 = _rtmp3191.size || 0; + for (var _i192 = 0; _i192 < _size190; ++_i192) { + if (_i192 > 0 ) { if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { input.rstack.pop(); } } - var key292 = null; - var val293 = null; - key292 = input.readString().value; - val293 = input.readString().value; - this.extraMap[key292] = val293; + var key193 = null; + var val194 = null; + key193 = input.readString().value; + val194 = input.readString().value; + this.extraMap[key193] = val194; } input.readMapEnd(); } else { @@ -3542,12 +3223,10 @@ TimMessageIq.prototype.write = function(output) { if (this.tidlist !== null && this.tidlist !== undefined) { output.writeFieldBegin('tidlist', Thrift.Type.LIST, 1); output.writeListBegin(Thrift.Type.STRING, this.tidlist.length); - for (var iter294 in this.tidlist) - { - if (this.tidlist.hasOwnProperty(iter294)) - { - iter294 = this.tidlist[iter294]; - output.writeString(iter294); + for (var iter195 in this.tidlist) { + if (this.tidlist.hasOwnProperty(iter195)) { + iter195 = this.tidlist[iter195]; + output.writeString(iter195); } } output.writeListEnd(); @@ -3561,12 +3240,10 @@ TimMessageIq.prototype.write = function(output) { if (this.midlist !== null && this.midlist !== undefined) { output.writeFieldBegin('midlist', Thrift.Type.LIST, 3); output.writeListBegin(Thrift.Type.STRING, this.midlist.length); - for (var iter295 in this.midlist) - { - if (this.midlist.hasOwnProperty(iter295)) - { - iter295 = this.midlist[iter295]; - output.writeString(iter295); + for (var iter196 in this.midlist) { + if (this.midlist.hasOwnProperty(iter196)) { + iter196 = this.midlist[iter196]; + output.writeString(iter196); } } output.writeListEnd(); @@ -3575,13 +3252,11 @@ TimMessageIq.prototype.write = function(output) { if (this.extraMap !== null && this.extraMap !== undefined) { output.writeFieldBegin('extraMap', Thrift.Type.MAP, 4); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.extraMap)); - for (var kiter296 in this.extraMap) - { - if (this.extraMap.hasOwnProperty(kiter296)) - { - var viter297 = this.extraMap[kiter296]; - output.writeString(kiter296); - output.writeString(viter297); + for (var kiter197 in this.extraMap) { + if (this.extraMap.hasOwnProperty(kiter197)) { + var viter198 = this.extraMap[kiter197]; + output.writeString(kiter197); + output.writeString(viter198); } } output.writeMapEnd(); @@ -3611,17 +3286,14 @@ TimAuth = function(args) { TimAuth.prototype = {}; TimAuth.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.domain = input.readString().value; @@ -3699,17 +3371,14 @@ TimMBeanList = function(args) { TimMBeanList.prototype = {}; TimMBeanList.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.threadId = input.readString().value; @@ -3719,19 +3388,14 @@ TimMBeanList.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.LIST) { - var _size298 = 0; - var _rtmp3302; this.timMBeanList = []; - var _etype301 = 0; - _rtmp3302 = input.readListBegin(); - _etype301 = _rtmp3302.etype; - _size298 = _rtmp3302.size; - for (var _i303 = 0; _i303 < _size298; ++_i303) - { - var elem304 = null; - elem304 = new TimMBean(); - elem304.read(input); - this.timMBeanList.push(elem304); + var _rtmp3200 = input.readListBegin(); + var _size199 = _rtmp3200.size || 0; + for (var _i201 = 0; _i201 < _size199; ++_i201) { + var elem202 = null; + elem202 = new TimMBean(); + elem202.read(input); + this.timMBeanList.push(elem202); } input.readListEnd(); } else { @@ -3747,27 +3411,20 @@ TimMBeanList.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.MAP) { - var _size305 = 0; - var _rtmp3309; this.extraMap = {}; - var _ktype306 = 0; - var _vtype307 = 0; - _rtmp3309 = input.readMapBegin(); - _ktype306 = _rtmp3309.ktype; - _vtype307 = _rtmp3309.vtype; - _size305 = _rtmp3309.size; - for (var _i310 = 0; _i310 < _size305; ++_i310) - { - if (_i310 > 0 ) { + var _rtmp3204 = input.readMapBegin(); + var _size203 = _rtmp3204.size || 0; + for (var _i205 = 0; _i205 < _size203; ++_i205) { + if (_i205 > 0 ) { if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { input.rstack.pop(); } } - var key311 = null; - var val312 = null; - key311 = input.readString().value; - val312 = input.readString().value; - this.extraMap[key311] = val312; + var key206 = null; + var val207 = null; + key206 = input.readString().value; + val207 = input.readString().value; + this.extraMap[key206] = val207; } input.readMapEnd(); } else { @@ -3793,12 +3450,10 @@ TimMBeanList.prototype.write = function(output) { if (this.timMBeanList !== null && this.timMBeanList !== undefined) { output.writeFieldBegin('timMBeanList', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRUCT, this.timMBeanList.length); - for (var iter313 in this.timMBeanList) - { - if (this.timMBeanList.hasOwnProperty(iter313)) - { - iter313 = this.timMBeanList[iter313]; - iter313.write(output); + for (var iter208 in this.timMBeanList) { + if (this.timMBeanList.hasOwnProperty(iter208)) { + iter208 = this.timMBeanList[iter208]; + iter208.write(output); } } output.writeListEnd(); @@ -3812,13 +3467,11 @@ TimMBeanList.prototype.write = function(output) { if (this.extraMap !== null && this.extraMap !== undefined) { output.writeFieldBegin('extraMap', Thrift.Type.MAP, 4); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.extraMap)); - for (var kiter314 in this.extraMap) - { - if (this.extraMap.hasOwnProperty(kiter314)) - { - var viter315 = this.extraMap[kiter314]; - output.writeString(kiter314); - output.writeString(viter315); + for (var kiter209 in this.extraMap) { + if (this.extraMap.hasOwnProperty(kiter209)) { + var viter210 = this.extraMap[kiter209]; + output.writeString(kiter209); + output.writeString(viter210); } } output.writeMapEnd(); @@ -3854,17 +3507,14 @@ TimPBeanList = function(args) { TimPBeanList.prototype = {}; TimPBeanList.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.threadId = input.readString().value; @@ -3874,19 +3524,14 @@ TimPBeanList.prototype.read = function(input) { break; case 2: if (ftype == Thrift.Type.LIST) { - var _size316 = 0; - var _rtmp3320; this.timPBeanList = []; - var _etype319 = 0; - _rtmp3320 = input.readListBegin(); - _etype319 = _rtmp3320.etype; - _size316 = _rtmp3320.size; - for (var _i321 = 0; _i321 < _size316; ++_i321) - { - var elem322 = null; - elem322 = new TimPBean(); - elem322.read(input); - this.timPBeanList.push(elem322); + var _rtmp3212 = input.readListBegin(); + var _size211 = _rtmp3212.size || 0; + for (var _i213 = 0; _i213 < _size211; ++_i213) { + var elem214 = null; + elem214 = new TimPBean(); + elem214.read(input); + this.timPBeanList.push(elem214); } input.readListEnd(); } else { @@ -3902,27 +3547,20 @@ TimPBeanList.prototype.read = function(input) { break; case 4: if (ftype == Thrift.Type.MAP) { - var _size323 = 0; - var _rtmp3327; this.extraMap = {}; - var _ktype324 = 0; - var _vtype325 = 0; - _rtmp3327 = input.readMapBegin(); - _ktype324 = _rtmp3327.ktype; - _vtype325 = _rtmp3327.vtype; - _size323 = _rtmp3327.size; - for (var _i328 = 0; _i328 < _size323; ++_i328) - { - if (_i328 > 0 ) { + var _rtmp3216 = input.readMapBegin(); + var _size215 = _rtmp3216.size || 0; + for (var _i217 = 0; _i217 < _size215; ++_i217) { + if (_i217 > 0 ) { if (input.rstack.length > input.rpos[input.rpos.length -1] + 1) { input.rstack.pop(); } } - var key329 = null; - var val330 = null; - key329 = input.readString().value; - val330 = input.readString().value; - this.extraMap[key329] = val330; + var key218 = null; + var val219 = null; + key218 = input.readString().value; + val219 = input.readString().value; + this.extraMap[key218] = val219; } input.readMapEnd(); } else { @@ -3948,12 +3586,10 @@ TimPBeanList.prototype.write = function(output) { if (this.timPBeanList !== null && this.timPBeanList !== undefined) { output.writeFieldBegin('timPBeanList', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRUCT, this.timPBeanList.length); - for (var iter331 in this.timPBeanList) - { - if (this.timPBeanList.hasOwnProperty(iter331)) - { - iter331 = this.timPBeanList[iter331]; - iter331.write(output); + for (var iter220 in this.timPBeanList) { + if (this.timPBeanList.hasOwnProperty(iter220)) { + iter220 = this.timPBeanList[iter220]; + iter220.write(output); } } output.writeListEnd(); @@ -3967,13 +3603,11 @@ TimPBeanList.prototype.write = function(output) { if (this.extraMap !== null && this.extraMap !== undefined) { output.writeFieldBegin('extraMap', Thrift.Type.MAP, 4); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.extraMap)); - for (var kiter332 in this.extraMap) - { - if (this.extraMap.hasOwnProperty(kiter332)) - { - var viter333 = this.extraMap[kiter332]; - output.writeString(kiter332); - output.writeString(viter333); + for (var kiter221 in this.extraMap) { + if (this.extraMap.hasOwnProperty(kiter221)) { + var viter222 = this.extraMap[kiter221]; + output.writeString(kiter221); + output.writeString(viter222); } } output.writeMapEnd(); @@ -4003,17 +3637,14 @@ TimPropertyBean = function(args) { TimPropertyBean.prototype = {}; TimPropertyBean.prototype.read = function(input) { input.readStructBegin(); - while (true) - { + while (true) { var ret = input.readFieldBegin(); - var fname = ret.fname; var ftype = ret.ftype; var fid = ret.fid; if (ftype == Thrift.Type.STOP) { break; } - switch (fid) - { + switch (fid) { case 1: if (ftype == Thrift.Type.STRING) { this.threadId = input.readString().value; diff --git a/protocols/gen-lua/tim_ITim.lua b/protocols/gen-lua/tim_ITim.lua index 6139c04..770a23e 100644 --- a/protocols/gen-lua/tim_ITim.lua +++ b/protocols/gen-lua/tim_ITim.lua @@ -249,7 +249,7 @@ function ITimClient:recv_timRemoteUserAuth(tid, pwd, auth) local result = timRemoteUserAuth_result:new{} result:read(self.iprot) self.iprot:readMessageEnd() - if result.success then + if result.success ~= nil then return result.success end error(TApplicationException:new{errorCode = TApplicationException.MISSING_RESULT}) @@ -281,7 +281,7 @@ function ITimClient:recv_timRemoteUserGet(tid, auth) local result = timRemoteUserGet_result:new{} result:read(self.iprot) self.iprot:readMessageEnd() - if result.success then + if result.success ~= nil then return result.success end error(TApplicationException:new{errorCode = TApplicationException.MISSING_RESULT}) @@ -314,7 +314,7 @@ function ITimClient:recv_timRemoteUserEdit(tid, ub, auth) local result = timRemoteUserEdit_result:new{} result:read(self.iprot) self.iprot:readMessageEnd() - if result.success then + if result.success ~= nil then return result.success end error(TApplicationException:new{errorCode = TApplicationException.MISSING_RESULT}) @@ -346,7 +346,7 @@ function ITimClient:recv_timResponsePresence(pbean, auth) local result = timResponsePresence_result:new{} result:read(self.iprot) self.iprot:readMessageEnd() - if result.success then + if result.success ~= nil then return result.success end error(TApplicationException:new{errorCode = TApplicationException.MISSING_RESULT}) @@ -378,7 +378,7 @@ function ITimClient:recv_timResponseMessage(mbean, auth) local result = timResponseMessage_result:new{} result:read(self.iprot) self.iprot:readMessageEnd() - if result.success then + if result.success ~= nil then return result.success end error(TApplicationException:new{errorCode = TApplicationException.MISSING_RESULT}) @@ -411,7 +411,7 @@ function ITimClient:recv_timResponseMessageIq(timMsgIq, iqType, auth) local result = timResponseMessageIq_result:new{} result:read(self.iprot) self.iprot:readMessageEnd() - if result.success then + if result.success ~= nil then return result.success end error(TApplicationException:new{errorCode = TApplicationException.MISSING_RESULT}) @@ -443,7 +443,7 @@ function ITimClient:recv_timResponsePresenceList(pbeanList, auth) local result = timResponsePresenceList_result:new{} result:read(self.iprot) self.iprot:readMessageEnd() - if result.success then + if result.success ~= nil then return result.success end error(TApplicationException:new{errorCode = TApplicationException.MISSING_RESULT}) @@ -475,7 +475,7 @@ function ITimClient:recv_timResponseMessageList(mbeanList, auth) local result = timResponseMessageList_result:new{} result:read(self.iprot) self.iprot:readMessageEnd() - if result.success then + if result.success ~= nil then return result.success end error(TApplicationException:new{errorCode = TApplicationException.MISSING_RESULT}) @@ -494,17 +494,20 @@ function ITimProcessor:process(iprot, oprot, server_ctx) local name, mtype, seqid = iprot:readMessageBegin() local func_name = 'process_' .. name if not self[func_name] or ttype(self[func_name]) ~= 'function' then - iprot:skip(TType.STRUCT) - iprot:readMessageEnd() - x = TApplicationException:new{ - errorCode = TApplicationException.UNKNOWN_METHOD - } - oprot:writeMessageBegin(name, TMessageType.EXCEPTION, seqid) - x:write(oprot) - oprot:writeMessageEnd() - oprot.trans:flush() + if oprot ~= nil then + iprot:skip(TType.STRUCT) + iprot:readMessageEnd() + x = TApplicationException:new{ + errorCode = TApplicationException.UNKNOWN_METHOD + } + oprot:writeMessageBegin(name, TMessageType.EXCEPTION, seqid) + x:write(oprot) + oprot:writeMessageEnd() + oprot.trans:flush() + end + return false, 'Unknown function '..name else - self[func_name](self, seqid, iprot, oprot, server_ctx) + return self[func_name](self, seqid, iprot, oprot, server_ctx) end end @@ -513,18 +516,8 @@ function ITimProcessor:process_timStream(seqid, iprot, oprot, server_ctx) local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() - local result = timStream_result:new{} local status, res = pcall(self.handler.timStream, self.handler, args.param) - if not status then - reply_type = TMessageType.EXCEPTION - result = TApplicationException:new{message = res} - else - result.success = res - end - oprot:writeMessageBegin('timStream', reply_type, seqid) - result:write(oprot) - oprot:writeMessageEnd() - oprot.trans:flush() + return status, res end function ITimProcessor:process_timStarttls(seqid, iprot, oprot, server_ctx) @@ -532,18 +525,8 @@ function ITimProcessor:process_timStarttls(seqid, iprot, oprot, server_ctx) local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() - local result = timStarttls_result:new{} local status, res = pcall(self.handler.timStarttls, self.handler) - if not status then - reply_type = TMessageType.EXCEPTION - result = TApplicationException:new{message = res} - else - result.success = res - end - oprot:writeMessageBegin('timStarttls', reply_type, seqid) - result:write(oprot) - oprot:writeMessageEnd() - oprot.trans:flush() + return status, res end function ITimProcessor:process_timLogin(seqid, iprot, oprot, server_ctx) @@ -551,18 +534,8 @@ function ITimProcessor:process_timLogin(seqid, iprot, oprot, server_ctx) local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() - local result = timLogin_result:new{} local status, res = pcall(self.handler.timLogin, self.handler, args.tid, args.pwd) - if not status then - reply_type = TMessageType.EXCEPTION - result = TApplicationException:new{message = res} - else - result.success = res - end - oprot:writeMessageBegin('timLogin', reply_type, seqid) - result:write(oprot) - oprot:writeMessageEnd() - oprot.trans:flush() + return status, res end function ITimProcessor:process_timAck(seqid, iprot, oprot, server_ctx) @@ -570,18 +543,8 @@ function ITimProcessor:process_timAck(seqid, iprot, oprot, server_ctx) local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() - local result = timAck_result:new{} local status, res = pcall(self.handler.timAck, self.handler, args.ab) - if not status then - reply_type = TMessageType.EXCEPTION - result = TApplicationException:new{message = res} - else - result.success = res - end - oprot:writeMessageBegin('timAck', reply_type, seqid) - result:write(oprot) - oprot:writeMessageEnd() - oprot.trans:flush() + return status, res end function ITimProcessor:process_timPresence(seqid, iprot, oprot, server_ctx) @@ -589,18 +552,8 @@ function ITimProcessor:process_timPresence(seqid, iprot, oprot, server_ctx) local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() - local result = timPresence_result:new{} local status, res = pcall(self.handler.timPresence, self.handler, args.pbean) - if not status then - reply_type = TMessageType.EXCEPTION - result = TApplicationException:new{message = res} - else - result.success = res - end - oprot:writeMessageBegin('timPresence', reply_type, seqid) - result:write(oprot) - oprot:writeMessageEnd() - oprot.trans:flush() + return status, res end function ITimProcessor:process_timMessage(seqid, iprot, oprot, server_ctx) @@ -608,18 +561,8 @@ function ITimProcessor:process_timMessage(seqid, iprot, oprot, server_ctx) local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() - local result = timMessage_result:new{} local status, res = pcall(self.handler.timMessage, self.handler, args.mbean) - if not status then - reply_type = TMessageType.EXCEPTION - result = TApplicationException:new{message = res} - else - result.success = res - end - oprot:writeMessageBegin('timMessage', reply_type, seqid) - result:write(oprot) - oprot:writeMessageEnd() - oprot.trans:flush() + return status, res end function ITimProcessor:process_timPing(seqid, iprot, oprot, server_ctx) @@ -627,18 +570,8 @@ function ITimProcessor:process_timPing(seqid, iprot, oprot, server_ctx) local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() - local result = timPing_result:new{} local status, res = pcall(self.handler.timPing, self.handler, args.threadId) - if not status then - reply_type = TMessageType.EXCEPTION - result = TApplicationException:new{message = res} - else - result.success = res - end - oprot:writeMessageBegin('timPing', reply_type, seqid) - result:write(oprot) - oprot:writeMessageEnd() - oprot.trans:flush() + return status, res end function ITimProcessor:process_timError(seqid, iprot, oprot, server_ctx) @@ -646,18 +579,8 @@ function ITimProcessor:process_timError(seqid, iprot, oprot, server_ctx) local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() - local result = timError_result:new{} local status, res = pcall(self.handler.timError, self.handler, args.e) - if not status then - reply_type = TMessageType.EXCEPTION - result = TApplicationException:new{message = res} - else - result.success = res - end - oprot:writeMessageBegin('timError', reply_type, seqid) - result:write(oprot) - oprot:writeMessageEnd() - oprot.trans:flush() + return status, res end function ITimProcessor:process_timLogout(seqid, iprot, oprot, server_ctx) @@ -665,18 +588,8 @@ function ITimProcessor:process_timLogout(seqid, iprot, oprot, server_ctx) local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() - local result = timLogout_result:new{} local status, res = pcall(self.handler.timLogout, self.handler) - if not status then - reply_type = TMessageType.EXCEPTION - result = TApplicationException:new{message = res} - else - result.success = res - end - oprot:writeMessageBegin('timLogout', reply_type, seqid) - result:write(oprot) - oprot:writeMessageEnd() - oprot.trans:flush() + return status, res end function ITimProcessor:process_timRegist(seqid, iprot, oprot, server_ctx) @@ -684,18 +597,8 @@ function ITimProcessor:process_timRegist(seqid, iprot, oprot, server_ctx) local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() - local result = timRegist_result:new{} local status, res = pcall(self.handler.timRegist, self.handler, args.tid, args.auth) - if not status then - reply_type = TMessageType.EXCEPTION - result = TApplicationException:new{message = res} - else - result.success = res - end - oprot:writeMessageBegin('timRegist', reply_type, seqid) - result:write(oprot) - oprot:writeMessageEnd() - oprot.trans:flush() + return status, res end function ITimProcessor:process_timRoser(seqid, iprot, oprot, server_ctx) @@ -703,18 +606,8 @@ function ITimProcessor:process_timRoser(seqid, iprot, oprot, server_ctx) local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() - local result = timRoser_result:new{} local status, res = pcall(self.handler.timRoser, self.handler, args.roster) - if not status then - reply_type = TMessageType.EXCEPTION - result = TApplicationException:new{message = res} - else - result.success = res - end - oprot:writeMessageBegin('timRoser', reply_type, seqid) - result:write(oprot) - oprot:writeMessageEnd() - oprot.trans:flush() + return status, res end function ITimProcessor:process_timMessageList(seqid, iprot, oprot, server_ctx) @@ -722,18 +615,8 @@ function ITimProcessor:process_timMessageList(seqid, iprot, oprot, server_ctx) local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() - local result = timMessageList_result:new{} local status, res = pcall(self.handler.timMessageList, self.handler, args.mbeanList) - if not status then - reply_type = TMessageType.EXCEPTION - result = TApplicationException:new{message = res} - else - result.success = res - end - oprot:writeMessageBegin('timMessageList', reply_type, seqid) - result:write(oprot) - oprot:writeMessageEnd() - oprot.trans:flush() + return status, res end function ITimProcessor:process_timPresenceList(seqid, iprot, oprot, server_ctx) @@ -741,18 +624,8 @@ function ITimProcessor:process_timPresenceList(seqid, iprot, oprot, server_ctx) local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() - local result = timPresenceList_result:new{} local status, res = pcall(self.handler.timPresenceList, self.handler, args.pbeanList) - if not status then - reply_type = TMessageType.EXCEPTION - result = TApplicationException:new{message = res} - else - result.success = res - end - oprot:writeMessageBegin('timPresenceList', reply_type, seqid) - result:write(oprot) - oprot:writeMessageEnd() - oprot.trans:flush() + return status, res end function ITimProcessor:process_timMessageIq(seqid, iprot, oprot, server_ctx) @@ -760,18 +633,8 @@ function ITimProcessor:process_timMessageIq(seqid, iprot, oprot, server_ctx) local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() - local result = timMessageIq_result:new{} local status, res = pcall(self.handler.timMessageIq, self.handler, args.timMsgIq, args.iqType) - if not status then - reply_type = TMessageType.EXCEPTION - result = TApplicationException:new{message = res} - else - result.success = res - end - oprot:writeMessageBegin('timMessageIq', reply_type, seqid) - result:write(oprot) - oprot:writeMessageEnd() - oprot.trans:flush() + return status, res end function ITimProcessor:process_timMessageResult(seqid, iprot, oprot, server_ctx) @@ -779,18 +642,8 @@ function ITimProcessor:process_timMessageResult(seqid, iprot, oprot, server_ctx) local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() - local result = timMessageResult_result:new{} local status, res = pcall(self.handler.timMessageResult, self.handler, args.mbean) - if not status then - reply_type = TMessageType.EXCEPTION - result = TApplicationException:new{message = res} - else - result.success = res - end - oprot:writeMessageBegin('timMessageResult', reply_type, seqid) - result:write(oprot) - oprot:writeMessageEnd() - oprot.trans:flush() + return status, res end function ITimProcessor:process_timProperty(seqid, iprot, oprot, server_ctx) @@ -798,18 +651,8 @@ function ITimProcessor:process_timProperty(seqid, iprot, oprot, server_ctx) local reply_type = TMessageType.REPLY args:read(iprot) iprot:readMessageEnd() - local result = timProperty_result:new{} local status, res = pcall(self.handler.timProperty, self.handler, args.tpb) - if not status then - reply_type = TMessageType.EXCEPTION - result = TApplicationException:new{message = res} - else - result.success = res - end - oprot:writeMessageBegin('timProperty', reply_type, seqid) - result:write(oprot) - oprot:writeMessageEnd() - oprot.trans:flush() + return status, res end function ITimProcessor:process_timRemoteUserAuth(seqid, iprot, oprot, server_ctx) @@ -829,6 +672,7 @@ function ITimProcessor:process_timRemoteUserAuth(seqid, iprot, oprot, server_ctx result:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() + return status, res end function ITimProcessor:process_timRemoteUserGet(seqid, iprot, oprot, server_ctx) @@ -848,6 +692,7 @@ function ITimProcessor:process_timRemoteUserGet(seqid, iprot, oprot, server_ctx) result:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() + return status, res end function ITimProcessor:process_timRemoteUserEdit(seqid, iprot, oprot, server_ctx) @@ -867,6 +712,7 @@ function ITimProcessor:process_timRemoteUserEdit(seqid, iprot, oprot, server_ctx result:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() + return status, res end function ITimProcessor:process_timResponsePresence(seqid, iprot, oprot, server_ctx) @@ -886,6 +732,7 @@ function ITimProcessor:process_timResponsePresence(seqid, iprot, oprot, server_c result:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() + return status, res end function ITimProcessor:process_timResponseMessage(seqid, iprot, oprot, server_ctx) @@ -905,6 +752,7 @@ function ITimProcessor:process_timResponseMessage(seqid, iprot, oprot, server_ct result:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() + return status, res end function ITimProcessor:process_timResponseMessageIq(seqid, iprot, oprot, server_ctx) @@ -924,6 +772,7 @@ function ITimProcessor:process_timResponseMessageIq(seqid, iprot, oprot, server_ result:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() + return status, res end function ITimProcessor:process_timResponsePresenceList(seqid, iprot, oprot, server_ctx) @@ -943,6 +792,7 @@ function ITimProcessor:process_timResponsePresenceList(seqid, iprot, oprot, serv result:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() + return status, res end function ITimProcessor:process_timResponseMessageList(seqid, iprot, oprot, server_ctx) @@ -962,6 +812,7 @@ function ITimProcessor:process_timResponseMessageList(seqid, iprot, oprot, serve result:write(oprot) oprot:writeMessageEnd() oprot.trans:flush() + return status, res end -- HELPER FUNCTIONS AND STRUCTURES @@ -993,7 +844,7 @@ end function timStream_args:write(oprot) oprot:writeStructBegin('timStream_args') - if self.param then + if self.param ~= nil then oprot:writeFieldBegin('param', TType.STRUCT, 1) self.param:write(oprot) oprot:writeFieldEnd() @@ -1060,12 +911,12 @@ end function timLogin_args:write(oprot) oprot:writeStructBegin('timLogin_args') - if self.tid then + if self.tid ~= nil then oprot:writeFieldBegin('tid', TType.STRUCT, 1) self.tid:write(oprot) oprot:writeFieldEnd() end - if self.pwd then + if self.pwd ~= nil then oprot:writeFieldBegin('pwd', TType.STRING, 2) oprot:writeString(self.pwd) oprot:writeFieldEnd() @@ -1101,7 +952,7 @@ end function timAck_args:write(oprot) oprot:writeStructBegin('timAck_args') - if self.ab then + if self.ab ~= nil then oprot:writeFieldBegin('ab', TType.STRUCT, 1) self.ab:write(oprot) oprot:writeFieldEnd() @@ -1137,7 +988,7 @@ end function timPresence_args:write(oprot) oprot:writeStructBegin('timPresence_args') - if self.pbean then + if self.pbean ~= nil then oprot:writeFieldBegin('pbean', TType.STRUCT, 1) self.pbean:write(oprot) oprot:writeFieldEnd() @@ -1173,7 +1024,7 @@ end function timMessage_args:write(oprot) oprot:writeStructBegin('timMessage_args') - if self.mbean then + if self.mbean ~= nil then oprot:writeFieldBegin('mbean', TType.STRUCT, 1) self.mbean:write(oprot) oprot:writeFieldEnd() @@ -1208,7 +1059,7 @@ end function timPing_args:write(oprot) oprot:writeStructBegin('timPing_args') - if self.threadId then + if self.threadId ~= nil then oprot:writeFieldBegin('threadId', TType.STRING, 1) oprot:writeString(self.threadId) oprot:writeFieldEnd() @@ -1244,7 +1095,7 @@ end function timError_args:write(oprot) oprot:writeStructBegin('timError_args') - if self.e then + if self.e ~= nil then oprot:writeFieldBegin('e', TType.STRUCT, 1) self.e:write(oprot) oprot:writeFieldEnd() @@ -1311,12 +1162,12 @@ end function timRegist_args:write(oprot) oprot:writeStructBegin('timRegist_args') - if self.tid then + if self.tid ~= nil then oprot:writeFieldBegin('tid', TType.STRUCT, 1) self.tid:write(oprot) oprot:writeFieldEnd() end - if self.auth then + if self.auth ~= nil then oprot:writeFieldBegin('auth', TType.STRING, 2) oprot:writeString(self.auth) oprot:writeFieldEnd() @@ -1352,7 +1203,7 @@ end function timRoser_args:write(oprot) oprot:writeStructBegin('timRoser_args') - if self.roster then + if self.roster ~= nil then oprot:writeFieldBegin('roster', TType.STRUCT, 1) self.roster:write(oprot) oprot:writeFieldEnd() @@ -1388,7 +1239,7 @@ end function timMessageList_args:write(oprot) oprot:writeStructBegin('timMessageList_args') - if self.mbeanList then + if self.mbeanList ~= nil then oprot:writeFieldBegin('mbeanList', TType.STRUCT, 1) self.mbeanList:write(oprot) oprot:writeFieldEnd() @@ -1424,7 +1275,7 @@ end function timPresenceList_args:write(oprot) oprot:writeStructBegin('timPresenceList_args') - if self.pbeanList then + if self.pbeanList ~= nil then oprot:writeFieldBegin('pbeanList', TType.STRUCT, 1) self.pbeanList:write(oprot) oprot:writeFieldEnd() @@ -1467,12 +1318,12 @@ end function timMessageIq_args:write(oprot) oprot:writeStructBegin('timMessageIq_args') - if self.timMsgIq then + if self.timMsgIq ~= nil then oprot:writeFieldBegin('timMsgIq', TType.STRUCT, 1) self.timMsgIq:write(oprot) oprot:writeFieldEnd() end - if self.iqType then + if self.iqType ~= nil then oprot:writeFieldBegin('iqType', TType.STRING, 2) oprot:writeString(self.iqType) oprot:writeFieldEnd() @@ -1508,7 +1359,7 @@ end function timMessageResult_args:write(oprot) oprot:writeStructBegin('timMessageResult_args') - if self.mbean then + if self.mbean ~= nil then oprot:writeFieldBegin('mbean', TType.STRUCT, 1) self.mbean:write(oprot) oprot:writeFieldEnd() @@ -1544,7 +1395,7 @@ end function timProperty_args:write(oprot) oprot:writeStructBegin('timProperty_args') - if self.tpb then + if self.tpb ~= nil then oprot:writeFieldBegin('tpb', TType.STRUCT, 1) self.tpb:write(oprot) oprot:writeFieldEnd() @@ -1595,17 +1446,17 @@ end function timRemoteUserAuth_args:write(oprot) oprot:writeStructBegin('timRemoteUserAuth_args') - if self.tid then + if self.tid ~= nil then oprot:writeFieldBegin('tid', TType.STRUCT, 1) self.tid:write(oprot) oprot:writeFieldEnd() end - if self.pwd then + if self.pwd ~= nil then oprot:writeFieldBegin('pwd', TType.STRING, 2) oprot:writeString(self.pwd) oprot:writeFieldEnd() end - if self.auth then + if self.auth ~= nil then oprot:writeFieldBegin('auth', TType.STRUCT, 3) self.auth:write(oprot) oprot:writeFieldEnd() @@ -1641,7 +1492,7 @@ end function timRemoteUserAuth_result:write(oprot) oprot:writeStructBegin('timRemoteUserAuth_result') - if self.success then + if self.success ~= nil then oprot:writeFieldBegin('success', TType.STRUCT, 0) self.success:write(oprot) oprot:writeFieldEnd() @@ -1685,12 +1536,12 @@ end function timRemoteUserGet_args:write(oprot) oprot:writeStructBegin('timRemoteUserGet_args') - if self.tid then + if self.tid ~= nil then oprot:writeFieldBegin('tid', TType.STRUCT, 1) self.tid:write(oprot) oprot:writeFieldEnd() end - if self.auth then + if self.auth ~= nil then oprot:writeFieldBegin('auth', TType.STRUCT, 2) self.auth:write(oprot) oprot:writeFieldEnd() @@ -1726,7 +1577,7 @@ end function timRemoteUserGet_result:write(oprot) oprot:writeStructBegin('timRemoteUserGet_result') - if self.success then + if self.success ~= nil then oprot:writeFieldBegin('success', TType.STRUCT, 0) self.success:write(oprot) oprot:writeFieldEnd() @@ -1778,17 +1629,17 @@ end function timRemoteUserEdit_args:write(oprot) oprot:writeStructBegin('timRemoteUserEdit_args') - if self.tid then + if self.tid ~= nil then oprot:writeFieldBegin('tid', TType.STRUCT, 1) self.tid:write(oprot) oprot:writeFieldEnd() end - if self.ub then + if self.ub ~= nil then oprot:writeFieldBegin('ub', TType.STRUCT, 2) self.ub:write(oprot) oprot:writeFieldEnd() end - if self.auth then + if self.auth ~= nil then oprot:writeFieldBegin('auth', TType.STRUCT, 3) self.auth:write(oprot) oprot:writeFieldEnd() @@ -1824,7 +1675,7 @@ end function timRemoteUserEdit_result:write(oprot) oprot:writeStructBegin('timRemoteUserEdit_result') - if self.success then + if self.success ~= nil then oprot:writeFieldBegin('success', TType.STRUCT, 0) self.success:write(oprot) oprot:writeFieldEnd() @@ -1868,12 +1719,12 @@ end function timResponsePresence_args:write(oprot) oprot:writeStructBegin('timResponsePresence_args') - if self.pbean then + if self.pbean ~= nil then oprot:writeFieldBegin('pbean', TType.STRUCT, 1) self.pbean:write(oprot) oprot:writeFieldEnd() end - if self.auth then + if self.auth ~= nil then oprot:writeFieldBegin('auth', TType.STRUCT, 2) self.auth:write(oprot) oprot:writeFieldEnd() @@ -1909,7 +1760,7 @@ end function timResponsePresence_result:write(oprot) oprot:writeStructBegin('timResponsePresence_result') - if self.success then + if self.success ~= nil then oprot:writeFieldBegin('success', TType.STRUCT, 0) self.success:write(oprot) oprot:writeFieldEnd() @@ -1953,12 +1804,12 @@ end function timResponseMessage_args:write(oprot) oprot:writeStructBegin('timResponseMessage_args') - if self.mbean then + if self.mbean ~= nil then oprot:writeFieldBegin('mbean', TType.STRUCT, 1) self.mbean:write(oprot) oprot:writeFieldEnd() end - if self.auth then + if self.auth ~= nil then oprot:writeFieldBegin('auth', TType.STRUCT, 2) self.auth:write(oprot) oprot:writeFieldEnd() @@ -1994,7 +1845,7 @@ end function timResponseMessage_result:write(oprot) oprot:writeStructBegin('timResponseMessage_result') - if self.success then + if self.success ~= nil then oprot:writeFieldBegin('success', TType.STRUCT, 0) self.success:write(oprot) oprot:writeFieldEnd() @@ -2045,17 +1896,17 @@ end function timResponseMessageIq_args:write(oprot) oprot:writeStructBegin('timResponseMessageIq_args') - if self.timMsgIq then + if self.timMsgIq ~= nil then oprot:writeFieldBegin('timMsgIq', TType.STRUCT, 1) self.timMsgIq:write(oprot) oprot:writeFieldEnd() end - if self.iqType then + if self.iqType ~= nil then oprot:writeFieldBegin('iqType', TType.STRING, 2) oprot:writeString(self.iqType) oprot:writeFieldEnd() end - if self.auth then + if self.auth ~= nil then oprot:writeFieldBegin('auth', TType.STRUCT, 3) self.auth:write(oprot) oprot:writeFieldEnd() @@ -2091,7 +1942,7 @@ end function timResponseMessageIq_result:write(oprot) oprot:writeStructBegin('timResponseMessageIq_result') - if self.success then + if self.success ~= nil then oprot:writeFieldBegin('success', TType.STRUCT, 0) self.success:write(oprot) oprot:writeFieldEnd() @@ -2135,12 +1986,12 @@ end function timResponsePresenceList_args:write(oprot) oprot:writeStructBegin('timResponsePresenceList_args') - if self.pbeanList then + if self.pbeanList ~= nil then oprot:writeFieldBegin('pbeanList', TType.STRUCT, 1) self.pbeanList:write(oprot) oprot:writeFieldEnd() end - if self.auth then + if self.auth ~= nil then oprot:writeFieldBegin('auth', TType.STRUCT, 2) self.auth:write(oprot) oprot:writeFieldEnd() @@ -2176,7 +2027,7 @@ end function timResponsePresenceList_result:write(oprot) oprot:writeStructBegin('timResponsePresenceList_result') - if self.success then + if self.success ~= nil then oprot:writeFieldBegin('success', TType.STRUCT, 0) self.success:write(oprot) oprot:writeFieldEnd() @@ -2220,12 +2071,12 @@ end function timResponseMessageList_args:write(oprot) oprot:writeStructBegin('timResponseMessageList_args') - if self.mbeanList then + if self.mbeanList ~= nil then oprot:writeFieldBegin('mbeanList', TType.STRUCT, 1) self.mbeanList:write(oprot) oprot:writeFieldEnd() end - if self.auth then + if self.auth ~= nil then oprot:writeFieldBegin('auth', TType.STRUCT, 2) self.auth:write(oprot) oprot:writeFieldEnd() @@ -2261,7 +2112,7 @@ end function timResponseMessageList_result:write(oprot) oprot:writeStructBegin('timResponseMessageList_result') - if self.success then + if self.success ~= nil then oprot:writeFieldBegin('success', TType.STRUCT, 0) self.success:write(oprot) oprot:writeFieldEnd() diff --git a/protocols/gen-lua/tim_ttypes.lua b/protocols/gen-lua/tim_ttypes.lua index b55870d..ac47e53 100644 --- a/protocols/gen-lua/tim_ttypes.lua +++ b/protocols/gen-lua/tim_ttypes.lua @@ -42,12 +42,12 @@ end function TimError:write(oprot) oprot:writeStructBegin('TimError') - if self.errCode then + if self.errCode ~= nil then oprot:writeFieldBegin('errCode', TType.I32, 1) oprot:writeI32(self.errCode) oprot:writeFieldEnd() end - if self.errMsg then + if self.errMsg ~= nil then oprot:writeFieldBegin('errMsg', TType.STRING, 2) oprot:writeString(self.errMsg) oprot:writeFieldEnd() @@ -89,12 +89,12 @@ end function TimNode:write(oprot) oprot:writeStructBegin('TimNode') - if self.key then + if self.key ~= nil then oprot:writeFieldBegin('key', TType.STRING, 1) oprot:writeString(self.key) oprot:writeFieldEnd() end - if self.value then + if self.value ~= nil then oprot:writeFieldBegin('value', TType.STRING, 2) oprot:writeString(self.value) oprot:writeFieldEnd() @@ -179,22 +179,22 @@ end function TimAckBean:write(oprot) oprot:writeStructBegin('TimAckBean') - if self.id then + if self.id ~= nil then oprot:writeFieldBegin('id', TType.STRING, 1) oprot:writeString(self.id) oprot:writeFieldEnd() end - if self.ackType then + if self.ackType ~= nil then oprot:writeFieldBegin('ackType', TType.STRING, 2) oprot:writeString(self.ackType) oprot:writeFieldEnd() end - if self.ackStatus then + if self.ackStatus ~= nil then oprot:writeFieldBegin('ackStatus', TType.STRING, 3) oprot:writeString(self.ackStatus) oprot:writeFieldEnd() end - if self.extraList then + if self.extraList ~= nil then oprot:writeFieldBegin('extraList', TType.LIST, 4) oprot:writeListBegin(TType.STRUCT, #self.extraList) for _,iter11 in ipairs(self.extraList) do @@ -203,12 +203,12 @@ function TimAckBean:write(oprot) oprot:writeListEnd() oprot:writeFieldEnd() end - if self.err then + if self.err ~= nil then oprot:writeFieldBegin('err', TType.STRUCT, 5) self.err:write(oprot) oprot:writeFieldEnd() end - if self.extraMap then + if self.extraMap ~= nil then oprot:writeFieldBegin('extraMap', TType.MAP, 6) oprot:writeMapBegin(TType.STRING, TType.STRING, ttable_size(self.extraMap)) for kiter12,viter13 in pairs(self.extraMap) do @@ -262,17 +262,17 @@ end function TimHBean:write(oprot) oprot:writeStructBegin('TimHBean') - if self.chl then + if self.chl ~= nil then oprot:writeFieldBegin('chl', TType.I32, 1) oprot:writeI32(self.chl) oprot:writeFieldEnd() end - if self.platform then + if self.platform ~= nil then oprot:writeFieldBegin('platform', TType.I32, 2) oprot:writeI32(self.platform) oprot:writeFieldEnd() end - if self.version then + if self.version ~= nil then oprot:writeFieldBegin('version', TType.I16, 3) oprot:writeI16(self.version) oprot:writeFieldEnd() @@ -363,22 +363,22 @@ end function TimParam:write(oprot) oprot:writeStructBegin('TimParam') - if self.timestamp then + if self.timestamp ~= nil then oprot:writeFieldBegin('timestamp', TType.STRING, 1) oprot:writeString(self.timestamp) oprot:writeFieldEnd() end - if self.version then + if self.version ~= nil then oprot:writeFieldBegin('version', TType.I16, 2) oprot:writeI16(self.version) oprot:writeFieldEnd() end - if self.lang then + if self.lang ~= nil then oprot:writeFieldBegin('lang', TType.STRING, 3) oprot:writeString(self.lang) oprot:writeFieldEnd() end - if self.extraList then + if self.extraList ~= nil then oprot:writeFieldBegin('extraList', TType.LIST, 4) oprot:writeListBegin(TType.STRUCT, #self.extraList) for _,iter25 in ipairs(self.extraList) do @@ -387,7 +387,7 @@ function TimParam:write(oprot) oprot:writeListEnd() oprot:writeFieldEnd() end - if self.extraMap then + if self.extraMap ~= nil then oprot:writeFieldBegin('extraMap', TType.MAP, 5) oprot:writeMapBegin(TType.STRING, TType.STRING, ttable_size(self.extraMap)) for kiter26,viter27 in pairs(self.extraMap) do @@ -397,12 +397,12 @@ function TimParam:write(oprot) oprot:writeMapEnd() oprot:writeFieldEnd() end - if self.interflow then + if self.interflow ~= nil then oprot:writeFieldBegin('interflow', TType.STRING, 6) oprot:writeString(self.interflow) oprot:writeFieldEnd() end - if self.tls then + if self.tls ~= nil then oprot:writeFieldBegin('tls', TType.STRING, 7) oprot:writeString(self.tls) oprot:writeFieldEnd() @@ -444,12 +444,12 @@ end function TimTime:write(oprot) oprot:writeStructBegin('TimTime') - if self.timestamp then + if self.timestamp ~= nil then oprot:writeFieldBegin('timestamp', TType.STRING, 1) oprot:writeString(self.timestamp) oprot:writeFieldEnd() end - if self.formattime then + if self.formattime ~= nil then oprot:writeFieldBegin('formattime', TType.STRING, 2) oprot:writeString(self.formattime) oprot:writeFieldEnd() @@ -526,22 +526,22 @@ end function TimArea:write(oprot) oprot:writeStructBegin('TimArea') - if self.country then + if self.country ~= nil then oprot:writeFieldBegin('country', TType.STRING, 1) oprot:writeString(self.country) oprot:writeFieldEnd() end - if self.province then + if self.province ~= nil then oprot:writeFieldBegin('province', TType.STRING, 2) oprot:writeString(self.province) oprot:writeFieldEnd() end - if self.city then + if self.city ~= nil then oprot:writeFieldBegin('city', TType.STRING, 3) oprot:writeString(self.city) oprot:writeFieldEnd() end - if self.extraList then + if self.extraList ~= nil then oprot:writeFieldBegin('extraList', TType.LIST, 4) oprot:writeListBegin(TType.STRUCT, #self.extraList) for _,iter39 in ipairs(self.extraList) do @@ -550,7 +550,7 @@ function TimArea:write(oprot) oprot:writeListEnd() oprot:writeFieldEnd() end - if self.extraMap then + if self.extraMap ~= nil then oprot:writeFieldBegin('extraMap', TType.MAP, 5) oprot:writeMapBegin(TType.STRING, TType.STRING, ttable_size(self.extraMap)) for kiter40,viter41 in pairs(self.extraMap) do @@ -639,27 +639,27 @@ end function Tid:write(oprot) oprot:writeStructBegin('Tid') - if self.name then + if self.name ~= nil then oprot:writeFieldBegin('name', TType.STRING, 1) oprot:writeString(self.name) oprot:writeFieldEnd() end - if self.domain then + if self.domain ~= nil then oprot:writeFieldBegin('domain', TType.STRING, 2) oprot:writeString(self.domain) oprot:writeFieldEnd() end - if self.resource then + if self.resource ~= nil then oprot:writeFieldBegin('resource', TType.STRING, 3) oprot:writeString(self.resource) oprot:writeFieldEnd() end - if self.type then + if self.type ~= nil then oprot:writeFieldBegin('type', TType.STRING, 4) oprot:writeString(self.type) oprot:writeFieldEnd() end - if self.extraList then + if self.extraList ~= nil then oprot:writeFieldBegin('extraList', TType.LIST, 5) oprot:writeListBegin(TType.STRUCT, #self.extraList) for _,iter53 in ipairs(self.extraList) do @@ -668,7 +668,7 @@ function Tid:write(oprot) oprot:writeListEnd() oprot:writeFieldEnd() end - if self.extraMap then + if self.extraMap ~= nil then oprot:writeFieldBegin('extraMap', TType.MAP, 6) oprot:writeMapBegin(TType.STRING, TType.STRING, ttable_size(self.extraMap)) for kiter54,viter55 in pairs(self.extraMap) do @@ -800,47 +800,47 @@ end function TimUserBean:write(oprot) oprot:writeStructBegin('TimUserBean') - if self.tid then + if self.tid ~= nil then oprot:writeFieldBegin('tid', TType.STRUCT, 1) self.tid:write(oprot) oprot:writeFieldEnd() end - if self.nickname then + if self.nickname ~= nil then oprot:writeFieldBegin('nickname', TType.STRING, 2) oprot:writeString(self.nickname) oprot:writeFieldEnd() end - if self.remarkname then + if self.remarkname ~= nil then oprot:writeFieldBegin('remarkname', TType.STRING, 3) oprot:writeString(self.remarkname) oprot:writeFieldEnd() end - if self.brithday then + if self.brithday ~= nil then oprot:writeFieldBegin('brithday', TType.STRING, 4) oprot:writeString(self.brithday) oprot:writeFieldEnd() end - if self.gender then + if self.gender ~= nil then oprot:writeFieldBegin('gender', TType.I16, 5) oprot:writeI16(self.gender) oprot:writeFieldEnd() end - if self.headurl then + if self.headurl ~= nil then oprot:writeFieldBegin('headurl', TType.STRING, 6) oprot:writeString(self.headurl) oprot:writeFieldEnd() end - if self.area then + if self.area ~= nil then oprot:writeFieldBegin('area', TType.STRUCT, 7) self.area:write(oprot) oprot:writeFieldEnd() end - if self.headbyte then + if self.headbyte ~= nil then oprot:writeFieldBegin('headbyte', TType.STRING, 8) oprot:writeString(self.headbyte) oprot:writeFieldEnd() end - if self.photoBytes then + if self.photoBytes ~= nil then oprot:writeFieldBegin('photoBytes', TType.LIST, 9) oprot:writeListBegin(TType.STRING, #self.photoBytes) for _,iter72 in ipairs(self.photoBytes) do @@ -849,7 +849,7 @@ function TimUserBean:write(oprot) oprot:writeListEnd() oprot:writeFieldEnd() end - if self.extraList then + if self.extraList ~= nil then oprot:writeFieldBegin('extraList', TType.LIST, 10) oprot:writeListBegin(TType.STRUCT, #self.extraList) for _,iter73 in ipairs(self.extraList) do @@ -858,7 +858,7 @@ function TimUserBean:write(oprot) oprot:writeListEnd() oprot:writeFieldEnd() end - if self.extraMap then + if self.extraMap ~= nil then oprot:writeFieldBegin('extraMap', TType.MAP, 11) oprot:writeMapBegin(TType.STRING, TType.STRING, ttable_size(self.extraMap)) for kiter74,viter75 in pairs(self.extraMap) do @@ -992,17 +992,17 @@ end function TimRoom:write(oprot) oprot:writeStructBegin('TimRoom') - if self.tid then + if self.tid ~= nil then oprot:writeFieldBegin('tid', TType.STRUCT, 1) self.tid:write(oprot) oprot:writeFieldEnd() end - if self.founderTid then + if self.founderTid ~= nil then oprot:writeFieldBegin('founderTid', TType.STRUCT, 2) self.founderTid:write(oprot) oprot:writeFieldEnd() end - if self.HostsTid then + if self.HostsTid ~= nil then oprot:writeFieldBegin('HostsTid', TType.LIST, 3) oprot:writeListBegin(TType.STRUCT, #self.HostsTid) for _,iter97 in ipairs(self.HostsTid) do @@ -1011,7 +1011,7 @@ function TimRoom:write(oprot) oprot:writeListEnd() oprot:writeFieldEnd() end - if self.membersTid then + if self.membersTid ~= nil then oprot:writeFieldBegin('membersTid', TType.LIST, 4) oprot:writeListBegin(TType.STRUCT, #self.membersTid) for _,iter98 in ipairs(self.membersTid) do @@ -1020,27 +1020,27 @@ function TimRoom:write(oprot) oprot:writeListEnd() oprot:writeFieldEnd() end - if self.headurl then + if self.headurl ~= nil then oprot:writeFieldBegin('headurl', TType.STRING, 5) oprot:writeString(self.headurl) oprot:writeFieldEnd() end - if self.roomName then + if self.roomName ~= nil then oprot:writeFieldBegin('roomName', TType.STRING, 6) oprot:writeString(self.roomName) oprot:writeFieldEnd() end - if self.desc then + if self.desc ~= nil then oprot:writeFieldBegin('desc', TType.STRING, 7) oprot:writeString(self.desc) oprot:writeFieldEnd() end - if self.createTime then + if self.createTime ~= nil then oprot:writeFieldBegin('createTime', TType.STRUCT, 8) self.createTime:write(oprot) oprot:writeFieldEnd() end - if self.extraList then + if self.extraList ~= nil then oprot:writeFieldBegin('extraList', TType.LIST, 9) oprot:writeListBegin(TType.STRUCT, #self.extraList) for _,iter99 in ipairs(self.extraList) do @@ -1049,7 +1049,7 @@ function TimRoom:write(oprot) oprot:writeListEnd() oprot:writeFieldEnd() end - if self.extraMap then + if self.extraMap ~= nil then oprot:writeFieldBegin('extraMap', TType.MAP, 10) oprot:writeMapBegin(TType.STRING, TType.STRING, ttable_size(self.extraMap)) for kiter100,viter101 in pairs(self.extraMap) do @@ -1177,47 +1177,47 @@ end function TimPBean:write(oprot) oprot:writeStructBegin('TimPBean') - if self.threadId then + if self.threadId ~= nil then oprot:writeFieldBegin('threadId', TType.STRING, 1) oprot:writeString(self.threadId) oprot:writeFieldEnd() end - if self.fromTid then + if self.fromTid ~= nil then oprot:writeFieldBegin('fromTid', TType.STRUCT, 2) self.fromTid:write(oprot) oprot:writeFieldEnd() end - if self.toTid then + if self.toTid ~= nil then oprot:writeFieldBegin('toTid', TType.STRUCT, 3) self.toTid:write(oprot) oprot:writeFieldEnd() end - if self.status then + if self.status ~= nil then oprot:writeFieldBegin('status', TType.STRING, 4) oprot:writeString(self.status) oprot:writeFieldEnd() end - if self.type then + if self.type ~= nil then oprot:writeFieldBegin('type', TType.STRING, 5) oprot:writeString(self.type) oprot:writeFieldEnd() end - if self.priority then + if self.priority ~= nil then oprot:writeFieldBegin('priority', TType.I32, 6) oprot:writeI32(self.priority) oprot:writeFieldEnd() end - if self.show then + if self.show ~= nil then oprot:writeFieldBegin('show', TType.STRING, 7) oprot:writeString(self.show) oprot:writeFieldEnd() end - if self.leaguerTid then + if self.leaguerTid ~= nil then oprot:writeFieldBegin('leaguerTid', TType.STRUCT, 8) self.leaguerTid:write(oprot) oprot:writeFieldEnd() end - if self.extraList then + if self.extraList ~= nil then oprot:writeFieldBegin('extraList', TType.LIST, 9) oprot:writeListBegin(TType.STRUCT, #self.extraList) for _,iter113 in ipairs(self.extraList) do @@ -1226,12 +1226,12 @@ function TimPBean:write(oprot) oprot:writeListEnd() oprot:writeFieldEnd() end - if self.error then + if self.error ~= nil then oprot:writeFieldBegin('error', TType.STRUCT, 10) self.error:write(oprot) oprot:writeFieldEnd() end - if self.extraMap then + if self.extraMap ~= nil then oprot:writeFieldBegin('extraMap', TType.MAP, 11) oprot:writeMapBegin(TType.STRING, TType.STRING, ttable_size(self.extraMap)) for kiter114,viter115 in pairs(self.extraMap) do @@ -1381,52 +1381,52 @@ end function TimMBean:write(oprot) oprot:writeStructBegin('TimMBean') - if self.threadId then + if self.threadId ~= nil then oprot:writeFieldBegin('threadId', TType.STRING, 1) oprot:writeString(self.threadId) oprot:writeFieldEnd() end - if self.mid then + if self.mid ~= nil then oprot:writeFieldBegin('mid', TType.STRING, 2) oprot:writeString(self.mid) oprot:writeFieldEnd() end - if self.fromTid then + if self.fromTid ~= nil then oprot:writeFieldBegin('fromTid', TType.STRUCT, 3) self.fromTid:write(oprot) oprot:writeFieldEnd() end - if self.toTid then + if self.toTid ~= nil then oprot:writeFieldBegin('toTid', TType.STRUCT, 4) self.toTid:write(oprot) oprot:writeFieldEnd() end - if self.body then + if self.body ~= nil then oprot:writeFieldBegin('body', TType.STRING, 5) oprot:writeString(self.body) oprot:writeFieldEnd() end - if self.type then + if self.type ~= nil then oprot:writeFieldBegin('type', TType.STRING, 6) oprot:writeString(self.type) oprot:writeFieldEnd() end - if self.msgType then + if self.msgType ~= nil then oprot:writeFieldBegin('msgType', TType.I16, 7) oprot:writeI16(self.msgType) oprot:writeFieldEnd() end - if self.offline then + if self.offline ~= nil then oprot:writeFieldBegin('offline', TType.STRUCT, 8) self.offline:write(oprot) oprot:writeFieldEnd() end - if self.leaguerTid then + if self.leaguerTid ~= nil then oprot:writeFieldBegin('leaguerTid', TType.STRUCT, 9) self.leaguerTid:write(oprot) oprot:writeFieldEnd() end - if self.extraList then + if self.extraList ~= nil then oprot:writeFieldBegin('extraList', TType.LIST, 10) oprot:writeListBegin(TType.STRUCT, #self.extraList) for _,iter127 in ipairs(self.extraList) do @@ -1435,17 +1435,17 @@ function TimMBean:write(oprot) oprot:writeListEnd() oprot:writeFieldEnd() end - if self.timestamp then + if self.timestamp ~= nil then oprot:writeFieldBegin('timestamp', TType.STRING, 11) oprot:writeString(self.timestamp) oprot:writeFieldEnd() end - if self.error then + if self.error ~= nil then oprot:writeFieldBegin('error', TType.STRUCT, 12) self.error:write(oprot) oprot:writeFieldEnd() end - if self.extraMap then + if self.extraMap ~= nil then oprot:writeFieldBegin('extraMap', TType.MAP, 13) oprot:writeMapBegin(TType.STRING, TType.STRING, ttable_size(self.extraMap)) for kiter128,viter129 in pairs(self.extraMap) do @@ -1455,7 +1455,7 @@ function TimMBean:write(oprot) oprot:writeMapEnd() oprot:writeFieldEnd() end - if self.readstatus then + if self.readstatus ~= nil then oprot:writeFieldBegin('readstatus', TType.I16, 14) oprot:writeI16(self.readstatus) oprot:writeFieldEnd() @@ -1549,27 +1549,27 @@ end function TimIqBean:write(oprot) oprot:writeStructBegin('TimIqBean') - if self.threadId then + if self.threadId ~= nil then oprot:writeFieldBegin('threadId', TType.STRING, 1) oprot:writeString(self.threadId) oprot:writeFieldEnd() end - if self.fromTid then + if self.fromTid ~= nil then oprot:writeFieldBegin('fromTid', TType.STRUCT, 2) self.fromTid:write(oprot) oprot:writeFieldEnd() end - if self.toTid then + if self.toTid ~= nil then oprot:writeFieldBegin('toTid', TType.STRUCT, 3) self.toTid:write(oprot) oprot:writeFieldEnd() end - if self.type then + if self.type ~= nil then oprot:writeFieldBegin('type', TType.STRING, 4) oprot:writeString(self.type) oprot:writeFieldEnd() end - if self.extraList then + if self.extraList ~= nil then oprot:writeFieldBegin('extraList', TType.LIST, 5) oprot:writeListBegin(TType.STRUCT, #self.extraList) for _,iter141 in ipairs(self.extraList) do @@ -1578,12 +1578,12 @@ function TimIqBean:write(oprot) oprot:writeListEnd() oprot:writeFieldEnd() end - if self.error then + if self.error ~= nil then oprot:writeFieldBegin('error', TType.STRUCT, 6) self.error:write(oprot) oprot:writeFieldEnd() end - if self.extraMap then + if self.extraMap ~= nil then oprot:writeFieldBegin('extraMap', TType.MAP, 7) oprot:writeMapBegin(TType.STRING, TType.STRING, ttable_size(self.extraMap)) for kiter142,viter143 in pairs(self.extraMap) do @@ -1652,22 +1652,22 @@ end function TimRoster:write(oprot) oprot:writeStructBegin('TimRoster') - if self.subscription then + if self.subscription ~= nil then oprot:writeFieldBegin('subscription', TType.STRING, 1) oprot:writeString(self.subscription) oprot:writeFieldEnd() end - if self.tid then + if self.tid ~= nil then oprot:writeFieldBegin('tid', TType.STRUCT, 2) self.tid:write(oprot) oprot:writeFieldEnd() end - if self.name then + if self.name ~= nil then oprot:writeFieldBegin('name', TType.STRING, 3) oprot:writeString(self.name) oprot:writeFieldEnd() end - if self.extraMap then + if self.extraMap ~= nil then oprot:writeFieldBegin('extraMap', TType.MAP, 4) oprot:writeMapBegin(TType.STRING, TType.STRING, ttable_size(self.extraMap)) for kiter150,viter151 in pairs(self.extraMap) do @@ -1730,17 +1730,17 @@ end function TimRemoteUserBean:write(oprot) oprot:writeStructBegin('TimRemoteUserBean') - if self.error then + if self.error ~= nil then oprot:writeFieldBegin('error', TType.STRUCT, 1) self.error:write(oprot) oprot:writeFieldEnd() end - if self.ub then + if self.ub ~= nil then oprot:writeFieldBegin('ub', TType.STRUCT, 2) self.ub:write(oprot) oprot:writeFieldEnd() end - if self.extraMap then + if self.extraMap ~= nil then oprot:writeFieldBegin('extraMap', TType.MAP, 3) oprot:writeMapBegin(TType.STRING, TType.STRING, ttable_size(self.extraMap)) for kiter158,viter159 in pairs(self.extraMap) do @@ -1803,17 +1803,17 @@ end function TimRemoteRoom:write(oprot) oprot:writeStructBegin('TimRemoteRoom') - if self.error then + if self.error ~= nil then oprot:writeFieldBegin('error', TType.STRUCT, 1) self.error:write(oprot) oprot:writeFieldEnd() end - if self.room then + if self.room ~= nil then oprot:writeFieldBegin('room', TType.STRUCT, 2) self.room:write(oprot) oprot:writeFieldEnd() end - if self.extraMap then + if self.extraMap ~= nil then oprot:writeFieldBegin('extraMap', TType.MAP, 3) oprot:writeMapBegin(TType.STRING, TType.STRING, ttable_size(self.extraMap)) for kiter166,viter167 in pairs(self.extraMap) do @@ -1889,17 +1889,17 @@ end function TimResponseBean:write(oprot) oprot:writeStructBegin('TimResponseBean') - if self.threadId then + if self.threadId ~= nil then oprot:writeFieldBegin('threadId', TType.STRING, 1) oprot:writeString(self.threadId) oprot:writeFieldEnd() end - if self.error then + if self.error ~= nil then oprot:writeFieldBegin('error', TType.STRUCT, 2) self.error:write(oprot) oprot:writeFieldEnd() end - if self.extraList then + if self.extraList ~= nil then oprot:writeFieldBegin('extraList', TType.LIST, 3) oprot:writeListBegin(TType.STRUCT, #self.extraList) for _,iter179 in ipairs(self.extraList) do @@ -1908,7 +1908,7 @@ function TimResponseBean:write(oprot) oprot:writeListEnd() oprot:writeFieldEnd() end - if self.extraMap then + if self.extraMap ~= nil then oprot:writeFieldBegin('extraMap', TType.MAP, 4) oprot:writeMapBegin(TType.STRING, TType.STRING, ttable_size(self.extraMap)) for kiter180,viter181 in pairs(self.extraMap) do @@ -1999,37 +1999,37 @@ end function TimSock5Bean:write(oprot) oprot:writeStructBegin('TimSock5Bean') - if self.fromTid then + if self.fromTid ~= nil then oprot:writeFieldBegin('fromTid', TType.STRUCT, 1) self.fromTid:write(oprot) oprot:writeFieldEnd() end - if self.toTid then + if self.toTid ~= nil then oprot:writeFieldBegin('toTid', TType.STRUCT, 2) self.toTid:write(oprot) oprot:writeFieldEnd() end - if self.addr then + if self.addr ~= nil then oprot:writeFieldBegin('addr', TType.STRING, 3) oprot:writeString(self.addr) oprot:writeFieldEnd() end - if self.port then + if self.port ~= nil then oprot:writeFieldBegin('port', TType.I32, 4) oprot:writeI32(self.port) oprot:writeFieldEnd() end - if self.transport then + if self.transport ~= nil then oprot:writeFieldBegin('transport', TType.I16, 5) oprot:writeI16(self.transport) oprot:writeFieldEnd() end - if self.pubId then + if self.pubId ~= nil then oprot:writeFieldBegin('pubId', TType.STRING, 6) oprot:writeString(self.pubId) oprot:writeFieldEnd() end - if self.extraMap then + if self.extraMap ~= nil then oprot:writeFieldBegin('extraMap', TType.MAP, 7) oprot:writeMapBegin(TType.STRING, TType.STRING, ttable_size(self.extraMap)) for kiter188,viter189 in pairs(self.extraMap) do @@ -2103,17 +2103,17 @@ end function TimSock5Bytes:write(oprot) oprot:writeStructBegin('TimSock5Bytes') - if self.pubId then + if self.pubId ~= nil then oprot:writeFieldBegin('pubId', TType.STRING, 1) oprot:writeString(self.pubId) oprot:writeFieldEnd() end - if self.index then + if self.index ~= nil then oprot:writeFieldBegin('index', TType.I32, 2) oprot:writeI32(self.index) oprot:writeFieldEnd() end - if self.bytes then + if self.bytes ~= nil then oprot:writeFieldBegin('bytes', TType.LIST, 3) oprot:writeListBegin(TType.STRING, #self.bytes) for _,iter201 in ipairs(self.bytes) do @@ -2122,7 +2122,7 @@ function TimSock5Bytes:write(oprot) oprot:writeListEnd() oprot:writeFieldEnd() end - if self.extraMap then + if self.extraMap ~= nil then oprot:writeFieldBegin('extraMap', TType.MAP, 4) oprot:writeMapBegin(TType.STRING, TType.STRING, ttable_size(self.extraMap)) for kiter202,viter203 in pairs(self.extraMap) do @@ -2190,22 +2190,22 @@ end function TimPage:write(oprot) oprot:writeStructBegin('TimPage') - if self.fromTimeStamp then + if self.fromTimeStamp ~= nil then oprot:writeFieldBegin('fromTimeStamp', TType.STRING, 1) oprot:writeString(self.fromTimeStamp) oprot:writeFieldEnd() end - if self.toTimeStamp then + if self.toTimeStamp ~= nil then oprot:writeFieldBegin('toTimeStamp', TType.STRING, 2) oprot:writeString(self.toTimeStamp) oprot:writeFieldEnd() end - if self.limitCount then + if self.limitCount ~= nil then oprot:writeFieldBegin('limitCount', TType.I32, 3) oprot:writeI32(self.limitCount) oprot:writeFieldEnd() end - if self.extraMap then + if self.extraMap ~= nil then oprot:writeFieldBegin('extraMap', TType.MAP, 4) oprot:writeMapBegin(TType.STRING, TType.STRING, ttable_size(self.extraMap)) for kiter210,viter211 in pairs(self.extraMap) do @@ -2286,7 +2286,7 @@ end function TimMessageIq:write(oprot) oprot:writeStructBegin('TimMessageIq') - if self.tidlist then + if self.tidlist ~= nil then oprot:writeFieldBegin('tidlist', TType.LIST, 1) oprot:writeListBegin(TType.STRING, #self.tidlist) for _,iter228 in ipairs(self.tidlist) do @@ -2295,12 +2295,12 @@ function TimMessageIq:write(oprot) oprot:writeListEnd() oprot:writeFieldEnd() end - if self.timPage then + if self.timPage ~= nil then oprot:writeFieldBegin('timPage', TType.STRUCT, 2) self.timPage:write(oprot) oprot:writeFieldEnd() end - if self.midlist then + if self.midlist ~= nil then oprot:writeFieldBegin('midlist', TType.LIST, 3) oprot:writeListBegin(TType.STRING, #self.midlist) for _,iter229 in ipairs(self.midlist) do @@ -2309,7 +2309,7 @@ function TimMessageIq:write(oprot) oprot:writeListEnd() oprot:writeFieldEnd() end - if self.extraMap then + if self.extraMap ~= nil then oprot:writeFieldBegin('extraMap', TType.MAP, 4) oprot:writeMapBegin(TType.STRING, TType.STRING, ttable_size(self.extraMap)) for kiter230,viter231 in pairs(self.extraMap) do @@ -2363,17 +2363,17 @@ end function TimAuth:write(oprot) oprot:writeStructBegin('TimAuth') - if self.domain then + if self.domain ~= nil then oprot:writeFieldBegin('domain', TType.STRING, 1) oprot:writeString(self.domain) oprot:writeFieldEnd() end - if self.username then + if self.username ~= nil then oprot:writeFieldBegin('username', TType.STRING, 2) oprot:writeString(self.username) oprot:writeFieldEnd() end - if self.pwd then + if self.pwd ~= nil then oprot:writeFieldBegin('pwd', TType.STRING, 3) oprot:writeString(self.pwd) oprot:writeFieldEnd() @@ -2443,12 +2443,12 @@ end function TimMBeanList:write(oprot) oprot:writeStructBegin('TimMBeanList') - if self.threadId then + if self.threadId ~= nil then oprot:writeFieldBegin('threadId', TType.STRING, 1) oprot:writeString(self.threadId) oprot:writeFieldEnd() end - if self.timMBeanList then + if self.timMBeanList ~= nil then oprot:writeFieldBegin('timMBeanList', TType.LIST, 2) oprot:writeListBegin(TType.STRUCT, #self.timMBeanList) for _,iter243 in ipairs(self.timMBeanList) do @@ -2457,12 +2457,12 @@ function TimMBeanList:write(oprot) oprot:writeListEnd() oprot:writeFieldEnd() end - if self.reqType then + if self.reqType ~= nil then oprot:writeFieldBegin('reqType', TType.STRING, 3) oprot:writeString(self.reqType) oprot:writeFieldEnd() end - if self.extraMap then + if self.extraMap ~= nil then oprot:writeFieldBegin('extraMap', TType.MAP, 4) oprot:writeMapBegin(TType.STRING, TType.STRING, ttable_size(self.extraMap)) for kiter244,viter245 in pairs(self.extraMap) do @@ -2537,12 +2537,12 @@ end function TimPBeanList:write(oprot) oprot:writeStructBegin('TimPBeanList') - if self.threadId then + if self.threadId ~= nil then oprot:writeFieldBegin('threadId', TType.STRING, 1) oprot:writeString(self.threadId) oprot:writeFieldEnd() end - if self.timPBeanList then + if self.timPBeanList ~= nil then oprot:writeFieldBegin('timPBeanList', TType.LIST, 2) oprot:writeListBegin(TType.STRUCT, #self.timPBeanList) for _,iter257 in ipairs(self.timPBeanList) do @@ -2551,12 +2551,12 @@ function TimPBeanList:write(oprot) oprot:writeListEnd() oprot:writeFieldEnd() end - if self.reqType then + if self.reqType ~= nil then oprot:writeFieldBegin('reqType', TType.STRING, 3) oprot:writeString(self.reqType) oprot:writeFieldEnd() end - if self.extraMap then + if self.extraMap ~= nil then oprot:writeFieldBegin('extraMap', TType.MAP, 4) oprot:writeMapBegin(TType.STRING, TType.STRING, ttable_size(self.extraMap)) for kiter258,viter259 in pairs(self.extraMap) do @@ -2610,17 +2610,17 @@ end function TimPropertyBean:write(oprot) oprot:writeStructBegin('TimPropertyBean') - if self.threadId then + if self.threadId ~= nil then oprot:writeFieldBegin('threadId', TType.STRING, 1) oprot:writeString(self.threadId) oprot:writeFieldEnd() end - if self.interflow then + if self.interflow ~= nil then oprot:writeFieldBegin('interflow', TType.STRING, 2) oprot:writeString(self.interflow) oprot:writeFieldEnd() end - if self.tls then + if self.tls ~= nil then oprot:writeFieldBegin('tls', TType.STRING, 3) oprot:writeString(self.tls) oprot:writeFieldEnd() diff --git a/protocols/gen-netstd/ITim.cs b/protocols/gen-netstd/ITim.cs new file mode 100644 index 0000000..9e66b82 --- /dev/null +++ b/protocols/gen-netstd/ITim.cs @@ -0,0 +1,6725 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + +public partial class ITim +{ + public interface IAsync + { + /// + /// 流程开始 + /// + /// + global::System.Threading.Tasks.Task timStream(TimParam param, CancellationToken cancellationToken = default); + + /// + /// tls协议 + /// + global::System.Threading.Tasks.Task timStarttls(CancellationToken cancellationToken = default); + + /// + /// 登陆协议 + /// + /// + /// + global::System.Threading.Tasks.Task timLogin(Tid tid, string pwd, CancellationToken cancellationToken = default); + + /// + /// 回执信息 + /// + /// + global::System.Threading.Tasks.Task timAck(TimAckBean ab, CancellationToken cancellationToken = default); + + /// + /// 广播出席协议或接收广播协议 + /// + /// + global::System.Threading.Tasks.Task timPresence(TimPBean pbean, CancellationToken cancellationToken = default); + + /// + /// 发送信息或接收信息 + /// + /// + global::System.Threading.Tasks.Task timMessage(TimMBean mbean, CancellationToken cancellationToken = default); + + /// + /// ping 心跳协议 + /// + /// + global::System.Threading.Tasks.Task timPing(string threadId, CancellationToken cancellationToken = default); + + /// + /// 错误通知 + /// + /// + global::System.Threading.Tasks.Task timError(TimError e, CancellationToken cancellationToken = default); + + /// + /// 登出协议 + /// + global::System.Threading.Tasks.Task timLogout(CancellationToken cancellationToken = default); + + /// + /// 注册协议 + /// + /// + /// + global::System.Threading.Tasks.Task timRegist(Tid tid, string auth, CancellationToken cancellationToken = default); + + /// + /// 花名册 + /// + /// + global::System.Threading.Tasks.Task timRoser(TimRoster roster, CancellationToken cancellationToken = default); + + /// + /// 发送信息或接收信息列表(合流) + /// + /// + global::System.Threading.Tasks.Task timMessageList(TimMBeanList mbeanList, CancellationToken cancellationToken = default); + + /// + /// 发送状态信息列表(合流) + /// + /// + global::System.Threading.Tasks.Task timPresenceList(TimPBeanList pbeanList, CancellationToken cancellationToken = default); + + /// + /// 信息请求 get请求数据 del删除 + /// + /// + /// + global::System.Threading.Tasks.Task timMessageIq(TimMessageIq timMsgIq, string iqType, CancellationToken cancellationToken = default); + + /// + /// 信息请求 + /// + /// + global::System.Threading.Tasks.Task timMessageResult(TimMBean mbean, CancellationToken cancellationToken = default); + + /// + /// 用户协议属性请求 + /// + /// + global::System.Threading.Tasks.Task timProperty(TimPropertyBean tpb, CancellationToken cancellationToken = default); + + /// + /// 请求远程验证信息 + /// + /// + /// + /// + global::System.Threading.Tasks.Task timRemoteUserAuth(Tid tid, string pwd, TimAuth auth, CancellationToken cancellationToken = default); + + /// + /// 请求远程用户信息 + /// + /// + /// + global::System.Threading.Tasks.Task timRemoteUserGet(Tid tid, TimAuth auth, CancellationToken cancellationToken = default); + + /// + /// 编辑远程用户信息 + /// + /// + /// + /// + global::System.Threading.Tasks.Task timRemoteUserEdit(Tid tid, TimUserBean ub, TimAuth auth, CancellationToken cancellationToken = default); + + /// + /// 广播出席协议或接收广播协议 + /// + /// + /// + global::System.Threading.Tasks.Task timResponsePresence(TimPBean pbean, TimAuth auth, CancellationToken cancellationToken = default); + + /// + /// 发送信息或接收信息 + /// + /// + /// + global::System.Threading.Tasks.Task timResponseMessage(TimMBean mbean, TimAuth auth, CancellationToken cancellationToken = default); + + /// + /// 信息请求 get请求数据 del删除(辅助接口) + /// + /// + /// + /// + global::System.Threading.Tasks.Task timResponseMessageIq(TimMessageIq timMsgIq, string iqType, TimAuth auth, CancellationToken cancellationToken = default); + + /// + /// 广播出席协议或接收广播协议 + /// + /// + /// + global::System.Threading.Tasks.Task timResponsePresenceList(TimPBeanList pbeanList, TimAuth auth, CancellationToken cancellationToken = default); + + /// + /// 发送信息或接收信息 + /// + /// + /// + global::System.Threading.Tasks.Task timResponseMessageList(TimMBeanList mbeanList, TimAuth auth, CancellationToken cancellationToken = default); + + } + + + public class Client : TBaseClient, IDisposable, IAsync + { + public Client(TProtocol protocol) : this(protocol, protocol) + { + } + + public Client(TProtocol inputProtocol, TProtocol outputProtocol) : base(inputProtocol, outputProtocol) + { + } + + public async global::System.Threading.Tasks.Task timStream(TimParam param, CancellationToken cancellationToken = default) + { + await send_timStream(param, cancellationToken); + } + + public async global::System.Threading.Tasks.Task send_timStream(TimParam param, CancellationToken cancellationToken = default) + { + await OutputProtocol.WriteMessageBeginAsync(new TMessage("timStream", TMessageType.Oneway, SeqId), cancellationToken); + + var tmp292 = new InternalStructs.timStream_args() { + Param = param, + }; + + await tmp292.WriteAsync(OutputProtocol, cancellationToken); + await OutputProtocol.WriteMessageEndAsync(cancellationToken); + await OutputProtocol.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task timStarttls(CancellationToken cancellationToken = default) + { + await send_timStarttls(cancellationToken); + } + + public async global::System.Threading.Tasks.Task send_timStarttls(CancellationToken cancellationToken = default) + { + await OutputProtocol.WriteMessageBeginAsync(new TMessage("timStarttls", TMessageType.Oneway, SeqId), cancellationToken); + + var tmp293 = new InternalStructs.timStarttls_args() { + }; + + await tmp293.WriteAsync(OutputProtocol, cancellationToken); + await OutputProtocol.WriteMessageEndAsync(cancellationToken); + await OutputProtocol.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task timLogin(Tid tid, string pwd, CancellationToken cancellationToken = default) + { + await send_timLogin(tid, pwd, cancellationToken); + } + + public async global::System.Threading.Tasks.Task send_timLogin(Tid tid, string pwd, CancellationToken cancellationToken = default) + { + await OutputProtocol.WriteMessageBeginAsync(new TMessage("timLogin", TMessageType.Oneway, SeqId), cancellationToken); + + var tmp294 = new InternalStructs.timLogin_args() { + Tid = tid, + Pwd = pwd, + }; + + await tmp294.WriteAsync(OutputProtocol, cancellationToken); + await OutputProtocol.WriteMessageEndAsync(cancellationToken); + await OutputProtocol.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task timAck(TimAckBean ab, CancellationToken cancellationToken = default) + { + await send_timAck(ab, cancellationToken); + } + + public async global::System.Threading.Tasks.Task send_timAck(TimAckBean ab, CancellationToken cancellationToken = default) + { + await OutputProtocol.WriteMessageBeginAsync(new TMessage("timAck", TMessageType.Oneway, SeqId), cancellationToken); + + var tmp295 = new InternalStructs.timAck_args() { + Ab = ab, + }; + + await tmp295.WriteAsync(OutputProtocol, cancellationToken); + await OutputProtocol.WriteMessageEndAsync(cancellationToken); + await OutputProtocol.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task timPresence(TimPBean pbean, CancellationToken cancellationToken = default) + { + await send_timPresence(pbean, cancellationToken); + } + + public async global::System.Threading.Tasks.Task send_timPresence(TimPBean pbean, CancellationToken cancellationToken = default) + { + await OutputProtocol.WriteMessageBeginAsync(new TMessage("timPresence", TMessageType.Oneway, SeqId), cancellationToken); + + var tmp296 = new InternalStructs.timPresence_args() { + Pbean = pbean, + }; + + await tmp296.WriteAsync(OutputProtocol, cancellationToken); + await OutputProtocol.WriteMessageEndAsync(cancellationToken); + await OutputProtocol.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task timMessage(TimMBean mbean, CancellationToken cancellationToken = default) + { + await send_timMessage(mbean, cancellationToken); + } + + public async global::System.Threading.Tasks.Task send_timMessage(TimMBean mbean, CancellationToken cancellationToken = default) + { + await OutputProtocol.WriteMessageBeginAsync(new TMessage("timMessage", TMessageType.Oneway, SeqId), cancellationToken); + + var tmp297 = new InternalStructs.timMessage_args() { + Mbean = mbean, + }; + + await tmp297.WriteAsync(OutputProtocol, cancellationToken); + await OutputProtocol.WriteMessageEndAsync(cancellationToken); + await OutputProtocol.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task timPing(string threadId, CancellationToken cancellationToken = default) + { + await send_timPing(threadId, cancellationToken); + } + + public async global::System.Threading.Tasks.Task send_timPing(string threadId, CancellationToken cancellationToken = default) + { + await OutputProtocol.WriteMessageBeginAsync(new TMessage("timPing", TMessageType.Oneway, SeqId), cancellationToken); + + var tmp298 = new InternalStructs.timPing_args() { + ThreadId = threadId, + }; + + await tmp298.WriteAsync(OutputProtocol, cancellationToken); + await OutputProtocol.WriteMessageEndAsync(cancellationToken); + await OutputProtocol.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task timError(TimError e, CancellationToken cancellationToken = default) + { + await send_timError(e, cancellationToken); + } + + public async global::System.Threading.Tasks.Task send_timError(TimError e, CancellationToken cancellationToken = default) + { + await OutputProtocol.WriteMessageBeginAsync(new TMessage("timError", TMessageType.Oneway, SeqId), cancellationToken); + + var tmp299 = new InternalStructs.timError_args() { + E = e, + }; + + await tmp299.WriteAsync(OutputProtocol, cancellationToken); + await OutputProtocol.WriteMessageEndAsync(cancellationToken); + await OutputProtocol.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task timLogout(CancellationToken cancellationToken = default) + { + await send_timLogout(cancellationToken); + } + + public async global::System.Threading.Tasks.Task send_timLogout(CancellationToken cancellationToken = default) + { + await OutputProtocol.WriteMessageBeginAsync(new TMessage("timLogout", TMessageType.Oneway, SeqId), cancellationToken); + + var tmp300 = new InternalStructs.timLogout_args() { + }; + + await tmp300.WriteAsync(OutputProtocol, cancellationToken); + await OutputProtocol.WriteMessageEndAsync(cancellationToken); + await OutputProtocol.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task timRegist(Tid tid, string auth, CancellationToken cancellationToken = default) + { + await send_timRegist(tid, auth, cancellationToken); + } + + public async global::System.Threading.Tasks.Task send_timRegist(Tid tid, string auth, CancellationToken cancellationToken = default) + { + await OutputProtocol.WriteMessageBeginAsync(new TMessage("timRegist", TMessageType.Oneway, SeqId), cancellationToken); + + var tmp301 = new InternalStructs.timRegist_args() { + Tid = tid, + Auth = auth, + }; + + await tmp301.WriteAsync(OutputProtocol, cancellationToken); + await OutputProtocol.WriteMessageEndAsync(cancellationToken); + await OutputProtocol.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task timRoser(TimRoster roster, CancellationToken cancellationToken = default) + { + await send_timRoser(roster, cancellationToken); + } + + public async global::System.Threading.Tasks.Task send_timRoser(TimRoster roster, CancellationToken cancellationToken = default) + { + await OutputProtocol.WriteMessageBeginAsync(new TMessage("timRoser", TMessageType.Oneway, SeqId), cancellationToken); + + var tmp302 = new InternalStructs.timRoser_args() { + Roster = roster, + }; + + await tmp302.WriteAsync(OutputProtocol, cancellationToken); + await OutputProtocol.WriteMessageEndAsync(cancellationToken); + await OutputProtocol.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task timMessageList(TimMBeanList mbeanList, CancellationToken cancellationToken = default) + { + await send_timMessageList(mbeanList, cancellationToken); + } + + public async global::System.Threading.Tasks.Task send_timMessageList(TimMBeanList mbeanList, CancellationToken cancellationToken = default) + { + await OutputProtocol.WriteMessageBeginAsync(new TMessage("timMessageList", TMessageType.Oneway, SeqId), cancellationToken); + + var tmp303 = new InternalStructs.timMessageList_args() { + MbeanList = mbeanList, + }; + + await tmp303.WriteAsync(OutputProtocol, cancellationToken); + await OutputProtocol.WriteMessageEndAsync(cancellationToken); + await OutputProtocol.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task timPresenceList(TimPBeanList pbeanList, CancellationToken cancellationToken = default) + { + await send_timPresenceList(pbeanList, cancellationToken); + } + + public async global::System.Threading.Tasks.Task send_timPresenceList(TimPBeanList pbeanList, CancellationToken cancellationToken = default) + { + await OutputProtocol.WriteMessageBeginAsync(new TMessage("timPresenceList", TMessageType.Oneway, SeqId), cancellationToken); + + var tmp304 = new InternalStructs.timPresenceList_args() { + PbeanList = pbeanList, + }; + + await tmp304.WriteAsync(OutputProtocol, cancellationToken); + await OutputProtocol.WriteMessageEndAsync(cancellationToken); + await OutputProtocol.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task timMessageIq(TimMessageIq timMsgIq, string iqType, CancellationToken cancellationToken = default) + { + await send_timMessageIq(timMsgIq, iqType, cancellationToken); + } + + public async global::System.Threading.Tasks.Task send_timMessageIq(TimMessageIq timMsgIq, string iqType, CancellationToken cancellationToken = default) + { + await OutputProtocol.WriteMessageBeginAsync(new TMessage("timMessageIq", TMessageType.Oneway, SeqId), cancellationToken); + + var tmp305 = new InternalStructs.timMessageIq_args() { + TimMsgIq = timMsgIq, + IqType = iqType, + }; + + await tmp305.WriteAsync(OutputProtocol, cancellationToken); + await OutputProtocol.WriteMessageEndAsync(cancellationToken); + await OutputProtocol.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task timMessageResult(TimMBean mbean, CancellationToken cancellationToken = default) + { + await send_timMessageResult(mbean, cancellationToken); + } + + public async global::System.Threading.Tasks.Task send_timMessageResult(TimMBean mbean, CancellationToken cancellationToken = default) + { + await OutputProtocol.WriteMessageBeginAsync(new TMessage("timMessageResult", TMessageType.Oneway, SeqId), cancellationToken); + + var tmp306 = new InternalStructs.timMessageResult_args() { + Mbean = mbean, + }; + + await tmp306.WriteAsync(OutputProtocol, cancellationToken); + await OutputProtocol.WriteMessageEndAsync(cancellationToken); + await OutputProtocol.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task timProperty(TimPropertyBean tpb, CancellationToken cancellationToken = default) + { + await send_timProperty(tpb, cancellationToken); + } + + public async global::System.Threading.Tasks.Task send_timProperty(TimPropertyBean tpb, CancellationToken cancellationToken = default) + { + await OutputProtocol.WriteMessageBeginAsync(new TMessage("timProperty", TMessageType.Oneway, SeqId), cancellationToken); + + var tmp307 = new InternalStructs.timProperty_args() { + Tpb = tpb, + }; + + await tmp307.WriteAsync(OutputProtocol, cancellationToken); + await OutputProtocol.WriteMessageEndAsync(cancellationToken); + await OutputProtocol.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task timRemoteUserAuth(Tid tid, string pwd, TimAuth auth, CancellationToken cancellationToken = default) + { + await send_timRemoteUserAuth(tid, pwd, auth, cancellationToken); + return await recv_timRemoteUserAuth(cancellationToken); + } + + public async global::System.Threading.Tasks.Task send_timRemoteUserAuth(Tid tid, string pwd, TimAuth auth, CancellationToken cancellationToken = default) + { + await OutputProtocol.WriteMessageBeginAsync(new TMessage("timRemoteUserAuth", TMessageType.Call, SeqId), cancellationToken); + + var tmp308 = new InternalStructs.timRemoteUserAuth_args() { + Tid = tid, + Pwd = pwd, + Auth = auth, + }; + + await tmp308.WriteAsync(OutputProtocol, cancellationToken); + await OutputProtocol.WriteMessageEndAsync(cancellationToken); + await OutputProtocol.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task recv_timRemoteUserAuth(CancellationToken cancellationToken = default) + { + + var tmp309 = await InputProtocol.ReadMessageBeginAsync(cancellationToken); + if (tmp309.Type == TMessageType.Exception) + { + var tmp310 = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); + await InputProtocol.ReadMessageEndAsync(cancellationToken); + throw tmp310; + } + + var tmp311 = new InternalStructs.timRemoteUserAuth_result(); + await tmp311.ReadAsync(InputProtocol, cancellationToken); + await InputProtocol.ReadMessageEndAsync(cancellationToken); + if (tmp311.__isset.success) + { + return tmp311.Success; + } + throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "timRemoteUserAuth failed: unknown result"); + } + + public async global::System.Threading.Tasks.Task timRemoteUserGet(Tid tid, TimAuth auth, CancellationToken cancellationToken = default) + { + await send_timRemoteUserGet(tid, auth, cancellationToken); + return await recv_timRemoteUserGet(cancellationToken); + } + + public async global::System.Threading.Tasks.Task send_timRemoteUserGet(Tid tid, TimAuth auth, CancellationToken cancellationToken = default) + { + await OutputProtocol.WriteMessageBeginAsync(new TMessage("timRemoteUserGet", TMessageType.Call, SeqId), cancellationToken); + + var tmp312 = new InternalStructs.timRemoteUserGet_args() { + Tid = tid, + Auth = auth, + }; + + await tmp312.WriteAsync(OutputProtocol, cancellationToken); + await OutputProtocol.WriteMessageEndAsync(cancellationToken); + await OutputProtocol.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task recv_timRemoteUserGet(CancellationToken cancellationToken = default) + { + + var tmp313 = await InputProtocol.ReadMessageBeginAsync(cancellationToken); + if (tmp313.Type == TMessageType.Exception) + { + var tmp314 = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); + await InputProtocol.ReadMessageEndAsync(cancellationToken); + throw tmp314; + } + + var tmp315 = new InternalStructs.timRemoteUserGet_result(); + await tmp315.ReadAsync(InputProtocol, cancellationToken); + await InputProtocol.ReadMessageEndAsync(cancellationToken); + if (tmp315.__isset.success) + { + return tmp315.Success; + } + throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "timRemoteUserGet failed: unknown result"); + } + + public async global::System.Threading.Tasks.Task timRemoteUserEdit(Tid tid, TimUserBean ub, TimAuth auth, CancellationToken cancellationToken = default) + { + await send_timRemoteUserEdit(tid, ub, auth, cancellationToken); + return await recv_timRemoteUserEdit(cancellationToken); + } + + public async global::System.Threading.Tasks.Task send_timRemoteUserEdit(Tid tid, TimUserBean ub, TimAuth auth, CancellationToken cancellationToken = default) + { + await OutputProtocol.WriteMessageBeginAsync(new TMessage("timRemoteUserEdit", TMessageType.Call, SeqId), cancellationToken); + + var tmp316 = new InternalStructs.timRemoteUserEdit_args() { + Tid = tid, + Ub = ub, + Auth = auth, + }; + + await tmp316.WriteAsync(OutputProtocol, cancellationToken); + await OutputProtocol.WriteMessageEndAsync(cancellationToken); + await OutputProtocol.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task recv_timRemoteUserEdit(CancellationToken cancellationToken = default) + { + + var tmp317 = await InputProtocol.ReadMessageBeginAsync(cancellationToken); + if (tmp317.Type == TMessageType.Exception) + { + var tmp318 = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); + await InputProtocol.ReadMessageEndAsync(cancellationToken); + throw tmp318; + } + + var tmp319 = new InternalStructs.timRemoteUserEdit_result(); + await tmp319.ReadAsync(InputProtocol, cancellationToken); + await InputProtocol.ReadMessageEndAsync(cancellationToken); + if (tmp319.__isset.success) + { + return tmp319.Success; + } + throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "timRemoteUserEdit failed: unknown result"); + } + + public async global::System.Threading.Tasks.Task timResponsePresence(TimPBean pbean, TimAuth auth, CancellationToken cancellationToken = default) + { + await send_timResponsePresence(pbean, auth, cancellationToken); + return await recv_timResponsePresence(cancellationToken); + } + + public async global::System.Threading.Tasks.Task send_timResponsePresence(TimPBean pbean, TimAuth auth, CancellationToken cancellationToken = default) + { + await OutputProtocol.WriteMessageBeginAsync(new TMessage("timResponsePresence", TMessageType.Call, SeqId), cancellationToken); + + var tmp320 = new InternalStructs.timResponsePresence_args() { + Pbean = pbean, + Auth = auth, + }; + + await tmp320.WriteAsync(OutputProtocol, cancellationToken); + await OutputProtocol.WriteMessageEndAsync(cancellationToken); + await OutputProtocol.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task recv_timResponsePresence(CancellationToken cancellationToken = default) + { + + var tmp321 = await InputProtocol.ReadMessageBeginAsync(cancellationToken); + if (tmp321.Type == TMessageType.Exception) + { + var tmp322 = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); + await InputProtocol.ReadMessageEndAsync(cancellationToken); + throw tmp322; + } + + var tmp323 = new InternalStructs.timResponsePresence_result(); + await tmp323.ReadAsync(InputProtocol, cancellationToken); + await InputProtocol.ReadMessageEndAsync(cancellationToken); + if (tmp323.__isset.success) + { + return tmp323.Success; + } + throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "timResponsePresence failed: unknown result"); + } + + public async global::System.Threading.Tasks.Task timResponseMessage(TimMBean mbean, TimAuth auth, CancellationToken cancellationToken = default) + { + await send_timResponseMessage(mbean, auth, cancellationToken); + return await recv_timResponseMessage(cancellationToken); + } + + public async global::System.Threading.Tasks.Task send_timResponseMessage(TimMBean mbean, TimAuth auth, CancellationToken cancellationToken = default) + { + await OutputProtocol.WriteMessageBeginAsync(new TMessage("timResponseMessage", TMessageType.Call, SeqId), cancellationToken); + + var tmp324 = new InternalStructs.timResponseMessage_args() { + Mbean = mbean, + Auth = auth, + }; + + await tmp324.WriteAsync(OutputProtocol, cancellationToken); + await OutputProtocol.WriteMessageEndAsync(cancellationToken); + await OutputProtocol.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task recv_timResponseMessage(CancellationToken cancellationToken = default) + { + + var tmp325 = await InputProtocol.ReadMessageBeginAsync(cancellationToken); + if (tmp325.Type == TMessageType.Exception) + { + var tmp326 = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); + await InputProtocol.ReadMessageEndAsync(cancellationToken); + throw tmp326; + } + + var tmp327 = new InternalStructs.timResponseMessage_result(); + await tmp327.ReadAsync(InputProtocol, cancellationToken); + await InputProtocol.ReadMessageEndAsync(cancellationToken); + if (tmp327.__isset.success) + { + return tmp327.Success; + } + throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "timResponseMessage failed: unknown result"); + } + + public async global::System.Threading.Tasks.Task timResponseMessageIq(TimMessageIq timMsgIq, string iqType, TimAuth auth, CancellationToken cancellationToken = default) + { + await send_timResponseMessageIq(timMsgIq, iqType, auth, cancellationToken); + return await recv_timResponseMessageIq(cancellationToken); + } + + public async global::System.Threading.Tasks.Task send_timResponseMessageIq(TimMessageIq timMsgIq, string iqType, TimAuth auth, CancellationToken cancellationToken = default) + { + await OutputProtocol.WriteMessageBeginAsync(new TMessage("timResponseMessageIq", TMessageType.Call, SeqId), cancellationToken); + + var tmp328 = new InternalStructs.timResponseMessageIq_args() { + TimMsgIq = timMsgIq, + IqType = iqType, + Auth = auth, + }; + + await tmp328.WriteAsync(OutputProtocol, cancellationToken); + await OutputProtocol.WriteMessageEndAsync(cancellationToken); + await OutputProtocol.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task recv_timResponseMessageIq(CancellationToken cancellationToken = default) + { + + var tmp329 = await InputProtocol.ReadMessageBeginAsync(cancellationToken); + if (tmp329.Type == TMessageType.Exception) + { + var tmp330 = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); + await InputProtocol.ReadMessageEndAsync(cancellationToken); + throw tmp330; + } + + var tmp331 = new InternalStructs.timResponseMessageIq_result(); + await tmp331.ReadAsync(InputProtocol, cancellationToken); + await InputProtocol.ReadMessageEndAsync(cancellationToken); + if (tmp331.__isset.success) + { + return tmp331.Success; + } + throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "timResponseMessageIq failed: unknown result"); + } + + public async global::System.Threading.Tasks.Task timResponsePresenceList(TimPBeanList pbeanList, TimAuth auth, CancellationToken cancellationToken = default) + { + await send_timResponsePresenceList(pbeanList, auth, cancellationToken); + return await recv_timResponsePresenceList(cancellationToken); + } + + public async global::System.Threading.Tasks.Task send_timResponsePresenceList(TimPBeanList pbeanList, TimAuth auth, CancellationToken cancellationToken = default) + { + await OutputProtocol.WriteMessageBeginAsync(new TMessage("timResponsePresenceList", TMessageType.Call, SeqId), cancellationToken); + + var tmp332 = new InternalStructs.timResponsePresenceList_args() { + PbeanList = pbeanList, + Auth = auth, + }; + + await tmp332.WriteAsync(OutputProtocol, cancellationToken); + await OutputProtocol.WriteMessageEndAsync(cancellationToken); + await OutputProtocol.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task recv_timResponsePresenceList(CancellationToken cancellationToken = default) + { + + var tmp333 = await InputProtocol.ReadMessageBeginAsync(cancellationToken); + if (tmp333.Type == TMessageType.Exception) + { + var tmp334 = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); + await InputProtocol.ReadMessageEndAsync(cancellationToken); + throw tmp334; + } + + var tmp335 = new InternalStructs.timResponsePresenceList_result(); + await tmp335.ReadAsync(InputProtocol, cancellationToken); + await InputProtocol.ReadMessageEndAsync(cancellationToken); + if (tmp335.__isset.success) + { + return tmp335.Success; + } + throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "timResponsePresenceList failed: unknown result"); + } + + public async global::System.Threading.Tasks.Task timResponseMessageList(TimMBeanList mbeanList, TimAuth auth, CancellationToken cancellationToken = default) + { + await send_timResponseMessageList(mbeanList, auth, cancellationToken); + return await recv_timResponseMessageList(cancellationToken); + } + + public async global::System.Threading.Tasks.Task send_timResponseMessageList(TimMBeanList mbeanList, TimAuth auth, CancellationToken cancellationToken = default) + { + await OutputProtocol.WriteMessageBeginAsync(new TMessage("timResponseMessageList", TMessageType.Call, SeqId), cancellationToken); + + var tmp336 = new InternalStructs.timResponseMessageList_args() { + MbeanList = mbeanList, + Auth = auth, + }; + + await tmp336.WriteAsync(OutputProtocol, cancellationToken); + await OutputProtocol.WriteMessageEndAsync(cancellationToken); + await OutputProtocol.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task recv_timResponseMessageList(CancellationToken cancellationToken = default) + { + + var tmp337 = await InputProtocol.ReadMessageBeginAsync(cancellationToken); + if (tmp337.Type == TMessageType.Exception) + { + var tmp338 = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); + await InputProtocol.ReadMessageEndAsync(cancellationToken); + throw tmp338; + } + + var tmp339 = new InternalStructs.timResponseMessageList_result(); + await tmp339.ReadAsync(InputProtocol, cancellationToken); + await InputProtocol.ReadMessageEndAsync(cancellationToken); + if (tmp339.__isset.success) + { + return tmp339.Success; + } + throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "timResponseMessageList failed: unknown result"); + } + + } + + public class AsyncProcessor : ITAsyncProcessor + { + private readonly IAsync _iAsync; + private readonly ILogger _logger; + + public AsyncProcessor(IAsync iAsync, ILogger logger = default) + { + _iAsync = iAsync ?? throw new ArgumentNullException(nameof(iAsync)); + _logger = logger; + processMap_["timStream"] = timStream_ProcessAsync; + processMap_["timStarttls"] = timStarttls_ProcessAsync; + processMap_["timLogin"] = timLogin_ProcessAsync; + processMap_["timAck"] = timAck_ProcessAsync; + processMap_["timPresence"] = timPresence_ProcessAsync; + processMap_["timMessage"] = timMessage_ProcessAsync; + processMap_["timPing"] = timPing_ProcessAsync; + processMap_["timError"] = timError_ProcessAsync; + processMap_["timLogout"] = timLogout_ProcessAsync; + processMap_["timRegist"] = timRegist_ProcessAsync; + processMap_["timRoser"] = timRoser_ProcessAsync; + processMap_["timMessageList"] = timMessageList_ProcessAsync; + processMap_["timPresenceList"] = timPresenceList_ProcessAsync; + processMap_["timMessageIq"] = timMessageIq_ProcessAsync; + processMap_["timMessageResult"] = timMessageResult_ProcessAsync; + processMap_["timProperty"] = timProperty_ProcessAsync; + processMap_["timRemoteUserAuth"] = timRemoteUserAuth_ProcessAsync; + processMap_["timRemoteUserGet"] = timRemoteUserGet_ProcessAsync; + processMap_["timRemoteUserEdit"] = timRemoteUserEdit_ProcessAsync; + processMap_["timResponsePresence"] = timResponsePresence_ProcessAsync; + processMap_["timResponseMessage"] = timResponseMessage_ProcessAsync; + processMap_["timResponseMessageIq"] = timResponseMessageIq_ProcessAsync; + processMap_["timResponsePresenceList"] = timResponsePresenceList_ProcessAsync; + processMap_["timResponseMessageList"] = timResponseMessageList_ProcessAsync; + } + + protected delegate global::System.Threading.Tasks.Task ProcessFunction(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken); + protected Dictionary processMap_ = new Dictionary(); + + public async Task ProcessAsync(TProtocol iprot, TProtocol oprot) + { + return await ProcessAsync(iprot, oprot, CancellationToken.None); + } + + public async Task ProcessAsync(TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + try + { + var msg = await iprot.ReadMessageBeginAsync(cancellationToken); + + processMap_.TryGetValue(msg.Name, out var fn); + + if (fn == null) + { + await TProtocolUtil.SkipAsync(iprot, TType.Struct, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + var x = new TApplicationException (TApplicationException.ExceptionType.UnknownMethod, "Invalid method name: '" + msg.Name + "'"); + await oprot.WriteMessageBeginAsync(new TMessage(msg.Name, TMessageType.Exception, msg.SeqID), cancellationToken); + await x.WriteAsync(oprot, cancellationToken); + await oprot.WriteMessageEndAsync(cancellationToken); + await oprot.Transport.FlushAsync(cancellationToken); + return true; + } + + await fn(msg.SeqID, iprot, oprot, cancellationToken); + + } + catch (IOException) + { + return false; + } + + return true; + } + + public async global::System.Threading.Tasks.Task timStream_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + var tmp340 = new InternalStructs.timStream_args(); + await tmp340.ReadAsync(iprot, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + try + { + await _iAsync.timStream(tmp340.Param, cancellationToken); + } + catch (TTransportException) + { + throw; + } + catch (Exception tmp342) + { + var tmp343 = $"Error occurred in {GetType().FullName}: {tmp342.Message}"; + if(_logger != null) + _logger.LogError("{Exception}, {Message}", tmp342, tmp343); + else + Console.Error.WriteLine(tmp343); + } + } + + public async global::System.Threading.Tasks.Task timStarttls_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + var tmp344 = new InternalStructs.timStarttls_args(); + await tmp344.ReadAsync(iprot, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + try + { + await _iAsync.timStarttls(cancellationToken); + } + catch (TTransportException) + { + throw; + } + catch (Exception tmp346) + { + var tmp347 = $"Error occurred in {GetType().FullName}: {tmp346.Message}"; + if(_logger != null) + _logger.LogError("{Exception}, {Message}", tmp346, tmp347); + else + Console.Error.WriteLine(tmp347); + } + } + + public async global::System.Threading.Tasks.Task timLogin_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + var tmp348 = new InternalStructs.timLogin_args(); + await tmp348.ReadAsync(iprot, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + try + { + await _iAsync.timLogin(tmp348.Tid, tmp348.Pwd, cancellationToken); + } + catch (TTransportException) + { + throw; + } + catch (Exception tmp350) + { + var tmp351 = $"Error occurred in {GetType().FullName}: {tmp350.Message}"; + if(_logger != null) + _logger.LogError("{Exception}, {Message}", tmp350, tmp351); + else + Console.Error.WriteLine(tmp351); + } + } + + public async global::System.Threading.Tasks.Task timAck_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + var tmp352 = new InternalStructs.timAck_args(); + await tmp352.ReadAsync(iprot, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + try + { + await _iAsync.timAck(tmp352.Ab, cancellationToken); + } + catch (TTransportException) + { + throw; + } + catch (Exception tmp354) + { + var tmp355 = $"Error occurred in {GetType().FullName}: {tmp354.Message}"; + if(_logger != null) + _logger.LogError("{Exception}, {Message}", tmp354, tmp355); + else + Console.Error.WriteLine(tmp355); + } + } + + public async global::System.Threading.Tasks.Task timPresence_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + var tmp356 = new InternalStructs.timPresence_args(); + await tmp356.ReadAsync(iprot, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + try + { + await _iAsync.timPresence(tmp356.Pbean, cancellationToken); + } + catch (TTransportException) + { + throw; + } + catch (Exception tmp358) + { + var tmp359 = $"Error occurred in {GetType().FullName}: {tmp358.Message}"; + if(_logger != null) + _logger.LogError("{Exception}, {Message}", tmp358, tmp359); + else + Console.Error.WriteLine(tmp359); + } + } + + public async global::System.Threading.Tasks.Task timMessage_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + var tmp360 = new InternalStructs.timMessage_args(); + await tmp360.ReadAsync(iprot, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + try + { + await _iAsync.timMessage(tmp360.Mbean, cancellationToken); + } + catch (TTransportException) + { + throw; + } + catch (Exception tmp362) + { + var tmp363 = $"Error occurred in {GetType().FullName}: {tmp362.Message}"; + if(_logger != null) + _logger.LogError("{Exception}, {Message}", tmp362, tmp363); + else + Console.Error.WriteLine(tmp363); + } + } + + public async global::System.Threading.Tasks.Task timPing_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + var tmp364 = new InternalStructs.timPing_args(); + await tmp364.ReadAsync(iprot, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + try + { + await _iAsync.timPing(tmp364.ThreadId, cancellationToken); + } + catch (TTransportException) + { + throw; + } + catch (Exception tmp366) + { + var tmp367 = $"Error occurred in {GetType().FullName}: {tmp366.Message}"; + if(_logger != null) + _logger.LogError("{Exception}, {Message}", tmp366, tmp367); + else + Console.Error.WriteLine(tmp367); + } + } + + public async global::System.Threading.Tasks.Task timError_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + var tmp368 = new InternalStructs.timError_args(); + await tmp368.ReadAsync(iprot, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + try + { + await _iAsync.timError(tmp368.E, cancellationToken); + } + catch (TTransportException) + { + throw; + } + catch (Exception tmp370) + { + var tmp371 = $"Error occurred in {GetType().FullName}: {tmp370.Message}"; + if(_logger != null) + _logger.LogError("{Exception}, {Message}", tmp370, tmp371); + else + Console.Error.WriteLine(tmp371); + } + } + + public async global::System.Threading.Tasks.Task timLogout_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + var tmp372 = new InternalStructs.timLogout_args(); + await tmp372.ReadAsync(iprot, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + try + { + await _iAsync.timLogout(cancellationToken); + } + catch (TTransportException) + { + throw; + } + catch (Exception tmp374) + { + var tmp375 = $"Error occurred in {GetType().FullName}: {tmp374.Message}"; + if(_logger != null) + _logger.LogError("{Exception}, {Message}", tmp374, tmp375); + else + Console.Error.WriteLine(tmp375); + } + } + + public async global::System.Threading.Tasks.Task timRegist_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + var tmp376 = new InternalStructs.timRegist_args(); + await tmp376.ReadAsync(iprot, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + try + { + await _iAsync.timRegist(tmp376.Tid, tmp376.Auth, cancellationToken); + } + catch (TTransportException) + { + throw; + } + catch (Exception tmp378) + { + var tmp379 = $"Error occurred in {GetType().FullName}: {tmp378.Message}"; + if(_logger != null) + _logger.LogError("{Exception}, {Message}", tmp378, tmp379); + else + Console.Error.WriteLine(tmp379); + } + } + + public async global::System.Threading.Tasks.Task timRoser_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + var tmp380 = new InternalStructs.timRoser_args(); + await tmp380.ReadAsync(iprot, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + try + { + await _iAsync.timRoser(tmp380.Roster, cancellationToken); + } + catch (TTransportException) + { + throw; + } + catch (Exception tmp382) + { + var tmp383 = $"Error occurred in {GetType().FullName}: {tmp382.Message}"; + if(_logger != null) + _logger.LogError("{Exception}, {Message}", tmp382, tmp383); + else + Console.Error.WriteLine(tmp383); + } + } + + public async global::System.Threading.Tasks.Task timMessageList_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + var tmp384 = new InternalStructs.timMessageList_args(); + await tmp384.ReadAsync(iprot, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + try + { + await _iAsync.timMessageList(tmp384.MbeanList, cancellationToken); + } + catch (TTransportException) + { + throw; + } + catch (Exception tmp386) + { + var tmp387 = $"Error occurred in {GetType().FullName}: {tmp386.Message}"; + if(_logger != null) + _logger.LogError("{Exception}, {Message}", tmp386, tmp387); + else + Console.Error.WriteLine(tmp387); + } + } + + public async global::System.Threading.Tasks.Task timPresenceList_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + var tmp388 = new InternalStructs.timPresenceList_args(); + await tmp388.ReadAsync(iprot, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + try + { + await _iAsync.timPresenceList(tmp388.PbeanList, cancellationToken); + } + catch (TTransportException) + { + throw; + } + catch (Exception tmp390) + { + var tmp391 = $"Error occurred in {GetType().FullName}: {tmp390.Message}"; + if(_logger != null) + _logger.LogError("{Exception}, {Message}", tmp390, tmp391); + else + Console.Error.WriteLine(tmp391); + } + } + + public async global::System.Threading.Tasks.Task timMessageIq_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + var tmp392 = new InternalStructs.timMessageIq_args(); + await tmp392.ReadAsync(iprot, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + try + { + await _iAsync.timMessageIq(tmp392.TimMsgIq, tmp392.IqType, cancellationToken); + } + catch (TTransportException) + { + throw; + } + catch (Exception tmp394) + { + var tmp395 = $"Error occurred in {GetType().FullName}: {tmp394.Message}"; + if(_logger != null) + _logger.LogError("{Exception}, {Message}", tmp394, tmp395); + else + Console.Error.WriteLine(tmp395); + } + } + + public async global::System.Threading.Tasks.Task timMessageResult_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + var tmp396 = new InternalStructs.timMessageResult_args(); + await tmp396.ReadAsync(iprot, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + try + { + await _iAsync.timMessageResult(tmp396.Mbean, cancellationToken); + } + catch (TTransportException) + { + throw; + } + catch (Exception tmp398) + { + var tmp399 = $"Error occurred in {GetType().FullName}: {tmp398.Message}"; + if(_logger != null) + _logger.LogError("{Exception}, {Message}", tmp398, tmp399); + else + Console.Error.WriteLine(tmp399); + } + } + + public async global::System.Threading.Tasks.Task timProperty_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + var tmp400 = new InternalStructs.timProperty_args(); + await tmp400.ReadAsync(iprot, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + try + { + await _iAsync.timProperty(tmp400.Tpb, cancellationToken); + } + catch (TTransportException) + { + throw; + } + catch (Exception tmp402) + { + var tmp403 = $"Error occurred in {GetType().FullName}: {tmp402.Message}"; + if(_logger != null) + _logger.LogError("{Exception}, {Message}", tmp402, tmp403); + else + Console.Error.WriteLine(tmp403); + } + } + + public async global::System.Threading.Tasks.Task timRemoteUserAuth_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + var tmp404 = new InternalStructs.timRemoteUserAuth_args(); + await tmp404.ReadAsync(iprot, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + var tmp405 = new InternalStructs.timRemoteUserAuth_result(); + try + { + tmp405.Success = await _iAsync.timRemoteUserAuth(tmp404.Tid, tmp404.Pwd, tmp404.Auth, cancellationToken); + await oprot.WriteMessageBeginAsync(new TMessage("timRemoteUserAuth", TMessageType.Reply, seqid), cancellationToken); + await tmp405.WriteAsync(oprot, cancellationToken); + } + catch (TTransportException) + { + throw; + } + catch (Exception tmp406) + { + var tmp407 = $"Error occurred in {GetType().FullName}: {tmp406.Message}"; + if(_logger != null) + _logger.LogError("{Exception}, {Message}", tmp406, tmp407); + else + Console.Error.WriteLine(tmp407); + var tmp408 = new TApplicationException(TApplicationException.ExceptionType.InternalError," Internal error."); + await oprot.WriteMessageBeginAsync(new TMessage("timRemoteUserAuth", TMessageType.Exception, seqid), cancellationToken); + await tmp408.WriteAsync(oprot, cancellationToken); + } + await oprot.WriteMessageEndAsync(cancellationToken); + await oprot.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task timRemoteUserGet_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + var tmp409 = new InternalStructs.timRemoteUserGet_args(); + await tmp409.ReadAsync(iprot, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + var tmp410 = new InternalStructs.timRemoteUserGet_result(); + try + { + tmp410.Success = await _iAsync.timRemoteUserGet(tmp409.Tid, tmp409.Auth, cancellationToken); + await oprot.WriteMessageBeginAsync(new TMessage("timRemoteUserGet", TMessageType.Reply, seqid), cancellationToken); + await tmp410.WriteAsync(oprot, cancellationToken); + } + catch (TTransportException) + { + throw; + } + catch (Exception tmp411) + { + var tmp412 = $"Error occurred in {GetType().FullName}: {tmp411.Message}"; + if(_logger != null) + _logger.LogError("{Exception}, {Message}", tmp411, tmp412); + else + Console.Error.WriteLine(tmp412); + var tmp413 = new TApplicationException(TApplicationException.ExceptionType.InternalError," Internal error."); + await oprot.WriteMessageBeginAsync(new TMessage("timRemoteUserGet", TMessageType.Exception, seqid), cancellationToken); + await tmp413.WriteAsync(oprot, cancellationToken); + } + await oprot.WriteMessageEndAsync(cancellationToken); + await oprot.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task timRemoteUserEdit_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + var tmp414 = new InternalStructs.timRemoteUserEdit_args(); + await tmp414.ReadAsync(iprot, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + var tmp415 = new InternalStructs.timRemoteUserEdit_result(); + try + { + tmp415.Success = await _iAsync.timRemoteUserEdit(tmp414.Tid, tmp414.Ub, tmp414.Auth, cancellationToken); + await oprot.WriteMessageBeginAsync(new TMessage("timRemoteUserEdit", TMessageType.Reply, seqid), cancellationToken); + await tmp415.WriteAsync(oprot, cancellationToken); + } + catch (TTransportException) + { + throw; + } + catch (Exception tmp416) + { + var tmp417 = $"Error occurred in {GetType().FullName}: {tmp416.Message}"; + if(_logger != null) + _logger.LogError("{Exception}, {Message}", tmp416, tmp417); + else + Console.Error.WriteLine(tmp417); + var tmp418 = new TApplicationException(TApplicationException.ExceptionType.InternalError," Internal error."); + await oprot.WriteMessageBeginAsync(new TMessage("timRemoteUserEdit", TMessageType.Exception, seqid), cancellationToken); + await tmp418.WriteAsync(oprot, cancellationToken); + } + await oprot.WriteMessageEndAsync(cancellationToken); + await oprot.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task timResponsePresence_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + var tmp419 = new InternalStructs.timResponsePresence_args(); + await tmp419.ReadAsync(iprot, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + var tmp420 = new InternalStructs.timResponsePresence_result(); + try + { + tmp420.Success = await _iAsync.timResponsePresence(tmp419.Pbean, tmp419.Auth, cancellationToken); + await oprot.WriteMessageBeginAsync(new TMessage("timResponsePresence", TMessageType.Reply, seqid), cancellationToken); + await tmp420.WriteAsync(oprot, cancellationToken); + } + catch (TTransportException) + { + throw; + } + catch (Exception tmp421) + { + var tmp422 = $"Error occurred in {GetType().FullName}: {tmp421.Message}"; + if(_logger != null) + _logger.LogError("{Exception}, {Message}", tmp421, tmp422); + else + Console.Error.WriteLine(tmp422); + var tmp423 = new TApplicationException(TApplicationException.ExceptionType.InternalError," Internal error."); + await oprot.WriteMessageBeginAsync(new TMessage("timResponsePresence", TMessageType.Exception, seqid), cancellationToken); + await tmp423.WriteAsync(oprot, cancellationToken); + } + await oprot.WriteMessageEndAsync(cancellationToken); + await oprot.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task timResponseMessage_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + var tmp424 = new InternalStructs.timResponseMessage_args(); + await tmp424.ReadAsync(iprot, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + var tmp425 = new InternalStructs.timResponseMessage_result(); + try + { + tmp425.Success = await _iAsync.timResponseMessage(tmp424.Mbean, tmp424.Auth, cancellationToken); + await oprot.WriteMessageBeginAsync(new TMessage("timResponseMessage", TMessageType.Reply, seqid), cancellationToken); + await tmp425.WriteAsync(oprot, cancellationToken); + } + catch (TTransportException) + { + throw; + } + catch (Exception tmp426) + { + var tmp427 = $"Error occurred in {GetType().FullName}: {tmp426.Message}"; + if(_logger != null) + _logger.LogError("{Exception}, {Message}", tmp426, tmp427); + else + Console.Error.WriteLine(tmp427); + var tmp428 = new TApplicationException(TApplicationException.ExceptionType.InternalError," Internal error."); + await oprot.WriteMessageBeginAsync(new TMessage("timResponseMessage", TMessageType.Exception, seqid), cancellationToken); + await tmp428.WriteAsync(oprot, cancellationToken); + } + await oprot.WriteMessageEndAsync(cancellationToken); + await oprot.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task timResponseMessageIq_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + var tmp429 = new InternalStructs.timResponseMessageIq_args(); + await tmp429.ReadAsync(iprot, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + var tmp430 = new InternalStructs.timResponseMessageIq_result(); + try + { + tmp430.Success = await _iAsync.timResponseMessageIq(tmp429.TimMsgIq, tmp429.IqType, tmp429.Auth, cancellationToken); + await oprot.WriteMessageBeginAsync(new TMessage("timResponseMessageIq", TMessageType.Reply, seqid), cancellationToken); + await tmp430.WriteAsync(oprot, cancellationToken); + } + catch (TTransportException) + { + throw; + } + catch (Exception tmp431) + { + var tmp432 = $"Error occurred in {GetType().FullName}: {tmp431.Message}"; + if(_logger != null) + _logger.LogError("{Exception}, {Message}", tmp431, tmp432); + else + Console.Error.WriteLine(tmp432); + var tmp433 = new TApplicationException(TApplicationException.ExceptionType.InternalError," Internal error."); + await oprot.WriteMessageBeginAsync(new TMessage("timResponseMessageIq", TMessageType.Exception, seqid), cancellationToken); + await tmp433.WriteAsync(oprot, cancellationToken); + } + await oprot.WriteMessageEndAsync(cancellationToken); + await oprot.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task timResponsePresenceList_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + var tmp434 = new InternalStructs.timResponsePresenceList_args(); + await tmp434.ReadAsync(iprot, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + var tmp435 = new InternalStructs.timResponsePresenceList_result(); + try + { + tmp435.Success = await _iAsync.timResponsePresenceList(tmp434.PbeanList, tmp434.Auth, cancellationToken); + await oprot.WriteMessageBeginAsync(new TMessage("timResponsePresenceList", TMessageType.Reply, seqid), cancellationToken); + await tmp435.WriteAsync(oprot, cancellationToken); + } + catch (TTransportException) + { + throw; + } + catch (Exception tmp436) + { + var tmp437 = $"Error occurred in {GetType().FullName}: {tmp436.Message}"; + if(_logger != null) + _logger.LogError("{Exception}, {Message}", tmp436, tmp437); + else + Console.Error.WriteLine(tmp437); + var tmp438 = new TApplicationException(TApplicationException.ExceptionType.InternalError," Internal error."); + await oprot.WriteMessageBeginAsync(new TMessage("timResponsePresenceList", TMessageType.Exception, seqid), cancellationToken); + await tmp438.WriteAsync(oprot, cancellationToken); + } + await oprot.WriteMessageEndAsync(cancellationToken); + await oprot.Transport.FlushAsync(cancellationToken); + } + + public async global::System.Threading.Tasks.Task timResponseMessageList_ProcessAsync(int seqid, TProtocol iprot, TProtocol oprot, CancellationToken cancellationToken) + { + var tmp439 = new InternalStructs.timResponseMessageList_args(); + await tmp439.ReadAsync(iprot, cancellationToken); + await iprot.ReadMessageEndAsync(cancellationToken); + var tmp440 = new InternalStructs.timResponseMessageList_result(); + try + { + tmp440.Success = await _iAsync.timResponseMessageList(tmp439.MbeanList, tmp439.Auth, cancellationToken); + await oprot.WriteMessageBeginAsync(new TMessage("timResponseMessageList", TMessageType.Reply, seqid), cancellationToken); + await tmp440.WriteAsync(oprot, cancellationToken); + } + catch (TTransportException) + { + throw; + } + catch (Exception tmp441) + { + var tmp442 = $"Error occurred in {GetType().FullName}: {tmp441.Message}"; + if(_logger != null) + _logger.LogError("{Exception}, {Message}", tmp441, tmp442); + else + Console.Error.WriteLine(tmp442); + var tmp443 = new TApplicationException(TApplicationException.ExceptionType.InternalError," Internal error."); + await oprot.WriteMessageBeginAsync(new TMessage("timResponseMessageList", TMessageType.Exception, seqid), cancellationToken); + await tmp443.WriteAsync(oprot, cancellationToken); + } + await oprot.WriteMessageEndAsync(cancellationToken); + await oprot.Transport.FlushAsync(cancellationToken); + } + + } + + public class InternalStructs + { + + public partial class timStream_args : TBase + { + private TimParam _param; + + public TimParam Param + { + get + { + return _param; + } + set + { + __isset.param = true; + this._param = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool param; + } + + public timStream_args() + { + } + + public timStream_args DeepCopy() + { + var tmp444 = new timStream_args(); + if((Param != null) && __isset.param) + { + tmp444.Param = (TimParam)this.Param.DeepCopy(); + } + tmp444.__isset.param = this.__isset.param; + return tmp444; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + Param = new TimParam(); + await Param.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp445 = new TStruct("timStream_args"); + await oprot.WriteStructBeginAsync(tmp445, cancellationToken); + var tmp446 = new TField(); + if((Param != null) && __isset.param) + { + tmp446.Name = "param"; + tmp446.Type = TType.Struct; + tmp446.ID = 1; + await oprot.WriteFieldBeginAsync(tmp446, cancellationToken); + await Param.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timStream_args other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.param == other.__isset.param) && ((!__isset.param) || (global::System.Object.Equals(Param, other.Param)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Param != null) && __isset.param) + { + hashcode = (hashcode * 397) + Param.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp447 = new StringBuilder("timStream_args("); + int tmp448 = 0; + if((Param != null) && __isset.param) + { + if(0 < tmp448++) { tmp447.Append(", "); } + tmp447.Append("Param: "); + Param.ToString(tmp447); + } + tmp447.Append(')'); + return tmp447.ToString(); + } + } + + + public partial class timStarttls_args : TBase + { + + public timStarttls_args() + { + } + + public timStarttls_args DeepCopy() + { + var tmp449 = new timStarttls_args(); + return tmp449; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp450 = new TStruct("timStarttls_args"); + await oprot.WriteStructBeginAsync(tmp450, cancellationToken); + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timStarttls_args other)) return false; + if (ReferenceEquals(this, other)) return true; + return true; + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + } + return hashcode; + } + + public override string ToString() + { + var tmp451 = new StringBuilder("timStarttls_args("); + tmp451.Append(')'); + return tmp451.ToString(); + } + } + + + public partial class timLogin_args : TBase + { + private Tid _tid; + private string _pwd; + + public Tid Tid + { + get + { + return _tid; + } + set + { + __isset.tid = true; + this._tid = value; + } + } + + public string Pwd + { + get + { + return _pwd; + } + set + { + __isset.pwd = true; + this._pwd = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool tid; + public bool pwd; + } + + public timLogin_args() + { + } + + public timLogin_args DeepCopy() + { + var tmp453 = new timLogin_args(); + if((Tid != null) && __isset.tid) + { + tmp453.Tid = (Tid)this.Tid.DeepCopy(); + } + tmp453.__isset.tid = this.__isset.tid; + if((Pwd != null) && __isset.pwd) + { + tmp453.Pwd = this.Pwd; + } + tmp453.__isset.pwd = this.__isset.pwd; + return tmp453; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + Tid = new Tid(); + await Tid.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.String) + { + Pwd = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp454 = new TStruct("timLogin_args"); + await oprot.WriteStructBeginAsync(tmp454, cancellationToken); + var tmp455 = new TField(); + if((Tid != null) && __isset.tid) + { + tmp455.Name = "tid"; + tmp455.Type = TType.Struct; + tmp455.ID = 1; + await oprot.WriteFieldBeginAsync(tmp455, cancellationToken); + await Tid.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Pwd != null) && __isset.pwd) + { + tmp455.Name = "pwd"; + tmp455.Type = TType.String; + tmp455.ID = 2; + await oprot.WriteFieldBeginAsync(tmp455, cancellationToken); + await oprot.WriteStringAsync(Pwd, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timLogin_args other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.tid == other.__isset.tid) && ((!__isset.tid) || (global::System.Object.Equals(Tid, other.Tid)))) + && ((__isset.pwd == other.__isset.pwd) && ((!__isset.pwd) || (global::System.Object.Equals(Pwd, other.Pwd)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Tid != null) && __isset.tid) + { + hashcode = (hashcode * 397) + Tid.GetHashCode(); + } + if((Pwd != null) && __isset.pwd) + { + hashcode = (hashcode * 397) + Pwd.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp456 = new StringBuilder("timLogin_args("); + int tmp457 = 0; + if((Tid != null) && __isset.tid) + { + if(0 < tmp457++) { tmp456.Append(", "); } + tmp456.Append("Tid: "); + Tid.ToString(tmp456); + } + if((Pwd != null) && __isset.pwd) + { + if(0 < tmp457++) { tmp456.Append(", "); } + tmp456.Append("Pwd: "); + Pwd.ToString(tmp456); + } + tmp456.Append(')'); + return tmp456.ToString(); + } + } + + + public partial class timAck_args : TBase + { + private TimAckBean _ab; + + public TimAckBean Ab + { + get + { + return _ab; + } + set + { + __isset.ab = true; + this._ab = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool ab; + } + + public timAck_args() + { + } + + public timAck_args DeepCopy() + { + var tmp458 = new timAck_args(); + if((Ab != null) && __isset.ab) + { + tmp458.Ab = (TimAckBean)this.Ab.DeepCopy(); + } + tmp458.__isset.ab = this.__isset.ab; + return tmp458; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + Ab = new TimAckBean(); + await Ab.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp459 = new TStruct("timAck_args"); + await oprot.WriteStructBeginAsync(tmp459, cancellationToken); + var tmp460 = new TField(); + if((Ab != null) && __isset.ab) + { + tmp460.Name = "ab"; + tmp460.Type = TType.Struct; + tmp460.ID = 1; + await oprot.WriteFieldBeginAsync(tmp460, cancellationToken); + await Ab.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timAck_args other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.ab == other.__isset.ab) && ((!__isset.ab) || (global::System.Object.Equals(Ab, other.Ab)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Ab != null) && __isset.ab) + { + hashcode = (hashcode * 397) + Ab.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp461 = new StringBuilder("timAck_args("); + int tmp462 = 0; + if((Ab != null) && __isset.ab) + { + if(0 < tmp462++) { tmp461.Append(", "); } + tmp461.Append("Ab: "); + Ab.ToString(tmp461); + } + tmp461.Append(')'); + return tmp461.ToString(); + } + } + + + public partial class timPresence_args : TBase + { + private TimPBean _pbean; + + public TimPBean Pbean + { + get + { + return _pbean; + } + set + { + __isset.pbean = true; + this._pbean = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool pbean; + } + + public timPresence_args() + { + } + + public timPresence_args DeepCopy() + { + var tmp463 = new timPresence_args(); + if((Pbean != null) && __isset.pbean) + { + tmp463.Pbean = (TimPBean)this.Pbean.DeepCopy(); + } + tmp463.__isset.pbean = this.__isset.pbean; + return tmp463; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + Pbean = new TimPBean(); + await Pbean.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp464 = new TStruct("timPresence_args"); + await oprot.WriteStructBeginAsync(tmp464, cancellationToken); + var tmp465 = new TField(); + if((Pbean != null) && __isset.pbean) + { + tmp465.Name = "pbean"; + tmp465.Type = TType.Struct; + tmp465.ID = 1; + await oprot.WriteFieldBeginAsync(tmp465, cancellationToken); + await Pbean.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timPresence_args other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.pbean == other.__isset.pbean) && ((!__isset.pbean) || (global::System.Object.Equals(Pbean, other.Pbean)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Pbean != null) && __isset.pbean) + { + hashcode = (hashcode * 397) + Pbean.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp466 = new StringBuilder("timPresence_args("); + int tmp467 = 0; + if((Pbean != null) && __isset.pbean) + { + if(0 < tmp467++) { tmp466.Append(", "); } + tmp466.Append("Pbean: "); + Pbean.ToString(tmp466); + } + tmp466.Append(')'); + return tmp466.ToString(); + } + } + + + public partial class timMessage_args : TBase + { + private TimMBean _mbean; + + public TimMBean Mbean + { + get + { + return _mbean; + } + set + { + __isset.mbean = true; + this._mbean = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool mbean; + } + + public timMessage_args() + { + } + + public timMessage_args DeepCopy() + { + var tmp468 = new timMessage_args(); + if((Mbean != null) && __isset.mbean) + { + tmp468.Mbean = (TimMBean)this.Mbean.DeepCopy(); + } + tmp468.__isset.mbean = this.__isset.mbean; + return tmp468; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + Mbean = new TimMBean(); + await Mbean.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp469 = new TStruct("timMessage_args"); + await oprot.WriteStructBeginAsync(tmp469, cancellationToken); + var tmp470 = new TField(); + if((Mbean != null) && __isset.mbean) + { + tmp470.Name = "mbean"; + tmp470.Type = TType.Struct; + tmp470.ID = 1; + await oprot.WriteFieldBeginAsync(tmp470, cancellationToken); + await Mbean.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timMessage_args other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.mbean == other.__isset.mbean) && ((!__isset.mbean) || (global::System.Object.Equals(Mbean, other.Mbean)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Mbean != null) && __isset.mbean) + { + hashcode = (hashcode * 397) + Mbean.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp471 = new StringBuilder("timMessage_args("); + int tmp472 = 0; + if((Mbean != null) && __isset.mbean) + { + if(0 < tmp472++) { tmp471.Append(", "); } + tmp471.Append("Mbean: "); + Mbean.ToString(tmp471); + } + tmp471.Append(')'); + return tmp471.ToString(); + } + } + + + public partial class timPing_args : TBase + { + private string _threadId; + + public string ThreadId + { + get + { + return _threadId; + } + set + { + __isset.threadId = true; + this._threadId = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool threadId; + } + + public timPing_args() + { + } + + public timPing_args DeepCopy() + { + var tmp473 = new timPing_args(); + if((ThreadId != null) && __isset.threadId) + { + tmp473.ThreadId = this.ThreadId; + } + tmp473.__isset.threadId = this.__isset.threadId; + return tmp473; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.String) + { + ThreadId = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp474 = new TStruct("timPing_args"); + await oprot.WriteStructBeginAsync(tmp474, cancellationToken); + var tmp475 = new TField(); + if((ThreadId != null) && __isset.threadId) + { + tmp475.Name = "threadId"; + tmp475.Type = TType.String; + tmp475.ID = 1; + await oprot.WriteFieldBeginAsync(tmp475, cancellationToken); + await oprot.WriteStringAsync(ThreadId, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timPing_args other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.threadId == other.__isset.threadId) && ((!__isset.threadId) || (global::System.Object.Equals(ThreadId, other.ThreadId)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((ThreadId != null) && __isset.threadId) + { + hashcode = (hashcode * 397) + ThreadId.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp476 = new StringBuilder("timPing_args("); + int tmp477 = 0; + if((ThreadId != null) && __isset.threadId) + { + if(0 < tmp477++) { tmp476.Append(", "); } + tmp476.Append("ThreadId: "); + ThreadId.ToString(tmp476); + } + tmp476.Append(')'); + return tmp476.ToString(); + } + } + + + public partial class timError_args : TBase + { + private TimError _e; + + public TimError E + { + get + { + return _e; + } + set + { + __isset.e = true; + this._e = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool e; + } + + public timError_args() + { + } + + public timError_args DeepCopy() + { + var tmp478 = new timError_args(); + if((E != null) && __isset.e) + { + tmp478.E = (TimError)this.E.DeepCopy(); + } + tmp478.__isset.e = this.__isset.e; + return tmp478; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + E = new TimError(); + await E.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp479 = new TStruct("timError_args"); + await oprot.WriteStructBeginAsync(tmp479, cancellationToken); + var tmp480 = new TField(); + if((E != null) && __isset.e) + { + tmp480.Name = "e"; + tmp480.Type = TType.Struct; + tmp480.ID = 1; + await oprot.WriteFieldBeginAsync(tmp480, cancellationToken); + await E.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timError_args other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.e == other.__isset.e) && ((!__isset.e) || (global::System.Object.Equals(E, other.E)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((E != null) && __isset.e) + { + hashcode = (hashcode * 397) + E.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp481 = new StringBuilder("timError_args("); + int tmp482 = 0; + if((E != null) && __isset.e) + { + if(0 < tmp482++) { tmp481.Append(", "); } + tmp481.Append("E: "); + E.ToString(tmp481); + } + tmp481.Append(')'); + return tmp481.ToString(); + } + } + + + public partial class timLogout_args : TBase + { + + public timLogout_args() + { + } + + public timLogout_args DeepCopy() + { + var tmp483 = new timLogout_args(); + return tmp483; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp484 = new TStruct("timLogout_args"); + await oprot.WriteStructBeginAsync(tmp484, cancellationToken); + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timLogout_args other)) return false; + if (ReferenceEquals(this, other)) return true; + return true; + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + } + return hashcode; + } + + public override string ToString() + { + var tmp485 = new StringBuilder("timLogout_args("); + tmp485.Append(')'); + return tmp485.ToString(); + } + } + + + public partial class timRegist_args : TBase + { + private Tid _tid; + private string _auth; + + public Tid Tid + { + get + { + return _tid; + } + set + { + __isset.tid = true; + this._tid = value; + } + } + + public string Auth + { + get + { + return _auth; + } + set + { + __isset.auth = true; + this._auth = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool tid; + public bool auth; + } + + public timRegist_args() + { + } + + public timRegist_args DeepCopy() + { + var tmp487 = new timRegist_args(); + if((Tid != null) && __isset.tid) + { + tmp487.Tid = (Tid)this.Tid.DeepCopy(); + } + tmp487.__isset.tid = this.__isset.tid; + if((Auth != null) && __isset.auth) + { + tmp487.Auth = this.Auth; + } + tmp487.__isset.auth = this.__isset.auth; + return tmp487; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + Tid = new Tid(); + await Tid.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.String) + { + Auth = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp488 = new TStruct("timRegist_args"); + await oprot.WriteStructBeginAsync(tmp488, cancellationToken); + var tmp489 = new TField(); + if((Tid != null) && __isset.tid) + { + tmp489.Name = "tid"; + tmp489.Type = TType.Struct; + tmp489.ID = 1; + await oprot.WriteFieldBeginAsync(tmp489, cancellationToken); + await Tid.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Auth != null) && __isset.auth) + { + tmp489.Name = "auth"; + tmp489.Type = TType.String; + tmp489.ID = 2; + await oprot.WriteFieldBeginAsync(tmp489, cancellationToken); + await oprot.WriteStringAsync(Auth, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timRegist_args other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.tid == other.__isset.tid) && ((!__isset.tid) || (global::System.Object.Equals(Tid, other.Tid)))) + && ((__isset.auth == other.__isset.auth) && ((!__isset.auth) || (global::System.Object.Equals(Auth, other.Auth)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Tid != null) && __isset.tid) + { + hashcode = (hashcode * 397) + Tid.GetHashCode(); + } + if((Auth != null) && __isset.auth) + { + hashcode = (hashcode * 397) + Auth.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp490 = new StringBuilder("timRegist_args("); + int tmp491 = 0; + if((Tid != null) && __isset.tid) + { + if(0 < tmp491++) { tmp490.Append(", "); } + tmp490.Append("Tid: "); + Tid.ToString(tmp490); + } + if((Auth != null) && __isset.auth) + { + if(0 < tmp491++) { tmp490.Append(", "); } + tmp490.Append("Auth: "); + Auth.ToString(tmp490); + } + tmp490.Append(')'); + return tmp490.ToString(); + } + } + + + public partial class timRoser_args : TBase + { + private TimRoster _roster; + + public TimRoster Roster + { + get + { + return _roster; + } + set + { + __isset.roster = true; + this._roster = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool roster; + } + + public timRoser_args() + { + } + + public timRoser_args DeepCopy() + { + var tmp492 = new timRoser_args(); + if((Roster != null) && __isset.roster) + { + tmp492.Roster = (TimRoster)this.Roster.DeepCopy(); + } + tmp492.__isset.roster = this.__isset.roster; + return tmp492; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + Roster = new TimRoster(); + await Roster.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp493 = new TStruct("timRoser_args"); + await oprot.WriteStructBeginAsync(tmp493, cancellationToken); + var tmp494 = new TField(); + if((Roster != null) && __isset.roster) + { + tmp494.Name = "roster"; + tmp494.Type = TType.Struct; + tmp494.ID = 1; + await oprot.WriteFieldBeginAsync(tmp494, cancellationToken); + await Roster.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timRoser_args other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.roster == other.__isset.roster) && ((!__isset.roster) || (global::System.Object.Equals(Roster, other.Roster)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Roster != null) && __isset.roster) + { + hashcode = (hashcode * 397) + Roster.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp495 = new StringBuilder("timRoser_args("); + int tmp496 = 0; + if((Roster != null) && __isset.roster) + { + if(0 < tmp496++) { tmp495.Append(", "); } + tmp495.Append("Roster: "); + Roster.ToString(tmp495); + } + tmp495.Append(')'); + return tmp495.ToString(); + } + } + + + public partial class timMessageList_args : TBase + { + private TimMBeanList _mbeanList; + + public TimMBeanList MbeanList + { + get + { + return _mbeanList; + } + set + { + __isset.mbeanList = true; + this._mbeanList = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool mbeanList; + } + + public timMessageList_args() + { + } + + public timMessageList_args DeepCopy() + { + var tmp497 = new timMessageList_args(); + if((MbeanList != null) && __isset.mbeanList) + { + tmp497.MbeanList = (TimMBeanList)this.MbeanList.DeepCopy(); + } + tmp497.__isset.mbeanList = this.__isset.mbeanList; + return tmp497; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + MbeanList = new TimMBeanList(); + await MbeanList.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp498 = new TStruct("timMessageList_args"); + await oprot.WriteStructBeginAsync(tmp498, cancellationToken); + var tmp499 = new TField(); + if((MbeanList != null) && __isset.mbeanList) + { + tmp499.Name = "mbeanList"; + tmp499.Type = TType.Struct; + tmp499.ID = 1; + await oprot.WriteFieldBeginAsync(tmp499, cancellationToken); + await MbeanList.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timMessageList_args other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.mbeanList == other.__isset.mbeanList) && ((!__isset.mbeanList) || (global::System.Object.Equals(MbeanList, other.MbeanList)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((MbeanList != null) && __isset.mbeanList) + { + hashcode = (hashcode * 397) + MbeanList.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp500 = new StringBuilder("timMessageList_args("); + int tmp501 = 0; + if((MbeanList != null) && __isset.mbeanList) + { + if(0 < tmp501++) { tmp500.Append(", "); } + tmp500.Append("MbeanList: "); + MbeanList.ToString(tmp500); + } + tmp500.Append(')'); + return tmp500.ToString(); + } + } + + + public partial class timPresenceList_args : TBase + { + private TimPBeanList _pbeanList; + + public TimPBeanList PbeanList + { + get + { + return _pbeanList; + } + set + { + __isset.pbeanList = true; + this._pbeanList = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool pbeanList; + } + + public timPresenceList_args() + { + } + + public timPresenceList_args DeepCopy() + { + var tmp502 = new timPresenceList_args(); + if((PbeanList != null) && __isset.pbeanList) + { + tmp502.PbeanList = (TimPBeanList)this.PbeanList.DeepCopy(); + } + tmp502.__isset.pbeanList = this.__isset.pbeanList; + return tmp502; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + PbeanList = new TimPBeanList(); + await PbeanList.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp503 = new TStruct("timPresenceList_args"); + await oprot.WriteStructBeginAsync(tmp503, cancellationToken); + var tmp504 = new TField(); + if((PbeanList != null) && __isset.pbeanList) + { + tmp504.Name = "pbeanList"; + tmp504.Type = TType.Struct; + tmp504.ID = 1; + await oprot.WriteFieldBeginAsync(tmp504, cancellationToken); + await PbeanList.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timPresenceList_args other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.pbeanList == other.__isset.pbeanList) && ((!__isset.pbeanList) || (global::System.Object.Equals(PbeanList, other.PbeanList)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((PbeanList != null) && __isset.pbeanList) + { + hashcode = (hashcode * 397) + PbeanList.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp505 = new StringBuilder("timPresenceList_args("); + int tmp506 = 0; + if((PbeanList != null) && __isset.pbeanList) + { + if(0 < tmp506++) { tmp505.Append(", "); } + tmp505.Append("PbeanList: "); + PbeanList.ToString(tmp505); + } + tmp505.Append(')'); + return tmp505.ToString(); + } + } + + + public partial class timMessageIq_args : TBase + { + private TimMessageIq _timMsgIq; + private string _iqType; + + public TimMessageIq TimMsgIq + { + get + { + return _timMsgIq; + } + set + { + __isset.timMsgIq = true; + this._timMsgIq = value; + } + } + + public string IqType + { + get + { + return _iqType; + } + set + { + __isset.iqType = true; + this._iqType = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool timMsgIq; + public bool iqType; + } + + public timMessageIq_args() + { + } + + public timMessageIq_args DeepCopy() + { + var tmp507 = new timMessageIq_args(); + if((TimMsgIq != null) && __isset.timMsgIq) + { + tmp507.TimMsgIq = (TimMessageIq)this.TimMsgIq.DeepCopy(); + } + tmp507.__isset.timMsgIq = this.__isset.timMsgIq; + if((IqType != null) && __isset.iqType) + { + tmp507.IqType = this.IqType; + } + tmp507.__isset.iqType = this.__isset.iqType; + return tmp507; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + TimMsgIq = new TimMessageIq(); + await TimMsgIq.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.String) + { + IqType = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp508 = new TStruct("timMessageIq_args"); + await oprot.WriteStructBeginAsync(tmp508, cancellationToken); + var tmp509 = new TField(); + if((TimMsgIq != null) && __isset.timMsgIq) + { + tmp509.Name = "timMsgIq"; + tmp509.Type = TType.Struct; + tmp509.ID = 1; + await oprot.WriteFieldBeginAsync(tmp509, cancellationToken); + await TimMsgIq.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((IqType != null) && __isset.iqType) + { + tmp509.Name = "iqType"; + tmp509.Type = TType.String; + tmp509.ID = 2; + await oprot.WriteFieldBeginAsync(tmp509, cancellationToken); + await oprot.WriteStringAsync(IqType, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timMessageIq_args other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.timMsgIq == other.__isset.timMsgIq) && ((!__isset.timMsgIq) || (global::System.Object.Equals(TimMsgIq, other.TimMsgIq)))) + && ((__isset.iqType == other.__isset.iqType) && ((!__isset.iqType) || (global::System.Object.Equals(IqType, other.IqType)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((TimMsgIq != null) && __isset.timMsgIq) + { + hashcode = (hashcode * 397) + TimMsgIq.GetHashCode(); + } + if((IqType != null) && __isset.iqType) + { + hashcode = (hashcode * 397) + IqType.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp510 = new StringBuilder("timMessageIq_args("); + int tmp511 = 0; + if((TimMsgIq != null) && __isset.timMsgIq) + { + if(0 < tmp511++) { tmp510.Append(", "); } + tmp510.Append("TimMsgIq: "); + TimMsgIq.ToString(tmp510); + } + if((IqType != null) && __isset.iqType) + { + if(0 < tmp511++) { tmp510.Append(", "); } + tmp510.Append("IqType: "); + IqType.ToString(tmp510); + } + tmp510.Append(')'); + return tmp510.ToString(); + } + } + + + public partial class timMessageResult_args : TBase + { + private TimMBean _mbean; + + public TimMBean Mbean + { + get + { + return _mbean; + } + set + { + __isset.mbean = true; + this._mbean = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool mbean; + } + + public timMessageResult_args() + { + } + + public timMessageResult_args DeepCopy() + { + var tmp512 = new timMessageResult_args(); + if((Mbean != null) && __isset.mbean) + { + tmp512.Mbean = (TimMBean)this.Mbean.DeepCopy(); + } + tmp512.__isset.mbean = this.__isset.mbean; + return tmp512; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + Mbean = new TimMBean(); + await Mbean.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp513 = new TStruct("timMessageResult_args"); + await oprot.WriteStructBeginAsync(tmp513, cancellationToken); + var tmp514 = new TField(); + if((Mbean != null) && __isset.mbean) + { + tmp514.Name = "mbean"; + tmp514.Type = TType.Struct; + tmp514.ID = 1; + await oprot.WriteFieldBeginAsync(tmp514, cancellationToken); + await Mbean.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timMessageResult_args other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.mbean == other.__isset.mbean) && ((!__isset.mbean) || (global::System.Object.Equals(Mbean, other.Mbean)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Mbean != null) && __isset.mbean) + { + hashcode = (hashcode * 397) + Mbean.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp515 = new StringBuilder("timMessageResult_args("); + int tmp516 = 0; + if((Mbean != null) && __isset.mbean) + { + if(0 < tmp516++) { tmp515.Append(", "); } + tmp515.Append("Mbean: "); + Mbean.ToString(tmp515); + } + tmp515.Append(')'); + return tmp515.ToString(); + } + } + + + public partial class timProperty_args : TBase + { + private TimPropertyBean _tpb; + + public TimPropertyBean Tpb + { + get + { + return _tpb; + } + set + { + __isset.tpb = true; + this._tpb = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool tpb; + } + + public timProperty_args() + { + } + + public timProperty_args DeepCopy() + { + var tmp517 = new timProperty_args(); + if((Tpb != null) && __isset.tpb) + { + tmp517.Tpb = (TimPropertyBean)this.Tpb.DeepCopy(); + } + tmp517.__isset.tpb = this.__isset.tpb; + return tmp517; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + Tpb = new TimPropertyBean(); + await Tpb.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp518 = new TStruct("timProperty_args"); + await oprot.WriteStructBeginAsync(tmp518, cancellationToken); + var tmp519 = new TField(); + if((Tpb != null) && __isset.tpb) + { + tmp519.Name = "tpb"; + tmp519.Type = TType.Struct; + tmp519.ID = 1; + await oprot.WriteFieldBeginAsync(tmp519, cancellationToken); + await Tpb.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timProperty_args other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.tpb == other.__isset.tpb) && ((!__isset.tpb) || (global::System.Object.Equals(Tpb, other.Tpb)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Tpb != null) && __isset.tpb) + { + hashcode = (hashcode * 397) + Tpb.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp520 = new StringBuilder("timProperty_args("); + int tmp521 = 0; + if((Tpb != null) && __isset.tpb) + { + if(0 < tmp521++) { tmp520.Append(", "); } + tmp520.Append("Tpb: "); + Tpb.ToString(tmp520); + } + tmp520.Append(')'); + return tmp520.ToString(); + } + } + + + public partial class timRemoteUserAuth_args : TBase + { + private Tid _tid; + private string _pwd; + private TimAuth _auth; + + public Tid Tid + { + get + { + return _tid; + } + set + { + __isset.tid = true; + this._tid = value; + } + } + + public string Pwd + { + get + { + return _pwd; + } + set + { + __isset.pwd = true; + this._pwd = value; + } + } + + public TimAuth Auth + { + get + { + return _auth; + } + set + { + __isset.auth = true; + this._auth = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool tid; + public bool pwd; + public bool auth; + } + + public timRemoteUserAuth_args() + { + } + + public timRemoteUserAuth_args DeepCopy() + { + var tmp522 = new timRemoteUserAuth_args(); + if((Tid != null) && __isset.tid) + { + tmp522.Tid = (Tid)this.Tid.DeepCopy(); + } + tmp522.__isset.tid = this.__isset.tid; + if((Pwd != null) && __isset.pwd) + { + tmp522.Pwd = this.Pwd; + } + tmp522.__isset.pwd = this.__isset.pwd; + if((Auth != null) && __isset.auth) + { + tmp522.Auth = (TimAuth)this.Auth.DeepCopy(); + } + tmp522.__isset.auth = this.__isset.auth; + return tmp522; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + Tid = new Tid(); + await Tid.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.String) + { + Pwd = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.Struct) + { + Auth = new TimAuth(); + await Auth.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp523 = new TStruct("timRemoteUserAuth_args"); + await oprot.WriteStructBeginAsync(tmp523, cancellationToken); + var tmp524 = new TField(); + if((Tid != null) && __isset.tid) + { + tmp524.Name = "tid"; + tmp524.Type = TType.Struct; + tmp524.ID = 1; + await oprot.WriteFieldBeginAsync(tmp524, cancellationToken); + await Tid.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Pwd != null) && __isset.pwd) + { + tmp524.Name = "pwd"; + tmp524.Type = TType.String; + tmp524.ID = 2; + await oprot.WriteFieldBeginAsync(tmp524, cancellationToken); + await oprot.WriteStringAsync(Pwd, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Auth != null) && __isset.auth) + { + tmp524.Name = "auth"; + tmp524.Type = TType.Struct; + tmp524.ID = 3; + await oprot.WriteFieldBeginAsync(tmp524, cancellationToken); + await Auth.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timRemoteUserAuth_args other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.tid == other.__isset.tid) && ((!__isset.tid) || (global::System.Object.Equals(Tid, other.Tid)))) + && ((__isset.pwd == other.__isset.pwd) && ((!__isset.pwd) || (global::System.Object.Equals(Pwd, other.Pwd)))) + && ((__isset.auth == other.__isset.auth) && ((!__isset.auth) || (global::System.Object.Equals(Auth, other.Auth)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Tid != null) && __isset.tid) + { + hashcode = (hashcode * 397) + Tid.GetHashCode(); + } + if((Pwd != null) && __isset.pwd) + { + hashcode = (hashcode * 397) + Pwd.GetHashCode(); + } + if((Auth != null) && __isset.auth) + { + hashcode = (hashcode * 397) + Auth.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp525 = new StringBuilder("timRemoteUserAuth_args("); + int tmp526 = 0; + if((Tid != null) && __isset.tid) + { + if(0 < tmp526++) { tmp525.Append(", "); } + tmp525.Append("Tid: "); + Tid.ToString(tmp525); + } + if((Pwd != null) && __isset.pwd) + { + if(0 < tmp526++) { tmp525.Append(", "); } + tmp525.Append("Pwd: "); + Pwd.ToString(tmp525); + } + if((Auth != null) && __isset.auth) + { + if(0 < tmp526++) { tmp525.Append(", "); } + tmp525.Append("Auth: "); + Auth.ToString(tmp525); + } + tmp525.Append(')'); + return tmp525.ToString(); + } + } + + + public partial class timRemoteUserAuth_result : TBase + { + private TimRemoteUserBean _success; + + public TimRemoteUserBean Success + { + get + { + return _success; + } + set + { + __isset.success = true; + this._success = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool success; + } + + public timRemoteUserAuth_result() + { + } + + public timRemoteUserAuth_result DeepCopy() + { + var tmp527 = new timRemoteUserAuth_result(); + if((Success != null) && __isset.success) + { + tmp527.Success = (TimRemoteUserBean)this.Success.DeepCopy(); + } + tmp527.__isset.success = this.__isset.success; + return tmp527; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 0: + if (field.Type == TType.Struct) + { + Success = new TimRemoteUserBean(); + await Success.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp528 = new TStruct("timRemoteUserAuth_result"); + await oprot.WriteStructBeginAsync(tmp528, cancellationToken); + var tmp529 = new TField(); + + if(this.__isset.success) + { + if (Success != null) + { + tmp529.Name = "Success"; + tmp529.Type = TType.Struct; + tmp529.ID = 0; + await oprot.WriteFieldBeginAsync(tmp529, cancellationToken); + await Success.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timRemoteUserAuth_result other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.success == other.__isset.success) && ((!__isset.success) || (global::System.Object.Equals(Success, other.Success)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Success != null) && __isset.success) + { + hashcode = (hashcode * 397) + Success.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp530 = new StringBuilder("timRemoteUserAuth_result("); + int tmp531 = 0; + if((Success != null) && __isset.success) + { + if(0 < tmp531++) { tmp530.Append(", "); } + tmp530.Append("Success: "); + Success.ToString(tmp530); + } + tmp530.Append(')'); + return tmp530.ToString(); + } + } + + + public partial class timRemoteUserGet_args : TBase + { + private Tid _tid; + private TimAuth _auth; + + public Tid Tid + { + get + { + return _tid; + } + set + { + __isset.tid = true; + this._tid = value; + } + } + + public TimAuth Auth + { + get + { + return _auth; + } + set + { + __isset.auth = true; + this._auth = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool tid; + public bool auth; + } + + public timRemoteUserGet_args() + { + } + + public timRemoteUserGet_args DeepCopy() + { + var tmp532 = new timRemoteUserGet_args(); + if((Tid != null) && __isset.tid) + { + tmp532.Tid = (Tid)this.Tid.DeepCopy(); + } + tmp532.__isset.tid = this.__isset.tid; + if((Auth != null) && __isset.auth) + { + tmp532.Auth = (TimAuth)this.Auth.DeepCopy(); + } + tmp532.__isset.auth = this.__isset.auth; + return tmp532; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + Tid = new Tid(); + await Tid.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.Struct) + { + Auth = new TimAuth(); + await Auth.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp533 = new TStruct("timRemoteUserGet_args"); + await oprot.WriteStructBeginAsync(tmp533, cancellationToken); + var tmp534 = new TField(); + if((Tid != null) && __isset.tid) + { + tmp534.Name = "tid"; + tmp534.Type = TType.Struct; + tmp534.ID = 1; + await oprot.WriteFieldBeginAsync(tmp534, cancellationToken); + await Tid.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Auth != null) && __isset.auth) + { + tmp534.Name = "auth"; + tmp534.Type = TType.Struct; + tmp534.ID = 2; + await oprot.WriteFieldBeginAsync(tmp534, cancellationToken); + await Auth.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timRemoteUserGet_args other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.tid == other.__isset.tid) && ((!__isset.tid) || (global::System.Object.Equals(Tid, other.Tid)))) + && ((__isset.auth == other.__isset.auth) && ((!__isset.auth) || (global::System.Object.Equals(Auth, other.Auth)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Tid != null) && __isset.tid) + { + hashcode = (hashcode * 397) + Tid.GetHashCode(); + } + if((Auth != null) && __isset.auth) + { + hashcode = (hashcode * 397) + Auth.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp535 = new StringBuilder("timRemoteUserGet_args("); + int tmp536 = 0; + if((Tid != null) && __isset.tid) + { + if(0 < tmp536++) { tmp535.Append(", "); } + tmp535.Append("Tid: "); + Tid.ToString(tmp535); + } + if((Auth != null) && __isset.auth) + { + if(0 < tmp536++) { tmp535.Append(", "); } + tmp535.Append("Auth: "); + Auth.ToString(tmp535); + } + tmp535.Append(')'); + return tmp535.ToString(); + } + } + + + public partial class timRemoteUserGet_result : TBase + { + private TimRemoteUserBean _success; + + public TimRemoteUserBean Success + { + get + { + return _success; + } + set + { + __isset.success = true; + this._success = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool success; + } + + public timRemoteUserGet_result() + { + } + + public timRemoteUserGet_result DeepCopy() + { + var tmp537 = new timRemoteUserGet_result(); + if((Success != null) && __isset.success) + { + tmp537.Success = (TimRemoteUserBean)this.Success.DeepCopy(); + } + tmp537.__isset.success = this.__isset.success; + return tmp537; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 0: + if (field.Type == TType.Struct) + { + Success = new TimRemoteUserBean(); + await Success.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp538 = new TStruct("timRemoteUserGet_result"); + await oprot.WriteStructBeginAsync(tmp538, cancellationToken); + var tmp539 = new TField(); + + if(this.__isset.success) + { + if (Success != null) + { + tmp539.Name = "Success"; + tmp539.Type = TType.Struct; + tmp539.ID = 0; + await oprot.WriteFieldBeginAsync(tmp539, cancellationToken); + await Success.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timRemoteUserGet_result other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.success == other.__isset.success) && ((!__isset.success) || (global::System.Object.Equals(Success, other.Success)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Success != null) && __isset.success) + { + hashcode = (hashcode * 397) + Success.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp540 = new StringBuilder("timRemoteUserGet_result("); + int tmp541 = 0; + if((Success != null) && __isset.success) + { + if(0 < tmp541++) { tmp540.Append(", "); } + tmp540.Append("Success: "); + Success.ToString(tmp540); + } + tmp540.Append(')'); + return tmp540.ToString(); + } + } + + + public partial class timRemoteUserEdit_args : TBase + { + private Tid _tid; + private TimUserBean _ub; + private TimAuth _auth; + + public Tid Tid + { + get + { + return _tid; + } + set + { + __isset.tid = true; + this._tid = value; + } + } + + public TimUserBean Ub + { + get + { + return _ub; + } + set + { + __isset.ub = true; + this._ub = value; + } + } + + public TimAuth Auth + { + get + { + return _auth; + } + set + { + __isset.auth = true; + this._auth = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool tid; + public bool ub; + public bool auth; + } + + public timRemoteUserEdit_args() + { + } + + public timRemoteUserEdit_args DeepCopy() + { + var tmp542 = new timRemoteUserEdit_args(); + if((Tid != null) && __isset.tid) + { + tmp542.Tid = (Tid)this.Tid.DeepCopy(); + } + tmp542.__isset.tid = this.__isset.tid; + if((Ub != null) && __isset.ub) + { + tmp542.Ub = (TimUserBean)this.Ub.DeepCopy(); + } + tmp542.__isset.ub = this.__isset.ub; + if((Auth != null) && __isset.auth) + { + tmp542.Auth = (TimAuth)this.Auth.DeepCopy(); + } + tmp542.__isset.auth = this.__isset.auth; + return tmp542; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + Tid = new Tid(); + await Tid.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.Struct) + { + Ub = new TimUserBean(); + await Ub.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.Struct) + { + Auth = new TimAuth(); + await Auth.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp543 = new TStruct("timRemoteUserEdit_args"); + await oprot.WriteStructBeginAsync(tmp543, cancellationToken); + var tmp544 = new TField(); + if((Tid != null) && __isset.tid) + { + tmp544.Name = "tid"; + tmp544.Type = TType.Struct; + tmp544.ID = 1; + await oprot.WriteFieldBeginAsync(tmp544, cancellationToken); + await Tid.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Ub != null) && __isset.ub) + { + tmp544.Name = "ub"; + tmp544.Type = TType.Struct; + tmp544.ID = 2; + await oprot.WriteFieldBeginAsync(tmp544, cancellationToken); + await Ub.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Auth != null) && __isset.auth) + { + tmp544.Name = "auth"; + tmp544.Type = TType.Struct; + tmp544.ID = 3; + await oprot.WriteFieldBeginAsync(tmp544, cancellationToken); + await Auth.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timRemoteUserEdit_args other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.tid == other.__isset.tid) && ((!__isset.tid) || (global::System.Object.Equals(Tid, other.Tid)))) + && ((__isset.ub == other.__isset.ub) && ((!__isset.ub) || (global::System.Object.Equals(Ub, other.Ub)))) + && ((__isset.auth == other.__isset.auth) && ((!__isset.auth) || (global::System.Object.Equals(Auth, other.Auth)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Tid != null) && __isset.tid) + { + hashcode = (hashcode * 397) + Tid.GetHashCode(); + } + if((Ub != null) && __isset.ub) + { + hashcode = (hashcode * 397) + Ub.GetHashCode(); + } + if((Auth != null) && __isset.auth) + { + hashcode = (hashcode * 397) + Auth.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp545 = new StringBuilder("timRemoteUserEdit_args("); + int tmp546 = 0; + if((Tid != null) && __isset.tid) + { + if(0 < tmp546++) { tmp545.Append(", "); } + tmp545.Append("Tid: "); + Tid.ToString(tmp545); + } + if((Ub != null) && __isset.ub) + { + if(0 < tmp546++) { tmp545.Append(", "); } + tmp545.Append("Ub: "); + Ub.ToString(tmp545); + } + if((Auth != null) && __isset.auth) + { + if(0 < tmp546++) { tmp545.Append(", "); } + tmp545.Append("Auth: "); + Auth.ToString(tmp545); + } + tmp545.Append(')'); + return tmp545.ToString(); + } + } + + + public partial class timRemoteUserEdit_result : TBase + { + private TimRemoteUserBean _success; + + public TimRemoteUserBean Success + { + get + { + return _success; + } + set + { + __isset.success = true; + this._success = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool success; + } + + public timRemoteUserEdit_result() + { + } + + public timRemoteUserEdit_result DeepCopy() + { + var tmp547 = new timRemoteUserEdit_result(); + if((Success != null) && __isset.success) + { + tmp547.Success = (TimRemoteUserBean)this.Success.DeepCopy(); + } + tmp547.__isset.success = this.__isset.success; + return tmp547; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 0: + if (field.Type == TType.Struct) + { + Success = new TimRemoteUserBean(); + await Success.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp548 = new TStruct("timRemoteUserEdit_result"); + await oprot.WriteStructBeginAsync(tmp548, cancellationToken); + var tmp549 = new TField(); + + if(this.__isset.success) + { + if (Success != null) + { + tmp549.Name = "Success"; + tmp549.Type = TType.Struct; + tmp549.ID = 0; + await oprot.WriteFieldBeginAsync(tmp549, cancellationToken); + await Success.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timRemoteUserEdit_result other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.success == other.__isset.success) && ((!__isset.success) || (global::System.Object.Equals(Success, other.Success)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Success != null) && __isset.success) + { + hashcode = (hashcode * 397) + Success.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp550 = new StringBuilder("timRemoteUserEdit_result("); + int tmp551 = 0; + if((Success != null) && __isset.success) + { + if(0 < tmp551++) { tmp550.Append(", "); } + tmp550.Append("Success: "); + Success.ToString(tmp550); + } + tmp550.Append(')'); + return tmp550.ToString(); + } + } + + + public partial class timResponsePresence_args : TBase + { + private TimPBean _pbean; + private TimAuth _auth; + + public TimPBean Pbean + { + get + { + return _pbean; + } + set + { + __isset.pbean = true; + this._pbean = value; + } + } + + public TimAuth Auth + { + get + { + return _auth; + } + set + { + __isset.auth = true; + this._auth = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool pbean; + public bool auth; + } + + public timResponsePresence_args() + { + } + + public timResponsePresence_args DeepCopy() + { + var tmp552 = new timResponsePresence_args(); + if((Pbean != null) && __isset.pbean) + { + tmp552.Pbean = (TimPBean)this.Pbean.DeepCopy(); + } + tmp552.__isset.pbean = this.__isset.pbean; + if((Auth != null) && __isset.auth) + { + tmp552.Auth = (TimAuth)this.Auth.DeepCopy(); + } + tmp552.__isset.auth = this.__isset.auth; + return tmp552; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + Pbean = new TimPBean(); + await Pbean.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.Struct) + { + Auth = new TimAuth(); + await Auth.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp553 = new TStruct("timResponsePresence_args"); + await oprot.WriteStructBeginAsync(tmp553, cancellationToken); + var tmp554 = new TField(); + if((Pbean != null) && __isset.pbean) + { + tmp554.Name = "pbean"; + tmp554.Type = TType.Struct; + tmp554.ID = 1; + await oprot.WriteFieldBeginAsync(tmp554, cancellationToken); + await Pbean.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Auth != null) && __isset.auth) + { + tmp554.Name = "auth"; + tmp554.Type = TType.Struct; + tmp554.ID = 2; + await oprot.WriteFieldBeginAsync(tmp554, cancellationToken); + await Auth.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timResponsePresence_args other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.pbean == other.__isset.pbean) && ((!__isset.pbean) || (global::System.Object.Equals(Pbean, other.Pbean)))) + && ((__isset.auth == other.__isset.auth) && ((!__isset.auth) || (global::System.Object.Equals(Auth, other.Auth)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Pbean != null) && __isset.pbean) + { + hashcode = (hashcode * 397) + Pbean.GetHashCode(); + } + if((Auth != null) && __isset.auth) + { + hashcode = (hashcode * 397) + Auth.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp555 = new StringBuilder("timResponsePresence_args("); + int tmp556 = 0; + if((Pbean != null) && __isset.pbean) + { + if(0 < tmp556++) { tmp555.Append(", "); } + tmp555.Append("Pbean: "); + Pbean.ToString(tmp555); + } + if((Auth != null) && __isset.auth) + { + if(0 < tmp556++) { tmp555.Append(", "); } + tmp555.Append("Auth: "); + Auth.ToString(tmp555); + } + tmp555.Append(')'); + return tmp555.ToString(); + } + } + + + public partial class timResponsePresence_result : TBase + { + private TimResponseBean _success; + + public TimResponseBean Success + { + get + { + return _success; + } + set + { + __isset.success = true; + this._success = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool success; + } + + public timResponsePresence_result() + { + } + + public timResponsePresence_result DeepCopy() + { + var tmp557 = new timResponsePresence_result(); + if((Success != null) && __isset.success) + { + tmp557.Success = (TimResponseBean)this.Success.DeepCopy(); + } + tmp557.__isset.success = this.__isset.success; + return tmp557; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 0: + if (field.Type == TType.Struct) + { + Success = new TimResponseBean(); + await Success.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp558 = new TStruct("timResponsePresence_result"); + await oprot.WriteStructBeginAsync(tmp558, cancellationToken); + var tmp559 = new TField(); + + if(this.__isset.success) + { + if (Success != null) + { + tmp559.Name = "Success"; + tmp559.Type = TType.Struct; + tmp559.ID = 0; + await oprot.WriteFieldBeginAsync(tmp559, cancellationToken); + await Success.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timResponsePresence_result other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.success == other.__isset.success) && ((!__isset.success) || (global::System.Object.Equals(Success, other.Success)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Success != null) && __isset.success) + { + hashcode = (hashcode * 397) + Success.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp560 = new StringBuilder("timResponsePresence_result("); + int tmp561 = 0; + if((Success != null) && __isset.success) + { + if(0 < tmp561++) { tmp560.Append(", "); } + tmp560.Append("Success: "); + Success.ToString(tmp560); + } + tmp560.Append(')'); + return tmp560.ToString(); + } + } + + + public partial class timResponseMessage_args : TBase + { + private TimMBean _mbean; + private TimAuth _auth; + + public TimMBean Mbean + { + get + { + return _mbean; + } + set + { + __isset.mbean = true; + this._mbean = value; + } + } + + public TimAuth Auth + { + get + { + return _auth; + } + set + { + __isset.auth = true; + this._auth = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool mbean; + public bool auth; + } + + public timResponseMessage_args() + { + } + + public timResponseMessage_args DeepCopy() + { + var tmp562 = new timResponseMessage_args(); + if((Mbean != null) && __isset.mbean) + { + tmp562.Mbean = (TimMBean)this.Mbean.DeepCopy(); + } + tmp562.__isset.mbean = this.__isset.mbean; + if((Auth != null) && __isset.auth) + { + tmp562.Auth = (TimAuth)this.Auth.DeepCopy(); + } + tmp562.__isset.auth = this.__isset.auth; + return tmp562; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + Mbean = new TimMBean(); + await Mbean.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.Struct) + { + Auth = new TimAuth(); + await Auth.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp563 = new TStruct("timResponseMessage_args"); + await oprot.WriteStructBeginAsync(tmp563, cancellationToken); + var tmp564 = new TField(); + if((Mbean != null) && __isset.mbean) + { + tmp564.Name = "mbean"; + tmp564.Type = TType.Struct; + tmp564.ID = 1; + await oprot.WriteFieldBeginAsync(tmp564, cancellationToken); + await Mbean.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Auth != null) && __isset.auth) + { + tmp564.Name = "auth"; + tmp564.Type = TType.Struct; + tmp564.ID = 2; + await oprot.WriteFieldBeginAsync(tmp564, cancellationToken); + await Auth.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timResponseMessage_args other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.mbean == other.__isset.mbean) && ((!__isset.mbean) || (global::System.Object.Equals(Mbean, other.Mbean)))) + && ((__isset.auth == other.__isset.auth) && ((!__isset.auth) || (global::System.Object.Equals(Auth, other.Auth)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Mbean != null) && __isset.mbean) + { + hashcode = (hashcode * 397) + Mbean.GetHashCode(); + } + if((Auth != null) && __isset.auth) + { + hashcode = (hashcode * 397) + Auth.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp565 = new StringBuilder("timResponseMessage_args("); + int tmp566 = 0; + if((Mbean != null) && __isset.mbean) + { + if(0 < tmp566++) { tmp565.Append(", "); } + tmp565.Append("Mbean: "); + Mbean.ToString(tmp565); + } + if((Auth != null) && __isset.auth) + { + if(0 < tmp566++) { tmp565.Append(", "); } + tmp565.Append("Auth: "); + Auth.ToString(tmp565); + } + tmp565.Append(')'); + return tmp565.ToString(); + } + } + + + public partial class timResponseMessage_result : TBase + { + private TimResponseBean _success; + + public TimResponseBean Success + { + get + { + return _success; + } + set + { + __isset.success = true; + this._success = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool success; + } + + public timResponseMessage_result() + { + } + + public timResponseMessage_result DeepCopy() + { + var tmp567 = new timResponseMessage_result(); + if((Success != null) && __isset.success) + { + tmp567.Success = (TimResponseBean)this.Success.DeepCopy(); + } + tmp567.__isset.success = this.__isset.success; + return tmp567; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 0: + if (field.Type == TType.Struct) + { + Success = new TimResponseBean(); + await Success.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp568 = new TStruct("timResponseMessage_result"); + await oprot.WriteStructBeginAsync(tmp568, cancellationToken); + var tmp569 = new TField(); + + if(this.__isset.success) + { + if (Success != null) + { + tmp569.Name = "Success"; + tmp569.Type = TType.Struct; + tmp569.ID = 0; + await oprot.WriteFieldBeginAsync(tmp569, cancellationToken); + await Success.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timResponseMessage_result other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.success == other.__isset.success) && ((!__isset.success) || (global::System.Object.Equals(Success, other.Success)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Success != null) && __isset.success) + { + hashcode = (hashcode * 397) + Success.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp570 = new StringBuilder("timResponseMessage_result("); + int tmp571 = 0; + if((Success != null) && __isset.success) + { + if(0 < tmp571++) { tmp570.Append(", "); } + tmp570.Append("Success: "); + Success.ToString(tmp570); + } + tmp570.Append(')'); + return tmp570.ToString(); + } + } + + + public partial class timResponseMessageIq_args : TBase + { + private TimMessageIq _timMsgIq; + private string _iqType; + private TimAuth _auth; + + public TimMessageIq TimMsgIq + { + get + { + return _timMsgIq; + } + set + { + __isset.timMsgIq = true; + this._timMsgIq = value; + } + } + + public string IqType + { + get + { + return _iqType; + } + set + { + __isset.iqType = true; + this._iqType = value; + } + } + + public TimAuth Auth + { + get + { + return _auth; + } + set + { + __isset.auth = true; + this._auth = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool timMsgIq; + public bool iqType; + public bool auth; + } + + public timResponseMessageIq_args() + { + } + + public timResponseMessageIq_args DeepCopy() + { + var tmp572 = new timResponseMessageIq_args(); + if((TimMsgIq != null) && __isset.timMsgIq) + { + tmp572.TimMsgIq = (TimMessageIq)this.TimMsgIq.DeepCopy(); + } + tmp572.__isset.timMsgIq = this.__isset.timMsgIq; + if((IqType != null) && __isset.iqType) + { + tmp572.IqType = this.IqType; + } + tmp572.__isset.iqType = this.__isset.iqType; + if((Auth != null) && __isset.auth) + { + tmp572.Auth = (TimAuth)this.Auth.DeepCopy(); + } + tmp572.__isset.auth = this.__isset.auth; + return tmp572; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + TimMsgIq = new TimMessageIq(); + await TimMsgIq.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.String) + { + IqType = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.Struct) + { + Auth = new TimAuth(); + await Auth.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp573 = new TStruct("timResponseMessageIq_args"); + await oprot.WriteStructBeginAsync(tmp573, cancellationToken); + var tmp574 = new TField(); + if((TimMsgIq != null) && __isset.timMsgIq) + { + tmp574.Name = "timMsgIq"; + tmp574.Type = TType.Struct; + tmp574.ID = 1; + await oprot.WriteFieldBeginAsync(tmp574, cancellationToken); + await TimMsgIq.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((IqType != null) && __isset.iqType) + { + tmp574.Name = "iqType"; + tmp574.Type = TType.String; + tmp574.ID = 2; + await oprot.WriteFieldBeginAsync(tmp574, cancellationToken); + await oprot.WriteStringAsync(IqType, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Auth != null) && __isset.auth) + { + tmp574.Name = "auth"; + tmp574.Type = TType.Struct; + tmp574.ID = 3; + await oprot.WriteFieldBeginAsync(tmp574, cancellationToken); + await Auth.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timResponseMessageIq_args other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.timMsgIq == other.__isset.timMsgIq) && ((!__isset.timMsgIq) || (global::System.Object.Equals(TimMsgIq, other.TimMsgIq)))) + && ((__isset.iqType == other.__isset.iqType) && ((!__isset.iqType) || (global::System.Object.Equals(IqType, other.IqType)))) + && ((__isset.auth == other.__isset.auth) && ((!__isset.auth) || (global::System.Object.Equals(Auth, other.Auth)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((TimMsgIq != null) && __isset.timMsgIq) + { + hashcode = (hashcode * 397) + TimMsgIq.GetHashCode(); + } + if((IqType != null) && __isset.iqType) + { + hashcode = (hashcode * 397) + IqType.GetHashCode(); + } + if((Auth != null) && __isset.auth) + { + hashcode = (hashcode * 397) + Auth.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp575 = new StringBuilder("timResponseMessageIq_args("); + int tmp576 = 0; + if((TimMsgIq != null) && __isset.timMsgIq) + { + if(0 < tmp576++) { tmp575.Append(", "); } + tmp575.Append("TimMsgIq: "); + TimMsgIq.ToString(tmp575); + } + if((IqType != null) && __isset.iqType) + { + if(0 < tmp576++) { tmp575.Append(", "); } + tmp575.Append("IqType: "); + IqType.ToString(tmp575); + } + if((Auth != null) && __isset.auth) + { + if(0 < tmp576++) { tmp575.Append(", "); } + tmp575.Append("Auth: "); + Auth.ToString(tmp575); + } + tmp575.Append(')'); + return tmp575.ToString(); + } + } + + + public partial class timResponseMessageIq_result : TBase + { + private TimMBeanList _success; + + public TimMBeanList Success + { + get + { + return _success; + } + set + { + __isset.success = true; + this._success = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool success; + } + + public timResponseMessageIq_result() + { + } + + public timResponseMessageIq_result DeepCopy() + { + var tmp577 = new timResponseMessageIq_result(); + if((Success != null) && __isset.success) + { + tmp577.Success = (TimMBeanList)this.Success.DeepCopy(); + } + tmp577.__isset.success = this.__isset.success; + return tmp577; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 0: + if (field.Type == TType.Struct) + { + Success = new TimMBeanList(); + await Success.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp578 = new TStruct("timResponseMessageIq_result"); + await oprot.WriteStructBeginAsync(tmp578, cancellationToken); + var tmp579 = new TField(); + + if(this.__isset.success) + { + if (Success != null) + { + tmp579.Name = "Success"; + tmp579.Type = TType.Struct; + tmp579.ID = 0; + await oprot.WriteFieldBeginAsync(tmp579, cancellationToken); + await Success.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timResponseMessageIq_result other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.success == other.__isset.success) && ((!__isset.success) || (global::System.Object.Equals(Success, other.Success)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Success != null) && __isset.success) + { + hashcode = (hashcode * 397) + Success.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp580 = new StringBuilder("timResponseMessageIq_result("); + int tmp581 = 0; + if((Success != null) && __isset.success) + { + if(0 < tmp581++) { tmp580.Append(", "); } + tmp580.Append("Success: "); + Success.ToString(tmp580); + } + tmp580.Append(')'); + return tmp580.ToString(); + } + } + + + public partial class timResponsePresenceList_args : TBase + { + private TimPBeanList _pbeanList; + private TimAuth _auth; + + public TimPBeanList PbeanList + { + get + { + return _pbeanList; + } + set + { + __isset.pbeanList = true; + this._pbeanList = value; + } + } + + public TimAuth Auth + { + get + { + return _auth; + } + set + { + __isset.auth = true; + this._auth = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool pbeanList; + public bool auth; + } + + public timResponsePresenceList_args() + { + } + + public timResponsePresenceList_args DeepCopy() + { + var tmp582 = new timResponsePresenceList_args(); + if((PbeanList != null) && __isset.pbeanList) + { + tmp582.PbeanList = (TimPBeanList)this.PbeanList.DeepCopy(); + } + tmp582.__isset.pbeanList = this.__isset.pbeanList; + if((Auth != null) && __isset.auth) + { + tmp582.Auth = (TimAuth)this.Auth.DeepCopy(); + } + tmp582.__isset.auth = this.__isset.auth; + return tmp582; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + PbeanList = new TimPBeanList(); + await PbeanList.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.Struct) + { + Auth = new TimAuth(); + await Auth.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp583 = new TStruct("timResponsePresenceList_args"); + await oprot.WriteStructBeginAsync(tmp583, cancellationToken); + var tmp584 = new TField(); + if((PbeanList != null) && __isset.pbeanList) + { + tmp584.Name = "pbeanList"; + tmp584.Type = TType.Struct; + tmp584.ID = 1; + await oprot.WriteFieldBeginAsync(tmp584, cancellationToken); + await PbeanList.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Auth != null) && __isset.auth) + { + tmp584.Name = "auth"; + tmp584.Type = TType.Struct; + tmp584.ID = 2; + await oprot.WriteFieldBeginAsync(tmp584, cancellationToken); + await Auth.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timResponsePresenceList_args other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.pbeanList == other.__isset.pbeanList) && ((!__isset.pbeanList) || (global::System.Object.Equals(PbeanList, other.PbeanList)))) + && ((__isset.auth == other.__isset.auth) && ((!__isset.auth) || (global::System.Object.Equals(Auth, other.Auth)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((PbeanList != null) && __isset.pbeanList) + { + hashcode = (hashcode * 397) + PbeanList.GetHashCode(); + } + if((Auth != null) && __isset.auth) + { + hashcode = (hashcode * 397) + Auth.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp585 = new StringBuilder("timResponsePresenceList_args("); + int tmp586 = 0; + if((PbeanList != null) && __isset.pbeanList) + { + if(0 < tmp586++) { tmp585.Append(", "); } + tmp585.Append("PbeanList: "); + PbeanList.ToString(tmp585); + } + if((Auth != null) && __isset.auth) + { + if(0 < tmp586++) { tmp585.Append(", "); } + tmp585.Append("Auth: "); + Auth.ToString(tmp585); + } + tmp585.Append(')'); + return tmp585.ToString(); + } + } + + + public partial class timResponsePresenceList_result : TBase + { + private TimResponseBean _success; + + public TimResponseBean Success + { + get + { + return _success; + } + set + { + __isset.success = true; + this._success = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool success; + } + + public timResponsePresenceList_result() + { + } + + public timResponsePresenceList_result DeepCopy() + { + var tmp587 = new timResponsePresenceList_result(); + if((Success != null) && __isset.success) + { + tmp587.Success = (TimResponseBean)this.Success.DeepCopy(); + } + tmp587.__isset.success = this.__isset.success; + return tmp587; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 0: + if (field.Type == TType.Struct) + { + Success = new TimResponseBean(); + await Success.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp588 = new TStruct("timResponsePresenceList_result"); + await oprot.WriteStructBeginAsync(tmp588, cancellationToken); + var tmp589 = new TField(); + + if(this.__isset.success) + { + if (Success != null) + { + tmp589.Name = "Success"; + tmp589.Type = TType.Struct; + tmp589.ID = 0; + await oprot.WriteFieldBeginAsync(tmp589, cancellationToken); + await Success.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timResponsePresenceList_result other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.success == other.__isset.success) && ((!__isset.success) || (global::System.Object.Equals(Success, other.Success)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Success != null) && __isset.success) + { + hashcode = (hashcode * 397) + Success.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp590 = new StringBuilder("timResponsePresenceList_result("); + int tmp591 = 0; + if((Success != null) && __isset.success) + { + if(0 < tmp591++) { tmp590.Append(", "); } + tmp590.Append("Success: "); + Success.ToString(tmp590); + } + tmp590.Append(')'); + return tmp590.ToString(); + } + } + + + public partial class timResponseMessageList_args : TBase + { + private TimMBeanList _mbeanList; + private TimAuth _auth; + + public TimMBeanList MbeanList + { + get + { + return _mbeanList; + } + set + { + __isset.mbeanList = true; + this._mbeanList = value; + } + } + + public TimAuth Auth + { + get + { + return _auth; + } + set + { + __isset.auth = true; + this._auth = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool mbeanList; + public bool auth; + } + + public timResponseMessageList_args() + { + } + + public timResponseMessageList_args DeepCopy() + { + var tmp592 = new timResponseMessageList_args(); + if((MbeanList != null) && __isset.mbeanList) + { + tmp592.MbeanList = (TimMBeanList)this.MbeanList.DeepCopy(); + } + tmp592.__isset.mbeanList = this.__isset.mbeanList; + if((Auth != null) && __isset.auth) + { + tmp592.Auth = (TimAuth)this.Auth.DeepCopy(); + } + tmp592.__isset.auth = this.__isset.auth; + return tmp592; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + MbeanList = new TimMBeanList(); + await MbeanList.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.Struct) + { + Auth = new TimAuth(); + await Auth.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp593 = new TStruct("timResponseMessageList_args"); + await oprot.WriteStructBeginAsync(tmp593, cancellationToken); + var tmp594 = new TField(); + if((MbeanList != null) && __isset.mbeanList) + { + tmp594.Name = "mbeanList"; + tmp594.Type = TType.Struct; + tmp594.ID = 1; + await oprot.WriteFieldBeginAsync(tmp594, cancellationToken); + await MbeanList.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Auth != null) && __isset.auth) + { + tmp594.Name = "auth"; + tmp594.Type = TType.Struct; + tmp594.ID = 2; + await oprot.WriteFieldBeginAsync(tmp594, cancellationToken); + await Auth.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timResponseMessageList_args other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.mbeanList == other.__isset.mbeanList) && ((!__isset.mbeanList) || (global::System.Object.Equals(MbeanList, other.MbeanList)))) + && ((__isset.auth == other.__isset.auth) && ((!__isset.auth) || (global::System.Object.Equals(Auth, other.Auth)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((MbeanList != null) && __isset.mbeanList) + { + hashcode = (hashcode * 397) + MbeanList.GetHashCode(); + } + if((Auth != null) && __isset.auth) + { + hashcode = (hashcode * 397) + Auth.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp595 = new StringBuilder("timResponseMessageList_args("); + int tmp596 = 0; + if((MbeanList != null) && __isset.mbeanList) + { + if(0 < tmp596++) { tmp595.Append(", "); } + tmp595.Append("MbeanList: "); + MbeanList.ToString(tmp595); + } + if((Auth != null) && __isset.auth) + { + if(0 < tmp596++) { tmp595.Append(", "); } + tmp595.Append("Auth: "); + Auth.ToString(tmp595); + } + tmp595.Append(')'); + return tmp595.ToString(); + } + } + + + public partial class timResponseMessageList_result : TBase + { + private TimResponseBean _success; + + public TimResponseBean Success + { + get + { + return _success; + } + set + { + __isset.success = true; + this._success = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool success; + } + + public timResponseMessageList_result() + { + } + + public timResponseMessageList_result DeepCopy() + { + var tmp597 = new timResponseMessageList_result(); + if((Success != null) && __isset.success) + { + tmp597.Success = (TimResponseBean)this.Success.DeepCopy(); + } + tmp597.__isset.success = this.__isset.success; + return tmp597; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 0: + if (field.Type == TType.Struct) + { + Success = new TimResponseBean(); + await Success.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp598 = new TStruct("timResponseMessageList_result"); + await oprot.WriteStructBeginAsync(tmp598, cancellationToken); + var tmp599 = new TField(); + + if(this.__isset.success) + { + if (Success != null) + { + tmp599.Name = "Success"; + tmp599.Type = TType.Struct; + tmp599.ID = 0; + await oprot.WriteFieldBeginAsync(tmp599, cancellationToken); + await Success.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is timResponseMessageList_result other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.success == other.__isset.success) && ((!__isset.success) || (global::System.Object.Equals(Success, other.Success)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Success != null) && __isset.success) + { + hashcode = (hashcode * 397) + Success.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp600 = new StringBuilder("timResponseMessageList_result("); + int tmp601 = 0; + if((Success != null) && __isset.success) + { + if(0 < tmp601++) { tmp600.Append(", "); } + tmp600.Append("Success: "); + Success.ToString(tmp600); + } + tmp600.Append(')'); + return tmp600.ToString(); + } + } + + } + +} diff --git a/protocols/gen-netstd/Tid.cs b/protocols/gen-netstd/Tid.cs new file mode 100644 index 0000000..4b5b035 --- /dev/null +++ b/protocols/gen-netstd/Tid.cs @@ -0,0 +1,464 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class Tid : TBase +{ + private string _domain; + private string _resource; + private string _type; + private List _extraList; + private Dictionary _extraMap; + + /// + /// 登陆名 用户登录号,房间号等 + /// + public string Name { get; set; } + + /// + /// 域名 用于区分渠道等 appid,appsecret + /// + public string Domain + { + get + { + return _domain; + } + set + { + __isset.domain = true; + this._domain = value; + } + } + + /// + /// 系统 自行约定 如 : 1IOS,2android,3H5,4WEB 等 + /// + public string Resource + { + get + { + return _resource; + } + set + { + __isset.resource = true; + this._resource = value; + } + } + + /// + /// normal,group + /// + public string Type + { + get + { + return _type; + } + set + { + __isset.type = true; + this._type = value; + } + } + + /// + /// 附加信息:如传递客户端信息 iphone6,xiaomi,huawei等 + /// + public List ExtraList + { + get + { + return _extraList; + } + set + { + __isset.extraList = true; + this._extraList = value; + } + } + + public Dictionary ExtraMap + { + get + { + return _extraMap; + } + set + { + __isset.extraMap = true; + this._extraMap = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool domain; + public bool resource; + public bool type; + public bool extraList; + public bool extraMap; + } + + public Tid() + { + } + + public Tid(string name) : this() + { + this.Name = name; + } + + public Tid DeepCopy() + { + var tmp62 = new Tid(); + if((Name != null)) + { + tmp62.Name = this.Name; + } + if((Domain != null) && __isset.domain) + { + tmp62.Domain = this.Domain; + } + tmp62.__isset.domain = this.__isset.domain; + if((Resource != null) && __isset.resource) + { + tmp62.Resource = this.Resource; + } + tmp62.__isset.resource = this.__isset.resource; + if((Type != null) && __isset.type) + { + tmp62.Type = this.Type; + } + tmp62.__isset.type = this.__isset.type; + if((ExtraList != null) && __isset.extraList) + { + tmp62.ExtraList = this.ExtraList.DeepCopy(); + } + tmp62.__isset.extraList = this.__isset.extraList; + if((ExtraMap != null) && __isset.extraMap) + { + tmp62.ExtraMap = this.ExtraMap.DeepCopy(); + } + tmp62.__isset.extraMap = this.__isset.extraMap; + return tmp62; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + bool isset_name = false; + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.String) + { + Name = await iprot.ReadStringAsync(cancellationToken); + isset_name = true; + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.String) + { + Domain = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.String) + { + Resource = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 4: + if (field.Type == TType.String) + { + Type = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 5: + if (field.Type == TType.List) + { + { + var _list63 = await iprot.ReadListBeginAsync(cancellationToken); + ExtraList = new List(_list63.Count); + for(int _i64 = 0; _i64 < _list63.Count; ++_i64) + { + TimNode _elem65; + _elem65 = new TimNode(); + await _elem65.ReadAsync(iprot, cancellationToken); + ExtraList.Add(_elem65); + } + await iprot.ReadListEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 6: + if (field.Type == TType.Map) + { + { + var _map66 = await iprot.ReadMapBeginAsync(cancellationToken); + ExtraMap = new Dictionary(_map66.Count); + for(int _i67 = 0; _i67 < _map66.Count; ++_i67) + { + string _key68; + string _val69; + _key68 = await iprot.ReadStringAsync(cancellationToken); + _val69 = await iprot.ReadStringAsync(cancellationToken); + ExtraMap[_key68] = _val69; + } + await iprot.ReadMapEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + if (!isset_name) + { + throw new TProtocolException(TProtocolException.INVALID_DATA); + } + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp70 = new TStruct("Tid"); + await oprot.WriteStructBeginAsync(tmp70, cancellationToken); + var tmp71 = new TField(); + if((Name != null)) + { + tmp71.Name = "name"; + tmp71.Type = TType.String; + tmp71.ID = 1; + await oprot.WriteFieldBeginAsync(tmp71, cancellationToken); + await oprot.WriteStringAsync(Name, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Domain != null) && __isset.domain) + { + tmp71.Name = "domain"; + tmp71.Type = TType.String; + tmp71.ID = 2; + await oprot.WriteFieldBeginAsync(tmp71, cancellationToken); + await oprot.WriteStringAsync(Domain, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Resource != null) && __isset.resource) + { + tmp71.Name = "resource"; + tmp71.Type = TType.String; + tmp71.ID = 3; + await oprot.WriteFieldBeginAsync(tmp71, cancellationToken); + await oprot.WriteStringAsync(Resource, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Type != null) && __isset.type) + { + tmp71.Name = "type"; + tmp71.Type = TType.String; + tmp71.ID = 4; + await oprot.WriteFieldBeginAsync(tmp71, cancellationToken); + await oprot.WriteStringAsync(Type, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraList != null) && __isset.extraList) + { + tmp71.Name = "extraList"; + tmp71.Type = TType.List; + tmp71.ID = 5; + await oprot.WriteFieldBeginAsync(tmp71, cancellationToken); + await oprot.WriteListBeginAsync(new TList(TType.Struct, ExtraList.Count), cancellationToken); + foreach (TimNode _iter72 in ExtraList) + { + await _iter72.WriteAsync(oprot, cancellationToken); + } + await oprot.WriteListEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp71.Name = "extraMap"; + tmp71.Type = TType.Map; + tmp71.ID = 6; + await oprot.WriteFieldBeginAsync(tmp71, cancellationToken); + await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.String, ExtraMap.Count), cancellationToken); + foreach (string _iter73 in ExtraMap.Keys) + { + await oprot.WriteStringAsync(_iter73, cancellationToken); + await oprot.WriteStringAsync(ExtraMap[_iter73], cancellationToken); + } + await oprot.WriteMapEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is Tid other)) return false; + if (ReferenceEquals(this, other)) return true; + return global::System.Object.Equals(Name, other.Name) + && ((__isset.domain == other.__isset.domain) && ((!__isset.domain) || (global::System.Object.Equals(Domain, other.Domain)))) + && ((__isset.resource == other.__isset.resource) && ((!__isset.resource) || (global::System.Object.Equals(Resource, other.Resource)))) + && ((__isset.type == other.__isset.type) && ((!__isset.type) || (global::System.Object.Equals(Type, other.Type)))) + && ((__isset.extraList == other.__isset.extraList) && ((!__isset.extraList) || (TCollections.Equals(ExtraList, other.ExtraList)))) + && ((__isset.extraMap == other.__isset.extraMap) && ((!__isset.extraMap) || (TCollections.Equals(ExtraMap, other.ExtraMap)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Name != null)) + { + hashcode = (hashcode * 397) + Name.GetHashCode(); + } + if((Domain != null) && __isset.domain) + { + hashcode = (hashcode * 397) + Domain.GetHashCode(); + } + if((Resource != null) && __isset.resource) + { + hashcode = (hashcode * 397) + Resource.GetHashCode(); + } + if((Type != null) && __isset.type) + { + hashcode = (hashcode * 397) + Type.GetHashCode(); + } + if((ExtraList != null) && __isset.extraList) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraList); + } + if((ExtraMap != null) && __isset.extraMap) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraMap); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp74 = new StringBuilder("Tid("); + if((Name != null)) + { + tmp74.Append(", Name: "); + Name.ToString(tmp74); + } + if((Domain != null) && __isset.domain) + { + tmp74.Append(", Domain: "); + Domain.ToString(tmp74); + } + if((Resource != null) && __isset.resource) + { + tmp74.Append(", Resource: "); + Resource.ToString(tmp74); + } + if((Type != null) && __isset.type) + { + tmp74.Append(", Type: "); + Type.ToString(tmp74); + } + if((ExtraList != null) && __isset.extraList) + { + tmp74.Append(", ExtraList: "); + ExtraList.ToString(tmp74); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp74.Append(", ExtraMap: "); + ExtraMap.ToString(tmp74); + } + tmp74.Append(')'); + return tmp74.ToString(); + } +} + diff --git a/protocols/gen-netstd/TimAckBean.cs b/protocols/gen-netstd/TimAckBean.cs new file mode 100644 index 0000000..94a39c2 --- /dev/null +++ b/protocols/gen-netstd/TimAckBean.cs @@ -0,0 +1,475 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class TimAckBean : TBase +{ + private string _id; + private string _ackType; + private string _ackStatus; + private List _extraList; + private TimError _err; + private Dictionary _extraMap; + + /// + /// id,返回所要回执协议的线程id + /// + public string Id + { + get + { + return _id; + } + set + { + __isset.id = true; + this._id = value; + } + } + + /// + /// 类型,自定义 如:ping,message等 + /// + public string AckType + { + get + { + return _ackType; + } + set + { + __isset.ackType = true; + this._ackType = value; + } + } + + /// + /// 状态,如成功,失败等 + /// + public string AckStatus + { + get + { + return _ackStatus; + } + set + { + __isset.ackStatus = true; + this._ackStatus = value; + } + } + + /// + /// 附加信息 + /// + public List ExtraList + { + get + { + return _extraList; + } + set + { + __isset.extraList = true; + this._extraList = value; + } + } + + /// + /// 错误信息 + /// + public TimError Err + { + get + { + return _err; + } + set + { + __isset.err = true; + this._err = value; + } + } + + public Dictionary ExtraMap + { + get + { + return _extraMap; + } + set + { + __isset.extraMap = true; + this._extraMap = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool id; + public bool ackType; + public bool ackStatus; + public bool extraList; + public bool err; + public bool extraMap; + } + + public TimAckBean() + { + } + + public TimAckBean DeepCopy() + { + var tmp10 = new TimAckBean(); + if((Id != null) && __isset.id) + { + tmp10.Id = this.Id; + } + tmp10.__isset.id = this.__isset.id; + if((AckType != null) && __isset.ackType) + { + tmp10.AckType = this.AckType; + } + tmp10.__isset.ackType = this.__isset.ackType; + if((AckStatus != null) && __isset.ackStatus) + { + tmp10.AckStatus = this.AckStatus; + } + tmp10.__isset.ackStatus = this.__isset.ackStatus; + if((ExtraList != null) && __isset.extraList) + { + tmp10.ExtraList = this.ExtraList.DeepCopy(); + } + tmp10.__isset.extraList = this.__isset.extraList; + if((Err != null) && __isset.err) + { + tmp10.Err = (TimError)this.Err.DeepCopy(); + } + tmp10.__isset.err = this.__isset.err; + if((ExtraMap != null) && __isset.extraMap) + { + tmp10.ExtraMap = this.ExtraMap.DeepCopy(); + } + tmp10.__isset.extraMap = this.__isset.extraMap; + return tmp10; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.String) + { + Id = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.String) + { + AckType = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.String) + { + AckStatus = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 4: + if (field.Type == TType.List) + { + { + var _list11 = await iprot.ReadListBeginAsync(cancellationToken); + ExtraList = new List(_list11.Count); + for(int _i12 = 0; _i12 < _list11.Count; ++_i12) + { + TimNode _elem13; + _elem13 = new TimNode(); + await _elem13.ReadAsync(iprot, cancellationToken); + ExtraList.Add(_elem13); + } + await iprot.ReadListEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 5: + if (field.Type == TType.Struct) + { + Err = new TimError(); + await Err.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 6: + if (field.Type == TType.Map) + { + { + var _map14 = await iprot.ReadMapBeginAsync(cancellationToken); + ExtraMap = new Dictionary(_map14.Count); + for(int _i15 = 0; _i15 < _map14.Count; ++_i15) + { + string _key16; + string _val17; + _key16 = await iprot.ReadStringAsync(cancellationToken); + _val17 = await iprot.ReadStringAsync(cancellationToken); + ExtraMap[_key16] = _val17; + } + await iprot.ReadMapEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp18 = new TStruct("TimAckBean"); + await oprot.WriteStructBeginAsync(tmp18, cancellationToken); + var tmp19 = new TField(); + if((Id != null) && __isset.id) + { + tmp19.Name = "id"; + tmp19.Type = TType.String; + tmp19.ID = 1; + await oprot.WriteFieldBeginAsync(tmp19, cancellationToken); + await oprot.WriteStringAsync(Id, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((AckType != null) && __isset.ackType) + { + tmp19.Name = "ackType"; + tmp19.Type = TType.String; + tmp19.ID = 2; + await oprot.WriteFieldBeginAsync(tmp19, cancellationToken); + await oprot.WriteStringAsync(AckType, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((AckStatus != null) && __isset.ackStatus) + { + tmp19.Name = "ackStatus"; + tmp19.Type = TType.String; + tmp19.ID = 3; + await oprot.WriteFieldBeginAsync(tmp19, cancellationToken); + await oprot.WriteStringAsync(AckStatus, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraList != null) && __isset.extraList) + { + tmp19.Name = "extraList"; + tmp19.Type = TType.List; + tmp19.ID = 4; + await oprot.WriteFieldBeginAsync(tmp19, cancellationToken); + await oprot.WriteListBeginAsync(new TList(TType.Struct, ExtraList.Count), cancellationToken); + foreach (TimNode _iter20 in ExtraList) + { + await _iter20.WriteAsync(oprot, cancellationToken); + } + await oprot.WriteListEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Err != null) && __isset.err) + { + tmp19.Name = "err"; + tmp19.Type = TType.Struct; + tmp19.ID = 5; + await oprot.WriteFieldBeginAsync(tmp19, cancellationToken); + await Err.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp19.Name = "extraMap"; + tmp19.Type = TType.Map; + tmp19.ID = 6; + await oprot.WriteFieldBeginAsync(tmp19, cancellationToken); + await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.String, ExtraMap.Count), cancellationToken); + foreach (string _iter21 in ExtraMap.Keys) + { + await oprot.WriteStringAsync(_iter21, cancellationToken); + await oprot.WriteStringAsync(ExtraMap[_iter21], cancellationToken); + } + await oprot.WriteMapEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is TimAckBean other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.id == other.__isset.id) && ((!__isset.id) || (global::System.Object.Equals(Id, other.Id)))) + && ((__isset.ackType == other.__isset.ackType) && ((!__isset.ackType) || (global::System.Object.Equals(AckType, other.AckType)))) + && ((__isset.ackStatus == other.__isset.ackStatus) && ((!__isset.ackStatus) || (global::System.Object.Equals(AckStatus, other.AckStatus)))) + && ((__isset.extraList == other.__isset.extraList) && ((!__isset.extraList) || (TCollections.Equals(ExtraList, other.ExtraList)))) + && ((__isset.err == other.__isset.err) && ((!__isset.err) || (global::System.Object.Equals(Err, other.Err)))) + && ((__isset.extraMap == other.__isset.extraMap) && ((!__isset.extraMap) || (TCollections.Equals(ExtraMap, other.ExtraMap)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Id != null) && __isset.id) + { + hashcode = (hashcode * 397) + Id.GetHashCode(); + } + if((AckType != null) && __isset.ackType) + { + hashcode = (hashcode * 397) + AckType.GetHashCode(); + } + if((AckStatus != null) && __isset.ackStatus) + { + hashcode = (hashcode * 397) + AckStatus.GetHashCode(); + } + if((ExtraList != null) && __isset.extraList) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraList); + } + if((Err != null) && __isset.err) + { + hashcode = (hashcode * 397) + Err.GetHashCode(); + } + if((ExtraMap != null) && __isset.extraMap) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraMap); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp22 = new StringBuilder("TimAckBean("); + int tmp23 = 0; + if((Id != null) && __isset.id) + { + if(0 < tmp23++) { tmp22.Append(", "); } + tmp22.Append("Id: "); + Id.ToString(tmp22); + } + if((AckType != null) && __isset.ackType) + { + if(0 < tmp23++) { tmp22.Append(", "); } + tmp22.Append("AckType: "); + AckType.ToString(tmp22); + } + if((AckStatus != null) && __isset.ackStatus) + { + if(0 < tmp23++) { tmp22.Append(", "); } + tmp22.Append("AckStatus: "); + AckStatus.ToString(tmp22); + } + if((ExtraList != null) && __isset.extraList) + { + if(0 < tmp23++) { tmp22.Append(", "); } + tmp22.Append("ExtraList: "); + ExtraList.ToString(tmp22); + } + if((Err != null) && __isset.err) + { + if(0 < tmp23++) { tmp22.Append(", "); } + tmp22.Append("Err: "); + Err.ToString(tmp22); + } + if((ExtraMap != null) && __isset.extraMap) + { + if(0 < tmp23++) { tmp22.Append(", "); } + tmp22.Append("ExtraMap: "); + ExtraMap.ToString(tmp22); + } + tmp22.Append(')'); + return tmp22.ToString(); + } +} + diff --git a/protocols/gen-netstd/TimArea.cs b/protocols/gen-netstd/TimArea.cs new file mode 100644 index 0000000..108cfe9 --- /dev/null +++ b/protocols/gen-netstd/TimArea.cs @@ -0,0 +1,421 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class TimArea : TBase +{ + private string _country; + private string _province; + private string _city; + private List _extraList; + private Dictionary _extraMap; + + /// + /// 国家 + /// + public string Country + { + get + { + return _country; + } + set + { + __isset.country = true; + this._country = value; + } + } + + /// + /// 省 + /// + public string Province + { + get + { + return _province; + } + set + { + __isset.province = true; + this._province = value; + } + } + + /// + /// 市 + /// + public string City + { + get + { + return _city; + } + set + { + __isset.city = true; + this._city = value; + } + } + + /// + /// 附加信息:如区,镇,乡等 + /// + public List ExtraList + { + get + { + return _extraList; + } + set + { + __isset.extraList = true; + this._extraList = value; + } + } + + public Dictionary ExtraMap + { + get + { + return _extraMap; + } + set + { + __isset.extraMap = true; + this._extraMap = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool country; + public bool province; + public bool city; + public bool extraList; + public bool extraMap; + } + + public TimArea() + { + } + + public TimArea DeepCopy() + { + var tmp48 = new TimArea(); + if((Country != null) && __isset.country) + { + tmp48.Country = this.Country; + } + tmp48.__isset.country = this.__isset.country; + if((Province != null) && __isset.province) + { + tmp48.Province = this.Province; + } + tmp48.__isset.province = this.__isset.province; + if((City != null) && __isset.city) + { + tmp48.City = this.City; + } + tmp48.__isset.city = this.__isset.city; + if((ExtraList != null) && __isset.extraList) + { + tmp48.ExtraList = this.ExtraList.DeepCopy(); + } + tmp48.__isset.extraList = this.__isset.extraList; + if((ExtraMap != null) && __isset.extraMap) + { + tmp48.ExtraMap = this.ExtraMap.DeepCopy(); + } + tmp48.__isset.extraMap = this.__isset.extraMap; + return tmp48; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.String) + { + Country = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.String) + { + Province = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.String) + { + City = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 4: + if (field.Type == TType.List) + { + { + var _list49 = await iprot.ReadListBeginAsync(cancellationToken); + ExtraList = new List(_list49.Count); + for(int _i50 = 0; _i50 < _list49.Count; ++_i50) + { + TimNode _elem51; + _elem51 = new TimNode(); + await _elem51.ReadAsync(iprot, cancellationToken); + ExtraList.Add(_elem51); + } + await iprot.ReadListEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 5: + if (field.Type == TType.Map) + { + { + var _map52 = await iprot.ReadMapBeginAsync(cancellationToken); + ExtraMap = new Dictionary(_map52.Count); + for(int _i53 = 0; _i53 < _map52.Count; ++_i53) + { + string _key54; + string _val55; + _key54 = await iprot.ReadStringAsync(cancellationToken); + _val55 = await iprot.ReadStringAsync(cancellationToken); + ExtraMap[_key54] = _val55; + } + await iprot.ReadMapEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp56 = new TStruct("TimArea"); + await oprot.WriteStructBeginAsync(tmp56, cancellationToken); + var tmp57 = new TField(); + if((Country != null) && __isset.country) + { + tmp57.Name = "country"; + tmp57.Type = TType.String; + tmp57.ID = 1; + await oprot.WriteFieldBeginAsync(tmp57, cancellationToken); + await oprot.WriteStringAsync(Country, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Province != null) && __isset.province) + { + tmp57.Name = "province"; + tmp57.Type = TType.String; + tmp57.ID = 2; + await oprot.WriteFieldBeginAsync(tmp57, cancellationToken); + await oprot.WriteStringAsync(Province, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((City != null) && __isset.city) + { + tmp57.Name = "city"; + tmp57.Type = TType.String; + tmp57.ID = 3; + await oprot.WriteFieldBeginAsync(tmp57, cancellationToken); + await oprot.WriteStringAsync(City, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraList != null) && __isset.extraList) + { + tmp57.Name = "extraList"; + tmp57.Type = TType.List; + tmp57.ID = 4; + await oprot.WriteFieldBeginAsync(tmp57, cancellationToken); + await oprot.WriteListBeginAsync(new TList(TType.Struct, ExtraList.Count), cancellationToken); + foreach (TimNode _iter58 in ExtraList) + { + await _iter58.WriteAsync(oprot, cancellationToken); + } + await oprot.WriteListEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp57.Name = "extraMap"; + tmp57.Type = TType.Map; + tmp57.ID = 5; + await oprot.WriteFieldBeginAsync(tmp57, cancellationToken); + await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.String, ExtraMap.Count), cancellationToken); + foreach (string _iter59 in ExtraMap.Keys) + { + await oprot.WriteStringAsync(_iter59, cancellationToken); + await oprot.WriteStringAsync(ExtraMap[_iter59], cancellationToken); + } + await oprot.WriteMapEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is TimArea other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.country == other.__isset.country) && ((!__isset.country) || (global::System.Object.Equals(Country, other.Country)))) + && ((__isset.province == other.__isset.province) && ((!__isset.province) || (global::System.Object.Equals(Province, other.Province)))) + && ((__isset.city == other.__isset.city) && ((!__isset.city) || (global::System.Object.Equals(City, other.City)))) + && ((__isset.extraList == other.__isset.extraList) && ((!__isset.extraList) || (TCollections.Equals(ExtraList, other.ExtraList)))) + && ((__isset.extraMap == other.__isset.extraMap) && ((!__isset.extraMap) || (TCollections.Equals(ExtraMap, other.ExtraMap)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Country != null) && __isset.country) + { + hashcode = (hashcode * 397) + Country.GetHashCode(); + } + if((Province != null) && __isset.province) + { + hashcode = (hashcode * 397) + Province.GetHashCode(); + } + if((City != null) && __isset.city) + { + hashcode = (hashcode * 397) + City.GetHashCode(); + } + if((ExtraList != null) && __isset.extraList) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraList); + } + if((ExtraMap != null) && __isset.extraMap) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraMap); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp60 = new StringBuilder("TimArea("); + int tmp61 = 0; + if((Country != null) && __isset.country) + { + if(0 < tmp61++) { tmp60.Append(", "); } + tmp60.Append("Country: "); + Country.ToString(tmp60); + } + if((Province != null) && __isset.province) + { + if(0 < tmp61++) { tmp60.Append(", "); } + tmp60.Append("Province: "); + Province.ToString(tmp60); + } + if((City != null) && __isset.city) + { + if(0 < tmp61++) { tmp60.Append(", "); } + tmp60.Append("City: "); + City.ToString(tmp60); + } + if((ExtraList != null) && __isset.extraList) + { + if(0 < tmp61++) { tmp60.Append(", "); } + tmp60.Append("ExtraList: "); + ExtraList.ToString(tmp60); + } + if((ExtraMap != null) && __isset.extraMap) + { + if(0 < tmp61++) { tmp60.Append(", "); } + tmp60.Append("ExtraMap: "); + ExtraMap.ToString(tmp60); + } + tmp60.Append(')'); + return tmp60.ToString(); + } +} + diff --git a/protocols/gen-netstd/TimAuth.cs b/protocols/gen-netstd/TimAuth.cs new file mode 100644 index 0000000..2b512fe --- /dev/null +++ b/protocols/gen-netstd/TimAuth.cs @@ -0,0 +1,284 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class TimAuth : TBase +{ + private string _domain; + private string _username; + private string _pwd; + + /// + /// 域名 + /// + public string Domain + { + get + { + return _domain; + } + set + { + __isset.domain = true; + this._domain = value; + } + } + + /// + /// 用户名 + /// + public string Username + { + get + { + return _username; + } + set + { + __isset.username = true; + this._username = value; + } + } + + /// + /// 密码 + /// + public string Pwd + { + get + { + return _pwd; + } + set + { + __isset.pwd = true; + this._pwd = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool domain; + public bool username; + public bool pwd; + } + + public TimAuth() + { + } + + public TimAuth DeepCopy() + { + var tmp254 = new TimAuth(); + if((Domain != null) && __isset.domain) + { + tmp254.Domain = this.Domain; + } + tmp254.__isset.domain = this.__isset.domain; + if((Username != null) && __isset.username) + { + tmp254.Username = this.Username; + } + tmp254.__isset.username = this.__isset.username; + if((Pwd != null) && __isset.pwd) + { + tmp254.Pwd = this.Pwd; + } + tmp254.__isset.pwd = this.__isset.pwd; + return tmp254; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.String) + { + Domain = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.String) + { + Username = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.String) + { + Pwd = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp255 = new TStruct("TimAuth"); + await oprot.WriteStructBeginAsync(tmp255, cancellationToken); + var tmp256 = new TField(); + if((Domain != null) && __isset.domain) + { + tmp256.Name = "domain"; + tmp256.Type = TType.String; + tmp256.ID = 1; + await oprot.WriteFieldBeginAsync(tmp256, cancellationToken); + await oprot.WriteStringAsync(Domain, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Username != null) && __isset.username) + { + tmp256.Name = "username"; + tmp256.Type = TType.String; + tmp256.ID = 2; + await oprot.WriteFieldBeginAsync(tmp256, cancellationToken); + await oprot.WriteStringAsync(Username, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Pwd != null) && __isset.pwd) + { + tmp256.Name = "pwd"; + tmp256.Type = TType.String; + tmp256.ID = 3; + await oprot.WriteFieldBeginAsync(tmp256, cancellationToken); + await oprot.WriteStringAsync(Pwd, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is TimAuth other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.domain == other.__isset.domain) && ((!__isset.domain) || (global::System.Object.Equals(Domain, other.Domain)))) + && ((__isset.username == other.__isset.username) && ((!__isset.username) || (global::System.Object.Equals(Username, other.Username)))) + && ((__isset.pwd == other.__isset.pwd) && ((!__isset.pwd) || (global::System.Object.Equals(Pwd, other.Pwd)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Domain != null) && __isset.domain) + { + hashcode = (hashcode * 397) + Domain.GetHashCode(); + } + if((Username != null) && __isset.username) + { + hashcode = (hashcode * 397) + Username.GetHashCode(); + } + if((Pwd != null) && __isset.pwd) + { + hashcode = (hashcode * 397) + Pwd.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp257 = new StringBuilder("TimAuth("); + int tmp258 = 0; + if((Domain != null) && __isset.domain) + { + if(0 < tmp258++) { tmp257.Append(", "); } + tmp257.Append("Domain: "); + Domain.ToString(tmp257); + } + if((Username != null) && __isset.username) + { + if(0 < tmp258++) { tmp257.Append(", "); } + tmp257.Append("Username: "); + Username.ToString(tmp257); + } + if((Pwd != null) && __isset.pwd) + { + if(0 < tmp258++) { tmp257.Append(", "); } + tmp257.Append("Pwd: "); + Pwd.ToString(tmp257); + } + tmp257.Append(')'); + return tmp257.ToString(); + } +} + diff --git a/protocols/gen-netstd/TimError.cs b/protocols/gen-netstd/TimError.cs new file mode 100644 index 0000000..9226b0d --- /dev/null +++ b/protocols/gen-netstd/TimError.cs @@ -0,0 +1,231 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class TimError : TBase +{ + private int _errCode; + private string _errMsg; + + /// + /// 错误码 + /// + public int ErrCode + { + get + { + return _errCode; + } + set + { + __isset.errCode = true; + this._errCode = value; + } + } + + /// + /// 错误内容 + /// + public string ErrMsg + { + get + { + return _errMsg; + } + set + { + __isset.errMsg = true; + this._errMsg = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool errCode; + public bool errMsg; + } + + public TimError() + { + } + + public TimError DeepCopy() + { + var tmp0 = new TimError(); + if(__isset.errCode) + { + tmp0.ErrCode = this.ErrCode; + } + tmp0.__isset.errCode = this.__isset.errCode; + if((ErrMsg != null) && __isset.errMsg) + { + tmp0.ErrMsg = this.ErrMsg; + } + tmp0.__isset.errMsg = this.__isset.errMsg; + return tmp0; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.I32) + { + ErrCode = await iprot.ReadI32Async(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.String) + { + ErrMsg = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp1 = new TStruct("TimError"); + await oprot.WriteStructBeginAsync(tmp1, cancellationToken); + var tmp2 = new TField(); + if(__isset.errCode) + { + tmp2.Name = "errCode"; + tmp2.Type = TType.I32; + tmp2.ID = 1; + await oprot.WriteFieldBeginAsync(tmp2, cancellationToken); + await oprot.WriteI32Async(ErrCode, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ErrMsg != null) && __isset.errMsg) + { + tmp2.Name = "errMsg"; + tmp2.Type = TType.String; + tmp2.ID = 2; + await oprot.WriteFieldBeginAsync(tmp2, cancellationToken); + await oprot.WriteStringAsync(ErrMsg, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is TimError other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.errCode == other.__isset.errCode) && ((!__isset.errCode) || (global::System.Object.Equals(ErrCode, other.ErrCode)))) + && ((__isset.errMsg == other.__isset.errMsg) && ((!__isset.errMsg) || (global::System.Object.Equals(ErrMsg, other.ErrMsg)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if(__isset.errCode) + { + hashcode = (hashcode * 397) + ErrCode.GetHashCode(); + } + if((ErrMsg != null) && __isset.errMsg) + { + hashcode = (hashcode * 397) + ErrMsg.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp3 = new StringBuilder("TimError("); + int tmp4 = 0; + if(__isset.errCode) + { + if(0 < tmp4++) { tmp3.Append(", "); } + tmp3.Append("ErrCode: "); + ErrCode.ToString(tmp3); + } + if((ErrMsg != null) && __isset.errMsg) + { + if(0 < tmp4++) { tmp3.Append(", "); } + tmp3.Append("ErrMsg: "); + ErrMsg.ToString(tmp3); + } + tmp3.Append(')'); + return tmp3.ToString(); + } +} + diff --git a/protocols/gen-netstd/TimHBean.cs b/protocols/gen-netstd/TimHBean.cs new file mode 100644 index 0000000..ad8787a --- /dev/null +++ b/protocols/gen-netstd/TimHBean.cs @@ -0,0 +1,246 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class TimHBean : TBase +{ + private int _platform; + + /// + /// 渠道 + /// + public int Chl { get; set; } + + /// + /// 平台 + /// + public int Platform + { + get + { + return _platform; + } + set + { + __isset.platform = true; + this._platform = value; + } + } + + /// + /// version 客户端协议版本 + /// + public short Version { get; set; } + + + public Isset __isset; + public struct Isset + { + public bool platform; + } + + public TimHBean() + { + } + + public TimHBean(int chl, short version) : this() + { + this.Chl = chl; + this.Version = version; + } + + public TimHBean DeepCopy() + { + var tmp24 = new TimHBean(); + tmp24.Chl = this.Chl; + if(__isset.platform) + { + tmp24.Platform = this.Platform; + } + tmp24.__isset.platform = this.__isset.platform; + tmp24.Version = this.Version; + return tmp24; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + bool isset_chl = false; + bool isset_version = false; + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.I32) + { + Chl = await iprot.ReadI32Async(cancellationToken); + isset_chl = true; + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.I32) + { + Platform = await iprot.ReadI32Async(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.I16) + { + Version = await iprot.ReadI16Async(cancellationToken); + isset_version = true; + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + if (!isset_chl) + { + throw new TProtocolException(TProtocolException.INVALID_DATA); + } + if (!isset_version) + { + throw new TProtocolException(TProtocolException.INVALID_DATA); + } + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp25 = new TStruct("TimHBean"); + await oprot.WriteStructBeginAsync(tmp25, cancellationToken); + var tmp26 = new TField(); + tmp26.Name = "chl"; + tmp26.Type = TType.I32; + tmp26.ID = 1; + await oprot.WriteFieldBeginAsync(tmp26, cancellationToken); + await oprot.WriteI32Async(Chl, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + if(__isset.platform) + { + tmp26.Name = "platform"; + tmp26.Type = TType.I32; + tmp26.ID = 2; + await oprot.WriteFieldBeginAsync(tmp26, cancellationToken); + await oprot.WriteI32Async(Platform, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + tmp26.Name = "version"; + tmp26.Type = TType.I16; + tmp26.ID = 3; + await oprot.WriteFieldBeginAsync(tmp26, cancellationToken); + await oprot.WriteI16Async(Version, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is TimHBean other)) return false; + if (ReferenceEquals(this, other)) return true; + return global::System.Object.Equals(Chl, other.Chl) + && ((__isset.platform == other.__isset.platform) && ((!__isset.platform) || (global::System.Object.Equals(Platform, other.Platform)))) + && global::System.Object.Equals(Version, other.Version); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + hashcode = (hashcode * 397) + Chl.GetHashCode(); + if(__isset.platform) + { + hashcode = (hashcode * 397) + Platform.GetHashCode(); + } + hashcode = (hashcode * 397) + Version.GetHashCode(); + } + return hashcode; + } + + public override string ToString() + { + var tmp27 = new StringBuilder("TimHBean("); + tmp27.Append(", Chl: "); + Chl.ToString(tmp27); + if(__isset.platform) + { + tmp27.Append(", Platform: "); + Platform.ToString(tmp27); + } + tmp27.Append(", Version: "); + Version.ToString(tmp27); + tmp27.Append(')'); + return tmp27.ToString(); + } +} + diff --git a/protocols/gen-netstd/TimIqBean.cs b/protocols/gen-netstd/TimIqBean.cs new file mode 100644 index 0000000..5473e56 --- /dev/null +++ b/protocols/gen-netstd/TimIqBean.cs @@ -0,0 +1,516 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class TimIqBean : TBase +{ + private Tid _fromTid; + private Tid _toTid; + private string _type; + private List _extraList; + private TimError _error; + private Dictionary _extraMap; + + /// + /// 线程id + /// + public string ThreadId { get; set; } + + public Tid FromTid + { + get + { + return _fromTid; + } + set + { + __isset.fromTid = true; + this._fromTid = value; + } + } + + public Tid ToTid + { + get + { + return _toTid; + } + set + { + __isset.toTid = true; + this._toTid = value; + } + } + + /// + /// Get :获取当前域值。类似于http get方法 + /// Set :设置或替换get查询的值。类似于http put方法。 + /// Result :说明成功的响应了先前的查询。类似于http状态码200。 + /// Error: 查询和响应中出现的错误。 + /// + public string Type + { + get + { + return _type; + } + set + { + __isset.type = true; + this._type = value; + } + } + + /// + /// 扩展字段 + /// + public List ExtraList + { + get + { + return _extraList; + } + set + { + __isset.extraList = true; + this._extraList = value; + } + } + + /// + /// 错误码 + /// + public TimError Error + { + get + { + return _error; + } + set + { + __isset.error = true; + this._error = value; + } + } + + public Dictionary ExtraMap + { + get + { + return _extraMap; + } + set + { + __isset.extraMap = true; + this._extraMap = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool fromTid; + public bool toTid; + public bool type; + public bool extraList; + public bool error; + public bool extraMap; + } + + public TimIqBean() + { + } + + public TimIqBean(string threadId) : this() + { + this.ThreadId = threadId; + } + + public TimIqBean DeepCopy() + { + var tmp144 = new TimIqBean(); + if((ThreadId != null)) + { + tmp144.ThreadId = this.ThreadId; + } + if((FromTid != null) && __isset.fromTid) + { + tmp144.FromTid = (Tid)this.FromTid.DeepCopy(); + } + tmp144.__isset.fromTid = this.__isset.fromTid; + if((ToTid != null) && __isset.toTid) + { + tmp144.ToTid = (Tid)this.ToTid.DeepCopy(); + } + tmp144.__isset.toTid = this.__isset.toTid; + if((Type != null) && __isset.type) + { + tmp144.Type = this.Type; + } + tmp144.__isset.type = this.__isset.type; + if((ExtraList != null) && __isset.extraList) + { + tmp144.ExtraList = this.ExtraList.DeepCopy(); + } + tmp144.__isset.extraList = this.__isset.extraList; + if((Error != null) && __isset.error) + { + tmp144.Error = (TimError)this.Error.DeepCopy(); + } + tmp144.__isset.error = this.__isset.error; + if((ExtraMap != null) && __isset.extraMap) + { + tmp144.ExtraMap = this.ExtraMap.DeepCopy(); + } + tmp144.__isset.extraMap = this.__isset.extraMap; + return tmp144; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + bool isset_threadId = false; + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.String) + { + ThreadId = await iprot.ReadStringAsync(cancellationToken); + isset_threadId = true; + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.Struct) + { + FromTid = new Tid(); + await FromTid.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.Struct) + { + ToTid = new Tid(); + await ToTid.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 4: + if (field.Type == TType.String) + { + Type = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 5: + if (field.Type == TType.List) + { + { + var _list145 = await iprot.ReadListBeginAsync(cancellationToken); + ExtraList = new List(_list145.Count); + for(int _i146 = 0; _i146 < _list145.Count; ++_i146) + { + TimNode _elem147; + _elem147 = new TimNode(); + await _elem147.ReadAsync(iprot, cancellationToken); + ExtraList.Add(_elem147); + } + await iprot.ReadListEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 6: + if (field.Type == TType.Struct) + { + Error = new TimError(); + await Error.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 7: + if (field.Type == TType.Map) + { + { + var _map148 = await iprot.ReadMapBeginAsync(cancellationToken); + ExtraMap = new Dictionary(_map148.Count); + for(int _i149 = 0; _i149 < _map148.Count; ++_i149) + { + string _key150; + string _val151; + _key150 = await iprot.ReadStringAsync(cancellationToken); + _val151 = await iprot.ReadStringAsync(cancellationToken); + ExtraMap[_key150] = _val151; + } + await iprot.ReadMapEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + if (!isset_threadId) + { + throw new TProtocolException(TProtocolException.INVALID_DATA); + } + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp152 = new TStruct("TimIqBean"); + await oprot.WriteStructBeginAsync(tmp152, cancellationToken); + var tmp153 = new TField(); + if((ThreadId != null)) + { + tmp153.Name = "threadId"; + tmp153.Type = TType.String; + tmp153.ID = 1; + await oprot.WriteFieldBeginAsync(tmp153, cancellationToken); + await oprot.WriteStringAsync(ThreadId, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((FromTid != null) && __isset.fromTid) + { + tmp153.Name = "fromTid"; + tmp153.Type = TType.Struct; + tmp153.ID = 2; + await oprot.WriteFieldBeginAsync(tmp153, cancellationToken); + await FromTid.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ToTid != null) && __isset.toTid) + { + tmp153.Name = "toTid"; + tmp153.Type = TType.Struct; + tmp153.ID = 3; + await oprot.WriteFieldBeginAsync(tmp153, cancellationToken); + await ToTid.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Type != null) && __isset.type) + { + tmp153.Name = "type"; + tmp153.Type = TType.String; + tmp153.ID = 4; + await oprot.WriteFieldBeginAsync(tmp153, cancellationToken); + await oprot.WriteStringAsync(Type, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraList != null) && __isset.extraList) + { + tmp153.Name = "extraList"; + tmp153.Type = TType.List; + tmp153.ID = 5; + await oprot.WriteFieldBeginAsync(tmp153, cancellationToken); + await oprot.WriteListBeginAsync(new TList(TType.Struct, ExtraList.Count), cancellationToken); + foreach (TimNode _iter154 in ExtraList) + { + await _iter154.WriteAsync(oprot, cancellationToken); + } + await oprot.WriteListEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Error != null) && __isset.error) + { + tmp153.Name = "error"; + tmp153.Type = TType.Struct; + tmp153.ID = 6; + await oprot.WriteFieldBeginAsync(tmp153, cancellationToken); + await Error.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp153.Name = "extraMap"; + tmp153.Type = TType.Map; + tmp153.ID = 7; + await oprot.WriteFieldBeginAsync(tmp153, cancellationToken); + await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.String, ExtraMap.Count), cancellationToken); + foreach (string _iter155 in ExtraMap.Keys) + { + await oprot.WriteStringAsync(_iter155, cancellationToken); + await oprot.WriteStringAsync(ExtraMap[_iter155], cancellationToken); + } + await oprot.WriteMapEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is TimIqBean other)) return false; + if (ReferenceEquals(this, other)) return true; + return global::System.Object.Equals(ThreadId, other.ThreadId) + && ((__isset.fromTid == other.__isset.fromTid) && ((!__isset.fromTid) || (global::System.Object.Equals(FromTid, other.FromTid)))) + && ((__isset.toTid == other.__isset.toTid) && ((!__isset.toTid) || (global::System.Object.Equals(ToTid, other.ToTid)))) + && ((__isset.type == other.__isset.type) && ((!__isset.type) || (global::System.Object.Equals(Type, other.Type)))) + && ((__isset.extraList == other.__isset.extraList) && ((!__isset.extraList) || (TCollections.Equals(ExtraList, other.ExtraList)))) + && ((__isset.error == other.__isset.error) && ((!__isset.error) || (global::System.Object.Equals(Error, other.Error)))) + && ((__isset.extraMap == other.__isset.extraMap) && ((!__isset.extraMap) || (TCollections.Equals(ExtraMap, other.ExtraMap)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((ThreadId != null)) + { + hashcode = (hashcode * 397) + ThreadId.GetHashCode(); + } + if((FromTid != null) && __isset.fromTid) + { + hashcode = (hashcode * 397) + FromTid.GetHashCode(); + } + if((ToTid != null) && __isset.toTid) + { + hashcode = (hashcode * 397) + ToTid.GetHashCode(); + } + if((Type != null) && __isset.type) + { + hashcode = (hashcode * 397) + Type.GetHashCode(); + } + if((ExtraList != null) && __isset.extraList) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraList); + } + if((Error != null) && __isset.error) + { + hashcode = (hashcode * 397) + Error.GetHashCode(); + } + if((ExtraMap != null) && __isset.extraMap) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraMap); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp156 = new StringBuilder("TimIqBean("); + if((ThreadId != null)) + { + tmp156.Append(", ThreadId: "); + ThreadId.ToString(tmp156); + } + if((FromTid != null) && __isset.fromTid) + { + tmp156.Append(", FromTid: "); + FromTid.ToString(tmp156); + } + if((ToTid != null) && __isset.toTid) + { + tmp156.Append(", ToTid: "); + ToTid.ToString(tmp156); + } + if((Type != null) && __isset.type) + { + tmp156.Append(", Type: "); + Type.ToString(tmp156); + } + if((ExtraList != null) && __isset.extraList) + { + tmp156.Append(", ExtraList: "); + ExtraList.ToString(tmp156); + } + if((Error != null) && __isset.error) + { + tmp156.Append(", Error: "); + Error.ToString(tmp156); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp156.Append(", ExtraMap: "); + ExtraMap.ToString(tmp156); + } + tmp156.Append(')'); + return tmp156.ToString(); + } +} + diff --git a/protocols/gen-netstd/TimMBean.cs b/protocols/gen-netstd/TimMBean.cs new file mode 100644 index 0000000..8a78caf --- /dev/null +++ b/protocols/gen-netstd/TimMBean.cs @@ -0,0 +1,889 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class TimMBean : TBase +{ + private string _mid; + private Tid _fromTid; + private Tid _toTid; + private string _body; + private string _type; + private short _msgType; + private TimTime _offline; + private Tid _leaguerTid; + private List _extraList; + private string _timestamp; + private TimError _error; + private Dictionary _extraMap; + private short _readstatus; + + /// + /// 线程id + /// + public string ThreadId { get; set; } + + /// + /// 消息id号 + /// + public string Mid + { + get + { + return _mid; + } + set + { + __isset.mid = true; + this._mid = value; + } + } + + /// + /// 来源Tid + /// + public Tid FromTid + { + get + { + return _fromTid; + } + set + { + __isset.fromTid = true; + this._fromTid = value; + } + } + + /// + /// 目标Tid + /// + public Tid ToTid + { + get + { + return _toTid; + } + set + { + __isset.toTid = true; + this._toTid = value; + } + } + + /// + /// 信息内容 + /// + public string Body + { + get + { + return _body; + } + set + { + __isset.body = true; + this._body = value; + } + } + + /// + /// normal:类似于email,主要特点是不要求响应; + /// chat:类似于qq里的好友即时聊天,主要特点是实时通讯; + /// groupchat:类似于聊天室里的群聊; + /// headline:用于发送alert和notification; + /// error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; + /// + public string Type + { + get + { + return _type; + } + set + { + __isset.type = true; + this._type = value; + } + } + + /// + /// 消息类型 1 文字 2 图片 3 语音 4视频 5混合 + /// + public short MsgType + { + get + { + return _msgType; + } + set + { + __isset.msgType = true; + this._msgType = value; + } + } + + /// + /// 是否离线信息 + /// + public TimTime Offline + { + get + { + return _offline; + } + set + { + __isset.offline = true; + this._offline = value; + } + } + + /// + /// 成员Tid 群聊时信息发送者Tid + /// + public Tid LeaguerTid + { + get + { + return _leaguerTid; + } + set + { + __isset.leaguerTid = true; + this._leaguerTid = value; + } + } + + /// + /// 扩展字段 + /// + public List ExtraList + { + get + { + return _extraList; + } + set + { + __isset.extraList = true; + this._extraList = value; + } + } + + /// + /// 服务器发送信息时间戳(毫秒) + /// + public string Timestamp + { + get + { + return _timestamp; + } + set + { + __isset.timestamp = true; + this._timestamp = value; + } + } + + /// + /// 错误码 + /// + public TimError Error + { + get + { + return _error; + } + set + { + __isset.error = true; + this._error = value; + } + } + + public Dictionary ExtraMap + { + get + { + return _extraMap; + } + set + { + __isset.extraMap = true; + this._extraMap = value; + } + } + + /// + /// 0未读 1已读 + /// + public short Readstatus + { + get + { + return _readstatus; + } + set + { + __isset.readstatus = true; + this._readstatus = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool mid; + public bool fromTid; + public bool toTid; + public bool body; + public bool type; + public bool msgType; + public bool offline; + public bool leaguerTid; + public bool extraList; + public bool timestamp; + public bool error; + public bool extraMap; + public bool readstatus; + } + + public TimMBean() + { + } + + public TimMBean(string threadId) : this() + { + this.ThreadId = threadId; + } + + public TimMBean DeepCopy() + { + var tmp130 = new TimMBean(); + if((ThreadId != null)) + { + tmp130.ThreadId = this.ThreadId; + } + if((Mid != null) && __isset.mid) + { + tmp130.Mid = this.Mid; + } + tmp130.__isset.mid = this.__isset.mid; + if((FromTid != null) && __isset.fromTid) + { + tmp130.FromTid = (Tid)this.FromTid.DeepCopy(); + } + tmp130.__isset.fromTid = this.__isset.fromTid; + if((ToTid != null) && __isset.toTid) + { + tmp130.ToTid = (Tid)this.ToTid.DeepCopy(); + } + tmp130.__isset.toTid = this.__isset.toTid; + if((Body != null) && __isset.body) + { + tmp130.Body = this.Body; + } + tmp130.__isset.body = this.__isset.body; + if((Type != null) && __isset.type) + { + tmp130.Type = this.Type; + } + tmp130.__isset.type = this.__isset.type; + if(__isset.msgType) + { + tmp130.MsgType = this.MsgType; + } + tmp130.__isset.msgType = this.__isset.msgType; + if((Offline != null) && __isset.offline) + { + tmp130.Offline = (TimTime)this.Offline.DeepCopy(); + } + tmp130.__isset.offline = this.__isset.offline; + if((LeaguerTid != null) && __isset.leaguerTid) + { + tmp130.LeaguerTid = (Tid)this.LeaguerTid.DeepCopy(); + } + tmp130.__isset.leaguerTid = this.__isset.leaguerTid; + if((ExtraList != null) && __isset.extraList) + { + tmp130.ExtraList = this.ExtraList.DeepCopy(); + } + tmp130.__isset.extraList = this.__isset.extraList; + if((Timestamp != null) && __isset.timestamp) + { + tmp130.Timestamp = this.Timestamp; + } + tmp130.__isset.timestamp = this.__isset.timestamp; + if((Error != null) && __isset.error) + { + tmp130.Error = (TimError)this.Error.DeepCopy(); + } + tmp130.__isset.error = this.__isset.error; + if((ExtraMap != null) && __isset.extraMap) + { + tmp130.ExtraMap = this.ExtraMap.DeepCopy(); + } + tmp130.__isset.extraMap = this.__isset.extraMap; + if(__isset.readstatus) + { + tmp130.Readstatus = this.Readstatus; + } + tmp130.__isset.readstatus = this.__isset.readstatus; + return tmp130; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + bool isset_threadId = false; + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.String) + { + ThreadId = await iprot.ReadStringAsync(cancellationToken); + isset_threadId = true; + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.String) + { + Mid = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.Struct) + { + FromTid = new Tid(); + await FromTid.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 4: + if (field.Type == TType.Struct) + { + ToTid = new Tid(); + await ToTid.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 5: + if (field.Type == TType.String) + { + Body = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 6: + if (field.Type == TType.String) + { + Type = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 7: + if (field.Type == TType.I16) + { + MsgType = await iprot.ReadI16Async(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 8: + if (field.Type == TType.Struct) + { + Offline = new TimTime(); + await Offline.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 9: + if (field.Type == TType.Struct) + { + LeaguerTid = new Tid(); + await LeaguerTid.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 10: + if (field.Type == TType.List) + { + { + var _list131 = await iprot.ReadListBeginAsync(cancellationToken); + ExtraList = new List(_list131.Count); + for(int _i132 = 0; _i132 < _list131.Count; ++_i132) + { + TimNode _elem133; + _elem133 = new TimNode(); + await _elem133.ReadAsync(iprot, cancellationToken); + ExtraList.Add(_elem133); + } + await iprot.ReadListEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 11: + if (field.Type == TType.String) + { + Timestamp = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 12: + if (field.Type == TType.Struct) + { + Error = new TimError(); + await Error.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 13: + if (field.Type == TType.Map) + { + { + var _map134 = await iprot.ReadMapBeginAsync(cancellationToken); + ExtraMap = new Dictionary(_map134.Count); + for(int _i135 = 0; _i135 < _map134.Count; ++_i135) + { + string _key136; + string _val137; + _key136 = await iprot.ReadStringAsync(cancellationToken); + _val137 = await iprot.ReadStringAsync(cancellationToken); + ExtraMap[_key136] = _val137; + } + await iprot.ReadMapEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 14: + if (field.Type == TType.I16) + { + Readstatus = await iprot.ReadI16Async(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + if (!isset_threadId) + { + throw new TProtocolException(TProtocolException.INVALID_DATA); + } + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp138 = new TStruct("TimMBean"); + await oprot.WriteStructBeginAsync(tmp138, cancellationToken); + var tmp139 = new TField(); + if((ThreadId != null)) + { + tmp139.Name = "threadId"; + tmp139.Type = TType.String; + tmp139.ID = 1; + await oprot.WriteFieldBeginAsync(tmp139, cancellationToken); + await oprot.WriteStringAsync(ThreadId, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Mid != null) && __isset.mid) + { + tmp139.Name = "mid"; + tmp139.Type = TType.String; + tmp139.ID = 2; + await oprot.WriteFieldBeginAsync(tmp139, cancellationToken); + await oprot.WriteStringAsync(Mid, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((FromTid != null) && __isset.fromTid) + { + tmp139.Name = "fromTid"; + tmp139.Type = TType.Struct; + tmp139.ID = 3; + await oprot.WriteFieldBeginAsync(tmp139, cancellationToken); + await FromTid.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ToTid != null) && __isset.toTid) + { + tmp139.Name = "toTid"; + tmp139.Type = TType.Struct; + tmp139.ID = 4; + await oprot.WriteFieldBeginAsync(tmp139, cancellationToken); + await ToTid.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Body != null) && __isset.body) + { + tmp139.Name = "body"; + tmp139.Type = TType.String; + tmp139.ID = 5; + await oprot.WriteFieldBeginAsync(tmp139, cancellationToken); + await oprot.WriteStringAsync(Body, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Type != null) && __isset.type) + { + tmp139.Name = "type"; + tmp139.Type = TType.String; + tmp139.ID = 6; + await oprot.WriteFieldBeginAsync(tmp139, cancellationToken); + await oprot.WriteStringAsync(Type, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if(__isset.msgType) + { + tmp139.Name = "msgType"; + tmp139.Type = TType.I16; + tmp139.ID = 7; + await oprot.WriteFieldBeginAsync(tmp139, cancellationToken); + await oprot.WriteI16Async(MsgType, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Offline != null) && __isset.offline) + { + tmp139.Name = "offline"; + tmp139.Type = TType.Struct; + tmp139.ID = 8; + await oprot.WriteFieldBeginAsync(tmp139, cancellationToken); + await Offline.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((LeaguerTid != null) && __isset.leaguerTid) + { + tmp139.Name = "leaguerTid"; + tmp139.Type = TType.Struct; + tmp139.ID = 9; + await oprot.WriteFieldBeginAsync(tmp139, cancellationToken); + await LeaguerTid.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraList != null) && __isset.extraList) + { + tmp139.Name = "extraList"; + tmp139.Type = TType.List; + tmp139.ID = 10; + await oprot.WriteFieldBeginAsync(tmp139, cancellationToken); + await oprot.WriteListBeginAsync(new TList(TType.Struct, ExtraList.Count), cancellationToken); + foreach (TimNode _iter140 in ExtraList) + { + await _iter140.WriteAsync(oprot, cancellationToken); + } + await oprot.WriteListEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Timestamp != null) && __isset.timestamp) + { + tmp139.Name = "timestamp"; + tmp139.Type = TType.String; + tmp139.ID = 11; + await oprot.WriteFieldBeginAsync(tmp139, cancellationToken); + await oprot.WriteStringAsync(Timestamp, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Error != null) && __isset.error) + { + tmp139.Name = "error"; + tmp139.Type = TType.Struct; + tmp139.ID = 12; + await oprot.WriteFieldBeginAsync(tmp139, cancellationToken); + await Error.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp139.Name = "extraMap"; + tmp139.Type = TType.Map; + tmp139.ID = 13; + await oprot.WriteFieldBeginAsync(tmp139, cancellationToken); + await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.String, ExtraMap.Count), cancellationToken); + foreach (string _iter141 in ExtraMap.Keys) + { + await oprot.WriteStringAsync(_iter141, cancellationToken); + await oprot.WriteStringAsync(ExtraMap[_iter141], cancellationToken); + } + await oprot.WriteMapEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if(__isset.readstatus) + { + tmp139.Name = "readstatus"; + tmp139.Type = TType.I16; + tmp139.ID = 14; + await oprot.WriteFieldBeginAsync(tmp139, cancellationToken); + await oprot.WriteI16Async(Readstatus, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is TimMBean other)) return false; + if (ReferenceEquals(this, other)) return true; + return global::System.Object.Equals(ThreadId, other.ThreadId) + && ((__isset.mid == other.__isset.mid) && ((!__isset.mid) || (global::System.Object.Equals(Mid, other.Mid)))) + && ((__isset.fromTid == other.__isset.fromTid) && ((!__isset.fromTid) || (global::System.Object.Equals(FromTid, other.FromTid)))) + && ((__isset.toTid == other.__isset.toTid) && ((!__isset.toTid) || (global::System.Object.Equals(ToTid, other.ToTid)))) + && ((__isset.body == other.__isset.body) && ((!__isset.body) || (global::System.Object.Equals(Body, other.Body)))) + && ((__isset.type == other.__isset.type) && ((!__isset.type) || (global::System.Object.Equals(Type, other.Type)))) + && ((__isset.msgType == other.__isset.msgType) && ((!__isset.msgType) || (global::System.Object.Equals(MsgType, other.MsgType)))) + && ((__isset.offline == other.__isset.offline) && ((!__isset.offline) || (global::System.Object.Equals(Offline, other.Offline)))) + && ((__isset.leaguerTid == other.__isset.leaguerTid) && ((!__isset.leaguerTid) || (global::System.Object.Equals(LeaguerTid, other.LeaguerTid)))) + && ((__isset.extraList == other.__isset.extraList) && ((!__isset.extraList) || (TCollections.Equals(ExtraList, other.ExtraList)))) + && ((__isset.timestamp == other.__isset.timestamp) && ((!__isset.timestamp) || (global::System.Object.Equals(Timestamp, other.Timestamp)))) + && ((__isset.error == other.__isset.error) && ((!__isset.error) || (global::System.Object.Equals(Error, other.Error)))) + && ((__isset.extraMap == other.__isset.extraMap) && ((!__isset.extraMap) || (TCollections.Equals(ExtraMap, other.ExtraMap)))) + && ((__isset.readstatus == other.__isset.readstatus) && ((!__isset.readstatus) || (global::System.Object.Equals(Readstatus, other.Readstatus)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((ThreadId != null)) + { + hashcode = (hashcode * 397) + ThreadId.GetHashCode(); + } + if((Mid != null) && __isset.mid) + { + hashcode = (hashcode * 397) + Mid.GetHashCode(); + } + if((FromTid != null) && __isset.fromTid) + { + hashcode = (hashcode * 397) + FromTid.GetHashCode(); + } + if((ToTid != null) && __isset.toTid) + { + hashcode = (hashcode * 397) + ToTid.GetHashCode(); + } + if((Body != null) && __isset.body) + { + hashcode = (hashcode * 397) + Body.GetHashCode(); + } + if((Type != null) && __isset.type) + { + hashcode = (hashcode * 397) + Type.GetHashCode(); + } + if(__isset.msgType) + { + hashcode = (hashcode * 397) + MsgType.GetHashCode(); + } + if((Offline != null) && __isset.offline) + { + hashcode = (hashcode * 397) + Offline.GetHashCode(); + } + if((LeaguerTid != null) && __isset.leaguerTid) + { + hashcode = (hashcode * 397) + LeaguerTid.GetHashCode(); + } + if((ExtraList != null) && __isset.extraList) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraList); + } + if((Timestamp != null) && __isset.timestamp) + { + hashcode = (hashcode * 397) + Timestamp.GetHashCode(); + } + if((Error != null) && __isset.error) + { + hashcode = (hashcode * 397) + Error.GetHashCode(); + } + if((ExtraMap != null) && __isset.extraMap) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraMap); + } + if(__isset.readstatus) + { + hashcode = (hashcode * 397) + Readstatus.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp142 = new StringBuilder("TimMBean("); + if((ThreadId != null)) + { + tmp142.Append(", ThreadId: "); + ThreadId.ToString(tmp142); + } + if((Mid != null) && __isset.mid) + { + tmp142.Append(", Mid: "); + Mid.ToString(tmp142); + } + if((FromTid != null) && __isset.fromTid) + { + tmp142.Append(", FromTid: "); + FromTid.ToString(tmp142); + } + if((ToTid != null) && __isset.toTid) + { + tmp142.Append(", ToTid: "); + ToTid.ToString(tmp142); + } + if((Body != null) && __isset.body) + { + tmp142.Append(", Body: "); + Body.ToString(tmp142); + } + if((Type != null) && __isset.type) + { + tmp142.Append(", Type: "); + Type.ToString(tmp142); + } + if(__isset.msgType) + { + tmp142.Append(", MsgType: "); + MsgType.ToString(tmp142); + } + if((Offline != null) && __isset.offline) + { + tmp142.Append(", Offline: "); + Offline.ToString(tmp142); + } + if((LeaguerTid != null) && __isset.leaguerTid) + { + tmp142.Append(", LeaguerTid: "); + LeaguerTid.ToString(tmp142); + } + if((ExtraList != null) && __isset.extraList) + { + tmp142.Append(", ExtraList: "); + ExtraList.ToString(tmp142); + } + if((Timestamp != null) && __isset.timestamp) + { + tmp142.Append(", Timestamp: "); + Timestamp.ToString(tmp142); + } + if((Error != null) && __isset.error) + { + tmp142.Append(", Error: "); + Error.ToString(tmp142); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp142.Append(", ExtraMap: "); + ExtraMap.ToString(tmp142); + } + if(__isset.readstatus) + { + tmp142.Append(", Readstatus: "); + Readstatus.ToString(tmp142); + } + tmp142.Append(')'); + return tmp142.ToString(); + } +} + diff --git a/protocols/gen-netstd/TimMBeanList.cs b/protocols/gen-netstd/TimMBeanList.cs new file mode 100644 index 0000000..c1a7c92 --- /dev/null +++ b/protocols/gen-netstd/TimMBeanList.cs @@ -0,0 +1,357 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class TimMBeanList : TBase +{ + private List _timMBeanList; + private string _reqType; + private Dictionary _extraMap; + + public string ThreadId { get; set; } + + /// + /// 信息列表 + /// + public List TimMBeanList_ + { + get + { + return _timMBeanList; + } + set + { + __isset.timMBeanList = true; + this._timMBeanList = value; + } + } + + /// + /// 类型 + /// + public string ReqType + { + get + { + return _reqType; + } + set + { + __isset.reqType = true; + this._reqType = value; + } + } + + public Dictionary ExtraMap + { + get + { + return _extraMap; + } + set + { + __isset.extraMap = true; + this._extraMap = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool timMBeanList; + public bool reqType; + public bool extraMap; + } + + public TimMBeanList() + { + } + + public TimMBeanList(string threadId) : this() + { + this.ThreadId = threadId; + } + + public TimMBeanList DeepCopy() + { + var tmp259 = new TimMBeanList(); + if((ThreadId != null)) + { + tmp259.ThreadId = this.ThreadId; + } + if((TimMBeanList_ != null) && __isset.timMBeanList) + { + tmp259.TimMBeanList_ = this.TimMBeanList_.DeepCopy(); + } + tmp259.__isset.timMBeanList = this.__isset.timMBeanList; + if((ReqType != null) && __isset.reqType) + { + tmp259.ReqType = this.ReqType; + } + tmp259.__isset.reqType = this.__isset.reqType; + if((ExtraMap != null) && __isset.extraMap) + { + tmp259.ExtraMap = this.ExtraMap.DeepCopy(); + } + tmp259.__isset.extraMap = this.__isset.extraMap; + return tmp259; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + bool isset_threadId = false; + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.String) + { + ThreadId = await iprot.ReadStringAsync(cancellationToken); + isset_threadId = true; + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.List) + { + { + var _list260 = await iprot.ReadListBeginAsync(cancellationToken); + TimMBeanList_ = new List(_list260.Count); + for(int _i261 = 0; _i261 < _list260.Count; ++_i261) + { + TimMBean _elem262; + _elem262 = new TimMBean(); + await _elem262.ReadAsync(iprot, cancellationToken); + TimMBeanList_.Add(_elem262); + } + await iprot.ReadListEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.String) + { + ReqType = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 4: + if (field.Type == TType.Map) + { + { + var _map263 = await iprot.ReadMapBeginAsync(cancellationToken); + ExtraMap = new Dictionary(_map263.Count); + for(int _i264 = 0; _i264 < _map263.Count; ++_i264) + { + string _key265; + string _val266; + _key265 = await iprot.ReadStringAsync(cancellationToken); + _val266 = await iprot.ReadStringAsync(cancellationToken); + ExtraMap[_key265] = _val266; + } + await iprot.ReadMapEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + if (!isset_threadId) + { + throw new TProtocolException(TProtocolException.INVALID_DATA); + } + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp267 = new TStruct("TimMBeanList"); + await oprot.WriteStructBeginAsync(tmp267, cancellationToken); + var tmp268 = new TField(); + if((ThreadId != null)) + { + tmp268.Name = "threadId"; + tmp268.Type = TType.String; + tmp268.ID = 1; + await oprot.WriteFieldBeginAsync(tmp268, cancellationToken); + await oprot.WriteStringAsync(ThreadId, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((TimMBeanList_ != null) && __isset.timMBeanList) + { + tmp268.Name = "timMBeanList"; + tmp268.Type = TType.List; + tmp268.ID = 2; + await oprot.WriteFieldBeginAsync(tmp268, cancellationToken); + await oprot.WriteListBeginAsync(new TList(TType.Struct, TimMBeanList_.Count), cancellationToken); + foreach (TimMBean _iter269 in TimMBeanList_) + { + await _iter269.WriteAsync(oprot, cancellationToken); + } + await oprot.WriteListEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ReqType != null) && __isset.reqType) + { + tmp268.Name = "reqType"; + tmp268.Type = TType.String; + tmp268.ID = 3; + await oprot.WriteFieldBeginAsync(tmp268, cancellationToken); + await oprot.WriteStringAsync(ReqType, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp268.Name = "extraMap"; + tmp268.Type = TType.Map; + tmp268.ID = 4; + await oprot.WriteFieldBeginAsync(tmp268, cancellationToken); + await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.String, ExtraMap.Count), cancellationToken); + foreach (string _iter270 in ExtraMap.Keys) + { + await oprot.WriteStringAsync(_iter270, cancellationToken); + await oprot.WriteStringAsync(ExtraMap[_iter270], cancellationToken); + } + await oprot.WriteMapEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is TimMBeanList other)) return false; + if (ReferenceEquals(this, other)) return true; + return global::System.Object.Equals(ThreadId, other.ThreadId) + && ((__isset.timMBeanList == other.__isset.timMBeanList) && ((!__isset.timMBeanList) || (TCollections.Equals(TimMBeanList_, other.TimMBeanList_)))) + && ((__isset.reqType == other.__isset.reqType) && ((!__isset.reqType) || (global::System.Object.Equals(ReqType, other.ReqType)))) + && ((__isset.extraMap == other.__isset.extraMap) && ((!__isset.extraMap) || (TCollections.Equals(ExtraMap, other.ExtraMap)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((ThreadId != null)) + { + hashcode = (hashcode * 397) + ThreadId.GetHashCode(); + } + if((TimMBeanList_ != null) && __isset.timMBeanList) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(TimMBeanList_); + } + if((ReqType != null) && __isset.reqType) + { + hashcode = (hashcode * 397) + ReqType.GetHashCode(); + } + if((ExtraMap != null) && __isset.extraMap) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraMap); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp271 = new StringBuilder("TimMBeanList("); + if((ThreadId != null)) + { + tmp271.Append(", ThreadId: "); + ThreadId.ToString(tmp271); + } + if((TimMBeanList_ != null) && __isset.timMBeanList) + { + tmp271.Append(", TimMBeanList_: "); + TimMBeanList_.ToString(tmp271); + } + if((ReqType != null) && __isset.reqType) + { + tmp271.Append(", ReqType: "); + ReqType.ToString(tmp271); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp271.Append(", ExtraMap: "); + ExtraMap.ToString(tmp271); + } + tmp271.Append(')'); + return tmp271.ToString(); + } +} + diff --git a/protocols/gen-netstd/TimMessageIq.cs b/protocols/gen-netstd/TimMessageIq.cs new file mode 100644 index 0000000..a805d32 --- /dev/null +++ b/protocols/gen-netstd/TimMessageIq.cs @@ -0,0 +1,383 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class TimMessageIq : TBase +{ + private List _tidlist; + private TimPage _timPage; + private List _midlist; + private Dictionary _extraMap; + + /// + /// tid集合 + /// + public List Tidlist + { + get + { + return _tidlist; + } + set + { + __isset.tidlist = true; + this._tidlist = value; + } + } + + /// + /// 分页 + /// + public TimPage TimPage + { + get + { + return _timPage; + } + set + { + __isset.timPage = true; + this._timPage = value; + } + } + + /// + /// mid集合 + /// + public List Midlist + { + get + { + return _midlist; + } + set + { + __isset.midlist = true; + this._midlist = value; + } + } + + public Dictionary ExtraMap + { + get + { + return _extraMap; + } + set + { + __isset.extraMap = true; + this._extraMap = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool tidlist; + public bool timPage; + public bool midlist; + public bool extraMap; + } + + public TimMessageIq() + { + } + + public TimMessageIq DeepCopy() + { + var tmp236 = new TimMessageIq(); + if((Tidlist != null) && __isset.tidlist) + { + tmp236.Tidlist = this.Tidlist.DeepCopy(); + } + tmp236.__isset.tidlist = this.__isset.tidlist; + if((TimPage != null) && __isset.timPage) + { + tmp236.TimPage = (TimPage)this.TimPage.DeepCopy(); + } + tmp236.__isset.timPage = this.__isset.timPage; + if((Midlist != null) && __isset.midlist) + { + tmp236.Midlist = this.Midlist.DeepCopy(); + } + tmp236.__isset.midlist = this.__isset.midlist; + if((ExtraMap != null) && __isset.extraMap) + { + tmp236.ExtraMap = this.ExtraMap.DeepCopy(); + } + tmp236.__isset.extraMap = this.__isset.extraMap; + return tmp236; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.List) + { + { + var _list237 = await iprot.ReadListBeginAsync(cancellationToken); + Tidlist = new List(_list237.Count); + for(int _i238 = 0; _i238 < _list237.Count; ++_i238) + { + string _elem239; + _elem239 = await iprot.ReadStringAsync(cancellationToken); + Tidlist.Add(_elem239); + } + await iprot.ReadListEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.Struct) + { + TimPage = new TimPage(); + await TimPage.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.List) + { + { + var _list240 = await iprot.ReadListBeginAsync(cancellationToken); + Midlist = new List(_list240.Count); + for(int _i241 = 0; _i241 < _list240.Count; ++_i241) + { + string _elem242; + _elem242 = await iprot.ReadStringAsync(cancellationToken); + Midlist.Add(_elem242); + } + await iprot.ReadListEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 4: + if (field.Type == TType.Map) + { + { + var _map243 = await iprot.ReadMapBeginAsync(cancellationToken); + ExtraMap = new Dictionary(_map243.Count); + for(int _i244 = 0; _i244 < _map243.Count; ++_i244) + { + string _key245; + string _val246; + _key245 = await iprot.ReadStringAsync(cancellationToken); + _val246 = await iprot.ReadStringAsync(cancellationToken); + ExtraMap[_key245] = _val246; + } + await iprot.ReadMapEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp247 = new TStruct("TimMessageIq"); + await oprot.WriteStructBeginAsync(tmp247, cancellationToken); + var tmp248 = new TField(); + if((Tidlist != null) && __isset.tidlist) + { + tmp248.Name = "tidlist"; + tmp248.Type = TType.List; + tmp248.ID = 1; + await oprot.WriteFieldBeginAsync(tmp248, cancellationToken); + await oprot.WriteListBeginAsync(new TList(TType.String, Tidlist.Count), cancellationToken); + foreach (string _iter249 in Tidlist) + { + await oprot.WriteStringAsync(_iter249, cancellationToken); + } + await oprot.WriteListEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((TimPage != null) && __isset.timPage) + { + tmp248.Name = "timPage"; + tmp248.Type = TType.Struct; + tmp248.ID = 2; + await oprot.WriteFieldBeginAsync(tmp248, cancellationToken); + await TimPage.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Midlist != null) && __isset.midlist) + { + tmp248.Name = "midlist"; + tmp248.Type = TType.List; + tmp248.ID = 3; + await oprot.WriteFieldBeginAsync(tmp248, cancellationToken); + await oprot.WriteListBeginAsync(new TList(TType.String, Midlist.Count), cancellationToken); + foreach (string _iter250 in Midlist) + { + await oprot.WriteStringAsync(_iter250, cancellationToken); + } + await oprot.WriteListEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp248.Name = "extraMap"; + tmp248.Type = TType.Map; + tmp248.ID = 4; + await oprot.WriteFieldBeginAsync(tmp248, cancellationToken); + await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.String, ExtraMap.Count), cancellationToken); + foreach (string _iter251 in ExtraMap.Keys) + { + await oprot.WriteStringAsync(_iter251, cancellationToken); + await oprot.WriteStringAsync(ExtraMap[_iter251], cancellationToken); + } + await oprot.WriteMapEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is TimMessageIq other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.tidlist == other.__isset.tidlist) && ((!__isset.tidlist) || (TCollections.Equals(Tidlist, other.Tidlist)))) + && ((__isset.timPage == other.__isset.timPage) && ((!__isset.timPage) || (global::System.Object.Equals(TimPage, other.TimPage)))) + && ((__isset.midlist == other.__isset.midlist) && ((!__isset.midlist) || (TCollections.Equals(Midlist, other.Midlist)))) + && ((__isset.extraMap == other.__isset.extraMap) && ((!__isset.extraMap) || (TCollections.Equals(ExtraMap, other.ExtraMap)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Tidlist != null) && __isset.tidlist) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(Tidlist); + } + if((TimPage != null) && __isset.timPage) + { + hashcode = (hashcode * 397) + TimPage.GetHashCode(); + } + if((Midlist != null) && __isset.midlist) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(Midlist); + } + if((ExtraMap != null) && __isset.extraMap) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraMap); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp252 = new StringBuilder("TimMessageIq("); + int tmp253 = 0; + if((Tidlist != null) && __isset.tidlist) + { + if(0 < tmp253++) { tmp252.Append(", "); } + tmp252.Append("Tidlist: "); + Tidlist.ToString(tmp252); + } + if((TimPage != null) && __isset.timPage) + { + if(0 < tmp253++) { tmp252.Append(", "); } + tmp252.Append("TimPage: "); + TimPage.ToString(tmp252); + } + if((Midlist != null) && __isset.midlist) + { + if(0 < tmp253++) { tmp252.Append(", "); } + tmp252.Append("Midlist: "); + Midlist.ToString(tmp252); + } + if((ExtraMap != null) && __isset.extraMap) + { + if(0 < tmp253++) { tmp252.Append(", "); } + tmp252.Append("ExtraMap: "); + ExtraMap.ToString(tmp252); + } + tmp252.Append(')'); + return tmp252.ToString(); + } +} + diff --git a/protocols/gen-netstd/TimNode.cs b/protocols/gen-netstd/TimNode.cs new file mode 100644 index 0000000..991d7f1 --- /dev/null +++ b/protocols/gen-netstd/TimNode.cs @@ -0,0 +1,231 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class TimNode : TBase +{ + private string _key; + private string _value; + + /// + /// 键 + /// + public string Key + { + get + { + return _key; + } + set + { + __isset.key = true; + this._key = value; + } + } + + /// + /// 值 + /// + public string Value + { + get + { + return _value; + } + set + { + __isset.@value = true; + this._value = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool key; + public bool @value; + } + + public TimNode() + { + } + + public TimNode DeepCopy() + { + var tmp5 = new TimNode(); + if((Key != null) && __isset.key) + { + tmp5.Key = this.Key; + } + tmp5.__isset.key = this.__isset.key; + if((Value != null) && __isset.@value) + { + tmp5.Value = this.Value; + } + tmp5.__isset.@value = this.__isset.@value; + return tmp5; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.String) + { + Key = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.String) + { + Value = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp6 = new TStruct("TimNode"); + await oprot.WriteStructBeginAsync(tmp6, cancellationToken); + var tmp7 = new TField(); + if((Key != null) && __isset.key) + { + tmp7.Name = "key"; + tmp7.Type = TType.String; + tmp7.ID = 1; + await oprot.WriteFieldBeginAsync(tmp7, cancellationToken); + await oprot.WriteStringAsync(Key, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Value != null) && __isset.@value) + { + tmp7.Name = "value"; + tmp7.Type = TType.String; + tmp7.ID = 2; + await oprot.WriteFieldBeginAsync(tmp7, cancellationToken); + await oprot.WriteStringAsync(Value, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is TimNode other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.key == other.__isset.key) && ((!__isset.key) || (global::System.Object.Equals(Key, other.Key)))) + && ((__isset.@value == other.__isset.@value) && ((!__isset.@value) || (global::System.Object.Equals(Value, other.Value)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Key != null) && __isset.key) + { + hashcode = (hashcode * 397) + Key.GetHashCode(); + } + if((Value != null) && __isset.@value) + { + hashcode = (hashcode * 397) + Value.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp8 = new StringBuilder("TimNode("); + int tmp9 = 0; + if((Key != null) && __isset.key) + { + if(0 < tmp9++) { tmp8.Append(", "); } + tmp8.Append("Key: "); + Key.ToString(tmp8); + } + if((Value != null) && __isset.@value) + { + if(0 < tmp9++) { tmp8.Append(", "); } + tmp8.Append("Value: "); + Value.ToString(tmp8); + } + tmp8.Append(')'); + return tmp8.ToString(); + } +} + diff --git a/protocols/gen-netstd/TimPBean.cs b/protocols/gen-netstd/TimPBean.cs new file mode 100644 index 0000000..f9ceb95 --- /dev/null +++ b/protocols/gen-netstd/TimPBean.cs @@ -0,0 +1,726 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class TimPBean : TBase +{ + private Tid _fromTid; + private Tid _toTid; + private string _status; + private string _type; + private int _priority; + private string _show; + private Tid _leaguerTid; + private List _extraList; + private TimError _error; + private Dictionary _extraMap; + + /// + /// 标识 + /// + public string ThreadId { get; set; } + + public Tid FromTid + { + get + { + return _fromTid; + } + set + { + __isset.fromTid = true; + this._fromTid = value; + } + } + + public Tid ToTid + { + get + { + return _toTid; + } + set + { + __isset.toTid = true; + this._toTid = value; + } + } + + /// + /// subscribe:订阅其他用户的状态 probe:请求获取其他用户的状态 unavailable:不可用,离线(offline)状态 + /// + public string Status + { + get + { + return _status; + } + set + { + __isset.status = true; + this._status = value; + } + } + + /// + /// normal:类似于email,主要特点是不要求响应; + /// chat:类似于qq里的好友即时聊天,主要特点是实时通讯; + /// groupchat:类似于聊天室里的群聊; + /// headline:用于发送alert和notification; + /// error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; + /// + public string Type + { + get + { + return _type; + } + set + { + __isset.type = true; + this._type = value; + } + } + + /// + /// 优先权 0 。高优先级的resource能接受发送到bare JID的消息,低优先级的resource不能 + /// + public int Priority + { + get + { + return _priority; + } + set + { + __isset.priority = true; + this._priority = value; + } + } + + /// + /// chat:聊天中 away:暂时离开 xa:eXtend Away,长时间离开 dnd:勿打扰 online:在线 offline:离线 + /// + public string Show + { + get + { + return _show; + } + set + { + __isset.show = true; + this._show = value; + } + } + + /// + /// 成员Tid 群聊时信息发送者Tid + /// + public Tid LeaguerTid + { + get + { + return _leaguerTid; + } + set + { + __isset.leaguerTid = true; + this._leaguerTid = value; + } + } + + /// + /// 扩展字段 + /// + public List ExtraList + { + get + { + return _extraList; + } + set + { + __isset.extraList = true; + this._extraList = value; + } + } + + /// + /// 错误码 + /// + public TimError Error + { + get + { + return _error; + } + set + { + __isset.error = true; + this._error = value; + } + } + + public Dictionary ExtraMap + { + get + { + return _extraMap; + } + set + { + __isset.extraMap = true; + this._extraMap = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool fromTid; + public bool toTid; + public bool status; + public bool type; + public bool priority; + public bool show; + public bool leaguerTid; + public bool extraList; + public bool error; + public bool extraMap; + } + + public TimPBean() + { + } + + public TimPBean(string threadId) : this() + { + this.ThreadId = threadId; + } + + public TimPBean DeepCopy() + { + var tmp116 = new TimPBean(); + if((ThreadId != null)) + { + tmp116.ThreadId = this.ThreadId; + } + if((FromTid != null) && __isset.fromTid) + { + tmp116.FromTid = (Tid)this.FromTid.DeepCopy(); + } + tmp116.__isset.fromTid = this.__isset.fromTid; + if((ToTid != null) && __isset.toTid) + { + tmp116.ToTid = (Tid)this.ToTid.DeepCopy(); + } + tmp116.__isset.toTid = this.__isset.toTid; + if((Status != null) && __isset.status) + { + tmp116.Status = this.Status; + } + tmp116.__isset.status = this.__isset.status; + if((Type != null) && __isset.type) + { + tmp116.Type = this.Type; + } + tmp116.__isset.type = this.__isset.type; + if(__isset.priority) + { + tmp116.Priority = this.Priority; + } + tmp116.__isset.priority = this.__isset.priority; + if((Show != null) && __isset.show) + { + tmp116.Show = this.Show; + } + tmp116.__isset.show = this.__isset.show; + if((LeaguerTid != null) && __isset.leaguerTid) + { + tmp116.LeaguerTid = (Tid)this.LeaguerTid.DeepCopy(); + } + tmp116.__isset.leaguerTid = this.__isset.leaguerTid; + if((ExtraList != null) && __isset.extraList) + { + tmp116.ExtraList = this.ExtraList.DeepCopy(); + } + tmp116.__isset.extraList = this.__isset.extraList; + if((Error != null) && __isset.error) + { + tmp116.Error = (TimError)this.Error.DeepCopy(); + } + tmp116.__isset.error = this.__isset.error; + if((ExtraMap != null) && __isset.extraMap) + { + tmp116.ExtraMap = this.ExtraMap.DeepCopy(); + } + tmp116.__isset.extraMap = this.__isset.extraMap; + return tmp116; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + bool isset_threadId = false; + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.String) + { + ThreadId = await iprot.ReadStringAsync(cancellationToken); + isset_threadId = true; + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.Struct) + { + FromTid = new Tid(); + await FromTid.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.Struct) + { + ToTid = new Tid(); + await ToTid.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 4: + if (field.Type == TType.String) + { + Status = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 5: + if (field.Type == TType.String) + { + Type = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 6: + if (field.Type == TType.I32) + { + Priority = await iprot.ReadI32Async(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 7: + if (field.Type == TType.String) + { + Show = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 8: + if (field.Type == TType.Struct) + { + LeaguerTid = new Tid(); + await LeaguerTid.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 9: + if (field.Type == TType.List) + { + { + var _list117 = await iprot.ReadListBeginAsync(cancellationToken); + ExtraList = new List(_list117.Count); + for(int _i118 = 0; _i118 < _list117.Count; ++_i118) + { + TimNode _elem119; + _elem119 = new TimNode(); + await _elem119.ReadAsync(iprot, cancellationToken); + ExtraList.Add(_elem119); + } + await iprot.ReadListEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 10: + if (field.Type == TType.Struct) + { + Error = new TimError(); + await Error.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 11: + if (field.Type == TType.Map) + { + { + var _map120 = await iprot.ReadMapBeginAsync(cancellationToken); + ExtraMap = new Dictionary(_map120.Count); + for(int _i121 = 0; _i121 < _map120.Count; ++_i121) + { + string _key122; + string _val123; + _key122 = await iprot.ReadStringAsync(cancellationToken); + _val123 = await iprot.ReadStringAsync(cancellationToken); + ExtraMap[_key122] = _val123; + } + await iprot.ReadMapEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + if (!isset_threadId) + { + throw new TProtocolException(TProtocolException.INVALID_DATA); + } + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp124 = new TStruct("TimPBean"); + await oprot.WriteStructBeginAsync(tmp124, cancellationToken); + var tmp125 = new TField(); + if((ThreadId != null)) + { + tmp125.Name = "threadId"; + tmp125.Type = TType.String; + tmp125.ID = 1; + await oprot.WriteFieldBeginAsync(tmp125, cancellationToken); + await oprot.WriteStringAsync(ThreadId, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((FromTid != null) && __isset.fromTid) + { + tmp125.Name = "fromTid"; + tmp125.Type = TType.Struct; + tmp125.ID = 2; + await oprot.WriteFieldBeginAsync(tmp125, cancellationToken); + await FromTid.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ToTid != null) && __isset.toTid) + { + tmp125.Name = "toTid"; + tmp125.Type = TType.Struct; + tmp125.ID = 3; + await oprot.WriteFieldBeginAsync(tmp125, cancellationToken); + await ToTid.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Status != null) && __isset.status) + { + tmp125.Name = "status"; + tmp125.Type = TType.String; + tmp125.ID = 4; + await oprot.WriteFieldBeginAsync(tmp125, cancellationToken); + await oprot.WriteStringAsync(Status, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Type != null) && __isset.type) + { + tmp125.Name = "type"; + tmp125.Type = TType.String; + tmp125.ID = 5; + await oprot.WriteFieldBeginAsync(tmp125, cancellationToken); + await oprot.WriteStringAsync(Type, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if(__isset.priority) + { + tmp125.Name = "priority"; + tmp125.Type = TType.I32; + tmp125.ID = 6; + await oprot.WriteFieldBeginAsync(tmp125, cancellationToken); + await oprot.WriteI32Async(Priority, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Show != null) && __isset.show) + { + tmp125.Name = "show"; + tmp125.Type = TType.String; + tmp125.ID = 7; + await oprot.WriteFieldBeginAsync(tmp125, cancellationToken); + await oprot.WriteStringAsync(Show, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((LeaguerTid != null) && __isset.leaguerTid) + { + tmp125.Name = "leaguerTid"; + tmp125.Type = TType.Struct; + tmp125.ID = 8; + await oprot.WriteFieldBeginAsync(tmp125, cancellationToken); + await LeaguerTid.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraList != null) && __isset.extraList) + { + tmp125.Name = "extraList"; + tmp125.Type = TType.List; + tmp125.ID = 9; + await oprot.WriteFieldBeginAsync(tmp125, cancellationToken); + await oprot.WriteListBeginAsync(new TList(TType.Struct, ExtraList.Count), cancellationToken); + foreach (TimNode _iter126 in ExtraList) + { + await _iter126.WriteAsync(oprot, cancellationToken); + } + await oprot.WriteListEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Error != null) && __isset.error) + { + tmp125.Name = "error"; + tmp125.Type = TType.Struct; + tmp125.ID = 10; + await oprot.WriteFieldBeginAsync(tmp125, cancellationToken); + await Error.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp125.Name = "extraMap"; + tmp125.Type = TType.Map; + tmp125.ID = 11; + await oprot.WriteFieldBeginAsync(tmp125, cancellationToken); + await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.String, ExtraMap.Count), cancellationToken); + foreach (string _iter127 in ExtraMap.Keys) + { + await oprot.WriteStringAsync(_iter127, cancellationToken); + await oprot.WriteStringAsync(ExtraMap[_iter127], cancellationToken); + } + await oprot.WriteMapEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is TimPBean other)) return false; + if (ReferenceEquals(this, other)) return true; + return global::System.Object.Equals(ThreadId, other.ThreadId) + && ((__isset.fromTid == other.__isset.fromTid) && ((!__isset.fromTid) || (global::System.Object.Equals(FromTid, other.FromTid)))) + && ((__isset.toTid == other.__isset.toTid) && ((!__isset.toTid) || (global::System.Object.Equals(ToTid, other.ToTid)))) + && ((__isset.status == other.__isset.status) && ((!__isset.status) || (global::System.Object.Equals(Status, other.Status)))) + && ((__isset.type == other.__isset.type) && ((!__isset.type) || (global::System.Object.Equals(Type, other.Type)))) + && ((__isset.priority == other.__isset.priority) && ((!__isset.priority) || (global::System.Object.Equals(Priority, other.Priority)))) + && ((__isset.show == other.__isset.show) && ((!__isset.show) || (global::System.Object.Equals(Show, other.Show)))) + && ((__isset.leaguerTid == other.__isset.leaguerTid) && ((!__isset.leaguerTid) || (global::System.Object.Equals(LeaguerTid, other.LeaguerTid)))) + && ((__isset.extraList == other.__isset.extraList) && ((!__isset.extraList) || (TCollections.Equals(ExtraList, other.ExtraList)))) + && ((__isset.error == other.__isset.error) && ((!__isset.error) || (global::System.Object.Equals(Error, other.Error)))) + && ((__isset.extraMap == other.__isset.extraMap) && ((!__isset.extraMap) || (TCollections.Equals(ExtraMap, other.ExtraMap)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((ThreadId != null)) + { + hashcode = (hashcode * 397) + ThreadId.GetHashCode(); + } + if((FromTid != null) && __isset.fromTid) + { + hashcode = (hashcode * 397) + FromTid.GetHashCode(); + } + if((ToTid != null) && __isset.toTid) + { + hashcode = (hashcode * 397) + ToTid.GetHashCode(); + } + if((Status != null) && __isset.status) + { + hashcode = (hashcode * 397) + Status.GetHashCode(); + } + if((Type != null) && __isset.type) + { + hashcode = (hashcode * 397) + Type.GetHashCode(); + } + if(__isset.priority) + { + hashcode = (hashcode * 397) + Priority.GetHashCode(); + } + if((Show != null) && __isset.show) + { + hashcode = (hashcode * 397) + Show.GetHashCode(); + } + if((LeaguerTid != null) && __isset.leaguerTid) + { + hashcode = (hashcode * 397) + LeaguerTid.GetHashCode(); + } + if((ExtraList != null) && __isset.extraList) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraList); + } + if((Error != null) && __isset.error) + { + hashcode = (hashcode * 397) + Error.GetHashCode(); + } + if((ExtraMap != null) && __isset.extraMap) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraMap); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp128 = new StringBuilder("TimPBean("); + if((ThreadId != null)) + { + tmp128.Append(", ThreadId: "); + ThreadId.ToString(tmp128); + } + if((FromTid != null) && __isset.fromTid) + { + tmp128.Append(", FromTid: "); + FromTid.ToString(tmp128); + } + if((ToTid != null) && __isset.toTid) + { + tmp128.Append(", ToTid: "); + ToTid.ToString(tmp128); + } + if((Status != null) && __isset.status) + { + tmp128.Append(", Status: "); + Status.ToString(tmp128); + } + if((Type != null) && __isset.type) + { + tmp128.Append(", Type: "); + Type.ToString(tmp128); + } + if(__isset.priority) + { + tmp128.Append(", Priority: "); + Priority.ToString(tmp128); + } + if((Show != null) && __isset.show) + { + tmp128.Append(", Show: "); + Show.ToString(tmp128); + } + if((LeaguerTid != null) && __isset.leaguerTid) + { + tmp128.Append(", LeaguerTid: "); + LeaguerTid.ToString(tmp128); + } + if((ExtraList != null) && __isset.extraList) + { + tmp128.Append(", ExtraList: "); + ExtraList.ToString(tmp128); + } + if((Error != null) && __isset.error) + { + tmp128.Append(", Error: "); + Error.ToString(tmp128); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp128.Append(", ExtraMap: "); + ExtraMap.ToString(tmp128); + } + tmp128.Append(')'); + return tmp128.ToString(); + } +} + diff --git a/protocols/gen-netstd/TimPBeanList.cs b/protocols/gen-netstd/TimPBeanList.cs new file mode 100644 index 0000000..3ec1fd0 --- /dev/null +++ b/protocols/gen-netstd/TimPBeanList.cs @@ -0,0 +1,357 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class TimPBeanList : TBase +{ + private List _timPBeanList; + private string _reqType; + private Dictionary _extraMap; + + public string ThreadId { get; set; } + + /// + /// 状态信息列表 + /// + public List TimPBeanList_ + { + get + { + return _timPBeanList; + } + set + { + __isset.timPBeanList = true; + this._timPBeanList = value; + } + } + + /// + /// 类型 + /// + public string ReqType + { + get + { + return _reqType; + } + set + { + __isset.reqType = true; + this._reqType = value; + } + } + + public Dictionary ExtraMap + { + get + { + return _extraMap; + } + set + { + __isset.extraMap = true; + this._extraMap = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool timPBeanList; + public bool reqType; + public bool extraMap; + } + + public TimPBeanList() + { + } + + public TimPBeanList(string threadId) : this() + { + this.ThreadId = threadId; + } + + public TimPBeanList DeepCopy() + { + var tmp273 = new TimPBeanList(); + if((ThreadId != null)) + { + tmp273.ThreadId = this.ThreadId; + } + if((TimPBeanList_ != null) && __isset.timPBeanList) + { + tmp273.TimPBeanList_ = this.TimPBeanList_.DeepCopy(); + } + tmp273.__isset.timPBeanList = this.__isset.timPBeanList; + if((ReqType != null) && __isset.reqType) + { + tmp273.ReqType = this.ReqType; + } + tmp273.__isset.reqType = this.__isset.reqType; + if((ExtraMap != null) && __isset.extraMap) + { + tmp273.ExtraMap = this.ExtraMap.DeepCopy(); + } + tmp273.__isset.extraMap = this.__isset.extraMap; + return tmp273; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + bool isset_threadId = false; + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.String) + { + ThreadId = await iprot.ReadStringAsync(cancellationToken); + isset_threadId = true; + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.List) + { + { + var _list274 = await iprot.ReadListBeginAsync(cancellationToken); + TimPBeanList_ = new List(_list274.Count); + for(int _i275 = 0; _i275 < _list274.Count; ++_i275) + { + TimPBean _elem276; + _elem276 = new TimPBean(); + await _elem276.ReadAsync(iprot, cancellationToken); + TimPBeanList_.Add(_elem276); + } + await iprot.ReadListEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.String) + { + ReqType = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 4: + if (field.Type == TType.Map) + { + { + var _map277 = await iprot.ReadMapBeginAsync(cancellationToken); + ExtraMap = new Dictionary(_map277.Count); + for(int _i278 = 0; _i278 < _map277.Count; ++_i278) + { + string _key279; + string _val280; + _key279 = await iprot.ReadStringAsync(cancellationToken); + _val280 = await iprot.ReadStringAsync(cancellationToken); + ExtraMap[_key279] = _val280; + } + await iprot.ReadMapEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + if (!isset_threadId) + { + throw new TProtocolException(TProtocolException.INVALID_DATA); + } + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp281 = new TStruct("TimPBeanList"); + await oprot.WriteStructBeginAsync(tmp281, cancellationToken); + var tmp282 = new TField(); + if((ThreadId != null)) + { + tmp282.Name = "threadId"; + tmp282.Type = TType.String; + tmp282.ID = 1; + await oprot.WriteFieldBeginAsync(tmp282, cancellationToken); + await oprot.WriteStringAsync(ThreadId, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((TimPBeanList_ != null) && __isset.timPBeanList) + { + tmp282.Name = "timPBeanList"; + tmp282.Type = TType.List; + tmp282.ID = 2; + await oprot.WriteFieldBeginAsync(tmp282, cancellationToken); + await oprot.WriteListBeginAsync(new TList(TType.Struct, TimPBeanList_.Count), cancellationToken); + foreach (TimPBean _iter283 in TimPBeanList_) + { + await _iter283.WriteAsync(oprot, cancellationToken); + } + await oprot.WriteListEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ReqType != null) && __isset.reqType) + { + tmp282.Name = "reqType"; + tmp282.Type = TType.String; + tmp282.ID = 3; + await oprot.WriteFieldBeginAsync(tmp282, cancellationToken); + await oprot.WriteStringAsync(ReqType, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp282.Name = "extraMap"; + tmp282.Type = TType.Map; + tmp282.ID = 4; + await oprot.WriteFieldBeginAsync(tmp282, cancellationToken); + await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.String, ExtraMap.Count), cancellationToken); + foreach (string _iter284 in ExtraMap.Keys) + { + await oprot.WriteStringAsync(_iter284, cancellationToken); + await oprot.WriteStringAsync(ExtraMap[_iter284], cancellationToken); + } + await oprot.WriteMapEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is TimPBeanList other)) return false; + if (ReferenceEquals(this, other)) return true; + return global::System.Object.Equals(ThreadId, other.ThreadId) + && ((__isset.timPBeanList == other.__isset.timPBeanList) && ((!__isset.timPBeanList) || (TCollections.Equals(TimPBeanList_, other.TimPBeanList_)))) + && ((__isset.reqType == other.__isset.reqType) && ((!__isset.reqType) || (global::System.Object.Equals(ReqType, other.ReqType)))) + && ((__isset.extraMap == other.__isset.extraMap) && ((!__isset.extraMap) || (TCollections.Equals(ExtraMap, other.ExtraMap)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((ThreadId != null)) + { + hashcode = (hashcode * 397) + ThreadId.GetHashCode(); + } + if((TimPBeanList_ != null) && __isset.timPBeanList) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(TimPBeanList_); + } + if((ReqType != null) && __isset.reqType) + { + hashcode = (hashcode * 397) + ReqType.GetHashCode(); + } + if((ExtraMap != null) && __isset.extraMap) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraMap); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp285 = new StringBuilder("TimPBeanList("); + if((ThreadId != null)) + { + tmp285.Append(", ThreadId: "); + ThreadId.ToString(tmp285); + } + if((TimPBeanList_ != null) && __isset.timPBeanList) + { + tmp285.Append(", TimPBeanList_: "); + TimPBeanList_.ToString(tmp285); + } + if((ReqType != null) && __isset.reqType) + { + tmp285.Append(", ReqType: "); + ReqType.ToString(tmp285); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp285.Append(", ExtraMap: "); + ExtraMap.ToString(tmp285); + } + tmp285.Append(')'); + return tmp285.ToString(); + } +} + diff --git a/protocols/gen-netstd/TimPage.cs b/protocols/gen-netstd/TimPage.cs new file mode 100644 index 0000000..8c23e10 --- /dev/null +++ b/protocols/gen-netstd/TimPage.cs @@ -0,0 +1,352 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class TimPage : TBase +{ + private string _fromTimeStamp; + private string _toTimeStamp; + private int _limitCount; + private Dictionary _extraMap; + + /// + /// 时间上 + /// + public string FromTimeStamp + { + get + { + return _fromTimeStamp; + } + set + { + __isset.fromTimeStamp = true; + this._fromTimeStamp = value; + } + } + + /// + /// 时间下 + /// + public string ToTimeStamp + { + get + { + return _toTimeStamp; + } + set + { + __isset.toTimeStamp = true; + this._toTimeStamp = value; + } + } + + /// + /// 条数 + /// + public int LimitCount + { + get + { + return _limitCount; + } + set + { + __isset.limitCount = true; + this._limitCount = value; + } + } + + public Dictionary ExtraMap + { + get + { + return _extraMap; + } + set + { + __isset.extraMap = true; + this._extraMap = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool fromTimeStamp; + public bool toTimeStamp; + public bool limitCount; + public bool extraMap; + } + + public TimPage() + { + } + + public TimPage DeepCopy() + { + var tmp226 = new TimPage(); + if((FromTimeStamp != null) && __isset.fromTimeStamp) + { + tmp226.FromTimeStamp = this.FromTimeStamp; + } + tmp226.__isset.fromTimeStamp = this.__isset.fromTimeStamp; + if((ToTimeStamp != null) && __isset.toTimeStamp) + { + tmp226.ToTimeStamp = this.ToTimeStamp; + } + tmp226.__isset.toTimeStamp = this.__isset.toTimeStamp; + if(__isset.limitCount) + { + tmp226.LimitCount = this.LimitCount; + } + tmp226.__isset.limitCount = this.__isset.limitCount; + if((ExtraMap != null) && __isset.extraMap) + { + tmp226.ExtraMap = this.ExtraMap.DeepCopy(); + } + tmp226.__isset.extraMap = this.__isset.extraMap; + return tmp226; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.String) + { + FromTimeStamp = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.String) + { + ToTimeStamp = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.I32) + { + LimitCount = await iprot.ReadI32Async(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 4: + if (field.Type == TType.Map) + { + { + var _map227 = await iprot.ReadMapBeginAsync(cancellationToken); + ExtraMap = new Dictionary(_map227.Count); + for(int _i228 = 0; _i228 < _map227.Count; ++_i228) + { + string _key229; + string _val230; + _key229 = await iprot.ReadStringAsync(cancellationToken); + _val230 = await iprot.ReadStringAsync(cancellationToken); + ExtraMap[_key229] = _val230; + } + await iprot.ReadMapEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp231 = new TStruct("TimPage"); + await oprot.WriteStructBeginAsync(tmp231, cancellationToken); + var tmp232 = new TField(); + if((FromTimeStamp != null) && __isset.fromTimeStamp) + { + tmp232.Name = "fromTimeStamp"; + tmp232.Type = TType.String; + tmp232.ID = 1; + await oprot.WriteFieldBeginAsync(tmp232, cancellationToken); + await oprot.WriteStringAsync(FromTimeStamp, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ToTimeStamp != null) && __isset.toTimeStamp) + { + tmp232.Name = "toTimeStamp"; + tmp232.Type = TType.String; + tmp232.ID = 2; + await oprot.WriteFieldBeginAsync(tmp232, cancellationToken); + await oprot.WriteStringAsync(ToTimeStamp, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if(__isset.limitCount) + { + tmp232.Name = "limitCount"; + tmp232.Type = TType.I32; + tmp232.ID = 3; + await oprot.WriteFieldBeginAsync(tmp232, cancellationToken); + await oprot.WriteI32Async(LimitCount, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp232.Name = "extraMap"; + tmp232.Type = TType.Map; + tmp232.ID = 4; + await oprot.WriteFieldBeginAsync(tmp232, cancellationToken); + await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.String, ExtraMap.Count), cancellationToken); + foreach (string _iter233 in ExtraMap.Keys) + { + await oprot.WriteStringAsync(_iter233, cancellationToken); + await oprot.WriteStringAsync(ExtraMap[_iter233], cancellationToken); + } + await oprot.WriteMapEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is TimPage other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.fromTimeStamp == other.__isset.fromTimeStamp) && ((!__isset.fromTimeStamp) || (global::System.Object.Equals(FromTimeStamp, other.FromTimeStamp)))) + && ((__isset.toTimeStamp == other.__isset.toTimeStamp) && ((!__isset.toTimeStamp) || (global::System.Object.Equals(ToTimeStamp, other.ToTimeStamp)))) + && ((__isset.limitCount == other.__isset.limitCount) && ((!__isset.limitCount) || (global::System.Object.Equals(LimitCount, other.LimitCount)))) + && ((__isset.extraMap == other.__isset.extraMap) && ((!__isset.extraMap) || (TCollections.Equals(ExtraMap, other.ExtraMap)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((FromTimeStamp != null) && __isset.fromTimeStamp) + { + hashcode = (hashcode * 397) + FromTimeStamp.GetHashCode(); + } + if((ToTimeStamp != null) && __isset.toTimeStamp) + { + hashcode = (hashcode * 397) + ToTimeStamp.GetHashCode(); + } + if(__isset.limitCount) + { + hashcode = (hashcode * 397) + LimitCount.GetHashCode(); + } + if((ExtraMap != null) && __isset.extraMap) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraMap); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp234 = new StringBuilder("TimPage("); + int tmp235 = 0; + if((FromTimeStamp != null) && __isset.fromTimeStamp) + { + if(0 < tmp235++) { tmp234.Append(", "); } + tmp234.Append("FromTimeStamp: "); + FromTimeStamp.ToString(tmp234); + } + if((ToTimeStamp != null) && __isset.toTimeStamp) + { + if(0 < tmp235++) { tmp234.Append(", "); } + tmp234.Append("ToTimeStamp: "); + ToTimeStamp.ToString(tmp234); + } + if(__isset.limitCount) + { + if(0 < tmp235++) { tmp234.Append(", "); } + tmp234.Append("LimitCount: "); + LimitCount.ToString(tmp234); + } + if((ExtraMap != null) && __isset.extraMap) + { + if(0 < tmp235++) { tmp234.Append(", "); } + tmp234.Append("ExtraMap: "); + ExtraMap.ToString(tmp234); + } + tmp234.Append(')'); + return tmp234.ToString(); + } +} + diff --git a/protocols/gen-netstd/TimParam.cs b/protocols/gen-netstd/TimParam.cs new file mode 100644 index 0000000..3e5efac --- /dev/null +++ b/protocols/gen-netstd/TimParam.cs @@ -0,0 +1,527 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class TimParam : TBase +{ + private string _timestamp; + private short _version; + private string _lang; + private List _extraList; + private Dictionary _extraMap; + private string _interflow; + private string _tls; + + /// + /// 服务器时间 + /// + public string Timestamp + { + get + { + return _timestamp; + } + set + { + __isset.timestamp = true; + this._timestamp = value; + } + } + + /// + /// 版本 + /// + public short Version + { + get + { + return _version; + } + set + { + __isset.version = true; + this._version = value; + } + } + + /// + /// 语言 + /// + public string Lang + { + get + { + return _lang; + } + set + { + __isset.lang = true; + this._lang = value; + } + } + + /// + /// 附加信息 + /// + public List ExtraList + { + get + { + return _extraList; + } + set + { + __isset.extraList = true; + this._extraList = value; + } + } + + public Dictionary ExtraMap + { + get + { + return _extraMap; + } + set + { + __isset.extraMap = true; + this._extraMap = value; + } + } + + /// + /// 消息合流 + /// + public string Interflow + { + get + { + return _interflow; + } + set + { + __isset.interflow = true; + this._interflow = value; + } + } + + /// + /// tls + /// + public string Tls + { + get + { + return _tls; + } + set + { + __isset.tls = true; + this._tls = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool timestamp; + public bool version; + public bool lang; + public bool extraList; + public bool extraMap; + public bool interflow; + public bool tls; + } + + public TimParam() + { + } + + public TimParam DeepCopy() + { + var tmp29 = new TimParam(); + if((Timestamp != null) && __isset.timestamp) + { + tmp29.Timestamp = this.Timestamp; + } + tmp29.__isset.timestamp = this.__isset.timestamp; + if(__isset.version) + { + tmp29.Version = this.Version; + } + tmp29.__isset.version = this.__isset.version; + if((Lang != null) && __isset.lang) + { + tmp29.Lang = this.Lang; + } + tmp29.__isset.lang = this.__isset.lang; + if((ExtraList != null) && __isset.extraList) + { + tmp29.ExtraList = this.ExtraList.DeepCopy(); + } + tmp29.__isset.extraList = this.__isset.extraList; + if((ExtraMap != null) && __isset.extraMap) + { + tmp29.ExtraMap = this.ExtraMap.DeepCopy(); + } + tmp29.__isset.extraMap = this.__isset.extraMap; + if((Interflow != null) && __isset.interflow) + { + tmp29.Interflow = this.Interflow; + } + tmp29.__isset.interflow = this.__isset.interflow; + if((Tls != null) && __isset.tls) + { + tmp29.Tls = this.Tls; + } + tmp29.__isset.tls = this.__isset.tls; + return tmp29; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.String) + { + Timestamp = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.I16) + { + Version = await iprot.ReadI16Async(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.String) + { + Lang = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 4: + if (field.Type == TType.List) + { + { + var _list30 = await iprot.ReadListBeginAsync(cancellationToken); + ExtraList = new List(_list30.Count); + for(int _i31 = 0; _i31 < _list30.Count; ++_i31) + { + TimNode _elem32; + _elem32 = new TimNode(); + await _elem32.ReadAsync(iprot, cancellationToken); + ExtraList.Add(_elem32); + } + await iprot.ReadListEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 5: + if (field.Type == TType.Map) + { + { + var _map33 = await iprot.ReadMapBeginAsync(cancellationToken); + ExtraMap = new Dictionary(_map33.Count); + for(int _i34 = 0; _i34 < _map33.Count; ++_i34) + { + string _key35; + string _val36; + _key35 = await iprot.ReadStringAsync(cancellationToken); + _val36 = await iprot.ReadStringAsync(cancellationToken); + ExtraMap[_key35] = _val36; + } + await iprot.ReadMapEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 6: + if (field.Type == TType.String) + { + Interflow = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 7: + if (field.Type == TType.String) + { + Tls = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp37 = new TStruct("TimParam"); + await oprot.WriteStructBeginAsync(tmp37, cancellationToken); + var tmp38 = new TField(); + if((Timestamp != null) && __isset.timestamp) + { + tmp38.Name = "timestamp"; + tmp38.Type = TType.String; + tmp38.ID = 1; + await oprot.WriteFieldBeginAsync(tmp38, cancellationToken); + await oprot.WriteStringAsync(Timestamp, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if(__isset.version) + { + tmp38.Name = "version"; + tmp38.Type = TType.I16; + tmp38.ID = 2; + await oprot.WriteFieldBeginAsync(tmp38, cancellationToken); + await oprot.WriteI16Async(Version, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Lang != null) && __isset.lang) + { + tmp38.Name = "lang"; + tmp38.Type = TType.String; + tmp38.ID = 3; + await oprot.WriteFieldBeginAsync(tmp38, cancellationToken); + await oprot.WriteStringAsync(Lang, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraList != null) && __isset.extraList) + { + tmp38.Name = "extraList"; + tmp38.Type = TType.List; + tmp38.ID = 4; + await oprot.WriteFieldBeginAsync(tmp38, cancellationToken); + await oprot.WriteListBeginAsync(new TList(TType.Struct, ExtraList.Count), cancellationToken); + foreach (TimNode _iter39 in ExtraList) + { + await _iter39.WriteAsync(oprot, cancellationToken); + } + await oprot.WriteListEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp38.Name = "extraMap"; + tmp38.Type = TType.Map; + tmp38.ID = 5; + await oprot.WriteFieldBeginAsync(tmp38, cancellationToken); + await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.String, ExtraMap.Count), cancellationToken); + foreach (string _iter40 in ExtraMap.Keys) + { + await oprot.WriteStringAsync(_iter40, cancellationToken); + await oprot.WriteStringAsync(ExtraMap[_iter40], cancellationToken); + } + await oprot.WriteMapEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Interflow != null) && __isset.interflow) + { + tmp38.Name = "interflow"; + tmp38.Type = TType.String; + tmp38.ID = 6; + await oprot.WriteFieldBeginAsync(tmp38, cancellationToken); + await oprot.WriteStringAsync(Interflow, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Tls != null) && __isset.tls) + { + tmp38.Name = "tls"; + tmp38.Type = TType.String; + tmp38.ID = 7; + await oprot.WriteFieldBeginAsync(tmp38, cancellationToken); + await oprot.WriteStringAsync(Tls, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is TimParam other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.timestamp == other.__isset.timestamp) && ((!__isset.timestamp) || (global::System.Object.Equals(Timestamp, other.Timestamp)))) + && ((__isset.version == other.__isset.version) && ((!__isset.version) || (global::System.Object.Equals(Version, other.Version)))) + && ((__isset.lang == other.__isset.lang) && ((!__isset.lang) || (global::System.Object.Equals(Lang, other.Lang)))) + && ((__isset.extraList == other.__isset.extraList) && ((!__isset.extraList) || (TCollections.Equals(ExtraList, other.ExtraList)))) + && ((__isset.extraMap == other.__isset.extraMap) && ((!__isset.extraMap) || (TCollections.Equals(ExtraMap, other.ExtraMap)))) + && ((__isset.interflow == other.__isset.interflow) && ((!__isset.interflow) || (global::System.Object.Equals(Interflow, other.Interflow)))) + && ((__isset.tls == other.__isset.tls) && ((!__isset.tls) || (global::System.Object.Equals(Tls, other.Tls)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Timestamp != null) && __isset.timestamp) + { + hashcode = (hashcode * 397) + Timestamp.GetHashCode(); + } + if(__isset.version) + { + hashcode = (hashcode * 397) + Version.GetHashCode(); + } + if((Lang != null) && __isset.lang) + { + hashcode = (hashcode * 397) + Lang.GetHashCode(); + } + if((ExtraList != null) && __isset.extraList) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraList); + } + if((ExtraMap != null) && __isset.extraMap) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraMap); + } + if((Interflow != null) && __isset.interflow) + { + hashcode = (hashcode * 397) + Interflow.GetHashCode(); + } + if((Tls != null) && __isset.tls) + { + hashcode = (hashcode * 397) + Tls.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp41 = new StringBuilder("TimParam("); + int tmp42 = 0; + if((Timestamp != null) && __isset.timestamp) + { + if(0 < tmp42++) { tmp41.Append(", "); } + tmp41.Append("Timestamp: "); + Timestamp.ToString(tmp41); + } + if(__isset.version) + { + if(0 < tmp42++) { tmp41.Append(", "); } + tmp41.Append("Version: "); + Version.ToString(tmp41); + } + if((Lang != null) && __isset.lang) + { + if(0 < tmp42++) { tmp41.Append(", "); } + tmp41.Append("Lang: "); + Lang.ToString(tmp41); + } + if((ExtraList != null) && __isset.extraList) + { + if(0 < tmp42++) { tmp41.Append(", "); } + tmp41.Append("ExtraList: "); + ExtraList.ToString(tmp41); + } + if((ExtraMap != null) && __isset.extraMap) + { + if(0 < tmp42++) { tmp41.Append(", "); } + tmp41.Append("ExtraMap: "); + ExtraMap.ToString(tmp41); + } + if((Interflow != null) && __isset.interflow) + { + if(0 < tmp42++) { tmp41.Append(", "); } + tmp41.Append("Interflow: "); + Interflow.ToString(tmp41); + } + if((Tls != null) && __isset.tls) + { + if(0 < tmp42++) { tmp41.Append(", "); } + tmp41.Append("Tls: "); + Tls.ToString(tmp41); + } + tmp41.Append(')'); + return tmp41.ToString(); + } +} + diff --git a/protocols/gen-netstd/TimPropertyBean.cs b/protocols/gen-netstd/TimPropertyBean.cs new file mode 100644 index 0000000..7933527 --- /dev/null +++ b/protocols/gen-netstd/TimPropertyBean.cs @@ -0,0 +1,281 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class TimPropertyBean : TBase +{ + private string _threadId; + private string _interflow; + private string _tls; + + public string ThreadId + { + get + { + return _threadId; + } + set + { + __isset.threadId = true; + this._threadId = value; + } + } + + /// + /// 消息合流 + /// + public string Interflow + { + get + { + return _interflow; + } + set + { + __isset.interflow = true; + this._interflow = value; + } + } + + /// + /// tls + /// + public string Tls + { + get + { + return _tls; + } + set + { + __isset.tls = true; + this._tls = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool threadId; + public bool interflow; + public bool tls; + } + + public TimPropertyBean() + { + } + + public TimPropertyBean DeepCopy() + { + var tmp287 = new TimPropertyBean(); + if((ThreadId != null) && __isset.threadId) + { + tmp287.ThreadId = this.ThreadId; + } + tmp287.__isset.threadId = this.__isset.threadId; + if((Interflow != null) && __isset.interflow) + { + tmp287.Interflow = this.Interflow; + } + tmp287.__isset.interflow = this.__isset.interflow; + if((Tls != null) && __isset.tls) + { + tmp287.Tls = this.Tls; + } + tmp287.__isset.tls = this.__isset.tls; + return tmp287; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.String) + { + ThreadId = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.String) + { + Interflow = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.String) + { + Tls = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp288 = new TStruct("TimPropertyBean"); + await oprot.WriteStructBeginAsync(tmp288, cancellationToken); + var tmp289 = new TField(); + if((ThreadId != null) && __isset.threadId) + { + tmp289.Name = "threadId"; + tmp289.Type = TType.String; + tmp289.ID = 1; + await oprot.WriteFieldBeginAsync(tmp289, cancellationToken); + await oprot.WriteStringAsync(ThreadId, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Interflow != null) && __isset.interflow) + { + tmp289.Name = "interflow"; + tmp289.Type = TType.String; + tmp289.ID = 2; + await oprot.WriteFieldBeginAsync(tmp289, cancellationToken); + await oprot.WriteStringAsync(Interflow, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Tls != null) && __isset.tls) + { + tmp289.Name = "tls"; + tmp289.Type = TType.String; + tmp289.ID = 3; + await oprot.WriteFieldBeginAsync(tmp289, cancellationToken); + await oprot.WriteStringAsync(Tls, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is TimPropertyBean other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.threadId == other.__isset.threadId) && ((!__isset.threadId) || (global::System.Object.Equals(ThreadId, other.ThreadId)))) + && ((__isset.interflow == other.__isset.interflow) && ((!__isset.interflow) || (global::System.Object.Equals(Interflow, other.Interflow)))) + && ((__isset.tls == other.__isset.tls) && ((!__isset.tls) || (global::System.Object.Equals(Tls, other.Tls)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((ThreadId != null) && __isset.threadId) + { + hashcode = (hashcode * 397) + ThreadId.GetHashCode(); + } + if((Interflow != null) && __isset.interflow) + { + hashcode = (hashcode * 397) + Interflow.GetHashCode(); + } + if((Tls != null) && __isset.tls) + { + hashcode = (hashcode * 397) + Tls.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp290 = new StringBuilder("TimPropertyBean("); + int tmp291 = 0; + if((ThreadId != null) && __isset.threadId) + { + if(0 < tmp291++) { tmp290.Append(", "); } + tmp290.Append("ThreadId: "); + ThreadId.ToString(tmp290); + } + if((Interflow != null) && __isset.interflow) + { + if(0 < tmp291++) { tmp290.Append(", "); } + tmp290.Append("Interflow: "); + Interflow.ToString(tmp290); + } + if((Tls != null) && __isset.tls) + { + if(0 < tmp291++) { tmp290.Append(", "); } + tmp290.Append("Tls: "); + Tls.ToString(tmp290); + } + tmp290.Append(')'); + return tmp290.ToString(); + } +} + diff --git a/protocols/gen-netstd/TimRemoteRoom.cs b/protocols/gen-netstd/TimRemoteRoom.cs new file mode 100644 index 0000000..69f7a02 --- /dev/null +++ b/protocols/gen-netstd/TimRemoteRoom.cs @@ -0,0 +1,301 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class TimRemoteRoom : TBase +{ + private TimError _error; + private TimRoom _room; + private Dictionary _extraMap; + + /// + /// 错误码 + /// + public TimError Error + { + get + { + return _error; + } + set + { + __isset.error = true; + this._error = value; + } + } + + /// + /// 远程房间信息 + /// + public TimRoom Room + { + get + { + return _room; + } + set + { + __isset.room = true; + this._room = value; + } + } + + public Dictionary ExtraMap + { + get + { + return _extraMap; + } + set + { + __isset.extraMap = true; + this._extraMap = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool error; + public bool room; + public bool extraMap; + } + + public TimRemoteRoom() + { + } + + public TimRemoteRoom DeepCopy() + { + var tmp178 = new TimRemoteRoom(); + if((Error != null) && __isset.error) + { + tmp178.Error = (TimError)this.Error.DeepCopy(); + } + tmp178.__isset.error = this.__isset.error; + if((Room != null) && __isset.room) + { + tmp178.Room = (TimRoom)this.Room.DeepCopy(); + } + tmp178.__isset.room = this.__isset.room; + if((ExtraMap != null) && __isset.extraMap) + { + tmp178.ExtraMap = this.ExtraMap.DeepCopy(); + } + tmp178.__isset.extraMap = this.__isset.extraMap; + return tmp178; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + Error = new TimError(); + await Error.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.Struct) + { + Room = new TimRoom(); + await Room.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.Map) + { + { + var _map179 = await iprot.ReadMapBeginAsync(cancellationToken); + ExtraMap = new Dictionary(_map179.Count); + for(int _i180 = 0; _i180 < _map179.Count; ++_i180) + { + string _key181; + string _val182; + _key181 = await iprot.ReadStringAsync(cancellationToken); + _val182 = await iprot.ReadStringAsync(cancellationToken); + ExtraMap[_key181] = _val182; + } + await iprot.ReadMapEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp183 = new TStruct("TimRemoteRoom"); + await oprot.WriteStructBeginAsync(tmp183, cancellationToken); + var tmp184 = new TField(); + if((Error != null) && __isset.error) + { + tmp184.Name = "error"; + tmp184.Type = TType.Struct; + tmp184.ID = 1; + await oprot.WriteFieldBeginAsync(tmp184, cancellationToken); + await Error.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Room != null) && __isset.room) + { + tmp184.Name = "room"; + tmp184.Type = TType.Struct; + tmp184.ID = 2; + await oprot.WriteFieldBeginAsync(tmp184, cancellationToken); + await Room.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp184.Name = "extraMap"; + tmp184.Type = TType.Map; + tmp184.ID = 3; + await oprot.WriteFieldBeginAsync(tmp184, cancellationToken); + await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.String, ExtraMap.Count), cancellationToken); + foreach (string _iter185 in ExtraMap.Keys) + { + await oprot.WriteStringAsync(_iter185, cancellationToken); + await oprot.WriteStringAsync(ExtraMap[_iter185], cancellationToken); + } + await oprot.WriteMapEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is TimRemoteRoom other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.error == other.__isset.error) && ((!__isset.error) || (global::System.Object.Equals(Error, other.Error)))) + && ((__isset.room == other.__isset.room) && ((!__isset.room) || (global::System.Object.Equals(Room, other.Room)))) + && ((__isset.extraMap == other.__isset.extraMap) && ((!__isset.extraMap) || (TCollections.Equals(ExtraMap, other.ExtraMap)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Error != null) && __isset.error) + { + hashcode = (hashcode * 397) + Error.GetHashCode(); + } + if((Room != null) && __isset.room) + { + hashcode = (hashcode * 397) + Room.GetHashCode(); + } + if((ExtraMap != null) && __isset.extraMap) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraMap); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp186 = new StringBuilder("TimRemoteRoom("); + int tmp187 = 0; + if((Error != null) && __isset.error) + { + if(0 < tmp187++) { tmp186.Append(", "); } + tmp186.Append("Error: "); + Error.ToString(tmp186); + } + if((Room != null) && __isset.room) + { + if(0 < tmp187++) { tmp186.Append(", "); } + tmp186.Append("Room: "); + Room.ToString(tmp186); + } + if((ExtraMap != null) && __isset.extraMap) + { + if(0 < tmp187++) { tmp186.Append(", "); } + tmp186.Append("ExtraMap: "); + ExtraMap.ToString(tmp186); + } + tmp186.Append(')'); + return tmp186.ToString(); + } +} + diff --git a/protocols/gen-netstd/TimRemoteUserBean.cs b/protocols/gen-netstd/TimRemoteUserBean.cs new file mode 100644 index 0000000..778ad4f --- /dev/null +++ b/protocols/gen-netstd/TimRemoteUserBean.cs @@ -0,0 +1,301 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class TimRemoteUserBean : TBase +{ + private TimError _error; + private TimUserBean _ub; + private Dictionary _extraMap; + + /// + /// 错误码 + /// + public TimError Error + { + get + { + return _error; + } + set + { + __isset.error = true; + this._error = value; + } + } + + /// + /// 远程用户信息 + /// + public TimUserBean Ub + { + get + { + return _ub; + } + set + { + __isset.ub = true; + this._ub = value; + } + } + + public Dictionary ExtraMap + { + get + { + return _extraMap; + } + set + { + __isset.extraMap = true; + this._extraMap = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool error; + public bool ub; + public bool extraMap; + } + + public TimRemoteUserBean() + { + } + + public TimRemoteUserBean DeepCopy() + { + var tmp168 = new TimRemoteUserBean(); + if((Error != null) && __isset.error) + { + tmp168.Error = (TimError)this.Error.DeepCopy(); + } + tmp168.__isset.error = this.__isset.error; + if((Ub != null) && __isset.ub) + { + tmp168.Ub = (TimUserBean)this.Ub.DeepCopy(); + } + tmp168.__isset.ub = this.__isset.ub; + if((ExtraMap != null) && __isset.extraMap) + { + tmp168.ExtraMap = this.ExtraMap.DeepCopy(); + } + tmp168.__isset.extraMap = this.__isset.extraMap; + return tmp168; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + Error = new TimError(); + await Error.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.Struct) + { + Ub = new TimUserBean(); + await Ub.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.Map) + { + { + var _map169 = await iprot.ReadMapBeginAsync(cancellationToken); + ExtraMap = new Dictionary(_map169.Count); + for(int _i170 = 0; _i170 < _map169.Count; ++_i170) + { + string _key171; + string _val172; + _key171 = await iprot.ReadStringAsync(cancellationToken); + _val172 = await iprot.ReadStringAsync(cancellationToken); + ExtraMap[_key171] = _val172; + } + await iprot.ReadMapEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp173 = new TStruct("TimRemoteUserBean"); + await oprot.WriteStructBeginAsync(tmp173, cancellationToken); + var tmp174 = new TField(); + if((Error != null) && __isset.error) + { + tmp174.Name = "error"; + tmp174.Type = TType.Struct; + tmp174.ID = 1; + await oprot.WriteFieldBeginAsync(tmp174, cancellationToken); + await Error.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Ub != null) && __isset.ub) + { + tmp174.Name = "ub"; + tmp174.Type = TType.Struct; + tmp174.ID = 2; + await oprot.WriteFieldBeginAsync(tmp174, cancellationToken); + await Ub.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp174.Name = "extraMap"; + tmp174.Type = TType.Map; + tmp174.ID = 3; + await oprot.WriteFieldBeginAsync(tmp174, cancellationToken); + await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.String, ExtraMap.Count), cancellationToken); + foreach (string _iter175 in ExtraMap.Keys) + { + await oprot.WriteStringAsync(_iter175, cancellationToken); + await oprot.WriteStringAsync(ExtraMap[_iter175], cancellationToken); + } + await oprot.WriteMapEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is TimRemoteUserBean other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.error == other.__isset.error) && ((!__isset.error) || (global::System.Object.Equals(Error, other.Error)))) + && ((__isset.ub == other.__isset.ub) && ((!__isset.ub) || (global::System.Object.Equals(Ub, other.Ub)))) + && ((__isset.extraMap == other.__isset.extraMap) && ((!__isset.extraMap) || (TCollections.Equals(ExtraMap, other.ExtraMap)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Error != null) && __isset.error) + { + hashcode = (hashcode * 397) + Error.GetHashCode(); + } + if((Ub != null) && __isset.ub) + { + hashcode = (hashcode * 397) + Ub.GetHashCode(); + } + if((ExtraMap != null) && __isset.extraMap) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraMap); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp176 = new StringBuilder("TimRemoteUserBean("); + int tmp177 = 0; + if((Error != null) && __isset.error) + { + if(0 < tmp177++) { tmp176.Append(", "); } + tmp176.Append("Error: "); + Error.ToString(tmp176); + } + if((Ub != null) && __isset.ub) + { + if(0 < tmp177++) { tmp176.Append(", "); } + tmp176.Append("Ub: "); + Ub.ToString(tmp176); + } + if((ExtraMap != null) && __isset.extraMap) + { + if(0 < tmp177++) { tmp176.Append(", "); } + tmp176.Append("ExtraMap: "); + ExtraMap.ToString(tmp176); + } + tmp176.Append(')'); + return tmp176.ToString(); + } +} + diff --git a/protocols/gen-netstd/TimResponseBean.cs b/protocols/gen-netstd/TimResponseBean.cs new file mode 100644 index 0000000..5b2279d --- /dev/null +++ b/protocols/gen-netstd/TimResponseBean.cs @@ -0,0 +1,366 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class TimResponseBean : TBase +{ + private string _threadId; + private TimError _error; + private List _extraList; + private Dictionary _extraMap; + + public string ThreadId + { + get + { + return _threadId; + } + set + { + __isset.threadId = true; + this._threadId = value; + } + } + + /// + /// 错误码 + /// + public TimError Error + { + get + { + return _error; + } + set + { + __isset.error = true; + this._error = value; + } + } + + /// + /// 附加信息 + /// + public List ExtraList + { + get + { + return _extraList; + } + set + { + __isset.extraList = true; + this._extraList = value; + } + } + + public Dictionary ExtraMap + { + get + { + return _extraMap; + } + set + { + __isset.extraMap = true; + this._extraMap = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool threadId; + public bool error; + public bool extraList; + public bool extraMap; + } + + public TimResponseBean() + { + } + + public TimResponseBean DeepCopy() + { + var tmp188 = new TimResponseBean(); + if((ThreadId != null) && __isset.threadId) + { + tmp188.ThreadId = this.ThreadId; + } + tmp188.__isset.threadId = this.__isset.threadId; + if((Error != null) && __isset.error) + { + tmp188.Error = (TimError)this.Error.DeepCopy(); + } + tmp188.__isset.error = this.__isset.error; + if((ExtraList != null) && __isset.extraList) + { + tmp188.ExtraList = this.ExtraList.DeepCopy(); + } + tmp188.__isset.extraList = this.__isset.extraList; + if((ExtraMap != null) && __isset.extraMap) + { + tmp188.ExtraMap = this.ExtraMap.DeepCopy(); + } + tmp188.__isset.extraMap = this.__isset.extraMap; + return tmp188; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.String) + { + ThreadId = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.Struct) + { + Error = new TimError(); + await Error.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.List) + { + { + var _list189 = await iprot.ReadListBeginAsync(cancellationToken); + ExtraList = new List(_list189.Count); + for(int _i190 = 0; _i190 < _list189.Count; ++_i190) + { + TimNode _elem191; + _elem191 = new TimNode(); + await _elem191.ReadAsync(iprot, cancellationToken); + ExtraList.Add(_elem191); + } + await iprot.ReadListEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 4: + if (field.Type == TType.Map) + { + { + var _map192 = await iprot.ReadMapBeginAsync(cancellationToken); + ExtraMap = new Dictionary(_map192.Count); + for(int _i193 = 0; _i193 < _map192.Count; ++_i193) + { + string _key194; + string _val195; + _key194 = await iprot.ReadStringAsync(cancellationToken); + _val195 = await iprot.ReadStringAsync(cancellationToken); + ExtraMap[_key194] = _val195; + } + await iprot.ReadMapEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp196 = new TStruct("TimResponseBean"); + await oprot.WriteStructBeginAsync(tmp196, cancellationToken); + var tmp197 = new TField(); + if((ThreadId != null) && __isset.threadId) + { + tmp197.Name = "threadId"; + tmp197.Type = TType.String; + tmp197.ID = 1; + await oprot.WriteFieldBeginAsync(tmp197, cancellationToken); + await oprot.WriteStringAsync(ThreadId, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Error != null) && __isset.error) + { + tmp197.Name = "error"; + tmp197.Type = TType.Struct; + tmp197.ID = 2; + await oprot.WriteFieldBeginAsync(tmp197, cancellationToken); + await Error.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraList != null) && __isset.extraList) + { + tmp197.Name = "extraList"; + tmp197.Type = TType.List; + tmp197.ID = 3; + await oprot.WriteFieldBeginAsync(tmp197, cancellationToken); + await oprot.WriteListBeginAsync(new TList(TType.Struct, ExtraList.Count), cancellationToken); + foreach (TimNode _iter198 in ExtraList) + { + await _iter198.WriteAsync(oprot, cancellationToken); + } + await oprot.WriteListEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp197.Name = "extraMap"; + tmp197.Type = TType.Map; + tmp197.ID = 4; + await oprot.WriteFieldBeginAsync(tmp197, cancellationToken); + await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.String, ExtraMap.Count), cancellationToken); + foreach (string _iter199 in ExtraMap.Keys) + { + await oprot.WriteStringAsync(_iter199, cancellationToken); + await oprot.WriteStringAsync(ExtraMap[_iter199], cancellationToken); + } + await oprot.WriteMapEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is TimResponseBean other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.threadId == other.__isset.threadId) && ((!__isset.threadId) || (global::System.Object.Equals(ThreadId, other.ThreadId)))) + && ((__isset.error == other.__isset.error) && ((!__isset.error) || (global::System.Object.Equals(Error, other.Error)))) + && ((__isset.extraList == other.__isset.extraList) && ((!__isset.extraList) || (TCollections.Equals(ExtraList, other.ExtraList)))) + && ((__isset.extraMap == other.__isset.extraMap) && ((!__isset.extraMap) || (TCollections.Equals(ExtraMap, other.ExtraMap)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((ThreadId != null) && __isset.threadId) + { + hashcode = (hashcode * 397) + ThreadId.GetHashCode(); + } + if((Error != null) && __isset.error) + { + hashcode = (hashcode * 397) + Error.GetHashCode(); + } + if((ExtraList != null) && __isset.extraList) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraList); + } + if((ExtraMap != null) && __isset.extraMap) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraMap); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp200 = new StringBuilder("TimResponseBean("); + int tmp201 = 0; + if((ThreadId != null) && __isset.threadId) + { + if(0 < tmp201++) { tmp200.Append(", "); } + tmp200.Append("ThreadId: "); + ThreadId.ToString(tmp200); + } + if((Error != null) && __isset.error) + { + if(0 < tmp201++) { tmp200.Append(", "); } + tmp200.Append("Error: "); + Error.ToString(tmp200); + } + if((ExtraList != null) && __isset.extraList) + { + if(0 < tmp201++) { tmp200.Append(", "); } + tmp200.Append("ExtraList: "); + ExtraList.ToString(tmp200); + } + if((ExtraMap != null) && __isset.extraMap) + { + if(0 < tmp201++) { tmp200.Append(", "); } + tmp200.Append("ExtraMap: "); + ExtraMap.ToString(tmp200); + } + tmp200.Append(')'); + return tmp200.ToString(); + } +} + diff --git a/protocols/gen-netstd/TimRoom.cs b/protocols/gen-netstd/TimRoom.cs new file mode 100644 index 0000000..cc5713f --- /dev/null +++ b/protocols/gen-netstd/TimRoom.cs @@ -0,0 +1,721 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class TimRoom : TBase +{ + private Tid _tid; + private Tid _founderTid; + private List _HostsTid; + private List _membersTid; + private string _headurl; + private string _roomName; + private string _desc; + private TimTime _createTime; + private List _extraList; + private Dictionary _extraMap; + + /// + /// 房间Tid + /// + public Tid Tid + { + get + { + return _tid; + } + set + { + __isset.tid = true; + this._tid = value; + } + } + + /// + /// 创建人Tid + /// + public Tid FounderTid + { + get + { + return _founderTid; + } + set + { + __isset.founderTid = true; + this._founderTid = value; + } + } + + /// + /// 主持人Tid + /// + public List HostsTid + { + get + { + return _HostsTid; + } + set + { + __isset.HostsTid = true; + this._HostsTid = value; + } + } + + /// + /// memberTid + /// + public List MembersTid + { + get + { + return _membersTid; + } + set + { + __isset.membersTid = true; + this._membersTid = value; + } + } + + /// + /// 头像地址 http://xxx.jpg + /// + public string Headurl + { + get + { + return _headurl; + } + set + { + __isset.headurl = true; + this._headurl = value; + } + } + + /// + /// 房间名称 + /// + public string RoomName + { + get + { + return _roomName; + } + set + { + __isset.roomName = true; + this._roomName = value; + } + } + + /// + /// 房间说明 + /// + public string Desc + { + get + { + return _desc; + } + set + { + __isset.desc = true; + this._desc = value; + } + } + + /// + /// 房间创建时间 + /// + public TimTime CreateTime + { + get + { + return _createTime; + } + set + { + __isset.createTime = true; + this._createTime = value; + } + } + + /// + /// 扩展字段 + /// + public List ExtraList + { + get + { + return _extraList; + } + set + { + __isset.extraList = true; + this._extraList = value; + } + } + + public Dictionary ExtraMap + { + get + { + return _extraMap; + } + set + { + __isset.extraMap = true; + this._extraMap = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool tid; + public bool founderTid; + public bool HostsTid; + public bool membersTid; + public bool headurl; + public bool roomName; + public bool desc; + public bool createTime; + public bool extraList; + public bool extraMap; + } + + public TimRoom() + { + } + + public TimRoom DeepCopy() + { + var tmp94 = new TimRoom(); + if((Tid != null) && __isset.tid) + { + tmp94.Tid = (Tid)this.Tid.DeepCopy(); + } + tmp94.__isset.tid = this.__isset.tid; + if((FounderTid != null) && __isset.founderTid) + { + tmp94.FounderTid = (Tid)this.FounderTid.DeepCopy(); + } + tmp94.__isset.founderTid = this.__isset.founderTid; + if((HostsTid != null) && __isset.HostsTid) + { + tmp94.HostsTid = this.HostsTid.DeepCopy(); + } + tmp94.__isset.HostsTid = this.__isset.HostsTid; + if((MembersTid != null) && __isset.membersTid) + { + tmp94.MembersTid = this.MembersTid.DeepCopy(); + } + tmp94.__isset.membersTid = this.__isset.membersTid; + if((Headurl != null) && __isset.headurl) + { + tmp94.Headurl = this.Headurl; + } + tmp94.__isset.headurl = this.__isset.headurl; + if((RoomName != null) && __isset.roomName) + { + tmp94.RoomName = this.RoomName; + } + tmp94.__isset.roomName = this.__isset.roomName; + if((Desc != null) && __isset.desc) + { + tmp94.Desc = this.Desc; + } + tmp94.__isset.desc = this.__isset.desc; + if((CreateTime != null) && __isset.createTime) + { + tmp94.CreateTime = (TimTime)this.CreateTime.DeepCopy(); + } + tmp94.__isset.createTime = this.__isset.createTime; + if((ExtraList != null) && __isset.extraList) + { + tmp94.ExtraList = this.ExtraList.DeepCopy(); + } + tmp94.__isset.extraList = this.__isset.extraList; + if((ExtraMap != null) && __isset.extraMap) + { + tmp94.ExtraMap = this.ExtraMap.DeepCopy(); + } + tmp94.__isset.extraMap = this.__isset.extraMap; + return tmp94; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + Tid = new Tid(); + await Tid.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.Struct) + { + FounderTid = new Tid(); + await FounderTid.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.List) + { + { + var _list95 = await iprot.ReadListBeginAsync(cancellationToken); + HostsTid = new List(_list95.Count); + for(int _i96 = 0; _i96 < _list95.Count; ++_i96) + { + Tid _elem97; + _elem97 = new Tid(); + await _elem97.ReadAsync(iprot, cancellationToken); + HostsTid.Add(_elem97); + } + await iprot.ReadListEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 4: + if (field.Type == TType.List) + { + { + var _list98 = await iprot.ReadListBeginAsync(cancellationToken); + MembersTid = new List(_list98.Count); + for(int _i99 = 0; _i99 < _list98.Count; ++_i99) + { + Tid _elem100; + _elem100 = new Tid(); + await _elem100.ReadAsync(iprot, cancellationToken); + MembersTid.Add(_elem100); + } + await iprot.ReadListEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 5: + if (field.Type == TType.String) + { + Headurl = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 6: + if (field.Type == TType.String) + { + RoomName = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 7: + if (field.Type == TType.String) + { + Desc = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 8: + if (field.Type == TType.Struct) + { + CreateTime = new TimTime(); + await CreateTime.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 9: + if (field.Type == TType.List) + { + { + var _list101 = await iprot.ReadListBeginAsync(cancellationToken); + ExtraList = new List(_list101.Count); + for(int _i102 = 0; _i102 < _list101.Count; ++_i102) + { + TimNode _elem103; + _elem103 = new TimNode(); + await _elem103.ReadAsync(iprot, cancellationToken); + ExtraList.Add(_elem103); + } + await iprot.ReadListEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 10: + if (field.Type == TType.Map) + { + { + var _map104 = await iprot.ReadMapBeginAsync(cancellationToken); + ExtraMap = new Dictionary(_map104.Count); + for(int _i105 = 0; _i105 < _map104.Count; ++_i105) + { + string _key106; + string _val107; + _key106 = await iprot.ReadStringAsync(cancellationToken); + _val107 = await iprot.ReadStringAsync(cancellationToken); + ExtraMap[_key106] = _val107; + } + await iprot.ReadMapEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp108 = new TStruct("TimRoom"); + await oprot.WriteStructBeginAsync(tmp108, cancellationToken); + var tmp109 = new TField(); + if((Tid != null) && __isset.tid) + { + tmp109.Name = "tid"; + tmp109.Type = TType.Struct; + tmp109.ID = 1; + await oprot.WriteFieldBeginAsync(tmp109, cancellationToken); + await Tid.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((FounderTid != null) && __isset.founderTid) + { + tmp109.Name = "founderTid"; + tmp109.Type = TType.Struct; + tmp109.ID = 2; + await oprot.WriteFieldBeginAsync(tmp109, cancellationToken); + await FounderTid.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((HostsTid != null) && __isset.HostsTid) + { + tmp109.Name = "HostsTid"; + tmp109.Type = TType.List; + tmp109.ID = 3; + await oprot.WriteFieldBeginAsync(tmp109, cancellationToken); + await oprot.WriteListBeginAsync(new TList(TType.Struct, HostsTid.Count), cancellationToken); + foreach (Tid _iter110 in HostsTid) + { + await _iter110.WriteAsync(oprot, cancellationToken); + } + await oprot.WriteListEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((MembersTid != null) && __isset.membersTid) + { + tmp109.Name = "membersTid"; + tmp109.Type = TType.List; + tmp109.ID = 4; + await oprot.WriteFieldBeginAsync(tmp109, cancellationToken); + await oprot.WriteListBeginAsync(new TList(TType.Struct, MembersTid.Count), cancellationToken); + foreach (Tid _iter111 in MembersTid) + { + await _iter111.WriteAsync(oprot, cancellationToken); + } + await oprot.WriteListEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Headurl != null) && __isset.headurl) + { + tmp109.Name = "headurl"; + tmp109.Type = TType.String; + tmp109.ID = 5; + await oprot.WriteFieldBeginAsync(tmp109, cancellationToken); + await oprot.WriteStringAsync(Headurl, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((RoomName != null) && __isset.roomName) + { + tmp109.Name = "roomName"; + tmp109.Type = TType.String; + tmp109.ID = 6; + await oprot.WriteFieldBeginAsync(tmp109, cancellationToken); + await oprot.WriteStringAsync(RoomName, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Desc != null) && __isset.desc) + { + tmp109.Name = "desc"; + tmp109.Type = TType.String; + tmp109.ID = 7; + await oprot.WriteFieldBeginAsync(tmp109, cancellationToken); + await oprot.WriteStringAsync(Desc, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((CreateTime != null) && __isset.createTime) + { + tmp109.Name = "createTime"; + tmp109.Type = TType.Struct; + tmp109.ID = 8; + await oprot.WriteFieldBeginAsync(tmp109, cancellationToken); + await CreateTime.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraList != null) && __isset.extraList) + { + tmp109.Name = "extraList"; + tmp109.Type = TType.List; + tmp109.ID = 9; + await oprot.WriteFieldBeginAsync(tmp109, cancellationToken); + await oprot.WriteListBeginAsync(new TList(TType.Struct, ExtraList.Count), cancellationToken); + foreach (TimNode _iter112 in ExtraList) + { + await _iter112.WriteAsync(oprot, cancellationToken); + } + await oprot.WriteListEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp109.Name = "extraMap"; + tmp109.Type = TType.Map; + tmp109.ID = 10; + await oprot.WriteFieldBeginAsync(tmp109, cancellationToken); + await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.String, ExtraMap.Count), cancellationToken); + foreach (string _iter113 in ExtraMap.Keys) + { + await oprot.WriteStringAsync(_iter113, cancellationToken); + await oprot.WriteStringAsync(ExtraMap[_iter113], cancellationToken); + } + await oprot.WriteMapEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is TimRoom other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.tid == other.__isset.tid) && ((!__isset.tid) || (global::System.Object.Equals(Tid, other.Tid)))) + && ((__isset.founderTid == other.__isset.founderTid) && ((!__isset.founderTid) || (global::System.Object.Equals(FounderTid, other.FounderTid)))) + && ((__isset.HostsTid == other.__isset.HostsTid) && ((!__isset.HostsTid) || (TCollections.Equals(HostsTid, other.HostsTid)))) + && ((__isset.membersTid == other.__isset.membersTid) && ((!__isset.membersTid) || (TCollections.Equals(MembersTid, other.MembersTid)))) + && ((__isset.headurl == other.__isset.headurl) && ((!__isset.headurl) || (global::System.Object.Equals(Headurl, other.Headurl)))) + && ((__isset.roomName == other.__isset.roomName) && ((!__isset.roomName) || (global::System.Object.Equals(RoomName, other.RoomName)))) + && ((__isset.desc == other.__isset.desc) && ((!__isset.desc) || (global::System.Object.Equals(Desc, other.Desc)))) + && ((__isset.createTime == other.__isset.createTime) && ((!__isset.createTime) || (global::System.Object.Equals(CreateTime, other.CreateTime)))) + && ((__isset.extraList == other.__isset.extraList) && ((!__isset.extraList) || (TCollections.Equals(ExtraList, other.ExtraList)))) + && ((__isset.extraMap == other.__isset.extraMap) && ((!__isset.extraMap) || (TCollections.Equals(ExtraMap, other.ExtraMap)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Tid != null) && __isset.tid) + { + hashcode = (hashcode * 397) + Tid.GetHashCode(); + } + if((FounderTid != null) && __isset.founderTid) + { + hashcode = (hashcode * 397) + FounderTid.GetHashCode(); + } + if((HostsTid != null) && __isset.HostsTid) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(HostsTid); + } + if((MembersTid != null) && __isset.membersTid) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(MembersTid); + } + if((Headurl != null) && __isset.headurl) + { + hashcode = (hashcode * 397) + Headurl.GetHashCode(); + } + if((RoomName != null) && __isset.roomName) + { + hashcode = (hashcode * 397) + RoomName.GetHashCode(); + } + if((Desc != null) && __isset.desc) + { + hashcode = (hashcode * 397) + Desc.GetHashCode(); + } + if((CreateTime != null) && __isset.createTime) + { + hashcode = (hashcode * 397) + CreateTime.GetHashCode(); + } + if((ExtraList != null) && __isset.extraList) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraList); + } + if((ExtraMap != null) && __isset.extraMap) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraMap); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp114 = new StringBuilder("TimRoom("); + int tmp115 = 0; + if((Tid != null) && __isset.tid) + { + if(0 < tmp115++) { tmp114.Append(", "); } + tmp114.Append("Tid: "); + Tid.ToString(tmp114); + } + if((FounderTid != null) && __isset.founderTid) + { + if(0 < tmp115++) { tmp114.Append(", "); } + tmp114.Append("FounderTid: "); + FounderTid.ToString(tmp114); + } + if((HostsTid != null) && __isset.HostsTid) + { + if(0 < tmp115++) { tmp114.Append(", "); } + tmp114.Append("HostsTid: "); + HostsTid.ToString(tmp114); + } + if((MembersTid != null) && __isset.membersTid) + { + if(0 < tmp115++) { tmp114.Append(", "); } + tmp114.Append("MembersTid: "); + MembersTid.ToString(tmp114); + } + if((Headurl != null) && __isset.headurl) + { + if(0 < tmp115++) { tmp114.Append(", "); } + tmp114.Append("Headurl: "); + Headurl.ToString(tmp114); + } + if((RoomName != null) && __isset.roomName) + { + if(0 < tmp115++) { tmp114.Append(", "); } + tmp114.Append("RoomName: "); + RoomName.ToString(tmp114); + } + if((Desc != null) && __isset.desc) + { + if(0 < tmp115++) { tmp114.Append(", "); } + tmp114.Append("Desc: "); + Desc.ToString(tmp114); + } + if((CreateTime != null) && __isset.createTime) + { + if(0 < tmp115++) { tmp114.Append(", "); } + tmp114.Append("CreateTime: "); + CreateTime.ToString(tmp114); + } + if((ExtraList != null) && __isset.extraList) + { + if(0 < tmp115++) { tmp114.Append(", "); } + tmp114.Append("ExtraList: "); + ExtraList.ToString(tmp114); + } + if((ExtraMap != null) && __isset.extraMap) + { + if(0 < tmp115++) { tmp114.Append(", "); } + tmp114.Append("ExtraMap: "); + ExtraMap.ToString(tmp114); + } + tmp114.Append(')'); + return tmp114.ToString(); + } +} + diff --git a/protocols/gen-netstd/TimRoster.cs b/protocols/gen-netstd/TimRoster.cs new file mode 100644 index 0000000..fc97c65 --- /dev/null +++ b/protocols/gen-netstd/TimRoster.cs @@ -0,0 +1,338 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class TimRoster : TBase +{ + private string _name; + private Dictionary _extraMap; + + /// + /// none表示用户和contact之前没有任何的关系(虽然在server的buddy list中存在) + /// to表示用户能看到contact的presence,但是contact看不到用户的Presence + /// from和to的含义相反,指用户看不到contact的presence,但是contact可以看到 + /// both表示相关之间都能看到对方的presence + /// + public string Subscription { get; set; } + + public Tid Tid { get; set; } + + /// + /// 用户名 + /// + public string Name + { + get + { + return _name; + } + set + { + __isset.name = true; + this._name = value; + } + } + + public Dictionary ExtraMap + { + get + { + return _extraMap; + } + set + { + __isset.extraMap = true; + this._extraMap = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool name; + public bool extraMap; + } + + public TimRoster() + { + } + + public TimRoster(string subscription, Tid tid) : this() + { + this.Subscription = subscription; + this.Tid = tid; + } + + public TimRoster DeepCopy() + { + var tmp158 = new TimRoster(); + if((Subscription != null)) + { + tmp158.Subscription = this.Subscription; + } + if((Tid != null)) + { + tmp158.Tid = (Tid)this.Tid.DeepCopy(); + } + if((Name != null) && __isset.name) + { + tmp158.Name = this.Name; + } + tmp158.__isset.name = this.__isset.name; + if((ExtraMap != null) && __isset.extraMap) + { + tmp158.ExtraMap = this.ExtraMap.DeepCopy(); + } + tmp158.__isset.extraMap = this.__isset.extraMap; + return tmp158; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + bool isset_subscription = false; + bool isset_tid = false; + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.String) + { + Subscription = await iprot.ReadStringAsync(cancellationToken); + isset_subscription = true; + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.Struct) + { + Tid = new Tid(); + await Tid.ReadAsync(iprot, cancellationToken); + isset_tid = true; + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.String) + { + Name = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 4: + if (field.Type == TType.Map) + { + { + var _map159 = await iprot.ReadMapBeginAsync(cancellationToken); + ExtraMap = new Dictionary(_map159.Count); + for(int _i160 = 0; _i160 < _map159.Count; ++_i160) + { + string _key161; + string _val162; + _key161 = await iprot.ReadStringAsync(cancellationToken); + _val162 = await iprot.ReadStringAsync(cancellationToken); + ExtraMap[_key161] = _val162; + } + await iprot.ReadMapEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + if (!isset_subscription) + { + throw new TProtocolException(TProtocolException.INVALID_DATA); + } + if (!isset_tid) + { + throw new TProtocolException(TProtocolException.INVALID_DATA); + } + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp163 = new TStruct("TimRoster"); + await oprot.WriteStructBeginAsync(tmp163, cancellationToken); + var tmp164 = new TField(); + if((Subscription != null)) + { + tmp164.Name = "subscription"; + tmp164.Type = TType.String; + tmp164.ID = 1; + await oprot.WriteFieldBeginAsync(tmp164, cancellationToken); + await oprot.WriteStringAsync(Subscription, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Tid != null)) + { + tmp164.Name = "tid"; + tmp164.Type = TType.Struct; + tmp164.ID = 2; + await oprot.WriteFieldBeginAsync(tmp164, cancellationToken); + await Tid.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Name != null) && __isset.name) + { + tmp164.Name = "name"; + tmp164.Type = TType.String; + tmp164.ID = 3; + await oprot.WriteFieldBeginAsync(tmp164, cancellationToken); + await oprot.WriteStringAsync(Name, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp164.Name = "extraMap"; + tmp164.Type = TType.Map; + tmp164.ID = 4; + await oprot.WriteFieldBeginAsync(tmp164, cancellationToken); + await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.String, ExtraMap.Count), cancellationToken); + foreach (string _iter165 in ExtraMap.Keys) + { + await oprot.WriteStringAsync(_iter165, cancellationToken); + await oprot.WriteStringAsync(ExtraMap[_iter165], cancellationToken); + } + await oprot.WriteMapEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is TimRoster other)) return false; + if (ReferenceEquals(this, other)) return true; + return global::System.Object.Equals(Subscription, other.Subscription) + && global::System.Object.Equals(Tid, other.Tid) + && ((__isset.name == other.__isset.name) && ((!__isset.name) || (global::System.Object.Equals(Name, other.Name)))) + && ((__isset.extraMap == other.__isset.extraMap) && ((!__isset.extraMap) || (TCollections.Equals(ExtraMap, other.ExtraMap)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Subscription != null)) + { + hashcode = (hashcode * 397) + Subscription.GetHashCode(); + } + if((Tid != null)) + { + hashcode = (hashcode * 397) + Tid.GetHashCode(); + } + if((Name != null) && __isset.name) + { + hashcode = (hashcode * 397) + Name.GetHashCode(); + } + if((ExtraMap != null) && __isset.extraMap) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraMap); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp166 = new StringBuilder("TimRoster("); + if((Subscription != null)) + { + tmp166.Append(", Subscription: "); + Subscription.ToString(tmp166); + } + if((Tid != null)) + { + tmp166.Append(", Tid: "); + Tid.ToString(tmp166); + } + if((Name != null) && __isset.name) + { + tmp166.Append(", Name: "); + Name.ToString(tmp166); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp166.Append(", ExtraMap: "); + ExtraMap.ToString(tmp166); + } + tmp166.Append(')'); + return tmp166.ToString(); + } +} + diff --git a/protocols/gen-netstd/TimSock5Bean.cs b/protocols/gen-netstd/TimSock5Bean.cs new file mode 100644 index 0000000..e677dd5 --- /dev/null +++ b/protocols/gen-netstd/TimSock5Bean.cs @@ -0,0 +1,437 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class TimSock5Bean : TBase +{ + private Dictionary _extraMap; + + public Tid FromTid { get; set; } + + public Tid ToTid { get; set; } + + /// + /// ip地址 + /// + public string Addr { get; set; } + + /// + /// 端口 + /// + public int Port { get; set; } + + /// + /// 传输类型 1:tcp 2:udp + /// + public short Transport { get; set; } + + /// + /// 发布id 通过发布id 可以连接两个发布id相同的用户 + /// + public string PubId { get; set; } + + public Dictionary ExtraMap + { + get + { + return _extraMap; + } + set + { + __isset.extraMap = true; + this._extraMap = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool extraMap; + } + + public TimSock5Bean() + { + } + + public TimSock5Bean(Tid fromTid, Tid toTid, string addr, int port, short transport, string pubId) : this() + { + this.FromTid = fromTid; + this.ToTid = toTid; + this.Addr = addr; + this.Port = port; + this.Transport = transport; + this.PubId = pubId; + } + + public TimSock5Bean DeepCopy() + { + var tmp202 = new TimSock5Bean(); + if((FromTid != null)) + { + tmp202.FromTid = (Tid)this.FromTid.DeepCopy(); + } + if((ToTid != null)) + { + tmp202.ToTid = (Tid)this.ToTid.DeepCopy(); + } + if((Addr != null)) + { + tmp202.Addr = this.Addr; + } + tmp202.Port = this.Port; + tmp202.Transport = this.Transport; + if((PubId != null)) + { + tmp202.PubId = this.PubId; + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp202.ExtraMap = this.ExtraMap.DeepCopy(); + } + tmp202.__isset.extraMap = this.__isset.extraMap; + return tmp202; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + bool isset_fromTid = false; + bool isset_toTid = false; + bool isset_addr = false; + bool isset_port = false; + bool isset_transport = false; + bool isset_pubId = false; + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + FromTid = new Tid(); + await FromTid.ReadAsync(iprot, cancellationToken); + isset_fromTid = true; + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.Struct) + { + ToTid = new Tid(); + await ToTid.ReadAsync(iprot, cancellationToken); + isset_toTid = true; + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.String) + { + Addr = await iprot.ReadStringAsync(cancellationToken); + isset_addr = true; + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 4: + if (field.Type == TType.I32) + { + Port = await iprot.ReadI32Async(cancellationToken); + isset_port = true; + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 5: + if (field.Type == TType.I16) + { + Transport = await iprot.ReadI16Async(cancellationToken); + isset_transport = true; + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 6: + if (field.Type == TType.String) + { + PubId = await iprot.ReadStringAsync(cancellationToken); + isset_pubId = true; + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 7: + if (field.Type == TType.Map) + { + { + var _map203 = await iprot.ReadMapBeginAsync(cancellationToken); + ExtraMap = new Dictionary(_map203.Count); + for(int _i204 = 0; _i204 < _map203.Count; ++_i204) + { + string _key205; + string _val206; + _key205 = await iprot.ReadStringAsync(cancellationToken); + _val206 = await iprot.ReadStringAsync(cancellationToken); + ExtraMap[_key205] = _val206; + } + await iprot.ReadMapEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + if (!isset_fromTid) + { + throw new TProtocolException(TProtocolException.INVALID_DATA); + } + if (!isset_toTid) + { + throw new TProtocolException(TProtocolException.INVALID_DATA); + } + if (!isset_addr) + { + throw new TProtocolException(TProtocolException.INVALID_DATA); + } + if (!isset_port) + { + throw new TProtocolException(TProtocolException.INVALID_DATA); + } + if (!isset_transport) + { + throw new TProtocolException(TProtocolException.INVALID_DATA); + } + if (!isset_pubId) + { + throw new TProtocolException(TProtocolException.INVALID_DATA); + } + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp207 = new TStruct("TimSock5Bean"); + await oprot.WriteStructBeginAsync(tmp207, cancellationToken); + var tmp208 = new TField(); + if((FromTid != null)) + { + tmp208.Name = "fromTid"; + tmp208.Type = TType.Struct; + tmp208.ID = 1; + await oprot.WriteFieldBeginAsync(tmp208, cancellationToken); + await FromTid.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ToTid != null)) + { + tmp208.Name = "toTid"; + tmp208.Type = TType.Struct; + tmp208.ID = 2; + await oprot.WriteFieldBeginAsync(tmp208, cancellationToken); + await ToTid.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Addr != null)) + { + tmp208.Name = "addr"; + tmp208.Type = TType.String; + tmp208.ID = 3; + await oprot.WriteFieldBeginAsync(tmp208, cancellationToken); + await oprot.WriteStringAsync(Addr, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + tmp208.Name = "port"; + tmp208.Type = TType.I32; + tmp208.ID = 4; + await oprot.WriteFieldBeginAsync(tmp208, cancellationToken); + await oprot.WriteI32Async(Port, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + tmp208.Name = "transport"; + tmp208.Type = TType.I16; + tmp208.ID = 5; + await oprot.WriteFieldBeginAsync(tmp208, cancellationToken); + await oprot.WriteI16Async(Transport, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + if((PubId != null)) + { + tmp208.Name = "pubId"; + tmp208.Type = TType.String; + tmp208.ID = 6; + await oprot.WriteFieldBeginAsync(tmp208, cancellationToken); + await oprot.WriteStringAsync(PubId, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp208.Name = "extraMap"; + tmp208.Type = TType.Map; + tmp208.ID = 7; + await oprot.WriteFieldBeginAsync(tmp208, cancellationToken); + await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.String, ExtraMap.Count), cancellationToken); + foreach (string _iter209 in ExtraMap.Keys) + { + await oprot.WriteStringAsync(_iter209, cancellationToken); + await oprot.WriteStringAsync(ExtraMap[_iter209], cancellationToken); + } + await oprot.WriteMapEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is TimSock5Bean other)) return false; + if (ReferenceEquals(this, other)) return true; + return global::System.Object.Equals(FromTid, other.FromTid) + && global::System.Object.Equals(ToTid, other.ToTid) + && global::System.Object.Equals(Addr, other.Addr) + && global::System.Object.Equals(Port, other.Port) + && global::System.Object.Equals(Transport, other.Transport) + && global::System.Object.Equals(PubId, other.PubId) + && ((__isset.extraMap == other.__isset.extraMap) && ((!__isset.extraMap) || (TCollections.Equals(ExtraMap, other.ExtraMap)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((FromTid != null)) + { + hashcode = (hashcode * 397) + FromTid.GetHashCode(); + } + if((ToTid != null)) + { + hashcode = (hashcode * 397) + ToTid.GetHashCode(); + } + if((Addr != null)) + { + hashcode = (hashcode * 397) + Addr.GetHashCode(); + } + hashcode = (hashcode * 397) + Port.GetHashCode(); + hashcode = (hashcode * 397) + Transport.GetHashCode(); + if((PubId != null)) + { + hashcode = (hashcode * 397) + PubId.GetHashCode(); + } + if((ExtraMap != null) && __isset.extraMap) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraMap); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp210 = new StringBuilder("TimSock5Bean("); + if((FromTid != null)) + { + tmp210.Append(", FromTid: "); + FromTid.ToString(tmp210); + } + if((ToTid != null)) + { + tmp210.Append(", ToTid: "); + ToTid.ToString(tmp210); + } + if((Addr != null)) + { + tmp210.Append(", Addr: "); + Addr.ToString(tmp210); + } + tmp210.Append(", Port: "); + Port.ToString(tmp210); + tmp210.Append(", Transport: "); + Transport.ToString(tmp210); + if((PubId != null)) + { + tmp210.Append(", PubId: "); + PubId.ToString(tmp210); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp210.Append(", ExtraMap: "); + ExtraMap.ToString(tmp210); + } + tmp210.Append(')'); + return tmp210.ToString(); + } +} + diff --git a/protocols/gen-netstd/TimSock5Bytes.cs b/protocols/gen-netstd/TimSock5Bytes.cs new file mode 100644 index 0000000..f09c747 --- /dev/null +++ b/protocols/gen-netstd/TimSock5Bytes.cs @@ -0,0 +1,333 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class TimSock5Bytes : TBase +{ + private Dictionary _extraMap; + + /// + /// 发布id + /// + public string PubId { get; set; } + + /// + /// 序号数据块 + /// + public int Index { get; set; } + + /// + /// 数据块 + /// + public List Bytes { get; set; } + + public Dictionary ExtraMap + { + get + { + return _extraMap; + } + set + { + __isset.extraMap = true; + this._extraMap = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool extraMap; + } + + public TimSock5Bytes() + { + } + + public TimSock5Bytes(string pubId, int index, List bytes) : this() + { + this.PubId = pubId; + this.Index = index; + this.Bytes = bytes; + } + + public TimSock5Bytes DeepCopy() + { + var tmp212 = new TimSock5Bytes(); + if((PubId != null)) + { + tmp212.PubId = this.PubId; + } + tmp212.Index = this.Index; + if((Bytes != null)) + { + tmp212.Bytes = this.Bytes.DeepCopy(); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp212.ExtraMap = this.ExtraMap.DeepCopy(); + } + tmp212.__isset.extraMap = this.__isset.extraMap; + return tmp212; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + bool isset_pubId = false; + bool isset_index = false; + bool isset_bytes = false; + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.String) + { + PubId = await iprot.ReadStringAsync(cancellationToken); + isset_pubId = true; + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.I32) + { + Index = await iprot.ReadI32Async(cancellationToken); + isset_index = true; + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.List) + { + { + var _list213 = await iprot.ReadListBeginAsync(cancellationToken); + Bytes = new List(_list213.Count); + for(int _i214 = 0; _i214 < _list213.Count; ++_i214) + { + byte[] _elem215; + _elem215 = await iprot.ReadBinaryAsync(cancellationToken); + Bytes.Add(_elem215); + } + await iprot.ReadListEndAsync(cancellationToken); + } + isset_bytes = true; + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 4: + if (field.Type == TType.Map) + { + { + var _map216 = await iprot.ReadMapBeginAsync(cancellationToken); + ExtraMap = new Dictionary(_map216.Count); + for(int _i217 = 0; _i217 < _map216.Count; ++_i217) + { + string _key218; + string _val219; + _key218 = await iprot.ReadStringAsync(cancellationToken); + _val219 = await iprot.ReadStringAsync(cancellationToken); + ExtraMap[_key218] = _val219; + } + await iprot.ReadMapEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + if (!isset_pubId) + { + throw new TProtocolException(TProtocolException.INVALID_DATA); + } + if (!isset_index) + { + throw new TProtocolException(TProtocolException.INVALID_DATA); + } + if (!isset_bytes) + { + throw new TProtocolException(TProtocolException.INVALID_DATA); + } + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp220 = new TStruct("TimSock5Bytes"); + await oprot.WriteStructBeginAsync(tmp220, cancellationToken); + var tmp221 = new TField(); + if((PubId != null)) + { + tmp221.Name = "pubId"; + tmp221.Type = TType.String; + tmp221.ID = 1; + await oprot.WriteFieldBeginAsync(tmp221, cancellationToken); + await oprot.WriteStringAsync(PubId, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + tmp221.Name = "index"; + tmp221.Type = TType.I32; + tmp221.ID = 2; + await oprot.WriteFieldBeginAsync(tmp221, cancellationToken); + await oprot.WriteI32Async(Index, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + if((Bytes != null)) + { + tmp221.Name = "bytes"; + tmp221.Type = TType.List; + tmp221.ID = 3; + await oprot.WriteFieldBeginAsync(tmp221, cancellationToken); + await oprot.WriteListBeginAsync(new TList(TType.String, Bytes.Count), cancellationToken); + foreach (byte[] _iter222 in Bytes) + { + await oprot.WriteBinaryAsync(_iter222, cancellationToken); + } + await oprot.WriteListEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp221.Name = "extraMap"; + tmp221.Type = TType.Map; + tmp221.ID = 4; + await oprot.WriteFieldBeginAsync(tmp221, cancellationToken); + await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.String, ExtraMap.Count), cancellationToken); + foreach (string _iter223 in ExtraMap.Keys) + { + await oprot.WriteStringAsync(_iter223, cancellationToken); + await oprot.WriteStringAsync(ExtraMap[_iter223], cancellationToken); + } + await oprot.WriteMapEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is TimSock5Bytes other)) return false; + if (ReferenceEquals(this, other)) return true; + return global::System.Object.Equals(PubId, other.PubId) + && global::System.Object.Equals(Index, other.Index) + && TCollections.Equals(Bytes, other.Bytes) + && ((__isset.extraMap == other.__isset.extraMap) && ((!__isset.extraMap) || (TCollections.Equals(ExtraMap, other.ExtraMap)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((PubId != null)) + { + hashcode = (hashcode * 397) + PubId.GetHashCode(); + } + hashcode = (hashcode * 397) + Index.GetHashCode(); + if((Bytes != null)) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(Bytes); + } + if((ExtraMap != null) && __isset.extraMap) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraMap); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp224 = new StringBuilder("TimSock5Bytes("); + if((PubId != null)) + { + tmp224.Append(", PubId: "); + PubId.ToString(tmp224); + } + tmp224.Append(", Index: "); + Index.ToString(tmp224); + if((Bytes != null)) + { + tmp224.Append(", Bytes: "); + Bytes.ToString(tmp224); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp224.Append(", ExtraMap: "); + ExtraMap.ToString(tmp224); + } + tmp224.Append(')'); + return tmp224.ToString(); + } +} + diff --git a/protocols/gen-netstd/TimTime.cs b/protocols/gen-netstd/TimTime.cs new file mode 100644 index 0000000..e95edf0 --- /dev/null +++ b/protocols/gen-netstd/TimTime.cs @@ -0,0 +1,231 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class TimTime : TBase +{ + private string _timestamp; + private string _formattime; + + /// + /// 时间戳 (毫秒) + /// + public string Timestamp + { + get + { + return _timestamp; + } + set + { + __isset.timestamp = true; + this._timestamp = value; + } + } + + /// + /// 格式化时间 + /// + public string Formattime + { + get + { + return _formattime; + } + set + { + __isset.formattime = true; + this._formattime = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool timestamp; + public bool formattime; + } + + public TimTime() + { + } + + public TimTime DeepCopy() + { + var tmp43 = new TimTime(); + if((Timestamp != null) && __isset.timestamp) + { + tmp43.Timestamp = this.Timestamp; + } + tmp43.__isset.timestamp = this.__isset.timestamp; + if((Formattime != null) && __isset.formattime) + { + tmp43.Formattime = this.Formattime; + } + tmp43.__isset.formattime = this.__isset.formattime; + return tmp43; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.String) + { + Timestamp = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.String) + { + Formattime = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp44 = new TStruct("TimTime"); + await oprot.WriteStructBeginAsync(tmp44, cancellationToken); + var tmp45 = new TField(); + if((Timestamp != null) && __isset.timestamp) + { + tmp45.Name = "timestamp"; + tmp45.Type = TType.String; + tmp45.ID = 1; + await oprot.WriteFieldBeginAsync(tmp45, cancellationToken); + await oprot.WriteStringAsync(Timestamp, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Formattime != null) && __isset.formattime) + { + tmp45.Name = "formattime"; + tmp45.Type = TType.String; + tmp45.ID = 2; + await oprot.WriteFieldBeginAsync(tmp45, cancellationToken); + await oprot.WriteStringAsync(Formattime, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is TimTime other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.timestamp == other.__isset.timestamp) && ((!__isset.timestamp) || (global::System.Object.Equals(Timestamp, other.Timestamp)))) + && ((__isset.formattime == other.__isset.formattime) && ((!__isset.formattime) || (global::System.Object.Equals(Formattime, other.Formattime)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Timestamp != null) && __isset.timestamp) + { + hashcode = (hashcode * 397) + Timestamp.GetHashCode(); + } + if((Formattime != null) && __isset.formattime) + { + hashcode = (hashcode * 397) + Formattime.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp46 = new StringBuilder("TimTime("); + int tmp47 = 0; + if((Timestamp != null) && __isset.timestamp) + { + if(0 < tmp47++) { tmp46.Append(", "); } + tmp46.Append("Timestamp: "); + Timestamp.ToString(tmp46); + } + if((Formattime != null) && __isset.formattime) + { + if(0 < tmp47++) { tmp46.Append(", "); } + tmp46.Append("Formattime: "); + Formattime.ToString(tmp46); + } + tmp46.Append(')'); + return tmp46.ToString(); + } +} + diff --git a/protocols/gen-netstd/TimUserBean.cs b/protocols/gen-netstd/TimUserBean.cs new file mode 100644 index 0000000..fc8caef --- /dev/null +++ b/protocols/gen-netstd/TimUserBean.cs @@ -0,0 +1,756 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; +using Thrift.Transport.Server; +using Thrift.Processor; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + + +public partial class TimUserBean : TBase +{ + private Tid _tid; + private string _nickname; + private string _remarkname; + private string _brithday; + private short _gender; + private string _headurl; + private TimArea _area; + private byte[] _headbyte; + private List _photoBytes; + private List _extraList; + private Dictionary _extraMap; + + /// + /// 用户bean + /// + public Tid Tid + { + get + { + return _tid; + } + set + { + __isset.tid = true; + this._tid = value; + } + } + + /// + /// 昵称 + /// + public string Nickname + { + get + { + return _nickname; + } + set + { + __isset.nickname = true; + this._nickname = value; + } + } + + /// + /// 备注名称 + /// + public string Remarkname + { + get + { + return _remarkname; + } + set + { + __isset.remarkname = true; + this._remarkname = value; + } + } + + /// + /// 生日 2000-01-01 + /// + public string Brithday + { + get + { + return _brithday; + } + set + { + __isset.brithday = true; + this._brithday = value; + } + } + + /// + /// 性别 自行约定 如 : 0不知,1男,2女 + /// + public short Gender + { + get + { + return _gender; + } + set + { + __isset.gender = true; + this._gender = value; + } + } + + /// + /// 头像地址 http://xxx.jpg + /// + public string Headurl + { + get + { + return _headurl; + } + set + { + __isset.headurl = true; + this._headurl = value; + } + } + + /// + /// 地区 + /// + public TimArea Area + { + get + { + return _area; + } + set + { + __isset.area = true; + this._area = value; + } + } + + /// + /// 头像 + /// + public byte[] Headbyte + { + get + { + return _headbyte; + } + set + { + __isset.headbyte = true; + this._headbyte = value; + } + } + + /// + /// 其他图片 + /// + public List PhotoBytes + { + get + { + return _photoBytes; + } + set + { + __isset.photoBytes = true; + this._photoBytes = value; + } + } + + /// + /// 扩展字段 + /// + public List ExtraList + { + get + { + return _extraList; + } + set + { + __isset.extraList = true; + this._extraList = value; + } + } + + public Dictionary ExtraMap + { + get + { + return _extraMap; + } + set + { + __isset.extraMap = true; + this._extraMap = value; + } + } + + + public Isset __isset; + public struct Isset + { + public bool tid; + public bool nickname; + public bool remarkname; + public bool brithday; + public bool gender; + public bool headurl; + public bool area; + public bool headbyte; + public bool photoBytes; + public bool extraList; + public bool extraMap; + } + + public TimUserBean() + { + } + + public TimUserBean DeepCopy() + { + var tmp76 = new TimUserBean(); + if((Tid != null) && __isset.tid) + { + tmp76.Tid = (Tid)this.Tid.DeepCopy(); + } + tmp76.__isset.tid = this.__isset.tid; + if((Nickname != null) && __isset.nickname) + { + tmp76.Nickname = this.Nickname; + } + tmp76.__isset.nickname = this.__isset.nickname; + if((Remarkname != null) && __isset.remarkname) + { + tmp76.Remarkname = this.Remarkname; + } + tmp76.__isset.remarkname = this.__isset.remarkname; + if((Brithday != null) && __isset.brithday) + { + tmp76.Brithday = this.Brithday; + } + tmp76.__isset.brithday = this.__isset.brithday; + if(__isset.gender) + { + tmp76.Gender = this.Gender; + } + tmp76.__isset.gender = this.__isset.gender; + if((Headurl != null) && __isset.headurl) + { + tmp76.Headurl = this.Headurl; + } + tmp76.__isset.headurl = this.__isset.headurl; + if((Area != null) && __isset.area) + { + tmp76.Area = (TimArea)this.Area.DeepCopy(); + } + tmp76.__isset.area = this.__isset.area; + if((Headbyte != null) && __isset.headbyte) + { + tmp76.Headbyte = this.Headbyte.ToArray(); + } + tmp76.__isset.headbyte = this.__isset.headbyte; + if((PhotoBytes != null) && __isset.photoBytes) + { + tmp76.PhotoBytes = this.PhotoBytes.DeepCopy(); + } + tmp76.__isset.photoBytes = this.__isset.photoBytes; + if((ExtraList != null) && __isset.extraList) + { + tmp76.ExtraList = this.ExtraList.DeepCopy(); + } + tmp76.__isset.extraList = this.__isset.extraList; + if((ExtraMap != null) && __isset.extraMap) + { + tmp76.ExtraMap = this.ExtraMap.DeepCopy(); + } + tmp76.__isset.extraMap = this.__isset.extraMap; + return tmp76; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Struct) + { + Tid = new Tid(); + await Tid.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.String) + { + Nickname = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.String) + { + Remarkname = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 4: + if (field.Type == TType.String) + { + Brithday = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 5: + if (field.Type == TType.I16) + { + Gender = await iprot.ReadI16Async(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 6: + if (field.Type == TType.String) + { + Headurl = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 7: + if (field.Type == TType.Struct) + { + Area = new TimArea(); + await Area.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 8: + if (field.Type == TType.String) + { + Headbyte = await iprot.ReadBinaryAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 9: + if (field.Type == TType.List) + { + { + var _list77 = await iprot.ReadListBeginAsync(cancellationToken); + PhotoBytes = new List(_list77.Count); + for(int _i78 = 0; _i78 < _list77.Count; ++_i78) + { + byte[] _elem79; + _elem79 = await iprot.ReadBinaryAsync(cancellationToken); + PhotoBytes.Add(_elem79); + } + await iprot.ReadListEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 10: + if (field.Type == TType.List) + { + { + var _list80 = await iprot.ReadListBeginAsync(cancellationToken); + ExtraList = new List(_list80.Count); + for(int _i81 = 0; _i81 < _list80.Count; ++_i81) + { + TimNode _elem82; + _elem82 = new TimNode(); + await _elem82.ReadAsync(iprot, cancellationToken); + ExtraList.Add(_elem82); + } + await iprot.ReadListEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 11: + if (field.Type == TType.Map) + { + { + var _map83 = await iprot.ReadMapBeginAsync(cancellationToken); + ExtraMap = new Dictionary(_map83.Count); + for(int _i84 = 0; _i84 < _map83.Count; ++_i84) + { + string _key85; + string _val86; + _key85 = await iprot.ReadStringAsync(cancellationToken); + _val86 = await iprot.ReadStringAsync(cancellationToken); + ExtraMap[_key85] = _val86; + } + await iprot.ReadMapEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp87 = new TStruct("TimUserBean"); + await oprot.WriteStructBeginAsync(tmp87, cancellationToken); + var tmp88 = new TField(); + if((Tid != null) && __isset.tid) + { + tmp88.Name = "tid"; + tmp88.Type = TType.Struct; + tmp88.ID = 1; + await oprot.WriteFieldBeginAsync(tmp88, cancellationToken); + await Tid.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Nickname != null) && __isset.nickname) + { + tmp88.Name = "nickname"; + tmp88.Type = TType.String; + tmp88.ID = 2; + await oprot.WriteFieldBeginAsync(tmp88, cancellationToken); + await oprot.WriteStringAsync(Nickname, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Remarkname != null) && __isset.remarkname) + { + tmp88.Name = "remarkname"; + tmp88.Type = TType.String; + tmp88.ID = 3; + await oprot.WriteFieldBeginAsync(tmp88, cancellationToken); + await oprot.WriteStringAsync(Remarkname, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Brithday != null) && __isset.brithday) + { + tmp88.Name = "brithday"; + tmp88.Type = TType.String; + tmp88.ID = 4; + await oprot.WriteFieldBeginAsync(tmp88, cancellationToken); + await oprot.WriteStringAsync(Brithday, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if(__isset.gender) + { + tmp88.Name = "gender"; + tmp88.Type = TType.I16; + tmp88.ID = 5; + await oprot.WriteFieldBeginAsync(tmp88, cancellationToken); + await oprot.WriteI16Async(Gender, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Headurl != null) && __isset.headurl) + { + tmp88.Name = "headurl"; + tmp88.Type = TType.String; + tmp88.ID = 6; + await oprot.WriteFieldBeginAsync(tmp88, cancellationToken); + await oprot.WriteStringAsync(Headurl, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Area != null) && __isset.area) + { + tmp88.Name = "area"; + tmp88.Type = TType.Struct; + tmp88.ID = 7; + await oprot.WriteFieldBeginAsync(tmp88, cancellationToken); + await Area.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Headbyte != null) && __isset.headbyte) + { + tmp88.Name = "headbyte"; + tmp88.Type = TType.String; + tmp88.ID = 8; + await oprot.WriteFieldBeginAsync(tmp88, cancellationToken); + await oprot.WriteBinaryAsync(Headbyte, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((PhotoBytes != null) && __isset.photoBytes) + { + tmp88.Name = "photoBytes"; + tmp88.Type = TType.List; + tmp88.ID = 9; + await oprot.WriteFieldBeginAsync(tmp88, cancellationToken); + await oprot.WriteListBeginAsync(new TList(TType.String, PhotoBytes.Count), cancellationToken); + foreach (byte[] _iter89 in PhotoBytes) + { + await oprot.WriteBinaryAsync(_iter89, cancellationToken); + } + await oprot.WriteListEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraList != null) && __isset.extraList) + { + tmp88.Name = "extraList"; + tmp88.Type = TType.List; + tmp88.ID = 10; + await oprot.WriteFieldBeginAsync(tmp88, cancellationToken); + await oprot.WriteListBeginAsync(new TList(TType.Struct, ExtraList.Count), cancellationToken); + foreach (TimNode _iter90 in ExtraList) + { + await _iter90.WriteAsync(oprot, cancellationToken); + } + await oprot.WriteListEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((ExtraMap != null) && __isset.extraMap) + { + tmp88.Name = "extraMap"; + tmp88.Type = TType.Map; + tmp88.ID = 11; + await oprot.WriteFieldBeginAsync(tmp88, cancellationToken); + await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.String, ExtraMap.Count), cancellationToken); + foreach (string _iter91 in ExtraMap.Keys) + { + await oprot.WriteStringAsync(_iter91, cancellationToken); + await oprot.WriteStringAsync(ExtraMap[_iter91], cancellationToken); + } + await oprot.WriteMapEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is TimUserBean other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.tid == other.__isset.tid) && ((!__isset.tid) || (global::System.Object.Equals(Tid, other.Tid)))) + && ((__isset.nickname == other.__isset.nickname) && ((!__isset.nickname) || (global::System.Object.Equals(Nickname, other.Nickname)))) + && ((__isset.remarkname == other.__isset.remarkname) && ((!__isset.remarkname) || (global::System.Object.Equals(Remarkname, other.Remarkname)))) + && ((__isset.brithday == other.__isset.brithday) && ((!__isset.brithday) || (global::System.Object.Equals(Brithday, other.Brithday)))) + && ((__isset.gender == other.__isset.gender) && ((!__isset.gender) || (global::System.Object.Equals(Gender, other.Gender)))) + && ((__isset.headurl == other.__isset.headurl) && ((!__isset.headurl) || (global::System.Object.Equals(Headurl, other.Headurl)))) + && ((__isset.area == other.__isset.area) && ((!__isset.area) || (global::System.Object.Equals(Area, other.Area)))) + && ((__isset.headbyte == other.__isset.headbyte) && ((!__isset.headbyte) || (TCollections.Equals(Headbyte, other.Headbyte)))) + && ((__isset.photoBytes == other.__isset.photoBytes) && ((!__isset.photoBytes) || (TCollections.Equals(PhotoBytes, other.PhotoBytes)))) + && ((__isset.extraList == other.__isset.extraList) && ((!__isset.extraList) || (TCollections.Equals(ExtraList, other.ExtraList)))) + && ((__isset.extraMap == other.__isset.extraMap) && ((!__isset.extraMap) || (TCollections.Equals(ExtraMap, other.ExtraMap)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Tid != null) && __isset.tid) + { + hashcode = (hashcode * 397) + Tid.GetHashCode(); + } + if((Nickname != null) && __isset.nickname) + { + hashcode = (hashcode * 397) + Nickname.GetHashCode(); + } + if((Remarkname != null) && __isset.remarkname) + { + hashcode = (hashcode * 397) + Remarkname.GetHashCode(); + } + if((Brithday != null) && __isset.brithday) + { + hashcode = (hashcode * 397) + Brithday.GetHashCode(); + } + if(__isset.gender) + { + hashcode = (hashcode * 397) + Gender.GetHashCode(); + } + if((Headurl != null) && __isset.headurl) + { + hashcode = (hashcode * 397) + Headurl.GetHashCode(); + } + if((Area != null) && __isset.area) + { + hashcode = (hashcode * 397) + Area.GetHashCode(); + } + if((Headbyte != null) && __isset.headbyte) + { + hashcode = (hashcode * 397) + Headbyte.GetHashCode(); + } + if((PhotoBytes != null) && __isset.photoBytes) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(PhotoBytes); + } + if((ExtraList != null) && __isset.extraList) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraList); + } + if((ExtraMap != null) && __isset.extraMap) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(ExtraMap); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp92 = new StringBuilder("TimUserBean("); + int tmp93 = 0; + if((Tid != null) && __isset.tid) + { + if(0 < tmp93++) { tmp92.Append(", "); } + tmp92.Append("Tid: "); + Tid.ToString(tmp92); + } + if((Nickname != null) && __isset.nickname) + { + if(0 < tmp93++) { tmp92.Append(", "); } + tmp92.Append("Nickname: "); + Nickname.ToString(tmp92); + } + if((Remarkname != null) && __isset.remarkname) + { + if(0 < tmp93++) { tmp92.Append(", "); } + tmp92.Append("Remarkname: "); + Remarkname.ToString(tmp92); + } + if((Brithday != null) && __isset.brithday) + { + if(0 < tmp93++) { tmp92.Append(", "); } + tmp92.Append("Brithday: "); + Brithday.ToString(tmp92); + } + if(__isset.gender) + { + if(0 < tmp93++) { tmp92.Append(", "); } + tmp92.Append("Gender: "); + Gender.ToString(tmp92); + } + if((Headurl != null) && __isset.headurl) + { + if(0 < tmp93++) { tmp92.Append(", "); } + tmp92.Append("Headurl: "); + Headurl.ToString(tmp92); + } + if((Area != null) && __isset.area) + { + if(0 < tmp93++) { tmp92.Append(", "); } + tmp92.Append("Area: "); + Area.ToString(tmp92); + } + if((Headbyte != null) && __isset.headbyte) + { + if(0 < tmp93++) { tmp92.Append(", "); } + tmp92.Append("Headbyte: "); + Headbyte.ToString(tmp92); + } + if((PhotoBytes != null) && __isset.photoBytes) + { + if(0 < tmp93++) { tmp92.Append(", "); } + tmp92.Append("PhotoBytes: "); + PhotoBytes.ToString(tmp92); + } + if((ExtraList != null) && __isset.extraList) + { + if(0 < tmp93++) { tmp92.Append(", "); } + tmp92.Append("ExtraList: "); + ExtraList.ToString(tmp92); + } + if((ExtraMap != null) && __isset.extraMap) + { + if(0 < tmp93++) { tmp92.Append(", "); } + tmp92.Append("ExtraMap: "); + ExtraMap.ToString(tmp92); + } + tmp92.Append(')'); + return tmp92.ToString(); + } +} + diff --git a/protocols/gen-netstd/tim.Constants.cs b/protocols/gen-netstd/tim.Constants.cs new file mode 100644 index 0000000..77b191c --- /dev/null +++ b/protocols/gen-netstd/tim.Constants.cs @@ -0,0 +1,45 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + +public static class timConstants +{ + /// + /// 内部版本号 + /// + public const int protocolversion = 4; + /// + /// 外部版本号 + /// + public const string protocolversionName = "1.1.0"; + /// + /// 状态码:成功 + /// + public const string TIM_SC_SUCCESS = "200"; + /// + /// 状态码:失败 + /// + public const string TIM_SC_FAILED = "400"; +} diff --git a/protocols/gen-netstd/tim.Extensions.cs b/protocols/gen-netstd/tim.Extensions.cs new file mode 100644 index 0000000..186fdf0 --- /dev/null +++ b/protocols/gen-netstd/tim.Extensions.cs @@ -0,0 +1,219 @@ +/** + * + * Autogenerated by Thrift Compiler (0.17.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Thrift; +using Thrift.Collections; +using Thrift.Protocol; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + +public static class timExtensions +{ + public static bool Equals(this Dictionary instance, object that) + { + if (!(that is Dictionary other)) return false; + if (ReferenceEquals(instance, other)) return true; + + return TCollections.Equals(instance, other); + } + + + public static int GetHashCode(this Dictionary instance) + { + return TCollections.GetHashCode(instance); + } + + + public static Dictionary DeepCopy(this Dictionary source) + { + if (source == null) + return null; + + var tmp602 = new Dictionary(source.Count); + foreach (var pair in source) + tmp602.Add((pair.Key != null) ? pair.Key : null, (pair.Value != null) ? pair.Value : null); + return tmp602; + } + + + public static bool Equals(this List instance, object that) + { + if (!(that is List other)) return false; + if (ReferenceEquals(instance, other)) return true; + + return TCollections.Equals(instance, other); + } + + + public static int GetHashCode(this List instance) + { + return TCollections.GetHashCode(instance); + } + + + public static List DeepCopy(this List source) + { + if (source == null) + return null; + + var tmp603 = new List(source.Count); + foreach (var elem in source) + tmp603.Add((elem != null) ? elem.DeepCopy() : null); + return tmp603; + } + + + public static bool Equals(this List instance, object that) + { + if (!(that is List other)) return false; + if (ReferenceEquals(instance, other)) return true; + + return TCollections.Equals(instance, other); + } + + + public static int GetHashCode(this List instance) + { + return TCollections.GetHashCode(instance); + } + + + public static List DeepCopy(this List source) + { + if (source == null) + return null; + + var tmp604 = new List(source.Count); + foreach (var elem in source) + tmp604.Add((elem != null) ? elem.DeepCopy() : null); + return tmp604; + } + + + public static bool Equals(this List instance, object that) + { + if (!(that is List other)) return false; + if (ReferenceEquals(instance, other)) return true; + + return TCollections.Equals(instance, other); + } + + + public static int GetHashCode(this List instance) + { + return TCollections.GetHashCode(instance); + } + + + public static List DeepCopy(this List source) + { + if (source == null) + return null; + + var tmp605 = new List(source.Count); + foreach (var elem in source) + tmp605.Add((elem != null) ? elem.DeepCopy() : null); + return tmp605; + } + + + public static bool Equals(this List instance, object that) + { + if (!(that is List other)) return false; + if (ReferenceEquals(instance, other)) return true; + + return TCollections.Equals(instance, other); + } + + + public static int GetHashCode(this List instance) + { + return TCollections.GetHashCode(instance); + } + + + public static List DeepCopy(this List source) + { + if (source == null) + return null; + + var tmp606 = new List(source.Count); + foreach (var elem in source) + tmp606.Add((elem != null) ? elem.DeepCopy() : null); + return tmp606; + } + + + public static bool Equals(this List instance, object that) + { + if (!(that is List other)) return false; + if (ReferenceEquals(instance, other)) return true; + + return TCollections.Equals(instance, other); + } + + + public static int GetHashCode(this List instance) + { + return TCollections.GetHashCode(instance); + } + + + public static List DeepCopy(this List source) + { + if (source == null) + return null; + + var tmp607 = new List(source.Count); + foreach (var elem in source) + tmp607.Add((elem != null) ? elem.ToArray() : null); + return tmp607; + } + + + public static bool Equals(this List instance, object that) + { + if (!(that is List other)) return false; + if (ReferenceEquals(instance, other)) return true; + + return TCollections.Equals(instance, other); + } + + + public static int GetHashCode(this List instance) + { + return TCollections.GetHashCode(instance); + } + + + public static List DeepCopy(this List source) + { + if (source == null) + return null; + + var tmp608 = new List(source.Count); + foreach (var elem in source) + tmp608.Add((elem != null) ? elem : null); + return tmp608; + } + + +} diff --git a/protocols/gen-perl/Constants.pm b/protocols/gen-perl/Constants.pm index 3fab29b..11bc79c 100644 --- a/protocols/gen-perl/Constants.pm +++ b/protocols/gen-perl/Constants.pm @@ -1,13 +1,15 @@ # -# Autogenerated by Thrift Compiler (0.9.3) +# Autogenerated by Thrift Compiler (0.17.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # package Constants; -require 5.6.0; +use 5.10.0; use strict; use warnings; -use Thrift; +use Thrift::Exception; +use Thrift::MessageType; +use Thrift::Type; use constant protocolversion => 4; diff --git a/protocols/gen-perl/ITim.pm b/protocols/gen-perl/ITim.pm index 2d7bacb..e5b913a 100644 --- a/protocols/gen-perl/ITim.pm +++ b/protocols/gen-perl/ITim.pm @@ -1,15 +1,18 @@ # -# Autogenerated by Thrift Compiler (0.9.3) +# Autogenerated by Thrift Compiler (0.17.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # -require 5.6.0; +use 5.10.0; use strict; use warnings; -use Thrift; +use Thrift::Exception; +use Thrift::MessageType; +use Thrift::Type; use Types; + # HELPER FUNCTIONS AND STRUCTURES package ITim_timStream_args; @@ -40,16 +43,16 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{param} = new TimParam(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{param} = TimParam->new(); $xfer += $self->{param}->read($input); } else { $xfer += $input->skip($ftype); @@ -68,7 +71,7 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timStream_args'); if (defined $self->{param}) { - $xfer += $output->writeFieldBegin('param', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('param', Thrift::TType::STRUCT, 1); $xfer += $self->{param}->write($output); $xfer += $output->writeFieldEnd(); } @@ -98,10 +101,10 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) @@ -144,10 +147,10 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) @@ -190,10 +193,10 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) @@ -247,22 +250,22 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{tid} = new Tid(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{tid} = Tid->new(); $xfer += $self->{tid}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRING) { + /^2$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{pwd}); } else { $xfer += $input->skip($ftype); @@ -281,12 +284,12 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timLogin_args'); if (defined $self->{tid}) { - $xfer += $output->writeFieldBegin('tid', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('tid', Thrift::TType::STRUCT, 1); $xfer += $self->{tid}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{pwd}) { - $xfer += $output->writeFieldBegin('pwd', TType::STRING, 2); + $xfer += $output->writeFieldBegin('pwd', Thrift::TType::STRING, 2); $xfer += $output->writeString($self->{pwd}); $xfer += $output->writeFieldEnd(); } @@ -316,10 +319,10 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) @@ -369,16 +372,16 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{ab} = new TimAckBean(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{ab} = TimAckBean->new(); $xfer += $self->{ab}->read($input); } else { $xfer += $input->skip($ftype); @@ -397,7 +400,7 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timAck_args'); if (defined $self->{ab}) { - $xfer += $output->writeFieldBegin('ab', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('ab', Thrift::TType::STRUCT, 1); $xfer += $self->{ab}->write($output); $xfer += $output->writeFieldEnd(); } @@ -427,10 +430,10 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) @@ -480,16 +483,16 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{pbean} = new TimPBean(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{pbean} = TimPBean->new(); $xfer += $self->{pbean}->read($input); } else { $xfer += $input->skip($ftype); @@ -508,7 +511,7 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timPresence_args'); if (defined $self->{pbean}) { - $xfer += $output->writeFieldBegin('pbean', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('pbean', Thrift::TType::STRUCT, 1); $xfer += $self->{pbean}->write($output); $xfer += $output->writeFieldEnd(); } @@ -538,10 +541,10 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) @@ -591,16 +594,16 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{mbean} = new TimMBean(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{mbean} = TimMBean->new(); $xfer += $self->{mbean}->read($input); } else { $xfer += $input->skip($ftype); @@ -619,7 +622,7 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timMessage_args'); if (defined $self->{mbean}) { - $xfer += $output->writeFieldBegin('mbean', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('mbean', Thrift::TType::STRUCT, 1); $xfer += $self->{mbean}->write($output); $xfer += $output->writeFieldEnd(); } @@ -649,10 +652,10 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) @@ -702,15 +705,15 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRING) { + /^1$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{threadId}); } else { $xfer += $input->skip($ftype); @@ -729,7 +732,7 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timPing_args'); if (defined $self->{threadId}) { - $xfer += $output->writeFieldBegin('threadId', TType::STRING, 1); + $xfer += $output->writeFieldBegin('threadId', Thrift::TType::STRING, 1); $xfer += $output->writeString($self->{threadId}); $xfer += $output->writeFieldEnd(); } @@ -759,10 +762,10 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) @@ -812,16 +815,16 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{e} = new TimError(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{e} = TimError->new(); $xfer += $self->{e}->read($input); } else { $xfer += $input->skip($ftype); @@ -840,7 +843,7 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timError_args'); if (defined $self->{e}) { - $xfer += $output->writeFieldBegin('e', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('e', Thrift::TType::STRUCT, 1); $xfer += $self->{e}->write($output); $xfer += $output->writeFieldEnd(); } @@ -870,10 +873,10 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) @@ -916,10 +919,10 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) @@ -962,10 +965,10 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) @@ -1019,22 +1022,22 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{tid} = new Tid(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{tid} = Tid->new(); $xfer += $self->{tid}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRING) { + /^2$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{auth}); } else { $xfer += $input->skip($ftype); @@ -1053,12 +1056,12 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timRegist_args'); if (defined $self->{tid}) { - $xfer += $output->writeFieldBegin('tid', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('tid', Thrift::TType::STRUCT, 1); $xfer += $self->{tid}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{auth}) { - $xfer += $output->writeFieldBegin('auth', TType::STRING, 2); + $xfer += $output->writeFieldBegin('auth', Thrift::TType::STRING, 2); $xfer += $output->writeString($self->{auth}); $xfer += $output->writeFieldEnd(); } @@ -1088,10 +1091,10 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) @@ -1141,16 +1144,16 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{roster} = new TimRoster(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{roster} = TimRoster->new(); $xfer += $self->{roster}->read($input); } else { $xfer += $input->skip($ftype); @@ -1169,7 +1172,7 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timRoser_args'); if (defined $self->{roster}) { - $xfer += $output->writeFieldBegin('roster', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('roster', Thrift::TType::STRUCT, 1); $xfer += $self->{roster}->write($output); $xfer += $output->writeFieldEnd(); } @@ -1199,10 +1202,10 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) @@ -1252,16 +1255,16 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{mbeanList} = new TimMBeanList(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{mbeanList} = TimMBeanList->new(); $xfer += $self->{mbeanList}->read($input); } else { $xfer += $input->skip($ftype); @@ -1280,7 +1283,7 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timMessageList_args'); if (defined $self->{mbeanList}) { - $xfer += $output->writeFieldBegin('mbeanList', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('mbeanList', Thrift::TType::STRUCT, 1); $xfer += $self->{mbeanList}->write($output); $xfer += $output->writeFieldEnd(); } @@ -1310,10 +1313,10 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) @@ -1363,16 +1366,16 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{pbeanList} = new TimPBeanList(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{pbeanList} = TimPBeanList->new(); $xfer += $self->{pbeanList}->read($input); } else { $xfer += $input->skip($ftype); @@ -1391,7 +1394,7 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timPresenceList_args'); if (defined $self->{pbeanList}) { - $xfer += $output->writeFieldBegin('pbeanList', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('pbeanList', Thrift::TType::STRUCT, 1); $xfer += $self->{pbeanList}->write($output); $xfer += $output->writeFieldEnd(); } @@ -1421,10 +1424,10 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) @@ -1478,22 +1481,22 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{timMsgIq} = new TimMessageIq(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{timMsgIq} = TimMessageIq->new(); $xfer += $self->{timMsgIq}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRING) { + /^2$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{iqType}); } else { $xfer += $input->skip($ftype); @@ -1512,12 +1515,12 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timMessageIq_args'); if (defined $self->{timMsgIq}) { - $xfer += $output->writeFieldBegin('timMsgIq', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('timMsgIq', Thrift::TType::STRUCT, 1); $xfer += $self->{timMsgIq}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{iqType}) { - $xfer += $output->writeFieldBegin('iqType', TType::STRING, 2); + $xfer += $output->writeFieldBegin('iqType', Thrift::TType::STRING, 2); $xfer += $output->writeString($self->{iqType}); $xfer += $output->writeFieldEnd(); } @@ -1547,10 +1550,10 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) @@ -1600,16 +1603,16 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{mbean} = new TimMBean(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{mbean} = TimMBean->new(); $xfer += $self->{mbean}->read($input); } else { $xfer += $input->skip($ftype); @@ -1628,7 +1631,7 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timMessageResult_args'); if (defined $self->{mbean}) { - $xfer += $output->writeFieldBegin('mbean', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('mbean', Thrift::TType::STRUCT, 1); $xfer += $self->{mbean}->write($output); $xfer += $output->writeFieldEnd(); } @@ -1658,10 +1661,10 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) @@ -1711,16 +1714,16 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{tpb} = new TimPropertyBean(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{tpb} = TimPropertyBean->new(); $xfer += $self->{tpb}->read($input); } else { $xfer += $input->skip($ftype); @@ -1739,7 +1742,7 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timProperty_args'); if (defined $self->{tpb}) { - $xfer += $output->writeFieldBegin('tpb', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('tpb', Thrift::TType::STRUCT, 1); $xfer += $self->{tpb}->write($output); $xfer += $output->writeFieldEnd(); } @@ -1769,10 +1772,10 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) @@ -1830,29 +1833,29 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{tid} = new Tid(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{tid} = Tid->new(); $xfer += $self->{tid}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRING) { + /^2$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{pwd}); } else { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::STRUCT) { - $self->{auth} = new TimAuth(); + /^3$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{auth} = TimAuth->new(); $xfer += $self->{auth}->read($input); } else { $xfer += $input->skip($ftype); @@ -1871,17 +1874,17 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timRemoteUserAuth_args'); if (defined $self->{tid}) { - $xfer += $output->writeFieldBegin('tid', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('tid', Thrift::TType::STRUCT, 1); $xfer += $self->{tid}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{pwd}) { - $xfer += $output->writeFieldBegin('pwd', TType::STRING, 2); + $xfer += $output->writeFieldBegin('pwd', Thrift::TType::STRING, 2); $xfer += $output->writeString($self->{pwd}); $xfer += $output->writeFieldEnd(); } if (defined $self->{auth}) { - $xfer += $output->writeFieldBegin('auth', TType::STRUCT, 3); + $xfer += $output->writeFieldBegin('auth', Thrift::TType::STRUCT, 3); $xfer += $self->{auth}->write($output); $xfer += $output->writeFieldEnd(); } @@ -1918,16 +1921,16 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^0$/ && do{ if ($ftype == TType::STRUCT) { - $self->{success} = new TimRemoteUserBean(); + /^0$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{success} = TimRemoteUserBean->new(); $xfer += $self->{success}->read($input); } else { $xfer += $input->skip($ftype); @@ -1946,7 +1949,7 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timRemoteUserAuth_result'); if (defined $self->{success}) { - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $output->writeFieldBegin('success', Thrift::TType::STRUCT, 0); $xfer += $self->{success}->write($output); $xfer += $output->writeFieldEnd(); } @@ -1987,23 +1990,23 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{tid} = new Tid(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{tid} = Tid->new(); $xfer += $self->{tid}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRUCT) { - $self->{auth} = new TimAuth(); + /^2$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{auth} = TimAuth->new(); $xfer += $self->{auth}->read($input); } else { $xfer += $input->skip($ftype); @@ -2022,12 +2025,12 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timRemoteUserGet_args'); if (defined $self->{tid}) { - $xfer += $output->writeFieldBegin('tid', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('tid', Thrift::TType::STRUCT, 1); $xfer += $self->{tid}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{auth}) { - $xfer += $output->writeFieldBegin('auth', TType::STRUCT, 2); + $xfer += $output->writeFieldBegin('auth', Thrift::TType::STRUCT, 2); $xfer += $self->{auth}->write($output); $xfer += $output->writeFieldEnd(); } @@ -2064,16 +2067,16 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^0$/ && do{ if ($ftype == TType::STRUCT) { - $self->{success} = new TimRemoteUserBean(); + /^0$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{success} = TimRemoteUserBean->new(); $xfer += $self->{success}->read($input); } else { $xfer += $input->skip($ftype); @@ -2092,7 +2095,7 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timRemoteUserGet_result'); if (defined $self->{success}) { - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $output->writeFieldBegin('success', Thrift::TType::STRUCT, 0); $xfer += $self->{success}->write($output); $xfer += $output->writeFieldEnd(); } @@ -2137,30 +2140,30 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{tid} = new Tid(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{tid} = Tid->new(); $xfer += $self->{tid}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRUCT) { - $self->{ub} = new TimUserBean(); + /^2$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{ub} = TimUserBean->new(); $xfer += $self->{ub}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::STRUCT) { - $self->{auth} = new TimAuth(); + /^3$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{auth} = TimAuth->new(); $xfer += $self->{auth}->read($input); } else { $xfer += $input->skip($ftype); @@ -2179,17 +2182,17 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timRemoteUserEdit_args'); if (defined $self->{tid}) { - $xfer += $output->writeFieldBegin('tid', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('tid', Thrift::TType::STRUCT, 1); $xfer += $self->{tid}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{ub}) { - $xfer += $output->writeFieldBegin('ub', TType::STRUCT, 2); + $xfer += $output->writeFieldBegin('ub', Thrift::TType::STRUCT, 2); $xfer += $self->{ub}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{auth}) { - $xfer += $output->writeFieldBegin('auth', TType::STRUCT, 3); + $xfer += $output->writeFieldBegin('auth', Thrift::TType::STRUCT, 3); $xfer += $self->{auth}->write($output); $xfer += $output->writeFieldEnd(); } @@ -2226,16 +2229,16 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^0$/ && do{ if ($ftype == TType::STRUCT) { - $self->{success} = new TimRemoteUserBean(); + /^0$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{success} = TimRemoteUserBean->new(); $xfer += $self->{success}->read($input); } else { $xfer += $input->skip($ftype); @@ -2254,7 +2257,7 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timRemoteUserEdit_result'); if (defined $self->{success}) { - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $output->writeFieldBegin('success', Thrift::TType::STRUCT, 0); $xfer += $self->{success}->write($output); $xfer += $output->writeFieldEnd(); } @@ -2295,23 +2298,23 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{pbean} = new TimPBean(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{pbean} = TimPBean->new(); $xfer += $self->{pbean}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRUCT) { - $self->{auth} = new TimAuth(); + /^2$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{auth} = TimAuth->new(); $xfer += $self->{auth}->read($input); } else { $xfer += $input->skip($ftype); @@ -2330,12 +2333,12 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timResponsePresence_args'); if (defined $self->{pbean}) { - $xfer += $output->writeFieldBegin('pbean', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('pbean', Thrift::TType::STRUCT, 1); $xfer += $self->{pbean}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{auth}) { - $xfer += $output->writeFieldBegin('auth', TType::STRUCT, 2); + $xfer += $output->writeFieldBegin('auth', Thrift::TType::STRUCT, 2); $xfer += $self->{auth}->write($output); $xfer += $output->writeFieldEnd(); } @@ -2372,16 +2375,16 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^0$/ && do{ if ($ftype == TType::STRUCT) { - $self->{success} = new TimResponseBean(); + /^0$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{success} = TimResponseBean->new(); $xfer += $self->{success}->read($input); } else { $xfer += $input->skip($ftype); @@ -2400,7 +2403,7 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timResponsePresence_result'); if (defined $self->{success}) { - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $output->writeFieldBegin('success', Thrift::TType::STRUCT, 0); $xfer += $self->{success}->write($output); $xfer += $output->writeFieldEnd(); } @@ -2441,23 +2444,23 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{mbean} = new TimMBean(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{mbean} = TimMBean->new(); $xfer += $self->{mbean}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRUCT) { - $self->{auth} = new TimAuth(); + /^2$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{auth} = TimAuth->new(); $xfer += $self->{auth}->read($input); } else { $xfer += $input->skip($ftype); @@ -2476,12 +2479,12 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timResponseMessage_args'); if (defined $self->{mbean}) { - $xfer += $output->writeFieldBegin('mbean', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('mbean', Thrift::TType::STRUCT, 1); $xfer += $self->{mbean}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{auth}) { - $xfer += $output->writeFieldBegin('auth', TType::STRUCT, 2); + $xfer += $output->writeFieldBegin('auth', Thrift::TType::STRUCT, 2); $xfer += $self->{auth}->write($output); $xfer += $output->writeFieldEnd(); } @@ -2518,16 +2521,16 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^0$/ && do{ if ($ftype == TType::STRUCT) { - $self->{success} = new TimResponseBean(); + /^0$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{success} = TimResponseBean->new(); $xfer += $self->{success}->read($input); } else { $xfer += $input->skip($ftype); @@ -2546,7 +2549,7 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timResponseMessage_result'); if (defined $self->{success}) { - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $output->writeFieldBegin('success', Thrift::TType::STRUCT, 0); $xfer += $self->{success}->write($output); $xfer += $output->writeFieldEnd(); } @@ -2591,29 +2594,29 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{timMsgIq} = new TimMessageIq(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{timMsgIq} = TimMessageIq->new(); $xfer += $self->{timMsgIq}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRING) { + /^2$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{iqType}); } else { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::STRUCT) { - $self->{auth} = new TimAuth(); + /^3$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{auth} = TimAuth->new(); $xfer += $self->{auth}->read($input); } else { $xfer += $input->skip($ftype); @@ -2632,17 +2635,17 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timResponseMessageIq_args'); if (defined $self->{timMsgIq}) { - $xfer += $output->writeFieldBegin('timMsgIq', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('timMsgIq', Thrift::TType::STRUCT, 1); $xfer += $self->{timMsgIq}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{iqType}) { - $xfer += $output->writeFieldBegin('iqType', TType::STRING, 2); + $xfer += $output->writeFieldBegin('iqType', Thrift::TType::STRING, 2); $xfer += $output->writeString($self->{iqType}); $xfer += $output->writeFieldEnd(); } if (defined $self->{auth}) { - $xfer += $output->writeFieldBegin('auth', TType::STRUCT, 3); + $xfer += $output->writeFieldBegin('auth', Thrift::TType::STRUCT, 3); $xfer += $self->{auth}->write($output); $xfer += $output->writeFieldEnd(); } @@ -2679,16 +2682,16 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^0$/ && do{ if ($ftype == TType::STRUCT) { - $self->{success} = new TimMBeanList(); + /^0$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{success} = TimMBeanList->new(); $xfer += $self->{success}->read($input); } else { $xfer += $input->skip($ftype); @@ -2707,7 +2710,7 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timResponseMessageIq_result'); if (defined $self->{success}) { - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $output->writeFieldBegin('success', Thrift::TType::STRUCT, 0); $xfer += $self->{success}->write($output); $xfer += $output->writeFieldEnd(); } @@ -2748,23 +2751,23 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{pbeanList} = new TimPBeanList(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{pbeanList} = TimPBeanList->new(); $xfer += $self->{pbeanList}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRUCT) { - $self->{auth} = new TimAuth(); + /^2$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{auth} = TimAuth->new(); $xfer += $self->{auth}->read($input); } else { $xfer += $input->skip($ftype); @@ -2783,12 +2786,12 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timResponsePresenceList_args'); if (defined $self->{pbeanList}) { - $xfer += $output->writeFieldBegin('pbeanList', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('pbeanList', Thrift::TType::STRUCT, 1); $xfer += $self->{pbeanList}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{auth}) { - $xfer += $output->writeFieldBegin('auth', TType::STRUCT, 2); + $xfer += $output->writeFieldBegin('auth', Thrift::TType::STRUCT, 2); $xfer += $self->{auth}->write($output); $xfer += $output->writeFieldEnd(); } @@ -2825,16 +2828,16 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^0$/ && do{ if ($ftype == TType::STRUCT) { - $self->{success} = new TimResponseBean(); + /^0$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{success} = TimResponseBean->new(); $xfer += $self->{success}->read($input); } else { $xfer += $input->skip($ftype); @@ -2853,7 +2856,7 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timResponsePresenceList_result'); if (defined $self->{success}) { - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $output->writeFieldBegin('success', Thrift::TType::STRUCT, 0); $xfer += $self->{success}->write($output); $xfer += $output->writeFieldEnd(); } @@ -2894,23 +2897,23 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{mbeanList} = new TimMBeanList(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{mbeanList} = TimMBeanList->new(); $xfer += $self->{mbeanList}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRUCT) { - $self->{auth} = new TimAuth(); + /^2$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{auth} = TimAuth->new(); $xfer += $self->{auth}->read($input); } else { $xfer += $input->skip($ftype); @@ -2929,12 +2932,12 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timResponseMessageList_args'); if (defined $self->{mbeanList}) { - $xfer += $output->writeFieldBegin('mbeanList', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('mbeanList', Thrift::TType::STRUCT, 1); $xfer += $self->{mbeanList}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{auth}) { - $xfer += $output->writeFieldBegin('auth', TType::STRUCT, 2); + $xfer += $output->writeFieldBegin('auth', Thrift::TType::STRUCT, 2); $xfer += $self->{auth}->write($output); $xfer += $output->writeFieldEnd(); } @@ -2971,16 +2974,16 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^0$/ && do{ if ($ftype == TType::STRUCT) { - $self->{success} = new TimResponseBean(); + /^0$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{success} = TimResponseBean->new(); $xfer += $self->{success}->read($input); } else { $xfer += $input->skip($ftype); @@ -2999,7 +3002,7 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('ITim_timResponseMessageList_result'); if (defined $self->{success}) { - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $output->writeFieldBegin('success', Thrift::TType::STRUCT, 0); $xfer += $self->{success}->write($output); $xfer += $output->writeFieldEnd(); } @@ -3409,8 +3412,8 @@ sub send_timStream{ my $self = shift; my $param = shift; - $self->{output}->writeMessageBegin('timStream', TMessageType::ONEWAY, $self->{seqid}); - my $args = new ITim_timStream_args(); + $self->{output}->writeMessageBegin('timStream', Thrift::TMessageType::ONEWAY, $self->{seqid}); + my $args = ITim_timStream_args->new(); $args->{param} = $param; $args->write($self->{output}); $self->{output}->writeMessageEnd(); @@ -3425,8 +3428,8 @@ sub timStarttls{ sub send_timStarttls{ my $self = shift; - $self->{output}->writeMessageBegin('timStarttls', TMessageType::ONEWAY, $self->{seqid}); - my $args = new ITim_timStarttls_args(); + $self->{output}->writeMessageBegin('timStarttls', Thrift::TMessageType::ONEWAY, $self->{seqid}); + my $args = ITim_timStarttls_args->new(); $args->write($self->{output}); $self->{output}->writeMessageEnd(); $self->{output}->getTransport()->flush(); @@ -3444,8 +3447,8 @@ sub send_timLogin{ my $tid = shift; my $pwd = shift; - $self->{output}->writeMessageBegin('timLogin', TMessageType::ONEWAY, $self->{seqid}); - my $args = new ITim_timLogin_args(); + $self->{output}->writeMessageBegin('timLogin', Thrift::TMessageType::ONEWAY, $self->{seqid}); + my $args = ITim_timLogin_args->new(); $args->{tid} = $tid; $args->{pwd} = $pwd; $args->write($self->{output}); @@ -3463,8 +3466,8 @@ sub send_timAck{ my $self = shift; my $ab = shift; - $self->{output}->writeMessageBegin('timAck', TMessageType::ONEWAY, $self->{seqid}); - my $args = new ITim_timAck_args(); + $self->{output}->writeMessageBegin('timAck', Thrift::TMessageType::ONEWAY, $self->{seqid}); + my $args = ITim_timAck_args->new(); $args->{ab} = $ab; $args->write($self->{output}); $self->{output}->writeMessageEnd(); @@ -3481,8 +3484,8 @@ sub send_timPresence{ my $self = shift; my $pbean = shift; - $self->{output}->writeMessageBegin('timPresence', TMessageType::ONEWAY, $self->{seqid}); - my $args = new ITim_timPresence_args(); + $self->{output}->writeMessageBegin('timPresence', Thrift::TMessageType::ONEWAY, $self->{seqid}); + my $args = ITim_timPresence_args->new(); $args->{pbean} = $pbean; $args->write($self->{output}); $self->{output}->writeMessageEnd(); @@ -3499,8 +3502,8 @@ sub send_timMessage{ my $self = shift; my $mbean = shift; - $self->{output}->writeMessageBegin('timMessage', TMessageType::ONEWAY, $self->{seqid}); - my $args = new ITim_timMessage_args(); + $self->{output}->writeMessageBegin('timMessage', Thrift::TMessageType::ONEWAY, $self->{seqid}); + my $args = ITim_timMessage_args->new(); $args->{mbean} = $mbean; $args->write($self->{output}); $self->{output}->writeMessageEnd(); @@ -3517,8 +3520,8 @@ sub send_timPing{ my $self = shift; my $threadId = shift; - $self->{output}->writeMessageBegin('timPing', TMessageType::ONEWAY, $self->{seqid}); - my $args = new ITim_timPing_args(); + $self->{output}->writeMessageBegin('timPing', Thrift::TMessageType::ONEWAY, $self->{seqid}); + my $args = ITim_timPing_args->new(); $args->{threadId} = $threadId; $args->write($self->{output}); $self->{output}->writeMessageEnd(); @@ -3535,8 +3538,8 @@ sub send_timError{ my $self = shift; my $e = shift; - $self->{output}->writeMessageBegin('timError', TMessageType::ONEWAY, $self->{seqid}); - my $args = new ITim_timError_args(); + $self->{output}->writeMessageBegin('timError', Thrift::TMessageType::ONEWAY, $self->{seqid}); + my $args = ITim_timError_args->new(); $args->{e} = $e; $args->write($self->{output}); $self->{output}->writeMessageEnd(); @@ -3551,8 +3554,8 @@ sub timLogout{ sub send_timLogout{ my $self = shift; - $self->{output}->writeMessageBegin('timLogout', TMessageType::ONEWAY, $self->{seqid}); - my $args = new ITim_timLogout_args(); + $self->{output}->writeMessageBegin('timLogout', Thrift::TMessageType::ONEWAY, $self->{seqid}); + my $args = ITim_timLogout_args->new(); $args->write($self->{output}); $self->{output}->writeMessageEnd(); $self->{output}->getTransport()->flush(); @@ -3570,8 +3573,8 @@ sub send_timRegist{ my $tid = shift; my $auth = shift; - $self->{output}->writeMessageBegin('timRegist', TMessageType::ONEWAY, $self->{seqid}); - my $args = new ITim_timRegist_args(); + $self->{output}->writeMessageBegin('timRegist', Thrift::TMessageType::ONEWAY, $self->{seqid}); + my $args = ITim_timRegist_args->new(); $args->{tid} = $tid; $args->{auth} = $auth; $args->write($self->{output}); @@ -3589,8 +3592,8 @@ sub send_timRoser{ my $self = shift; my $roster = shift; - $self->{output}->writeMessageBegin('timRoser', TMessageType::ONEWAY, $self->{seqid}); - my $args = new ITim_timRoser_args(); + $self->{output}->writeMessageBegin('timRoser', Thrift::TMessageType::ONEWAY, $self->{seqid}); + my $args = ITim_timRoser_args->new(); $args->{roster} = $roster; $args->write($self->{output}); $self->{output}->writeMessageEnd(); @@ -3607,8 +3610,8 @@ sub send_timMessageList{ my $self = shift; my $mbeanList = shift; - $self->{output}->writeMessageBegin('timMessageList', TMessageType::ONEWAY, $self->{seqid}); - my $args = new ITim_timMessageList_args(); + $self->{output}->writeMessageBegin('timMessageList', Thrift::TMessageType::ONEWAY, $self->{seqid}); + my $args = ITim_timMessageList_args->new(); $args->{mbeanList} = $mbeanList; $args->write($self->{output}); $self->{output}->writeMessageEnd(); @@ -3625,8 +3628,8 @@ sub send_timPresenceList{ my $self = shift; my $pbeanList = shift; - $self->{output}->writeMessageBegin('timPresenceList', TMessageType::ONEWAY, $self->{seqid}); - my $args = new ITim_timPresenceList_args(); + $self->{output}->writeMessageBegin('timPresenceList', Thrift::TMessageType::ONEWAY, $self->{seqid}); + my $args = ITim_timPresenceList_args->new(); $args->{pbeanList} = $pbeanList; $args->write($self->{output}); $self->{output}->writeMessageEnd(); @@ -3645,8 +3648,8 @@ sub send_timMessageIq{ my $timMsgIq = shift; my $iqType = shift; - $self->{output}->writeMessageBegin('timMessageIq', TMessageType::ONEWAY, $self->{seqid}); - my $args = new ITim_timMessageIq_args(); + $self->{output}->writeMessageBegin('timMessageIq', Thrift::TMessageType::ONEWAY, $self->{seqid}); + my $args = ITim_timMessageIq_args->new(); $args->{timMsgIq} = $timMsgIq; $args->{iqType} = $iqType; $args->write($self->{output}); @@ -3664,8 +3667,8 @@ sub send_timMessageResult{ my $self = shift; my $mbean = shift; - $self->{output}->writeMessageBegin('timMessageResult', TMessageType::ONEWAY, $self->{seqid}); - my $args = new ITim_timMessageResult_args(); + $self->{output}->writeMessageBegin('timMessageResult', Thrift::TMessageType::ONEWAY, $self->{seqid}); + my $args = ITim_timMessageResult_args->new(); $args->{mbean} = $mbean; $args->write($self->{output}); $self->{output}->writeMessageEnd(); @@ -3682,8 +3685,8 @@ sub send_timProperty{ my $self = shift; my $tpb = shift; - $self->{output}->writeMessageBegin('timProperty', TMessageType::ONEWAY, $self->{seqid}); - my $args = new ITim_timProperty_args(); + $self->{output}->writeMessageBegin('timProperty', Thrift::TMessageType::ONEWAY, $self->{seqid}); + my $args = ITim_timProperty_args->new(); $args->{tpb} = $tpb; $args->write($self->{output}); $self->{output}->writeMessageEnd(); @@ -3705,8 +3708,8 @@ sub send_timRemoteUserAuth{ my $pwd = shift; my $auth = shift; - $self->{output}->writeMessageBegin('timRemoteUserAuth', TMessageType::CALL, $self->{seqid}); - my $args = new ITim_timRemoteUserAuth_args(); + $self->{output}->writeMessageBegin('timRemoteUserAuth', Thrift::TMessageType::CALL, $self->{seqid}); + my $args = ITim_timRemoteUserAuth_args->new(); $args->{tid} = $tid; $args->{pwd} = $pwd; $args->{auth} = $auth; @@ -3723,13 +3726,13 @@ sub recv_timRemoteUserAuth{ my $mtype = 0; $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); - if ($mtype == TMessageType::EXCEPTION) { - my $x = new TApplicationException(); + if ($mtype == Thrift::TMessageType::EXCEPTION) { + my $x = Thrift::TApplicationException->new(); $x->read($self->{input}); $self->{input}->readMessageEnd(); die $x; } - my $result = new ITim_timRemoteUserAuth_result(); + my $result = ITim_timRemoteUserAuth_result->new(); $result->read($self->{input}); $self->{input}->readMessageEnd(); @@ -3752,8 +3755,8 @@ sub send_timRemoteUserGet{ my $tid = shift; my $auth = shift; - $self->{output}->writeMessageBegin('timRemoteUserGet', TMessageType::CALL, $self->{seqid}); - my $args = new ITim_timRemoteUserGet_args(); + $self->{output}->writeMessageBegin('timRemoteUserGet', Thrift::TMessageType::CALL, $self->{seqid}); + my $args = ITim_timRemoteUserGet_args->new(); $args->{tid} = $tid; $args->{auth} = $auth; $args->write($self->{output}); @@ -3769,13 +3772,13 @@ sub recv_timRemoteUserGet{ my $mtype = 0; $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); - if ($mtype == TMessageType::EXCEPTION) { - my $x = new TApplicationException(); + if ($mtype == Thrift::TMessageType::EXCEPTION) { + my $x = Thrift::TApplicationException->new(); $x->read($self->{input}); $self->{input}->readMessageEnd(); die $x; } - my $result = new ITim_timRemoteUserGet_result(); + my $result = ITim_timRemoteUserGet_result->new(); $result->read($self->{input}); $self->{input}->readMessageEnd(); @@ -3800,8 +3803,8 @@ sub send_timRemoteUserEdit{ my $ub = shift; my $auth = shift; - $self->{output}->writeMessageBegin('timRemoteUserEdit', TMessageType::CALL, $self->{seqid}); - my $args = new ITim_timRemoteUserEdit_args(); + $self->{output}->writeMessageBegin('timRemoteUserEdit', Thrift::TMessageType::CALL, $self->{seqid}); + my $args = ITim_timRemoteUserEdit_args->new(); $args->{tid} = $tid; $args->{ub} = $ub; $args->{auth} = $auth; @@ -3818,13 +3821,13 @@ sub recv_timRemoteUserEdit{ my $mtype = 0; $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); - if ($mtype == TMessageType::EXCEPTION) { - my $x = new TApplicationException(); + if ($mtype == Thrift::TMessageType::EXCEPTION) { + my $x = Thrift::TApplicationException->new(); $x->read($self->{input}); $self->{input}->readMessageEnd(); die $x; } - my $result = new ITim_timRemoteUserEdit_result(); + my $result = ITim_timRemoteUserEdit_result->new(); $result->read($self->{input}); $self->{input}->readMessageEnd(); @@ -3847,8 +3850,8 @@ sub send_timResponsePresence{ my $pbean = shift; my $auth = shift; - $self->{output}->writeMessageBegin('timResponsePresence', TMessageType::CALL, $self->{seqid}); - my $args = new ITim_timResponsePresence_args(); + $self->{output}->writeMessageBegin('timResponsePresence', Thrift::TMessageType::CALL, $self->{seqid}); + my $args = ITim_timResponsePresence_args->new(); $args->{pbean} = $pbean; $args->{auth} = $auth; $args->write($self->{output}); @@ -3864,13 +3867,13 @@ sub recv_timResponsePresence{ my $mtype = 0; $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); - if ($mtype == TMessageType::EXCEPTION) { - my $x = new TApplicationException(); + if ($mtype == Thrift::TMessageType::EXCEPTION) { + my $x = Thrift::TApplicationException->new(); $x->read($self->{input}); $self->{input}->readMessageEnd(); die $x; } - my $result = new ITim_timResponsePresence_result(); + my $result = ITim_timResponsePresence_result->new(); $result->read($self->{input}); $self->{input}->readMessageEnd(); @@ -3893,8 +3896,8 @@ sub send_timResponseMessage{ my $mbean = shift; my $auth = shift; - $self->{output}->writeMessageBegin('timResponseMessage', TMessageType::CALL, $self->{seqid}); - my $args = new ITim_timResponseMessage_args(); + $self->{output}->writeMessageBegin('timResponseMessage', Thrift::TMessageType::CALL, $self->{seqid}); + my $args = ITim_timResponseMessage_args->new(); $args->{mbean} = $mbean; $args->{auth} = $auth; $args->write($self->{output}); @@ -3910,13 +3913,13 @@ sub recv_timResponseMessage{ my $mtype = 0; $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); - if ($mtype == TMessageType::EXCEPTION) { - my $x = new TApplicationException(); + if ($mtype == Thrift::TMessageType::EXCEPTION) { + my $x = Thrift::TApplicationException->new(); $x->read($self->{input}); $self->{input}->readMessageEnd(); die $x; } - my $result = new ITim_timResponseMessage_result(); + my $result = ITim_timResponseMessage_result->new(); $result->read($self->{input}); $self->{input}->readMessageEnd(); @@ -3941,8 +3944,8 @@ sub send_timResponseMessageIq{ my $iqType = shift; my $auth = shift; - $self->{output}->writeMessageBegin('timResponseMessageIq', TMessageType::CALL, $self->{seqid}); - my $args = new ITim_timResponseMessageIq_args(); + $self->{output}->writeMessageBegin('timResponseMessageIq', Thrift::TMessageType::CALL, $self->{seqid}); + my $args = ITim_timResponseMessageIq_args->new(); $args->{timMsgIq} = $timMsgIq; $args->{iqType} = $iqType; $args->{auth} = $auth; @@ -3959,13 +3962,13 @@ sub recv_timResponseMessageIq{ my $mtype = 0; $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); - if ($mtype == TMessageType::EXCEPTION) { - my $x = new TApplicationException(); + if ($mtype == Thrift::TMessageType::EXCEPTION) { + my $x = Thrift::TApplicationException->new(); $x->read($self->{input}); $self->{input}->readMessageEnd(); die $x; } - my $result = new ITim_timResponseMessageIq_result(); + my $result = ITim_timResponseMessageIq_result->new(); $result->read($self->{input}); $self->{input}->readMessageEnd(); @@ -3988,8 +3991,8 @@ sub send_timResponsePresenceList{ my $pbeanList = shift; my $auth = shift; - $self->{output}->writeMessageBegin('timResponsePresenceList', TMessageType::CALL, $self->{seqid}); - my $args = new ITim_timResponsePresenceList_args(); + $self->{output}->writeMessageBegin('timResponsePresenceList', Thrift::TMessageType::CALL, $self->{seqid}); + my $args = ITim_timResponsePresenceList_args->new(); $args->{pbeanList} = $pbeanList; $args->{auth} = $auth; $args->write($self->{output}); @@ -4005,13 +4008,13 @@ sub recv_timResponsePresenceList{ my $mtype = 0; $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); - if ($mtype == TMessageType::EXCEPTION) { - my $x = new TApplicationException(); + if ($mtype == Thrift::TMessageType::EXCEPTION) { + my $x = Thrift::TApplicationException->new(); $x->read($self->{input}); $self->{input}->readMessageEnd(); die $x; } - my $result = new ITim_timResponsePresenceList_result(); + my $result = ITim_timResponsePresenceList_result->new(); $result->read($self->{input}); $self->{input}->readMessageEnd(); @@ -4034,8 +4037,8 @@ sub send_timResponseMessageList{ my $mbeanList = shift; my $auth = shift; - $self->{output}->writeMessageBegin('timResponseMessageList', TMessageType::CALL, $self->{seqid}); - my $args = new ITim_timResponseMessageList_args(); + $self->{output}->writeMessageBegin('timResponseMessageList', Thrift::TMessageType::CALL, $self->{seqid}); + my $args = ITim_timResponseMessageList_args->new(); $args->{mbeanList} = $mbeanList; $args->{auth} = $auth; $args->write($self->{output}); @@ -4051,13 +4054,13 @@ sub recv_timResponseMessageList{ my $mtype = 0; $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); - if ($mtype == TMessageType::EXCEPTION) { - my $x = new TApplicationException(); + if ($mtype == Thrift::TMessageType::EXCEPTION) { + my $x = Thrift::TApplicationException->new(); $x->read($self->{input}); $self->{input}->readMessageEnd(); die $x; } - my $result = new ITim_timResponseMessageList_result(); + my $result = ITim_timResponseMessageList_result->new(); $result->read($self->{input}); $self->{input}->readMessageEnd(); @@ -4087,10 +4090,10 @@ sub process { $input->readMessageBegin(\$fname, \$mtype, \$rseqid); my $methodname = 'process_'.$fname; if (!$self->can($methodname)) { - $input->skip(TType::STRUCT); + $input->skip(Thrift::TType::STRUCT); $input->readMessageEnd(); - my $x = new TApplicationException('Function '.$fname.' not implemented.', TApplicationException::UNKNOWN_METHOD); - $output->writeMessageBegin($fname, TMessageType::EXCEPTION, $rseqid); + my $x = Thrift::TApplicationException->new('Function '.$fname.' not implemented.', Thrift::TApplicationException::UNKNOWN_METHOD); + $output->writeMessageBegin($fname, Thrift::TMessageType::EXCEPTION, $rseqid); $x->write($output); $output->writeMessageEnd(); $output->getTransport()->flush(); @@ -4102,7 +4105,7 @@ sub process { sub process_timStream { my ($self, $seqid, $input, $output) = @_; - my $args = new ITim_timStream_args(); + my $args = ITim_timStream_args->new(); $args->read($input); $input->readMessageEnd(); $self->{handler}->timStream($args->param); @@ -4110,7 +4113,7 @@ sub process_timStream { } sub process_timStarttls { my ($self, $seqid, $input, $output) = @_; - my $args = new ITim_timStarttls_args(); + my $args = ITim_timStarttls_args->new(); $args->read($input); $input->readMessageEnd(); $self->{handler}->timStarttls(); @@ -4118,7 +4121,7 @@ sub process_timStarttls { } sub process_timLogin { my ($self, $seqid, $input, $output) = @_; - my $args = new ITim_timLogin_args(); + my $args = ITim_timLogin_args->new(); $args->read($input); $input->readMessageEnd(); $self->{handler}->timLogin($args->tid, $args->pwd); @@ -4126,7 +4129,7 @@ sub process_timLogin { } sub process_timAck { my ($self, $seqid, $input, $output) = @_; - my $args = new ITim_timAck_args(); + my $args = ITim_timAck_args->new(); $args->read($input); $input->readMessageEnd(); $self->{handler}->timAck($args->ab); @@ -4134,7 +4137,7 @@ sub process_timAck { } sub process_timPresence { my ($self, $seqid, $input, $output) = @_; - my $args = new ITim_timPresence_args(); + my $args = ITim_timPresence_args->new(); $args->read($input); $input->readMessageEnd(); $self->{handler}->timPresence($args->pbean); @@ -4142,7 +4145,7 @@ sub process_timPresence { } sub process_timMessage { my ($self, $seqid, $input, $output) = @_; - my $args = new ITim_timMessage_args(); + my $args = ITim_timMessage_args->new(); $args->read($input); $input->readMessageEnd(); $self->{handler}->timMessage($args->mbean); @@ -4150,7 +4153,7 @@ sub process_timMessage { } sub process_timPing { my ($self, $seqid, $input, $output) = @_; - my $args = new ITim_timPing_args(); + my $args = ITim_timPing_args->new(); $args->read($input); $input->readMessageEnd(); $self->{handler}->timPing($args->threadId); @@ -4158,7 +4161,7 @@ sub process_timPing { } sub process_timError { my ($self, $seqid, $input, $output) = @_; - my $args = new ITim_timError_args(); + my $args = ITim_timError_args->new(); $args->read($input); $input->readMessageEnd(); $self->{handler}->timError($args->e); @@ -4166,7 +4169,7 @@ sub process_timError { } sub process_timLogout { my ($self, $seqid, $input, $output) = @_; - my $args = new ITim_timLogout_args(); + my $args = ITim_timLogout_args->new(); $args->read($input); $input->readMessageEnd(); $self->{handler}->timLogout(); @@ -4174,7 +4177,7 @@ sub process_timLogout { } sub process_timRegist { my ($self, $seqid, $input, $output) = @_; - my $args = new ITim_timRegist_args(); + my $args = ITim_timRegist_args->new(); $args->read($input); $input->readMessageEnd(); $self->{handler}->timRegist($args->tid, $args->auth); @@ -4182,7 +4185,7 @@ sub process_timRegist { } sub process_timRoser { my ($self, $seqid, $input, $output) = @_; - my $args = new ITim_timRoser_args(); + my $args = ITim_timRoser_args->new(); $args->read($input); $input->readMessageEnd(); $self->{handler}->timRoser($args->roster); @@ -4190,7 +4193,7 @@ sub process_timRoser { } sub process_timMessageList { my ($self, $seqid, $input, $output) = @_; - my $args = new ITim_timMessageList_args(); + my $args = ITim_timMessageList_args->new(); $args->read($input); $input->readMessageEnd(); $self->{handler}->timMessageList($args->mbeanList); @@ -4198,7 +4201,7 @@ sub process_timMessageList { } sub process_timPresenceList { my ($self, $seqid, $input, $output) = @_; - my $args = new ITim_timPresenceList_args(); + my $args = ITim_timPresenceList_args->new(); $args->read($input); $input->readMessageEnd(); $self->{handler}->timPresenceList($args->pbeanList); @@ -4206,7 +4209,7 @@ sub process_timPresenceList { } sub process_timMessageIq { my ($self, $seqid, $input, $output) = @_; - my $args = new ITim_timMessageIq_args(); + my $args = ITim_timMessageIq_args->new(); $args->read($input); $input->readMessageEnd(); $self->{handler}->timMessageIq($args->timMsgIq, $args->iqType); @@ -4214,7 +4217,7 @@ sub process_timMessageIq { } sub process_timMessageResult { my ($self, $seqid, $input, $output) = @_; - my $args = new ITim_timMessageResult_args(); + my $args = ITim_timMessageResult_args->new(); $args->read($input); $input->readMessageEnd(); $self->{handler}->timMessageResult($args->mbean); @@ -4222,7 +4225,7 @@ sub process_timMessageResult { } sub process_timProperty { my ($self, $seqid, $input, $output) = @_; - my $args = new ITim_timProperty_args(); + my $args = ITim_timProperty_args->new(); $args->read($input); $input->readMessageEnd(); $self->{handler}->timProperty($args->tpb); @@ -4230,12 +4233,12 @@ sub process_timProperty { } sub process_timRemoteUserAuth { my ($self, $seqid, $input, $output) = @_; - my $args = new ITim_timRemoteUserAuth_args(); + my $args = ITim_timRemoteUserAuth_args->new(); $args->read($input); $input->readMessageEnd(); - my $result = new ITim_timRemoteUserAuth_result(); + my $result = ITim_timRemoteUserAuth_result->new(); $result->{success} = $self->{handler}->timRemoteUserAuth($args->tid, $args->pwd, $args->auth); - $output->writeMessageBegin('timRemoteUserAuth', TMessageType::REPLY, $seqid); + $output->writeMessageBegin('timRemoteUserAuth', Thrift::TMessageType::REPLY, $seqid); $result->write($output); $output->writeMessageEnd(); $output->getTransport()->flush(); @@ -4243,12 +4246,12 @@ sub process_timRemoteUserAuth { sub process_timRemoteUserGet { my ($self, $seqid, $input, $output) = @_; - my $args = new ITim_timRemoteUserGet_args(); + my $args = ITim_timRemoteUserGet_args->new(); $args->read($input); $input->readMessageEnd(); - my $result = new ITim_timRemoteUserGet_result(); + my $result = ITim_timRemoteUserGet_result->new(); $result->{success} = $self->{handler}->timRemoteUserGet($args->tid, $args->auth); - $output->writeMessageBegin('timRemoteUserGet', TMessageType::REPLY, $seqid); + $output->writeMessageBegin('timRemoteUserGet', Thrift::TMessageType::REPLY, $seqid); $result->write($output); $output->writeMessageEnd(); $output->getTransport()->flush(); @@ -4256,12 +4259,12 @@ sub process_timRemoteUserGet { sub process_timRemoteUserEdit { my ($self, $seqid, $input, $output) = @_; - my $args = new ITim_timRemoteUserEdit_args(); + my $args = ITim_timRemoteUserEdit_args->new(); $args->read($input); $input->readMessageEnd(); - my $result = new ITim_timRemoteUserEdit_result(); + my $result = ITim_timRemoteUserEdit_result->new(); $result->{success} = $self->{handler}->timRemoteUserEdit($args->tid, $args->ub, $args->auth); - $output->writeMessageBegin('timRemoteUserEdit', TMessageType::REPLY, $seqid); + $output->writeMessageBegin('timRemoteUserEdit', Thrift::TMessageType::REPLY, $seqid); $result->write($output); $output->writeMessageEnd(); $output->getTransport()->flush(); @@ -4269,12 +4272,12 @@ sub process_timRemoteUserEdit { sub process_timResponsePresence { my ($self, $seqid, $input, $output) = @_; - my $args = new ITim_timResponsePresence_args(); + my $args = ITim_timResponsePresence_args->new(); $args->read($input); $input->readMessageEnd(); - my $result = new ITim_timResponsePresence_result(); + my $result = ITim_timResponsePresence_result->new(); $result->{success} = $self->{handler}->timResponsePresence($args->pbean, $args->auth); - $output->writeMessageBegin('timResponsePresence', TMessageType::REPLY, $seqid); + $output->writeMessageBegin('timResponsePresence', Thrift::TMessageType::REPLY, $seqid); $result->write($output); $output->writeMessageEnd(); $output->getTransport()->flush(); @@ -4282,12 +4285,12 @@ sub process_timResponsePresence { sub process_timResponseMessage { my ($self, $seqid, $input, $output) = @_; - my $args = new ITim_timResponseMessage_args(); + my $args = ITim_timResponseMessage_args->new(); $args->read($input); $input->readMessageEnd(); - my $result = new ITim_timResponseMessage_result(); + my $result = ITim_timResponseMessage_result->new(); $result->{success} = $self->{handler}->timResponseMessage($args->mbean, $args->auth); - $output->writeMessageBegin('timResponseMessage', TMessageType::REPLY, $seqid); + $output->writeMessageBegin('timResponseMessage', Thrift::TMessageType::REPLY, $seqid); $result->write($output); $output->writeMessageEnd(); $output->getTransport()->flush(); @@ -4295,12 +4298,12 @@ sub process_timResponseMessage { sub process_timResponseMessageIq { my ($self, $seqid, $input, $output) = @_; - my $args = new ITim_timResponseMessageIq_args(); + my $args = ITim_timResponseMessageIq_args->new(); $args->read($input); $input->readMessageEnd(); - my $result = new ITim_timResponseMessageIq_result(); + my $result = ITim_timResponseMessageIq_result->new(); $result->{success} = $self->{handler}->timResponseMessageIq($args->timMsgIq, $args->iqType, $args->auth); - $output->writeMessageBegin('timResponseMessageIq', TMessageType::REPLY, $seqid); + $output->writeMessageBegin('timResponseMessageIq', Thrift::TMessageType::REPLY, $seqid); $result->write($output); $output->writeMessageEnd(); $output->getTransport()->flush(); @@ -4308,12 +4311,12 @@ sub process_timResponseMessageIq { sub process_timResponsePresenceList { my ($self, $seqid, $input, $output) = @_; - my $args = new ITim_timResponsePresenceList_args(); + my $args = ITim_timResponsePresenceList_args->new(); $args->read($input); $input->readMessageEnd(); - my $result = new ITim_timResponsePresenceList_result(); + my $result = ITim_timResponsePresenceList_result->new(); $result->{success} = $self->{handler}->timResponsePresenceList($args->pbeanList, $args->auth); - $output->writeMessageBegin('timResponsePresenceList', TMessageType::REPLY, $seqid); + $output->writeMessageBegin('timResponsePresenceList', Thrift::TMessageType::REPLY, $seqid); $result->write($output); $output->writeMessageEnd(); $output->getTransport()->flush(); @@ -4321,12 +4324,12 @@ sub process_timResponsePresenceList { sub process_timResponseMessageList { my ($self, $seqid, $input, $output) = @_; - my $args = new ITim_timResponseMessageList_args(); + my $args = ITim_timResponseMessageList_args->new(); $args->read($input); $input->readMessageEnd(); - my $result = new ITim_timResponseMessageList_result(); + my $result = ITim_timResponseMessageList_result->new(); $result->{success} = $self->{handler}->timResponseMessageList($args->mbeanList, $args->auth); - $output->writeMessageBegin('timResponseMessageList', TMessageType::REPLY, $seqid); + $output->writeMessageBegin('timResponseMessageList', Thrift::TMessageType::REPLY, $seqid); $result->write($output); $output->writeMessageEnd(); $output->getTransport()->flush(); diff --git a/protocols/gen-perl/Types.pm b/protocols/gen-perl/Types.pm index 2f7f3d8..e8b79b5 100644 --- a/protocols/gen-perl/Types.pm +++ b/protocols/gen-perl/Types.pm @@ -1,12 +1,15 @@ # -# Autogenerated by Thrift Compiler (0.9.3) +# Autogenerated by Thrift Compiler (0.17.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # -require 5.6.0; +use 5.10.0; use strict; use warnings; -use Thrift; +use Thrift::Exception; +use Thrift::MessageType; +use Thrift::Type; + package TimError; use base qw(Class::Accessor); @@ -40,21 +43,21 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::I32) { + /^1$/ && do{ if ($ftype == Thrift::TType::I32) { $xfer += $input->readI32(\$self->{errCode}); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRING) { + /^2$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{errMsg}); } else { $xfer += $input->skip($ftype); @@ -73,12 +76,12 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('TimError'); if (defined $self->{errCode}) { - $xfer += $output->writeFieldBegin('errCode', TType::I32, 1); + $xfer += $output->writeFieldBegin('errCode', Thrift::TType::I32, 1); $xfer += $output->writeI32($self->{errCode}); $xfer += $output->writeFieldEnd(); } if (defined $self->{errMsg}) { - $xfer += $output->writeFieldBegin('errMsg', TType::STRING, 2); + $xfer += $output->writeFieldBegin('errMsg', Thrift::TType::STRING, 2); $xfer += $output->writeString($self->{errMsg}); $xfer += $output->writeFieldEnd(); } @@ -119,21 +122,21 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRING) { + /^1$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{key}); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRING) { + /^2$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{value}); } else { $xfer += $input->skip($ftype); @@ -152,12 +155,12 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('TimNode'); if (defined $self->{key}) { - $xfer += $output->writeFieldBegin('key', TType::STRING, 1); + $xfer += $output->writeFieldBegin('key', Thrift::TType::STRING, 1); $xfer += $output->writeString($self->{key}); $xfer += $output->writeFieldEnd(); } if (defined $self->{value}) { - $xfer += $output->writeFieldBegin('value', TType::STRING, 2); + $xfer += $output->writeFieldBegin('value', Thrift::TType::STRING, 2); $xfer += $output->writeString($self->{value}); $xfer += $output->writeFieldEnd(); } @@ -214,33 +217,33 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRING) { + /^1$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{id}); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRING) { + /^2$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{ackType}); } else { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::STRING) { + /^3$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{ackStatus}); } else { $xfer += $input->skip($ftype); } last; }; - /^4$/ && do{ if ($ftype == TType::LIST) { + /^4$/ && do{ if ($ftype == Thrift::TType::LIST) { { my $_size0 = 0; $self->{extraList} = []; @@ -249,7 +252,7 @@ sub read { for (my $_i4 = 0; $_i4 < $_size0; ++$_i4) { my $elem5 = undef; - $elem5 = new TimNode(); + $elem5 = TimNode->new(); $xfer += $elem5->read($input); push(@{$self->{extraList}},$elem5); } @@ -259,14 +262,14 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^5$/ && do{ if ($ftype == TType::STRUCT) { - $self->{err} = new TimError(); + /^5$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{err} = TimError->new(); $xfer += $self->{err}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^6$/ && do{ if ($ftype == TType::MAP) { + /^6$/ && do{ if ($ftype == Thrift::TType::MAP) { { my $_size6 = 0; $self->{extraMap} = {}; @@ -300,24 +303,24 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('TimAckBean'); if (defined $self->{id}) { - $xfer += $output->writeFieldBegin('id', TType::STRING, 1); + $xfer += $output->writeFieldBegin('id', Thrift::TType::STRING, 1); $xfer += $output->writeString($self->{id}); $xfer += $output->writeFieldEnd(); } if (defined $self->{ackType}) { - $xfer += $output->writeFieldBegin('ackType', TType::STRING, 2); + $xfer += $output->writeFieldBegin('ackType', Thrift::TType::STRING, 2); $xfer += $output->writeString($self->{ackType}); $xfer += $output->writeFieldEnd(); } if (defined $self->{ackStatus}) { - $xfer += $output->writeFieldBegin('ackStatus', TType::STRING, 3); + $xfer += $output->writeFieldBegin('ackStatus', Thrift::TType::STRING, 3); $xfer += $output->writeString($self->{ackStatus}); $xfer += $output->writeFieldEnd(); } if (defined $self->{extraList}) { - $xfer += $output->writeFieldBegin('extraList', TType::LIST, 4); + $xfer += $output->writeFieldBegin('extraList', Thrift::TType::LIST, 4); { - $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{extraList}})); + $xfer += $output->writeListBegin(Thrift::TType::STRUCT, scalar(@{$self->{extraList}})); { foreach my $iter13 (@{$self->{extraList}}) { @@ -329,14 +332,14 @@ sub write { $xfer += $output->writeFieldEnd(); } if (defined $self->{err}) { - $xfer += $output->writeFieldBegin('err', TType::STRUCT, 5); + $xfer += $output->writeFieldBegin('err', Thrift::TType::STRUCT, 5); $xfer += $self->{err}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{extraMap}) { - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 6); + $xfer += $output->writeFieldBegin('extraMap', Thrift::TType::MAP, 6); { - $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{extraMap}})); + $xfer += $output->writeMapBegin(Thrift::TType::STRING, Thrift::TType::STRING, scalar(keys %{$self->{extraMap}})); { while( my ($kiter14,$viter15) = each %{$self->{extraMap}}) { @@ -389,27 +392,27 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::I32) { + /^1$/ && do{ if ($ftype == Thrift::TType::I32) { $xfer += $input->readI32(\$self->{chl}); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::I32) { + /^2$/ && do{ if ($ftype == Thrift::TType::I32) { $xfer += $input->readI32(\$self->{platform}); } else { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::I16) { + /^3$/ && do{ if ($ftype == Thrift::TType::I16) { $xfer += $input->readI16(\$self->{version}); } else { $xfer += $input->skip($ftype); @@ -428,17 +431,17 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('TimHBean'); if (defined $self->{chl}) { - $xfer += $output->writeFieldBegin('chl', TType::I32, 1); + $xfer += $output->writeFieldBegin('chl', Thrift::TType::I32, 1); $xfer += $output->writeI32($self->{chl}); $xfer += $output->writeFieldEnd(); } if (defined $self->{platform}) { - $xfer += $output->writeFieldBegin('platform', TType::I32, 2); + $xfer += $output->writeFieldBegin('platform', Thrift::TType::I32, 2); $xfer += $output->writeI32($self->{platform}); $xfer += $output->writeFieldEnd(); } if (defined $self->{version}) { - $xfer += $output->writeFieldBegin('version', TType::I16, 3); + $xfer += $output->writeFieldBegin('version', Thrift::TType::I16, 3); $xfer += $output->writeI16($self->{version}); $xfer += $output->writeFieldEnd(); } @@ -499,33 +502,33 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRING) { + /^1$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{timestamp}); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::I16) { + /^2$/ && do{ if ($ftype == Thrift::TType::I16) { $xfer += $input->readI16(\$self->{version}); } else { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::STRING) { + /^3$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{lang}); } else { $xfer += $input->skip($ftype); } last; }; - /^4$/ && do{ if ($ftype == TType::LIST) { + /^4$/ && do{ if ($ftype == Thrift::TType::LIST) { { my $_size16 = 0; $self->{extraList} = []; @@ -534,7 +537,7 @@ sub read { for (my $_i20 = 0; $_i20 < $_size16; ++$_i20) { my $elem21 = undef; - $elem21 = new TimNode(); + $elem21 = TimNode->new(); $xfer += $elem21->read($input); push(@{$self->{extraList}},$elem21); } @@ -544,7 +547,7 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^5$/ && do{ if ($ftype == TType::MAP) { + /^5$/ && do{ if ($ftype == Thrift::TType::MAP) { { my $_size22 = 0; $self->{extraMap} = {}; @@ -565,13 +568,13 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^6$/ && do{ if ($ftype == TType::STRING) { + /^6$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{interflow}); } else { $xfer += $input->skip($ftype); } last; }; - /^7$/ && do{ if ($ftype == TType::STRING) { + /^7$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{tls}); } else { $xfer += $input->skip($ftype); @@ -590,24 +593,24 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('TimParam'); if (defined $self->{timestamp}) { - $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 1); + $xfer += $output->writeFieldBegin('timestamp', Thrift::TType::STRING, 1); $xfer += $output->writeString($self->{timestamp}); $xfer += $output->writeFieldEnd(); } if (defined $self->{version}) { - $xfer += $output->writeFieldBegin('version', TType::I16, 2); + $xfer += $output->writeFieldBegin('version', Thrift::TType::I16, 2); $xfer += $output->writeI16($self->{version}); $xfer += $output->writeFieldEnd(); } if (defined $self->{lang}) { - $xfer += $output->writeFieldBegin('lang', TType::STRING, 3); + $xfer += $output->writeFieldBegin('lang', Thrift::TType::STRING, 3); $xfer += $output->writeString($self->{lang}); $xfer += $output->writeFieldEnd(); } if (defined $self->{extraList}) { - $xfer += $output->writeFieldBegin('extraList', TType::LIST, 4); + $xfer += $output->writeFieldBegin('extraList', Thrift::TType::LIST, 4); { - $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{extraList}})); + $xfer += $output->writeListBegin(Thrift::TType::STRUCT, scalar(@{$self->{extraList}})); { foreach my $iter29 (@{$self->{extraList}}) { @@ -619,9 +622,9 @@ sub write { $xfer += $output->writeFieldEnd(); } if (defined $self->{extraMap}) { - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 5); + $xfer += $output->writeFieldBegin('extraMap', Thrift::TType::MAP, 5); { - $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{extraMap}})); + $xfer += $output->writeMapBegin(Thrift::TType::STRING, Thrift::TType::STRING, scalar(keys %{$self->{extraMap}})); { while( my ($kiter30,$viter31) = each %{$self->{extraMap}}) { @@ -634,12 +637,12 @@ sub write { $xfer += $output->writeFieldEnd(); } if (defined $self->{interflow}) { - $xfer += $output->writeFieldBegin('interflow', TType::STRING, 6); + $xfer += $output->writeFieldBegin('interflow', Thrift::TType::STRING, 6); $xfer += $output->writeString($self->{interflow}); $xfer += $output->writeFieldEnd(); } if (defined $self->{tls}) { - $xfer += $output->writeFieldBegin('tls', TType::STRING, 7); + $xfer += $output->writeFieldBegin('tls', Thrift::TType::STRING, 7); $xfer += $output->writeString($self->{tls}); $xfer += $output->writeFieldEnd(); } @@ -680,21 +683,21 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRING) { + /^1$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{timestamp}); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRING) { + /^2$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{formattime}); } else { $xfer += $input->skip($ftype); @@ -713,12 +716,12 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('TimTime'); if (defined $self->{timestamp}) { - $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 1); + $xfer += $output->writeFieldBegin('timestamp', Thrift::TType::STRING, 1); $xfer += $output->writeString($self->{timestamp}); $xfer += $output->writeFieldEnd(); } if (defined $self->{formattime}) { - $xfer += $output->writeFieldBegin('formattime', TType::STRING, 2); + $xfer += $output->writeFieldBegin('formattime', Thrift::TType::STRING, 2); $xfer += $output->writeString($self->{formattime}); $xfer += $output->writeFieldEnd(); } @@ -771,33 +774,33 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRING) { + /^1$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{country}); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRING) { + /^2$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{province}); } else { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::STRING) { + /^3$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{city}); } else { $xfer += $input->skip($ftype); } last; }; - /^4$/ && do{ if ($ftype == TType::LIST) { + /^4$/ && do{ if ($ftype == Thrift::TType::LIST) { { my $_size32 = 0; $self->{extraList} = []; @@ -806,7 +809,7 @@ sub read { for (my $_i36 = 0; $_i36 < $_size32; ++$_i36) { my $elem37 = undef; - $elem37 = new TimNode(); + $elem37 = TimNode->new(); $xfer += $elem37->read($input); push(@{$self->{extraList}},$elem37); } @@ -816,7 +819,7 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^5$/ && do{ if ($ftype == TType::MAP) { + /^5$/ && do{ if ($ftype == Thrift::TType::MAP) { { my $_size38 = 0; $self->{extraMap} = {}; @@ -850,24 +853,24 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('TimArea'); if (defined $self->{country}) { - $xfer += $output->writeFieldBegin('country', TType::STRING, 1); + $xfer += $output->writeFieldBegin('country', Thrift::TType::STRING, 1); $xfer += $output->writeString($self->{country}); $xfer += $output->writeFieldEnd(); } if (defined $self->{province}) { - $xfer += $output->writeFieldBegin('province', TType::STRING, 2); + $xfer += $output->writeFieldBegin('province', Thrift::TType::STRING, 2); $xfer += $output->writeString($self->{province}); $xfer += $output->writeFieldEnd(); } if (defined $self->{city}) { - $xfer += $output->writeFieldBegin('city', TType::STRING, 3); + $xfer += $output->writeFieldBegin('city', Thrift::TType::STRING, 3); $xfer += $output->writeString($self->{city}); $xfer += $output->writeFieldEnd(); } if (defined $self->{extraList}) { - $xfer += $output->writeFieldBegin('extraList', TType::LIST, 4); + $xfer += $output->writeFieldBegin('extraList', Thrift::TType::LIST, 4); { - $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{extraList}})); + $xfer += $output->writeListBegin(Thrift::TType::STRUCT, scalar(@{$self->{extraList}})); { foreach my $iter45 (@{$self->{extraList}}) { @@ -879,9 +882,9 @@ sub write { $xfer += $output->writeFieldEnd(); } if (defined $self->{extraMap}) { - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 5); + $xfer += $output->writeFieldBegin('extraMap', Thrift::TType::MAP, 5); { - $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{extraMap}})); + $xfer += $output->writeMapBegin(Thrift::TType::STRING, Thrift::TType::STRING, scalar(keys %{$self->{extraMap}})); { while( my ($kiter46,$viter47) = each %{$self->{extraMap}}) { @@ -946,39 +949,39 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRING) { + /^1$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{name}); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRING) { + /^2$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{domain}); } else { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::STRING) { + /^3$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{resource}); } else { $xfer += $input->skip($ftype); } last; }; - /^4$/ && do{ if ($ftype == TType::STRING) { + /^4$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{type}); } else { $xfer += $input->skip($ftype); } last; }; - /^5$/ && do{ if ($ftype == TType::LIST) { + /^5$/ && do{ if ($ftype == Thrift::TType::LIST) { { my $_size48 = 0; $self->{extraList} = []; @@ -987,7 +990,7 @@ sub read { for (my $_i52 = 0; $_i52 < $_size48; ++$_i52) { my $elem53 = undef; - $elem53 = new TimNode(); + $elem53 = TimNode->new(); $xfer += $elem53->read($input); push(@{$self->{extraList}},$elem53); } @@ -997,7 +1000,7 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^6$/ && do{ if ($ftype == TType::MAP) { + /^6$/ && do{ if ($ftype == Thrift::TType::MAP) { { my $_size54 = 0; $self->{extraMap} = {}; @@ -1031,29 +1034,29 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('Tid'); if (defined $self->{name}) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeFieldBegin('name', Thrift::TType::STRING, 1); $xfer += $output->writeString($self->{name}); $xfer += $output->writeFieldEnd(); } if (defined $self->{domain}) { - $xfer += $output->writeFieldBegin('domain', TType::STRING, 2); + $xfer += $output->writeFieldBegin('domain', Thrift::TType::STRING, 2); $xfer += $output->writeString($self->{domain}); $xfer += $output->writeFieldEnd(); } if (defined $self->{resource}) { - $xfer += $output->writeFieldBegin('resource', TType::STRING, 3); + $xfer += $output->writeFieldBegin('resource', Thrift::TType::STRING, 3); $xfer += $output->writeString($self->{resource}); $xfer += $output->writeFieldEnd(); } if (defined $self->{type}) { - $xfer += $output->writeFieldBegin('type', TType::STRING, 4); + $xfer += $output->writeFieldBegin('type', Thrift::TType::STRING, 4); $xfer += $output->writeString($self->{type}); $xfer += $output->writeFieldEnd(); } if (defined $self->{extraList}) { - $xfer += $output->writeFieldBegin('extraList', TType::LIST, 5); + $xfer += $output->writeFieldBegin('extraList', Thrift::TType::LIST, 5); { - $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{extraList}})); + $xfer += $output->writeListBegin(Thrift::TType::STRUCT, scalar(@{$self->{extraList}})); { foreach my $iter61 (@{$self->{extraList}}) { @@ -1065,9 +1068,9 @@ sub write { $xfer += $output->writeFieldEnd(); } if (defined $self->{extraMap}) { - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 6); + $xfer += $output->writeFieldBegin('extraMap', Thrift::TType::MAP, 6); { - $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{extraMap}})); + $xfer += $output->writeMapBegin(Thrift::TType::STRING, Thrift::TType::STRING, scalar(keys %{$self->{extraMap}})); { while( my ($kiter62,$viter63) = each %{$self->{extraMap}}) { @@ -1152,65 +1155,65 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{tid} = new Tid(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{tid} = Tid->new(); $xfer += $self->{tid}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRING) { + /^2$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{nickname}); } else { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::STRING) { + /^3$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{remarkname}); } else { $xfer += $input->skip($ftype); } last; }; - /^4$/ && do{ if ($ftype == TType::STRING) { + /^4$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{brithday}); } else { $xfer += $input->skip($ftype); } last; }; - /^5$/ && do{ if ($ftype == TType::I16) { + /^5$/ && do{ if ($ftype == Thrift::TType::I16) { $xfer += $input->readI16(\$self->{gender}); } else { $xfer += $input->skip($ftype); } last; }; - /^6$/ && do{ if ($ftype == TType::STRING) { + /^6$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{headurl}); } else { $xfer += $input->skip($ftype); } last; }; - /^7$/ && do{ if ($ftype == TType::STRUCT) { - $self->{area} = new TimArea(); + /^7$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{area} = TimArea->new(); $xfer += $self->{area}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^8$/ && do{ if ($ftype == TType::STRING) { + /^8$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{headbyte}); } else { $xfer += $input->skip($ftype); } last; }; - /^9$/ && do{ if ($ftype == TType::LIST) { + /^9$/ && do{ if ($ftype == Thrift::TType::LIST) { { my $_size64 = 0; $self->{photoBytes} = []; @@ -1228,7 +1231,7 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^10$/ && do{ if ($ftype == TType::LIST) { + /^10$/ && do{ if ($ftype == Thrift::TType::LIST) { { my $_size70 = 0; $self->{extraList} = []; @@ -1237,7 +1240,7 @@ sub read { for (my $_i74 = 0; $_i74 < $_size70; ++$_i74) { my $elem75 = undef; - $elem75 = new TimNode(); + $elem75 = TimNode->new(); $xfer += $elem75->read($input); push(@{$self->{extraList}},$elem75); } @@ -1247,7 +1250,7 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^11$/ && do{ if ($ftype == TType::MAP) { + /^11$/ && do{ if ($ftype == Thrift::TType::MAP) { { my $_size76 = 0; $self->{extraMap} = {}; @@ -1281,49 +1284,49 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('TimUserBean'); if (defined $self->{tid}) { - $xfer += $output->writeFieldBegin('tid', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('tid', Thrift::TType::STRUCT, 1); $xfer += $self->{tid}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{nickname}) { - $xfer += $output->writeFieldBegin('nickname', TType::STRING, 2); + $xfer += $output->writeFieldBegin('nickname', Thrift::TType::STRING, 2); $xfer += $output->writeString($self->{nickname}); $xfer += $output->writeFieldEnd(); } if (defined $self->{remarkname}) { - $xfer += $output->writeFieldBegin('remarkname', TType::STRING, 3); + $xfer += $output->writeFieldBegin('remarkname', Thrift::TType::STRING, 3); $xfer += $output->writeString($self->{remarkname}); $xfer += $output->writeFieldEnd(); } if (defined $self->{brithday}) { - $xfer += $output->writeFieldBegin('brithday', TType::STRING, 4); + $xfer += $output->writeFieldBegin('brithday', Thrift::TType::STRING, 4); $xfer += $output->writeString($self->{brithday}); $xfer += $output->writeFieldEnd(); } if (defined $self->{gender}) { - $xfer += $output->writeFieldBegin('gender', TType::I16, 5); + $xfer += $output->writeFieldBegin('gender', Thrift::TType::I16, 5); $xfer += $output->writeI16($self->{gender}); $xfer += $output->writeFieldEnd(); } if (defined $self->{headurl}) { - $xfer += $output->writeFieldBegin('headurl', TType::STRING, 6); + $xfer += $output->writeFieldBegin('headurl', Thrift::TType::STRING, 6); $xfer += $output->writeString($self->{headurl}); $xfer += $output->writeFieldEnd(); } if (defined $self->{area}) { - $xfer += $output->writeFieldBegin('area', TType::STRUCT, 7); + $xfer += $output->writeFieldBegin('area', Thrift::TType::STRUCT, 7); $xfer += $self->{area}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{headbyte}) { - $xfer += $output->writeFieldBegin('headbyte', TType::STRING, 8); + $xfer += $output->writeFieldBegin('headbyte', Thrift::TType::STRING, 8); $xfer += $output->writeString($self->{headbyte}); $xfer += $output->writeFieldEnd(); } if (defined $self->{photoBytes}) { - $xfer += $output->writeFieldBegin('photoBytes', TType::LIST, 9); + $xfer += $output->writeFieldBegin('photoBytes', Thrift::TType::LIST, 9); { - $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{photoBytes}})); + $xfer += $output->writeListBegin(Thrift::TType::STRING, scalar(@{$self->{photoBytes}})); { foreach my $iter83 (@{$self->{photoBytes}}) { @@ -1335,9 +1338,9 @@ sub write { $xfer += $output->writeFieldEnd(); } if (defined $self->{extraList}) { - $xfer += $output->writeFieldBegin('extraList', TType::LIST, 10); + $xfer += $output->writeFieldBegin('extraList', Thrift::TType::LIST, 10); { - $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{extraList}})); + $xfer += $output->writeListBegin(Thrift::TType::STRUCT, scalar(@{$self->{extraList}})); { foreach my $iter84 (@{$self->{extraList}}) { @@ -1349,9 +1352,9 @@ sub write { $xfer += $output->writeFieldEnd(); } if (defined $self->{extraMap}) { - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 11); + $xfer += $output->writeFieldBegin('extraMap', Thrift::TType::MAP, 11); { - $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{extraMap}})); + $xfer += $output->writeMapBegin(Thrift::TType::STRING, Thrift::TType::STRING, scalar(keys %{$self->{extraMap}})); { while( my ($kiter85,$viter86) = each %{$self->{extraMap}}) { @@ -1432,29 +1435,29 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{tid} = new Tid(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{tid} = Tid->new(); $xfer += $self->{tid}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRUCT) { - $self->{founderTid} = new Tid(); + /^2$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{founderTid} = Tid->new(); $xfer += $self->{founderTid}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::LIST) { + /^3$/ && do{ if ($ftype == Thrift::TType::LIST) { { my $_size87 = 0; $self->{HostsTid} = []; @@ -1463,7 +1466,7 @@ sub read { for (my $_i91 = 0; $_i91 < $_size87; ++$_i91) { my $elem92 = undef; - $elem92 = new Tid(); + $elem92 = Tid->new(); $xfer += $elem92->read($input); push(@{$self->{HostsTid}},$elem92); } @@ -1473,7 +1476,7 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^4$/ && do{ if ($ftype == TType::LIST) { + /^4$/ && do{ if ($ftype == Thrift::TType::LIST) { { my $_size93 = 0; $self->{membersTid} = []; @@ -1482,7 +1485,7 @@ sub read { for (my $_i97 = 0; $_i97 < $_size93; ++$_i97) { my $elem98 = undef; - $elem98 = new Tid(); + $elem98 = Tid->new(); $xfer += $elem98->read($input); push(@{$self->{membersTid}},$elem98); } @@ -1492,32 +1495,32 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^5$/ && do{ if ($ftype == TType::STRING) { + /^5$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{headurl}); } else { $xfer += $input->skip($ftype); } last; }; - /^6$/ && do{ if ($ftype == TType::STRING) { + /^6$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{roomName}); } else { $xfer += $input->skip($ftype); } last; }; - /^7$/ && do{ if ($ftype == TType::STRING) { + /^7$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{desc}); } else { $xfer += $input->skip($ftype); } last; }; - /^8$/ && do{ if ($ftype == TType::STRUCT) { - $self->{createTime} = new TimTime(); + /^8$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{createTime} = TimTime->new(); $xfer += $self->{createTime}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^9$/ && do{ if ($ftype == TType::LIST) { + /^9$/ && do{ if ($ftype == Thrift::TType::LIST) { { my $_size99 = 0; $self->{extraList} = []; @@ -1526,7 +1529,7 @@ sub read { for (my $_i103 = 0; $_i103 < $_size99; ++$_i103) { my $elem104 = undef; - $elem104 = new TimNode(); + $elem104 = TimNode->new(); $xfer += $elem104->read($input); push(@{$self->{extraList}},$elem104); } @@ -1536,7 +1539,7 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^10$/ && do{ if ($ftype == TType::MAP) { + /^10$/ && do{ if ($ftype == Thrift::TType::MAP) { { my $_size105 = 0; $self->{extraMap} = {}; @@ -1570,19 +1573,19 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('TimRoom'); if (defined $self->{tid}) { - $xfer += $output->writeFieldBegin('tid', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('tid', Thrift::TType::STRUCT, 1); $xfer += $self->{tid}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{founderTid}) { - $xfer += $output->writeFieldBegin('founderTid', TType::STRUCT, 2); + $xfer += $output->writeFieldBegin('founderTid', Thrift::TType::STRUCT, 2); $xfer += $self->{founderTid}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{HostsTid}) { - $xfer += $output->writeFieldBegin('HostsTid', TType::LIST, 3); + $xfer += $output->writeFieldBegin('HostsTid', Thrift::TType::LIST, 3); { - $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{HostsTid}})); + $xfer += $output->writeListBegin(Thrift::TType::STRUCT, scalar(@{$self->{HostsTid}})); { foreach my $iter112 (@{$self->{HostsTid}}) { @@ -1594,9 +1597,9 @@ sub write { $xfer += $output->writeFieldEnd(); } if (defined $self->{membersTid}) { - $xfer += $output->writeFieldBegin('membersTid', TType::LIST, 4); + $xfer += $output->writeFieldBegin('membersTid', Thrift::TType::LIST, 4); { - $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{membersTid}})); + $xfer += $output->writeListBegin(Thrift::TType::STRUCT, scalar(@{$self->{membersTid}})); { foreach my $iter113 (@{$self->{membersTid}}) { @@ -1608,29 +1611,29 @@ sub write { $xfer += $output->writeFieldEnd(); } if (defined $self->{headurl}) { - $xfer += $output->writeFieldBegin('headurl', TType::STRING, 5); + $xfer += $output->writeFieldBegin('headurl', Thrift::TType::STRING, 5); $xfer += $output->writeString($self->{headurl}); $xfer += $output->writeFieldEnd(); } if (defined $self->{roomName}) { - $xfer += $output->writeFieldBegin('roomName', TType::STRING, 6); + $xfer += $output->writeFieldBegin('roomName', Thrift::TType::STRING, 6); $xfer += $output->writeString($self->{roomName}); $xfer += $output->writeFieldEnd(); } if (defined $self->{desc}) { - $xfer += $output->writeFieldBegin('desc', TType::STRING, 7); + $xfer += $output->writeFieldBegin('desc', Thrift::TType::STRING, 7); $xfer += $output->writeString($self->{desc}); $xfer += $output->writeFieldEnd(); } if (defined $self->{createTime}) { - $xfer += $output->writeFieldBegin('createTime', TType::STRUCT, 8); + $xfer += $output->writeFieldBegin('createTime', Thrift::TType::STRUCT, 8); $xfer += $self->{createTime}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{extraList}) { - $xfer += $output->writeFieldBegin('extraList', TType::LIST, 9); + $xfer += $output->writeFieldBegin('extraList', Thrift::TType::LIST, 9); { - $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{extraList}})); + $xfer += $output->writeListBegin(Thrift::TType::STRUCT, scalar(@{$self->{extraList}})); { foreach my $iter114 (@{$self->{extraList}}) { @@ -1642,9 +1645,9 @@ sub write { $xfer += $output->writeFieldEnd(); } if (defined $self->{extraMap}) { - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 10); + $xfer += $output->writeFieldBegin('extraMap', Thrift::TType::MAP, 10); { - $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{extraMap}})); + $xfer += $output->writeMapBegin(Thrift::TType::STRING, Thrift::TType::STRING, scalar(keys %{$self->{extraMap}})); { while( my ($kiter115,$viter116) = each %{$self->{extraMap}}) { @@ -1729,66 +1732,66 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRING) { + /^1$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{threadId}); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRUCT) { - $self->{fromTid} = new Tid(); + /^2$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{fromTid} = Tid->new(); $xfer += $self->{fromTid}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::STRUCT) { - $self->{toTid} = new Tid(); + /^3$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{toTid} = Tid->new(); $xfer += $self->{toTid}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^4$/ && do{ if ($ftype == TType::STRING) { + /^4$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{status}); } else { $xfer += $input->skip($ftype); } last; }; - /^5$/ && do{ if ($ftype == TType::STRING) { + /^5$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{type}); } else { $xfer += $input->skip($ftype); } last; }; - /^6$/ && do{ if ($ftype == TType::I32) { + /^6$/ && do{ if ($ftype == Thrift::TType::I32) { $xfer += $input->readI32(\$self->{priority}); } else { $xfer += $input->skip($ftype); } last; }; - /^7$/ && do{ if ($ftype == TType::STRING) { + /^7$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{show}); } else { $xfer += $input->skip($ftype); } last; }; - /^8$/ && do{ if ($ftype == TType::STRUCT) { - $self->{leaguerTid} = new Tid(); + /^8$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{leaguerTid} = Tid->new(); $xfer += $self->{leaguerTid}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^9$/ && do{ if ($ftype == TType::LIST) { + /^9$/ && do{ if ($ftype == Thrift::TType::LIST) { { my $_size117 = 0; $self->{extraList} = []; @@ -1797,7 +1800,7 @@ sub read { for (my $_i121 = 0; $_i121 < $_size117; ++$_i121) { my $elem122 = undef; - $elem122 = new TimNode(); + $elem122 = TimNode->new(); $xfer += $elem122->read($input); push(@{$self->{extraList}},$elem122); } @@ -1807,14 +1810,14 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^10$/ && do{ if ($ftype == TType::STRUCT) { - $self->{error} = new TimError(); + /^10$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{error} = TimError->new(); $xfer += $self->{error}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^11$/ && do{ if ($ftype == TType::MAP) { + /^11$/ && do{ if ($ftype == Thrift::TType::MAP) { { my $_size123 = 0; $self->{extraMap} = {}; @@ -1848,49 +1851,49 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('TimPBean'); if (defined $self->{threadId}) { - $xfer += $output->writeFieldBegin('threadId', TType::STRING, 1); + $xfer += $output->writeFieldBegin('threadId', Thrift::TType::STRING, 1); $xfer += $output->writeString($self->{threadId}); $xfer += $output->writeFieldEnd(); } if (defined $self->{fromTid}) { - $xfer += $output->writeFieldBegin('fromTid', TType::STRUCT, 2); + $xfer += $output->writeFieldBegin('fromTid', Thrift::TType::STRUCT, 2); $xfer += $self->{fromTid}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{toTid}) { - $xfer += $output->writeFieldBegin('toTid', TType::STRUCT, 3); + $xfer += $output->writeFieldBegin('toTid', Thrift::TType::STRUCT, 3); $xfer += $self->{toTid}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{status}) { - $xfer += $output->writeFieldBegin('status', TType::STRING, 4); + $xfer += $output->writeFieldBegin('status', Thrift::TType::STRING, 4); $xfer += $output->writeString($self->{status}); $xfer += $output->writeFieldEnd(); } if (defined $self->{type}) { - $xfer += $output->writeFieldBegin('type', TType::STRING, 5); + $xfer += $output->writeFieldBegin('type', Thrift::TType::STRING, 5); $xfer += $output->writeString($self->{type}); $xfer += $output->writeFieldEnd(); } if (defined $self->{priority}) { - $xfer += $output->writeFieldBegin('priority', TType::I32, 6); + $xfer += $output->writeFieldBegin('priority', Thrift::TType::I32, 6); $xfer += $output->writeI32($self->{priority}); $xfer += $output->writeFieldEnd(); } if (defined $self->{show}) { - $xfer += $output->writeFieldBegin('show', TType::STRING, 7); + $xfer += $output->writeFieldBegin('show', Thrift::TType::STRING, 7); $xfer += $output->writeString($self->{show}); $xfer += $output->writeFieldEnd(); } if (defined $self->{leaguerTid}) { - $xfer += $output->writeFieldBegin('leaguerTid', TType::STRUCT, 8); + $xfer += $output->writeFieldBegin('leaguerTid', Thrift::TType::STRUCT, 8); $xfer += $self->{leaguerTid}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{extraList}) { - $xfer += $output->writeFieldBegin('extraList', TType::LIST, 9); + $xfer += $output->writeFieldBegin('extraList', Thrift::TType::LIST, 9); { - $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{extraList}})); + $xfer += $output->writeListBegin(Thrift::TType::STRUCT, scalar(@{$self->{extraList}})); { foreach my $iter130 (@{$self->{extraList}}) { @@ -1902,14 +1905,14 @@ sub write { $xfer += $output->writeFieldEnd(); } if (defined $self->{error}) { - $xfer += $output->writeFieldBegin('error', TType::STRUCT, 10); + $xfer += $output->writeFieldBegin('error', Thrift::TType::STRUCT, 10); $xfer += $self->{error}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{extraMap}) { - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 11); + $xfer += $output->writeFieldBegin('extraMap', Thrift::TType::MAP, 11); { - $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{extraMap}})); + $xfer += $output->writeMapBegin(Thrift::TType::STRING, Thrift::TType::STRING, scalar(keys %{$self->{extraMap}})); { while( my ($kiter131,$viter132) = each %{$self->{extraMap}}) { @@ -2006,73 +2009,73 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRING) { + /^1$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{threadId}); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRING) { + /^2$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{mid}); } else { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::STRUCT) { - $self->{fromTid} = new Tid(); + /^3$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{fromTid} = Tid->new(); $xfer += $self->{fromTid}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^4$/ && do{ if ($ftype == TType::STRUCT) { - $self->{toTid} = new Tid(); + /^4$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{toTid} = Tid->new(); $xfer += $self->{toTid}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^5$/ && do{ if ($ftype == TType::STRING) { + /^5$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{body}); } else { $xfer += $input->skip($ftype); } last; }; - /^6$/ && do{ if ($ftype == TType::STRING) { + /^6$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{type}); } else { $xfer += $input->skip($ftype); } last; }; - /^7$/ && do{ if ($ftype == TType::I16) { + /^7$/ && do{ if ($ftype == Thrift::TType::I16) { $xfer += $input->readI16(\$self->{msgType}); } else { $xfer += $input->skip($ftype); } last; }; - /^8$/ && do{ if ($ftype == TType::STRUCT) { - $self->{offline} = new TimTime(); + /^8$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{offline} = TimTime->new(); $xfer += $self->{offline}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^9$/ && do{ if ($ftype == TType::STRUCT) { - $self->{leaguerTid} = new Tid(); + /^9$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{leaguerTid} = Tid->new(); $xfer += $self->{leaguerTid}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^10$/ && do{ if ($ftype == TType::LIST) { + /^10$/ && do{ if ($ftype == Thrift::TType::LIST) { { my $_size133 = 0; $self->{extraList} = []; @@ -2081,7 +2084,7 @@ sub read { for (my $_i137 = 0; $_i137 < $_size133; ++$_i137) { my $elem138 = undef; - $elem138 = new TimNode(); + $elem138 = TimNode->new(); $xfer += $elem138->read($input); push(@{$self->{extraList}},$elem138); } @@ -2091,20 +2094,20 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^11$/ && do{ if ($ftype == TType::STRING) { + /^11$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{timestamp}); } else { $xfer += $input->skip($ftype); } last; }; - /^12$/ && do{ if ($ftype == TType::STRUCT) { - $self->{error} = new TimError(); + /^12$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{error} = TimError->new(); $xfer += $self->{error}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^13$/ && do{ if ($ftype == TType::MAP) { + /^13$/ && do{ if ($ftype == Thrift::TType::MAP) { { my $_size139 = 0; $self->{extraMap} = {}; @@ -2125,7 +2128,7 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^14$/ && do{ if ($ftype == TType::I16) { + /^14$/ && do{ if ($ftype == Thrift::TType::I16) { $xfer += $input->readI16(\$self->{readstatus}); } else { $xfer += $input->skip($ftype); @@ -2144,54 +2147,54 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('TimMBean'); if (defined $self->{threadId}) { - $xfer += $output->writeFieldBegin('threadId', TType::STRING, 1); + $xfer += $output->writeFieldBegin('threadId', Thrift::TType::STRING, 1); $xfer += $output->writeString($self->{threadId}); $xfer += $output->writeFieldEnd(); } if (defined $self->{mid}) { - $xfer += $output->writeFieldBegin('mid', TType::STRING, 2); + $xfer += $output->writeFieldBegin('mid', Thrift::TType::STRING, 2); $xfer += $output->writeString($self->{mid}); $xfer += $output->writeFieldEnd(); } if (defined $self->{fromTid}) { - $xfer += $output->writeFieldBegin('fromTid', TType::STRUCT, 3); + $xfer += $output->writeFieldBegin('fromTid', Thrift::TType::STRUCT, 3); $xfer += $self->{fromTid}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{toTid}) { - $xfer += $output->writeFieldBegin('toTid', TType::STRUCT, 4); + $xfer += $output->writeFieldBegin('toTid', Thrift::TType::STRUCT, 4); $xfer += $self->{toTid}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{body}) { - $xfer += $output->writeFieldBegin('body', TType::STRING, 5); + $xfer += $output->writeFieldBegin('body', Thrift::TType::STRING, 5); $xfer += $output->writeString($self->{body}); $xfer += $output->writeFieldEnd(); } if (defined $self->{type}) { - $xfer += $output->writeFieldBegin('type', TType::STRING, 6); + $xfer += $output->writeFieldBegin('type', Thrift::TType::STRING, 6); $xfer += $output->writeString($self->{type}); $xfer += $output->writeFieldEnd(); } if (defined $self->{msgType}) { - $xfer += $output->writeFieldBegin('msgType', TType::I16, 7); + $xfer += $output->writeFieldBegin('msgType', Thrift::TType::I16, 7); $xfer += $output->writeI16($self->{msgType}); $xfer += $output->writeFieldEnd(); } if (defined $self->{offline}) { - $xfer += $output->writeFieldBegin('offline', TType::STRUCT, 8); + $xfer += $output->writeFieldBegin('offline', Thrift::TType::STRUCT, 8); $xfer += $self->{offline}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{leaguerTid}) { - $xfer += $output->writeFieldBegin('leaguerTid', TType::STRUCT, 9); + $xfer += $output->writeFieldBegin('leaguerTid', Thrift::TType::STRUCT, 9); $xfer += $self->{leaguerTid}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{extraList}) { - $xfer += $output->writeFieldBegin('extraList', TType::LIST, 10); + $xfer += $output->writeFieldBegin('extraList', Thrift::TType::LIST, 10); { - $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{extraList}})); + $xfer += $output->writeListBegin(Thrift::TType::STRUCT, scalar(@{$self->{extraList}})); { foreach my $iter146 (@{$self->{extraList}}) { @@ -2203,19 +2206,19 @@ sub write { $xfer += $output->writeFieldEnd(); } if (defined $self->{timestamp}) { - $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 11); + $xfer += $output->writeFieldBegin('timestamp', Thrift::TType::STRING, 11); $xfer += $output->writeString($self->{timestamp}); $xfer += $output->writeFieldEnd(); } if (defined $self->{error}) { - $xfer += $output->writeFieldBegin('error', TType::STRUCT, 12); + $xfer += $output->writeFieldBegin('error', Thrift::TType::STRUCT, 12); $xfer += $self->{error}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{extraMap}) { - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 13); + $xfer += $output->writeFieldBegin('extraMap', Thrift::TType::MAP, 13); { - $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{extraMap}})); + $xfer += $output->writeMapBegin(Thrift::TType::STRING, Thrift::TType::STRING, scalar(keys %{$self->{extraMap}})); { while( my ($kiter147,$viter148) = each %{$self->{extraMap}}) { @@ -2228,7 +2231,7 @@ sub write { $xfer += $output->writeFieldEnd(); } if (defined $self->{readstatus}) { - $xfer += $output->writeFieldBegin('readstatus', TType::I16, 14); + $xfer += $output->writeFieldBegin('readstatus', Thrift::TType::I16, 14); $xfer += $output->writeI16($self->{readstatus}); $xfer += $output->writeFieldEnd(); } @@ -2289,41 +2292,41 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRING) { + /^1$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{threadId}); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRUCT) { - $self->{fromTid} = new Tid(); + /^2$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{fromTid} = Tid->new(); $xfer += $self->{fromTid}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::STRUCT) { - $self->{toTid} = new Tid(); + /^3$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{toTid} = Tid->new(); $xfer += $self->{toTid}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^4$/ && do{ if ($ftype == TType::STRING) { + /^4$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{type}); } else { $xfer += $input->skip($ftype); } last; }; - /^5$/ && do{ if ($ftype == TType::LIST) { + /^5$/ && do{ if ($ftype == Thrift::TType::LIST) { { my $_size149 = 0; $self->{extraList} = []; @@ -2332,7 +2335,7 @@ sub read { for (my $_i153 = 0; $_i153 < $_size149; ++$_i153) { my $elem154 = undef; - $elem154 = new TimNode(); + $elem154 = TimNode->new(); $xfer += $elem154->read($input); push(@{$self->{extraList}},$elem154); } @@ -2342,14 +2345,14 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^6$/ && do{ if ($ftype == TType::STRUCT) { - $self->{error} = new TimError(); + /^6$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{error} = TimError->new(); $xfer += $self->{error}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^7$/ && do{ if ($ftype == TType::MAP) { + /^7$/ && do{ if ($ftype == Thrift::TType::MAP) { { my $_size155 = 0; $self->{extraMap} = {}; @@ -2383,29 +2386,29 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('TimIqBean'); if (defined $self->{threadId}) { - $xfer += $output->writeFieldBegin('threadId', TType::STRING, 1); + $xfer += $output->writeFieldBegin('threadId', Thrift::TType::STRING, 1); $xfer += $output->writeString($self->{threadId}); $xfer += $output->writeFieldEnd(); } if (defined $self->{fromTid}) { - $xfer += $output->writeFieldBegin('fromTid', TType::STRUCT, 2); + $xfer += $output->writeFieldBegin('fromTid', Thrift::TType::STRUCT, 2); $xfer += $self->{fromTid}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{toTid}) { - $xfer += $output->writeFieldBegin('toTid', TType::STRUCT, 3); + $xfer += $output->writeFieldBegin('toTid', Thrift::TType::STRUCT, 3); $xfer += $self->{toTid}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{type}) { - $xfer += $output->writeFieldBegin('type', TType::STRING, 4); + $xfer += $output->writeFieldBegin('type', Thrift::TType::STRING, 4); $xfer += $output->writeString($self->{type}); $xfer += $output->writeFieldEnd(); } if (defined $self->{extraList}) { - $xfer += $output->writeFieldBegin('extraList', TType::LIST, 5); + $xfer += $output->writeFieldBegin('extraList', Thrift::TType::LIST, 5); { - $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{extraList}})); + $xfer += $output->writeListBegin(Thrift::TType::STRUCT, scalar(@{$self->{extraList}})); { foreach my $iter162 (@{$self->{extraList}}) { @@ -2417,14 +2420,14 @@ sub write { $xfer += $output->writeFieldEnd(); } if (defined $self->{error}) { - $xfer += $output->writeFieldBegin('error', TType::STRUCT, 6); + $xfer += $output->writeFieldBegin('error', Thrift::TType::STRUCT, 6); $xfer += $self->{error}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{extraMap}) { - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 7); + $xfer += $output->writeFieldBegin('extraMap', Thrift::TType::MAP, 7); { - $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{extraMap}})); + $xfer += $output->writeMapBegin(Thrift::TType::STRING, Thrift::TType::STRING, scalar(keys %{$self->{extraMap}})); { while( my ($kiter163,$viter164) = each %{$self->{extraMap}}) { @@ -2481,34 +2484,34 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRING) { + /^1$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{subscription}); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRUCT) { - $self->{tid} = new Tid(); + /^2$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{tid} = Tid->new(); $xfer += $self->{tid}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::STRING) { + /^3$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{name}); } else { $xfer += $input->skip($ftype); } last; }; - /^4$/ && do{ if ($ftype == TType::MAP) { + /^4$/ && do{ if ($ftype == Thrift::TType::MAP) { { my $_size165 = 0; $self->{extraMap} = {}; @@ -2542,24 +2545,24 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('TimRoster'); if (defined $self->{subscription}) { - $xfer += $output->writeFieldBegin('subscription', TType::STRING, 1); + $xfer += $output->writeFieldBegin('subscription', Thrift::TType::STRING, 1); $xfer += $output->writeString($self->{subscription}); $xfer += $output->writeFieldEnd(); } if (defined $self->{tid}) { - $xfer += $output->writeFieldBegin('tid', TType::STRUCT, 2); + $xfer += $output->writeFieldBegin('tid', Thrift::TType::STRUCT, 2); $xfer += $self->{tid}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{name}) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 3); + $xfer += $output->writeFieldBegin('name', Thrift::TType::STRING, 3); $xfer += $output->writeString($self->{name}); $xfer += $output->writeFieldEnd(); } if (defined $self->{extraMap}) { - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 4); + $xfer += $output->writeFieldBegin('extraMap', Thrift::TType::MAP, 4); { - $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{extraMap}})); + $xfer += $output->writeMapBegin(Thrift::TType::STRING, Thrift::TType::STRING, scalar(keys %{$self->{extraMap}})); { while( my ($kiter172,$viter173) = each %{$self->{extraMap}}) { @@ -2612,29 +2615,29 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{error} = new TimError(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{error} = TimError->new(); $xfer += $self->{error}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRUCT) { - $self->{ub} = new TimUserBean(); + /^2$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{ub} = TimUserBean->new(); $xfer += $self->{ub}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::MAP) { + /^3$/ && do{ if ($ftype == Thrift::TType::MAP) { { my $_size174 = 0; $self->{extraMap} = {}; @@ -2668,19 +2671,19 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('TimRemoteUserBean'); if (defined $self->{error}) { - $xfer += $output->writeFieldBegin('error', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('error', Thrift::TType::STRUCT, 1); $xfer += $self->{error}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{ub}) { - $xfer += $output->writeFieldBegin('ub', TType::STRUCT, 2); + $xfer += $output->writeFieldBegin('ub', Thrift::TType::STRUCT, 2); $xfer += $self->{ub}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{extraMap}) { - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 3); + $xfer += $output->writeFieldBegin('extraMap', Thrift::TType::MAP, 3); { - $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{extraMap}})); + $xfer += $output->writeMapBegin(Thrift::TType::STRING, Thrift::TType::STRING, scalar(keys %{$self->{extraMap}})); { while( my ($kiter181,$viter182) = each %{$self->{extraMap}}) { @@ -2733,29 +2736,29 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{error} = new TimError(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{error} = TimError->new(); $xfer += $self->{error}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRUCT) { - $self->{room} = new TimRoom(); + /^2$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{room} = TimRoom->new(); $xfer += $self->{room}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::MAP) { + /^3$/ && do{ if ($ftype == Thrift::TType::MAP) { { my $_size183 = 0; $self->{extraMap} = {}; @@ -2789,19 +2792,19 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('TimRemoteRoom'); if (defined $self->{error}) { - $xfer += $output->writeFieldBegin('error', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('error', Thrift::TType::STRUCT, 1); $xfer += $self->{error}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{room}) { - $xfer += $output->writeFieldBegin('room', TType::STRUCT, 2); + $xfer += $output->writeFieldBegin('room', Thrift::TType::STRUCT, 2); $xfer += $self->{room}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{extraMap}) { - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 3); + $xfer += $output->writeFieldBegin('extraMap', Thrift::TType::MAP, 3); { - $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{extraMap}})); + $xfer += $output->writeMapBegin(Thrift::TType::STRING, Thrift::TType::STRING, scalar(keys %{$self->{extraMap}})); { while( my ($kiter190,$viter191) = each %{$self->{extraMap}}) { @@ -2858,28 +2861,28 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRING) { + /^1$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{threadId}); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRUCT) { - $self->{error} = new TimError(); + /^2$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{error} = TimError->new(); $xfer += $self->{error}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::LIST) { + /^3$/ && do{ if ($ftype == Thrift::TType::LIST) { { my $_size192 = 0; $self->{extraList} = []; @@ -2888,7 +2891,7 @@ sub read { for (my $_i196 = 0; $_i196 < $_size192; ++$_i196) { my $elem197 = undef; - $elem197 = new TimNode(); + $elem197 = TimNode->new(); $xfer += $elem197->read($input); push(@{$self->{extraList}},$elem197); } @@ -2898,7 +2901,7 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^4$/ && do{ if ($ftype == TType::MAP) { + /^4$/ && do{ if ($ftype == Thrift::TType::MAP) { { my $_size198 = 0; $self->{extraMap} = {}; @@ -2932,19 +2935,19 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('TimResponseBean'); if (defined $self->{threadId}) { - $xfer += $output->writeFieldBegin('threadId', TType::STRING, 1); + $xfer += $output->writeFieldBegin('threadId', Thrift::TType::STRING, 1); $xfer += $output->writeString($self->{threadId}); $xfer += $output->writeFieldEnd(); } if (defined $self->{error}) { - $xfer += $output->writeFieldBegin('error', TType::STRUCT, 2); + $xfer += $output->writeFieldBegin('error', Thrift::TType::STRUCT, 2); $xfer += $self->{error}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{extraList}) { - $xfer += $output->writeFieldBegin('extraList', TType::LIST, 3); + $xfer += $output->writeFieldBegin('extraList', Thrift::TType::LIST, 3); { - $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{extraList}})); + $xfer += $output->writeListBegin(Thrift::TType::STRUCT, scalar(@{$self->{extraList}})); { foreach my $iter205 (@{$self->{extraList}}) { @@ -2956,9 +2959,9 @@ sub write { $xfer += $output->writeFieldEnd(); } if (defined $self->{extraMap}) { - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 4); + $xfer += $output->writeFieldBegin('extraMap', Thrift::TType::MAP, 4); { - $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{extraMap}})); + $xfer += $output->writeMapBegin(Thrift::TType::STRING, Thrift::TType::STRING, scalar(keys %{$self->{extraMap}})); { while( my ($kiter206,$viter207) = each %{$self->{extraMap}}) { @@ -3027,53 +3030,53 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRUCT) { - $self->{fromTid} = new Tid(); + /^1$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{fromTid} = Tid->new(); $xfer += $self->{fromTid}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRUCT) { - $self->{toTid} = new Tid(); + /^2$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{toTid} = Tid->new(); $xfer += $self->{toTid}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::STRING) { + /^3$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{addr}); } else { $xfer += $input->skip($ftype); } last; }; - /^4$/ && do{ if ($ftype == TType::I32) { + /^4$/ && do{ if ($ftype == Thrift::TType::I32) { $xfer += $input->readI32(\$self->{port}); } else { $xfer += $input->skip($ftype); } last; }; - /^5$/ && do{ if ($ftype == TType::I16) { + /^5$/ && do{ if ($ftype == Thrift::TType::I16) { $xfer += $input->readI16(\$self->{transport}); } else { $xfer += $input->skip($ftype); } last; }; - /^6$/ && do{ if ($ftype == TType::STRING) { + /^6$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{pubId}); } else { $xfer += $input->skip($ftype); } last; }; - /^7$/ && do{ if ($ftype == TType::MAP) { + /^7$/ && do{ if ($ftype == Thrift::TType::MAP) { { my $_size208 = 0; $self->{extraMap} = {}; @@ -3107,39 +3110,39 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('TimSock5Bean'); if (defined $self->{fromTid}) { - $xfer += $output->writeFieldBegin('fromTid', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('fromTid', Thrift::TType::STRUCT, 1); $xfer += $self->{fromTid}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{toTid}) { - $xfer += $output->writeFieldBegin('toTid', TType::STRUCT, 2); + $xfer += $output->writeFieldBegin('toTid', Thrift::TType::STRUCT, 2); $xfer += $self->{toTid}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{addr}) { - $xfer += $output->writeFieldBegin('addr', TType::STRING, 3); + $xfer += $output->writeFieldBegin('addr', Thrift::TType::STRING, 3); $xfer += $output->writeString($self->{addr}); $xfer += $output->writeFieldEnd(); } if (defined $self->{port}) { - $xfer += $output->writeFieldBegin('port', TType::I32, 4); + $xfer += $output->writeFieldBegin('port', Thrift::TType::I32, 4); $xfer += $output->writeI32($self->{port}); $xfer += $output->writeFieldEnd(); } if (defined $self->{transport}) { - $xfer += $output->writeFieldBegin('transport', TType::I16, 5); + $xfer += $output->writeFieldBegin('transport', Thrift::TType::I16, 5); $xfer += $output->writeI16($self->{transport}); $xfer += $output->writeFieldEnd(); } if (defined $self->{pubId}) { - $xfer += $output->writeFieldBegin('pubId', TType::STRING, 6); + $xfer += $output->writeFieldBegin('pubId', Thrift::TType::STRING, 6); $xfer += $output->writeString($self->{pubId}); $xfer += $output->writeFieldEnd(); } if (defined $self->{extraMap}) { - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 7); + $xfer += $output->writeFieldBegin('extraMap', Thrift::TType::MAP, 7); { - $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{extraMap}})); + $xfer += $output->writeMapBegin(Thrift::TType::STRING, Thrift::TType::STRING, scalar(keys %{$self->{extraMap}})); { while( my ($kiter215,$viter216) = each %{$self->{extraMap}}) { @@ -3196,27 +3199,27 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRING) { + /^1$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{pubId}); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::I32) { + /^2$/ && do{ if ($ftype == Thrift::TType::I32) { $xfer += $input->readI32(\$self->{index}); } else { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::LIST) { + /^3$/ && do{ if ($ftype == Thrift::TType::LIST) { { my $_size217 = 0; $self->{bytes} = []; @@ -3234,7 +3237,7 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^4$/ && do{ if ($ftype == TType::MAP) { + /^4$/ && do{ if ($ftype == Thrift::TType::MAP) { { my $_size223 = 0; $self->{extraMap} = {}; @@ -3268,19 +3271,19 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('TimSock5Bytes'); if (defined $self->{pubId}) { - $xfer += $output->writeFieldBegin('pubId', TType::STRING, 1); + $xfer += $output->writeFieldBegin('pubId', Thrift::TType::STRING, 1); $xfer += $output->writeString($self->{pubId}); $xfer += $output->writeFieldEnd(); } if (defined $self->{index}) { - $xfer += $output->writeFieldBegin('index', TType::I32, 2); + $xfer += $output->writeFieldBegin('index', Thrift::TType::I32, 2); $xfer += $output->writeI32($self->{index}); $xfer += $output->writeFieldEnd(); } if (defined $self->{bytes}) { - $xfer += $output->writeFieldBegin('bytes', TType::LIST, 3); + $xfer += $output->writeFieldBegin('bytes', Thrift::TType::LIST, 3); { - $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{bytes}})); + $xfer += $output->writeListBegin(Thrift::TType::STRING, scalar(@{$self->{bytes}})); { foreach my $iter230 (@{$self->{bytes}}) { @@ -3292,9 +3295,9 @@ sub write { $xfer += $output->writeFieldEnd(); } if (defined $self->{extraMap}) { - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 4); + $xfer += $output->writeFieldBegin('extraMap', Thrift::TType::MAP, 4); { - $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{extraMap}})); + $xfer += $output->writeMapBegin(Thrift::TType::STRING, Thrift::TType::STRING, scalar(keys %{$self->{extraMap}})); { while( my ($kiter231,$viter232) = each %{$self->{extraMap}}) { @@ -3351,33 +3354,33 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRING) { + /^1$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{fromTimeStamp}); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRING) { + /^2$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{toTimeStamp}); } else { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::I32) { + /^3$/ && do{ if ($ftype == Thrift::TType::I32) { $xfer += $input->readI32(\$self->{limitCount}); } else { $xfer += $input->skip($ftype); } last; }; - /^4$/ && do{ if ($ftype == TType::MAP) { + /^4$/ && do{ if ($ftype == Thrift::TType::MAP) { { my $_size233 = 0; $self->{extraMap} = {}; @@ -3411,24 +3414,24 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('TimPage'); if (defined $self->{fromTimeStamp}) { - $xfer += $output->writeFieldBegin('fromTimeStamp', TType::STRING, 1); + $xfer += $output->writeFieldBegin('fromTimeStamp', Thrift::TType::STRING, 1); $xfer += $output->writeString($self->{fromTimeStamp}); $xfer += $output->writeFieldEnd(); } if (defined $self->{toTimeStamp}) { - $xfer += $output->writeFieldBegin('toTimeStamp', TType::STRING, 2); + $xfer += $output->writeFieldBegin('toTimeStamp', Thrift::TType::STRING, 2); $xfer += $output->writeString($self->{toTimeStamp}); $xfer += $output->writeFieldEnd(); } if (defined $self->{limitCount}) { - $xfer += $output->writeFieldBegin('limitCount', TType::I32, 3); + $xfer += $output->writeFieldBegin('limitCount', Thrift::TType::I32, 3); $xfer += $output->writeI32($self->{limitCount}); $xfer += $output->writeFieldEnd(); } if (defined $self->{extraMap}) { - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 4); + $xfer += $output->writeFieldBegin('extraMap', Thrift::TType::MAP, 4); { - $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{extraMap}})); + $xfer += $output->writeMapBegin(Thrift::TType::STRING, Thrift::TType::STRING, scalar(keys %{$self->{extraMap}})); { while( my ($kiter240,$viter241) = each %{$self->{extraMap}}) { @@ -3485,15 +3488,15 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::LIST) { + /^1$/ && do{ if ($ftype == Thrift::TType::LIST) { { my $_size242 = 0; $self->{tidlist} = []; @@ -3511,14 +3514,14 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRUCT) { - $self->{timPage} = new TimPage(); + /^2$/ && do{ if ($ftype == Thrift::TType::STRUCT) { + $self->{timPage} = TimPage->new(); $xfer += $self->{timPage}->read($input); } else { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::LIST) { + /^3$/ && do{ if ($ftype == Thrift::TType::LIST) { { my $_size248 = 0; $self->{midlist} = []; @@ -3536,7 +3539,7 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^4$/ && do{ if ($ftype == TType::MAP) { + /^4$/ && do{ if ($ftype == Thrift::TType::MAP) { { my $_size254 = 0; $self->{extraMap} = {}; @@ -3570,9 +3573,9 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('TimMessageIq'); if (defined $self->{tidlist}) { - $xfer += $output->writeFieldBegin('tidlist', TType::LIST, 1); + $xfer += $output->writeFieldBegin('tidlist', Thrift::TType::LIST, 1); { - $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{tidlist}})); + $xfer += $output->writeListBegin(Thrift::TType::STRING, scalar(@{$self->{tidlist}})); { foreach my $iter261 (@{$self->{tidlist}}) { @@ -3584,14 +3587,14 @@ sub write { $xfer += $output->writeFieldEnd(); } if (defined $self->{timPage}) { - $xfer += $output->writeFieldBegin('timPage', TType::STRUCT, 2); + $xfer += $output->writeFieldBegin('timPage', Thrift::TType::STRUCT, 2); $xfer += $self->{timPage}->write($output); $xfer += $output->writeFieldEnd(); } if (defined $self->{midlist}) { - $xfer += $output->writeFieldBegin('midlist', TType::LIST, 3); + $xfer += $output->writeFieldBegin('midlist', Thrift::TType::LIST, 3); { - $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{midlist}})); + $xfer += $output->writeListBegin(Thrift::TType::STRING, scalar(@{$self->{midlist}})); { foreach my $iter262 (@{$self->{midlist}}) { @@ -3603,9 +3606,9 @@ sub write { $xfer += $output->writeFieldEnd(); } if (defined $self->{extraMap}) { - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 4); + $xfer += $output->writeFieldBegin('extraMap', Thrift::TType::MAP, 4); { - $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{extraMap}})); + $xfer += $output->writeMapBegin(Thrift::TType::STRING, Thrift::TType::STRING, scalar(keys %{$self->{extraMap}})); { while( my ($kiter263,$viter264) = each %{$self->{extraMap}}) { @@ -3658,27 +3661,27 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRING) { + /^1$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{domain}); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRING) { + /^2$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{username}); } else { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::STRING) { + /^3$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{pwd}); } else { $xfer += $input->skip($ftype); @@ -3697,17 +3700,17 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('TimAuth'); if (defined $self->{domain}) { - $xfer += $output->writeFieldBegin('domain', TType::STRING, 1); + $xfer += $output->writeFieldBegin('domain', Thrift::TType::STRING, 1); $xfer += $output->writeString($self->{domain}); $xfer += $output->writeFieldEnd(); } if (defined $self->{username}) { - $xfer += $output->writeFieldBegin('username', TType::STRING, 2); + $xfer += $output->writeFieldBegin('username', Thrift::TType::STRING, 2); $xfer += $output->writeString($self->{username}); $xfer += $output->writeFieldEnd(); } if (defined $self->{pwd}) { - $xfer += $output->writeFieldBegin('pwd', TType::STRING, 3); + $xfer += $output->writeFieldBegin('pwd', Thrift::TType::STRING, 3); $xfer += $output->writeString($self->{pwd}); $xfer += $output->writeFieldEnd(); } @@ -3756,21 +3759,21 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRING) { + /^1$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{threadId}); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::LIST) { + /^2$/ && do{ if ($ftype == Thrift::TType::LIST) { { my $_size265 = 0; $self->{timMBeanList} = []; @@ -3779,7 +3782,7 @@ sub read { for (my $_i269 = 0; $_i269 < $_size265; ++$_i269) { my $elem270 = undef; - $elem270 = new TimMBean(); + $elem270 = TimMBean->new(); $xfer += $elem270->read($input); push(@{$self->{timMBeanList}},$elem270); } @@ -3789,13 +3792,13 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::STRING) { + /^3$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{reqType}); } else { $xfer += $input->skip($ftype); } last; }; - /^4$/ && do{ if ($ftype == TType::MAP) { + /^4$/ && do{ if ($ftype == Thrift::TType::MAP) { { my $_size271 = 0; $self->{extraMap} = {}; @@ -3829,14 +3832,14 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('TimMBeanList'); if (defined $self->{threadId}) { - $xfer += $output->writeFieldBegin('threadId', TType::STRING, 1); + $xfer += $output->writeFieldBegin('threadId', Thrift::TType::STRING, 1); $xfer += $output->writeString($self->{threadId}); $xfer += $output->writeFieldEnd(); } if (defined $self->{timMBeanList}) { - $xfer += $output->writeFieldBegin('timMBeanList', TType::LIST, 2); + $xfer += $output->writeFieldBegin('timMBeanList', Thrift::TType::LIST, 2); { - $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{timMBeanList}})); + $xfer += $output->writeListBegin(Thrift::TType::STRUCT, scalar(@{$self->{timMBeanList}})); { foreach my $iter278 (@{$self->{timMBeanList}}) { @@ -3848,14 +3851,14 @@ sub write { $xfer += $output->writeFieldEnd(); } if (defined $self->{reqType}) { - $xfer += $output->writeFieldBegin('reqType', TType::STRING, 3); + $xfer += $output->writeFieldBegin('reqType', Thrift::TType::STRING, 3); $xfer += $output->writeString($self->{reqType}); $xfer += $output->writeFieldEnd(); } if (defined $self->{extraMap}) { - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 4); + $xfer += $output->writeFieldBegin('extraMap', Thrift::TType::MAP, 4); { - $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{extraMap}})); + $xfer += $output->writeMapBegin(Thrift::TType::STRING, Thrift::TType::STRING, scalar(keys %{$self->{extraMap}})); { while( my ($kiter279,$viter280) = each %{$self->{extraMap}}) { @@ -3912,21 +3915,21 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRING) { + /^1$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{threadId}); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::LIST) { + /^2$/ && do{ if ($ftype == Thrift::TType::LIST) { { my $_size281 = 0; $self->{timPBeanList} = []; @@ -3935,7 +3938,7 @@ sub read { for (my $_i285 = 0; $_i285 < $_size281; ++$_i285) { my $elem286 = undef; - $elem286 = new TimPBean(); + $elem286 = TimPBean->new(); $xfer += $elem286->read($input); push(@{$self->{timPBeanList}},$elem286); } @@ -3945,13 +3948,13 @@ sub read { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::STRING) { + /^3$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{reqType}); } else { $xfer += $input->skip($ftype); } last; }; - /^4$/ && do{ if ($ftype == TType::MAP) { + /^4$/ && do{ if ($ftype == Thrift::TType::MAP) { { my $_size287 = 0; $self->{extraMap} = {}; @@ -3985,14 +3988,14 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('TimPBeanList'); if (defined $self->{threadId}) { - $xfer += $output->writeFieldBegin('threadId', TType::STRING, 1); + $xfer += $output->writeFieldBegin('threadId', Thrift::TType::STRING, 1); $xfer += $output->writeString($self->{threadId}); $xfer += $output->writeFieldEnd(); } if (defined $self->{timPBeanList}) { - $xfer += $output->writeFieldBegin('timPBeanList', TType::LIST, 2); + $xfer += $output->writeFieldBegin('timPBeanList', Thrift::TType::LIST, 2); { - $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{timPBeanList}})); + $xfer += $output->writeListBegin(Thrift::TType::STRUCT, scalar(@{$self->{timPBeanList}})); { foreach my $iter294 (@{$self->{timPBeanList}}) { @@ -4004,14 +4007,14 @@ sub write { $xfer += $output->writeFieldEnd(); } if (defined $self->{reqType}) { - $xfer += $output->writeFieldBegin('reqType', TType::STRING, 3); + $xfer += $output->writeFieldBegin('reqType', Thrift::TType::STRING, 3); $xfer += $output->writeString($self->{reqType}); $xfer += $output->writeFieldEnd(); } if (defined $self->{extraMap}) { - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 4); + $xfer += $output->writeFieldBegin('extraMap', Thrift::TType::MAP, 4); { - $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{extraMap}})); + $xfer += $output->writeMapBegin(Thrift::TType::STRING, Thrift::TType::STRING, scalar(keys %{$self->{extraMap}})); { while( my ($kiter295,$viter296) = each %{$self->{extraMap}}) { @@ -4064,27 +4067,27 @@ sub read { my $ftype = 0; my $fid = 0; $xfer += $input->readStructBegin(\$fname); - while (1) + while (1) { $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); - if ($ftype == TType::STOP) { + if ($ftype == Thrift::TType::STOP) { last; } SWITCH: for($fid) { - /^1$/ && do{ if ($ftype == TType::STRING) { + /^1$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{threadId}); } else { $xfer += $input->skip($ftype); } last; }; - /^2$/ && do{ if ($ftype == TType::STRING) { + /^2$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{interflow}); } else { $xfer += $input->skip($ftype); } last; }; - /^3$/ && do{ if ($ftype == TType::STRING) { + /^3$/ && do{ if ($ftype == Thrift::TType::STRING) { $xfer += $input->readString(\$self->{tls}); } else { $xfer += $input->skip($ftype); @@ -4103,17 +4106,17 @@ sub write { my $xfer = 0; $xfer += $output->writeStructBegin('TimPropertyBean'); if (defined $self->{threadId}) { - $xfer += $output->writeFieldBegin('threadId', TType::STRING, 1); + $xfer += $output->writeFieldBegin('threadId', Thrift::TType::STRING, 1); $xfer += $output->writeString($self->{threadId}); $xfer += $output->writeFieldEnd(); } if (defined $self->{interflow}) { - $xfer += $output->writeFieldBegin('interflow', TType::STRING, 2); + $xfer += $output->writeFieldBegin('interflow', Thrift::TType::STRING, 2); $xfer += $output->writeString($self->{interflow}); $xfer += $output->writeFieldEnd(); } if (defined $self->{tls}) { - $xfer += $output->writeFieldBegin('tls', TType::STRING, 3); + $xfer += $output->writeFieldBegin('tls', Thrift::TType::STRING, 3); $xfer += $output->writeString($self->{tls}); $xfer += $output->writeFieldEnd(); } diff --git a/protocols/gen-php/Constant.php b/protocols/gen-php/Constant.php new file mode 100644 index 0000000..ba88edf --- /dev/null +++ b/protocols/gen-php/Constant.php @@ -0,0 +1,55 @@ +input_ = $input; - $this->output_ = $output ? $output : $input; - } - - public function timStream(\TimParam $param) - { - $this->send_timStream($param); - } - - public function send_timStream(\TimParam $param) - { - $args = new \ITim_timStream_args(); - $args->param = $param; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'timStream', TMessageType::ONEWAY, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('timStream', TMessageType::ONEWAY, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - public function timStarttls() - { - $this->send_timStarttls(); - } - - public function send_timStarttls() - { - $args = new \ITim_timStarttls_args(); - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'timStarttls', TMessageType::ONEWAY, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('timStarttls', TMessageType::ONEWAY, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - public function timLogin(\Tid $tid, $pwd) - { - $this->send_timLogin($tid, $pwd); - } - - public function send_timLogin(\Tid $tid, $pwd) - { - $args = new \ITim_timLogin_args(); - $args->tid = $tid; - $args->pwd = $pwd; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'timLogin', TMessageType::ONEWAY, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('timLogin', TMessageType::ONEWAY, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - public function timAck(\TimAckBean $ab) - { - $this->send_timAck($ab); - } - - public function send_timAck(\TimAckBean $ab) - { - $args = new \ITim_timAck_args(); - $args->ab = $ab; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'timAck', TMessageType::ONEWAY, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('timAck', TMessageType::ONEWAY, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - public function timPresence(\TimPBean $pbean) - { - $this->send_timPresence($pbean); - } - - public function send_timPresence(\TimPBean $pbean) - { - $args = new \ITim_timPresence_args(); - $args->pbean = $pbean; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'timPresence', TMessageType::ONEWAY, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('timPresence', TMessageType::ONEWAY, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - public function timMessage(\TimMBean $mbean) - { - $this->send_timMessage($mbean); - } - - public function send_timMessage(\TimMBean $mbean) - { - $args = new \ITim_timMessage_args(); - $args->mbean = $mbean; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'timMessage', TMessageType::ONEWAY, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('timMessage', TMessageType::ONEWAY, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - public function timPing($threadId) - { - $this->send_timPing($threadId); - } - - public function send_timPing($threadId) - { - $args = new \ITim_timPing_args(); - $args->threadId = $threadId; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'timPing', TMessageType::ONEWAY, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('timPing', TMessageType::ONEWAY, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - public function timError(\TimError $e) - { - $this->send_timError($e); - } - - public function send_timError(\TimError $e) - { - $args = new \ITim_timError_args(); - $args->e = $e; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'timError', TMessageType::ONEWAY, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('timError', TMessageType::ONEWAY, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - public function timLogout() - { - $this->send_timLogout(); - } - - public function send_timLogout() - { - $args = new \ITim_timLogout_args(); - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'timLogout', TMessageType::ONEWAY, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('timLogout', TMessageType::ONEWAY, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - public function timRegist(\Tid $tid, $auth) - { - $this->send_timRegist($tid, $auth); - } - - public function send_timRegist(\Tid $tid, $auth) - { - $args = new \ITim_timRegist_args(); - $args->tid = $tid; - $args->auth = $auth; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'timRegist', TMessageType::ONEWAY, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('timRegist', TMessageType::ONEWAY, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - public function timRoser(\TimRoster $roster) - { - $this->send_timRoser($roster); - } - - public function send_timRoser(\TimRoster $roster) - { - $args = new \ITim_timRoser_args(); - $args->roster = $roster; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'timRoser', TMessageType::ONEWAY, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('timRoser', TMessageType::ONEWAY, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - public function timMessageList(\TimMBeanList $mbeanList) - { - $this->send_timMessageList($mbeanList); - } - - public function send_timMessageList(\TimMBeanList $mbeanList) - { - $args = new \ITim_timMessageList_args(); - $args->mbeanList = $mbeanList; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'timMessageList', TMessageType::ONEWAY, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('timMessageList', TMessageType::ONEWAY, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - public function timPresenceList(\TimPBeanList $pbeanList) - { - $this->send_timPresenceList($pbeanList); - } - - public function send_timPresenceList(\TimPBeanList $pbeanList) - { - $args = new \ITim_timPresenceList_args(); - $args->pbeanList = $pbeanList; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'timPresenceList', TMessageType::ONEWAY, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('timPresenceList', TMessageType::ONEWAY, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - public function timMessageIq(\TimMessageIq $timMsgIq, $iqType) - { - $this->send_timMessageIq($timMsgIq, $iqType); - } - - public function send_timMessageIq(\TimMessageIq $timMsgIq, $iqType) - { - $args = new \ITim_timMessageIq_args(); - $args->timMsgIq = $timMsgIq; - $args->iqType = $iqType; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'timMessageIq', TMessageType::ONEWAY, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('timMessageIq', TMessageType::ONEWAY, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - public function timMessageResult(\TimMBean $mbean) - { - $this->send_timMessageResult($mbean); - } - - public function send_timMessageResult(\TimMBean $mbean) - { - $args = new \ITim_timMessageResult_args(); - $args->mbean = $mbean; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'timMessageResult', TMessageType::ONEWAY, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('timMessageResult', TMessageType::ONEWAY, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - public function timProperty(\TimPropertyBean $tpb) - { - $this->send_timProperty($tpb); - } - - public function send_timProperty(\TimPropertyBean $tpb) - { - $args = new \ITim_timProperty_args(); - $args->tpb = $tpb; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'timProperty', TMessageType::ONEWAY, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('timProperty', TMessageType::ONEWAY, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - public function timRemoteUserAuth(\Tid $tid, $pwd, \TimAuth $auth) - { - $this->send_timRemoteUserAuth($tid, $pwd, $auth); - return $this->recv_timRemoteUserAuth(); - } - - public function send_timRemoteUserAuth(\Tid $tid, $pwd, \TimAuth $auth) - { - $args = new \ITim_timRemoteUserAuth_args(); - $args->tid = $tid; - $args->pwd = $pwd; - $args->auth = $auth; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'timRemoteUserAuth', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('timRemoteUserAuth', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_timRemoteUserAuth() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ITim_timRemoteUserAuth_result', $this->input_->isStrictRead()); - else - { - $rseqid = 0; - $fname = null; - $mtype = 0; - - $this->input_->readMessageBegin($fname, $mtype, $rseqid); - if ($mtype == TMessageType::EXCEPTION) { - $x = new TApplicationException(); - $x->read($this->input_); - $this->input_->readMessageEnd(); - throw $x; - } - $result = new \ITim_timRemoteUserAuth_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("timRemoteUserAuth failed: unknown result"); - } - - public function timRemoteUserGet(\Tid $tid, \TimAuth $auth) - { - $this->send_timRemoteUserGet($tid, $auth); - return $this->recv_timRemoteUserGet(); - } - - public function send_timRemoteUserGet(\Tid $tid, \TimAuth $auth) - { - $args = new \ITim_timRemoteUserGet_args(); - $args->tid = $tid; - $args->auth = $auth; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'timRemoteUserGet', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('timRemoteUserGet', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_timRemoteUserGet() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ITim_timRemoteUserGet_result', $this->input_->isStrictRead()); - else - { - $rseqid = 0; - $fname = null; - $mtype = 0; - - $this->input_->readMessageBegin($fname, $mtype, $rseqid); - if ($mtype == TMessageType::EXCEPTION) { - $x = new TApplicationException(); - $x->read($this->input_); - $this->input_->readMessageEnd(); - throw $x; - } - $result = new \ITim_timRemoteUserGet_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("timRemoteUserGet failed: unknown result"); - } - - public function timRemoteUserEdit(\Tid $tid, \TimUserBean $ub, \TimAuth $auth) - { - $this->send_timRemoteUserEdit($tid, $ub, $auth); - return $this->recv_timRemoteUserEdit(); - } - - public function send_timRemoteUserEdit(\Tid $tid, \TimUserBean $ub, \TimAuth $auth) - { - $args = new \ITim_timRemoteUserEdit_args(); - $args->tid = $tid; - $args->ub = $ub; - $args->auth = $auth; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'timRemoteUserEdit', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('timRemoteUserEdit', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_timRemoteUserEdit() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ITim_timRemoteUserEdit_result', $this->input_->isStrictRead()); - else - { - $rseqid = 0; - $fname = null; - $mtype = 0; - - $this->input_->readMessageBegin($fname, $mtype, $rseqid); - if ($mtype == TMessageType::EXCEPTION) { - $x = new TApplicationException(); - $x->read($this->input_); - $this->input_->readMessageEnd(); - throw $x; - } - $result = new \ITim_timRemoteUserEdit_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("timRemoteUserEdit failed: unknown result"); - } - - public function timResponsePresence(\TimPBean $pbean, \TimAuth $auth) - { - $this->send_timResponsePresence($pbean, $auth); - return $this->recv_timResponsePresence(); - } - - public function send_timResponsePresence(\TimPBean $pbean, \TimAuth $auth) - { - $args = new \ITim_timResponsePresence_args(); - $args->pbean = $pbean; - $args->auth = $auth; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'timResponsePresence', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('timResponsePresence', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_timResponsePresence() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ITim_timResponsePresence_result', $this->input_->isStrictRead()); - else - { - $rseqid = 0; - $fname = null; - $mtype = 0; - - $this->input_->readMessageBegin($fname, $mtype, $rseqid); - if ($mtype == TMessageType::EXCEPTION) { - $x = new TApplicationException(); - $x->read($this->input_); - $this->input_->readMessageEnd(); - throw $x; - } - $result = new \ITim_timResponsePresence_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("timResponsePresence failed: unknown result"); - } - - public function timResponseMessage(\TimMBean $mbean, \TimAuth $auth) - { - $this->send_timResponseMessage($mbean, $auth); - return $this->recv_timResponseMessage(); - } - - public function send_timResponseMessage(\TimMBean $mbean, \TimAuth $auth) - { - $args = new \ITim_timResponseMessage_args(); - $args->mbean = $mbean; - $args->auth = $auth; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'timResponseMessage', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('timResponseMessage', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_timResponseMessage() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ITim_timResponseMessage_result', $this->input_->isStrictRead()); - else - { - $rseqid = 0; - $fname = null; - $mtype = 0; - - $this->input_->readMessageBegin($fname, $mtype, $rseqid); - if ($mtype == TMessageType::EXCEPTION) { - $x = new TApplicationException(); - $x->read($this->input_); - $this->input_->readMessageEnd(); - throw $x; - } - $result = new \ITim_timResponseMessage_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("timResponseMessage failed: unknown result"); - } - - public function timResponseMessageIq(\TimMessageIq $timMsgIq, $iqType, \TimAuth $auth) - { - $this->send_timResponseMessageIq($timMsgIq, $iqType, $auth); - return $this->recv_timResponseMessageIq(); - } - - public function send_timResponseMessageIq(\TimMessageIq $timMsgIq, $iqType, \TimAuth $auth) - { - $args = new \ITim_timResponseMessageIq_args(); - $args->timMsgIq = $timMsgIq; - $args->iqType = $iqType; - $args->auth = $auth; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'timResponseMessageIq', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('timResponseMessageIq', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_timResponseMessageIq() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ITim_timResponseMessageIq_result', $this->input_->isStrictRead()); - else - { - $rseqid = 0; - $fname = null; - $mtype = 0; - - $this->input_->readMessageBegin($fname, $mtype, $rseqid); - if ($mtype == TMessageType::EXCEPTION) { - $x = new TApplicationException(); - $x->read($this->input_); - $this->input_->readMessageEnd(); - throw $x; - } - $result = new \ITim_timResponseMessageIq_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("timResponseMessageIq failed: unknown result"); - } - - public function timResponsePresenceList(\TimPBeanList $pbeanList, \TimAuth $auth) - { - $this->send_timResponsePresenceList($pbeanList, $auth); - return $this->recv_timResponsePresenceList(); - } - - public function send_timResponsePresenceList(\TimPBeanList $pbeanList, \TimAuth $auth) - { - $args = new \ITim_timResponsePresenceList_args(); - $args->pbeanList = $pbeanList; - $args->auth = $auth; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'timResponsePresenceList', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('timResponsePresenceList', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_timResponsePresenceList() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ITim_timResponsePresenceList_result', $this->input_->isStrictRead()); - else - { - $rseqid = 0; - $fname = null; - $mtype = 0; - - $this->input_->readMessageBegin($fname, $mtype, $rseqid); - if ($mtype == TMessageType::EXCEPTION) { - $x = new TApplicationException(); - $x->read($this->input_); - $this->input_->readMessageEnd(); - throw $x; - } - $result = new \ITim_timResponsePresenceList_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("timResponsePresenceList failed: unknown result"); - } - - public function timResponseMessageList(\TimMBeanList $mbeanList, \TimAuth $auth) - { - $this->send_timResponseMessageList($mbeanList, $auth); - return $this->recv_timResponseMessageList(); - } - - public function send_timResponseMessageList(\TimMBeanList $mbeanList, \TimAuth $auth) - { - $args = new \ITim_timResponseMessageList_args(); - $args->mbeanList = $mbeanList; - $args->auth = $auth; - $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'timResponseMessageList', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('timResponseMessageList', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_timResponseMessageList() - { - $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\ITim_timResponseMessageList_result', $this->input_->isStrictRead()); - else - { - $rseqid = 0; - $fname = null; - $mtype = 0; - - $this->input_->readMessageBegin($fname, $mtype, $rseqid); - if ($mtype == TMessageType::EXCEPTION) { - $x = new TApplicationException(); - $x->read($this->input_); - $this->input_->readMessageEnd(); - throw $x; - } - $result = new \ITim_timResponseMessageList_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - throw new \Exception("timResponseMessageList failed: unknown result"); - } - -} - -// HELPER FUNCTIONS AND STRUCTURES - -class ITim_timStream_args { - static $_TSPEC; - - /** - * @var \TimParam - */ - public $param = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'param', - 'type' => TType::STRUCT, - 'class' => '\TimParam', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['param'])) { - $this->param = $vals['param']; - } - } - } - - public function getName() { - return 'ITim_timStream_args'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->param = new \TimParam(); - $xfer += $this->param->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timStream_args'); - if ($this->param !== null) { - if (!is_object($this->param)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('param', TType::STRUCT, 1); - $xfer += $this->param->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timStarttls_args { - static $_TSPEC; - - - public function __construct() { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - ); - } - } - - public function getName() { - return 'ITim_timStarttls_args'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timStarttls_args'); - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timLogin_args { - static $_TSPEC; - - /** - * @var \Tid - */ - public $tid = null; - /** - * @var string - */ - public $pwd = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'tid', - 'type' => TType::STRUCT, - 'class' => '\Tid', - ), - 2 => array( - 'var' => 'pwd', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['tid'])) { - $this->tid = $vals['tid']; - } - if (isset($vals['pwd'])) { - $this->pwd = $vals['pwd']; - } - } - } - - public function getName() { - return 'ITim_timLogin_args'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->tid = new \Tid(); - $xfer += $this->tid->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->pwd); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timLogin_args'); - if ($this->tid !== null) { - if (!is_object($this->tid)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('tid', TType::STRUCT, 1); - $xfer += $this->tid->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->pwd !== null) { - $xfer += $output->writeFieldBegin('pwd', TType::STRING, 2); - $xfer += $output->writeString($this->pwd); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timAck_args { - static $_TSPEC; - - /** - * @var \TimAckBean - */ - public $ab = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'ab', - 'type' => TType::STRUCT, - 'class' => '\TimAckBean', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['ab'])) { - $this->ab = $vals['ab']; - } - } - } - - public function getName() { - return 'ITim_timAck_args'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->ab = new \TimAckBean(); - $xfer += $this->ab->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timAck_args'); - if ($this->ab !== null) { - if (!is_object($this->ab)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('ab', TType::STRUCT, 1); - $xfer += $this->ab->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timPresence_args { - static $_TSPEC; - - /** - * @var \TimPBean - */ - public $pbean = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'pbean', - 'type' => TType::STRUCT, - 'class' => '\TimPBean', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['pbean'])) { - $this->pbean = $vals['pbean']; - } - } - } - - public function getName() { - return 'ITim_timPresence_args'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->pbean = new \TimPBean(); - $xfer += $this->pbean->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timPresence_args'); - if ($this->pbean !== null) { - if (!is_object($this->pbean)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('pbean', TType::STRUCT, 1); - $xfer += $this->pbean->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timMessage_args { - static $_TSPEC; - - /** - * @var \TimMBean - */ - public $mbean = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'mbean', - 'type' => TType::STRUCT, - 'class' => '\TimMBean', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['mbean'])) { - $this->mbean = $vals['mbean']; - } - } - } - - public function getName() { - return 'ITim_timMessage_args'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->mbean = new \TimMBean(); - $xfer += $this->mbean->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timMessage_args'); - if ($this->mbean !== null) { - if (!is_object($this->mbean)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('mbean', TType::STRUCT, 1); - $xfer += $this->mbean->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timPing_args { - static $_TSPEC; - - /** - * @var string - */ - public $threadId = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'threadId', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['threadId'])) { - $this->threadId = $vals['threadId']; - } - } - } - - public function getName() { - return 'ITim_timPing_args'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->threadId); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timPing_args'); - if ($this->threadId !== null) { - $xfer += $output->writeFieldBegin('threadId', TType::STRING, 1); - $xfer += $output->writeString($this->threadId); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timError_args { - static $_TSPEC; - - /** - * @var \TimError - */ - public $e = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'e', - 'type' => TType::STRUCT, - 'class' => '\TimError', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['e'])) { - $this->e = $vals['e']; - } - } - } - - public function getName() { - return 'ITim_timError_args'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->e = new \TimError(); - $xfer += $this->e->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timError_args'); - if ($this->e !== null) { - if (!is_object($this->e)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('e', TType::STRUCT, 1); - $xfer += $this->e->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timLogout_args { - static $_TSPEC; - - - public function __construct() { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - ); - } - } - - public function getName() { - return 'ITim_timLogout_args'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timLogout_args'); - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timRegist_args { - static $_TSPEC; - - /** - * @var \Tid - */ - public $tid = null; - /** - * @var string - */ - public $auth = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'tid', - 'type' => TType::STRUCT, - 'class' => '\Tid', - ), - 2 => array( - 'var' => 'auth', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['tid'])) { - $this->tid = $vals['tid']; - } - if (isset($vals['auth'])) { - $this->auth = $vals['auth']; - } - } - } - - public function getName() { - return 'ITim_timRegist_args'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->tid = new \Tid(); - $xfer += $this->tid->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->auth); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timRegist_args'); - if ($this->tid !== null) { - if (!is_object($this->tid)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('tid', TType::STRUCT, 1); - $xfer += $this->tid->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->auth !== null) { - $xfer += $output->writeFieldBegin('auth', TType::STRING, 2); - $xfer += $output->writeString($this->auth); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timRoser_args { - static $_TSPEC; - - /** - * @var \TimRoster - */ - public $roster = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'roster', - 'type' => TType::STRUCT, - 'class' => '\TimRoster', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['roster'])) { - $this->roster = $vals['roster']; - } - } - } - - public function getName() { - return 'ITim_timRoser_args'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->roster = new \TimRoster(); - $xfer += $this->roster->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timRoser_args'); - if ($this->roster !== null) { - if (!is_object($this->roster)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('roster', TType::STRUCT, 1); - $xfer += $this->roster->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timMessageList_args { - static $_TSPEC; - - /** - * @var \TimMBeanList - */ - public $mbeanList = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'mbeanList', - 'type' => TType::STRUCT, - 'class' => '\TimMBeanList', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['mbeanList'])) { - $this->mbeanList = $vals['mbeanList']; - } - } - } - - public function getName() { - return 'ITim_timMessageList_args'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->mbeanList = new \TimMBeanList(); - $xfer += $this->mbeanList->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timMessageList_args'); - if ($this->mbeanList !== null) { - if (!is_object($this->mbeanList)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('mbeanList', TType::STRUCT, 1); - $xfer += $this->mbeanList->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timPresenceList_args { - static $_TSPEC; - - /** - * @var \TimPBeanList - */ - public $pbeanList = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'pbeanList', - 'type' => TType::STRUCT, - 'class' => '\TimPBeanList', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['pbeanList'])) { - $this->pbeanList = $vals['pbeanList']; - } - } - } - - public function getName() { - return 'ITim_timPresenceList_args'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->pbeanList = new \TimPBeanList(); - $xfer += $this->pbeanList->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timPresenceList_args'); - if ($this->pbeanList !== null) { - if (!is_object($this->pbeanList)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('pbeanList', TType::STRUCT, 1); - $xfer += $this->pbeanList->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timMessageIq_args { - static $_TSPEC; - - /** - * @var \TimMessageIq - */ - public $timMsgIq = null; - /** - * @var string - */ - public $iqType = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'timMsgIq', - 'type' => TType::STRUCT, - 'class' => '\TimMessageIq', - ), - 2 => array( - 'var' => 'iqType', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['timMsgIq'])) { - $this->timMsgIq = $vals['timMsgIq']; - } - if (isset($vals['iqType'])) { - $this->iqType = $vals['iqType']; - } - } - } - - public function getName() { - return 'ITim_timMessageIq_args'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->timMsgIq = new \TimMessageIq(); - $xfer += $this->timMsgIq->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->iqType); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timMessageIq_args'); - if ($this->timMsgIq !== null) { - if (!is_object($this->timMsgIq)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('timMsgIq', TType::STRUCT, 1); - $xfer += $this->timMsgIq->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->iqType !== null) { - $xfer += $output->writeFieldBegin('iqType', TType::STRING, 2); - $xfer += $output->writeString($this->iqType); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timMessageResult_args { - static $_TSPEC; - - /** - * @var \TimMBean - */ - public $mbean = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'mbean', - 'type' => TType::STRUCT, - 'class' => '\TimMBean', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['mbean'])) { - $this->mbean = $vals['mbean']; - } - } - } - - public function getName() { - return 'ITim_timMessageResult_args'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->mbean = new \TimMBean(); - $xfer += $this->mbean->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timMessageResult_args'); - if ($this->mbean !== null) { - if (!is_object($this->mbean)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('mbean', TType::STRUCT, 1); - $xfer += $this->mbean->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timProperty_args { - static $_TSPEC; - - /** - * @var \TimPropertyBean - */ - public $tpb = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'tpb', - 'type' => TType::STRUCT, - 'class' => '\TimPropertyBean', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['tpb'])) { - $this->tpb = $vals['tpb']; - } - } - } - - public function getName() { - return 'ITim_timProperty_args'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->tpb = new \TimPropertyBean(); - $xfer += $this->tpb->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timProperty_args'); - if ($this->tpb !== null) { - if (!is_object($this->tpb)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('tpb', TType::STRUCT, 1); - $xfer += $this->tpb->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timRemoteUserAuth_args { - static $_TSPEC; - - /** - * @var \Tid - */ - public $tid = null; - /** - * @var string - */ - public $pwd = null; - /** - * @var \TimAuth - */ - public $auth = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'tid', - 'type' => TType::STRUCT, - 'class' => '\Tid', - ), - 2 => array( - 'var' => 'pwd', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'auth', - 'type' => TType::STRUCT, - 'class' => '\TimAuth', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['tid'])) { - $this->tid = $vals['tid']; - } - if (isset($vals['pwd'])) { - $this->pwd = $vals['pwd']; - } - if (isset($vals['auth'])) { - $this->auth = $vals['auth']; - } - } - } - - public function getName() { - return 'ITim_timRemoteUserAuth_args'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->tid = new \Tid(); - $xfer += $this->tid->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->pwd); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->auth = new \TimAuth(); - $xfer += $this->auth->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timRemoteUserAuth_args'); - if ($this->tid !== null) { - if (!is_object($this->tid)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('tid', TType::STRUCT, 1); - $xfer += $this->tid->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->pwd !== null) { - $xfer += $output->writeFieldBegin('pwd', TType::STRING, 2); - $xfer += $output->writeString($this->pwd); - $xfer += $output->writeFieldEnd(); - } - if ($this->auth !== null) { - if (!is_object($this->auth)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('auth', TType::STRUCT, 3); - $xfer += $this->auth->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timRemoteUserAuth_result { - static $_TSPEC; - - /** - * @var \TimRemoteUserBean - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\TimRemoteUserBean', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ITim_timRemoteUserAuth_result'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \TimRemoteUserBean(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timRemoteUserAuth_result'); - if ($this->success !== null) { - if (!is_object($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timRemoteUserGet_args { - static $_TSPEC; - - /** - * @var \Tid - */ - public $tid = null; - /** - * @var \TimAuth - */ - public $auth = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'tid', - 'type' => TType::STRUCT, - 'class' => '\Tid', - ), - 2 => array( - 'var' => 'auth', - 'type' => TType::STRUCT, - 'class' => '\TimAuth', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['tid'])) { - $this->tid = $vals['tid']; - } - if (isset($vals['auth'])) { - $this->auth = $vals['auth']; - } - } - } - - public function getName() { - return 'ITim_timRemoteUserGet_args'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->tid = new \Tid(); - $xfer += $this->tid->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->auth = new \TimAuth(); - $xfer += $this->auth->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timRemoteUserGet_args'); - if ($this->tid !== null) { - if (!is_object($this->tid)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('tid', TType::STRUCT, 1); - $xfer += $this->tid->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->auth !== null) { - if (!is_object($this->auth)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('auth', TType::STRUCT, 2); - $xfer += $this->auth->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timRemoteUserGet_result { - static $_TSPEC; - - /** - * @var \TimRemoteUserBean - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\TimRemoteUserBean', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ITim_timRemoteUserGet_result'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \TimRemoteUserBean(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timRemoteUserGet_result'); - if ($this->success !== null) { - if (!is_object($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timRemoteUserEdit_args { - static $_TSPEC; - - /** - * @var \Tid - */ - public $tid = null; - /** - * @var \TimUserBean - */ - public $ub = null; - /** - * @var \TimAuth - */ - public $auth = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'tid', - 'type' => TType::STRUCT, - 'class' => '\Tid', - ), - 2 => array( - 'var' => 'ub', - 'type' => TType::STRUCT, - 'class' => '\TimUserBean', - ), - 3 => array( - 'var' => 'auth', - 'type' => TType::STRUCT, - 'class' => '\TimAuth', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['tid'])) { - $this->tid = $vals['tid']; - } - if (isset($vals['ub'])) { - $this->ub = $vals['ub']; - } - if (isset($vals['auth'])) { - $this->auth = $vals['auth']; - } - } - } - - public function getName() { - return 'ITim_timRemoteUserEdit_args'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->tid = new \Tid(); - $xfer += $this->tid->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->ub = new \TimUserBean(); - $xfer += $this->ub->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->auth = new \TimAuth(); - $xfer += $this->auth->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timRemoteUserEdit_args'); - if ($this->tid !== null) { - if (!is_object($this->tid)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('tid', TType::STRUCT, 1); - $xfer += $this->tid->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->ub !== null) { - if (!is_object($this->ub)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('ub', TType::STRUCT, 2); - $xfer += $this->ub->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->auth !== null) { - if (!is_object($this->auth)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('auth', TType::STRUCT, 3); - $xfer += $this->auth->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timRemoteUserEdit_result { - static $_TSPEC; - - /** - * @var \TimRemoteUserBean - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\TimRemoteUserBean', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ITim_timRemoteUserEdit_result'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \TimRemoteUserBean(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timRemoteUserEdit_result'); - if ($this->success !== null) { - if (!is_object($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timResponsePresence_args { - static $_TSPEC; - - /** - * @var \TimPBean - */ - public $pbean = null; - /** - * @var \TimAuth - */ - public $auth = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'pbean', - 'type' => TType::STRUCT, - 'class' => '\TimPBean', - ), - 2 => array( - 'var' => 'auth', - 'type' => TType::STRUCT, - 'class' => '\TimAuth', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['pbean'])) { - $this->pbean = $vals['pbean']; - } - if (isset($vals['auth'])) { - $this->auth = $vals['auth']; - } - } - } - - public function getName() { - return 'ITim_timResponsePresence_args'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->pbean = new \TimPBean(); - $xfer += $this->pbean->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->auth = new \TimAuth(); - $xfer += $this->auth->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timResponsePresence_args'); - if ($this->pbean !== null) { - if (!is_object($this->pbean)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('pbean', TType::STRUCT, 1); - $xfer += $this->pbean->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->auth !== null) { - if (!is_object($this->auth)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('auth', TType::STRUCT, 2); - $xfer += $this->auth->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timResponsePresence_result { - static $_TSPEC; - - /** - * @var \TimResponseBean - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\TimResponseBean', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ITim_timResponsePresence_result'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \TimResponseBean(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timResponsePresence_result'); - if ($this->success !== null) { - if (!is_object($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timResponseMessage_args { - static $_TSPEC; - - /** - * @var \TimMBean - */ - public $mbean = null; - /** - * @var \TimAuth - */ - public $auth = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'mbean', - 'type' => TType::STRUCT, - 'class' => '\TimMBean', - ), - 2 => array( - 'var' => 'auth', - 'type' => TType::STRUCT, - 'class' => '\TimAuth', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['mbean'])) { - $this->mbean = $vals['mbean']; - } - if (isset($vals['auth'])) { - $this->auth = $vals['auth']; - } - } - } - - public function getName() { - return 'ITim_timResponseMessage_args'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->mbean = new \TimMBean(); - $xfer += $this->mbean->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->auth = new \TimAuth(); - $xfer += $this->auth->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timResponseMessage_args'); - if ($this->mbean !== null) { - if (!is_object($this->mbean)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('mbean', TType::STRUCT, 1); - $xfer += $this->mbean->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->auth !== null) { - if (!is_object($this->auth)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('auth', TType::STRUCT, 2); - $xfer += $this->auth->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timResponseMessage_result { - static $_TSPEC; - - /** - * @var \TimResponseBean - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\TimResponseBean', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ITim_timResponseMessage_result'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \TimResponseBean(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timResponseMessage_result'); - if ($this->success !== null) { - if (!is_object($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timResponseMessageIq_args { - static $_TSPEC; - - /** - * @var \TimMessageIq - */ - public $timMsgIq = null; - /** - * @var string - */ - public $iqType = null; - /** - * @var \TimAuth - */ - public $auth = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'timMsgIq', - 'type' => TType::STRUCT, - 'class' => '\TimMessageIq', - ), - 2 => array( - 'var' => 'iqType', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'auth', - 'type' => TType::STRUCT, - 'class' => '\TimAuth', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['timMsgIq'])) { - $this->timMsgIq = $vals['timMsgIq']; - } - if (isset($vals['iqType'])) { - $this->iqType = $vals['iqType']; - } - if (isset($vals['auth'])) { - $this->auth = $vals['auth']; - } - } - } - - public function getName() { - return 'ITim_timResponseMessageIq_args'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->timMsgIq = new \TimMessageIq(); - $xfer += $this->timMsgIq->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->iqType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->auth = new \TimAuth(); - $xfer += $this->auth->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timResponseMessageIq_args'); - if ($this->timMsgIq !== null) { - if (!is_object($this->timMsgIq)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('timMsgIq', TType::STRUCT, 1); - $xfer += $this->timMsgIq->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->iqType !== null) { - $xfer += $output->writeFieldBegin('iqType', TType::STRING, 2); - $xfer += $output->writeString($this->iqType); - $xfer += $output->writeFieldEnd(); - } - if ($this->auth !== null) { - if (!is_object($this->auth)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('auth', TType::STRUCT, 3); - $xfer += $this->auth->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timResponseMessageIq_result { - static $_TSPEC; - - /** - * @var \TimMBeanList - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\TimMBeanList', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ITim_timResponseMessageIq_result'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \TimMBeanList(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timResponseMessageIq_result'); - if ($this->success !== null) { - if (!is_object($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timResponsePresenceList_args { - static $_TSPEC; - - /** - * @var \TimPBeanList - */ - public $pbeanList = null; - /** - * @var \TimAuth - */ - public $auth = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'pbeanList', - 'type' => TType::STRUCT, - 'class' => '\TimPBeanList', - ), - 2 => array( - 'var' => 'auth', - 'type' => TType::STRUCT, - 'class' => '\TimAuth', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['pbeanList'])) { - $this->pbeanList = $vals['pbeanList']; - } - if (isset($vals['auth'])) { - $this->auth = $vals['auth']; - } - } - } - - public function getName() { - return 'ITim_timResponsePresenceList_args'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->pbeanList = new \TimPBeanList(); - $xfer += $this->pbeanList->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->auth = new \TimAuth(); - $xfer += $this->auth->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timResponsePresenceList_args'); - if ($this->pbeanList !== null) { - if (!is_object($this->pbeanList)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('pbeanList', TType::STRUCT, 1); - $xfer += $this->pbeanList->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->auth !== null) { - if (!is_object($this->auth)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('auth', TType::STRUCT, 2); - $xfer += $this->auth->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timResponsePresenceList_result { - static $_TSPEC; - - /** - * @var \TimResponseBean - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\TimResponseBean', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ITim_timResponsePresenceList_result'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \TimResponseBean(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timResponsePresenceList_result'); - if ($this->success !== null) { - if (!is_object($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timResponseMessageList_args { - static $_TSPEC; - - /** - * @var \TimMBeanList - */ - public $mbeanList = null; - /** - * @var \TimAuth - */ - public $auth = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'mbeanList', - 'type' => TType::STRUCT, - 'class' => '\TimMBeanList', - ), - 2 => array( - 'var' => 'auth', - 'type' => TType::STRUCT, - 'class' => '\TimAuth', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['mbeanList'])) { - $this->mbeanList = $vals['mbeanList']; - } - if (isset($vals['auth'])) { - $this->auth = $vals['auth']; - } - } - } - - public function getName() { - return 'ITim_timResponseMessageList_args'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->mbeanList = new \TimMBeanList(); - $xfer += $this->mbeanList->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->auth = new \TimAuth(); - $xfer += $this->auth->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timResponseMessageList_args'); - if ($this->mbeanList !== null) { - if (!is_object($this->mbeanList)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('mbeanList', TType::STRUCT, 1); - $xfer += $this->mbeanList->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->auth !== null) { - if (!is_object($this->auth)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('auth', TType::STRUCT, 2); - $xfer += $this->auth->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ITim_timResponseMessageList_result { - static $_TSPEC; - - /** - * @var \TimResponseBean - */ - public $success = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => '\TimResponseBean', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - } - } - - public function getName() { - return 'ITim_timResponseMessageList_result'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 0: - if ($ftype == TType::STRUCT) { - $this->success = new \TimResponseBean(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ITim_timResponseMessageList_result'); - if ($this->success !== null) { - if (!is_object($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - - diff --git a/protocols/gen-php/ITimClient.php b/protocols/gen-php/ITimClient.php new file mode 100644 index 0000000..18bdd0e --- /dev/null +++ b/protocols/gen-php/ITimClient.php @@ -0,0 +1,946 @@ +input_ = $input; + $this->output_ = $output ? $output : $input; + } + + + public function timStream(\TimParam $param) + { + $this->send_timStream($param); + } + + public function send_timStream(\TimParam $param) + { + $args = new \ITim_timStream_args(); + $args->param = $param; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'timStream', + TMessageType::ONEWAY, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('timStream', TMessageType::ONEWAY, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function timStarttls() + { + $this->send_timStarttls(); + } + + public function send_timStarttls() + { + $args = new \ITim_timStarttls_args(); + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'timStarttls', + TMessageType::ONEWAY, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('timStarttls', TMessageType::ONEWAY, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function timLogin(\Tid $tid, $pwd) + { + $this->send_timLogin($tid, $pwd); + } + + public function send_timLogin(\Tid $tid, $pwd) + { + $args = new \ITim_timLogin_args(); + $args->tid = $tid; + $args->pwd = $pwd; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'timLogin', + TMessageType::ONEWAY, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('timLogin', TMessageType::ONEWAY, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function timAck(\TimAckBean $ab) + { + $this->send_timAck($ab); + } + + public function send_timAck(\TimAckBean $ab) + { + $args = new \ITim_timAck_args(); + $args->ab = $ab; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'timAck', + TMessageType::ONEWAY, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('timAck', TMessageType::ONEWAY, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function timPresence(\TimPBean $pbean) + { + $this->send_timPresence($pbean); + } + + public function send_timPresence(\TimPBean $pbean) + { + $args = new \ITim_timPresence_args(); + $args->pbean = $pbean; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'timPresence', + TMessageType::ONEWAY, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('timPresence', TMessageType::ONEWAY, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function timMessage(\TimMBean $mbean) + { + $this->send_timMessage($mbean); + } + + public function send_timMessage(\TimMBean $mbean) + { + $args = new \ITim_timMessage_args(); + $args->mbean = $mbean; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'timMessage', + TMessageType::ONEWAY, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('timMessage', TMessageType::ONEWAY, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function timPing($threadId) + { + $this->send_timPing($threadId); + } + + public function send_timPing($threadId) + { + $args = new \ITim_timPing_args(); + $args->threadId = $threadId; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'timPing', + TMessageType::ONEWAY, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('timPing', TMessageType::ONEWAY, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function timError(\TimError $e) + { + $this->send_timError($e); + } + + public function send_timError(\TimError $e) + { + $args = new \ITim_timError_args(); + $args->e = $e; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'timError', + TMessageType::ONEWAY, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('timError', TMessageType::ONEWAY, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function timLogout() + { + $this->send_timLogout(); + } + + public function send_timLogout() + { + $args = new \ITim_timLogout_args(); + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'timLogout', + TMessageType::ONEWAY, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('timLogout', TMessageType::ONEWAY, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function timRegist(\Tid $tid, $auth) + { + $this->send_timRegist($tid, $auth); + } + + public function send_timRegist(\Tid $tid, $auth) + { + $args = new \ITim_timRegist_args(); + $args->tid = $tid; + $args->auth = $auth; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'timRegist', + TMessageType::ONEWAY, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('timRegist', TMessageType::ONEWAY, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function timRoser(\TimRoster $roster) + { + $this->send_timRoser($roster); + } + + public function send_timRoser(\TimRoster $roster) + { + $args = new \ITim_timRoser_args(); + $args->roster = $roster; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'timRoser', + TMessageType::ONEWAY, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('timRoser', TMessageType::ONEWAY, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function timMessageList(\TimMBeanList $mbeanList) + { + $this->send_timMessageList($mbeanList); + } + + public function send_timMessageList(\TimMBeanList $mbeanList) + { + $args = new \ITim_timMessageList_args(); + $args->mbeanList = $mbeanList; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'timMessageList', + TMessageType::ONEWAY, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('timMessageList', TMessageType::ONEWAY, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function timPresenceList(\TimPBeanList $pbeanList) + { + $this->send_timPresenceList($pbeanList); + } + + public function send_timPresenceList(\TimPBeanList $pbeanList) + { + $args = new \ITim_timPresenceList_args(); + $args->pbeanList = $pbeanList; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'timPresenceList', + TMessageType::ONEWAY, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('timPresenceList', TMessageType::ONEWAY, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function timMessageIq(\TimMessageIq $timMsgIq, $iqType) + { + $this->send_timMessageIq($timMsgIq, $iqType); + } + + public function send_timMessageIq(\TimMessageIq $timMsgIq, $iqType) + { + $args = new \ITim_timMessageIq_args(); + $args->timMsgIq = $timMsgIq; + $args->iqType = $iqType; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'timMessageIq', + TMessageType::ONEWAY, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('timMessageIq', TMessageType::ONEWAY, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function timMessageResult(\TimMBean $mbean) + { + $this->send_timMessageResult($mbean); + } + + public function send_timMessageResult(\TimMBean $mbean) + { + $args = new \ITim_timMessageResult_args(); + $args->mbean = $mbean; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'timMessageResult', + TMessageType::ONEWAY, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('timMessageResult', TMessageType::ONEWAY, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function timProperty(\TimPropertyBean $tpb) + { + $this->send_timProperty($tpb); + } + + public function send_timProperty(\TimPropertyBean $tpb) + { + $args = new \ITim_timProperty_args(); + $args->tpb = $tpb; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'timProperty', + TMessageType::ONEWAY, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('timProperty', TMessageType::ONEWAY, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function timRemoteUserAuth(\Tid $tid, $pwd, \TimAuth $auth) + { + $this->send_timRemoteUserAuth($tid, $pwd, $auth); + return $this->recv_timRemoteUserAuth(); + } + + public function send_timRemoteUserAuth(\Tid $tid, $pwd, \TimAuth $auth) + { + $args = new \ITim_timRemoteUserAuth_args(); + $args->tid = $tid; + $args->pwd = $pwd; + $args->auth = $auth; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'timRemoteUserAuth', + TMessageType::CALL, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('timRemoteUserAuth', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_timRemoteUserAuth() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) { + $result = thrift_protocol_read_binary( + $this->input_, + '\ITim_timRemoteUserAuth_result', + $this->input_->isStrictRead() + ); + } else { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \ITim_timRemoteUserAuth_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("timRemoteUserAuth failed: unknown result"); + } + + public function timRemoteUserGet(\Tid $tid, \TimAuth $auth) + { + $this->send_timRemoteUserGet($tid, $auth); + return $this->recv_timRemoteUserGet(); + } + + public function send_timRemoteUserGet(\Tid $tid, \TimAuth $auth) + { + $args = new \ITim_timRemoteUserGet_args(); + $args->tid = $tid; + $args->auth = $auth; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'timRemoteUserGet', + TMessageType::CALL, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('timRemoteUserGet', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_timRemoteUserGet() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) { + $result = thrift_protocol_read_binary( + $this->input_, + '\ITim_timRemoteUserGet_result', + $this->input_->isStrictRead() + ); + } else { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \ITim_timRemoteUserGet_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("timRemoteUserGet failed: unknown result"); + } + + public function timRemoteUserEdit(\Tid $tid, \TimUserBean $ub, \TimAuth $auth) + { + $this->send_timRemoteUserEdit($tid, $ub, $auth); + return $this->recv_timRemoteUserEdit(); + } + + public function send_timRemoteUserEdit(\Tid $tid, \TimUserBean $ub, \TimAuth $auth) + { + $args = new \ITim_timRemoteUserEdit_args(); + $args->tid = $tid; + $args->ub = $ub; + $args->auth = $auth; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'timRemoteUserEdit', + TMessageType::CALL, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('timRemoteUserEdit', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_timRemoteUserEdit() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) { + $result = thrift_protocol_read_binary( + $this->input_, + '\ITim_timRemoteUserEdit_result', + $this->input_->isStrictRead() + ); + } else { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \ITim_timRemoteUserEdit_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("timRemoteUserEdit failed: unknown result"); + } + + public function timResponsePresence(\TimPBean $pbean, \TimAuth $auth) + { + $this->send_timResponsePresence($pbean, $auth); + return $this->recv_timResponsePresence(); + } + + public function send_timResponsePresence(\TimPBean $pbean, \TimAuth $auth) + { + $args = new \ITim_timResponsePresence_args(); + $args->pbean = $pbean; + $args->auth = $auth; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'timResponsePresence', + TMessageType::CALL, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('timResponsePresence', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_timResponsePresence() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) { + $result = thrift_protocol_read_binary( + $this->input_, + '\ITim_timResponsePresence_result', + $this->input_->isStrictRead() + ); + } else { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \ITim_timResponsePresence_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("timResponsePresence failed: unknown result"); + } + + public function timResponseMessage(\TimMBean $mbean, \TimAuth $auth) + { + $this->send_timResponseMessage($mbean, $auth); + return $this->recv_timResponseMessage(); + } + + public function send_timResponseMessage(\TimMBean $mbean, \TimAuth $auth) + { + $args = new \ITim_timResponseMessage_args(); + $args->mbean = $mbean; + $args->auth = $auth; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'timResponseMessage', + TMessageType::CALL, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('timResponseMessage', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_timResponseMessage() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) { + $result = thrift_protocol_read_binary( + $this->input_, + '\ITim_timResponseMessage_result', + $this->input_->isStrictRead() + ); + } else { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \ITim_timResponseMessage_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("timResponseMessage failed: unknown result"); + } + + public function timResponseMessageIq(\TimMessageIq $timMsgIq, $iqType, \TimAuth $auth) + { + $this->send_timResponseMessageIq($timMsgIq, $iqType, $auth); + return $this->recv_timResponseMessageIq(); + } + + public function send_timResponseMessageIq(\TimMessageIq $timMsgIq, $iqType, \TimAuth $auth) + { + $args = new \ITim_timResponseMessageIq_args(); + $args->timMsgIq = $timMsgIq; + $args->iqType = $iqType; + $args->auth = $auth; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'timResponseMessageIq', + TMessageType::CALL, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('timResponseMessageIq', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_timResponseMessageIq() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) { + $result = thrift_protocol_read_binary( + $this->input_, + '\ITim_timResponseMessageIq_result', + $this->input_->isStrictRead() + ); + } else { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \ITim_timResponseMessageIq_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("timResponseMessageIq failed: unknown result"); + } + + public function timResponsePresenceList(\TimPBeanList $pbeanList, \TimAuth $auth) + { + $this->send_timResponsePresenceList($pbeanList, $auth); + return $this->recv_timResponsePresenceList(); + } + + public function send_timResponsePresenceList(\TimPBeanList $pbeanList, \TimAuth $auth) + { + $args = new \ITim_timResponsePresenceList_args(); + $args->pbeanList = $pbeanList; + $args->auth = $auth; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'timResponsePresenceList', + TMessageType::CALL, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('timResponsePresenceList', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_timResponsePresenceList() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) { + $result = thrift_protocol_read_binary( + $this->input_, + '\ITim_timResponsePresenceList_result', + $this->input_->isStrictRead() + ); + } else { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \ITim_timResponsePresenceList_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("timResponsePresenceList failed: unknown result"); + } + + public function timResponseMessageList(\TimMBeanList $mbeanList, \TimAuth $auth) + { + $this->send_timResponseMessageList($mbeanList, $auth); + return $this->recv_timResponseMessageList(); + } + + public function send_timResponseMessageList(\TimMBeanList $mbeanList, \TimAuth $auth) + { + $args = new \ITim_timResponseMessageList_args(); + $args->mbeanList = $mbeanList; + $args->auth = $auth; + $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { + thrift_protocol_write_binary( + $this->output_, + 'timResponseMessageList', + TMessageType::CALL, + $args, + $this->seqid_, + $this->output_->isStrictWrite() + ); + } else { + $this->output_->writeMessageBegin('timResponseMessageList', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_timResponseMessageList() + { + $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) { + $result = thrift_protocol_read_binary( + $this->input_, + '\ITim_timResponseMessageList_result', + $this->input_->isStrictRead() + ); + } else { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new \ITim_timResponseMessageList_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + throw new \Exception("timResponseMessageList failed: unknown result"); + } +} diff --git a/protocols/gen-php/ITimIf.php b/protocols/gen-php/ITimIf.php new file mode 100644 index 0000000..6097bcb --- /dev/null +++ b/protocols/gen-php/ITimIf.php @@ -0,0 +1,183 @@ + array( + 'var' => 'ab', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimAckBean', + ), + ); + + /** + * @var \TimAckBean + */ + public $ab = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['ab'])) { + $this->ab = $vals['ab']; + } + } + } + + public function getName() + { + return 'ITim_timAck_args'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->ab = new \TimAckBean(); + $xfer += $this->ab->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timAck_args'); + if ($this->ab !== null) { + if (!is_object($this->ab)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('ab', TType::STRUCT, 1); + $xfer += $this->ab->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timError_args.php b/protocols/gen-php/ITim_timError_args.php new file mode 100644 index 0000000..a640c5b --- /dev/null +++ b/protocols/gen-php/ITim_timError_args.php @@ -0,0 +1,97 @@ + array( + 'var' => 'e', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimError', + ), + ); + + /** + * @var \TimError + */ + public $e = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['e'])) { + $this->e = $vals['e']; + } + } + } + + public function getName() + { + return 'ITim_timError_args'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->e = new \TimError(); + $xfer += $this->e->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timError_args'); + if ($this->e !== null) { + if (!is_object($this->e)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('e', TType::STRUCT, 1); + $xfer += $this->e->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timLogin_args.php b/protocols/gen-php/ITim_timLogin_args.php new file mode 100644 index 0000000..2659931 --- /dev/null +++ b/protocols/gen-php/ITim_timLogin_args.php @@ -0,0 +1,121 @@ + array( + 'var' => 'tid', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\Tid', + ), + 2 => array( + 'var' => 'pwd', + 'isRequired' => false, + 'type' => TType::STRING, + ), + ); + + /** + * @var \Tid + */ + public $tid = null; + /** + * @var string + */ + public $pwd = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['tid'])) { + $this->tid = $vals['tid']; + } + if (isset($vals['pwd'])) { + $this->pwd = $vals['pwd']; + } + } + } + + public function getName() + { + return 'ITim_timLogin_args'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->tid = new \Tid(); + $xfer += $this->tid->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->pwd); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timLogin_args'); + if ($this->tid !== null) { + if (!is_object($this->tid)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tid', TType::STRUCT, 1); + $xfer += $this->tid->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->pwd !== null) { + $xfer += $output->writeFieldBegin('pwd', TType::STRING, 2); + $xfer += $output->writeString($this->pwd); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timLogout_args.php b/protocols/gen-php/ITim_timLogout_args.php new file mode 100644 index 0000000..5da8cbe --- /dev/null +++ b/protocols/gen-php/ITim_timLogout_args.php @@ -0,0 +1,66 @@ +readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timLogout_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timMessageIq_args.php b/protocols/gen-php/ITim_timMessageIq_args.php new file mode 100644 index 0000000..78a4efb --- /dev/null +++ b/protocols/gen-php/ITim_timMessageIq_args.php @@ -0,0 +1,121 @@ + array( + 'var' => 'timMsgIq', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimMessageIq', + ), + 2 => array( + 'var' => 'iqType', + 'isRequired' => false, + 'type' => TType::STRING, + ), + ); + + /** + * @var \TimMessageIq + */ + public $timMsgIq = null; + /** + * @var string + */ + public $iqType = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['timMsgIq'])) { + $this->timMsgIq = $vals['timMsgIq']; + } + if (isset($vals['iqType'])) { + $this->iqType = $vals['iqType']; + } + } + } + + public function getName() + { + return 'ITim_timMessageIq_args'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->timMsgIq = new \TimMessageIq(); + $xfer += $this->timMsgIq->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->iqType); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timMessageIq_args'); + if ($this->timMsgIq !== null) { + if (!is_object($this->timMsgIq)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('timMsgIq', TType::STRUCT, 1); + $xfer += $this->timMsgIq->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->iqType !== null) { + $xfer += $output->writeFieldBegin('iqType', TType::STRING, 2); + $xfer += $output->writeString($this->iqType); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timMessageList_args.php b/protocols/gen-php/ITim_timMessageList_args.php new file mode 100644 index 0000000..db7806f --- /dev/null +++ b/protocols/gen-php/ITim_timMessageList_args.php @@ -0,0 +1,97 @@ + array( + 'var' => 'mbeanList', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimMBeanList', + ), + ); + + /** + * @var \TimMBeanList + */ + public $mbeanList = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['mbeanList'])) { + $this->mbeanList = $vals['mbeanList']; + } + } + } + + public function getName() + { + return 'ITim_timMessageList_args'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->mbeanList = new \TimMBeanList(); + $xfer += $this->mbeanList->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timMessageList_args'); + if ($this->mbeanList !== null) { + if (!is_object($this->mbeanList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('mbeanList', TType::STRUCT, 1); + $xfer += $this->mbeanList->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timMessageResult_args.php b/protocols/gen-php/ITim_timMessageResult_args.php new file mode 100644 index 0000000..0ea9bc4 --- /dev/null +++ b/protocols/gen-php/ITim_timMessageResult_args.php @@ -0,0 +1,97 @@ + array( + 'var' => 'mbean', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimMBean', + ), + ); + + /** + * @var \TimMBean + */ + public $mbean = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['mbean'])) { + $this->mbean = $vals['mbean']; + } + } + } + + public function getName() + { + return 'ITim_timMessageResult_args'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->mbean = new \TimMBean(); + $xfer += $this->mbean->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timMessageResult_args'); + if ($this->mbean !== null) { + if (!is_object($this->mbean)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('mbean', TType::STRUCT, 1); + $xfer += $this->mbean->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timMessage_args.php b/protocols/gen-php/ITim_timMessage_args.php new file mode 100644 index 0000000..7e3aa1b --- /dev/null +++ b/protocols/gen-php/ITim_timMessage_args.php @@ -0,0 +1,97 @@ + array( + 'var' => 'mbean', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimMBean', + ), + ); + + /** + * @var \TimMBean + */ + public $mbean = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['mbean'])) { + $this->mbean = $vals['mbean']; + } + } + } + + public function getName() + { + return 'ITim_timMessage_args'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->mbean = new \TimMBean(); + $xfer += $this->mbean->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timMessage_args'); + if ($this->mbean !== null) { + if (!is_object($this->mbean)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('mbean', TType::STRUCT, 1); + $xfer += $this->mbean->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timPing_args.php b/protocols/gen-php/ITim_timPing_args.php new file mode 100644 index 0000000..7782f9f --- /dev/null +++ b/protocols/gen-php/ITim_timPing_args.php @@ -0,0 +1,92 @@ + array( + 'var' => 'threadId', + 'isRequired' => false, + 'type' => TType::STRING, + ), + ); + + /** + * @var string + */ + public $threadId = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['threadId'])) { + $this->threadId = $vals['threadId']; + } + } + } + + public function getName() + { + return 'ITim_timPing_args'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->threadId); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timPing_args'); + if ($this->threadId !== null) { + $xfer += $output->writeFieldBegin('threadId', TType::STRING, 1); + $xfer += $output->writeString($this->threadId); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timPresenceList_args.php b/protocols/gen-php/ITim_timPresenceList_args.php new file mode 100644 index 0000000..c653558 --- /dev/null +++ b/protocols/gen-php/ITim_timPresenceList_args.php @@ -0,0 +1,97 @@ + array( + 'var' => 'pbeanList', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimPBeanList', + ), + ); + + /** + * @var \TimPBeanList + */ + public $pbeanList = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['pbeanList'])) { + $this->pbeanList = $vals['pbeanList']; + } + } + } + + public function getName() + { + return 'ITim_timPresenceList_args'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->pbeanList = new \TimPBeanList(); + $xfer += $this->pbeanList->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timPresenceList_args'); + if ($this->pbeanList !== null) { + if (!is_object($this->pbeanList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('pbeanList', TType::STRUCT, 1); + $xfer += $this->pbeanList->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timPresence_args.php b/protocols/gen-php/ITim_timPresence_args.php new file mode 100644 index 0000000..366ee5f --- /dev/null +++ b/protocols/gen-php/ITim_timPresence_args.php @@ -0,0 +1,97 @@ + array( + 'var' => 'pbean', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimPBean', + ), + ); + + /** + * @var \TimPBean + */ + public $pbean = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['pbean'])) { + $this->pbean = $vals['pbean']; + } + } + } + + public function getName() + { + return 'ITim_timPresence_args'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->pbean = new \TimPBean(); + $xfer += $this->pbean->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timPresence_args'); + if ($this->pbean !== null) { + if (!is_object($this->pbean)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('pbean', TType::STRUCT, 1); + $xfer += $this->pbean->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timProperty_args.php b/protocols/gen-php/ITim_timProperty_args.php new file mode 100644 index 0000000..66070de --- /dev/null +++ b/protocols/gen-php/ITim_timProperty_args.php @@ -0,0 +1,97 @@ + array( + 'var' => 'tpb', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimPropertyBean', + ), + ); + + /** + * @var \TimPropertyBean + */ + public $tpb = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['tpb'])) { + $this->tpb = $vals['tpb']; + } + } + } + + public function getName() + { + return 'ITim_timProperty_args'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->tpb = new \TimPropertyBean(); + $xfer += $this->tpb->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timProperty_args'); + if ($this->tpb !== null) { + if (!is_object($this->tpb)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tpb', TType::STRUCT, 1); + $xfer += $this->tpb->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timRegist_args.php b/protocols/gen-php/ITim_timRegist_args.php new file mode 100644 index 0000000..6575ee9 --- /dev/null +++ b/protocols/gen-php/ITim_timRegist_args.php @@ -0,0 +1,121 @@ + array( + 'var' => 'tid', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\Tid', + ), + 2 => array( + 'var' => 'auth', + 'isRequired' => false, + 'type' => TType::STRING, + ), + ); + + /** + * @var \Tid + */ + public $tid = null; + /** + * @var string + */ + public $auth = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['tid'])) { + $this->tid = $vals['tid']; + } + if (isset($vals['auth'])) { + $this->auth = $vals['auth']; + } + } + } + + public function getName() + { + return 'ITim_timRegist_args'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->tid = new \Tid(); + $xfer += $this->tid->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->auth); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timRegist_args'); + if ($this->tid !== null) { + if (!is_object($this->tid)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tid', TType::STRUCT, 1); + $xfer += $this->tid->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->auth !== null) { + $xfer += $output->writeFieldBegin('auth', TType::STRING, 2); + $xfer += $output->writeString($this->auth); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timRemoteUserAuth_args.php b/protocols/gen-php/ITim_timRemoteUserAuth_args.php new file mode 100644 index 0000000..b549176 --- /dev/null +++ b/protocols/gen-php/ITim_timRemoteUserAuth_args.php @@ -0,0 +1,150 @@ + array( + 'var' => 'tid', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\Tid', + ), + 2 => array( + 'var' => 'pwd', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'auth', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimAuth', + ), + ); + + /** + * @var \Tid + */ + public $tid = null; + /** + * @var string + */ + public $pwd = null; + /** + * @var \TimAuth + */ + public $auth = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['tid'])) { + $this->tid = $vals['tid']; + } + if (isset($vals['pwd'])) { + $this->pwd = $vals['pwd']; + } + if (isset($vals['auth'])) { + $this->auth = $vals['auth']; + } + } + } + + public function getName() + { + return 'ITim_timRemoteUserAuth_args'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->tid = new \Tid(); + $xfer += $this->tid->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->pwd); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->auth = new \TimAuth(); + $xfer += $this->auth->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timRemoteUserAuth_args'); + if ($this->tid !== null) { + if (!is_object($this->tid)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tid', TType::STRUCT, 1); + $xfer += $this->tid->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->pwd !== null) { + $xfer += $output->writeFieldBegin('pwd', TType::STRING, 2); + $xfer += $output->writeString($this->pwd); + $xfer += $output->writeFieldEnd(); + } + if ($this->auth !== null) { + if (!is_object($this->auth)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('auth', TType::STRUCT, 3); + $xfer += $this->auth->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timRemoteUserAuth_result.php b/protocols/gen-php/ITim_timRemoteUserAuth_result.php new file mode 100644 index 0000000..01ec7ee --- /dev/null +++ b/protocols/gen-php/ITim_timRemoteUserAuth_result.php @@ -0,0 +1,97 @@ + array( + 'var' => 'success', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimRemoteUserBean', + ), + ); + + /** + * @var \TimRemoteUserBean + */ + public $success = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() + { + return 'ITim_timRemoteUserAuth_result'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \TimRemoteUserBean(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timRemoteUserAuth_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timRemoteUserEdit_args.php b/protocols/gen-php/ITim_timRemoteUserEdit_args.php new file mode 100644 index 0000000..35a44e6 --- /dev/null +++ b/protocols/gen-php/ITim_timRemoteUserEdit_args.php @@ -0,0 +1,155 @@ + array( + 'var' => 'tid', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\Tid', + ), + 2 => array( + 'var' => 'ub', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimUserBean', + ), + 3 => array( + 'var' => 'auth', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimAuth', + ), + ); + + /** + * @var \Tid + */ + public $tid = null; + /** + * @var \TimUserBean + */ + public $ub = null; + /** + * @var \TimAuth + */ + public $auth = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['tid'])) { + $this->tid = $vals['tid']; + } + if (isset($vals['ub'])) { + $this->ub = $vals['ub']; + } + if (isset($vals['auth'])) { + $this->auth = $vals['auth']; + } + } + } + + public function getName() + { + return 'ITim_timRemoteUserEdit_args'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->tid = new \Tid(); + $xfer += $this->tid->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->ub = new \TimUserBean(); + $xfer += $this->ub->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->auth = new \TimAuth(); + $xfer += $this->auth->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timRemoteUserEdit_args'); + if ($this->tid !== null) { + if (!is_object($this->tid)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tid', TType::STRUCT, 1); + $xfer += $this->tid->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ub !== null) { + if (!is_object($this->ub)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('ub', TType::STRUCT, 2); + $xfer += $this->ub->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->auth !== null) { + if (!is_object($this->auth)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('auth', TType::STRUCT, 3); + $xfer += $this->auth->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timRemoteUserEdit_result.php b/protocols/gen-php/ITim_timRemoteUserEdit_result.php new file mode 100644 index 0000000..b16a8bc --- /dev/null +++ b/protocols/gen-php/ITim_timRemoteUserEdit_result.php @@ -0,0 +1,97 @@ + array( + 'var' => 'success', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimRemoteUserBean', + ), + ); + + /** + * @var \TimRemoteUserBean + */ + public $success = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() + { + return 'ITim_timRemoteUserEdit_result'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \TimRemoteUserBean(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timRemoteUserEdit_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timRemoteUserGet_args.php b/protocols/gen-php/ITim_timRemoteUserGet_args.php new file mode 100644 index 0000000..877b01c --- /dev/null +++ b/protocols/gen-php/ITim_timRemoteUserGet_args.php @@ -0,0 +1,126 @@ + array( + 'var' => 'tid', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\Tid', + ), + 2 => array( + 'var' => 'auth', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimAuth', + ), + ); + + /** + * @var \Tid + */ + public $tid = null; + /** + * @var \TimAuth + */ + public $auth = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['tid'])) { + $this->tid = $vals['tid']; + } + if (isset($vals['auth'])) { + $this->auth = $vals['auth']; + } + } + } + + public function getName() + { + return 'ITim_timRemoteUserGet_args'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->tid = new \Tid(); + $xfer += $this->tid->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->auth = new \TimAuth(); + $xfer += $this->auth->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timRemoteUserGet_args'); + if ($this->tid !== null) { + if (!is_object($this->tid)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tid', TType::STRUCT, 1); + $xfer += $this->tid->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->auth !== null) { + if (!is_object($this->auth)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('auth', TType::STRUCT, 2); + $xfer += $this->auth->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timRemoteUserGet_result.php b/protocols/gen-php/ITim_timRemoteUserGet_result.php new file mode 100644 index 0000000..d237ecd --- /dev/null +++ b/protocols/gen-php/ITim_timRemoteUserGet_result.php @@ -0,0 +1,97 @@ + array( + 'var' => 'success', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimRemoteUserBean', + ), + ); + + /** + * @var \TimRemoteUserBean + */ + public $success = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() + { + return 'ITim_timRemoteUserGet_result'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \TimRemoteUserBean(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timRemoteUserGet_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timResponseMessageIq_args.php b/protocols/gen-php/ITim_timResponseMessageIq_args.php new file mode 100644 index 0000000..4d8f221 --- /dev/null +++ b/protocols/gen-php/ITim_timResponseMessageIq_args.php @@ -0,0 +1,150 @@ + array( + 'var' => 'timMsgIq', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimMessageIq', + ), + 2 => array( + 'var' => 'iqType', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'auth', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimAuth', + ), + ); + + /** + * @var \TimMessageIq + */ + public $timMsgIq = null; + /** + * @var string + */ + public $iqType = null; + /** + * @var \TimAuth + */ + public $auth = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['timMsgIq'])) { + $this->timMsgIq = $vals['timMsgIq']; + } + if (isset($vals['iqType'])) { + $this->iqType = $vals['iqType']; + } + if (isset($vals['auth'])) { + $this->auth = $vals['auth']; + } + } + } + + public function getName() + { + return 'ITim_timResponseMessageIq_args'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->timMsgIq = new \TimMessageIq(); + $xfer += $this->timMsgIq->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->iqType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->auth = new \TimAuth(); + $xfer += $this->auth->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timResponseMessageIq_args'); + if ($this->timMsgIq !== null) { + if (!is_object($this->timMsgIq)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('timMsgIq', TType::STRUCT, 1); + $xfer += $this->timMsgIq->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->iqType !== null) { + $xfer += $output->writeFieldBegin('iqType', TType::STRING, 2); + $xfer += $output->writeString($this->iqType); + $xfer += $output->writeFieldEnd(); + } + if ($this->auth !== null) { + if (!is_object($this->auth)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('auth', TType::STRUCT, 3); + $xfer += $this->auth->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timResponseMessageIq_result.php b/protocols/gen-php/ITim_timResponseMessageIq_result.php new file mode 100644 index 0000000..cf39e80 --- /dev/null +++ b/protocols/gen-php/ITim_timResponseMessageIq_result.php @@ -0,0 +1,97 @@ + array( + 'var' => 'success', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimMBeanList', + ), + ); + + /** + * @var \TimMBeanList + */ + public $success = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() + { + return 'ITim_timResponseMessageIq_result'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \TimMBeanList(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timResponseMessageIq_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timResponseMessageList_args.php b/protocols/gen-php/ITim_timResponseMessageList_args.php new file mode 100644 index 0000000..bdc9cbe --- /dev/null +++ b/protocols/gen-php/ITim_timResponseMessageList_args.php @@ -0,0 +1,126 @@ + array( + 'var' => 'mbeanList', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimMBeanList', + ), + 2 => array( + 'var' => 'auth', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimAuth', + ), + ); + + /** + * @var \TimMBeanList + */ + public $mbeanList = null; + /** + * @var \TimAuth + */ + public $auth = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['mbeanList'])) { + $this->mbeanList = $vals['mbeanList']; + } + if (isset($vals['auth'])) { + $this->auth = $vals['auth']; + } + } + } + + public function getName() + { + return 'ITim_timResponseMessageList_args'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->mbeanList = new \TimMBeanList(); + $xfer += $this->mbeanList->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->auth = new \TimAuth(); + $xfer += $this->auth->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timResponseMessageList_args'); + if ($this->mbeanList !== null) { + if (!is_object($this->mbeanList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('mbeanList', TType::STRUCT, 1); + $xfer += $this->mbeanList->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->auth !== null) { + if (!is_object($this->auth)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('auth', TType::STRUCT, 2); + $xfer += $this->auth->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timResponseMessageList_result.php b/protocols/gen-php/ITim_timResponseMessageList_result.php new file mode 100644 index 0000000..a9cb01f --- /dev/null +++ b/protocols/gen-php/ITim_timResponseMessageList_result.php @@ -0,0 +1,97 @@ + array( + 'var' => 'success', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimResponseBean', + ), + ); + + /** + * @var \TimResponseBean + */ + public $success = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() + { + return 'ITim_timResponseMessageList_result'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \TimResponseBean(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timResponseMessageList_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timResponseMessage_args.php b/protocols/gen-php/ITim_timResponseMessage_args.php new file mode 100644 index 0000000..af00b25 --- /dev/null +++ b/protocols/gen-php/ITim_timResponseMessage_args.php @@ -0,0 +1,126 @@ + array( + 'var' => 'mbean', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimMBean', + ), + 2 => array( + 'var' => 'auth', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimAuth', + ), + ); + + /** + * @var \TimMBean + */ + public $mbean = null; + /** + * @var \TimAuth + */ + public $auth = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['mbean'])) { + $this->mbean = $vals['mbean']; + } + if (isset($vals['auth'])) { + $this->auth = $vals['auth']; + } + } + } + + public function getName() + { + return 'ITim_timResponseMessage_args'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->mbean = new \TimMBean(); + $xfer += $this->mbean->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->auth = new \TimAuth(); + $xfer += $this->auth->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timResponseMessage_args'); + if ($this->mbean !== null) { + if (!is_object($this->mbean)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('mbean', TType::STRUCT, 1); + $xfer += $this->mbean->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->auth !== null) { + if (!is_object($this->auth)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('auth', TType::STRUCT, 2); + $xfer += $this->auth->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timResponseMessage_result.php b/protocols/gen-php/ITim_timResponseMessage_result.php new file mode 100644 index 0000000..173f893 --- /dev/null +++ b/protocols/gen-php/ITim_timResponseMessage_result.php @@ -0,0 +1,97 @@ + array( + 'var' => 'success', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimResponseBean', + ), + ); + + /** + * @var \TimResponseBean + */ + public $success = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() + { + return 'ITim_timResponseMessage_result'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \TimResponseBean(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timResponseMessage_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timResponsePresenceList_args.php b/protocols/gen-php/ITim_timResponsePresenceList_args.php new file mode 100644 index 0000000..a048848 --- /dev/null +++ b/protocols/gen-php/ITim_timResponsePresenceList_args.php @@ -0,0 +1,126 @@ + array( + 'var' => 'pbeanList', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimPBeanList', + ), + 2 => array( + 'var' => 'auth', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimAuth', + ), + ); + + /** + * @var \TimPBeanList + */ + public $pbeanList = null; + /** + * @var \TimAuth + */ + public $auth = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['pbeanList'])) { + $this->pbeanList = $vals['pbeanList']; + } + if (isset($vals['auth'])) { + $this->auth = $vals['auth']; + } + } + } + + public function getName() + { + return 'ITim_timResponsePresenceList_args'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->pbeanList = new \TimPBeanList(); + $xfer += $this->pbeanList->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->auth = new \TimAuth(); + $xfer += $this->auth->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timResponsePresenceList_args'); + if ($this->pbeanList !== null) { + if (!is_object($this->pbeanList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('pbeanList', TType::STRUCT, 1); + $xfer += $this->pbeanList->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->auth !== null) { + if (!is_object($this->auth)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('auth', TType::STRUCT, 2); + $xfer += $this->auth->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timResponsePresenceList_result.php b/protocols/gen-php/ITim_timResponsePresenceList_result.php new file mode 100644 index 0000000..5f92418 --- /dev/null +++ b/protocols/gen-php/ITim_timResponsePresenceList_result.php @@ -0,0 +1,97 @@ + array( + 'var' => 'success', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimResponseBean', + ), + ); + + /** + * @var \TimResponseBean + */ + public $success = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() + { + return 'ITim_timResponsePresenceList_result'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \TimResponseBean(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timResponsePresenceList_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timResponsePresence_args.php b/protocols/gen-php/ITim_timResponsePresence_args.php new file mode 100644 index 0000000..0041259 --- /dev/null +++ b/protocols/gen-php/ITim_timResponsePresence_args.php @@ -0,0 +1,126 @@ + array( + 'var' => 'pbean', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimPBean', + ), + 2 => array( + 'var' => 'auth', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimAuth', + ), + ); + + /** + * @var \TimPBean + */ + public $pbean = null; + /** + * @var \TimAuth + */ + public $auth = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['pbean'])) { + $this->pbean = $vals['pbean']; + } + if (isset($vals['auth'])) { + $this->auth = $vals['auth']; + } + } + } + + public function getName() + { + return 'ITim_timResponsePresence_args'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->pbean = new \TimPBean(); + $xfer += $this->pbean->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->auth = new \TimAuth(); + $xfer += $this->auth->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timResponsePresence_args'); + if ($this->pbean !== null) { + if (!is_object($this->pbean)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('pbean', TType::STRUCT, 1); + $xfer += $this->pbean->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->auth !== null) { + if (!is_object($this->auth)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('auth', TType::STRUCT, 2); + $xfer += $this->auth->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timResponsePresence_result.php b/protocols/gen-php/ITim_timResponsePresence_result.php new file mode 100644 index 0000000..127ed52 --- /dev/null +++ b/protocols/gen-php/ITim_timResponsePresence_result.php @@ -0,0 +1,97 @@ + array( + 'var' => 'success', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimResponseBean', + ), + ); + + /** + * @var \TimResponseBean + */ + public $success = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + } + } + + public function getName() + { + return 'ITim_timResponsePresence_result'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new \TimResponseBean(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timResponsePresence_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timRoser_args.php b/protocols/gen-php/ITim_timRoser_args.php new file mode 100644 index 0000000..bc129f0 --- /dev/null +++ b/protocols/gen-php/ITim_timRoser_args.php @@ -0,0 +1,97 @@ + array( + 'var' => 'roster', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimRoster', + ), + ); + + /** + * @var \TimRoster + */ + public $roster = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['roster'])) { + $this->roster = $vals['roster']; + } + } + } + + public function getName() + { + return 'ITim_timRoser_args'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->roster = new \TimRoster(); + $xfer += $this->roster->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timRoser_args'); + if ($this->roster !== null) { + if (!is_object($this->roster)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('roster', TType::STRUCT, 1); + $xfer += $this->roster->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timStarttls_args.php b/protocols/gen-php/ITim_timStarttls_args.php new file mode 100644 index 0000000..e945bad --- /dev/null +++ b/protocols/gen-php/ITim_timStarttls_args.php @@ -0,0 +1,66 @@ +readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timStarttls_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/ITim_timStream_args.php b/protocols/gen-php/ITim_timStream_args.php new file mode 100644 index 0000000..e6e00e1 --- /dev/null +++ b/protocols/gen-php/ITim_timStream_args.php @@ -0,0 +1,97 @@ + array( + 'var' => 'param', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimParam', + ), + ); + + /** + * @var \TimParam + */ + public $param = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['param'])) { + $this->param = $vals['param']; + } + } + } + + public function getName() + { + return 'ITim_timStream_args'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->param = new \TimParam(); + $xfer += $this->param->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('ITim_timStream_args'); + if ($this->param !== null) { + if (!is_object($this->param)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('param', TType::STRUCT, 1); + $xfer += $this->param->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/Tid.php b/protocols/gen-php/Tid.php new file mode 100644 index 0000000..37817f2 --- /dev/null +++ b/protocols/gen-php/Tid.php @@ -0,0 +1,272 @@ + array( + 'var' => 'name', + 'isRequired' => true, + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'domain', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'resource', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'type', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'extraList', + 'isRequired' => false, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\TimNode', + ), + ), + 6 => array( + 'var' => 'extraMap', + 'isRequired' => false, + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + + /** + * 登陆名 用户登录号,房间号等 + * + * @var string + */ + public $name = null; + /** + * 域名 用于区分渠道等 appid,appsecret + * + * @var string + */ + public $domain = null; + /** + * 系统 自行约定 如 : 1IOS,2android,3H5,4WEB 等 + * + * @var string + */ + public $resource = null; + /** + * normal,group + * + * @var string + */ + public $type = null; + /** + * 附加信息:如传递客户端信息 iphone6,xiaomi,huawei等 + * + * @var \TimNode[] + */ + public $extraList = null; + /** + * @var array + */ + public $extraMap = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['domain'])) { + $this->domain = $vals['domain']; + } + if (isset($vals['resource'])) { + $this->resource = $vals['resource']; + } + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + if (isset($vals['extraList'])) { + $this->extraList = $vals['extraList']; + } + if (isset($vals['extraMap'])) { + $this->extraMap = $vals['extraMap']; + } + } + } + + public function getName() + { + return 'Tid'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->domain); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->resource); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->type); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::LST) { + $this->extraList = array(); + $_size48 = 0; + $_etype51 = 0; + $xfer += $input->readListBegin($_etype51, $_size48); + for ($_i52 = 0; $_i52 < $_size48; ++$_i52) { + $elem53 = null; + $elem53 = new \TimNode(); + $xfer += $elem53->read($input); + $this->extraList []= $elem53; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::MAP) { + $this->extraMap = array(); + $_size54 = 0; + $_ktype55 = 0; + $_vtype56 = 0; + $xfer += $input->readMapBegin($_ktype55, $_vtype56, $_size54); + for ($_i58 = 0; $_i58 < $_size54; ++$_i58) { + $key59 = ''; + $val60 = ''; + $xfer += $input->readString($key59); + $xfer += $input->readString($val60); + $this->extraMap[$key59] = $val60; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('Tid'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->domain !== null) { + $xfer += $output->writeFieldBegin('domain', TType::STRING, 2); + $xfer += $output->writeString($this->domain); + $xfer += $output->writeFieldEnd(); + } + if ($this->resource !== null) { + $xfer += $output->writeFieldBegin('resource', TType::STRING, 3); + $xfer += $output->writeString($this->resource); + $xfer += $output->writeFieldEnd(); + } + if ($this->type !== null) { + $xfer += $output->writeFieldBegin('type', TType::STRING, 4); + $xfer += $output->writeString($this->type); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraList !== null) { + if (!is_array($this->extraList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraList', TType::LST, 5); + $output->writeListBegin(TType::STRUCT, count($this->extraList)); + foreach ($this->extraList as $iter61) { + $xfer += $iter61->write($output); + } + $output->writeListEnd(); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraMap !== null) { + if (!is_array($this->extraMap)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 6); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); + foreach ($this->extraMap as $kiter62 => $viter63) { + $xfer += $output->writeString($kiter62); + $xfer += $output->writeString($viter63); + } + $output->writeMapEnd(); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/TimAckBean.php b/protocols/gen-php/TimAckBean.php new file mode 100644 index 0000000..778a753 --- /dev/null +++ b/protocols/gen-php/TimAckBean.php @@ -0,0 +1,277 @@ + array( + 'var' => 'id', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'ackType', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'ackStatus', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'extraList', + 'isRequired' => false, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\TimNode', + ), + ), + 5 => array( + 'var' => 'err', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimError', + ), + 6 => array( + 'var' => 'extraMap', + 'isRequired' => false, + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + + /** + * id,返回所要回执协议的线程id + * + * @var string + */ + public $id = null; + /** + * 类型,自定义 如:ping,message等 + * + * @var string + */ + public $ackType = null; + /** + * 状态,如成功,失败等 + * + * @var string + */ + public $ackStatus = null; + /** + * 附加信息 + * + * @var \TimNode[] + */ + public $extraList = null; + /** + * 错误信息 + * + * @var \TimError + */ + public $err = null; + /** + * @var array + */ + public $extraMap = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['id'])) { + $this->id = $vals['id']; + } + if (isset($vals['ackType'])) { + $this->ackType = $vals['ackType']; + } + if (isset($vals['ackStatus'])) { + $this->ackStatus = $vals['ackStatus']; + } + if (isset($vals['extraList'])) { + $this->extraList = $vals['extraList']; + } + if (isset($vals['err'])) { + $this->err = $vals['err']; + } + if (isset($vals['extraMap'])) { + $this->extraMap = $vals['extraMap']; + } + } + } + + public function getName() + { + return 'TimAckBean'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->id); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->ackType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->ackStatus); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::LST) { + $this->extraList = array(); + $_size0 = 0; + $_etype3 = 0; + $xfer += $input->readListBegin($_etype3, $_size0); + for ($_i4 = 0; $_i4 < $_size0; ++$_i4) { + $elem5 = null; + $elem5 = new \TimNode(); + $xfer += $elem5->read($input); + $this->extraList []= $elem5; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRUCT) { + $this->err = new \TimError(); + $xfer += $this->err->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::MAP) { + $this->extraMap = array(); + $_size6 = 0; + $_ktype7 = 0; + $_vtype8 = 0; + $xfer += $input->readMapBegin($_ktype7, $_vtype8, $_size6); + for ($_i10 = 0; $_i10 < $_size6; ++$_i10) { + $key11 = ''; + $val12 = ''; + $xfer += $input->readString($key11); + $xfer += $input->readString($val12); + $this->extraMap[$key11] = $val12; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('TimAckBean'); + if ($this->id !== null) { + $xfer += $output->writeFieldBegin('id', TType::STRING, 1); + $xfer += $output->writeString($this->id); + $xfer += $output->writeFieldEnd(); + } + if ($this->ackType !== null) { + $xfer += $output->writeFieldBegin('ackType', TType::STRING, 2); + $xfer += $output->writeString($this->ackType); + $xfer += $output->writeFieldEnd(); + } + if ($this->ackStatus !== null) { + $xfer += $output->writeFieldBegin('ackStatus', TType::STRING, 3); + $xfer += $output->writeString($this->ackStatus); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraList !== null) { + if (!is_array($this->extraList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraList', TType::LST, 4); + $output->writeListBegin(TType::STRUCT, count($this->extraList)); + foreach ($this->extraList as $iter13) { + $xfer += $iter13->write($output); + } + $output->writeListEnd(); + $xfer += $output->writeFieldEnd(); + } + if ($this->err !== null) { + if (!is_object($this->err)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('err', TType::STRUCT, 5); + $xfer += $this->err->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraMap !== null) { + if (!is_array($this->extraMap)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 6); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); + foreach ($this->extraMap as $kiter14 => $viter15) { + $xfer += $output->writeString($kiter14); + $xfer += $output->writeString($viter15); + } + $output->writeMapEnd(); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/TimArea.php b/protocols/gen-php/TimArea.php new file mode 100644 index 0000000..9165ea6 --- /dev/null +++ b/protocols/gen-php/TimArea.php @@ -0,0 +1,246 @@ + array( + 'var' => 'country', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'province', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'city', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'extraList', + 'isRequired' => false, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\TimNode', + ), + ), + 5 => array( + 'var' => 'extraMap', + 'isRequired' => false, + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + + /** + * 国家 + * + * @var string + */ + public $country = null; + /** + * 省 + * + * @var string + */ + public $province = null; + /** + * 市 + * + * @var string + */ + public $city = null; + /** + * 附加信息:如区,镇,乡等 + * + * @var \TimNode[] + */ + public $extraList = null; + /** + * @var array + */ + public $extraMap = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['country'])) { + $this->country = $vals['country']; + } + if (isset($vals['province'])) { + $this->province = $vals['province']; + } + if (isset($vals['city'])) { + $this->city = $vals['city']; + } + if (isset($vals['extraList'])) { + $this->extraList = $vals['extraList']; + } + if (isset($vals['extraMap'])) { + $this->extraMap = $vals['extraMap']; + } + } + } + + public function getName() + { + return 'TimArea'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->country); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->province); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->city); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::LST) { + $this->extraList = array(); + $_size32 = 0; + $_etype35 = 0; + $xfer += $input->readListBegin($_etype35, $_size32); + for ($_i36 = 0; $_i36 < $_size32; ++$_i36) { + $elem37 = null; + $elem37 = new \TimNode(); + $xfer += $elem37->read($input); + $this->extraList []= $elem37; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::MAP) { + $this->extraMap = array(); + $_size38 = 0; + $_ktype39 = 0; + $_vtype40 = 0; + $xfer += $input->readMapBegin($_ktype39, $_vtype40, $_size38); + for ($_i42 = 0; $_i42 < $_size38; ++$_i42) { + $key43 = ''; + $val44 = ''; + $xfer += $input->readString($key43); + $xfer += $input->readString($val44); + $this->extraMap[$key43] = $val44; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('TimArea'); + if ($this->country !== null) { + $xfer += $output->writeFieldBegin('country', TType::STRING, 1); + $xfer += $output->writeString($this->country); + $xfer += $output->writeFieldEnd(); + } + if ($this->province !== null) { + $xfer += $output->writeFieldBegin('province', TType::STRING, 2); + $xfer += $output->writeString($this->province); + $xfer += $output->writeFieldEnd(); + } + if ($this->city !== null) { + $xfer += $output->writeFieldBegin('city', TType::STRING, 3); + $xfer += $output->writeString($this->city); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraList !== null) { + if (!is_array($this->extraList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraList', TType::LST, 4); + $output->writeListBegin(TType::STRUCT, count($this->extraList)); + foreach ($this->extraList as $iter45) { + $xfer += $iter45->write($output); + } + $output->writeListEnd(); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraMap !== null) { + if (!is_array($this->extraMap)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 5); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); + foreach ($this->extraMap as $kiter46 => $viter47) { + $xfer += $output->writeString($kiter46); + $xfer += $output->writeString($viter47); + } + $output->writeMapEnd(); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/TimAuth.php b/protocols/gen-php/TimAuth.php new file mode 100644 index 0000000..f7931d3 --- /dev/null +++ b/protocols/gen-php/TimAuth.php @@ -0,0 +1,146 @@ + array( + 'var' => 'domain', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'username', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'pwd', + 'isRequired' => false, + 'type' => TType::STRING, + ), + ); + + /** + * 域名 + * + * @var string + */ + public $domain = null; + /** + * 用户名 + * + * @var string + */ + public $username = null; + /** + * 密码 + * + * @var string + */ + public $pwd = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['domain'])) { + $this->domain = $vals['domain']; + } + if (isset($vals['username'])) { + $this->username = $vals['username']; + } + if (isset($vals['pwd'])) { + $this->pwd = $vals['pwd']; + } + } + } + + public function getName() + { + return 'TimAuth'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->domain); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->username); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->pwd); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('TimAuth'); + if ($this->domain !== null) { + $xfer += $output->writeFieldBegin('domain', TType::STRING, 1); + $xfer += $output->writeString($this->domain); + $xfer += $output->writeFieldEnd(); + } + if ($this->username !== null) { + $xfer += $output->writeFieldBegin('username', TType::STRING, 2); + $xfer += $output->writeString($this->username); + $xfer += $output->writeFieldEnd(); + } + if ($this->pwd !== null) { + $xfer += $output->writeFieldBegin('pwd', TType::STRING, 3); + $xfer += $output->writeString($this->pwd); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/TimError.php b/protocols/gen-php/TimError.php new file mode 100644 index 0000000..24f428e --- /dev/null +++ b/protocols/gen-php/TimError.php @@ -0,0 +1,120 @@ + array( + 'var' => 'errCode', + 'isRequired' => false, + 'type' => TType::I32, + ), + 2 => array( + 'var' => 'errMsg', + 'isRequired' => false, + 'type' => TType::STRING, + ), + ); + + /** + * 错误码 + * + * @var int + */ + public $errCode = null; + /** + * 错误内容 + * + * @var string + */ + public $errMsg = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['errCode'])) { + $this->errCode = $vals['errCode']; + } + if (isset($vals['errMsg'])) { + $this->errMsg = $vals['errMsg']; + } + } + } + + public function getName() + { + return 'TimError'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->errCode); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->errMsg); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('TimError'); + if ($this->errCode !== null) { + $xfer += $output->writeFieldBegin('errCode', TType::I32, 1); + $xfer += $output->writeI32($this->errCode); + $xfer += $output->writeFieldEnd(); + } + if ($this->errMsg !== null) { + $xfer += $output->writeFieldBegin('errMsg', TType::STRING, 2); + $xfer += $output->writeString($this->errMsg); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/TimHBean.php b/protocols/gen-php/TimHBean.php new file mode 100644 index 0000000..66e267e --- /dev/null +++ b/protocols/gen-php/TimHBean.php @@ -0,0 +1,146 @@ + array( + 'var' => 'chl', + 'isRequired' => true, + 'type' => TType::I32, + ), + 2 => array( + 'var' => 'platform', + 'isRequired' => false, + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'version', + 'isRequired' => true, + 'type' => TType::I16, + ), + ); + + /** + * 渠道 + * + * @var int + */ + public $chl = null; + /** + * 平台 + * + * @var int + */ + public $platform = null; + /** + * version 客户端协议版本 + * + * @var int + */ + public $version = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['chl'])) { + $this->chl = $vals['chl']; + } + if (isset($vals['platform'])) { + $this->platform = $vals['platform']; + } + if (isset($vals['version'])) { + $this->version = $vals['version']; + } + } + } + + public function getName() + { + return 'TimHBean'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->chl); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->platform); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->version); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('TimHBean'); + if ($this->chl !== null) { + $xfer += $output->writeFieldBegin('chl', TType::I32, 1); + $xfer += $output->writeI32($this->chl); + $xfer += $output->writeFieldEnd(); + } + if ($this->platform !== null) { + $xfer += $output->writeFieldBegin('platform', TType::I32, 2); + $xfer += $output->writeI32($this->platform); + $xfer += $output->writeFieldEnd(); + } + if ($this->version !== null) { + $xfer += $output->writeFieldBegin('version', TType::I16, 3); + $xfer += $output->writeI16($this->version); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/TimIqBean.php b/protocols/gen-php/TimIqBean.php new file mode 100644 index 0000000..7c15032 --- /dev/null +++ b/protocols/gen-php/TimIqBean.php @@ -0,0 +1,312 @@ + array( + 'var' => 'threadId', + 'isRequired' => true, + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'fromTid', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\Tid', + ), + 3 => array( + 'var' => 'toTid', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\Tid', + ), + 4 => array( + 'var' => 'type', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'extraList', + 'isRequired' => false, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\TimNode', + ), + ), + 6 => array( + 'var' => 'error', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimError', + ), + 7 => array( + 'var' => 'extraMap', + 'isRequired' => false, + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + + /** + * 线程id + * + * @var string + */ + public $threadId = null; + /** + * @var \Tid + */ + public $fromTid = null; + /** + * @var \Tid + */ + public $toTid = null; + /** + * Get :获取当前域值。类似于http get方法 + * Set :设置或替换get查询的值。类似于http put方法。 + * Result :说明成功的响应了先前的查询。类似于http状态码200。 + * Error: 查询和响应中出现的错误。 + * + * @var string + */ + public $type = null; + /** + * 扩展字段 + * + * @var \TimNode[] + */ + public $extraList = null; + /** + * 错误码 + * + * @var \TimError + */ + public $error = null; + /** + * @var array + */ + public $extraMap = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['threadId'])) { + $this->threadId = $vals['threadId']; + } + if (isset($vals['fromTid'])) { + $this->fromTid = $vals['fromTid']; + } + if (isset($vals['toTid'])) { + $this->toTid = $vals['toTid']; + } + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + if (isset($vals['extraList'])) { + $this->extraList = $vals['extraList']; + } + if (isset($vals['error'])) { + $this->error = $vals['error']; + } + if (isset($vals['extraMap'])) { + $this->extraMap = $vals['extraMap']; + } + } + } + + public function getName() + { + return 'TimIqBean'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->threadId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->fromTid = new \Tid(); + $xfer += $this->fromTid->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->toTid = new \Tid(); + $xfer += $this->toTid->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->type); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::LST) { + $this->extraList = array(); + $_size149 = 0; + $_etype152 = 0; + $xfer += $input->readListBegin($_etype152, $_size149); + for ($_i153 = 0; $_i153 < $_size149; ++$_i153) { + $elem154 = null; + $elem154 = new \TimNode(); + $xfer += $elem154->read($input); + $this->extraList []= $elem154; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRUCT) { + $this->error = new \TimError(); + $xfer += $this->error->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::MAP) { + $this->extraMap = array(); + $_size155 = 0; + $_ktype156 = 0; + $_vtype157 = 0; + $xfer += $input->readMapBegin($_ktype156, $_vtype157, $_size155); + for ($_i159 = 0; $_i159 < $_size155; ++$_i159) { + $key160 = ''; + $val161 = ''; + $xfer += $input->readString($key160); + $xfer += $input->readString($val161); + $this->extraMap[$key160] = $val161; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('TimIqBean'); + if ($this->threadId !== null) { + $xfer += $output->writeFieldBegin('threadId', TType::STRING, 1); + $xfer += $output->writeString($this->threadId); + $xfer += $output->writeFieldEnd(); + } + if ($this->fromTid !== null) { + if (!is_object($this->fromTid)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('fromTid', TType::STRUCT, 2); + $xfer += $this->fromTid->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->toTid !== null) { + if (!is_object($this->toTid)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('toTid', TType::STRUCT, 3); + $xfer += $this->toTid->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->type !== null) { + $xfer += $output->writeFieldBegin('type', TType::STRING, 4); + $xfer += $output->writeString($this->type); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraList !== null) { + if (!is_array($this->extraList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraList', TType::LST, 5); + $output->writeListBegin(TType::STRUCT, count($this->extraList)); + foreach ($this->extraList as $iter162) { + $xfer += $iter162->write($output); + } + $output->writeListEnd(); + $xfer += $output->writeFieldEnd(); + } + if ($this->error !== null) { + if (!is_object($this->error)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('error', TType::STRUCT, 6); + $xfer += $this->error->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraMap !== null) { + if (!is_array($this->extraMap)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 7); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); + foreach ($this->extraMap as $kiter163 => $viter164) { + $xfer += $output->writeString($kiter163); + $xfer += $output->writeString($viter164); + } + $output->writeMapEnd(); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/TimMBean.php b/protocols/gen-php/TimMBean.php new file mode 100644 index 0000000..3665a7e --- /dev/null +++ b/protocols/gen-php/TimMBean.php @@ -0,0 +1,509 @@ + array( + 'var' => 'threadId', + 'isRequired' => true, + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'mid', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'fromTid', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\Tid', + ), + 4 => array( + 'var' => 'toTid', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\Tid', + ), + 5 => array( + 'var' => 'body', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 6 => array( + 'var' => 'type', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 7 => array( + 'var' => 'msgType', + 'isRequired' => false, + 'type' => TType::I16, + ), + 8 => array( + 'var' => 'offline', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimTime', + ), + 9 => array( + 'var' => 'leaguerTid', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\Tid', + ), + 10 => array( + 'var' => 'extraList', + 'isRequired' => false, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\TimNode', + ), + ), + 11 => array( + 'var' => 'timestamp', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 12 => array( + 'var' => 'error', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimError', + ), + 13 => array( + 'var' => 'extraMap', + 'isRequired' => false, + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 14 => array( + 'var' => 'readstatus', + 'isRequired' => false, + 'type' => TType::I16, + ), + ); + + /** + * 线程id + * + * @var string + */ + public $threadId = null; + /** + * 消息id号 + * + * @var string + */ + public $mid = null; + /** + * 来源Tid + * + * @var \Tid + */ + public $fromTid = null; + /** + * 目标Tid + * + * @var \Tid + */ + public $toTid = null; + /** + * 信息内容 + * + * @var string + */ + public $body = null; + /** + * normal:类似于email,主要特点是不要求响应; + * chat:类似于qq里的好友即时聊天,主要特点是实时通讯; + * groupchat:类似于聊天室里的群聊; + * headline:用于发送alert和notification; + * error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; + * + * @var string + */ + public $type = null; + /** + * 消息类型 1 文字 2 图片 3 语音 4视频 5混合 + * + * @var int + */ + public $msgType = null; + /** + * 是否离线信息 + * + * @var \TimTime + */ + public $offline = null; + /** + * 成员Tid 群聊时信息发送者Tid + * + * @var \Tid + */ + public $leaguerTid = null; + /** + * 扩展字段 + * + * @var \TimNode[] + */ + public $extraList = null; + /** + * 服务器发送信息时间戳(毫秒) + * + * @var string + */ + public $timestamp = null; + /** + * 错误码 + * + * @var \TimError + */ + public $error = null; + /** + * @var array + */ + public $extraMap = null; + /** + * 0未读 1已读 + * + * @var int + */ + public $readstatus = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['threadId'])) { + $this->threadId = $vals['threadId']; + } + if (isset($vals['mid'])) { + $this->mid = $vals['mid']; + } + if (isset($vals['fromTid'])) { + $this->fromTid = $vals['fromTid']; + } + if (isset($vals['toTid'])) { + $this->toTid = $vals['toTid']; + } + if (isset($vals['body'])) { + $this->body = $vals['body']; + } + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + if (isset($vals['msgType'])) { + $this->msgType = $vals['msgType']; + } + if (isset($vals['offline'])) { + $this->offline = $vals['offline']; + } + if (isset($vals['leaguerTid'])) { + $this->leaguerTid = $vals['leaguerTid']; + } + if (isset($vals['extraList'])) { + $this->extraList = $vals['extraList']; + } + if (isset($vals['timestamp'])) { + $this->timestamp = $vals['timestamp']; + } + if (isset($vals['error'])) { + $this->error = $vals['error']; + } + if (isset($vals['extraMap'])) { + $this->extraMap = $vals['extraMap']; + } + if (isset($vals['readstatus'])) { + $this->readstatus = $vals['readstatus']; + } + } + } + + public function getName() + { + return 'TimMBean'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->threadId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->mid); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->fromTid = new \Tid(); + $xfer += $this->fromTid->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->toTid = new \Tid(); + $xfer += $this->toTid->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->body); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->type); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->msgType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::STRUCT) { + $this->offline = new \TimTime(); + $xfer += $this->offline->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::STRUCT) { + $this->leaguerTid = new \Tid(); + $xfer += $this->leaguerTid->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 10: + if ($ftype == TType::LST) { + $this->extraList = array(); + $_size133 = 0; + $_etype136 = 0; + $xfer += $input->readListBegin($_etype136, $_size133); + for ($_i137 = 0; $_i137 < $_size133; ++$_i137) { + $elem138 = null; + $elem138 = new \TimNode(); + $xfer += $elem138->read($input); + $this->extraList []= $elem138; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 11: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->timestamp); + } else { + $xfer += $input->skip($ftype); + } + break; + case 12: + if ($ftype == TType::STRUCT) { + $this->error = new \TimError(); + $xfer += $this->error->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 13: + if ($ftype == TType::MAP) { + $this->extraMap = array(); + $_size139 = 0; + $_ktype140 = 0; + $_vtype141 = 0; + $xfer += $input->readMapBegin($_ktype140, $_vtype141, $_size139); + for ($_i143 = 0; $_i143 < $_size139; ++$_i143) { + $key144 = ''; + $val145 = ''; + $xfer += $input->readString($key144); + $xfer += $input->readString($val145); + $this->extraMap[$key144] = $val145; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 14: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->readstatus); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('TimMBean'); + if ($this->threadId !== null) { + $xfer += $output->writeFieldBegin('threadId', TType::STRING, 1); + $xfer += $output->writeString($this->threadId); + $xfer += $output->writeFieldEnd(); + } + if ($this->mid !== null) { + $xfer += $output->writeFieldBegin('mid', TType::STRING, 2); + $xfer += $output->writeString($this->mid); + $xfer += $output->writeFieldEnd(); + } + if ($this->fromTid !== null) { + if (!is_object($this->fromTid)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('fromTid', TType::STRUCT, 3); + $xfer += $this->fromTid->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->toTid !== null) { + if (!is_object($this->toTid)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('toTid', TType::STRUCT, 4); + $xfer += $this->toTid->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->body !== null) { + $xfer += $output->writeFieldBegin('body', TType::STRING, 5); + $xfer += $output->writeString($this->body); + $xfer += $output->writeFieldEnd(); + } + if ($this->type !== null) { + $xfer += $output->writeFieldBegin('type', TType::STRING, 6); + $xfer += $output->writeString($this->type); + $xfer += $output->writeFieldEnd(); + } + if ($this->msgType !== null) { + $xfer += $output->writeFieldBegin('msgType', TType::I16, 7); + $xfer += $output->writeI16($this->msgType); + $xfer += $output->writeFieldEnd(); + } + if ($this->offline !== null) { + if (!is_object($this->offline)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('offline', TType::STRUCT, 8); + $xfer += $this->offline->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->leaguerTid !== null) { + if (!is_object($this->leaguerTid)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('leaguerTid', TType::STRUCT, 9); + $xfer += $this->leaguerTid->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraList !== null) { + if (!is_array($this->extraList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraList', TType::LST, 10); + $output->writeListBegin(TType::STRUCT, count($this->extraList)); + foreach ($this->extraList as $iter146) { + $xfer += $iter146->write($output); + } + $output->writeListEnd(); + $xfer += $output->writeFieldEnd(); + } + if ($this->timestamp !== null) { + $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 11); + $xfer += $output->writeString($this->timestamp); + $xfer += $output->writeFieldEnd(); + } + if ($this->error !== null) { + if (!is_object($this->error)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('error', TType::STRUCT, 12); + $xfer += $this->error->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraMap !== null) { + if (!is_array($this->extraMap)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 13); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); + foreach ($this->extraMap as $kiter147 => $viter148) { + $xfer += $output->writeString($kiter147); + $xfer += $output->writeString($viter148); + } + $output->writeMapEnd(); + $xfer += $output->writeFieldEnd(); + } + if ($this->readstatus !== null) { + $xfer += $output->writeFieldBegin('readstatus', TType::I16, 14); + $xfer += $output->writeI16($this->readstatus); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/TimMBeanList.php b/protocols/gen-php/TimMBeanList.php new file mode 100644 index 0000000..754c8e4 --- /dev/null +++ b/protocols/gen-php/TimMBeanList.php @@ -0,0 +1,218 @@ + array( + 'var' => 'threadId', + 'isRequired' => true, + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'timMBeanList', + 'isRequired' => false, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\TimMBean', + ), + ), + 3 => array( + 'var' => 'reqType', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'extraMap', + 'isRequired' => false, + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + + /** + * @var string + */ + public $threadId = null; + /** + * 信息列表 + * + * @var \TimMBean[] + */ + public $timMBeanList = null; + /** + * 类型 + * + * @var string + */ + public $reqType = null; + /** + * @var array + */ + public $extraMap = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['threadId'])) { + $this->threadId = $vals['threadId']; + } + if (isset($vals['timMBeanList'])) { + $this->timMBeanList = $vals['timMBeanList']; + } + if (isset($vals['reqType'])) { + $this->reqType = $vals['reqType']; + } + if (isset($vals['extraMap'])) { + $this->extraMap = $vals['extraMap']; + } + } + } + + public function getName() + { + return 'TimMBeanList'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->threadId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->timMBeanList = array(); + $_size265 = 0; + $_etype268 = 0; + $xfer += $input->readListBegin($_etype268, $_size265); + for ($_i269 = 0; $_i269 < $_size265; ++$_i269) { + $elem270 = null; + $elem270 = new \TimMBean(); + $xfer += $elem270->read($input); + $this->timMBeanList []= $elem270; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->reqType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->extraMap = array(); + $_size271 = 0; + $_ktype272 = 0; + $_vtype273 = 0; + $xfer += $input->readMapBegin($_ktype272, $_vtype273, $_size271); + for ($_i275 = 0; $_i275 < $_size271; ++$_i275) { + $key276 = ''; + $val277 = ''; + $xfer += $input->readString($key276); + $xfer += $input->readString($val277); + $this->extraMap[$key276] = $val277; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('TimMBeanList'); + if ($this->threadId !== null) { + $xfer += $output->writeFieldBegin('threadId', TType::STRING, 1); + $xfer += $output->writeString($this->threadId); + $xfer += $output->writeFieldEnd(); + } + if ($this->timMBeanList !== null) { + if (!is_array($this->timMBeanList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('timMBeanList', TType::LST, 2); + $output->writeListBegin(TType::STRUCT, count($this->timMBeanList)); + foreach ($this->timMBeanList as $iter278) { + $xfer += $iter278->write($output); + } + $output->writeListEnd(); + $xfer += $output->writeFieldEnd(); + } + if ($this->reqType !== null) { + $xfer += $output->writeFieldBegin('reqType', TType::STRING, 3); + $xfer += $output->writeString($this->reqType); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraMap !== null) { + if (!is_array($this->extraMap)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 4); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); + foreach ($this->extraMap as $kiter279 => $viter280) { + $xfer += $output->writeString($kiter279); + $xfer += $output->writeString($viter280); + } + $output->writeMapEnd(); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/TimMessageIq.php b/protocols/gen-php/TimMessageIq.php new file mode 100644 index 0000000..d4e0880 --- /dev/null +++ b/protocols/gen-php/TimMessageIq.php @@ -0,0 +1,243 @@ + array( + 'var' => 'tidlist', + 'isRequired' => false, + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 2 => array( + 'var' => 'timPage', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimPage', + ), + 3 => array( + 'var' => 'midlist', + 'isRequired' => false, + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'extraMap', + 'isRequired' => false, + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + + /** + * tid集合 + * + * @var string[] + */ + public $tidlist = null; + /** + * 分页 + * + * @var \TimPage + */ + public $timPage = null; + /** + * mid集合 + * + * @var string[] + */ + public $midlist = null; + /** + * @var array + */ + public $extraMap = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['tidlist'])) { + $this->tidlist = $vals['tidlist']; + } + if (isset($vals['timPage'])) { + $this->timPage = $vals['timPage']; + } + if (isset($vals['midlist'])) { + $this->midlist = $vals['midlist']; + } + if (isset($vals['extraMap'])) { + $this->extraMap = $vals['extraMap']; + } + } + } + + public function getName() + { + return 'TimMessageIq'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::LST) { + $this->tidlist = array(); + $_size242 = 0; + $_etype245 = 0; + $xfer += $input->readListBegin($_etype245, $_size242); + for ($_i246 = 0; $_i246 < $_size242; ++$_i246) { + $elem247 = null; + $xfer += $input->readString($elem247); + $this->tidlist []= $elem247; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->timPage = new \TimPage(); + $xfer += $this->timPage->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->midlist = array(); + $_size248 = 0; + $_etype251 = 0; + $xfer += $input->readListBegin($_etype251, $_size248); + for ($_i252 = 0; $_i252 < $_size248; ++$_i252) { + $elem253 = null; + $xfer += $input->readString($elem253); + $this->midlist []= $elem253; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->extraMap = array(); + $_size254 = 0; + $_ktype255 = 0; + $_vtype256 = 0; + $xfer += $input->readMapBegin($_ktype255, $_vtype256, $_size254); + for ($_i258 = 0; $_i258 < $_size254; ++$_i258) { + $key259 = ''; + $val260 = ''; + $xfer += $input->readString($key259); + $xfer += $input->readString($val260); + $this->extraMap[$key259] = $val260; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('TimMessageIq'); + if ($this->tidlist !== null) { + if (!is_array($this->tidlist)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tidlist', TType::LST, 1); + $output->writeListBegin(TType::STRING, count($this->tidlist)); + foreach ($this->tidlist as $iter261) { + $xfer += $output->writeString($iter261); + } + $output->writeListEnd(); + $xfer += $output->writeFieldEnd(); + } + if ($this->timPage !== null) { + if (!is_object($this->timPage)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('timPage', TType::STRUCT, 2); + $xfer += $this->timPage->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->midlist !== null) { + if (!is_array($this->midlist)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('midlist', TType::LST, 3); + $output->writeListBegin(TType::STRING, count($this->midlist)); + foreach ($this->midlist as $iter262) { + $xfer += $output->writeString($iter262); + } + $output->writeListEnd(); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraMap !== null) { + if (!is_array($this->extraMap)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 4); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); + foreach ($this->extraMap as $kiter263 => $viter264) { + $xfer += $output->writeString($kiter263); + $xfer += $output->writeString($viter264); + } + $output->writeMapEnd(); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/TimNode.php b/protocols/gen-php/TimNode.php new file mode 100644 index 0000000..119d0e4 --- /dev/null +++ b/protocols/gen-php/TimNode.php @@ -0,0 +1,120 @@ + array( + 'var' => 'key', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'value', + 'isRequired' => false, + 'type' => TType::STRING, + ), + ); + + /** + * 键 + * + * @var string + */ + public $key = null; + /** + * 值 + * + * @var string + */ + public $value = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['key'])) { + $this->key = $vals['key']; + } + if (isset($vals['value'])) { + $this->value = $vals['value']; + } + } + } + + public function getName() + { + return 'TimNode'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->key); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->value); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('TimNode'); + if ($this->key !== null) { + $xfer += $output->writeFieldBegin('key', TType::STRING, 1); + $xfer += $output->writeString($this->key); + $xfer += $output->writeFieldEnd(); + } + if ($this->value !== null) { + $xfer += $output->writeFieldBegin('value', TType::STRING, 2); + $xfer += $output->writeString($this->value); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/TimPBean.php b/protocols/gen-php/TimPBean.php new file mode 100644 index 0000000..92098e3 --- /dev/null +++ b/protocols/gen-php/TimPBean.php @@ -0,0 +1,422 @@ + array( + 'var' => 'threadId', + 'isRequired' => true, + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'fromTid', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\Tid', + ), + 3 => array( + 'var' => 'toTid', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\Tid', + ), + 4 => array( + 'var' => 'status', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'type', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 6 => array( + 'var' => 'priority', + 'isRequired' => false, + 'type' => TType::I32, + ), + 7 => array( + 'var' => 'show', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 8 => array( + 'var' => 'leaguerTid', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\Tid', + ), + 9 => array( + 'var' => 'extraList', + 'isRequired' => false, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\TimNode', + ), + ), + 10 => array( + 'var' => 'error', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimError', + ), + 11 => array( + 'var' => 'extraMap', + 'isRequired' => false, + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + + /** + * 标识 + * + * @var string + */ + public $threadId = null; + /** + * @var \Tid + */ + public $fromTid = null; + /** + * @var \Tid + */ + public $toTid = null; + /** + * subscribe:订阅其他用户的状态 probe:请求获取其他用户的状态 unavailable:不可用,离线(offline)状态 + * + * @var string + */ + public $status = null; + /** + * normal:类似于email,主要特点是不要求响应; + * chat:类似于qq里的好友即时聊天,主要特点是实时通讯; + * groupchat:类似于聊天室里的群聊; + * headline:用于发送alert和notification; + * error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; + * + * @var string + */ + public $type = null; + /** + * 优先权 0 。高优先级的resource能接受发送到bare JID的消息,低优先级的resource不能 + * + * @var int + */ + public $priority = null; + /** + * chat:聊天中 away:暂时离开 xa:eXtend Away,长时间离开 dnd:勿打扰 online:在线 offline:离线 + * + * @var string + */ + public $show = null; + /** + * 成员Tid 群聊时信息发送者Tid + * + * @var \Tid + */ + public $leaguerTid = null; + /** + * 扩展字段 + * + * @var \TimNode[] + */ + public $extraList = null; + /** + * 错误码 + * + * @var \TimError + */ + public $error = null; + /** + * @var array + */ + public $extraMap = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['threadId'])) { + $this->threadId = $vals['threadId']; + } + if (isset($vals['fromTid'])) { + $this->fromTid = $vals['fromTid']; + } + if (isset($vals['toTid'])) { + $this->toTid = $vals['toTid']; + } + if (isset($vals['status'])) { + $this->status = $vals['status']; + } + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + if (isset($vals['priority'])) { + $this->priority = $vals['priority']; + } + if (isset($vals['show'])) { + $this->show = $vals['show']; + } + if (isset($vals['leaguerTid'])) { + $this->leaguerTid = $vals['leaguerTid']; + } + if (isset($vals['extraList'])) { + $this->extraList = $vals['extraList']; + } + if (isset($vals['error'])) { + $this->error = $vals['error']; + } + if (isset($vals['extraMap'])) { + $this->extraMap = $vals['extraMap']; + } + } + } + + public function getName() + { + return 'TimPBean'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->threadId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->fromTid = new \Tid(); + $xfer += $this->fromTid->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->toTid = new \Tid(); + $xfer += $this->toTid->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->status); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->type); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->priority); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->show); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::STRUCT) { + $this->leaguerTid = new \Tid(); + $xfer += $this->leaguerTid->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::LST) { + $this->extraList = array(); + $_size117 = 0; + $_etype120 = 0; + $xfer += $input->readListBegin($_etype120, $_size117); + for ($_i121 = 0; $_i121 < $_size117; ++$_i121) { + $elem122 = null; + $elem122 = new \TimNode(); + $xfer += $elem122->read($input); + $this->extraList []= $elem122; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 10: + if ($ftype == TType::STRUCT) { + $this->error = new \TimError(); + $xfer += $this->error->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 11: + if ($ftype == TType::MAP) { + $this->extraMap = array(); + $_size123 = 0; + $_ktype124 = 0; + $_vtype125 = 0; + $xfer += $input->readMapBegin($_ktype124, $_vtype125, $_size123); + for ($_i127 = 0; $_i127 < $_size123; ++$_i127) { + $key128 = ''; + $val129 = ''; + $xfer += $input->readString($key128); + $xfer += $input->readString($val129); + $this->extraMap[$key128] = $val129; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('TimPBean'); + if ($this->threadId !== null) { + $xfer += $output->writeFieldBegin('threadId', TType::STRING, 1); + $xfer += $output->writeString($this->threadId); + $xfer += $output->writeFieldEnd(); + } + if ($this->fromTid !== null) { + if (!is_object($this->fromTid)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('fromTid', TType::STRUCT, 2); + $xfer += $this->fromTid->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->toTid !== null) { + if (!is_object($this->toTid)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('toTid', TType::STRUCT, 3); + $xfer += $this->toTid->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->status !== null) { + $xfer += $output->writeFieldBegin('status', TType::STRING, 4); + $xfer += $output->writeString($this->status); + $xfer += $output->writeFieldEnd(); + } + if ($this->type !== null) { + $xfer += $output->writeFieldBegin('type', TType::STRING, 5); + $xfer += $output->writeString($this->type); + $xfer += $output->writeFieldEnd(); + } + if ($this->priority !== null) { + $xfer += $output->writeFieldBegin('priority', TType::I32, 6); + $xfer += $output->writeI32($this->priority); + $xfer += $output->writeFieldEnd(); + } + if ($this->show !== null) { + $xfer += $output->writeFieldBegin('show', TType::STRING, 7); + $xfer += $output->writeString($this->show); + $xfer += $output->writeFieldEnd(); + } + if ($this->leaguerTid !== null) { + if (!is_object($this->leaguerTid)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('leaguerTid', TType::STRUCT, 8); + $xfer += $this->leaguerTid->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraList !== null) { + if (!is_array($this->extraList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraList', TType::LST, 9); + $output->writeListBegin(TType::STRUCT, count($this->extraList)); + foreach ($this->extraList as $iter130) { + $xfer += $iter130->write($output); + } + $output->writeListEnd(); + $xfer += $output->writeFieldEnd(); + } + if ($this->error !== null) { + if (!is_object($this->error)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('error', TType::STRUCT, 10); + $xfer += $this->error->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraMap !== null) { + if (!is_array($this->extraMap)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 11); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); + foreach ($this->extraMap as $kiter131 => $viter132) { + $xfer += $output->writeString($kiter131); + $xfer += $output->writeString($viter132); + } + $output->writeMapEnd(); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/TimPBeanList.php b/protocols/gen-php/TimPBeanList.php new file mode 100644 index 0000000..fdd2a12 --- /dev/null +++ b/protocols/gen-php/TimPBeanList.php @@ -0,0 +1,218 @@ + array( + 'var' => 'threadId', + 'isRequired' => true, + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'timPBeanList', + 'isRequired' => false, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\TimPBean', + ), + ), + 3 => array( + 'var' => 'reqType', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'extraMap', + 'isRequired' => false, + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + + /** + * @var string + */ + public $threadId = null; + /** + * 状态信息列表 + * + * @var \TimPBean[] + */ + public $timPBeanList = null; + /** + * 类型 + * + * @var string + */ + public $reqType = null; + /** + * @var array + */ + public $extraMap = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['threadId'])) { + $this->threadId = $vals['threadId']; + } + if (isset($vals['timPBeanList'])) { + $this->timPBeanList = $vals['timPBeanList']; + } + if (isset($vals['reqType'])) { + $this->reqType = $vals['reqType']; + } + if (isset($vals['extraMap'])) { + $this->extraMap = $vals['extraMap']; + } + } + } + + public function getName() + { + return 'TimPBeanList'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->threadId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->timPBeanList = array(); + $_size281 = 0; + $_etype284 = 0; + $xfer += $input->readListBegin($_etype284, $_size281); + for ($_i285 = 0; $_i285 < $_size281; ++$_i285) { + $elem286 = null; + $elem286 = new \TimPBean(); + $xfer += $elem286->read($input); + $this->timPBeanList []= $elem286; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->reqType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->extraMap = array(); + $_size287 = 0; + $_ktype288 = 0; + $_vtype289 = 0; + $xfer += $input->readMapBegin($_ktype288, $_vtype289, $_size287); + for ($_i291 = 0; $_i291 < $_size287; ++$_i291) { + $key292 = ''; + $val293 = ''; + $xfer += $input->readString($key292); + $xfer += $input->readString($val293); + $this->extraMap[$key292] = $val293; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('TimPBeanList'); + if ($this->threadId !== null) { + $xfer += $output->writeFieldBegin('threadId', TType::STRING, 1); + $xfer += $output->writeString($this->threadId); + $xfer += $output->writeFieldEnd(); + } + if ($this->timPBeanList !== null) { + if (!is_array($this->timPBeanList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('timPBeanList', TType::LST, 2); + $output->writeListBegin(TType::STRUCT, count($this->timPBeanList)); + foreach ($this->timPBeanList as $iter294) { + $xfer += $iter294->write($output); + } + $output->writeListEnd(); + $xfer += $output->writeFieldEnd(); + } + if ($this->reqType !== null) { + $xfer += $output->writeFieldBegin('reqType', TType::STRING, 3); + $xfer += $output->writeString($this->reqType); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraMap !== null) { + if (!is_array($this->extraMap)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 4); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); + foreach ($this->extraMap as $kiter295 => $viter296) { + $xfer += $output->writeString($kiter295); + $xfer += $output->writeString($viter296); + } + $output->writeMapEnd(); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/TimPage.php b/protocols/gen-php/TimPage.php new file mode 100644 index 0000000..820f3be --- /dev/null +++ b/protocols/gen-php/TimPage.php @@ -0,0 +1,198 @@ + array( + 'var' => 'fromTimeStamp', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'toTimeStamp', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'limitCount', + 'isRequired' => false, + 'type' => TType::I32, + ), + 4 => array( + 'var' => 'extraMap', + 'isRequired' => false, + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + + /** + * 时间上 + * + * @var string + */ + public $fromTimeStamp = null; + /** + * 时间下 + * + * @var string + */ + public $toTimeStamp = null; + /** + * 条数 + * + * @var int + */ + public $limitCount = null; + /** + * @var array + */ + public $extraMap = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['fromTimeStamp'])) { + $this->fromTimeStamp = $vals['fromTimeStamp']; + } + if (isset($vals['toTimeStamp'])) { + $this->toTimeStamp = $vals['toTimeStamp']; + } + if (isset($vals['limitCount'])) { + $this->limitCount = $vals['limitCount']; + } + if (isset($vals['extraMap'])) { + $this->extraMap = $vals['extraMap']; + } + } + } + + public function getName() + { + return 'TimPage'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->fromTimeStamp); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->toTimeStamp); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->limitCount); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->extraMap = array(); + $_size233 = 0; + $_ktype234 = 0; + $_vtype235 = 0; + $xfer += $input->readMapBegin($_ktype234, $_vtype235, $_size233); + for ($_i237 = 0; $_i237 < $_size233; ++$_i237) { + $key238 = ''; + $val239 = ''; + $xfer += $input->readString($key238); + $xfer += $input->readString($val239); + $this->extraMap[$key238] = $val239; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('TimPage'); + if ($this->fromTimeStamp !== null) { + $xfer += $output->writeFieldBegin('fromTimeStamp', TType::STRING, 1); + $xfer += $output->writeString($this->fromTimeStamp); + $xfer += $output->writeFieldEnd(); + } + if ($this->toTimeStamp !== null) { + $xfer += $output->writeFieldBegin('toTimeStamp', TType::STRING, 2); + $xfer += $output->writeString($this->toTimeStamp); + $xfer += $output->writeFieldEnd(); + } + if ($this->limitCount !== null) { + $xfer += $output->writeFieldBegin('limitCount', TType::I32, 3); + $xfer += $output->writeI32($this->limitCount); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraMap !== null) { + if (!is_array($this->extraMap)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 4); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); + foreach ($this->extraMap as $kiter240 => $viter241) { + $xfer += $output->writeString($kiter240); + $xfer += $output->writeString($viter241); + } + $output->writeMapEnd(); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/TimParam.php b/protocols/gen-php/TimParam.php new file mode 100644 index 0000000..53455c7 --- /dev/null +++ b/protocols/gen-php/TimParam.php @@ -0,0 +1,298 @@ + array( + 'var' => 'timestamp', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'version', + 'isRequired' => false, + 'type' => TType::I16, + ), + 3 => array( + 'var' => 'lang', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'extraList', + 'isRequired' => false, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\TimNode', + ), + ), + 5 => array( + 'var' => 'extraMap', + 'isRequired' => false, + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 6 => array( + 'var' => 'interflow', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 7 => array( + 'var' => 'tls', + 'isRequired' => false, + 'type' => TType::STRING, + ), + ); + + /** + * 服务器时间 + * + * @var string + */ + public $timestamp = null; + /** + * 版本 + * + * @var int + */ + public $version = null; + /** + * 语言 + * + * @var string + */ + public $lang = null; + /** + * 附加信息 + * + * @var \TimNode[] + */ + public $extraList = null; + /** + * @var array + */ + public $extraMap = null; + /** + * 消息合流 + * + * @var string + */ + public $interflow = null; + /** + * tls + * + * @var string + */ + public $tls = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['timestamp'])) { + $this->timestamp = $vals['timestamp']; + } + if (isset($vals['version'])) { + $this->version = $vals['version']; + } + if (isset($vals['lang'])) { + $this->lang = $vals['lang']; + } + if (isset($vals['extraList'])) { + $this->extraList = $vals['extraList']; + } + if (isset($vals['extraMap'])) { + $this->extraMap = $vals['extraMap']; + } + if (isset($vals['interflow'])) { + $this->interflow = $vals['interflow']; + } + if (isset($vals['tls'])) { + $this->tls = $vals['tls']; + } + } + } + + public function getName() + { + return 'TimParam'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->timestamp); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->version); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->lang); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::LST) { + $this->extraList = array(); + $_size16 = 0; + $_etype19 = 0; + $xfer += $input->readListBegin($_etype19, $_size16); + for ($_i20 = 0; $_i20 < $_size16; ++$_i20) { + $elem21 = null; + $elem21 = new \TimNode(); + $xfer += $elem21->read($input); + $this->extraList []= $elem21; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::MAP) { + $this->extraMap = array(); + $_size22 = 0; + $_ktype23 = 0; + $_vtype24 = 0; + $xfer += $input->readMapBegin($_ktype23, $_vtype24, $_size22); + for ($_i26 = 0; $_i26 < $_size22; ++$_i26) { + $key27 = ''; + $val28 = ''; + $xfer += $input->readString($key27); + $xfer += $input->readString($val28); + $this->extraMap[$key27] = $val28; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->interflow); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tls); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('TimParam'); + if ($this->timestamp !== null) { + $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 1); + $xfer += $output->writeString($this->timestamp); + $xfer += $output->writeFieldEnd(); + } + if ($this->version !== null) { + $xfer += $output->writeFieldBegin('version', TType::I16, 2); + $xfer += $output->writeI16($this->version); + $xfer += $output->writeFieldEnd(); + } + if ($this->lang !== null) { + $xfer += $output->writeFieldBegin('lang', TType::STRING, 3); + $xfer += $output->writeString($this->lang); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraList !== null) { + if (!is_array($this->extraList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraList', TType::LST, 4); + $output->writeListBegin(TType::STRUCT, count($this->extraList)); + foreach ($this->extraList as $iter29) { + $xfer += $iter29->write($output); + } + $output->writeListEnd(); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraMap !== null) { + if (!is_array($this->extraMap)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 5); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); + foreach ($this->extraMap as $kiter30 => $viter31) { + $xfer += $output->writeString($kiter30); + $xfer += $output->writeString($viter31); + } + $output->writeMapEnd(); + $xfer += $output->writeFieldEnd(); + } + if ($this->interflow !== null) { + $xfer += $output->writeFieldBegin('interflow', TType::STRING, 6); + $xfer += $output->writeString($this->interflow); + $xfer += $output->writeFieldEnd(); + } + if ($this->tls !== null) { + $xfer += $output->writeFieldBegin('tls', TType::STRING, 7); + $xfer += $output->writeString($this->tls); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/TimPropertyBean.php b/protocols/gen-php/TimPropertyBean.php new file mode 100644 index 0000000..60cdecc --- /dev/null +++ b/protocols/gen-php/TimPropertyBean.php @@ -0,0 +1,144 @@ + array( + 'var' => 'threadId', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'interflow', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'tls', + 'isRequired' => false, + 'type' => TType::STRING, + ), + ); + + /** + * @var string + */ + public $threadId = null; + /** + * 消息合流 + * + * @var string + */ + public $interflow = null; + /** + * tls + * + * @var string + */ + public $tls = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['threadId'])) { + $this->threadId = $vals['threadId']; + } + if (isset($vals['interflow'])) { + $this->interflow = $vals['interflow']; + } + if (isset($vals['tls'])) { + $this->tls = $vals['tls']; + } + } + } + + public function getName() + { + return 'TimPropertyBean'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->threadId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->interflow); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tls); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('TimPropertyBean'); + if ($this->threadId !== null) { + $xfer += $output->writeFieldBegin('threadId', TType::STRING, 1); + $xfer += $output->writeString($this->threadId); + $xfer += $output->writeFieldEnd(); + } + if ($this->interflow !== null) { + $xfer += $output->writeFieldBegin('interflow', TType::STRING, 2); + $xfer += $output->writeString($this->interflow); + $xfer += $output->writeFieldEnd(); + } + if ($this->tls !== null) { + $xfer += $output->writeFieldBegin('tls', TType::STRING, 3); + $xfer += $output->writeString($this->tls); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/TimRemoteRoom.php b/protocols/gen-php/TimRemoteRoom.php new file mode 100644 index 0000000..c0617b6 --- /dev/null +++ b/protocols/gen-php/TimRemoteRoom.php @@ -0,0 +1,182 @@ + array( + 'var' => 'error', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimError', + ), + 2 => array( + 'var' => 'room', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimRoom', + ), + 3 => array( + 'var' => 'extraMap', + 'isRequired' => false, + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + + /** + * 错误码 + * + * @var \TimError + */ + public $error = null; + /** + * 远程房间信息 + * + * @var \TimRoom + */ + public $room = null; + /** + * @var array + */ + public $extraMap = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['error'])) { + $this->error = $vals['error']; + } + if (isset($vals['room'])) { + $this->room = $vals['room']; + } + if (isset($vals['extraMap'])) { + $this->extraMap = $vals['extraMap']; + } + } + } + + public function getName() + { + return 'TimRemoteRoom'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->error = new \TimError(); + $xfer += $this->error->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->room = new \TimRoom(); + $xfer += $this->room->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->extraMap = array(); + $_size183 = 0; + $_ktype184 = 0; + $_vtype185 = 0; + $xfer += $input->readMapBegin($_ktype184, $_vtype185, $_size183); + for ($_i187 = 0; $_i187 < $_size183; ++$_i187) { + $key188 = ''; + $val189 = ''; + $xfer += $input->readString($key188); + $xfer += $input->readString($val189); + $this->extraMap[$key188] = $val189; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('TimRemoteRoom'); + if ($this->error !== null) { + if (!is_object($this->error)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('error', TType::STRUCT, 1); + $xfer += $this->error->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->room !== null) { + if (!is_object($this->room)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('room', TType::STRUCT, 2); + $xfer += $this->room->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraMap !== null) { + if (!is_array($this->extraMap)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 3); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); + foreach ($this->extraMap as $kiter190 => $viter191) { + $xfer += $output->writeString($kiter190); + $xfer += $output->writeString($viter191); + } + $output->writeMapEnd(); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/TimRemoteUserBean.php b/protocols/gen-php/TimRemoteUserBean.php new file mode 100644 index 0000000..0fa9287 --- /dev/null +++ b/protocols/gen-php/TimRemoteUserBean.php @@ -0,0 +1,182 @@ + array( + 'var' => 'error', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimError', + ), + 2 => array( + 'var' => 'ub', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimUserBean', + ), + 3 => array( + 'var' => 'extraMap', + 'isRequired' => false, + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + + /** + * 错误码 + * + * @var \TimError + */ + public $error = null; + /** + * 远程用户信息 + * + * @var \TimUserBean + */ + public $ub = null; + /** + * @var array + */ + public $extraMap = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['error'])) { + $this->error = $vals['error']; + } + if (isset($vals['ub'])) { + $this->ub = $vals['ub']; + } + if (isset($vals['extraMap'])) { + $this->extraMap = $vals['extraMap']; + } + } + } + + public function getName() + { + return 'TimRemoteUserBean'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->error = new \TimError(); + $xfer += $this->error->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->ub = new \TimUserBean(); + $xfer += $this->ub->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->extraMap = array(); + $_size174 = 0; + $_ktype175 = 0; + $_vtype176 = 0; + $xfer += $input->readMapBegin($_ktype175, $_vtype176, $_size174); + for ($_i178 = 0; $_i178 < $_size174; ++$_i178) { + $key179 = ''; + $val180 = ''; + $xfer += $input->readString($key179); + $xfer += $input->readString($val180); + $this->extraMap[$key179] = $val180; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('TimRemoteUserBean'); + if ($this->error !== null) { + if (!is_object($this->error)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('error', TType::STRUCT, 1); + $xfer += $this->error->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ub !== null) { + if (!is_object($this->ub)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('ub', TType::STRUCT, 2); + $xfer += $this->ub->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraMap !== null) { + if (!is_array($this->extraMap)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 3); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); + foreach ($this->extraMap as $kiter181 => $viter182) { + $xfer += $output->writeString($kiter181); + $xfer += $output->writeString($viter182); + } + $output->writeMapEnd(); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/TimResponseBean.php b/protocols/gen-php/TimResponseBean.php new file mode 100644 index 0000000..20cf228 --- /dev/null +++ b/protocols/gen-php/TimResponseBean.php @@ -0,0 +1,223 @@ + array( + 'var' => 'threadId', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'error', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimError', + ), + 3 => array( + 'var' => 'extraList', + 'isRequired' => false, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\TimNode', + ), + ), + 4 => array( + 'var' => 'extraMap', + 'isRequired' => false, + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + + /** + * @var string + */ + public $threadId = null; + /** + * 错误码 + * + * @var \TimError + */ + public $error = null; + /** + * 附加信息 + * + * @var \TimNode[] + */ + public $extraList = null; + /** + * @var array + */ + public $extraMap = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['threadId'])) { + $this->threadId = $vals['threadId']; + } + if (isset($vals['error'])) { + $this->error = $vals['error']; + } + if (isset($vals['extraList'])) { + $this->extraList = $vals['extraList']; + } + if (isset($vals['extraMap'])) { + $this->extraMap = $vals['extraMap']; + } + } + } + + public function getName() + { + return 'TimResponseBean'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->threadId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->error = new \TimError(); + $xfer += $this->error->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->extraList = array(); + $_size192 = 0; + $_etype195 = 0; + $xfer += $input->readListBegin($_etype195, $_size192); + for ($_i196 = 0; $_i196 < $_size192; ++$_i196) { + $elem197 = null; + $elem197 = new \TimNode(); + $xfer += $elem197->read($input); + $this->extraList []= $elem197; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->extraMap = array(); + $_size198 = 0; + $_ktype199 = 0; + $_vtype200 = 0; + $xfer += $input->readMapBegin($_ktype199, $_vtype200, $_size198); + for ($_i202 = 0; $_i202 < $_size198; ++$_i202) { + $key203 = ''; + $val204 = ''; + $xfer += $input->readString($key203); + $xfer += $input->readString($val204); + $this->extraMap[$key203] = $val204; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('TimResponseBean'); + if ($this->threadId !== null) { + $xfer += $output->writeFieldBegin('threadId', TType::STRING, 1); + $xfer += $output->writeString($this->threadId); + $xfer += $output->writeFieldEnd(); + } + if ($this->error !== null) { + if (!is_object($this->error)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('error', TType::STRUCT, 2); + $xfer += $this->error->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraList !== null) { + if (!is_array($this->extraList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraList', TType::LST, 3); + $output->writeListBegin(TType::STRUCT, count($this->extraList)); + foreach ($this->extraList as $iter205) { + $xfer += $iter205->write($output); + } + $output->writeListEnd(); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraMap !== null) { + if (!is_array($this->extraMap)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 4); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); + foreach ($this->extraMap as $kiter206 => $viter207) { + $xfer += $output->writeString($kiter206); + $xfer += $output->writeString($viter207); + } + $output->writeMapEnd(); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/TimRoom.php b/protocols/gen-php/TimRoom.php new file mode 100644 index 0000000..56c977e --- /dev/null +++ b/protocols/gen-php/TimRoom.php @@ -0,0 +1,435 @@ + array( + 'var' => 'tid', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\Tid', + ), + 2 => array( + 'var' => 'founderTid', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\Tid', + ), + 3 => array( + 'var' => 'HostsTid', + 'isRequired' => false, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\Tid', + ), + ), + 4 => array( + 'var' => 'membersTid', + 'isRequired' => false, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\Tid', + ), + ), + 5 => array( + 'var' => 'headurl', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 6 => array( + 'var' => 'roomName', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 7 => array( + 'var' => 'desc', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 8 => array( + 'var' => 'createTime', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimTime', + ), + 9 => array( + 'var' => 'extraList', + 'isRequired' => false, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\TimNode', + ), + ), + 10 => array( + 'var' => 'extraMap', + 'isRequired' => false, + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + + /** + * 房间Tid + * + * @var \Tid + */ + public $tid = null; + /** + * 创建人Tid + * + * @var \Tid + */ + public $founderTid = null; + /** + * 主持人Tid + * + * @var \Tid[] + */ + public $HostsTid = null; + /** + * memberTid + * + * @var \Tid[] + */ + public $membersTid = null; + /** + * 头像地址 http://xxx.jpg + * + * @var string + */ + public $headurl = null; + /** + * 房间名称 + * + * @var string + */ + public $roomName = null; + /** + * 房间说明 + * + * @var string + */ + public $desc = null; + /** + * 房间创建时间 + * + * @var \TimTime + */ + public $createTime = null; + /** + * 扩展字段 + * + * @var \TimNode[] + */ + public $extraList = null; + /** + * @var array + */ + public $extraMap = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['tid'])) { + $this->tid = $vals['tid']; + } + if (isset($vals['founderTid'])) { + $this->founderTid = $vals['founderTid']; + } + if (isset($vals['HostsTid'])) { + $this->HostsTid = $vals['HostsTid']; + } + if (isset($vals['membersTid'])) { + $this->membersTid = $vals['membersTid']; + } + if (isset($vals['headurl'])) { + $this->headurl = $vals['headurl']; + } + if (isset($vals['roomName'])) { + $this->roomName = $vals['roomName']; + } + if (isset($vals['desc'])) { + $this->desc = $vals['desc']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['extraList'])) { + $this->extraList = $vals['extraList']; + } + if (isset($vals['extraMap'])) { + $this->extraMap = $vals['extraMap']; + } + } + } + + public function getName() + { + return 'TimRoom'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->tid = new \Tid(); + $xfer += $this->tid->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->founderTid = new \Tid(); + $xfer += $this->founderTid->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->HostsTid = array(); + $_size87 = 0; + $_etype90 = 0; + $xfer += $input->readListBegin($_etype90, $_size87); + for ($_i91 = 0; $_i91 < $_size87; ++$_i91) { + $elem92 = null; + $elem92 = new \Tid(); + $xfer += $elem92->read($input); + $this->HostsTid []= $elem92; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::LST) { + $this->membersTid = array(); + $_size93 = 0; + $_etype96 = 0; + $xfer += $input->readListBegin($_etype96, $_size93); + for ($_i97 = 0; $_i97 < $_size93; ++$_i97) { + $elem98 = null; + $elem98 = new \Tid(); + $xfer += $elem98->read($input); + $this->membersTid []= $elem98; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->headurl); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->roomName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->desc); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::STRUCT) { + $this->createTime = new \TimTime(); + $xfer += $this->createTime->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::LST) { + $this->extraList = array(); + $_size99 = 0; + $_etype102 = 0; + $xfer += $input->readListBegin($_etype102, $_size99); + for ($_i103 = 0; $_i103 < $_size99; ++$_i103) { + $elem104 = null; + $elem104 = new \TimNode(); + $xfer += $elem104->read($input); + $this->extraList []= $elem104; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 10: + if ($ftype == TType::MAP) { + $this->extraMap = array(); + $_size105 = 0; + $_ktype106 = 0; + $_vtype107 = 0; + $xfer += $input->readMapBegin($_ktype106, $_vtype107, $_size105); + for ($_i109 = 0; $_i109 < $_size105; ++$_i109) { + $key110 = ''; + $val111 = ''; + $xfer += $input->readString($key110); + $xfer += $input->readString($val111); + $this->extraMap[$key110] = $val111; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('TimRoom'); + if ($this->tid !== null) { + if (!is_object($this->tid)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tid', TType::STRUCT, 1); + $xfer += $this->tid->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->founderTid !== null) { + if (!is_object($this->founderTid)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('founderTid', TType::STRUCT, 2); + $xfer += $this->founderTid->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->HostsTid !== null) { + if (!is_array($this->HostsTid)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('HostsTid', TType::LST, 3); + $output->writeListBegin(TType::STRUCT, count($this->HostsTid)); + foreach ($this->HostsTid as $iter112) { + $xfer += $iter112->write($output); + } + $output->writeListEnd(); + $xfer += $output->writeFieldEnd(); + } + if ($this->membersTid !== null) { + if (!is_array($this->membersTid)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('membersTid', TType::LST, 4); + $output->writeListBegin(TType::STRUCT, count($this->membersTid)); + foreach ($this->membersTid as $iter113) { + $xfer += $iter113->write($output); + } + $output->writeListEnd(); + $xfer += $output->writeFieldEnd(); + } + if ($this->headurl !== null) { + $xfer += $output->writeFieldBegin('headurl', TType::STRING, 5); + $xfer += $output->writeString($this->headurl); + $xfer += $output->writeFieldEnd(); + } + if ($this->roomName !== null) { + $xfer += $output->writeFieldBegin('roomName', TType::STRING, 6); + $xfer += $output->writeString($this->roomName); + $xfer += $output->writeFieldEnd(); + } + if ($this->desc !== null) { + $xfer += $output->writeFieldBegin('desc', TType::STRING, 7); + $xfer += $output->writeString($this->desc); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + if (!is_object($this->createTime)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('createTime', TType::STRUCT, 8); + $xfer += $this->createTime->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraList !== null) { + if (!is_array($this->extraList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraList', TType::LST, 9); + $output->writeListBegin(TType::STRUCT, count($this->extraList)); + foreach ($this->extraList as $iter114) { + $xfer += $iter114->write($output); + } + $output->writeListEnd(); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraMap !== null) { + if (!is_array($this->extraMap)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 10); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); + foreach ($this->extraMap as $kiter115 => $viter116) { + $xfer += $output->writeString($kiter115); + $xfer += $output->writeString($viter116); + } + $output->writeMapEnd(); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/TimRoster.php b/protocols/gen-php/TimRoster.php new file mode 100644 index 0000000..c97e400 --- /dev/null +++ b/protocols/gen-php/TimRoster.php @@ -0,0 +1,204 @@ + array( + 'var' => 'subscription', + 'isRequired' => true, + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tid', + 'isRequired' => true, + 'type' => TType::STRUCT, + 'class' => '\Tid', + ), + 3 => array( + 'var' => 'name', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'extraMap', + 'isRequired' => false, + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + + /** + * none表示用户和contact之前没有任何的关系(虽然在server的buddy list中存在) + * to表示用户能看到contact的presence,但是contact看不到用户的Presence + * from和to的含义相反,指用户看不到contact的presence,但是contact可以看到 + * both表示相关之间都能看到对方的presence + * + * @var string + */ + public $subscription = null; + /** + * @var \Tid + */ + public $tid = null; + /** + * 用户名 + * + * @var string + */ + public $name = null; + /** + * @var array + */ + public $extraMap = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['subscription'])) { + $this->subscription = $vals['subscription']; + } + if (isset($vals['tid'])) { + $this->tid = $vals['tid']; + } + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['extraMap'])) { + $this->extraMap = $vals['extraMap']; + } + } + } + + public function getName() + { + return 'TimRoster'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->subscription); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->tid = new \Tid(); + $xfer += $this->tid->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->extraMap = array(); + $_size165 = 0; + $_ktype166 = 0; + $_vtype167 = 0; + $xfer += $input->readMapBegin($_ktype166, $_vtype167, $_size165); + for ($_i169 = 0; $_i169 < $_size165; ++$_i169) { + $key170 = ''; + $val171 = ''; + $xfer += $input->readString($key170); + $xfer += $input->readString($val171); + $this->extraMap[$key170] = $val171; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('TimRoster'); + if ($this->subscription !== null) { + $xfer += $output->writeFieldBegin('subscription', TType::STRING, 1); + $xfer += $output->writeString($this->subscription); + $xfer += $output->writeFieldEnd(); + } + if ($this->tid !== null) { + if (!is_object($this->tid)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tid', TType::STRUCT, 2); + $xfer += $this->tid->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 3); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraMap !== null) { + if (!is_array($this->extraMap)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 4); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); + foreach ($this->extraMap as $kiter172 => $viter173) { + $xfer += $output->writeString($kiter172); + $xfer += $output->writeString($viter173); + } + $output->writeMapEnd(); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/TimSock5Bean.php b/protocols/gen-php/TimSock5Bean.php new file mode 100644 index 0000000..d03292e --- /dev/null +++ b/protocols/gen-php/TimSock5Bean.php @@ -0,0 +1,282 @@ + array( + 'var' => 'fromTid', + 'isRequired' => true, + 'type' => TType::STRUCT, + 'class' => '\Tid', + ), + 2 => array( + 'var' => 'toTid', + 'isRequired' => true, + 'type' => TType::STRUCT, + 'class' => '\Tid', + ), + 3 => array( + 'var' => 'addr', + 'isRequired' => true, + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'port', + 'isRequired' => true, + 'type' => TType::I32, + ), + 5 => array( + 'var' => 'transport', + 'isRequired' => true, + 'type' => TType::I16, + ), + 6 => array( + 'var' => 'pubId', + 'isRequired' => true, + 'type' => TType::STRING, + ), + 7 => array( + 'var' => 'extraMap', + 'isRequired' => false, + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + + /** + * @var \Tid + */ + public $fromTid = null; + /** + * @var \Tid + */ + public $toTid = null; + /** + * ip地址 + * + * @var string + */ + public $addr = null; + /** + * 端口 + * + * @var int + */ + public $port = null; + /** + * 传输类型 1:tcp 2:udp + * + * @var int + */ + public $transport = null; + /** + * 发布id 通过发布id 可以连接两个发布id相同的用户 + * + * @var string + */ + public $pubId = null; + /** + * @var array + */ + public $extraMap = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['fromTid'])) { + $this->fromTid = $vals['fromTid']; + } + if (isset($vals['toTid'])) { + $this->toTid = $vals['toTid']; + } + if (isset($vals['addr'])) { + $this->addr = $vals['addr']; + } + if (isset($vals['port'])) { + $this->port = $vals['port']; + } + if (isset($vals['transport'])) { + $this->transport = $vals['transport']; + } + if (isset($vals['pubId'])) { + $this->pubId = $vals['pubId']; + } + if (isset($vals['extraMap'])) { + $this->extraMap = $vals['extraMap']; + } + } + } + + public function getName() + { + return 'TimSock5Bean'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->fromTid = new \Tid(); + $xfer += $this->fromTid->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->toTid = new \Tid(); + $xfer += $this->toTid->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->addr); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->port); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->transport); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->pubId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::MAP) { + $this->extraMap = array(); + $_size208 = 0; + $_ktype209 = 0; + $_vtype210 = 0; + $xfer += $input->readMapBegin($_ktype209, $_vtype210, $_size208); + for ($_i212 = 0; $_i212 < $_size208; ++$_i212) { + $key213 = ''; + $val214 = ''; + $xfer += $input->readString($key213); + $xfer += $input->readString($val214); + $this->extraMap[$key213] = $val214; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('TimSock5Bean'); + if ($this->fromTid !== null) { + if (!is_object($this->fromTid)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('fromTid', TType::STRUCT, 1); + $xfer += $this->fromTid->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->toTid !== null) { + if (!is_object($this->toTid)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('toTid', TType::STRUCT, 2); + $xfer += $this->toTid->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->addr !== null) { + $xfer += $output->writeFieldBegin('addr', TType::STRING, 3); + $xfer += $output->writeString($this->addr); + $xfer += $output->writeFieldEnd(); + } + if ($this->port !== null) { + $xfer += $output->writeFieldBegin('port', TType::I32, 4); + $xfer += $output->writeI32($this->port); + $xfer += $output->writeFieldEnd(); + } + if ($this->transport !== null) { + $xfer += $output->writeFieldBegin('transport', TType::I16, 5); + $xfer += $output->writeI16($this->transport); + $xfer += $output->writeFieldEnd(); + } + if ($this->pubId !== null) { + $xfer += $output->writeFieldBegin('pubId', TType::STRING, 6); + $xfer += $output->writeString($this->pubId); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraMap !== null) { + if (!is_array($this->extraMap)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 7); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); + foreach ($this->extraMap as $kiter215 => $viter216) { + $xfer += $output->writeString($kiter215); + $xfer += $output->writeString($viter216); + } + $output->writeMapEnd(); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/TimSock5Bytes.php b/protocols/gen-php/TimSock5Bytes.php new file mode 100644 index 0000000..575b67d --- /dev/null +++ b/protocols/gen-php/TimSock5Bytes.php @@ -0,0 +1,218 @@ + array( + 'var' => 'pubId', + 'isRequired' => true, + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'index', + 'isRequired' => true, + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'bytes', + 'isRequired' => true, + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'extraMap', + 'isRequired' => false, + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + + /** + * 发布id + * + * @var string + */ + public $pubId = null; + /** + * 序号数据块 + * + * @var int + */ + public $index = null; + /** + * 数据块 + * + * @var string[] + */ + public $bytes = null; + /** + * @var array + */ + public $extraMap = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['pubId'])) { + $this->pubId = $vals['pubId']; + } + if (isset($vals['index'])) { + $this->index = $vals['index']; + } + if (isset($vals['bytes'])) { + $this->bytes = $vals['bytes']; + } + if (isset($vals['extraMap'])) { + $this->extraMap = $vals['extraMap']; + } + } + } + + public function getName() + { + return 'TimSock5Bytes'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->pubId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->index); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->bytes = array(); + $_size217 = 0; + $_etype220 = 0; + $xfer += $input->readListBegin($_etype220, $_size217); + for ($_i221 = 0; $_i221 < $_size217; ++$_i221) { + $elem222 = null; + $xfer += $input->readString($elem222); + $this->bytes []= $elem222; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->extraMap = array(); + $_size223 = 0; + $_ktype224 = 0; + $_vtype225 = 0; + $xfer += $input->readMapBegin($_ktype224, $_vtype225, $_size223); + for ($_i227 = 0; $_i227 < $_size223; ++$_i227) { + $key228 = ''; + $val229 = ''; + $xfer += $input->readString($key228); + $xfer += $input->readString($val229); + $this->extraMap[$key228] = $val229; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('TimSock5Bytes'); + if ($this->pubId !== null) { + $xfer += $output->writeFieldBegin('pubId', TType::STRING, 1); + $xfer += $output->writeString($this->pubId); + $xfer += $output->writeFieldEnd(); + } + if ($this->index !== null) { + $xfer += $output->writeFieldBegin('index', TType::I32, 2); + $xfer += $output->writeI32($this->index); + $xfer += $output->writeFieldEnd(); + } + if ($this->bytes !== null) { + if (!is_array($this->bytes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('bytes', TType::LST, 3); + $output->writeListBegin(TType::STRING, count($this->bytes)); + foreach ($this->bytes as $iter230) { + $xfer += $output->writeString($iter230); + } + $output->writeListEnd(); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraMap !== null) { + if (!is_array($this->extraMap)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 4); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); + foreach ($this->extraMap as $kiter231 => $viter232) { + $xfer += $output->writeString($kiter231); + $xfer += $output->writeString($viter232); + } + $output->writeMapEnd(); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/TimTime.php b/protocols/gen-php/TimTime.php new file mode 100644 index 0000000..0802857 --- /dev/null +++ b/protocols/gen-php/TimTime.php @@ -0,0 +1,120 @@ + array( + 'var' => 'timestamp', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'formattime', + 'isRequired' => false, + 'type' => TType::STRING, + ), + ); + + /** + * 时间戳 (毫秒) + * + * @var string + */ + public $timestamp = null; + /** + * 格式化时间 + * + * @var string + */ + public $formattime = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['timestamp'])) { + $this->timestamp = $vals['timestamp']; + } + if (isset($vals['formattime'])) { + $this->formattime = $vals['formattime']; + } + } + } + + public function getName() + { + return 'TimTime'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->timestamp); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->formattime); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('TimTime'); + if ($this->timestamp !== null) { + $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 1); + $xfer += $output->writeString($this->timestamp); + $xfer += $output->writeFieldEnd(); + } + if ($this->formattime !== null) { + $xfer += $output->writeFieldBegin('formattime', TType::STRING, 2); + $xfer += $output->writeString($this->formattime); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/TimUserBean.php b/protocols/gen-php/TimUserBean.php new file mode 100644 index 0000000..6456d46 --- /dev/null +++ b/protocols/gen-php/TimUserBean.php @@ -0,0 +1,432 @@ + array( + 'var' => 'tid', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\Tid', + ), + 2 => array( + 'var' => 'nickname', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'remarkname', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'brithday', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'gender', + 'isRequired' => false, + 'type' => TType::I16, + ), + 6 => array( + 'var' => 'headurl', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 7 => array( + 'var' => 'area', + 'isRequired' => false, + 'type' => TType::STRUCT, + 'class' => '\TimArea', + ), + 8 => array( + 'var' => 'headbyte', + 'isRequired' => false, + 'type' => TType::STRING, + ), + 9 => array( + 'var' => 'photoBytes', + 'isRequired' => false, + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 10 => array( + 'var' => 'extraList', + 'isRequired' => false, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => '\TimNode', + ), + ), + 11 => array( + 'var' => 'extraMap', + 'isRequired' => false, + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + + /** + * 用户bean + * + * @var \Tid + */ + public $tid = null; + /** + * 昵称 + * + * @var string + */ + public $nickname = null; + /** + * 备注名称 + * + * @var string + */ + public $remarkname = null; + /** + * 生日 2000-01-01 + * + * @var string + */ + public $brithday = null; + /** + * 性别 自行约定 如 : 0不知,1男,2女 + * + * @var int + */ + public $gender = null; + /** + * 头像地址 http://xxx.jpg + * + * @var string + */ + public $headurl = null; + /** + * 地区 + * + * @var \TimArea + */ + public $area = null; + /** + * 头像 + * + * @var string + */ + public $headbyte = null; + /** + * 其他图片 + * + * @var string[] + */ + public $photoBytes = null; + /** + * 扩展字段 + * + * @var \TimNode[] + */ + public $extraList = null; + /** + * @var array + */ + public $extraMap = null; + + public function __construct($vals = null) + { + if (is_array($vals)) { + if (isset($vals['tid'])) { + $this->tid = $vals['tid']; + } + if (isset($vals['nickname'])) { + $this->nickname = $vals['nickname']; + } + if (isset($vals['remarkname'])) { + $this->remarkname = $vals['remarkname']; + } + if (isset($vals['brithday'])) { + $this->brithday = $vals['brithday']; + } + if (isset($vals['gender'])) { + $this->gender = $vals['gender']; + } + if (isset($vals['headurl'])) { + $this->headurl = $vals['headurl']; + } + if (isset($vals['area'])) { + $this->area = $vals['area']; + } + if (isset($vals['headbyte'])) { + $this->headbyte = $vals['headbyte']; + } + if (isset($vals['photoBytes'])) { + $this->photoBytes = $vals['photoBytes']; + } + if (isset($vals['extraList'])) { + $this->extraList = $vals['extraList']; + } + if (isset($vals['extraMap'])) { + $this->extraMap = $vals['extraMap']; + } + } + } + + public function getName() + { + return 'TimUserBean'; + } + + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) { + case 1: + if ($ftype == TType::STRUCT) { + $this->tid = new \Tid(); + $xfer += $this->tid->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->nickname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->remarkname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->brithday); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->gender); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->headurl); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRUCT) { + $this->area = new \TimArea(); + $xfer += $this->area->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->headbyte); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::LST) { + $this->photoBytes = array(); + $_size64 = 0; + $_etype67 = 0; + $xfer += $input->readListBegin($_etype67, $_size64); + for ($_i68 = 0; $_i68 < $_size64; ++$_i68) { + $elem69 = null; + $xfer += $input->readString($elem69); + $this->photoBytes []= $elem69; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 10: + if ($ftype == TType::LST) { + $this->extraList = array(); + $_size70 = 0; + $_etype73 = 0; + $xfer += $input->readListBegin($_etype73, $_size70); + for ($_i74 = 0; $_i74 < $_size70; ++$_i74) { + $elem75 = null; + $elem75 = new \TimNode(); + $xfer += $elem75->read($input); + $this->extraList []= $elem75; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 11: + if ($ftype == TType::MAP) { + $this->extraMap = array(); + $_size76 = 0; + $_ktype77 = 0; + $_vtype78 = 0; + $xfer += $input->readMapBegin($_ktype77, $_vtype78, $_size76); + for ($_i80 = 0; $_i80 < $_size76; ++$_i80) { + $key81 = ''; + $val82 = ''; + $xfer += $input->readString($key81); + $xfer += $input->readString($val82); + $this->extraMap[$key81] = $val82; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) + { + $xfer = 0; + $xfer += $output->writeStructBegin('TimUserBean'); + if ($this->tid !== null) { + if (!is_object($this->tid)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tid', TType::STRUCT, 1); + $xfer += $this->tid->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->nickname !== null) { + $xfer += $output->writeFieldBegin('nickname', TType::STRING, 2); + $xfer += $output->writeString($this->nickname); + $xfer += $output->writeFieldEnd(); + } + if ($this->remarkname !== null) { + $xfer += $output->writeFieldBegin('remarkname', TType::STRING, 3); + $xfer += $output->writeString($this->remarkname); + $xfer += $output->writeFieldEnd(); + } + if ($this->brithday !== null) { + $xfer += $output->writeFieldBegin('brithday', TType::STRING, 4); + $xfer += $output->writeString($this->brithday); + $xfer += $output->writeFieldEnd(); + } + if ($this->gender !== null) { + $xfer += $output->writeFieldBegin('gender', TType::I16, 5); + $xfer += $output->writeI16($this->gender); + $xfer += $output->writeFieldEnd(); + } + if ($this->headurl !== null) { + $xfer += $output->writeFieldBegin('headurl', TType::STRING, 6); + $xfer += $output->writeString($this->headurl); + $xfer += $output->writeFieldEnd(); + } + if ($this->area !== null) { + if (!is_object($this->area)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('area', TType::STRUCT, 7); + $xfer += $this->area->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->headbyte !== null) { + $xfer += $output->writeFieldBegin('headbyte', TType::STRING, 8); + $xfer += $output->writeString($this->headbyte); + $xfer += $output->writeFieldEnd(); + } + if ($this->photoBytes !== null) { + if (!is_array($this->photoBytes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('photoBytes', TType::LST, 9); + $output->writeListBegin(TType::STRING, count($this->photoBytes)); + foreach ($this->photoBytes as $iter83) { + $xfer += $output->writeString($iter83); + } + $output->writeListEnd(); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraList !== null) { + if (!is_array($this->extraList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraList', TType::LST, 10); + $output->writeListBegin(TType::STRUCT, count($this->extraList)); + foreach ($this->extraList as $iter84) { + $xfer += $iter84->write($output); + } + $output->writeListEnd(); + $xfer += $output->writeFieldEnd(); + } + if ($this->extraMap !== null) { + if (!is_array($this->extraMap)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 11); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); + foreach ($this->extraMap as $kiter85 => $viter86) { + $xfer += $output->writeString($kiter85); + $xfer += $output->writeString($viter86); + } + $output->writeMapEnd(); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } +} diff --git a/protocols/gen-php/Types.php b/protocols/gen-php/Types.php deleted file mode 100644 index e41da1d..0000000 --- a/protocols/gen-php/Types.php +++ /dev/null @@ -1,5909 +0,0 @@ - array( - 'var' => 'errCode', - 'type' => TType::I32, - ), - 2 => array( - 'var' => 'errMsg', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['errCode'])) { - $this->errCode = $vals['errCode']; - } - if (isset($vals['errMsg'])) { - $this->errMsg = $vals['errMsg']; - } - } - } - - public function getName() { - return 'TimError'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->errCode); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->errMsg); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('TimError'); - if ($this->errCode !== null) { - $xfer += $output->writeFieldBegin('errCode', TType::I32, 1); - $xfer += $output->writeI32($this->errCode); - $xfer += $output->writeFieldEnd(); - } - if ($this->errMsg !== null) { - $xfer += $output->writeFieldBegin('errMsg', TType::STRING, 2); - $xfer += $output->writeString($this->errMsg); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TimNode { - static $_TSPEC; - - /** - * 键 - * - * @var string - */ - public $key = null; - /** - * 值 - * - * @var string - */ - public $value = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'key', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'value', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['key'])) { - $this->key = $vals['key']; - } - if (isset($vals['value'])) { - $this->value = $vals['value']; - } - } - } - - public function getName() { - return 'TimNode'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->key); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->value); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('TimNode'); - if ($this->key !== null) { - $xfer += $output->writeFieldBegin('key', TType::STRING, 1); - $xfer += $output->writeString($this->key); - $xfer += $output->writeFieldEnd(); - } - if ($this->value !== null) { - $xfer += $output->writeFieldBegin('value', TType::STRING, 2); - $xfer += $output->writeString($this->value); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TimAckBean { - static $_TSPEC; - - /** - * id,返回所要回执协议的线程id - * - * @var string - */ - public $id = null; - /** - * 类型,自定义 如:ping,message等 - * - * @var string - */ - public $ackType = null; - /** - * 状态,如成功,失败等 - * - * @var string - */ - public $ackStatus = null; - /** - * 附加信息 - * - * @var \TimNode[] - */ - public $extraList = null; - /** - * 错误信息 - * - * @var \TimError - */ - public $err = null; - /** - * @var array - */ - public $extraMap = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'id', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'ackType', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'ackStatus', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'extraList', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\TimNode', - ), - ), - 5 => array( - 'var' => 'err', - 'type' => TType::STRUCT, - 'class' => '\TimError', - ), - 6 => array( - 'var' => 'extraMap', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['id'])) { - $this->id = $vals['id']; - } - if (isset($vals['ackType'])) { - $this->ackType = $vals['ackType']; - } - if (isset($vals['ackStatus'])) { - $this->ackStatus = $vals['ackStatus']; - } - if (isset($vals['extraList'])) { - $this->extraList = $vals['extraList']; - } - if (isset($vals['err'])) { - $this->err = $vals['err']; - } - if (isset($vals['extraMap'])) { - $this->extraMap = $vals['extraMap']; - } - } - } - - public function getName() { - return 'TimAckBean'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->id); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->ackType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->ackStatus); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::LST) { - $this->extraList = array(); - $_size0 = 0; - $_etype3 = 0; - $xfer += $input->readListBegin($_etype3, $_size0); - for ($_i4 = 0; $_i4 < $_size0; ++$_i4) - { - $elem5 = null; - $elem5 = new \TimNode(); - $xfer += $elem5->read($input); - $this->extraList []= $elem5; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRUCT) { - $this->err = new \TimError(); - $xfer += $this->err->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::MAP) { - $this->extraMap = array(); - $_size6 = 0; - $_ktype7 = 0; - $_vtype8 = 0; - $xfer += $input->readMapBegin($_ktype7, $_vtype8, $_size6); - for ($_i10 = 0; $_i10 < $_size6; ++$_i10) - { - $key11 = ''; - $val12 = ''; - $xfer += $input->readString($key11); - $xfer += $input->readString($val12); - $this->extraMap[$key11] = $val12; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('TimAckBean'); - if ($this->id !== null) { - $xfer += $output->writeFieldBegin('id', TType::STRING, 1); - $xfer += $output->writeString($this->id); - $xfer += $output->writeFieldEnd(); - } - if ($this->ackType !== null) { - $xfer += $output->writeFieldBegin('ackType', TType::STRING, 2); - $xfer += $output->writeString($this->ackType); - $xfer += $output->writeFieldEnd(); - } - if ($this->ackStatus !== null) { - $xfer += $output->writeFieldBegin('ackStatus', TType::STRING, 3); - $xfer += $output->writeString($this->ackStatus); - $xfer += $output->writeFieldEnd(); - } - if ($this->extraList !== null) { - if (!is_array($this->extraList)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraList', TType::LST, 4); - { - $output->writeListBegin(TType::STRUCT, count($this->extraList)); - { - foreach ($this->extraList as $iter13) - { - $xfer += $iter13->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->err !== null) { - if (!is_object($this->err)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('err', TType::STRUCT, 5); - $xfer += $this->err->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->extraMap !== null) { - if (!is_array($this->extraMap)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 6); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); - { - foreach ($this->extraMap as $kiter14 => $viter15) - { - $xfer += $output->writeString($kiter14); - $xfer += $output->writeString($viter15); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TimHBean { - static $_TSPEC; - - /** - * 渠道 - * - * @var int - */ - public $chl = null; - /** - * 平台 - * - * @var int - */ - public $platform = null; - /** - * version 客户端协议版本 - * - * @var int - */ - public $version = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'chl', - 'type' => TType::I32, - ), - 2 => array( - 'var' => 'platform', - 'type' => TType::I32, - ), - 3 => array( - 'var' => 'version', - 'type' => TType::I16, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['chl'])) { - $this->chl = $vals['chl']; - } - if (isset($vals['platform'])) { - $this->platform = $vals['platform']; - } - if (isset($vals['version'])) { - $this->version = $vals['version']; - } - } - } - - public function getName() { - return 'TimHBean'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->chl); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->platform); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->version); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('TimHBean'); - if ($this->chl !== null) { - $xfer += $output->writeFieldBegin('chl', TType::I32, 1); - $xfer += $output->writeI32($this->chl); - $xfer += $output->writeFieldEnd(); - } - if ($this->platform !== null) { - $xfer += $output->writeFieldBegin('platform', TType::I32, 2); - $xfer += $output->writeI32($this->platform); - $xfer += $output->writeFieldEnd(); - } - if ($this->version !== null) { - $xfer += $output->writeFieldBegin('version', TType::I16, 3); - $xfer += $output->writeI16($this->version); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TimParam { - static $_TSPEC; - - /** - * 服务器时间 - * - * @var string - */ - public $timestamp = null; - /** - * 版本 - * - * @var int - */ - public $version = null; - /** - * 语言 - * - * @var string - */ - public $lang = null; - /** - * 附加信息 - * - * @var \TimNode[] - */ - public $extraList = null; - /** - * @var array - */ - public $extraMap = null; - /** - * 消息合流 - * - * @var string - */ - public $interflow = null; - /** - * tls - * - * @var string - */ - public $tls = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'timestamp', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'version', - 'type' => TType::I16, - ), - 3 => array( - 'var' => 'lang', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'extraList', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\TimNode', - ), - ), - 5 => array( - 'var' => 'extraMap', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - 6 => array( - 'var' => 'interflow', - 'type' => TType::STRING, - ), - 7 => array( - 'var' => 'tls', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['timestamp'])) { - $this->timestamp = $vals['timestamp']; - } - if (isset($vals['version'])) { - $this->version = $vals['version']; - } - if (isset($vals['lang'])) { - $this->lang = $vals['lang']; - } - if (isset($vals['extraList'])) { - $this->extraList = $vals['extraList']; - } - if (isset($vals['extraMap'])) { - $this->extraMap = $vals['extraMap']; - } - if (isset($vals['interflow'])) { - $this->interflow = $vals['interflow']; - } - if (isset($vals['tls'])) { - $this->tls = $vals['tls']; - } - } - } - - public function getName() { - return 'TimParam'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->timestamp); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->version); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->lang); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::LST) { - $this->extraList = array(); - $_size16 = 0; - $_etype19 = 0; - $xfer += $input->readListBegin($_etype19, $_size16); - for ($_i20 = 0; $_i20 < $_size16; ++$_i20) - { - $elem21 = null; - $elem21 = new \TimNode(); - $xfer += $elem21->read($input); - $this->extraList []= $elem21; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::MAP) { - $this->extraMap = array(); - $_size22 = 0; - $_ktype23 = 0; - $_vtype24 = 0; - $xfer += $input->readMapBegin($_ktype23, $_vtype24, $_size22); - for ($_i26 = 0; $_i26 < $_size22; ++$_i26) - { - $key27 = ''; - $val28 = ''; - $xfer += $input->readString($key27); - $xfer += $input->readString($val28); - $this->extraMap[$key27] = $val28; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->interflow); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tls); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('TimParam'); - if ($this->timestamp !== null) { - $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 1); - $xfer += $output->writeString($this->timestamp); - $xfer += $output->writeFieldEnd(); - } - if ($this->version !== null) { - $xfer += $output->writeFieldBegin('version', TType::I16, 2); - $xfer += $output->writeI16($this->version); - $xfer += $output->writeFieldEnd(); - } - if ($this->lang !== null) { - $xfer += $output->writeFieldBegin('lang', TType::STRING, 3); - $xfer += $output->writeString($this->lang); - $xfer += $output->writeFieldEnd(); - } - if ($this->extraList !== null) { - if (!is_array($this->extraList)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraList', TType::LST, 4); - { - $output->writeListBegin(TType::STRUCT, count($this->extraList)); - { - foreach ($this->extraList as $iter29) - { - $xfer += $iter29->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->extraMap !== null) { - if (!is_array($this->extraMap)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 5); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); - { - foreach ($this->extraMap as $kiter30 => $viter31) - { - $xfer += $output->writeString($kiter30); - $xfer += $output->writeString($viter31); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->interflow !== null) { - $xfer += $output->writeFieldBegin('interflow', TType::STRING, 6); - $xfer += $output->writeString($this->interflow); - $xfer += $output->writeFieldEnd(); - } - if ($this->tls !== null) { - $xfer += $output->writeFieldBegin('tls', TType::STRING, 7); - $xfer += $output->writeString($this->tls); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TimTime { - static $_TSPEC; - - /** - * 时间戳 (毫秒) - * - * @var string - */ - public $timestamp = null; - /** - * 格式化时间 - * - * @var string - */ - public $formattime = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'timestamp', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'formattime', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['timestamp'])) { - $this->timestamp = $vals['timestamp']; - } - if (isset($vals['formattime'])) { - $this->formattime = $vals['formattime']; - } - } - } - - public function getName() { - return 'TimTime'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->timestamp); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->formattime); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('TimTime'); - if ($this->timestamp !== null) { - $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 1); - $xfer += $output->writeString($this->timestamp); - $xfer += $output->writeFieldEnd(); - } - if ($this->formattime !== null) { - $xfer += $output->writeFieldBegin('formattime', TType::STRING, 2); - $xfer += $output->writeString($this->formattime); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TimArea { - static $_TSPEC; - - /** - * 国家 - * - * @var string - */ - public $country = null; - /** - * 省 - * - * @var string - */ - public $province = null; - /** - * 市 - * - * @var string - */ - public $city = null; - /** - * 附加信息:如区,镇,乡等 - * - * @var \TimNode[] - */ - public $extraList = null; - /** - * @var array - */ - public $extraMap = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'country', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'province', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'city', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'extraList', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\TimNode', - ), - ), - 5 => array( - 'var' => 'extraMap', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['country'])) { - $this->country = $vals['country']; - } - if (isset($vals['province'])) { - $this->province = $vals['province']; - } - if (isset($vals['city'])) { - $this->city = $vals['city']; - } - if (isset($vals['extraList'])) { - $this->extraList = $vals['extraList']; - } - if (isset($vals['extraMap'])) { - $this->extraMap = $vals['extraMap']; - } - } - } - - public function getName() { - return 'TimArea'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->country); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->province); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->city); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::LST) { - $this->extraList = array(); - $_size32 = 0; - $_etype35 = 0; - $xfer += $input->readListBegin($_etype35, $_size32); - for ($_i36 = 0; $_i36 < $_size32; ++$_i36) - { - $elem37 = null; - $elem37 = new \TimNode(); - $xfer += $elem37->read($input); - $this->extraList []= $elem37; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::MAP) { - $this->extraMap = array(); - $_size38 = 0; - $_ktype39 = 0; - $_vtype40 = 0; - $xfer += $input->readMapBegin($_ktype39, $_vtype40, $_size38); - for ($_i42 = 0; $_i42 < $_size38; ++$_i42) - { - $key43 = ''; - $val44 = ''; - $xfer += $input->readString($key43); - $xfer += $input->readString($val44); - $this->extraMap[$key43] = $val44; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('TimArea'); - if ($this->country !== null) { - $xfer += $output->writeFieldBegin('country', TType::STRING, 1); - $xfer += $output->writeString($this->country); - $xfer += $output->writeFieldEnd(); - } - if ($this->province !== null) { - $xfer += $output->writeFieldBegin('province', TType::STRING, 2); - $xfer += $output->writeString($this->province); - $xfer += $output->writeFieldEnd(); - } - if ($this->city !== null) { - $xfer += $output->writeFieldBegin('city', TType::STRING, 3); - $xfer += $output->writeString($this->city); - $xfer += $output->writeFieldEnd(); - } - if ($this->extraList !== null) { - if (!is_array($this->extraList)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraList', TType::LST, 4); - { - $output->writeListBegin(TType::STRUCT, count($this->extraList)); - { - foreach ($this->extraList as $iter45) - { - $xfer += $iter45->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->extraMap !== null) { - if (!is_array($this->extraMap)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 5); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); - { - foreach ($this->extraMap as $kiter46 => $viter47) - { - $xfer += $output->writeString($kiter46); - $xfer += $output->writeString($viter47); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class Tid { - static $_TSPEC; - - /** - * 登陆名 用户登录号,房间号等 - * - * @var string - */ - public $name = null; - /** - * 域名 用于区分渠道等 appid,appsecret - * - * @var string - */ - public $domain = null; - /** - * 系统 自行约定 如 : 1IOS,2android,3H5,4WEB 等 - * - * @var string - */ - public $resource = null; - /** - * normal,group - * - * @var string - */ - public $type = null; - /** - * 附加信息:如传递客户端信息 iphone6,xiaomi,huawei等 - * - * @var \TimNode[] - */ - public $extraList = null; - /** - * @var array - */ - public $extraMap = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'name', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'domain', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'resource', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'type', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'extraList', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\TimNode', - ), - ), - 6 => array( - 'var' => 'extraMap', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; - } - if (isset($vals['domain'])) { - $this->domain = $vals['domain']; - } - if (isset($vals['resource'])) { - $this->resource = $vals['resource']; - } - if (isset($vals['type'])) { - $this->type = $vals['type']; - } - if (isset($vals['extraList'])) { - $this->extraList = $vals['extraList']; - } - if (isset($vals['extraMap'])) { - $this->extraMap = $vals['extraMap']; - } - } - } - - public function getName() { - return 'Tid'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->domain); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->resource); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->type); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::LST) { - $this->extraList = array(); - $_size48 = 0; - $_etype51 = 0; - $xfer += $input->readListBegin($_etype51, $_size48); - for ($_i52 = 0; $_i52 < $_size48; ++$_i52) - { - $elem53 = null; - $elem53 = new \TimNode(); - $xfer += $elem53->read($input); - $this->extraList []= $elem53; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::MAP) { - $this->extraMap = array(); - $_size54 = 0; - $_ktype55 = 0; - $_vtype56 = 0; - $xfer += $input->readMapBegin($_ktype55, $_vtype56, $_size54); - for ($_i58 = 0; $_i58 < $_size54; ++$_i58) - { - $key59 = ''; - $val60 = ''; - $xfer += $input->readString($key59); - $xfer += $input->readString($val60); - $this->extraMap[$key59] = $val60; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('Tid'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); - $xfer += $output->writeFieldEnd(); - } - if ($this->domain !== null) { - $xfer += $output->writeFieldBegin('domain', TType::STRING, 2); - $xfer += $output->writeString($this->domain); - $xfer += $output->writeFieldEnd(); - } - if ($this->resource !== null) { - $xfer += $output->writeFieldBegin('resource', TType::STRING, 3); - $xfer += $output->writeString($this->resource); - $xfer += $output->writeFieldEnd(); - } - if ($this->type !== null) { - $xfer += $output->writeFieldBegin('type', TType::STRING, 4); - $xfer += $output->writeString($this->type); - $xfer += $output->writeFieldEnd(); - } - if ($this->extraList !== null) { - if (!is_array($this->extraList)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraList', TType::LST, 5); - { - $output->writeListBegin(TType::STRUCT, count($this->extraList)); - { - foreach ($this->extraList as $iter61) - { - $xfer += $iter61->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->extraMap !== null) { - if (!is_array($this->extraMap)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 6); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); - { - foreach ($this->extraMap as $kiter62 => $viter63) - { - $xfer += $output->writeString($kiter62); - $xfer += $output->writeString($viter63); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TimUserBean { - static $_TSPEC; - - /** - * 用户bean - * - * @var \Tid - */ - public $tid = null; - /** - * 昵称 - * - * @var string - */ - public $nickname = null; - /** - * 备注名称 - * - * @var string - */ - public $remarkname = null; - /** - * 生日 2000-01-01 - * - * @var string - */ - public $brithday = null; - /** - * 性别 自行约定 如 : 0不知,1男,2女 - * - * @var int - */ - public $gender = null; - /** - * 头像地址 http://xxx.jpg - * - * @var string - */ - public $headurl = null; - /** - * 地区 - * - * @var \TimArea - */ - public $area = null; - /** - * 头像 - * - * @var string - */ - public $headbyte = null; - /** - * 其他图片 - * - * @var string[] - */ - public $photoBytes = null; - /** - * 扩展字段 - * - * @var \TimNode[] - */ - public $extraList = null; - /** - * @var array - */ - public $extraMap = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'tid', - 'type' => TType::STRUCT, - 'class' => '\Tid', - ), - 2 => array( - 'var' => 'nickname', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'remarkname', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'brithday', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'gender', - 'type' => TType::I16, - ), - 6 => array( - 'var' => 'headurl', - 'type' => TType::STRING, - ), - 7 => array( - 'var' => 'area', - 'type' => TType::STRUCT, - 'class' => '\TimArea', - ), - 8 => array( - 'var' => 'headbyte', - 'type' => TType::STRING, - ), - 9 => array( - 'var' => 'photoBytes', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 10 => array( - 'var' => 'extraList', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\TimNode', - ), - ), - 11 => array( - 'var' => 'extraMap', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['tid'])) { - $this->tid = $vals['tid']; - } - if (isset($vals['nickname'])) { - $this->nickname = $vals['nickname']; - } - if (isset($vals['remarkname'])) { - $this->remarkname = $vals['remarkname']; - } - if (isset($vals['brithday'])) { - $this->brithday = $vals['brithday']; - } - if (isset($vals['gender'])) { - $this->gender = $vals['gender']; - } - if (isset($vals['headurl'])) { - $this->headurl = $vals['headurl']; - } - if (isset($vals['area'])) { - $this->area = $vals['area']; - } - if (isset($vals['headbyte'])) { - $this->headbyte = $vals['headbyte']; - } - if (isset($vals['photoBytes'])) { - $this->photoBytes = $vals['photoBytes']; - } - if (isset($vals['extraList'])) { - $this->extraList = $vals['extraList']; - } - if (isset($vals['extraMap'])) { - $this->extraMap = $vals['extraMap']; - } - } - } - - public function getName() { - return 'TimUserBean'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->tid = new \Tid(); - $xfer += $this->tid->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->nickname); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->remarkname); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->brithday); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->gender); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->headurl); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::STRUCT) { - $this->area = new \TimArea(); - $xfer += $this->area->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 8: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->headbyte); - } else { - $xfer += $input->skip($ftype); - } - break; - case 9: - if ($ftype == TType::LST) { - $this->photoBytes = array(); - $_size64 = 0; - $_etype67 = 0; - $xfer += $input->readListBegin($_etype67, $_size64); - for ($_i68 = 0; $_i68 < $_size64; ++$_i68) - { - $elem69 = null; - $xfer += $input->readString($elem69); - $this->photoBytes []= $elem69; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 10: - if ($ftype == TType::LST) { - $this->extraList = array(); - $_size70 = 0; - $_etype73 = 0; - $xfer += $input->readListBegin($_etype73, $_size70); - for ($_i74 = 0; $_i74 < $_size70; ++$_i74) - { - $elem75 = null; - $elem75 = new \TimNode(); - $xfer += $elem75->read($input); - $this->extraList []= $elem75; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 11: - if ($ftype == TType::MAP) { - $this->extraMap = array(); - $_size76 = 0; - $_ktype77 = 0; - $_vtype78 = 0; - $xfer += $input->readMapBegin($_ktype77, $_vtype78, $_size76); - for ($_i80 = 0; $_i80 < $_size76; ++$_i80) - { - $key81 = ''; - $val82 = ''; - $xfer += $input->readString($key81); - $xfer += $input->readString($val82); - $this->extraMap[$key81] = $val82; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('TimUserBean'); - if ($this->tid !== null) { - if (!is_object($this->tid)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('tid', TType::STRUCT, 1); - $xfer += $this->tid->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->nickname !== null) { - $xfer += $output->writeFieldBegin('nickname', TType::STRING, 2); - $xfer += $output->writeString($this->nickname); - $xfer += $output->writeFieldEnd(); - } - if ($this->remarkname !== null) { - $xfer += $output->writeFieldBegin('remarkname', TType::STRING, 3); - $xfer += $output->writeString($this->remarkname); - $xfer += $output->writeFieldEnd(); - } - if ($this->brithday !== null) { - $xfer += $output->writeFieldBegin('brithday', TType::STRING, 4); - $xfer += $output->writeString($this->brithday); - $xfer += $output->writeFieldEnd(); - } - if ($this->gender !== null) { - $xfer += $output->writeFieldBegin('gender', TType::I16, 5); - $xfer += $output->writeI16($this->gender); - $xfer += $output->writeFieldEnd(); - } - if ($this->headurl !== null) { - $xfer += $output->writeFieldBegin('headurl', TType::STRING, 6); - $xfer += $output->writeString($this->headurl); - $xfer += $output->writeFieldEnd(); - } - if ($this->area !== null) { - if (!is_object($this->area)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('area', TType::STRUCT, 7); - $xfer += $this->area->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->headbyte !== null) { - $xfer += $output->writeFieldBegin('headbyte', TType::STRING, 8); - $xfer += $output->writeString($this->headbyte); - $xfer += $output->writeFieldEnd(); - } - if ($this->photoBytes !== null) { - if (!is_array($this->photoBytes)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('photoBytes', TType::LST, 9); - { - $output->writeListBegin(TType::STRING, count($this->photoBytes)); - { - foreach ($this->photoBytes as $iter83) - { - $xfer += $output->writeString($iter83); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->extraList !== null) { - if (!is_array($this->extraList)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraList', TType::LST, 10); - { - $output->writeListBegin(TType::STRUCT, count($this->extraList)); - { - foreach ($this->extraList as $iter84) - { - $xfer += $iter84->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->extraMap !== null) { - if (!is_array($this->extraMap)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 11); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); - { - foreach ($this->extraMap as $kiter85 => $viter86) - { - $xfer += $output->writeString($kiter85); - $xfer += $output->writeString($viter86); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TimRoom { - static $_TSPEC; - - /** - * 房间Tid - * - * @var \Tid - */ - public $tid = null; - /** - * 创建人Tid - * - * @var \Tid - */ - public $founderTid = null; - /** - * 主持人Tid - * - * @var \Tid[] - */ - public $HostsTid = null; - /** - * memberTid - * - * @var \Tid[] - */ - public $membersTid = null; - /** - * 头像地址 http://xxx.jpg - * - * @var string - */ - public $headurl = null; - /** - * 房间名称 - * - * @var string - */ - public $roomName = null; - /** - * 房间说明 - * - * @var string - */ - public $desc = null; - /** - * 房间创建时间 - * - * @var \TimTime - */ - public $createTime = null; - /** - * 扩展字段 - * - * @var \TimNode[] - */ - public $extraList = null; - /** - * @var array - */ - public $extraMap = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'tid', - 'type' => TType::STRUCT, - 'class' => '\Tid', - ), - 2 => array( - 'var' => 'founderTid', - 'type' => TType::STRUCT, - 'class' => '\Tid', - ), - 3 => array( - 'var' => 'HostsTid', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\Tid', - ), - ), - 4 => array( - 'var' => 'membersTid', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\Tid', - ), - ), - 5 => array( - 'var' => 'headurl', - 'type' => TType::STRING, - ), - 6 => array( - 'var' => 'roomName', - 'type' => TType::STRING, - ), - 7 => array( - 'var' => 'desc', - 'type' => TType::STRING, - ), - 8 => array( - 'var' => 'createTime', - 'type' => TType::STRUCT, - 'class' => '\TimTime', - ), - 9 => array( - 'var' => 'extraList', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\TimNode', - ), - ), - 10 => array( - 'var' => 'extraMap', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['tid'])) { - $this->tid = $vals['tid']; - } - if (isset($vals['founderTid'])) { - $this->founderTid = $vals['founderTid']; - } - if (isset($vals['HostsTid'])) { - $this->HostsTid = $vals['HostsTid']; - } - if (isset($vals['membersTid'])) { - $this->membersTid = $vals['membersTid']; - } - if (isset($vals['headurl'])) { - $this->headurl = $vals['headurl']; - } - if (isset($vals['roomName'])) { - $this->roomName = $vals['roomName']; - } - if (isset($vals['desc'])) { - $this->desc = $vals['desc']; - } - if (isset($vals['createTime'])) { - $this->createTime = $vals['createTime']; - } - if (isset($vals['extraList'])) { - $this->extraList = $vals['extraList']; - } - if (isset($vals['extraMap'])) { - $this->extraMap = $vals['extraMap']; - } - } - } - - public function getName() { - return 'TimRoom'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->tid = new \Tid(); - $xfer += $this->tid->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->founderTid = new \Tid(); - $xfer += $this->founderTid->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::LST) { - $this->HostsTid = array(); - $_size87 = 0; - $_etype90 = 0; - $xfer += $input->readListBegin($_etype90, $_size87); - for ($_i91 = 0; $_i91 < $_size87; ++$_i91) - { - $elem92 = null; - $elem92 = new \Tid(); - $xfer += $elem92->read($input); - $this->HostsTid []= $elem92; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::LST) { - $this->membersTid = array(); - $_size93 = 0; - $_etype96 = 0; - $xfer += $input->readListBegin($_etype96, $_size93); - for ($_i97 = 0; $_i97 < $_size93; ++$_i97) - { - $elem98 = null; - $elem98 = new \Tid(); - $xfer += $elem98->read($input); - $this->membersTid []= $elem98; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->headurl); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->roomName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->desc); - } else { - $xfer += $input->skip($ftype); - } - break; - case 8: - if ($ftype == TType::STRUCT) { - $this->createTime = new \TimTime(); - $xfer += $this->createTime->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 9: - if ($ftype == TType::LST) { - $this->extraList = array(); - $_size99 = 0; - $_etype102 = 0; - $xfer += $input->readListBegin($_etype102, $_size99); - for ($_i103 = 0; $_i103 < $_size99; ++$_i103) - { - $elem104 = null; - $elem104 = new \TimNode(); - $xfer += $elem104->read($input); - $this->extraList []= $elem104; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 10: - if ($ftype == TType::MAP) { - $this->extraMap = array(); - $_size105 = 0; - $_ktype106 = 0; - $_vtype107 = 0; - $xfer += $input->readMapBegin($_ktype106, $_vtype107, $_size105); - for ($_i109 = 0; $_i109 < $_size105; ++$_i109) - { - $key110 = ''; - $val111 = ''; - $xfer += $input->readString($key110); - $xfer += $input->readString($val111); - $this->extraMap[$key110] = $val111; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('TimRoom'); - if ($this->tid !== null) { - if (!is_object($this->tid)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('tid', TType::STRUCT, 1); - $xfer += $this->tid->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->founderTid !== null) { - if (!is_object($this->founderTid)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('founderTid', TType::STRUCT, 2); - $xfer += $this->founderTid->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->HostsTid !== null) { - if (!is_array($this->HostsTid)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('HostsTid', TType::LST, 3); - { - $output->writeListBegin(TType::STRUCT, count($this->HostsTid)); - { - foreach ($this->HostsTid as $iter112) - { - $xfer += $iter112->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->membersTid !== null) { - if (!is_array($this->membersTid)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('membersTid', TType::LST, 4); - { - $output->writeListBegin(TType::STRUCT, count($this->membersTid)); - { - foreach ($this->membersTid as $iter113) - { - $xfer += $iter113->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->headurl !== null) { - $xfer += $output->writeFieldBegin('headurl', TType::STRING, 5); - $xfer += $output->writeString($this->headurl); - $xfer += $output->writeFieldEnd(); - } - if ($this->roomName !== null) { - $xfer += $output->writeFieldBegin('roomName', TType::STRING, 6); - $xfer += $output->writeString($this->roomName); - $xfer += $output->writeFieldEnd(); - } - if ($this->desc !== null) { - $xfer += $output->writeFieldBegin('desc', TType::STRING, 7); - $xfer += $output->writeString($this->desc); - $xfer += $output->writeFieldEnd(); - } - if ($this->createTime !== null) { - if (!is_object($this->createTime)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('createTime', TType::STRUCT, 8); - $xfer += $this->createTime->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->extraList !== null) { - if (!is_array($this->extraList)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraList', TType::LST, 9); - { - $output->writeListBegin(TType::STRUCT, count($this->extraList)); - { - foreach ($this->extraList as $iter114) - { - $xfer += $iter114->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->extraMap !== null) { - if (!is_array($this->extraMap)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 10); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); - { - foreach ($this->extraMap as $kiter115 => $viter116) - { - $xfer += $output->writeString($kiter115); - $xfer += $output->writeString($viter116); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TimPBean { - static $_TSPEC; - - /** - * 标识 - * - * @var string - */ - public $threadId = null; - /** - * @var \Tid - */ - public $fromTid = null; - /** - * @var \Tid - */ - public $toTid = null; - /** - * subscribe:订阅其他用户的状态 probe:请求获取其他用户的状态 unavailable:不可用,离线(offline)状态 - * - * @var string - */ - public $status = null; - /** - * normal:类似于email,主要特点是不要求响应; - * chat:类似于qq里的好友即时聊天,主要特点是实时通讯; - * groupchat:类似于聊天室里的群聊; - * headline:用于发送alert和notification; - * error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; - * - * @var string - */ - public $type = null; - /** - * 优先权 0 。高优先级的resource能接受发送到bare JID的消息,低优先级的resource不能 - * - * @var int - */ - public $priority = null; - /** - * chat:聊天中 away:暂时离开 xa:eXtend Away,长时间离开 dnd:勿打扰 online:在线 offline:离线 - * - * @var string - */ - public $show = null; - /** - * 成员Tid 群聊时信息发送者Tid - * - * @var \Tid - */ - public $leaguerTid = null; - /** - * 扩展字段 - * - * @var \TimNode[] - */ - public $extraList = null; - /** - * 错误码 - * - * @var \TimError - */ - public $error = null; - /** - * @var array - */ - public $extraMap = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'threadId', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'fromTid', - 'type' => TType::STRUCT, - 'class' => '\Tid', - ), - 3 => array( - 'var' => 'toTid', - 'type' => TType::STRUCT, - 'class' => '\Tid', - ), - 4 => array( - 'var' => 'status', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'type', - 'type' => TType::STRING, - ), - 6 => array( - 'var' => 'priority', - 'type' => TType::I32, - ), - 7 => array( - 'var' => 'show', - 'type' => TType::STRING, - ), - 8 => array( - 'var' => 'leaguerTid', - 'type' => TType::STRUCT, - 'class' => '\Tid', - ), - 9 => array( - 'var' => 'extraList', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\TimNode', - ), - ), - 10 => array( - 'var' => 'error', - 'type' => TType::STRUCT, - 'class' => '\TimError', - ), - 11 => array( - 'var' => 'extraMap', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['threadId'])) { - $this->threadId = $vals['threadId']; - } - if (isset($vals['fromTid'])) { - $this->fromTid = $vals['fromTid']; - } - if (isset($vals['toTid'])) { - $this->toTid = $vals['toTid']; - } - if (isset($vals['status'])) { - $this->status = $vals['status']; - } - if (isset($vals['type'])) { - $this->type = $vals['type']; - } - if (isset($vals['priority'])) { - $this->priority = $vals['priority']; - } - if (isset($vals['show'])) { - $this->show = $vals['show']; - } - if (isset($vals['leaguerTid'])) { - $this->leaguerTid = $vals['leaguerTid']; - } - if (isset($vals['extraList'])) { - $this->extraList = $vals['extraList']; - } - if (isset($vals['error'])) { - $this->error = $vals['error']; - } - if (isset($vals['extraMap'])) { - $this->extraMap = $vals['extraMap']; - } - } - } - - public function getName() { - return 'TimPBean'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->threadId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->fromTid = new \Tid(); - $xfer += $this->fromTid->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->toTid = new \Tid(); - $xfer += $this->toTid->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->status); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->type); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->priority); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->show); - } else { - $xfer += $input->skip($ftype); - } - break; - case 8: - if ($ftype == TType::STRUCT) { - $this->leaguerTid = new \Tid(); - $xfer += $this->leaguerTid->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 9: - if ($ftype == TType::LST) { - $this->extraList = array(); - $_size117 = 0; - $_etype120 = 0; - $xfer += $input->readListBegin($_etype120, $_size117); - for ($_i121 = 0; $_i121 < $_size117; ++$_i121) - { - $elem122 = null; - $elem122 = new \TimNode(); - $xfer += $elem122->read($input); - $this->extraList []= $elem122; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 10: - if ($ftype == TType::STRUCT) { - $this->error = new \TimError(); - $xfer += $this->error->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 11: - if ($ftype == TType::MAP) { - $this->extraMap = array(); - $_size123 = 0; - $_ktype124 = 0; - $_vtype125 = 0; - $xfer += $input->readMapBegin($_ktype124, $_vtype125, $_size123); - for ($_i127 = 0; $_i127 < $_size123; ++$_i127) - { - $key128 = ''; - $val129 = ''; - $xfer += $input->readString($key128); - $xfer += $input->readString($val129); - $this->extraMap[$key128] = $val129; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('TimPBean'); - if ($this->threadId !== null) { - $xfer += $output->writeFieldBegin('threadId', TType::STRING, 1); - $xfer += $output->writeString($this->threadId); - $xfer += $output->writeFieldEnd(); - } - if ($this->fromTid !== null) { - if (!is_object($this->fromTid)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('fromTid', TType::STRUCT, 2); - $xfer += $this->fromTid->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->toTid !== null) { - if (!is_object($this->toTid)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('toTid', TType::STRUCT, 3); - $xfer += $this->toTid->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->status !== null) { - $xfer += $output->writeFieldBegin('status', TType::STRING, 4); - $xfer += $output->writeString($this->status); - $xfer += $output->writeFieldEnd(); - } - if ($this->type !== null) { - $xfer += $output->writeFieldBegin('type', TType::STRING, 5); - $xfer += $output->writeString($this->type); - $xfer += $output->writeFieldEnd(); - } - if ($this->priority !== null) { - $xfer += $output->writeFieldBegin('priority', TType::I32, 6); - $xfer += $output->writeI32($this->priority); - $xfer += $output->writeFieldEnd(); - } - if ($this->show !== null) { - $xfer += $output->writeFieldBegin('show', TType::STRING, 7); - $xfer += $output->writeString($this->show); - $xfer += $output->writeFieldEnd(); - } - if ($this->leaguerTid !== null) { - if (!is_object($this->leaguerTid)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('leaguerTid', TType::STRUCT, 8); - $xfer += $this->leaguerTid->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->extraList !== null) { - if (!is_array($this->extraList)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraList', TType::LST, 9); - { - $output->writeListBegin(TType::STRUCT, count($this->extraList)); - { - foreach ($this->extraList as $iter130) - { - $xfer += $iter130->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->error !== null) { - if (!is_object($this->error)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('error', TType::STRUCT, 10); - $xfer += $this->error->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->extraMap !== null) { - if (!is_array($this->extraMap)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 11); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); - { - foreach ($this->extraMap as $kiter131 => $viter132) - { - $xfer += $output->writeString($kiter131); - $xfer += $output->writeString($viter132); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TimMBean { - static $_TSPEC; - - /** - * 线程id - * - * @var string - */ - public $threadId = null; - /** - * 消息id号 - * - * @var string - */ - public $mid = null; - /** - * 来源Tid - * - * @var \Tid - */ - public $fromTid = null; - /** - * 目标Tid - * - * @var \Tid - */ - public $toTid = null; - /** - * 信息内容 - * - * @var string - */ - public $body = null; - /** - * normal:类似于email,主要特点是不要求响应; - * chat:类似于qq里的好友即时聊天,主要特点是实时通讯; - * groupchat:类似于聊天室里的群聊; - * headline:用于发送alert和notification; - * error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; - * - * @var string - */ - public $type = null; - /** - * 消息类型 1 文字 2 图片 3 语音 4视频 5混合 - * - * @var int - */ - public $msgType = null; - /** - * 是否离线信息 - * - * @var \TimTime - */ - public $offline = null; - /** - * 成员Tid 群聊时信息发送者Tid - * - * @var \Tid - */ - public $leaguerTid = null; - /** - * 扩展字段 - * - * @var \TimNode[] - */ - public $extraList = null; - /** - * 服务器发送信息时间戳(毫秒) - * - * @var string - */ - public $timestamp = null; - /** - * 错误码 - * - * @var \TimError - */ - public $error = null; - /** - * @var array - */ - public $extraMap = null; - /** - * 0未读 1已读 - * - * @var int - */ - public $readstatus = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'threadId', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'mid', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'fromTid', - 'type' => TType::STRUCT, - 'class' => '\Tid', - ), - 4 => array( - 'var' => 'toTid', - 'type' => TType::STRUCT, - 'class' => '\Tid', - ), - 5 => array( - 'var' => 'body', - 'type' => TType::STRING, - ), - 6 => array( - 'var' => 'type', - 'type' => TType::STRING, - ), - 7 => array( - 'var' => 'msgType', - 'type' => TType::I16, - ), - 8 => array( - 'var' => 'offline', - 'type' => TType::STRUCT, - 'class' => '\TimTime', - ), - 9 => array( - 'var' => 'leaguerTid', - 'type' => TType::STRUCT, - 'class' => '\Tid', - ), - 10 => array( - 'var' => 'extraList', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\TimNode', - ), - ), - 11 => array( - 'var' => 'timestamp', - 'type' => TType::STRING, - ), - 12 => array( - 'var' => 'error', - 'type' => TType::STRUCT, - 'class' => '\TimError', - ), - 13 => array( - 'var' => 'extraMap', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - 14 => array( - 'var' => 'readstatus', - 'type' => TType::I16, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['threadId'])) { - $this->threadId = $vals['threadId']; - } - if (isset($vals['mid'])) { - $this->mid = $vals['mid']; - } - if (isset($vals['fromTid'])) { - $this->fromTid = $vals['fromTid']; - } - if (isset($vals['toTid'])) { - $this->toTid = $vals['toTid']; - } - if (isset($vals['body'])) { - $this->body = $vals['body']; - } - if (isset($vals['type'])) { - $this->type = $vals['type']; - } - if (isset($vals['msgType'])) { - $this->msgType = $vals['msgType']; - } - if (isset($vals['offline'])) { - $this->offline = $vals['offline']; - } - if (isset($vals['leaguerTid'])) { - $this->leaguerTid = $vals['leaguerTid']; - } - if (isset($vals['extraList'])) { - $this->extraList = $vals['extraList']; - } - if (isset($vals['timestamp'])) { - $this->timestamp = $vals['timestamp']; - } - if (isset($vals['error'])) { - $this->error = $vals['error']; - } - if (isset($vals['extraMap'])) { - $this->extraMap = $vals['extraMap']; - } - if (isset($vals['readstatus'])) { - $this->readstatus = $vals['readstatus']; - } - } - } - - public function getName() { - return 'TimMBean'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->threadId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->mid); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->fromTid = new \Tid(); - $xfer += $this->fromTid->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRUCT) { - $this->toTid = new \Tid(); - $xfer += $this->toTid->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->body); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->type); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->msgType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 8: - if ($ftype == TType::STRUCT) { - $this->offline = new \TimTime(); - $xfer += $this->offline->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 9: - if ($ftype == TType::STRUCT) { - $this->leaguerTid = new \Tid(); - $xfer += $this->leaguerTid->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 10: - if ($ftype == TType::LST) { - $this->extraList = array(); - $_size133 = 0; - $_etype136 = 0; - $xfer += $input->readListBegin($_etype136, $_size133); - for ($_i137 = 0; $_i137 < $_size133; ++$_i137) - { - $elem138 = null; - $elem138 = new \TimNode(); - $xfer += $elem138->read($input); - $this->extraList []= $elem138; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 11: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->timestamp); - } else { - $xfer += $input->skip($ftype); - } - break; - case 12: - if ($ftype == TType::STRUCT) { - $this->error = new \TimError(); - $xfer += $this->error->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 13: - if ($ftype == TType::MAP) { - $this->extraMap = array(); - $_size139 = 0; - $_ktype140 = 0; - $_vtype141 = 0; - $xfer += $input->readMapBegin($_ktype140, $_vtype141, $_size139); - for ($_i143 = 0; $_i143 < $_size139; ++$_i143) - { - $key144 = ''; - $val145 = ''; - $xfer += $input->readString($key144); - $xfer += $input->readString($val145); - $this->extraMap[$key144] = $val145; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 14: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->readstatus); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('TimMBean'); - if ($this->threadId !== null) { - $xfer += $output->writeFieldBegin('threadId', TType::STRING, 1); - $xfer += $output->writeString($this->threadId); - $xfer += $output->writeFieldEnd(); - } - if ($this->mid !== null) { - $xfer += $output->writeFieldBegin('mid', TType::STRING, 2); - $xfer += $output->writeString($this->mid); - $xfer += $output->writeFieldEnd(); - } - if ($this->fromTid !== null) { - if (!is_object($this->fromTid)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('fromTid', TType::STRUCT, 3); - $xfer += $this->fromTid->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->toTid !== null) { - if (!is_object($this->toTid)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('toTid', TType::STRUCT, 4); - $xfer += $this->toTid->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->body !== null) { - $xfer += $output->writeFieldBegin('body', TType::STRING, 5); - $xfer += $output->writeString($this->body); - $xfer += $output->writeFieldEnd(); - } - if ($this->type !== null) { - $xfer += $output->writeFieldBegin('type', TType::STRING, 6); - $xfer += $output->writeString($this->type); - $xfer += $output->writeFieldEnd(); - } - if ($this->msgType !== null) { - $xfer += $output->writeFieldBegin('msgType', TType::I16, 7); - $xfer += $output->writeI16($this->msgType); - $xfer += $output->writeFieldEnd(); - } - if ($this->offline !== null) { - if (!is_object($this->offline)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('offline', TType::STRUCT, 8); - $xfer += $this->offline->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->leaguerTid !== null) { - if (!is_object($this->leaguerTid)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('leaguerTid', TType::STRUCT, 9); - $xfer += $this->leaguerTid->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->extraList !== null) { - if (!is_array($this->extraList)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraList', TType::LST, 10); - { - $output->writeListBegin(TType::STRUCT, count($this->extraList)); - { - foreach ($this->extraList as $iter146) - { - $xfer += $iter146->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->timestamp !== null) { - $xfer += $output->writeFieldBegin('timestamp', TType::STRING, 11); - $xfer += $output->writeString($this->timestamp); - $xfer += $output->writeFieldEnd(); - } - if ($this->error !== null) { - if (!is_object($this->error)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('error', TType::STRUCT, 12); - $xfer += $this->error->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->extraMap !== null) { - if (!is_array($this->extraMap)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 13); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); - { - foreach ($this->extraMap as $kiter147 => $viter148) - { - $xfer += $output->writeString($kiter147); - $xfer += $output->writeString($viter148); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->readstatus !== null) { - $xfer += $output->writeFieldBegin('readstatus', TType::I16, 14); - $xfer += $output->writeI16($this->readstatus); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TimIqBean { - static $_TSPEC; - - /** - * 线程id - * - * @var string - */ - public $threadId = null; - /** - * @var \Tid - */ - public $fromTid = null; - /** - * @var \Tid - */ - public $toTid = null; - /** - * Get :获取当前域值。类似于http get方法 - * Set :设置或替换get查询的值。类似于http put方法。 - * Result :说明成功的响应了先前的查询。类似于http状态码200。 - * Error: 查询和响应中出现的错误。 - * - * @var string - */ - public $type = null; - /** - * 扩展字段 - * - * @var \TimNode[] - */ - public $extraList = null; - /** - * 错误码 - * - * @var \TimError - */ - public $error = null; - /** - * @var array - */ - public $extraMap = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'threadId', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'fromTid', - 'type' => TType::STRUCT, - 'class' => '\Tid', - ), - 3 => array( - 'var' => 'toTid', - 'type' => TType::STRUCT, - 'class' => '\Tid', - ), - 4 => array( - 'var' => 'type', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'extraList', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\TimNode', - ), - ), - 6 => array( - 'var' => 'error', - 'type' => TType::STRUCT, - 'class' => '\TimError', - ), - 7 => array( - 'var' => 'extraMap', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['threadId'])) { - $this->threadId = $vals['threadId']; - } - if (isset($vals['fromTid'])) { - $this->fromTid = $vals['fromTid']; - } - if (isset($vals['toTid'])) { - $this->toTid = $vals['toTid']; - } - if (isset($vals['type'])) { - $this->type = $vals['type']; - } - if (isset($vals['extraList'])) { - $this->extraList = $vals['extraList']; - } - if (isset($vals['error'])) { - $this->error = $vals['error']; - } - if (isset($vals['extraMap'])) { - $this->extraMap = $vals['extraMap']; - } - } - } - - public function getName() { - return 'TimIqBean'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->threadId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->fromTid = new \Tid(); - $xfer += $this->fromTid->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->toTid = new \Tid(); - $xfer += $this->toTid->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->type); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::LST) { - $this->extraList = array(); - $_size149 = 0; - $_etype152 = 0; - $xfer += $input->readListBegin($_etype152, $_size149); - for ($_i153 = 0; $_i153 < $_size149; ++$_i153) - { - $elem154 = null; - $elem154 = new \TimNode(); - $xfer += $elem154->read($input); - $this->extraList []= $elem154; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::STRUCT) { - $this->error = new \TimError(); - $xfer += $this->error->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::MAP) { - $this->extraMap = array(); - $_size155 = 0; - $_ktype156 = 0; - $_vtype157 = 0; - $xfer += $input->readMapBegin($_ktype156, $_vtype157, $_size155); - for ($_i159 = 0; $_i159 < $_size155; ++$_i159) - { - $key160 = ''; - $val161 = ''; - $xfer += $input->readString($key160); - $xfer += $input->readString($val161); - $this->extraMap[$key160] = $val161; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('TimIqBean'); - if ($this->threadId !== null) { - $xfer += $output->writeFieldBegin('threadId', TType::STRING, 1); - $xfer += $output->writeString($this->threadId); - $xfer += $output->writeFieldEnd(); - } - if ($this->fromTid !== null) { - if (!is_object($this->fromTid)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('fromTid', TType::STRUCT, 2); - $xfer += $this->fromTid->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->toTid !== null) { - if (!is_object($this->toTid)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('toTid', TType::STRUCT, 3); - $xfer += $this->toTid->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->type !== null) { - $xfer += $output->writeFieldBegin('type', TType::STRING, 4); - $xfer += $output->writeString($this->type); - $xfer += $output->writeFieldEnd(); - } - if ($this->extraList !== null) { - if (!is_array($this->extraList)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraList', TType::LST, 5); - { - $output->writeListBegin(TType::STRUCT, count($this->extraList)); - { - foreach ($this->extraList as $iter162) - { - $xfer += $iter162->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->error !== null) { - if (!is_object($this->error)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('error', TType::STRUCT, 6); - $xfer += $this->error->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->extraMap !== null) { - if (!is_array($this->extraMap)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 7); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); - { - foreach ($this->extraMap as $kiter163 => $viter164) - { - $xfer += $output->writeString($kiter163); - $xfer += $output->writeString($viter164); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TimRoster { - static $_TSPEC; - - /** - * none表示用户和contact之前没有任何的关系(虽然在server的buddy list中存在) - * to表示用户能看到contact的presence,但是contact看不到用户的Presence - * from和to的含义相反,指用户看不到contact的presence,但是contact可以看到 - * both表示相关之间都能看到对方的presence - * - * @var string - */ - public $subscription = null; - /** - * @var \Tid - */ - public $tid = null; - /** - * 用户名 - * - * @var string - */ - public $name = null; - /** - * @var array - */ - public $extraMap = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'subscription', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tid', - 'type' => TType::STRUCT, - 'class' => '\Tid', - ), - 3 => array( - 'var' => 'name', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'extraMap', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['subscription'])) { - $this->subscription = $vals['subscription']; - } - if (isset($vals['tid'])) { - $this->tid = $vals['tid']; - } - if (isset($vals['name'])) { - $this->name = $vals['name']; - } - if (isset($vals['extraMap'])) { - $this->extraMap = $vals['extraMap']; - } - } - } - - public function getName() { - return 'TimRoster'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->subscription); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->tid = new \Tid(); - $xfer += $this->tid->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::MAP) { - $this->extraMap = array(); - $_size165 = 0; - $_ktype166 = 0; - $_vtype167 = 0; - $xfer += $input->readMapBegin($_ktype166, $_vtype167, $_size165); - for ($_i169 = 0; $_i169 < $_size165; ++$_i169) - { - $key170 = ''; - $val171 = ''; - $xfer += $input->readString($key170); - $xfer += $input->readString($val171); - $this->extraMap[$key170] = $val171; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('TimRoster'); - if ($this->subscription !== null) { - $xfer += $output->writeFieldBegin('subscription', TType::STRING, 1); - $xfer += $output->writeString($this->subscription); - $xfer += $output->writeFieldEnd(); - } - if ($this->tid !== null) { - if (!is_object($this->tid)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('tid', TType::STRUCT, 2); - $xfer += $this->tid->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 3); - $xfer += $output->writeString($this->name); - $xfer += $output->writeFieldEnd(); - } - if ($this->extraMap !== null) { - if (!is_array($this->extraMap)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 4); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); - { - foreach ($this->extraMap as $kiter172 => $viter173) - { - $xfer += $output->writeString($kiter172); - $xfer += $output->writeString($viter173); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TimRemoteUserBean { - static $_TSPEC; - - /** - * 错误码 - * - * @var \TimError - */ - public $error = null; - /** - * 远程用户信息 - * - * @var \TimUserBean - */ - public $ub = null; - /** - * @var array - */ - public $extraMap = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'error', - 'type' => TType::STRUCT, - 'class' => '\TimError', - ), - 2 => array( - 'var' => 'ub', - 'type' => TType::STRUCT, - 'class' => '\TimUserBean', - ), - 3 => array( - 'var' => 'extraMap', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['error'])) { - $this->error = $vals['error']; - } - if (isset($vals['ub'])) { - $this->ub = $vals['ub']; - } - if (isset($vals['extraMap'])) { - $this->extraMap = $vals['extraMap']; - } - } - } - - public function getName() { - return 'TimRemoteUserBean'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->error = new \TimError(); - $xfer += $this->error->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->ub = new \TimUserBean(); - $xfer += $this->ub->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::MAP) { - $this->extraMap = array(); - $_size174 = 0; - $_ktype175 = 0; - $_vtype176 = 0; - $xfer += $input->readMapBegin($_ktype175, $_vtype176, $_size174); - for ($_i178 = 0; $_i178 < $_size174; ++$_i178) - { - $key179 = ''; - $val180 = ''; - $xfer += $input->readString($key179); - $xfer += $input->readString($val180); - $this->extraMap[$key179] = $val180; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('TimRemoteUserBean'); - if ($this->error !== null) { - if (!is_object($this->error)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('error', TType::STRUCT, 1); - $xfer += $this->error->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->ub !== null) { - if (!is_object($this->ub)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('ub', TType::STRUCT, 2); - $xfer += $this->ub->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->extraMap !== null) { - if (!is_array($this->extraMap)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 3); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); - { - foreach ($this->extraMap as $kiter181 => $viter182) - { - $xfer += $output->writeString($kiter181); - $xfer += $output->writeString($viter182); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TimRemoteRoom { - static $_TSPEC; - - /** - * 错误码 - * - * @var \TimError - */ - public $error = null; - /** - * 远程房间信息 - * - * @var \TimRoom - */ - public $room = null; - /** - * @var array - */ - public $extraMap = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'error', - 'type' => TType::STRUCT, - 'class' => '\TimError', - ), - 2 => array( - 'var' => 'room', - 'type' => TType::STRUCT, - 'class' => '\TimRoom', - ), - 3 => array( - 'var' => 'extraMap', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['error'])) { - $this->error = $vals['error']; - } - if (isset($vals['room'])) { - $this->room = $vals['room']; - } - if (isset($vals['extraMap'])) { - $this->extraMap = $vals['extraMap']; - } - } - } - - public function getName() { - return 'TimRemoteRoom'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->error = new \TimError(); - $xfer += $this->error->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->room = new \TimRoom(); - $xfer += $this->room->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::MAP) { - $this->extraMap = array(); - $_size183 = 0; - $_ktype184 = 0; - $_vtype185 = 0; - $xfer += $input->readMapBegin($_ktype184, $_vtype185, $_size183); - for ($_i187 = 0; $_i187 < $_size183; ++$_i187) - { - $key188 = ''; - $val189 = ''; - $xfer += $input->readString($key188); - $xfer += $input->readString($val189); - $this->extraMap[$key188] = $val189; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('TimRemoteRoom'); - if ($this->error !== null) { - if (!is_object($this->error)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('error', TType::STRUCT, 1); - $xfer += $this->error->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->room !== null) { - if (!is_object($this->room)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('room', TType::STRUCT, 2); - $xfer += $this->room->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->extraMap !== null) { - if (!is_array($this->extraMap)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 3); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); - { - foreach ($this->extraMap as $kiter190 => $viter191) - { - $xfer += $output->writeString($kiter190); - $xfer += $output->writeString($viter191); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TimResponseBean { - static $_TSPEC; - - /** - * @var string - */ - public $threadId = null; - /** - * 错误码 - * - * @var \TimError - */ - public $error = null; - /** - * 附加信息 - * - * @var \TimNode[] - */ - public $extraList = null; - /** - * @var array - */ - public $extraMap = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'threadId', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'error', - 'type' => TType::STRUCT, - 'class' => '\TimError', - ), - 3 => array( - 'var' => 'extraList', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\TimNode', - ), - ), - 4 => array( - 'var' => 'extraMap', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['threadId'])) { - $this->threadId = $vals['threadId']; - } - if (isset($vals['error'])) { - $this->error = $vals['error']; - } - if (isset($vals['extraList'])) { - $this->extraList = $vals['extraList']; - } - if (isset($vals['extraMap'])) { - $this->extraMap = $vals['extraMap']; - } - } - } - - public function getName() { - return 'TimResponseBean'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->threadId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->error = new \TimError(); - $xfer += $this->error->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::LST) { - $this->extraList = array(); - $_size192 = 0; - $_etype195 = 0; - $xfer += $input->readListBegin($_etype195, $_size192); - for ($_i196 = 0; $_i196 < $_size192; ++$_i196) - { - $elem197 = null; - $elem197 = new \TimNode(); - $xfer += $elem197->read($input); - $this->extraList []= $elem197; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::MAP) { - $this->extraMap = array(); - $_size198 = 0; - $_ktype199 = 0; - $_vtype200 = 0; - $xfer += $input->readMapBegin($_ktype199, $_vtype200, $_size198); - for ($_i202 = 0; $_i202 < $_size198; ++$_i202) - { - $key203 = ''; - $val204 = ''; - $xfer += $input->readString($key203); - $xfer += $input->readString($val204); - $this->extraMap[$key203] = $val204; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('TimResponseBean'); - if ($this->threadId !== null) { - $xfer += $output->writeFieldBegin('threadId', TType::STRING, 1); - $xfer += $output->writeString($this->threadId); - $xfer += $output->writeFieldEnd(); - } - if ($this->error !== null) { - if (!is_object($this->error)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('error', TType::STRUCT, 2); - $xfer += $this->error->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->extraList !== null) { - if (!is_array($this->extraList)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraList', TType::LST, 3); - { - $output->writeListBegin(TType::STRUCT, count($this->extraList)); - { - foreach ($this->extraList as $iter205) - { - $xfer += $iter205->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->extraMap !== null) { - if (!is_array($this->extraMap)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 4); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); - { - foreach ($this->extraMap as $kiter206 => $viter207) - { - $xfer += $output->writeString($kiter206); - $xfer += $output->writeString($viter207); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TimSock5Bean { - static $_TSPEC; - - /** - * @var \Tid - */ - public $fromTid = null; - /** - * @var \Tid - */ - public $toTid = null; - /** - * ip地址 - * - * @var string - */ - public $addr = null; - /** - * 端口 - * - * @var int - */ - public $port = null; - /** - * 传输类型 1:tcp 2:udp - * - * @var int - */ - public $transport = null; - /** - * 发布id 通过发布id 可以连接两个发布id相同的用户 - * - * @var string - */ - public $pubId = null; - /** - * @var array - */ - public $extraMap = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'fromTid', - 'type' => TType::STRUCT, - 'class' => '\Tid', - ), - 2 => array( - 'var' => 'toTid', - 'type' => TType::STRUCT, - 'class' => '\Tid', - ), - 3 => array( - 'var' => 'addr', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'port', - 'type' => TType::I32, - ), - 5 => array( - 'var' => 'transport', - 'type' => TType::I16, - ), - 6 => array( - 'var' => 'pubId', - 'type' => TType::STRING, - ), - 7 => array( - 'var' => 'extraMap', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['fromTid'])) { - $this->fromTid = $vals['fromTid']; - } - if (isset($vals['toTid'])) { - $this->toTid = $vals['toTid']; - } - if (isset($vals['addr'])) { - $this->addr = $vals['addr']; - } - if (isset($vals['port'])) { - $this->port = $vals['port']; - } - if (isset($vals['transport'])) { - $this->transport = $vals['transport']; - } - if (isset($vals['pubId'])) { - $this->pubId = $vals['pubId']; - } - if (isset($vals['extraMap'])) { - $this->extraMap = $vals['extraMap']; - } - } - } - - public function getName() { - return 'TimSock5Bean'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->fromTid = new \Tid(); - $xfer += $this->fromTid->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->toTid = new \Tid(); - $xfer += $this->toTid->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->addr); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->port); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->transport); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->pubId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::MAP) { - $this->extraMap = array(); - $_size208 = 0; - $_ktype209 = 0; - $_vtype210 = 0; - $xfer += $input->readMapBegin($_ktype209, $_vtype210, $_size208); - for ($_i212 = 0; $_i212 < $_size208; ++$_i212) - { - $key213 = ''; - $val214 = ''; - $xfer += $input->readString($key213); - $xfer += $input->readString($val214); - $this->extraMap[$key213] = $val214; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('TimSock5Bean'); - if ($this->fromTid !== null) { - if (!is_object($this->fromTid)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('fromTid', TType::STRUCT, 1); - $xfer += $this->fromTid->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->toTid !== null) { - if (!is_object($this->toTid)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('toTid', TType::STRUCT, 2); - $xfer += $this->toTid->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->addr !== null) { - $xfer += $output->writeFieldBegin('addr', TType::STRING, 3); - $xfer += $output->writeString($this->addr); - $xfer += $output->writeFieldEnd(); - } - if ($this->port !== null) { - $xfer += $output->writeFieldBegin('port', TType::I32, 4); - $xfer += $output->writeI32($this->port); - $xfer += $output->writeFieldEnd(); - } - if ($this->transport !== null) { - $xfer += $output->writeFieldBegin('transport', TType::I16, 5); - $xfer += $output->writeI16($this->transport); - $xfer += $output->writeFieldEnd(); - } - if ($this->pubId !== null) { - $xfer += $output->writeFieldBegin('pubId', TType::STRING, 6); - $xfer += $output->writeString($this->pubId); - $xfer += $output->writeFieldEnd(); - } - if ($this->extraMap !== null) { - if (!is_array($this->extraMap)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 7); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); - { - foreach ($this->extraMap as $kiter215 => $viter216) - { - $xfer += $output->writeString($kiter215); - $xfer += $output->writeString($viter216); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TimSock5Bytes { - static $_TSPEC; - - /** - * 发布id - * - * @var string - */ - public $pubId = null; - /** - * 序号数据块 - * - * @var int - */ - public $index = null; - /** - * 数据块 - * - * @var string[] - */ - public $bytes = null; - /** - * @var array - */ - public $extraMap = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'pubId', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'index', - 'type' => TType::I32, - ), - 3 => array( - 'var' => 'bytes', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 4 => array( - 'var' => 'extraMap', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['pubId'])) { - $this->pubId = $vals['pubId']; - } - if (isset($vals['index'])) { - $this->index = $vals['index']; - } - if (isset($vals['bytes'])) { - $this->bytes = $vals['bytes']; - } - if (isset($vals['extraMap'])) { - $this->extraMap = $vals['extraMap']; - } - } - } - - public function getName() { - return 'TimSock5Bytes'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->pubId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->index); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::LST) { - $this->bytes = array(); - $_size217 = 0; - $_etype220 = 0; - $xfer += $input->readListBegin($_etype220, $_size217); - for ($_i221 = 0; $_i221 < $_size217; ++$_i221) - { - $elem222 = null; - $xfer += $input->readString($elem222); - $this->bytes []= $elem222; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::MAP) { - $this->extraMap = array(); - $_size223 = 0; - $_ktype224 = 0; - $_vtype225 = 0; - $xfer += $input->readMapBegin($_ktype224, $_vtype225, $_size223); - for ($_i227 = 0; $_i227 < $_size223; ++$_i227) - { - $key228 = ''; - $val229 = ''; - $xfer += $input->readString($key228); - $xfer += $input->readString($val229); - $this->extraMap[$key228] = $val229; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('TimSock5Bytes'); - if ($this->pubId !== null) { - $xfer += $output->writeFieldBegin('pubId', TType::STRING, 1); - $xfer += $output->writeString($this->pubId); - $xfer += $output->writeFieldEnd(); - } - if ($this->index !== null) { - $xfer += $output->writeFieldBegin('index', TType::I32, 2); - $xfer += $output->writeI32($this->index); - $xfer += $output->writeFieldEnd(); - } - if ($this->bytes !== null) { - if (!is_array($this->bytes)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('bytes', TType::LST, 3); - { - $output->writeListBegin(TType::STRING, count($this->bytes)); - { - foreach ($this->bytes as $iter230) - { - $xfer += $output->writeString($iter230); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->extraMap !== null) { - if (!is_array($this->extraMap)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 4); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); - { - foreach ($this->extraMap as $kiter231 => $viter232) - { - $xfer += $output->writeString($kiter231); - $xfer += $output->writeString($viter232); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TimPage { - static $_TSPEC; - - /** - * 时间上 - * - * @var string - */ - public $fromTimeStamp = null; - /** - * 时间下 - * - * @var string - */ - public $toTimeStamp = null; - /** - * 条数 - * - * @var int - */ - public $limitCount = null; - /** - * @var array - */ - public $extraMap = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'fromTimeStamp', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'toTimeStamp', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'limitCount', - 'type' => TType::I32, - ), - 4 => array( - 'var' => 'extraMap', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['fromTimeStamp'])) { - $this->fromTimeStamp = $vals['fromTimeStamp']; - } - if (isset($vals['toTimeStamp'])) { - $this->toTimeStamp = $vals['toTimeStamp']; - } - if (isset($vals['limitCount'])) { - $this->limitCount = $vals['limitCount']; - } - if (isset($vals['extraMap'])) { - $this->extraMap = $vals['extraMap']; - } - } - } - - public function getName() { - return 'TimPage'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->fromTimeStamp); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->toTimeStamp); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->limitCount); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::MAP) { - $this->extraMap = array(); - $_size233 = 0; - $_ktype234 = 0; - $_vtype235 = 0; - $xfer += $input->readMapBegin($_ktype234, $_vtype235, $_size233); - for ($_i237 = 0; $_i237 < $_size233; ++$_i237) - { - $key238 = ''; - $val239 = ''; - $xfer += $input->readString($key238); - $xfer += $input->readString($val239); - $this->extraMap[$key238] = $val239; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('TimPage'); - if ($this->fromTimeStamp !== null) { - $xfer += $output->writeFieldBegin('fromTimeStamp', TType::STRING, 1); - $xfer += $output->writeString($this->fromTimeStamp); - $xfer += $output->writeFieldEnd(); - } - if ($this->toTimeStamp !== null) { - $xfer += $output->writeFieldBegin('toTimeStamp', TType::STRING, 2); - $xfer += $output->writeString($this->toTimeStamp); - $xfer += $output->writeFieldEnd(); - } - if ($this->limitCount !== null) { - $xfer += $output->writeFieldBegin('limitCount', TType::I32, 3); - $xfer += $output->writeI32($this->limitCount); - $xfer += $output->writeFieldEnd(); - } - if ($this->extraMap !== null) { - if (!is_array($this->extraMap)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 4); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); - { - foreach ($this->extraMap as $kiter240 => $viter241) - { - $xfer += $output->writeString($kiter240); - $xfer += $output->writeString($viter241); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TimMessageIq { - static $_TSPEC; - - /** - * tid集合 - * - * @var string[] - */ - public $tidlist = null; - /** - * 分页 - * - * @var \TimPage - */ - public $timPage = null; - /** - * mid集合 - * - * @var string[] - */ - public $midlist = null; - /** - * @var array - */ - public $extraMap = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'tidlist', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 2 => array( - 'var' => 'timPage', - 'type' => TType::STRUCT, - 'class' => '\TimPage', - ), - 3 => array( - 'var' => 'midlist', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 4 => array( - 'var' => 'extraMap', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['tidlist'])) { - $this->tidlist = $vals['tidlist']; - } - if (isset($vals['timPage'])) { - $this->timPage = $vals['timPage']; - } - if (isset($vals['midlist'])) { - $this->midlist = $vals['midlist']; - } - if (isset($vals['extraMap'])) { - $this->extraMap = $vals['extraMap']; - } - } - } - - public function getName() { - return 'TimMessageIq'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::LST) { - $this->tidlist = array(); - $_size242 = 0; - $_etype245 = 0; - $xfer += $input->readListBegin($_etype245, $_size242); - for ($_i246 = 0; $_i246 < $_size242; ++$_i246) - { - $elem247 = null; - $xfer += $input->readString($elem247); - $this->tidlist []= $elem247; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->timPage = new \TimPage(); - $xfer += $this->timPage->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::LST) { - $this->midlist = array(); - $_size248 = 0; - $_etype251 = 0; - $xfer += $input->readListBegin($_etype251, $_size248); - for ($_i252 = 0; $_i252 < $_size248; ++$_i252) - { - $elem253 = null; - $xfer += $input->readString($elem253); - $this->midlist []= $elem253; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::MAP) { - $this->extraMap = array(); - $_size254 = 0; - $_ktype255 = 0; - $_vtype256 = 0; - $xfer += $input->readMapBegin($_ktype255, $_vtype256, $_size254); - for ($_i258 = 0; $_i258 < $_size254; ++$_i258) - { - $key259 = ''; - $val260 = ''; - $xfer += $input->readString($key259); - $xfer += $input->readString($val260); - $this->extraMap[$key259] = $val260; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('TimMessageIq'); - if ($this->tidlist !== null) { - if (!is_array($this->tidlist)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('tidlist', TType::LST, 1); - { - $output->writeListBegin(TType::STRING, count($this->tidlist)); - { - foreach ($this->tidlist as $iter261) - { - $xfer += $output->writeString($iter261); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->timPage !== null) { - if (!is_object($this->timPage)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('timPage', TType::STRUCT, 2); - $xfer += $this->timPage->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->midlist !== null) { - if (!is_array($this->midlist)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('midlist', TType::LST, 3); - { - $output->writeListBegin(TType::STRING, count($this->midlist)); - { - foreach ($this->midlist as $iter262) - { - $xfer += $output->writeString($iter262); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->extraMap !== null) { - if (!is_array($this->extraMap)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 4); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); - { - foreach ($this->extraMap as $kiter263 => $viter264) - { - $xfer += $output->writeString($kiter263); - $xfer += $output->writeString($viter264); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TimAuth { - static $_TSPEC; - - /** - * 域名 - * - * @var string - */ - public $domain = null; - /** - * 用户名 - * - * @var string - */ - public $username = null; - /** - * 密码 - * - * @var string - */ - public $pwd = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'domain', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'username', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'pwd', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['domain'])) { - $this->domain = $vals['domain']; - } - if (isset($vals['username'])) { - $this->username = $vals['username']; - } - if (isset($vals['pwd'])) { - $this->pwd = $vals['pwd']; - } - } - } - - public function getName() { - return 'TimAuth'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->domain); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->username); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->pwd); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('TimAuth'); - if ($this->domain !== null) { - $xfer += $output->writeFieldBegin('domain', TType::STRING, 1); - $xfer += $output->writeString($this->domain); - $xfer += $output->writeFieldEnd(); - } - if ($this->username !== null) { - $xfer += $output->writeFieldBegin('username', TType::STRING, 2); - $xfer += $output->writeString($this->username); - $xfer += $output->writeFieldEnd(); - } - if ($this->pwd !== null) { - $xfer += $output->writeFieldBegin('pwd', TType::STRING, 3); - $xfer += $output->writeString($this->pwd); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TimMBeanList { - static $_TSPEC; - - /** - * @var string - */ - public $threadId = null; - /** - * 信息列表 - * - * @var \TimMBean[] - */ - public $timMBeanList = null; - /** - * 类型 - * - * @var string - */ - public $reqType = null; - /** - * @var array - */ - public $extraMap = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'threadId', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'timMBeanList', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\TimMBean', - ), - ), - 3 => array( - 'var' => 'reqType', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'extraMap', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['threadId'])) { - $this->threadId = $vals['threadId']; - } - if (isset($vals['timMBeanList'])) { - $this->timMBeanList = $vals['timMBeanList']; - } - if (isset($vals['reqType'])) { - $this->reqType = $vals['reqType']; - } - if (isset($vals['extraMap'])) { - $this->extraMap = $vals['extraMap']; - } - } - } - - public function getName() { - return 'TimMBeanList'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->threadId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::LST) { - $this->timMBeanList = array(); - $_size265 = 0; - $_etype268 = 0; - $xfer += $input->readListBegin($_etype268, $_size265); - for ($_i269 = 0; $_i269 < $_size265; ++$_i269) - { - $elem270 = null; - $elem270 = new \TimMBean(); - $xfer += $elem270->read($input); - $this->timMBeanList []= $elem270; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->reqType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::MAP) { - $this->extraMap = array(); - $_size271 = 0; - $_ktype272 = 0; - $_vtype273 = 0; - $xfer += $input->readMapBegin($_ktype272, $_vtype273, $_size271); - for ($_i275 = 0; $_i275 < $_size271; ++$_i275) - { - $key276 = ''; - $val277 = ''; - $xfer += $input->readString($key276); - $xfer += $input->readString($val277); - $this->extraMap[$key276] = $val277; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('TimMBeanList'); - if ($this->threadId !== null) { - $xfer += $output->writeFieldBegin('threadId', TType::STRING, 1); - $xfer += $output->writeString($this->threadId); - $xfer += $output->writeFieldEnd(); - } - if ($this->timMBeanList !== null) { - if (!is_array($this->timMBeanList)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('timMBeanList', TType::LST, 2); - { - $output->writeListBegin(TType::STRUCT, count($this->timMBeanList)); - { - foreach ($this->timMBeanList as $iter278) - { - $xfer += $iter278->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->reqType !== null) { - $xfer += $output->writeFieldBegin('reqType', TType::STRING, 3); - $xfer += $output->writeString($this->reqType); - $xfer += $output->writeFieldEnd(); - } - if ($this->extraMap !== null) { - if (!is_array($this->extraMap)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 4); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); - { - foreach ($this->extraMap as $kiter279 => $viter280) - { - $xfer += $output->writeString($kiter279); - $xfer += $output->writeString($viter280); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TimPBeanList { - static $_TSPEC; - - /** - * @var string - */ - public $threadId = null; - /** - * 状态信息列表 - * - * @var \TimPBean[] - */ - public $timPBeanList = null; - /** - * 类型 - * - * @var string - */ - public $reqType = null; - /** - * @var array - */ - public $extraMap = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'threadId', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'timPBeanList', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => '\TimPBean', - ), - ), - 3 => array( - 'var' => 'reqType', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'extraMap', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['threadId'])) { - $this->threadId = $vals['threadId']; - } - if (isset($vals['timPBeanList'])) { - $this->timPBeanList = $vals['timPBeanList']; - } - if (isset($vals['reqType'])) { - $this->reqType = $vals['reqType']; - } - if (isset($vals['extraMap'])) { - $this->extraMap = $vals['extraMap']; - } - } - } - - public function getName() { - return 'TimPBeanList'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->threadId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::LST) { - $this->timPBeanList = array(); - $_size281 = 0; - $_etype284 = 0; - $xfer += $input->readListBegin($_etype284, $_size281); - for ($_i285 = 0; $_i285 < $_size281; ++$_i285) - { - $elem286 = null; - $elem286 = new \TimPBean(); - $xfer += $elem286->read($input); - $this->timPBeanList []= $elem286; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->reqType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::MAP) { - $this->extraMap = array(); - $_size287 = 0; - $_ktype288 = 0; - $_vtype289 = 0; - $xfer += $input->readMapBegin($_ktype288, $_vtype289, $_size287); - for ($_i291 = 0; $_i291 < $_size287; ++$_i291) - { - $key292 = ''; - $val293 = ''; - $xfer += $input->readString($key292); - $xfer += $input->readString($val293); - $this->extraMap[$key292] = $val293; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('TimPBeanList'); - if ($this->threadId !== null) { - $xfer += $output->writeFieldBegin('threadId', TType::STRING, 1); - $xfer += $output->writeString($this->threadId); - $xfer += $output->writeFieldEnd(); - } - if ($this->timPBeanList !== null) { - if (!is_array($this->timPBeanList)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('timPBeanList', TType::LST, 2); - { - $output->writeListBegin(TType::STRUCT, count($this->timPBeanList)); - { - foreach ($this->timPBeanList as $iter294) - { - $xfer += $iter294->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->reqType !== null) { - $xfer += $output->writeFieldBegin('reqType', TType::STRING, 3); - $xfer += $output->writeString($this->reqType); - $xfer += $output->writeFieldEnd(); - } - if ($this->extraMap !== null) { - if (!is_array($this->extraMap)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('extraMap', TType::MAP, 4); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->extraMap)); - { - foreach ($this->extraMap as $kiter295 => $viter296) - { - $xfer += $output->writeString($kiter295); - $xfer += $output->writeString($viter296); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class TimPropertyBean { - static $_TSPEC; - - /** - * @var string - */ - public $threadId = null; - /** - * 消息合流 - * - * @var string - */ - public $interflow = null; - /** - * tls - * - * @var string - */ - public $tls = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'threadId', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'interflow', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'tls', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['threadId'])) { - $this->threadId = $vals['threadId']; - } - if (isset($vals['interflow'])) { - $this->interflow = $vals['interflow']; - } - if (isset($vals['tls'])) { - $this->tls = $vals['tls']; - } - } - } - - public function getName() { - return 'TimPropertyBean'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->threadId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->interflow); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tls); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('TimPropertyBean'); - if ($this->threadId !== null) { - $xfer += $output->writeFieldBegin('threadId', TType::STRING, 1); - $xfer += $output->writeString($this->threadId); - $xfer += $output->writeFieldEnd(); - } - if ($this->interflow !== null) { - $xfer += $output->writeFieldBegin('interflow', TType::STRING, 2); - $xfer += $output->writeString($this->interflow); - $xfer += $output->writeFieldEnd(); - } - if ($this->tls !== null) { - $xfer += $output->writeFieldBegin('tls', TType::STRING, 3); - $xfer += $output->writeString($this->tls); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -final class Constant extends \Thrift\Type\TConstant { - static protected $protocolversion; - static protected $protocolversionName; - static protected $TIM_SC_SUCCESS; - static protected $TIM_SC_FAILED; - - static protected function init_protocolversion() { - return /** - * 内部版本号 - */ -4; - } - - static protected function init_protocolversionName() { - return /** - * 外部版本号 - */ -"1.1.0"; - } - - static protected function init_TIM_SC_SUCCESS() { - return /** - * 状态码:成功 - */ -"200"; - } - - static protected function init_TIM_SC_FAILED() { - return /** - * 状态码:失败 - */ -"400"; - } -} - - diff --git a/protocols/gen-py/tim/ITim-remote b/protocols/gen-py/tim/ITim-remote index 92ccf69..f6e5230 100644 --- a/protocols/gen-py/tim/ITim-remote +++ b/protocols/gen-py/tim/ITim-remote @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Autogenerated by Thrift Compiler (0.9.3) +# Autogenerated by Thrift Compiler (0.17.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @@ -9,247 +9,270 @@ import sys import pprint -from urlparse import urlparse -from thrift.transport import TTransport -from thrift.transport import TSocket -from thrift.transport import TSSLSocket -from thrift.transport import THttpClient -from thrift.protocol import TBinaryProtocol +if sys.version_info[0] > 2: + from urllib.parse import urlparse +else: + from urlparse import urlparse +from thrift.transport import TTransport, TSocket, TSSLSocket, THttpClient +from thrift.protocol.TBinaryProtocol import TBinaryProtocol from tim import ITim from tim.ttypes import * if len(sys.argv) <= 1 or sys.argv[1] == '--help': - print('') - print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] function [arg1 [arg2...]]') - print('') - print('Functions:') - print(' void timStream(TimParam param)') - print(' void timStarttls()') - print(' void timLogin(Tid tid, string pwd)') - print(' void timAck(TimAckBean ab)') - print(' void timPresence(TimPBean pbean)') - print(' void timMessage(TimMBean mbean)') - print(' void timPing(string threadId)') - print(' void timError(TimError e)') - print(' void timLogout()') - print(' void timRegist(Tid tid, string auth)') - print(' void timRoser(TimRoster roster)') - print(' void timMessageList(TimMBeanList mbeanList)') - print(' void timPresenceList(TimPBeanList pbeanList)') - print(' void timMessageIq(TimMessageIq timMsgIq, string iqType)') - print(' void timMessageResult(TimMBean mbean)') - print(' void timProperty(TimPropertyBean tpb)') - print(' TimRemoteUserBean timRemoteUserAuth(Tid tid, string pwd, TimAuth auth)') - print(' TimRemoteUserBean timRemoteUserGet(Tid tid, TimAuth auth)') - print(' TimRemoteUserBean timRemoteUserEdit(Tid tid, TimUserBean ub, TimAuth auth)') - print(' TimResponseBean timResponsePresence(TimPBean pbean, TimAuth auth)') - print(' TimResponseBean timResponseMessage(TimMBean mbean, TimAuth auth)') - print(' TimMBeanList timResponseMessageIq(TimMessageIq timMsgIq, string iqType, TimAuth auth)') - print(' TimResponseBean timResponsePresenceList(TimPBeanList pbeanList, TimAuth auth)') - print(' TimResponseBean timResponseMessageList(TimMBeanList mbeanList, TimAuth auth)') - print('') - sys.exit(0) - -pp = pprint.PrettyPrinter(indent = 2) + print('') + print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate] [-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]') + print('') + print('Functions:') + print(' void timStream(TimParam param)') + print(' void timStarttls()') + print(' void timLogin(Tid tid, string pwd)') + print(' void timAck(TimAckBean ab)') + print(' void timPresence(TimPBean pbean)') + print(' void timMessage(TimMBean mbean)') + print(' void timPing(string threadId)') + print(' void timError(TimError e)') + print(' void timLogout()') + print(' void timRegist(Tid tid, string auth)') + print(' void timRoser(TimRoster roster)') + print(' void timMessageList(TimMBeanList mbeanList)') + print(' void timPresenceList(TimPBeanList pbeanList)') + print(' void timMessageIq(TimMessageIq timMsgIq, string iqType)') + print(' void timMessageResult(TimMBean mbean)') + print(' void timProperty(TimPropertyBean tpb)') + print(' TimRemoteUserBean timRemoteUserAuth(Tid tid, string pwd, TimAuth auth)') + print(' TimRemoteUserBean timRemoteUserGet(Tid tid, TimAuth auth)') + print(' TimRemoteUserBean timRemoteUserEdit(Tid tid, TimUserBean ub, TimAuth auth)') + print(' TimResponseBean timResponsePresence(TimPBean pbean, TimAuth auth)') + print(' TimResponseBean timResponseMessage(TimMBean mbean, TimAuth auth)') + print(' TimMBeanList timResponseMessageIq(TimMessageIq timMsgIq, string iqType, TimAuth auth)') + print(' TimResponseBean timResponsePresenceList(TimPBeanList pbeanList, TimAuth auth)') + print(' TimResponseBean timResponseMessageList(TimMBeanList mbeanList, TimAuth auth)') + print('') + sys.exit(0) + +pp = pprint.PrettyPrinter(indent=2) host = 'localhost' port = 9090 uri = '' framed = False ssl = False +validate = True +ca_certs = None +keyfile = None +certfile = None http = False argi = 1 if sys.argv[argi] == '-h': - parts = sys.argv[argi+1].split(':') - host = parts[0] - if len(parts) > 1: - port = int(parts[1]) - argi += 2 + parts = sys.argv[argi + 1].split(':') + host = parts[0] + if len(parts) > 1: + port = int(parts[1]) + argi += 2 if sys.argv[argi] == '-u': - url = urlparse(sys.argv[argi+1]) - parts = url[1].split(':') - host = parts[0] - if len(parts) > 1: - port = int(parts[1]) - else: - port = 80 - uri = url[2] - if url[4]: - uri += '?%s' % url[4] - http = True - argi += 2 + url = urlparse(sys.argv[argi + 1]) + parts = url[1].split(':') + host = parts[0] + if len(parts) > 1: + port = int(parts[1]) + else: + port = 80 + uri = url[2] + if url[4]: + uri += '?%s' % url[4] + http = True + argi += 2 if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed': - framed = True - argi += 1 + framed = True + argi += 1 if sys.argv[argi] == '-s' or sys.argv[argi] == '-ssl': - ssl = True - argi += 1 + ssl = True + argi += 1 + +if sys.argv[argi] == '-novalidate': + validate = False + argi += 1 + +if sys.argv[argi] == '-ca_certs': + ca_certs = sys.argv[argi+1] + argi += 2 + +if sys.argv[argi] == '-keyfile': + keyfile = sys.argv[argi+1] + argi += 2 + +if sys.argv[argi] == '-certfile': + certfile = sys.argv[argi+1] + argi += 2 cmd = sys.argv[argi] -args = sys.argv[argi+1:] +args = sys.argv[argi + 1:] if http: - transport = THttpClient.THttpClient(host, port, uri) + transport = THttpClient.THttpClient(host, port, uri) else: - socket = TSSLSocket.TSSLSocket(host, port, validate=False) if ssl else TSocket.TSocket(host, port) - if framed: - transport = TTransport.TFramedTransport(socket) - else: - transport = TTransport.TBufferedTransport(socket) -protocol = TBinaryProtocol.TBinaryProtocol(transport) + if ssl: + socket = TSSLSocket.TSSLSocket(host, port, validate=validate, ca_certs=ca_certs, keyfile=keyfile, certfile=certfile) + else: + socket = TSocket.TSocket(host, port) + if framed: + transport = TTransport.TFramedTransport(socket) + else: + transport = TTransport.TBufferedTransport(socket) +protocol = TBinaryProtocol(transport) client = ITim.Client(protocol) transport.open() if cmd == 'timStream': - if len(args) != 1: - print('timStream requires 1 args') - sys.exit(1) - pp.pprint(client.timStream(eval(args[0]),)) + if len(args) != 1: + print('timStream requires 1 args') + sys.exit(1) + pp.pprint(client.timStream(eval(args[0]),)) elif cmd == 'timStarttls': - if len(args) != 0: - print('timStarttls requires 0 args') - sys.exit(1) - pp.pprint(client.timStarttls()) + if len(args) != 0: + print('timStarttls requires 0 args') + sys.exit(1) + pp.pprint(client.timStarttls()) elif cmd == 'timLogin': - if len(args) != 2: - print('timLogin requires 2 args') - sys.exit(1) - pp.pprint(client.timLogin(eval(args[0]),args[1],)) + if len(args) != 2: + print('timLogin requires 2 args') + sys.exit(1) + pp.pprint(client.timLogin(eval(args[0]), args[1],)) elif cmd == 'timAck': - if len(args) != 1: - print('timAck requires 1 args') - sys.exit(1) - pp.pprint(client.timAck(eval(args[0]),)) + if len(args) != 1: + print('timAck requires 1 args') + sys.exit(1) + pp.pprint(client.timAck(eval(args[0]),)) elif cmd == 'timPresence': - if len(args) != 1: - print('timPresence requires 1 args') - sys.exit(1) - pp.pprint(client.timPresence(eval(args[0]),)) + if len(args) != 1: + print('timPresence requires 1 args') + sys.exit(1) + pp.pprint(client.timPresence(eval(args[0]),)) elif cmd == 'timMessage': - if len(args) != 1: - print('timMessage requires 1 args') - sys.exit(1) - pp.pprint(client.timMessage(eval(args[0]),)) + if len(args) != 1: + print('timMessage requires 1 args') + sys.exit(1) + pp.pprint(client.timMessage(eval(args[0]),)) elif cmd == 'timPing': - if len(args) != 1: - print('timPing requires 1 args') - sys.exit(1) - pp.pprint(client.timPing(args[0],)) + if len(args) != 1: + print('timPing requires 1 args') + sys.exit(1) + pp.pprint(client.timPing(args[0],)) elif cmd == 'timError': - if len(args) != 1: - print('timError requires 1 args') - sys.exit(1) - pp.pprint(client.timError(eval(args[0]),)) + if len(args) != 1: + print('timError requires 1 args') + sys.exit(1) + pp.pprint(client.timError(eval(args[0]),)) elif cmd == 'timLogout': - if len(args) != 0: - print('timLogout requires 0 args') - sys.exit(1) - pp.pprint(client.timLogout()) + if len(args) != 0: + print('timLogout requires 0 args') + sys.exit(1) + pp.pprint(client.timLogout()) elif cmd == 'timRegist': - if len(args) != 2: - print('timRegist requires 2 args') - sys.exit(1) - pp.pprint(client.timRegist(eval(args[0]),args[1],)) + if len(args) != 2: + print('timRegist requires 2 args') + sys.exit(1) + pp.pprint(client.timRegist(eval(args[0]), args[1],)) elif cmd == 'timRoser': - if len(args) != 1: - print('timRoser requires 1 args') - sys.exit(1) - pp.pprint(client.timRoser(eval(args[0]),)) + if len(args) != 1: + print('timRoser requires 1 args') + sys.exit(1) + pp.pprint(client.timRoser(eval(args[0]),)) elif cmd == 'timMessageList': - if len(args) != 1: - print('timMessageList requires 1 args') - sys.exit(1) - pp.pprint(client.timMessageList(eval(args[0]),)) + if len(args) != 1: + print('timMessageList requires 1 args') + sys.exit(1) + pp.pprint(client.timMessageList(eval(args[0]),)) elif cmd == 'timPresenceList': - if len(args) != 1: - print('timPresenceList requires 1 args') - sys.exit(1) - pp.pprint(client.timPresenceList(eval(args[0]),)) + if len(args) != 1: + print('timPresenceList requires 1 args') + sys.exit(1) + pp.pprint(client.timPresenceList(eval(args[0]),)) elif cmd == 'timMessageIq': - if len(args) != 2: - print('timMessageIq requires 2 args') - sys.exit(1) - pp.pprint(client.timMessageIq(eval(args[0]),args[1],)) + if len(args) != 2: + print('timMessageIq requires 2 args') + sys.exit(1) + pp.pprint(client.timMessageIq(eval(args[0]), args[1],)) elif cmd == 'timMessageResult': - if len(args) != 1: - print('timMessageResult requires 1 args') - sys.exit(1) - pp.pprint(client.timMessageResult(eval(args[0]),)) + if len(args) != 1: + print('timMessageResult requires 1 args') + sys.exit(1) + pp.pprint(client.timMessageResult(eval(args[0]),)) elif cmd == 'timProperty': - if len(args) != 1: - print('timProperty requires 1 args') - sys.exit(1) - pp.pprint(client.timProperty(eval(args[0]),)) + if len(args) != 1: + print('timProperty requires 1 args') + sys.exit(1) + pp.pprint(client.timProperty(eval(args[0]),)) elif cmd == 'timRemoteUserAuth': - if len(args) != 3: - print('timRemoteUserAuth requires 3 args') - sys.exit(1) - pp.pprint(client.timRemoteUserAuth(eval(args[0]),args[1],eval(args[2]),)) + if len(args) != 3: + print('timRemoteUserAuth requires 3 args') + sys.exit(1) + pp.pprint(client.timRemoteUserAuth(eval(args[0]), args[1], eval(args[2]),)) elif cmd == 'timRemoteUserGet': - if len(args) != 2: - print('timRemoteUserGet requires 2 args') - sys.exit(1) - pp.pprint(client.timRemoteUserGet(eval(args[0]),eval(args[1]),)) + if len(args) != 2: + print('timRemoteUserGet requires 2 args') + sys.exit(1) + pp.pprint(client.timRemoteUserGet(eval(args[0]), eval(args[1]),)) elif cmd == 'timRemoteUserEdit': - if len(args) != 3: - print('timRemoteUserEdit requires 3 args') - sys.exit(1) - pp.pprint(client.timRemoteUserEdit(eval(args[0]),eval(args[1]),eval(args[2]),)) + if len(args) != 3: + print('timRemoteUserEdit requires 3 args') + sys.exit(1) + pp.pprint(client.timRemoteUserEdit(eval(args[0]), eval(args[1]), eval(args[2]),)) elif cmd == 'timResponsePresence': - if len(args) != 2: - print('timResponsePresence requires 2 args') - sys.exit(1) - pp.pprint(client.timResponsePresence(eval(args[0]),eval(args[1]),)) + if len(args) != 2: + print('timResponsePresence requires 2 args') + sys.exit(1) + pp.pprint(client.timResponsePresence(eval(args[0]), eval(args[1]),)) elif cmd == 'timResponseMessage': - if len(args) != 2: - print('timResponseMessage requires 2 args') - sys.exit(1) - pp.pprint(client.timResponseMessage(eval(args[0]),eval(args[1]),)) + if len(args) != 2: + print('timResponseMessage requires 2 args') + sys.exit(1) + pp.pprint(client.timResponseMessage(eval(args[0]), eval(args[1]),)) elif cmd == 'timResponseMessageIq': - if len(args) != 3: - print('timResponseMessageIq requires 3 args') - sys.exit(1) - pp.pprint(client.timResponseMessageIq(eval(args[0]),args[1],eval(args[2]),)) + if len(args) != 3: + print('timResponseMessageIq requires 3 args') + sys.exit(1) + pp.pprint(client.timResponseMessageIq(eval(args[0]), args[1], eval(args[2]),)) elif cmd == 'timResponsePresenceList': - if len(args) != 2: - print('timResponsePresenceList requires 2 args') - sys.exit(1) - pp.pprint(client.timResponsePresenceList(eval(args[0]),eval(args[1]),)) + if len(args) != 2: + print('timResponsePresenceList requires 2 args') + sys.exit(1) + pp.pprint(client.timResponsePresenceList(eval(args[0]), eval(args[1]),)) elif cmd == 'timResponseMessageList': - if len(args) != 2: - print('timResponseMessageList requires 2 args') - sys.exit(1) - pp.pprint(client.timResponseMessageList(eval(args[0]),eval(args[1]),)) + if len(args) != 2: + print('timResponseMessageList requires 2 args') + sys.exit(1) + pp.pprint(client.timResponseMessageList(eval(args[0]), eval(args[1]),)) else: - print('Unrecognized method %s' % cmd) - sys.exit(1) + print('Unrecognized method %s' % cmd) + sys.exit(1) transport.close() diff --git a/protocols/gen-py/tim/ITim.py b/protocols/gen-py/tim/ITim.py index 6203273..d499c6b 100644 --- a/protocols/gen-py/tim/ITim.py +++ b/protocols/gen-py/tim/ITim.py @@ -1,3438 +1,3415 @@ # -# Autogenerated by Thrift Compiler (0.9.3) +# Autogenerated by Thrift Compiler (0.17.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # -from thrift.Thrift import TType, TMessageType, TException, TApplicationException +from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException +from thrift.protocol.TProtocol import TProtocolException +from thrift.TRecursive import fix_spec + +import sys import logging -from ttypes import * +from .ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol, TProtocol -try: - from thrift.protocol import fastbinary -except: - fastbinary = None +all_structs = [] -class Iface: - def timStream(self, param): - """ - 流程开始 +class Iface(object): + def timStream(self, param): + """ + 流程开始 - Parameters: - - param - """ - pass + Parameters: + - param - def timStarttls(self): - """ - tls协议 - """ - pass + """ + pass - def timLogin(self, tid, pwd): - """ - 登陆协议 + def timStarttls(self): + """ + tls协议 - Parameters: - - tid - - pwd - """ - pass + """ + pass - def timAck(self, ab): - """ - 回执信息 + def timLogin(self, tid, pwd): + """ + 登陆协议 - Parameters: - - ab - """ - pass + Parameters: + - tid + - pwd - def timPresence(self, pbean): - """ - 广播出席协议或接收广播协议 + """ + pass - Parameters: - - pbean - """ - pass + def timAck(self, ab): + """ + 回执信息 - def timMessage(self, mbean): - """ - 发送信息或接收信息 + Parameters: + - ab - Parameters: - - mbean - """ - pass + """ + pass - def timPing(self, threadId): - """ - ping 心跳协议 + def timPresence(self, pbean): + """ + 广播出席协议或接收广播协议 - Parameters: - - threadId - """ - pass + Parameters: + - pbean - def timError(self, e): - """ - 错误通知 + """ + pass - Parameters: - - e - """ - pass + def timMessage(self, mbean): + """ + 发送信息或接收信息 - def timLogout(self): - """ - 登出协议 - """ - pass + Parameters: + - mbean - def timRegist(self, tid, auth): - """ - 注册协议 + """ + pass - Parameters: - - tid - - auth - """ - pass + def timPing(self, threadId): + """ + ping 心跳协议 - def timRoser(self, roster): - """ - 花名册 + Parameters: + - threadId - Parameters: - - roster - """ - pass + """ + pass - def timMessageList(self, mbeanList): - """ - 发送信息或接收信息列表(合流) + def timError(self, e): + """ + 错误通知 - Parameters: - - mbeanList - """ - pass + Parameters: + - e - def timPresenceList(self, pbeanList): - """ - 发送状态信息列表(合流) + """ + pass - Parameters: - - pbeanList - """ - pass + def timLogout(self): + """ + 登出协议 - def timMessageIq(self, timMsgIq, iqType): - """ - 信息请求 get请求数据 del删除 + """ + pass - Parameters: - - timMsgIq - - iqType - """ - pass + def timRegist(self, tid, auth): + """ + 注册协议 - def timMessageResult(self, mbean): - """ - 信息请求 + Parameters: + - tid + - auth - Parameters: - - mbean - """ - pass + """ + pass - def timProperty(self, tpb): - """ - 用户协议属性请求 + def timRoser(self, roster): + """ + 花名册 - Parameters: - - tpb - """ - pass + Parameters: + - roster - def timRemoteUserAuth(self, tid, pwd, auth): - """ - 请求远程验证信息 + """ + pass - Parameters: - - tid - - pwd - - auth - """ - pass + def timMessageList(self, mbeanList): + """ + 发送信息或接收信息列表(合流) - def timRemoteUserGet(self, tid, auth): - """ - 请求远程用户信息 + Parameters: + - mbeanList - Parameters: - - tid - - auth - """ - pass + """ + pass - def timRemoteUserEdit(self, tid, ub, auth): - """ - 编辑远程用户信息 + def timPresenceList(self, pbeanList): + """ + 发送状态信息列表(合流) - Parameters: - - tid - - ub - - auth - """ - pass + Parameters: + - pbeanList - def timResponsePresence(self, pbean, auth): - """ - 广播出席协议或接收广播协议 + """ + pass - Parameters: - - pbean - - auth - """ - pass + def timMessageIq(self, timMsgIq, iqType): + """ + 信息请求 get请求数据 del删除 - def timResponseMessage(self, mbean, auth): - """ - 发送信息或接收信息 + Parameters: + - timMsgIq + - iqType - Parameters: - - mbean - - auth - """ - pass + """ + pass - def timResponseMessageIq(self, timMsgIq, iqType, auth): - """ - 信息请求 get请求数据 del删除(辅助接口) + def timMessageResult(self, mbean): + """ + 信息请求 - Parameters: - - timMsgIq - - iqType - - auth - """ - pass + Parameters: + - mbean - def timResponsePresenceList(self, pbeanList, auth): - """ - 广播出席协议或接收广播协议 + """ + pass - Parameters: - - pbeanList - - auth - """ - pass + def timProperty(self, tpb): + """ + 用户协议属性请求 - def timResponseMessageList(self, mbeanList, auth): - """ - 发送信息或接收信息 + Parameters: + - tpb - Parameters: - - mbeanList - - auth - """ - pass + """ + pass + + def timRemoteUserAuth(self, tid, pwd, auth): + """ + 请求远程验证信息 + + Parameters: + - tid + - pwd + - auth + + """ + pass + + def timRemoteUserGet(self, tid, auth): + """ + 请求远程用户信息 + + Parameters: + - tid + - auth + + """ + pass + + def timRemoteUserEdit(self, tid, ub, auth): + """ + 编辑远程用户信息 + + Parameters: + - tid + - ub + - auth + + """ + pass + + def timResponsePresence(self, pbean, auth): + """ + 广播出席协议或接收广播协议 + + Parameters: + - pbean + - auth + + """ + pass + + def timResponseMessage(self, mbean, auth): + """ + 发送信息或接收信息 + + Parameters: + - mbean + - auth + + """ + pass + + def timResponseMessageIq(self, timMsgIq, iqType, auth): + """ + 信息请求 get请求数据 del删除(辅助接口) + + Parameters: + - timMsgIq + - iqType + - auth + + """ + pass + + def timResponsePresenceList(self, pbeanList, auth): + """ + 广播出席协议或接收广播协议 + + Parameters: + - pbeanList + - auth + + """ + pass + + def timResponseMessageList(self, mbeanList, auth): + """ + 发送信息或接收信息 + + Parameters: + - mbeanList + - auth + + """ + pass class Client(Iface): - def __init__(self, iprot, oprot=None): - self._iprot = self._oprot = iprot - if oprot is not None: - self._oprot = oprot - self._seqid = 0 + def __init__(self, iprot, oprot=None): + self._iprot = self._oprot = iprot + if oprot is not None: + self._oprot = oprot + self._seqid = 0 + + def timStream(self, param): + """ + 流程开始 + + Parameters: + - param + + """ + self.send_timStream(param) + + def send_timStream(self, param): + self._oprot.writeMessageBegin('timStream', TMessageType.ONEWAY, self._seqid) + args = timStream_args() + args.param = param + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def timStarttls(self): + """ + tls协议 + + """ + self.send_timStarttls() + + def send_timStarttls(self): + self._oprot.writeMessageBegin('timStarttls', TMessageType.ONEWAY, self._seqid) + args = timStarttls_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def timLogin(self, tid, pwd): + """ + 登陆协议 + + Parameters: + - tid + - pwd + + """ + self.send_timLogin(tid, pwd) + + def send_timLogin(self, tid, pwd): + self._oprot.writeMessageBegin('timLogin', TMessageType.ONEWAY, self._seqid) + args = timLogin_args() + args.tid = tid + args.pwd = pwd + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def timAck(self, ab): + """ + 回执信息 + + Parameters: + - ab + + """ + self.send_timAck(ab) + + def send_timAck(self, ab): + self._oprot.writeMessageBegin('timAck', TMessageType.ONEWAY, self._seqid) + args = timAck_args() + args.ab = ab + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def timPresence(self, pbean): + """ + 广播出席协议或接收广播协议 + + Parameters: + - pbean + + """ + self.send_timPresence(pbean) + + def send_timPresence(self, pbean): + self._oprot.writeMessageBegin('timPresence', TMessageType.ONEWAY, self._seqid) + args = timPresence_args() + args.pbean = pbean + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def timMessage(self, mbean): + """ + 发送信息或接收信息 + + Parameters: + - mbean + + """ + self.send_timMessage(mbean) + + def send_timMessage(self, mbean): + self._oprot.writeMessageBegin('timMessage', TMessageType.ONEWAY, self._seqid) + args = timMessage_args() + args.mbean = mbean + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def timPing(self, threadId): + """ + ping 心跳协议 + + Parameters: + - threadId + + """ + self.send_timPing(threadId) + + def send_timPing(self, threadId): + self._oprot.writeMessageBegin('timPing', TMessageType.ONEWAY, self._seqid) + args = timPing_args() + args.threadId = threadId + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def timError(self, e): + """ + 错误通知 + + Parameters: + - e + + """ + self.send_timError(e) + + def send_timError(self, e): + self._oprot.writeMessageBegin('timError', TMessageType.ONEWAY, self._seqid) + args = timError_args() + args.e = e + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def timLogout(self): + """ + 登出协议 + + """ + self.send_timLogout() + + def send_timLogout(self): + self._oprot.writeMessageBegin('timLogout', TMessageType.ONEWAY, self._seqid) + args = timLogout_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def timRegist(self, tid, auth): + """ + 注册协议 + + Parameters: + - tid + - auth + + """ + self.send_timRegist(tid, auth) + + def send_timRegist(self, tid, auth): + self._oprot.writeMessageBegin('timRegist', TMessageType.ONEWAY, self._seqid) + args = timRegist_args() + args.tid = tid + args.auth = auth + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def timRoser(self, roster): + """ + 花名册 + + Parameters: + - roster + + """ + self.send_timRoser(roster) + + def send_timRoser(self, roster): + self._oprot.writeMessageBegin('timRoser', TMessageType.ONEWAY, self._seqid) + args = timRoser_args() + args.roster = roster + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def timMessageList(self, mbeanList): + """ + 发送信息或接收信息列表(合流) + + Parameters: + - mbeanList + + """ + self.send_timMessageList(mbeanList) + + def send_timMessageList(self, mbeanList): + self._oprot.writeMessageBegin('timMessageList', TMessageType.ONEWAY, self._seqid) + args = timMessageList_args() + args.mbeanList = mbeanList + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def timPresenceList(self, pbeanList): + """ + 发送状态信息列表(合流) + + Parameters: + - pbeanList + + """ + self.send_timPresenceList(pbeanList) + + def send_timPresenceList(self, pbeanList): + self._oprot.writeMessageBegin('timPresenceList', TMessageType.ONEWAY, self._seqid) + args = timPresenceList_args() + args.pbeanList = pbeanList + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def timMessageIq(self, timMsgIq, iqType): + """ + 信息请求 get请求数据 del删除 + + Parameters: + - timMsgIq + - iqType + + """ + self.send_timMessageIq(timMsgIq, iqType) + + def send_timMessageIq(self, timMsgIq, iqType): + self._oprot.writeMessageBegin('timMessageIq', TMessageType.ONEWAY, self._seqid) + args = timMessageIq_args() + args.timMsgIq = timMsgIq + args.iqType = iqType + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def timMessageResult(self, mbean): + """ + 信息请求 + + Parameters: + - mbean + + """ + self.send_timMessageResult(mbean) + + def send_timMessageResult(self, mbean): + self._oprot.writeMessageBegin('timMessageResult', TMessageType.ONEWAY, self._seqid) + args = timMessageResult_args() + args.mbean = mbean + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def timProperty(self, tpb): + """ + 用户协议属性请求 + + Parameters: + - tpb + + """ + self.send_timProperty(tpb) + + def send_timProperty(self, tpb): + self._oprot.writeMessageBegin('timProperty', TMessageType.ONEWAY, self._seqid) + args = timProperty_args() + args.tpb = tpb + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def timRemoteUserAuth(self, tid, pwd, auth): + """ + 请求远程验证信息 + + Parameters: + - tid + - pwd + - auth + + """ + self.send_timRemoteUserAuth(tid, pwd, auth) + return self.recv_timRemoteUserAuth() + + def send_timRemoteUserAuth(self, tid, pwd, auth): + self._oprot.writeMessageBegin('timRemoteUserAuth', TMessageType.CALL, self._seqid) + args = timRemoteUserAuth_args() + args.tid = tid + args.pwd = pwd + args.auth = auth + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_timRemoteUserAuth(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = timRemoteUserAuth_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "timRemoteUserAuth failed: unknown result") + + def timRemoteUserGet(self, tid, auth): + """ + 请求远程用户信息 + + Parameters: + - tid + - auth + + """ + self.send_timRemoteUserGet(tid, auth) + return self.recv_timRemoteUserGet() + + def send_timRemoteUserGet(self, tid, auth): + self._oprot.writeMessageBegin('timRemoteUserGet', TMessageType.CALL, self._seqid) + args = timRemoteUserGet_args() + args.tid = tid + args.auth = auth + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_timRemoteUserGet(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = timRemoteUserGet_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "timRemoteUserGet failed: unknown result") + + def timRemoteUserEdit(self, tid, ub, auth): + """ + 编辑远程用户信息 + + Parameters: + - tid + - ub + - auth + + """ + self.send_timRemoteUserEdit(tid, ub, auth) + return self.recv_timRemoteUserEdit() + + def send_timRemoteUserEdit(self, tid, ub, auth): + self._oprot.writeMessageBegin('timRemoteUserEdit', TMessageType.CALL, self._seqid) + args = timRemoteUserEdit_args() + args.tid = tid + args.ub = ub + args.auth = auth + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_timRemoteUserEdit(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = timRemoteUserEdit_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "timRemoteUserEdit failed: unknown result") + + def timResponsePresence(self, pbean, auth): + """ + 广播出席协议或接收广播协议 + + Parameters: + - pbean + - auth + + """ + self.send_timResponsePresence(pbean, auth) + return self.recv_timResponsePresence() + + def send_timResponsePresence(self, pbean, auth): + self._oprot.writeMessageBegin('timResponsePresence', TMessageType.CALL, self._seqid) + args = timResponsePresence_args() + args.pbean = pbean + args.auth = auth + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_timResponsePresence(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = timResponsePresence_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "timResponsePresence failed: unknown result") + + def timResponseMessage(self, mbean, auth): + """ + 发送信息或接收信息 + + Parameters: + - mbean + - auth + + """ + self.send_timResponseMessage(mbean, auth) + return self.recv_timResponseMessage() + + def send_timResponseMessage(self, mbean, auth): + self._oprot.writeMessageBegin('timResponseMessage', TMessageType.CALL, self._seqid) + args = timResponseMessage_args() + args.mbean = mbean + args.auth = auth + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_timResponseMessage(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = timResponseMessage_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "timResponseMessage failed: unknown result") + + def timResponseMessageIq(self, timMsgIq, iqType, auth): + """ + 信息请求 get请求数据 del删除(辅助接口) + + Parameters: + - timMsgIq + - iqType + - auth + + """ + self.send_timResponseMessageIq(timMsgIq, iqType, auth) + return self.recv_timResponseMessageIq() + + def send_timResponseMessageIq(self, timMsgIq, iqType, auth): + self._oprot.writeMessageBegin('timResponseMessageIq', TMessageType.CALL, self._seqid) + args = timResponseMessageIq_args() + args.timMsgIq = timMsgIq + args.iqType = iqType + args.auth = auth + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_timResponseMessageIq(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = timResponseMessageIq_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "timResponseMessageIq failed: unknown result") + + def timResponsePresenceList(self, pbeanList, auth): + """ + 广播出席协议或接收广播协议 + + Parameters: + - pbeanList + - auth + + """ + self.send_timResponsePresenceList(pbeanList, auth) + return self.recv_timResponsePresenceList() + + def send_timResponsePresenceList(self, pbeanList, auth): + self._oprot.writeMessageBegin('timResponsePresenceList', TMessageType.CALL, self._seqid) + args = timResponsePresenceList_args() + args.pbeanList = pbeanList + args.auth = auth + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_timResponsePresenceList(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = timResponsePresenceList_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "timResponsePresenceList failed: unknown result") + + def timResponseMessageList(self, mbeanList, auth): + """ + 发送信息或接收信息 + + Parameters: + - mbeanList + - auth + + """ + self.send_timResponseMessageList(mbeanList, auth) + return self.recv_timResponseMessageList() + + def send_timResponseMessageList(self, mbeanList, auth): + self._oprot.writeMessageBegin('timResponseMessageList', TMessageType.CALL, self._seqid) + args = timResponseMessageList_args() + args.mbeanList = mbeanList + args.auth = auth + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_timResponseMessageList(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = timResponseMessageList_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "timResponseMessageList failed: unknown result") - def timStream(self, param): - """ - 流程开始 - Parameters: - - param - """ - self.send_timStream(param) - - def send_timStream(self, param): - self._oprot.writeMessageBegin('timStream', TMessageType.ONEWAY, self._seqid) - args = timStream_args() - args.param = param - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def timStarttls(self): - """ - tls协议 +class Processor(Iface, TProcessor): + def __init__(self, handler): + self._handler = handler + self._processMap = {} + self._processMap["timStream"] = Processor.process_timStream + self._processMap["timStarttls"] = Processor.process_timStarttls + self._processMap["timLogin"] = Processor.process_timLogin + self._processMap["timAck"] = Processor.process_timAck + self._processMap["timPresence"] = Processor.process_timPresence + self._processMap["timMessage"] = Processor.process_timMessage + self._processMap["timPing"] = Processor.process_timPing + self._processMap["timError"] = Processor.process_timError + self._processMap["timLogout"] = Processor.process_timLogout + self._processMap["timRegist"] = Processor.process_timRegist + self._processMap["timRoser"] = Processor.process_timRoser + self._processMap["timMessageList"] = Processor.process_timMessageList + self._processMap["timPresenceList"] = Processor.process_timPresenceList + self._processMap["timMessageIq"] = Processor.process_timMessageIq + self._processMap["timMessageResult"] = Processor.process_timMessageResult + self._processMap["timProperty"] = Processor.process_timProperty + self._processMap["timRemoteUserAuth"] = Processor.process_timRemoteUserAuth + self._processMap["timRemoteUserGet"] = Processor.process_timRemoteUserGet + self._processMap["timRemoteUserEdit"] = Processor.process_timRemoteUserEdit + self._processMap["timResponsePresence"] = Processor.process_timResponsePresence + self._processMap["timResponseMessage"] = Processor.process_timResponseMessage + self._processMap["timResponseMessageIq"] = Processor.process_timResponseMessageIq + self._processMap["timResponsePresenceList"] = Processor.process_timResponsePresenceList + self._processMap["timResponseMessageList"] = Processor.process_timResponseMessageList + self._on_message_begin = None + + def on_message_begin(self, func): + self._on_message_begin = func + + def process(self, iprot, oprot): + (name, type, seqid) = iprot.readMessageBegin() + if self._on_message_begin: + self._on_message_begin(name, type, seqid) + if name not in self._processMap: + iprot.skip(TType.STRUCT) + iprot.readMessageEnd() + x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) + oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) + x.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + return + else: + self._processMap[name](self, seqid, iprot, oprot) + return True + + def process_timStream(self, seqid, iprot, oprot): + args = timStream_args() + args.read(iprot) + iprot.readMessageEnd() + try: + self._handler.timStream(args.param) + except TTransport.TTransportException: + raise + except Exception: + logging.exception('Exception in oneway handler') + + def process_timStarttls(self, seqid, iprot, oprot): + args = timStarttls_args() + args.read(iprot) + iprot.readMessageEnd() + try: + self._handler.timStarttls() + except TTransport.TTransportException: + raise + except Exception: + logging.exception('Exception in oneway handler') + + def process_timLogin(self, seqid, iprot, oprot): + args = timLogin_args() + args.read(iprot) + iprot.readMessageEnd() + try: + self._handler.timLogin(args.tid, args.pwd) + except TTransport.TTransportException: + raise + except Exception: + logging.exception('Exception in oneway handler') + + def process_timAck(self, seqid, iprot, oprot): + args = timAck_args() + args.read(iprot) + iprot.readMessageEnd() + try: + self._handler.timAck(args.ab) + except TTransport.TTransportException: + raise + except Exception: + logging.exception('Exception in oneway handler') + + def process_timPresence(self, seqid, iprot, oprot): + args = timPresence_args() + args.read(iprot) + iprot.readMessageEnd() + try: + self._handler.timPresence(args.pbean) + except TTransport.TTransportException: + raise + except Exception: + logging.exception('Exception in oneway handler') + + def process_timMessage(self, seqid, iprot, oprot): + args = timMessage_args() + args.read(iprot) + iprot.readMessageEnd() + try: + self._handler.timMessage(args.mbean) + except TTransport.TTransportException: + raise + except Exception: + logging.exception('Exception in oneway handler') + + def process_timPing(self, seqid, iprot, oprot): + args = timPing_args() + args.read(iprot) + iprot.readMessageEnd() + try: + self._handler.timPing(args.threadId) + except TTransport.TTransportException: + raise + except Exception: + logging.exception('Exception in oneway handler') + + def process_timError(self, seqid, iprot, oprot): + args = timError_args() + args.read(iprot) + iprot.readMessageEnd() + try: + self._handler.timError(args.e) + except TTransport.TTransportException: + raise + except Exception: + logging.exception('Exception in oneway handler') + + def process_timLogout(self, seqid, iprot, oprot): + args = timLogout_args() + args.read(iprot) + iprot.readMessageEnd() + try: + self._handler.timLogout() + except TTransport.TTransportException: + raise + except Exception: + logging.exception('Exception in oneway handler') + + def process_timRegist(self, seqid, iprot, oprot): + args = timRegist_args() + args.read(iprot) + iprot.readMessageEnd() + try: + self._handler.timRegist(args.tid, args.auth) + except TTransport.TTransportException: + raise + except Exception: + logging.exception('Exception in oneway handler') + + def process_timRoser(self, seqid, iprot, oprot): + args = timRoser_args() + args.read(iprot) + iprot.readMessageEnd() + try: + self._handler.timRoser(args.roster) + except TTransport.TTransportException: + raise + except Exception: + logging.exception('Exception in oneway handler') + + def process_timMessageList(self, seqid, iprot, oprot): + args = timMessageList_args() + args.read(iprot) + iprot.readMessageEnd() + try: + self._handler.timMessageList(args.mbeanList) + except TTransport.TTransportException: + raise + except Exception: + logging.exception('Exception in oneway handler') + + def process_timPresenceList(self, seqid, iprot, oprot): + args = timPresenceList_args() + args.read(iprot) + iprot.readMessageEnd() + try: + self._handler.timPresenceList(args.pbeanList) + except TTransport.TTransportException: + raise + except Exception: + logging.exception('Exception in oneway handler') + + def process_timMessageIq(self, seqid, iprot, oprot): + args = timMessageIq_args() + args.read(iprot) + iprot.readMessageEnd() + try: + self._handler.timMessageIq(args.timMsgIq, args.iqType) + except TTransport.TTransportException: + raise + except Exception: + logging.exception('Exception in oneway handler') + + def process_timMessageResult(self, seqid, iprot, oprot): + args = timMessageResult_args() + args.read(iprot) + iprot.readMessageEnd() + try: + self._handler.timMessageResult(args.mbean) + except TTransport.TTransportException: + raise + except Exception: + logging.exception('Exception in oneway handler') + + def process_timProperty(self, seqid, iprot, oprot): + args = timProperty_args() + args.read(iprot) + iprot.readMessageEnd() + try: + self._handler.timProperty(args.tpb) + except TTransport.TTransportException: + raise + except Exception: + logging.exception('Exception in oneway handler') + + def process_timRemoteUserAuth(self, seqid, iprot, oprot): + args = timRemoteUserAuth_args() + args.read(iprot) + iprot.readMessageEnd() + result = timRemoteUserAuth_result() + try: + result.success = self._handler.timRemoteUserAuth(args.tid, args.pwd, args.auth) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("timRemoteUserAuth", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_timRemoteUserGet(self, seqid, iprot, oprot): + args = timRemoteUserGet_args() + args.read(iprot) + iprot.readMessageEnd() + result = timRemoteUserGet_result() + try: + result.success = self._handler.timRemoteUserGet(args.tid, args.auth) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("timRemoteUserGet", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_timRemoteUserEdit(self, seqid, iprot, oprot): + args = timRemoteUserEdit_args() + args.read(iprot) + iprot.readMessageEnd() + result = timRemoteUserEdit_result() + try: + result.success = self._handler.timRemoteUserEdit(args.tid, args.ub, args.auth) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("timRemoteUserEdit", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_timResponsePresence(self, seqid, iprot, oprot): + args = timResponsePresence_args() + args.read(iprot) + iprot.readMessageEnd() + result = timResponsePresence_result() + try: + result.success = self._handler.timResponsePresence(args.pbean, args.auth) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("timResponsePresence", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_timResponseMessage(self, seqid, iprot, oprot): + args = timResponseMessage_args() + args.read(iprot) + iprot.readMessageEnd() + result = timResponseMessage_result() + try: + result.success = self._handler.timResponseMessage(args.mbean, args.auth) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("timResponseMessage", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_timResponseMessageIq(self, seqid, iprot, oprot): + args = timResponseMessageIq_args() + args.read(iprot) + iprot.readMessageEnd() + result = timResponseMessageIq_result() + try: + result.success = self._handler.timResponseMessageIq(args.timMsgIq, args.iqType, args.auth) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("timResponseMessageIq", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_timResponsePresenceList(self, seqid, iprot, oprot): + args = timResponsePresenceList_args() + args.read(iprot) + iprot.readMessageEnd() + result = timResponsePresenceList_result() + try: + result.success = self._handler.timResponsePresenceList(args.pbeanList, args.auth) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("timResponsePresenceList", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_timResponseMessageList(self, seqid, iprot, oprot): + args = timResponseMessageList_args() + args.read(iprot) + iprot.readMessageEnd() + result = timResponseMessageList_result() + try: + result.success = self._handler.timResponseMessageList(args.mbeanList, args.auth) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("timResponseMessageList", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + +# HELPER FUNCTIONS AND STRUCTURES + + +class timStream_args(object): """ - self.send_timStarttls() - - def send_timStarttls(self): - self._oprot.writeMessageBegin('timStarttls', TMessageType.ONEWAY, self._seqid) - args = timStarttls_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def timLogin(self, tid, pwd): + Attributes: + - param + """ - 登陆协议 - Parameters: + + def __init__(self, param=None,): + self.param = param + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.param = TimParam() + self.param.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timStream_args') + if self.param is not None: + oprot.writeFieldBegin('param', TType.STRUCT, 1) + self.param.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timStream_args) +timStream_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'param', [TimParam, None], None, ), # 1 +) + + +class timStarttls_args(object): + + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timStarttls_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timStarttls_args) +timStarttls_args.thrift_spec = ( +) + + +class timLogin_args(object): + """ + Attributes: - tid - pwd + """ - self.send_timLogin(tid, pwd) - - def send_timLogin(self, tid, pwd): - self._oprot.writeMessageBegin('timLogin', TMessageType.ONEWAY, self._seqid) - args = timLogin_args() - args.tid = tid - args.pwd = pwd - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def timAck(self, ab): - """ - 回执信息 - Parameters: + + def __init__(self, tid=None, pwd=None,): + self.tid = tid + self.pwd = pwd + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.tid = Tid() + self.tid.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.pwd = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timLogin_args') + if self.tid is not None: + oprot.writeFieldBegin('tid', TType.STRUCT, 1) + self.tid.write(oprot) + oprot.writeFieldEnd() + if self.pwd is not None: + oprot.writeFieldBegin('pwd', TType.STRING, 2) + oprot.writeString(self.pwd.encode('utf-8') if sys.version_info[0] == 2 else self.pwd) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timLogin_args) +timLogin_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tid', [Tid, None], None, ), # 1 + (2, TType.STRING, 'pwd', 'UTF8', None, ), # 2 +) + + +class timAck_args(object): + """ + Attributes: - ab + """ - self.send_timAck(ab) - - def send_timAck(self, ab): - self._oprot.writeMessageBegin('timAck', TMessageType.ONEWAY, self._seqid) - args = timAck_args() - args.ab = ab - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def timPresence(self, pbean): - """ - 广播出席协议或接收广播协议 - Parameters: + + def __init__(self, ab=None,): + self.ab = ab + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.ab = TimAckBean() + self.ab.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timAck_args') + if self.ab is not None: + oprot.writeFieldBegin('ab', TType.STRUCT, 1) + self.ab.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timAck_args) +timAck_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'ab', [TimAckBean, None], None, ), # 1 +) + + +class timPresence_args(object): + """ + Attributes: - pbean + """ - self.send_timPresence(pbean) - - def send_timPresence(self, pbean): - self._oprot.writeMessageBegin('timPresence', TMessageType.ONEWAY, self._seqid) - args = timPresence_args() - args.pbean = pbean - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def timMessage(self, mbean): - """ - 发送信息或接收信息 - Parameters: + + def __init__(self, pbean=None,): + self.pbean = pbean + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.pbean = TimPBean() + self.pbean.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timPresence_args') + if self.pbean is not None: + oprot.writeFieldBegin('pbean', TType.STRUCT, 1) + self.pbean.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timPresence_args) +timPresence_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'pbean', [TimPBean, None], None, ), # 1 +) + + +class timMessage_args(object): + """ + Attributes: - mbean + """ - self.send_timMessage(mbean) - - def send_timMessage(self, mbean): - self._oprot.writeMessageBegin('timMessage', TMessageType.ONEWAY, self._seqid) - args = timMessage_args() - args.mbean = mbean - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def timPing(self, threadId): - """ - ping 心跳协议 - Parameters: + + def __init__(self, mbean=None,): + self.mbean = mbean + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.mbean = TimMBean() + self.mbean.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timMessage_args') + if self.mbean is not None: + oprot.writeFieldBegin('mbean', TType.STRUCT, 1) + self.mbean.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timMessage_args) +timMessage_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'mbean', [TimMBean, None], None, ), # 1 +) + + +class timPing_args(object): + """ + Attributes: - threadId + """ - self.send_timPing(threadId) - - def send_timPing(self, threadId): - self._oprot.writeMessageBegin('timPing', TMessageType.ONEWAY, self._seqid) - args = timPing_args() - args.threadId = threadId - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def timError(self, e): - """ - 错误通知 - Parameters: + + def __init__(self, threadId=None,): + self.threadId = threadId + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.threadId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timPing_args') + if self.threadId is not None: + oprot.writeFieldBegin('threadId', TType.STRING, 1) + oprot.writeString(self.threadId.encode('utf-8') if sys.version_info[0] == 2 else self.threadId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timPing_args) +timPing_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'threadId', 'UTF8', None, ), # 1 +) + + +class timError_args(object): + """ + Attributes: - e + """ - self.send_timError(e) - - def send_timError(self, e): - self._oprot.writeMessageBegin('timError', TMessageType.ONEWAY, self._seqid) - args = timError_args() - args.e = e - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def timLogout(self): - """ - 登出协议 - """ - self.send_timLogout() - - def send_timLogout(self): - self._oprot.writeMessageBegin('timLogout', TMessageType.ONEWAY, self._seqid) - args = timLogout_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def timRegist(self, tid, auth): - """ - 注册协议 - Parameters: + + def __init__(self, e=None,): + self.e = e + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.e = TimError() + self.e.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timError_args') + if self.e is not None: + oprot.writeFieldBegin('e', TType.STRUCT, 1) + self.e.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timError_args) +timError_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'e', [TimError, None], None, ), # 1 +) + + +class timLogout_args(object): + + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timLogout_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timLogout_args) +timLogout_args.thrift_spec = ( +) + + +class timRegist_args(object): + """ + Attributes: - tid - auth + """ - self.send_timRegist(tid, auth) - - def send_timRegist(self, tid, auth): - self._oprot.writeMessageBegin('timRegist', TMessageType.ONEWAY, self._seqid) - args = timRegist_args() - args.tid = tid - args.auth = auth - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def timRoser(self, roster): - """ - 花名册 - Parameters: + + def __init__(self, tid=None, auth=None,): + self.tid = tid + self.auth = auth + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.tid = Tid() + self.tid.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.auth = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timRegist_args') + if self.tid is not None: + oprot.writeFieldBegin('tid', TType.STRUCT, 1) + self.tid.write(oprot) + oprot.writeFieldEnd() + if self.auth is not None: + oprot.writeFieldBegin('auth', TType.STRING, 2) + oprot.writeString(self.auth.encode('utf-8') if sys.version_info[0] == 2 else self.auth) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timRegist_args) +timRegist_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tid', [Tid, None], None, ), # 1 + (2, TType.STRING, 'auth', 'UTF8', None, ), # 2 +) + + +class timRoser_args(object): + """ + Attributes: - roster + """ - self.send_timRoser(roster) - - def send_timRoser(self, roster): - self._oprot.writeMessageBegin('timRoser', TMessageType.ONEWAY, self._seqid) - args = timRoser_args() - args.roster = roster - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def timMessageList(self, mbeanList): - """ - 发送信息或接收信息列表(合流) - Parameters: + + def __init__(self, roster=None,): + self.roster = roster + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.roster = TimRoster() + self.roster.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timRoser_args') + if self.roster is not None: + oprot.writeFieldBegin('roster', TType.STRUCT, 1) + self.roster.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timRoser_args) +timRoser_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'roster', [TimRoster, None], None, ), # 1 +) + + +class timMessageList_args(object): + """ + Attributes: - mbeanList + """ - self.send_timMessageList(mbeanList) - - def send_timMessageList(self, mbeanList): - self._oprot.writeMessageBegin('timMessageList', TMessageType.ONEWAY, self._seqid) - args = timMessageList_args() - args.mbeanList = mbeanList - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def timPresenceList(self, pbeanList): - """ - 发送状态信息列表(合流) - Parameters: + + def __init__(self, mbeanList=None,): + self.mbeanList = mbeanList + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.mbeanList = TimMBeanList() + self.mbeanList.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timMessageList_args') + if self.mbeanList is not None: + oprot.writeFieldBegin('mbeanList', TType.STRUCT, 1) + self.mbeanList.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timMessageList_args) +timMessageList_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'mbeanList', [TimMBeanList, None], None, ), # 1 +) + + +class timPresenceList_args(object): + """ + Attributes: - pbeanList + """ - self.send_timPresenceList(pbeanList) - - def send_timPresenceList(self, pbeanList): - self._oprot.writeMessageBegin('timPresenceList', TMessageType.ONEWAY, self._seqid) - args = timPresenceList_args() - args.pbeanList = pbeanList - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def timMessageIq(self, timMsgIq, iqType): - """ - 信息请求 get请求数据 del删除 - Parameters: + + def __init__(self, pbeanList=None,): + self.pbeanList = pbeanList + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.pbeanList = TimPBeanList() + self.pbeanList.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timPresenceList_args') + if self.pbeanList is not None: + oprot.writeFieldBegin('pbeanList', TType.STRUCT, 1) + self.pbeanList.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timPresenceList_args) +timPresenceList_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'pbeanList', [TimPBeanList, None], None, ), # 1 +) + + +class timMessageIq_args(object): + """ + Attributes: - timMsgIq - iqType + """ - self.send_timMessageIq(timMsgIq, iqType) - - def send_timMessageIq(self, timMsgIq, iqType): - self._oprot.writeMessageBegin('timMessageIq', TMessageType.ONEWAY, self._seqid) - args = timMessageIq_args() - args.timMsgIq = timMsgIq - args.iqType = iqType - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def timMessageResult(self, mbean): - """ - 信息请求 - Parameters: + + def __init__(self, timMsgIq=None, iqType=None,): + self.timMsgIq = timMsgIq + self.iqType = iqType + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.timMsgIq = TimMessageIq() + self.timMsgIq.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.iqType = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timMessageIq_args') + if self.timMsgIq is not None: + oprot.writeFieldBegin('timMsgIq', TType.STRUCT, 1) + self.timMsgIq.write(oprot) + oprot.writeFieldEnd() + if self.iqType is not None: + oprot.writeFieldBegin('iqType', TType.STRING, 2) + oprot.writeString(self.iqType.encode('utf-8') if sys.version_info[0] == 2 else self.iqType) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timMessageIq_args) +timMessageIq_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'timMsgIq', [TimMessageIq, None], None, ), # 1 + (2, TType.STRING, 'iqType', 'UTF8', None, ), # 2 +) + + +class timMessageResult_args(object): + """ + Attributes: - mbean + """ - self.send_timMessageResult(mbean) - - def send_timMessageResult(self, mbean): - self._oprot.writeMessageBegin('timMessageResult', TMessageType.ONEWAY, self._seqid) - args = timMessageResult_args() - args.mbean = mbean - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def timProperty(self, tpb): - """ - 用户协议属性请求 - Parameters: + + def __init__(self, mbean=None,): + self.mbean = mbean + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.mbean = TimMBean() + self.mbean.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timMessageResult_args') + if self.mbean is not None: + oprot.writeFieldBegin('mbean', TType.STRUCT, 1) + self.mbean.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timMessageResult_args) +timMessageResult_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'mbean', [TimMBean, None], None, ), # 1 +) + + +class timProperty_args(object): + """ + Attributes: - tpb + """ - self.send_timProperty(tpb) - - def send_timProperty(self, tpb): - self._oprot.writeMessageBegin('timProperty', TMessageType.ONEWAY, self._seqid) - args = timProperty_args() - args.tpb = tpb - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def timRemoteUserAuth(self, tid, pwd, auth): - """ - 请求远程验证信息 - Parameters: + + def __init__(self, tpb=None,): + self.tpb = tpb + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.tpb = TimPropertyBean() + self.tpb.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timProperty_args') + if self.tpb is not None: + oprot.writeFieldBegin('tpb', TType.STRUCT, 1) + self.tpb.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timProperty_args) +timProperty_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tpb', [TimPropertyBean, None], None, ), # 1 +) + + +class timRemoteUserAuth_args(object): + """ + Attributes: - tid - pwd - auth + """ - self.send_timRemoteUserAuth(tid, pwd, auth) - return self.recv_timRemoteUserAuth() - - def send_timRemoteUserAuth(self, tid, pwd, auth): - self._oprot.writeMessageBegin('timRemoteUserAuth', TMessageType.CALL, self._seqid) - args = timRemoteUserAuth_args() - args.tid = tid - args.pwd = pwd - args.auth = auth - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_timRemoteUserAuth(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = timRemoteUserAuth_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "timRemoteUserAuth failed: unknown result") - - def timRemoteUserGet(self, tid, auth): - """ - 请求远程用户信息 - Parameters: + + def __init__(self, tid=None, pwd=None, auth=None,): + self.tid = tid + self.pwd = pwd + self.auth = auth + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.tid = Tid() + self.tid.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.pwd = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.auth = TimAuth() + self.auth.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timRemoteUserAuth_args') + if self.tid is not None: + oprot.writeFieldBegin('tid', TType.STRUCT, 1) + self.tid.write(oprot) + oprot.writeFieldEnd() + if self.pwd is not None: + oprot.writeFieldBegin('pwd', TType.STRING, 2) + oprot.writeString(self.pwd.encode('utf-8') if sys.version_info[0] == 2 else self.pwd) + oprot.writeFieldEnd() + if self.auth is not None: + oprot.writeFieldBegin('auth', TType.STRUCT, 3) + self.auth.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timRemoteUserAuth_args) +timRemoteUserAuth_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tid', [Tid, None], None, ), # 1 + (2, TType.STRING, 'pwd', 'UTF8', None, ), # 2 + (3, TType.STRUCT, 'auth', [TimAuth, None], None, ), # 3 +) + + +class timRemoteUserAuth_result(object): + """ + Attributes: + - success + + """ + + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = TimRemoteUserBean() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timRemoteUserAuth_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timRemoteUserAuth_result) +timRemoteUserAuth_result.thrift_spec = ( + (0, TType.STRUCT, 'success', [TimRemoteUserBean, None], None, ), # 0 +) + + +class timRemoteUserGet_args(object): + """ + Attributes: - tid - auth + """ - self.send_timRemoteUserGet(tid, auth) - return self.recv_timRemoteUserGet() - - def send_timRemoteUserGet(self, tid, auth): - self._oprot.writeMessageBegin('timRemoteUserGet', TMessageType.CALL, self._seqid) - args = timRemoteUserGet_args() - args.tid = tid - args.auth = auth - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_timRemoteUserGet(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = timRemoteUserGet_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "timRemoteUserGet failed: unknown result") - - def timRemoteUserEdit(self, tid, ub, auth): - """ - 编辑远程用户信息 - Parameters: + + def __init__(self, tid=None, auth=None,): + self.tid = tid + self.auth = auth + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.tid = Tid() + self.tid.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.auth = TimAuth() + self.auth.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timRemoteUserGet_args') + if self.tid is not None: + oprot.writeFieldBegin('tid', TType.STRUCT, 1) + self.tid.write(oprot) + oprot.writeFieldEnd() + if self.auth is not None: + oprot.writeFieldBegin('auth', TType.STRUCT, 2) + self.auth.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timRemoteUserGet_args) +timRemoteUserGet_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tid', [Tid, None], None, ), # 1 + (2, TType.STRUCT, 'auth', [TimAuth, None], None, ), # 2 +) + + +class timRemoteUserGet_result(object): + """ + Attributes: + - success + + """ + + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = TimRemoteUserBean() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timRemoteUserGet_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timRemoteUserGet_result) +timRemoteUserGet_result.thrift_spec = ( + (0, TType.STRUCT, 'success', [TimRemoteUserBean, None], None, ), # 0 +) + + +class timRemoteUserEdit_args(object): + """ + Attributes: - tid - ub - auth + """ - self.send_timRemoteUserEdit(tid, ub, auth) - return self.recv_timRemoteUserEdit() - - def send_timRemoteUserEdit(self, tid, ub, auth): - self._oprot.writeMessageBegin('timRemoteUserEdit', TMessageType.CALL, self._seqid) - args = timRemoteUserEdit_args() - args.tid = tid - args.ub = ub - args.auth = auth - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_timRemoteUserEdit(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = timRemoteUserEdit_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "timRemoteUserEdit failed: unknown result") - - def timResponsePresence(self, pbean, auth): - """ - 广播出席协议或接收广播协议 - Parameters: + + def __init__(self, tid=None, ub=None, auth=None,): + self.tid = tid + self.ub = ub + self.auth = auth + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.tid = Tid() + self.tid.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.ub = TimUserBean() + self.ub.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.auth = TimAuth() + self.auth.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timRemoteUserEdit_args') + if self.tid is not None: + oprot.writeFieldBegin('tid', TType.STRUCT, 1) + self.tid.write(oprot) + oprot.writeFieldEnd() + if self.ub is not None: + oprot.writeFieldBegin('ub', TType.STRUCT, 2) + self.ub.write(oprot) + oprot.writeFieldEnd() + if self.auth is not None: + oprot.writeFieldBegin('auth', TType.STRUCT, 3) + self.auth.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timRemoteUserEdit_args) +timRemoteUserEdit_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tid', [Tid, None], None, ), # 1 + (2, TType.STRUCT, 'ub', [TimUserBean, None], None, ), # 2 + (3, TType.STRUCT, 'auth', [TimAuth, None], None, ), # 3 +) + + +class timRemoteUserEdit_result(object): + """ + Attributes: + - success + + """ + + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = TimRemoteUserBean() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timRemoteUserEdit_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timRemoteUserEdit_result) +timRemoteUserEdit_result.thrift_spec = ( + (0, TType.STRUCT, 'success', [TimRemoteUserBean, None], None, ), # 0 +) + + +class timResponsePresence_args(object): + """ + Attributes: - pbean - auth + """ - self.send_timResponsePresence(pbean, auth) - return self.recv_timResponsePresence() - - def send_timResponsePresence(self, pbean, auth): - self._oprot.writeMessageBegin('timResponsePresence', TMessageType.CALL, self._seqid) - args = timResponsePresence_args() - args.pbean = pbean - args.auth = auth - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_timResponsePresence(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = timResponsePresence_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "timResponsePresence failed: unknown result") - - def timResponseMessage(self, mbean, auth): - """ - 发送信息或接收信息 - Parameters: + + def __init__(self, pbean=None, auth=None,): + self.pbean = pbean + self.auth = auth + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.pbean = TimPBean() + self.pbean.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.auth = TimAuth() + self.auth.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timResponsePresence_args') + if self.pbean is not None: + oprot.writeFieldBegin('pbean', TType.STRUCT, 1) + self.pbean.write(oprot) + oprot.writeFieldEnd() + if self.auth is not None: + oprot.writeFieldBegin('auth', TType.STRUCT, 2) + self.auth.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timResponsePresence_args) +timResponsePresence_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'pbean', [TimPBean, None], None, ), # 1 + (2, TType.STRUCT, 'auth', [TimAuth, None], None, ), # 2 +) + + +class timResponsePresence_result(object): + """ + Attributes: + - success + + """ + + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = TimResponseBean() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timResponsePresence_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timResponsePresence_result) +timResponsePresence_result.thrift_spec = ( + (0, TType.STRUCT, 'success', [TimResponseBean, None], None, ), # 0 +) + + +class timResponseMessage_args(object): + """ + Attributes: - mbean - auth + """ - self.send_timResponseMessage(mbean, auth) - return self.recv_timResponseMessage() - - def send_timResponseMessage(self, mbean, auth): - self._oprot.writeMessageBegin('timResponseMessage', TMessageType.CALL, self._seqid) - args = timResponseMessage_args() - args.mbean = mbean - args.auth = auth - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_timResponseMessage(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = timResponseMessage_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "timResponseMessage failed: unknown result") - - def timResponseMessageIq(self, timMsgIq, iqType, auth): - """ - 信息请求 get请求数据 del删除(辅助接口) - Parameters: + + def __init__(self, mbean=None, auth=None,): + self.mbean = mbean + self.auth = auth + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.mbean = TimMBean() + self.mbean.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.auth = TimAuth() + self.auth.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timResponseMessage_args') + if self.mbean is not None: + oprot.writeFieldBegin('mbean', TType.STRUCT, 1) + self.mbean.write(oprot) + oprot.writeFieldEnd() + if self.auth is not None: + oprot.writeFieldBegin('auth', TType.STRUCT, 2) + self.auth.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timResponseMessage_args) +timResponseMessage_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'mbean', [TimMBean, None], None, ), # 1 + (2, TType.STRUCT, 'auth', [TimAuth, None], None, ), # 2 +) + + +class timResponseMessage_result(object): + """ + Attributes: + - success + + """ + + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = TimResponseBean() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timResponseMessage_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timResponseMessage_result) +timResponseMessage_result.thrift_spec = ( + (0, TType.STRUCT, 'success', [TimResponseBean, None], None, ), # 0 +) + + +class timResponseMessageIq_args(object): + """ + Attributes: - timMsgIq - iqType - auth + """ - self.send_timResponseMessageIq(timMsgIq, iqType, auth) - return self.recv_timResponseMessageIq() - - def send_timResponseMessageIq(self, timMsgIq, iqType, auth): - self._oprot.writeMessageBegin('timResponseMessageIq', TMessageType.CALL, self._seqid) - args = timResponseMessageIq_args() - args.timMsgIq = timMsgIq - args.iqType = iqType - args.auth = auth - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_timResponseMessageIq(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = timResponseMessageIq_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "timResponseMessageIq failed: unknown result") - - def timResponsePresenceList(self, pbeanList, auth): - """ - 广播出席协议或接收广播协议 - Parameters: + + def __init__(self, timMsgIq=None, iqType=None, auth=None,): + self.timMsgIq = timMsgIq + self.iqType = iqType + self.auth = auth + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.timMsgIq = TimMessageIq() + self.timMsgIq.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.iqType = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.auth = TimAuth() + self.auth.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timResponseMessageIq_args') + if self.timMsgIq is not None: + oprot.writeFieldBegin('timMsgIq', TType.STRUCT, 1) + self.timMsgIq.write(oprot) + oprot.writeFieldEnd() + if self.iqType is not None: + oprot.writeFieldBegin('iqType', TType.STRING, 2) + oprot.writeString(self.iqType.encode('utf-8') if sys.version_info[0] == 2 else self.iqType) + oprot.writeFieldEnd() + if self.auth is not None: + oprot.writeFieldBegin('auth', TType.STRUCT, 3) + self.auth.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timResponseMessageIq_args) +timResponseMessageIq_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'timMsgIq', [TimMessageIq, None], None, ), # 1 + (2, TType.STRING, 'iqType', 'UTF8', None, ), # 2 + (3, TType.STRUCT, 'auth', [TimAuth, None], None, ), # 3 +) + + +class timResponseMessageIq_result(object): + """ + Attributes: + - success + + """ + + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = TimMBeanList() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timResponseMessageIq_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timResponseMessageIq_result) +timResponseMessageIq_result.thrift_spec = ( + (0, TType.STRUCT, 'success', [TimMBeanList, None], None, ), # 0 +) + + +class timResponsePresenceList_args(object): + """ + Attributes: - pbeanList - auth - """ - self.send_timResponsePresenceList(pbeanList, auth) - return self.recv_timResponsePresenceList() - - def send_timResponsePresenceList(self, pbeanList, auth): - self._oprot.writeMessageBegin('timResponsePresenceList', TMessageType.CALL, self._seqid) - args = timResponsePresenceList_args() - args.pbeanList = pbeanList - args.auth = auth - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_timResponsePresenceList(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = timResponsePresenceList_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "timResponsePresenceList failed: unknown result") - - def timResponseMessageList(self, mbeanList, auth): - """ - 发送信息或接收信息 - Parameters: - - mbeanList - - auth """ - self.send_timResponseMessageList(mbeanList, auth) - return self.recv_timResponseMessageList() - - def send_timResponseMessageList(self, mbeanList, auth): - self._oprot.writeMessageBegin('timResponseMessageList', TMessageType.CALL, self._seqid) - args = timResponseMessageList_args() - args.mbeanList = mbeanList - args.auth = auth - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_timResponseMessageList(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = timResponseMessageList_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - raise TApplicationException(TApplicationException.MISSING_RESULT, "timResponseMessageList failed: unknown result") -class Processor(Iface, TProcessor): - def __init__(self, handler): - self._handler = handler - self._processMap = {} - self._processMap["timStream"] = Processor.process_timStream - self._processMap["timStarttls"] = Processor.process_timStarttls - self._processMap["timLogin"] = Processor.process_timLogin - self._processMap["timAck"] = Processor.process_timAck - self._processMap["timPresence"] = Processor.process_timPresence - self._processMap["timMessage"] = Processor.process_timMessage - self._processMap["timPing"] = Processor.process_timPing - self._processMap["timError"] = Processor.process_timError - self._processMap["timLogout"] = Processor.process_timLogout - self._processMap["timRegist"] = Processor.process_timRegist - self._processMap["timRoser"] = Processor.process_timRoser - self._processMap["timMessageList"] = Processor.process_timMessageList - self._processMap["timPresenceList"] = Processor.process_timPresenceList - self._processMap["timMessageIq"] = Processor.process_timMessageIq - self._processMap["timMessageResult"] = Processor.process_timMessageResult - self._processMap["timProperty"] = Processor.process_timProperty - self._processMap["timRemoteUserAuth"] = Processor.process_timRemoteUserAuth - self._processMap["timRemoteUserGet"] = Processor.process_timRemoteUserGet - self._processMap["timRemoteUserEdit"] = Processor.process_timRemoteUserEdit - self._processMap["timResponsePresence"] = Processor.process_timResponsePresence - self._processMap["timResponseMessage"] = Processor.process_timResponseMessage - self._processMap["timResponseMessageIq"] = Processor.process_timResponseMessageIq - self._processMap["timResponsePresenceList"] = Processor.process_timResponsePresenceList - self._processMap["timResponseMessageList"] = Processor.process_timResponseMessageList - - def process(self, iprot, oprot): - (name, type, seqid) = iprot.readMessageBegin() - if name not in self._processMap: - iprot.skip(TType.STRUCT) - iprot.readMessageEnd() - x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) - oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) - x.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - return - else: - self._processMap[name](self, seqid, iprot, oprot) - return True - - def process_timStream(self, seqid, iprot, oprot): - args = timStream_args() - args.read(iprot) - iprot.readMessageEnd() - try: - self._handler.timStream(args.param) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except: - pass - - def process_timStarttls(self, seqid, iprot, oprot): - args = timStarttls_args() - args.read(iprot) - iprot.readMessageEnd() - try: - self._handler.timStarttls() - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except: - pass - - def process_timLogin(self, seqid, iprot, oprot): - args = timLogin_args() - args.read(iprot) - iprot.readMessageEnd() - try: - self._handler.timLogin(args.tid, args.pwd) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except: - pass - - def process_timAck(self, seqid, iprot, oprot): - args = timAck_args() - args.read(iprot) - iprot.readMessageEnd() - try: - self._handler.timAck(args.ab) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except: - pass - - def process_timPresence(self, seqid, iprot, oprot): - args = timPresence_args() - args.read(iprot) - iprot.readMessageEnd() - try: - self._handler.timPresence(args.pbean) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except: - pass - - def process_timMessage(self, seqid, iprot, oprot): - args = timMessage_args() - args.read(iprot) - iprot.readMessageEnd() - try: - self._handler.timMessage(args.mbean) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except: - pass - - def process_timPing(self, seqid, iprot, oprot): - args = timPing_args() - args.read(iprot) - iprot.readMessageEnd() - try: - self._handler.timPing(args.threadId) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except: - pass - - def process_timError(self, seqid, iprot, oprot): - args = timError_args() - args.read(iprot) - iprot.readMessageEnd() - try: - self._handler.timError(args.e) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except: - pass - - def process_timLogout(self, seqid, iprot, oprot): - args = timLogout_args() - args.read(iprot) - iprot.readMessageEnd() - try: - self._handler.timLogout() - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except: - pass - - def process_timRegist(self, seqid, iprot, oprot): - args = timRegist_args() - args.read(iprot) - iprot.readMessageEnd() - try: - self._handler.timRegist(args.tid, args.auth) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except: - pass - - def process_timRoser(self, seqid, iprot, oprot): - args = timRoser_args() - args.read(iprot) - iprot.readMessageEnd() - try: - self._handler.timRoser(args.roster) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except: - pass - - def process_timMessageList(self, seqid, iprot, oprot): - args = timMessageList_args() - args.read(iprot) - iprot.readMessageEnd() - try: - self._handler.timMessageList(args.mbeanList) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except: - pass - - def process_timPresenceList(self, seqid, iprot, oprot): - args = timPresenceList_args() - args.read(iprot) - iprot.readMessageEnd() - try: - self._handler.timPresenceList(args.pbeanList) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except: - pass - - def process_timMessageIq(self, seqid, iprot, oprot): - args = timMessageIq_args() - args.read(iprot) - iprot.readMessageEnd() - try: - self._handler.timMessageIq(args.timMsgIq, args.iqType) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except: - pass - - def process_timMessageResult(self, seqid, iprot, oprot): - args = timMessageResult_args() - args.read(iprot) - iprot.readMessageEnd() - try: - self._handler.timMessageResult(args.mbean) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except: - pass - - def process_timProperty(self, seqid, iprot, oprot): - args = timProperty_args() - args.read(iprot) - iprot.readMessageEnd() - try: - self._handler.timProperty(args.tpb) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except: - pass - - def process_timRemoteUserAuth(self, seqid, iprot, oprot): - args = timRemoteUserAuth_args() - args.read(iprot) - iprot.readMessageEnd() - result = timRemoteUserAuth_result() - try: - result.success = self._handler.timRemoteUserAuth(args.tid, args.pwd, args.auth) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("timRemoteUserAuth", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_timRemoteUserGet(self, seqid, iprot, oprot): - args = timRemoteUserGet_args() - args.read(iprot) - iprot.readMessageEnd() - result = timRemoteUserGet_result() - try: - result.success = self._handler.timRemoteUserGet(args.tid, args.auth) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("timRemoteUserGet", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_timRemoteUserEdit(self, seqid, iprot, oprot): - args = timRemoteUserEdit_args() - args.read(iprot) - iprot.readMessageEnd() - result = timRemoteUserEdit_result() - try: - result.success = self._handler.timRemoteUserEdit(args.tid, args.ub, args.auth) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("timRemoteUserEdit", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_timResponsePresence(self, seqid, iprot, oprot): - args = timResponsePresence_args() - args.read(iprot) - iprot.readMessageEnd() - result = timResponsePresence_result() - try: - result.success = self._handler.timResponsePresence(args.pbean, args.auth) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("timResponsePresence", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_timResponseMessage(self, seqid, iprot, oprot): - args = timResponseMessage_args() - args.read(iprot) - iprot.readMessageEnd() - result = timResponseMessage_result() - try: - result.success = self._handler.timResponseMessage(args.mbean, args.auth) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("timResponseMessage", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_timResponseMessageIq(self, seqid, iprot, oprot): - args = timResponseMessageIq_args() - args.read(iprot) - iprot.readMessageEnd() - result = timResponseMessageIq_result() - try: - result.success = self._handler.timResponseMessageIq(args.timMsgIq, args.iqType, args.auth) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("timResponseMessageIq", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_timResponsePresenceList(self, seqid, iprot, oprot): - args = timResponsePresenceList_args() - args.read(iprot) - iprot.readMessageEnd() - result = timResponsePresenceList_result() - try: - result.success = self._handler.timResponsePresenceList(args.pbeanList, args.auth) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("timResponsePresenceList", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_timResponseMessageList(self, seqid, iprot, oprot): - args = timResponseMessageList_args() - args.read(iprot) - iprot.readMessageEnd() - result = timResponseMessageList_result() - try: - result.success = self._handler.timResponseMessageList(args.mbeanList, args.auth) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("timResponseMessageList", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def __init__(self, pbeanList=None, auth=None,): + self.pbeanList = pbeanList + self.auth = auth + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.pbeanList = TimPBeanList() + self.pbeanList.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.auth = TimAuth() + self.auth.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timResponsePresenceList_args') + if self.pbeanList is not None: + oprot.writeFieldBegin('pbeanList', TType.STRUCT, 1) + self.pbeanList.write(oprot) + oprot.writeFieldEnd() + if self.auth is not None: + oprot.writeFieldBegin('auth', TType.STRUCT, 2) + self.auth.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timResponsePresenceList_args) +timResponsePresenceList_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'pbeanList', [TimPBeanList, None], None, ), # 1 + (2, TType.STRUCT, 'auth', [TimAuth, None], None, ), # 2 +) + + +class timResponsePresenceList_result(object): + """ + Attributes: + - success + + """ + + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = TimResponseBean() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timResponsePresenceList_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timResponsePresenceList_result) +timResponsePresenceList_result.thrift_spec = ( + (0, TType.STRUCT, 'success', [TimResponseBean, None], None, ), # 0 +) + + +class timResponseMessageList_args(object): + """ + Attributes: + - mbeanList + - auth + """ -# HELPER FUNCTIONS AND STRUCTURES -class timStream_args: - """ - Attributes: - - param - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'param', (TimParam, TimParam.thrift_spec), None, ), # 1 - ) - - def __init__(self, param=None,): - self.param = param - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.param = TimParam() - self.param.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timStream_args') - if self.param is not None: - oprot.writeFieldBegin('param', TType.STRUCT, 1) - self.param.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.param) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timStarttls_args: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timStarttls_args') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timLogin_args: - """ - Attributes: - - tid - - pwd - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'tid', (Tid, Tid.thrift_spec), None, ), # 1 - (2, TType.STRING, 'pwd', None, None, ), # 2 - ) - - def __init__(self, tid=None, pwd=None,): - self.tid = tid - self.pwd = pwd - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.tid = Tid() - self.tid.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.pwd = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timLogin_args') - if self.tid is not None: - oprot.writeFieldBegin('tid', TType.STRUCT, 1) - self.tid.write(oprot) - oprot.writeFieldEnd() - if self.pwd is not None: - oprot.writeFieldBegin('pwd', TType.STRING, 2) - oprot.writeString(self.pwd) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.tid) - value = (value * 31) ^ hash(self.pwd) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timAck_args: - """ - Attributes: - - ab - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'ab', (TimAckBean, TimAckBean.thrift_spec), None, ), # 1 - ) - - def __init__(self, ab=None,): - self.ab = ab - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.ab = TimAckBean() - self.ab.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timAck_args') - if self.ab is not None: - oprot.writeFieldBegin('ab', TType.STRUCT, 1) - self.ab.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.ab) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timPresence_args: - """ - Attributes: - - pbean - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'pbean', (TimPBean, TimPBean.thrift_spec), None, ), # 1 - ) - - def __init__(self, pbean=None,): - self.pbean = pbean - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.pbean = TimPBean() - self.pbean.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timPresence_args') - if self.pbean is not None: - oprot.writeFieldBegin('pbean', TType.STRUCT, 1) - self.pbean.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.pbean) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timMessage_args: - """ - Attributes: - - mbean - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'mbean', (TimMBean, TimMBean.thrift_spec), None, ), # 1 - ) - - def __init__(self, mbean=None,): - self.mbean = mbean - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.mbean = TimMBean() - self.mbean.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timMessage_args') - if self.mbean is not None: - oprot.writeFieldBegin('mbean', TType.STRUCT, 1) - self.mbean.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.mbean) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timPing_args: - """ - Attributes: - - threadId - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'threadId', None, None, ), # 1 - ) - - def __init__(self, threadId=None,): - self.threadId = threadId - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.threadId = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timPing_args') - if self.threadId is not None: - oprot.writeFieldBegin('threadId', TType.STRING, 1) - oprot.writeString(self.threadId) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.threadId) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timError_args: - """ - Attributes: - - e - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'e', (TimError, TimError.thrift_spec), None, ), # 1 - ) - - def __init__(self, e=None,): - self.e = e - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.e = TimError() - self.e.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timError_args') - if self.e is not None: - oprot.writeFieldBegin('e', TType.STRUCT, 1) - self.e.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.e) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timLogout_args: - - thrift_spec = ( - ) - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timLogout_args') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timRegist_args: - """ - Attributes: - - tid - - auth - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'tid', (Tid, Tid.thrift_spec), None, ), # 1 - (2, TType.STRING, 'auth', None, None, ), # 2 - ) - - def __init__(self, tid=None, auth=None,): - self.tid = tid - self.auth = auth - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.tid = Tid() - self.tid.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.auth = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timRegist_args') - if self.tid is not None: - oprot.writeFieldBegin('tid', TType.STRUCT, 1) - self.tid.write(oprot) - oprot.writeFieldEnd() - if self.auth is not None: - oprot.writeFieldBegin('auth', TType.STRING, 2) - oprot.writeString(self.auth) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.tid) - value = (value * 31) ^ hash(self.auth) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timRoser_args: - """ - Attributes: - - roster - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'roster', (TimRoster, TimRoster.thrift_spec), None, ), # 1 - ) - - def __init__(self, roster=None,): - self.roster = roster - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.roster = TimRoster() - self.roster.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timRoser_args') - if self.roster is not None: - oprot.writeFieldBegin('roster', TType.STRUCT, 1) - self.roster.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.roster) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timMessageList_args: - """ - Attributes: - - mbeanList - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'mbeanList', (TimMBeanList, TimMBeanList.thrift_spec), None, ), # 1 - ) - - def __init__(self, mbeanList=None,): - self.mbeanList = mbeanList - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.mbeanList = TimMBeanList() - self.mbeanList.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timMessageList_args') - if self.mbeanList is not None: - oprot.writeFieldBegin('mbeanList', TType.STRUCT, 1) - self.mbeanList.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.mbeanList) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timPresenceList_args: - """ - Attributes: - - pbeanList - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'pbeanList', (TimPBeanList, TimPBeanList.thrift_spec), None, ), # 1 - ) - - def __init__(self, pbeanList=None,): - self.pbeanList = pbeanList - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.pbeanList = TimPBeanList() - self.pbeanList.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timPresenceList_args') - if self.pbeanList is not None: - oprot.writeFieldBegin('pbeanList', TType.STRUCT, 1) - self.pbeanList.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.pbeanList) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timMessageIq_args: - """ - Attributes: - - timMsgIq - - iqType - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'timMsgIq', (TimMessageIq, TimMessageIq.thrift_spec), None, ), # 1 - (2, TType.STRING, 'iqType', None, None, ), # 2 - ) - - def __init__(self, timMsgIq=None, iqType=None,): - self.timMsgIq = timMsgIq - self.iqType = iqType - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.timMsgIq = TimMessageIq() - self.timMsgIq.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.iqType = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timMessageIq_args') - if self.timMsgIq is not None: - oprot.writeFieldBegin('timMsgIq', TType.STRUCT, 1) - self.timMsgIq.write(oprot) - oprot.writeFieldEnd() - if self.iqType is not None: - oprot.writeFieldBegin('iqType', TType.STRING, 2) - oprot.writeString(self.iqType) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.timMsgIq) - value = (value * 31) ^ hash(self.iqType) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timMessageResult_args: - """ - Attributes: - - mbean - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'mbean', (TimMBean, TimMBean.thrift_spec), None, ), # 1 - ) - - def __init__(self, mbean=None,): - self.mbean = mbean - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.mbean = TimMBean() - self.mbean.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timMessageResult_args') - if self.mbean is not None: - oprot.writeFieldBegin('mbean', TType.STRUCT, 1) - self.mbean.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.mbean) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timProperty_args: - """ - Attributes: - - tpb - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'tpb', (TimPropertyBean, TimPropertyBean.thrift_spec), None, ), # 1 - ) - - def __init__(self, tpb=None,): - self.tpb = tpb - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.tpb = TimPropertyBean() - self.tpb.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timProperty_args') - if self.tpb is not None: - oprot.writeFieldBegin('tpb', TType.STRUCT, 1) - self.tpb.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.tpb) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timRemoteUserAuth_args: - """ - Attributes: - - tid - - pwd - - auth - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'tid', (Tid, Tid.thrift_spec), None, ), # 1 - (2, TType.STRING, 'pwd', None, None, ), # 2 - (3, TType.STRUCT, 'auth', (TimAuth, TimAuth.thrift_spec), None, ), # 3 - ) - - def __init__(self, tid=None, pwd=None, auth=None,): - self.tid = tid - self.pwd = pwd - self.auth = auth - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.tid = Tid() - self.tid.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.pwd = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.auth = TimAuth() - self.auth.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timRemoteUserAuth_args') - if self.tid is not None: - oprot.writeFieldBegin('tid', TType.STRUCT, 1) - self.tid.write(oprot) - oprot.writeFieldEnd() - if self.pwd is not None: - oprot.writeFieldBegin('pwd', TType.STRING, 2) - oprot.writeString(self.pwd) - oprot.writeFieldEnd() - if self.auth is not None: - oprot.writeFieldBegin('auth', TType.STRUCT, 3) - self.auth.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.tid) - value = (value * 31) ^ hash(self.pwd) - value = (value * 31) ^ hash(self.auth) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timRemoteUserAuth_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (TimRemoteUserBean, TimRemoteUserBean.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = TimRemoteUserBean() - self.success.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timRemoteUserAuth_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timRemoteUserGet_args: - """ - Attributes: - - tid - - auth - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'tid', (Tid, Tid.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'auth', (TimAuth, TimAuth.thrift_spec), None, ), # 2 - ) - - def __init__(self, tid=None, auth=None,): - self.tid = tid - self.auth = auth - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.tid = Tid() - self.tid.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.auth = TimAuth() - self.auth.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timRemoteUserGet_args') - if self.tid is not None: - oprot.writeFieldBegin('tid', TType.STRUCT, 1) - self.tid.write(oprot) - oprot.writeFieldEnd() - if self.auth is not None: - oprot.writeFieldBegin('auth', TType.STRUCT, 2) - self.auth.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.tid) - value = (value * 31) ^ hash(self.auth) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timRemoteUserGet_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (TimRemoteUserBean, TimRemoteUserBean.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = TimRemoteUserBean() - self.success.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timRemoteUserGet_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timRemoteUserEdit_args: - """ - Attributes: - - tid - - ub - - auth - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'tid', (Tid, Tid.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'ub', (TimUserBean, TimUserBean.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'auth', (TimAuth, TimAuth.thrift_spec), None, ), # 3 - ) - - def __init__(self, tid=None, ub=None, auth=None,): - self.tid = tid - self.ub = ub - self.auth = auth - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.tid = Tid() - self.tid.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.ub = TimUserBean() - self.ub.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.auth = TimAuth() - self.auth.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timRemoteUserEdit_args') - if self.tid is not None: - oprot.writeFieldBegin('tid', TType.STRUCT, 1) - self.tid.write(oprot) - oprot.writeFieldEnd() - if self.ub is not None: - oprot.writeFieldBegin('ub', TType.STRUCT, 2) - self.ub.write(oprot) - oprot.writeFieldEnd() - if self.auth is not None: - oprot.writeFieldBegin('auth', TType.STRUCT, 3) - self.auth.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.tid) - value = (value * 31) ^ hash(self.ub) - value = (value * 31) ^ hash(self.auth) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timRemoteUserEdit_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (TimRemoteUserBean, TimRemoteUserBean.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = TimRemoteUserBean() - self.success.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timRemoteUserEdit_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timResponsePresence_args: - """ - Attributes: - - pbean - - auth - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'pbean', (TimPBean, TimPBean.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'auth', (TimAuth, TimAuth.thrift_spec), None, ), # 2 - ) - - def __init__(self, pbean=None, auth=None,): - self.pbean = pbean - self.auth = auth - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.pbean = TimPBean() - self.pbean.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.auth = TimAuth() - self.auth.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timResponsePresence_args') - if self.pbean is not None: - oprot.writeFieldBegin('pbean', TType.STRUCT, 1) - self.pbean.write(oprot) - oprot.writeFieldEnd() - if self.auth is not None: - oprot.writeFieldBegin('auth', TType.STRUCT, 2) - self.auth.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.pbean) - value = (value * 31) ^ hash(self.auth) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timResponsePresence_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (TimResponseBean, TimResponseBean.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = TimResponseBean() - self.success.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timResponsePresence_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timResponseMessage_args: - """ - Attributes: - - mbean - - auth - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'mbean', (TimMBean, TimMBean.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'auth', (TimAuth, TimAuth.thrift_spec), None, ), # 2 - ) - - def __init__(self, mbean=None, auth=None,): - self.mbean = mbean - self.auth = auth - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.mbean = TimMBean() - self.mbean.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.auth = TimAuth() - self.auth.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timResponseMessage_args') - if self.mbean is not None: - oprot.writeFieldBegin('mbean', TType.STRUCT, 1) - self.mbean.write(oprot) - oprot.writeFieldEnd() - if self.auth is not None: - oprot.writeFieldBegin('auth', TType.STRUCT, 2) - self.auth.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.mbean) - value = (value * 31) ^ hash(self.auth) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timResponseMessage_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (TimResponseBean, TimResponseBean.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = TimResponseBean() - self.success.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timResponseMessage_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timResponseMessageIq_args: - """ - Attributes: - - timMsgIq - - iqType - - auth - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'timMsgIq', (TimMessageIq, TimMessageIq.thrift_spec), None, ), # 1 - (2, TType.STRING, 'iqType', None, None, ), # 2 - (3, TType.STRUCT, 'auth', (TimAuth, TimAuth.thrift_spec), None, ), # 3 - ) - - def __init__(self, timMsgIq=None, iqType=None, auth=None,): - self.timMsgIq = timMsgIq - self.iqType = iqType - self.auth = auth - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.timMsgIq = TimMessageIq() - self.timMsgIq.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.iqType = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.auth = TimAuth() - self.auth.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timResponseMessageIq_args') - if self.timMsgIq is not None: - oprot.writeFieldBegin('timMsgIq', TType.STRUCT, 1) - self.timMsgIq.write(oprot) - oprot.writeFieldEnd() - if self.iqType is not None: - oprot.writeFieldBegin('iqType', TType.STRING, 2) - oprot.writeString(self.iqType) - oprot.writeFieldEnd() - if self.auth is not None: - oprot.writeFieldBegin('auth', TType.STRUCT, 3) - self.auth.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.timMsgIq) - value = (value * 31) ^ hash(self.iqType) - value = (value * 31) ^ hash(self.auth) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timResponseMessageIq_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (TimMBeanList, TimMBeanList.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = TimMBeanList() - self.success.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timResponseMessageIq_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timResponsePresenceList_args: - """ - Attributes: - - pbeanList - - auth - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'pbeanList', (TimPBeanList, TimPBeanList.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'auth', (TimAuth, TimAuth.thrift_spec), None, ), # 2 - ) - - def __init__(self, pbeanList=None, auth=None,): - self.pbeanList = pbeanList - self.auth = auth - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.pbeanList = TimPBeanList() - self.pbeanList.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.auth = TimAuth() - self.auth.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timResponsePresenceList_args') - if self.pbeanList is not None: - oprot.writeFieldBegin('pbeanList', TType.STRUCT, 1) - self.pbeanList.write(oprot) - oprot.writeFieldEnd() - if self.auth is not None: - oprot.writeFieldBegin('auth', TType.STRUCT, 2) - self.auth.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.pbeanList) - value = (value * 31) ^ hash(self.auth) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timResponsePresenceList_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (TimResponseBean, TimResponseBean.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = TimResponseBean() - self.success.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timResponsePresenceList_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timResponseMessageList_args: - """ - Attributes: - - mbeanList - - auth - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'mbeanList', (TimMBeanList, TimMBeanList.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'auth', (TimAuth, TimAuth.thrift_spec), None, ), # 2 - ) - - def __init__(self, mbeanList=None, auth=None,): - self.mbeanList = mbeanList - self.auth = auth - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.mbeanList = TimMBeanList() - self.mbeanList.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.auth = TimAuth() - self.auth.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timResponseMessageList_args') - if self.mbeanList is not None: - oprot.writeFieldBegin('mbeanList', TType.STRUCT, 1) - self.mbeanList.write(oprot) - oprot.writeFieldEnd() - if self.auth is not None: - oprot.writeFieldBegin('auth', TType.STRUCT, 2) - self.auth.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.mbeanList) - value = (value * 31) ^ hash(self.auth) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class timResponseMessageList_result: - """ - Attributes: - - success - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (TimResponseBean, TimResponseBean.thrift_spec), None, ), # 0 - ) - - def __init__(self, success=None,): - self.success = success - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = TimResponseBean() - self.success.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('timResponseMessageList_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) + def __init__(self, mbeanList=None, auth=None,): + self.mbeanList = mbeanList + self.auth = auth + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.mbeanList = TimMBeanList() + self.mbeanList.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.auth = TimAuth() + self.auth.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timResponseMessageList_args') + if self.mbeanList is not None: + oprot.writeFieldBegin('mbeanList', TType.STRUCT, 1) + self.mbeanList.write(oprot) + oprot.writeFieldEnd() + if self.auth is not None: + oprot.writeFieldBegin('auth', TType.STRUCT, 2) + self.auth.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timResponseMessageList_args) +timResponseMessageList_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'mbeanList', [TimMBeanList, None], None, ), # 1 + (2, TType.STRUCT, 'auth', [TimAuth, None], None, ), # 2 +) + + +class timResponseMessageList_result(object): + """ + Attributes: + - success + + """ + + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = TimResponseBean() + self.success.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('timResponseMessageList_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(timResponseMessageList_result) +timResponseMessageList_result.thrift_spec = ( + (0, TType.STRUCT, 'success', [TimResponseBean, None], None, ), # 0 +) +fix_spec(all_structs) +del all_structs diff --git a/protocols/gen-py/tim/constants.py b/protocols/gen-py/tim/constants.py index fc1f48a..e82b368 100644 --- a/protocols/gen-py/tim/constants.py +++ b/protocols/gen-py/tim/constants.py @@ -1,14 +1,17 @@ # -# Autogenerated by Thrift Compiler (0.9.3) +# Autogenerated by Thrift Compiler (0.17.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # -from thrift.Thrift import TType, TMessageType, TException, TApplicationException -from ttypes import * +from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException +from thrift.protocol.TProtocol import TProtocolException +from thrift.TRecursive import fix_spec +import sys +from .ttypes import * protocolversion = 4 protocolversionName = "1.1.0" TIM_SC_SUCCESS = "200" diff --git a/protocols/gen-py/tim/ttypes.py b/protocols/gen-py/tim/ttypes.py index c061c79..b32ace0 100644 --- a/protocols/gen-py/tim/ttypes.py +++ b/protocols/gen-py/tim/ttypes.py @@ -1,3474 +1,3291 @@ # -# Autogenerated by Thrift Compiler (0.9.3) +# Autogenerated by Thrift Compiler (0.17.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # -from thrift.Thrift import TType, TMessageType, TException, TApplicationException +from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException +from thrift.protocol.TProtocol import TProtocolException +from thrift.TRecursive import fix_spec + +import sys from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol, TProtocol -try: - from thrift.protocol import fastbinary -except: - fastbinary = None - - - -class TimError: - """ - Attributes: - - errCode: 错误码 - - errMsg: 错误内容 - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'errCode', None, None, ), # 1 - (2, TType.STRING, 'errMsg', None, None, ), # 2 - ) - - def __init__(self, errCode=None, errMsg=None,): - self.errCode = errCode - self.errMsg = errMsg - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I32: - self.errCode = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.errMsg = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TimError') - if self.errCode is not None: - oprot.writeFieldBegin('errCode', TType.I32, 1) - oprot.writeI32(self.errCode) - oprot.writeFieldEnd() - if self.errMsg is not None: - oprot.writeFieldBegin('errMsg', TType.STRING, 2) - oprot.writeString(self.errMsg) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.errCode) - value = (value * 31) ^ hash(self.errMsg) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TimNode: - """ - Attributes: - - key: 键 - - value: 值 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'key', None, None, ), # 1 - (2, TType.STRING, 'value', None, None, ), # 2 - ) - - def __init__(self, key=None, value=None,): - self.key = key - self.value = value - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.key = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.value = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TimNode') - if self.key is not None: - oprot.writeFieldBegin('key', TType.STRING, 1) - oprot.writeString(self.key) - oprot.writeFieldEnd() - if self.value is not None: - oprot.writeFieldBegin('value', TType.STRING, 2) - oprot.writeString(self.value) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.key) - value = (value * 31) ^ hash(self.value) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TimAckBean: - """ - Attributes: - - id: id,返回所要回执协议的线程id - - ackType: 类型,自定义 如:ping,message等 - - ackStatus: 状态,如成功,失败等 - - extraList: 附加信息 - - err: 错误信息 - - extraMap - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'id', None, None, ), # 1 - (2, TType.STRING, 'ackType', None, None, ), # 2 - (3, TType.STRING, 'ackStatus', None, None, ), # 3 - (4, TType.LIST, 'extraList', (TType.STRUCT,(TimNode, TimNode.thrift_spec)), None, ), # 4 - (5, TType.STRUCT, 'err', (TimError, TimError.thrift_spec), None, ), # 5 - (6, TType.MAP, 'extraMap', (TType.STRING,None,TType.STRING,None), None, ), # 6 - ) - - def __init__(self, id=None, ackType=None, ackStatus=None, extraList=None, err=None, extraMap=None,): - self.id = id - self.ackType = ackType - self.ackStatus = ackStatus - self.extraList = extraList - self.err = err - self.extraMap = extraMap - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.id = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.ackType = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.ackStatus = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.LIST: - self.extraList = [] - (_etype3, _size0) = iprot.readListBegin() - for _i4 in xrange(_size0): - _elem5 = TimNode() - _elem5.read(iprot) - self.extraList.append(_elem5) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRUCT: - self.err = TimError() - self.err.read(iprot) - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.MAP: - self.extraMap = {} - (_ktype7, _vtype8, _size6 ) = iprot.readMapBegin() - for _i10 in xrange(_size6): - _key11 = iprot.readString() - _val12 = iprot.readString() - self.extraMap[_key11] = _val12 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TimAckBean') - if self.id is not None: - oprot.writeFieldBegin('id', TType.STRING, 1) - oprot.writeString(self.id) - oprot.writeFieldEnd() - if self.ackType is not None: - oprot.writeFieldBegin('ackType', TType.STRING, 2) - oprot.writeString(self.ackType) - oprot.writeFieldEnd() - if self.ackStatus is not None: - oprot.writeFieldBegin('ackStatus', TType.STRING, 3) - oprot.writeString(self.ackStatus) - oprot.writeFieldEnd() - if self.extraList is not None: - oprot.writeFieldBegin('extraList', TType.LIST, 4) - oprot.writeListBegin(TType.STRUCT, len(self.extraList)) - for iter13 in self.extraList: - iter13.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.err is not None: - oprot.writeFieldBegin('err', TType.STRUCT, 5) - self.err.write(oprot) - oprot.writeFieldEnd() - if self.extraMap is not None: - oprot.writeFieldBegin('extraMap', TType.MAP, 6) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) - for kiter14,viter15 in self.extraMap.items(): - oprot.writeString(kiter14) - oprot.writeString(viter15) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.id) - value = (value * 31) ^ hash(self.ackType) - value = (value * 31) ^ hash(self.ackStatus) - value = (value * 31) ^ hash(self.extraList) - value = (value * 31) ^ hash(self.err) - value = (value * 31) ^ hash(self.extraMap) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TimHBean: - """ - Attributes: - - chl: 渠道 - - platform: 平台 - - version: version 客户端协议版本 - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'chl', None, None, ), # 1 - (2, TType.I32, 'platform', None, None, ), # 2 - (3, TType.I16, 'version', None, None, ), # 3 - ) - - def __init__(self, chl=None, platform=None, version=None,): - self.chl = chl - self.platform = platform - self.version = version - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I32: - self.chl = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.platform = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I16: - self.version = iprot.readI16() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TimHBean') - if self.chl is not None: - oprot.writeFieldBegin('chl', TType.I32, 1) - oprot.writeI32(self.chl) - oprot.writeFieldEnd() - if self.platform is not None: - oprot.writeFieldBegin('platform', TType.I32, 2) - oprot.writeI32(self.platform) - oprot.writeFieldEnd() - if self.version is not None: - oprot.writeFieldBegin('version', TType.I16, 3) - oprot.writeI16(self.version) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.chl is None: - raise TProtocol.TProtocolException(message='Required field chl is unset!') - if self.version is None: - raise TProtocol.TProtocolException(message='Required field version is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.chl) - value = (value * 31) ^ hash(self.platform) - value = (value * 31) ^ hash(self.version) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TimParam: - """ - Attributes: - - timestamp: 服务器时间 - - version: 版本 - - lang: 语言 - - extraList: 附加信息 - - extraMap - - interflow: 消息合流 - - tls: tls - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'timestamp', None, None, ), # 1 - (2, TType.I16, 'version', None, None, ), # 2 - (3, TType.STRING, 'lang', None, None, ), # 3 - (4, TType.LIST, 'extraList', (TType.STRUCT,(TimNode, TimNode.thrift_spec)), None, ), # 4 - (5, TType.MAP, 'extraMap', (TType.STRING,None,TType.STRING,None), None, ), # 5 - (6, TType.STRING, 'interflow', None, None, ), # 6 - (7, TType.STRING, 'tls', None, None, ), # 7 - ) - - def __init__(self, timestamp=None, version=None, lang=None, extraList=None, extraMap=None, interflow=None, tls=None,): - self.timestamp = timestamp - self.version = version - self.lang = lang - self.extraList = extraList - self.extraMap = extraMap - self.interflow = interflow - self.tls = tls - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.timestamp = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I16: - self.version = iprot.readI16() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.lang = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.LIST: - self.extraList = [] - (_etype19, _size16) = iprot.readListBegin() - for _i20 in xrange(_size16): - _elem21 = TimNode() - _elem21.read(iprot) - self.extraList.append(_elem21) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.MAP: - self.extraMap = {} - (_ktype23, _vtype24, _size22 ) = iprot.readMapBegin() - for _i26 in xrange(_size22): - _key27 = iprot.readString() - _val28 = iprot.readString() - self.extraMap[_key27] = _val28 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRING: - self.interflow = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.STRING: - self.tls = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TimParam') - if self.timestamp is not None: - oprot.writeFieldBegin('timestamp', TType.STRING, 1) - oprot.writeString(self.timestamp) - oprot.writeFieldEnd() - if self.version is not None: - oprot.writeFieldBegin('version', TType.I16, 2) - oprot.writeI16(self.version) - oprot.writeFieldEnd() - if self.lang is not None: - oprot.writeFieldBegin('lang', TType.STRING, 3) - oprot.writeString(self.lang) - oprot.writeFieldEnd() - if self.extraList is not None: - oprot.writeFieldBegin('extraList', TType.LIST, 4) - oprot.writeListBegin(TType.STRUCT, len(self.extraList)) - for iter29 in self.extraList: - iter29.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.extraMap is not None: - oprot.writeFieldBegin('extraMap', TType.MAP, 5) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) - for kiter30,viter31 in self.extraMap.items(): - oprot.writeString(kiter30) - oprot.writeString(viter31) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.interflow is not None: - oprot.writeFieldBegin('interflow', TType.STRING, 6) - oprot.writeString(self.interflow) - oprot.writeFieldEnd() - if self.tls is not None: - oprot.writeFieldBegin('tls', TType.STRING, 7) - oprot.writeString(self.tls) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.timestamp) - value = (value * 31) ^ hash(self.version) - value = (value * 31) ^ hash(self.lang) - value = (value * 31) ^ hash(self.extraList) - value = (value * 31) ^ hash(self.extraMap) - value = (value * 31) ^ hash(self.interflow) - value = (value * 31) ^ hash(self.tls) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TimTime: - """ - Attributes: - - timestamp: 时间戳 (毫秒) - - formattime: 格式化时间 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'timestamp', None, None, ), # 1 - (2, TType.STRING, 'formattime', None, None, ), # 2 - ) - - def __init__(self, timestamp=None, formattime=None,): - self.timestamp = timestamp - self.formattime = formattime - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.timestamp = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.formattime = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TimTime') - if self.timestamp is not None: - oprot.writeFieldBegin('timestamp', TType.STRING, 1) - oprot.writeString(self.timestamp) - oprot.writeFieldEnd() - if self.formattime is not None: - oprot.writeFieldBegin('formattime', TType.STRING, 2) - oprot.writeString(self.formattime) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.timestamp) - value = (value * 31) ^ hash(self.formattime) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TimArea: - """ - Attributes: - - country: 国家 - - province: 省 - - city: 市 - - extraList: 附加信息:如区,镇,乡等 - - extraMap - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'country', None, None, ), # 1 - (2, TType.STRING, 'province', None, None, ), # 2 - (3, TType.STRING, 'city', None, None, ), # 3 - (4, TType.LIST, 'extraList', (TType.STRUCT,(TimNode, TimNode.thrift_spec)), None, ), # 4 - (5, TType.MAP, 'extraMap', (TType.STRING,None,TType.STRING,None), None, ), # 5 - ) - - def __init__(self, country=None, province=None, city=None, extraList=None, extraMap=None,): - self.country = country - self.province = province - self.city = city - self.extraList = extraList - self.extraMap = extraMap - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.country = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.province = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.city = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.LIST: - self.extraList = [] - (_etype35, _size32) = iprot.readListBegin() - for _i36 in xrange(_size32): - _elem37 = TimNode() - _elem37.read(iprot) - self.extraList.append(_elem37) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.MAP: - self.extraMap = {} - (_ktype39, _vtype40, _size38 ) = iprot.readMapBegin() - for _i42 in xrange(_size38): - _key43 = iprot.readString() - _val44 = iprot.readString() - self.extraMap[_key43] = _val44 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TimArea') - if self.country is not None: - oprot.writeFieldBegin('country', TType.STRING, 1) - oprot.writeString(self.country) - oprot.writeFieldEnd() - if self.province is not None: - oprot.writeFieldBegin('province', TType.STRING, 2) - oprot.writeString(self.province) - oprot.writeFieldEnd() - if self.city is not None: - oprot.writeFieldBegin('city', TType.STRING, 3) - oprot.writeString(self.city) - oprot.writeFieldEnd() - if self.extraList is not None: - oprot.writeFieldBegin('extraList', TType.LIST, 4) - oprot.writeListBegin(TType.STRUCT, len(self.extraList)) - for iter45 in self.extraList: - iter45.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.extraMap is not None: - oprot.writeFieldBegin('extraMap', TType.MAP, 5) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) - for kiter46,viter47 in self.extraMap.items(): - oprot.writeString(kiter46) - oprot.writeString(viter47) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.country) - value = (value * 31) ^ hash(self.province) - value = (value * 31) ^ hash(self.city) - value = (value * 31) ^ hash(self.extraList) - value = (value * 31) ^ hash(self.extraMap) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Tid: - """ - Attributes: - - name: 登陆名 用户登录号,房间号等 - - domain: 域名 用于区分渠道等 appid,appsecret - - resource: 系统 自行约定 如 : 1IOS,2android,3H5,4WEB 等 - - type: normal,group - - extraList: 附加信息:如传递客户端信息 iphone6,xiaomi,huawei等 - - extraMap - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.STRING, 'domain', None, None, ), # 2 - (3, TType.STRING, 'resource', None, None, ), # 3 - (4, TType.STRING, 'type', None, None, ), # 4 - (5, TType.LIST, 'extraList', (TType.STRUCT,(TimNode, TimNode.thrift_spec)), None, ), # 5 - (6, TType.MAP, 'extraMap', (TType.STRING,None,TType.STRING,None), None, ), # 6 - ) - - def __init__(self, name=None, domain=None, resource=None, type=None, extraList=None, extraMap=None,): - self.name = name - self.domain = domain - self.resource = resource - self.type = type - self.extraList = extraList - self.extraMap = extraMap - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.domain = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.resource = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.type = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.LIST: - self.extraList = [] - (_etype51, _size48) = iprot.readListBegin() - for _i52 in xrange(_size48): - _elem53 = TimNode() - _elem53.read(iprot) - self.extraList.append(_elem53) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.MAP: - self.extraMap = {} - (_ktype55, _vtype56, _size54 ) = iprot.readMapBegin() - for _i58 in xrange(_size54): - _key59 = iprot.readString() - _val60 = iprot.readString() - self.extraMap[_key59] = _val60 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('Tid') - if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) - oprot.writeFieldEnd() - if self.domain is not None: - oprot.writeFieldBegin('domain', TType.STRING, 2) - oprot.writeString(self.domain) - oprot.writeFieldEnd() - if self.resource is not None: - oprot.writeFieldBegin('resource', TType.STRING, 3) - oprot.writeString(self.resource) - oprot.writeFieldEnd() - if self.type is not None: - oprot.writeFieldBegin('type', TType.STRING, 4) - oprot.writeString(self.type) - oprot.writeFieldEnd() - if self.extraList is not None: - oprot.writeFieldBegin('extraList', TType.LIST, 5) - oprot.writeListBegin(TType.STRUCT, len(self.extraList)) - for iter61 in self.extraList: - iter61.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.extraMap is not None: - oprot.writeFieldBegin('extraMap', TType.MAP, 6) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) - for kiter62,viter63 in self.extraMap.items(): - oprot.writeString(kiter62) - oprot.writeString(viter63) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.name is None: - raise TProtocol.TProtocolException(message='Required field name is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.name) - value = (value * 31) ^ hash(self.domain) - value = (value * 31) ^ hash(self.resource) - value = (value * 31) ^ hash(self.type) - value = (value * 31) ^ hash(self.extraList) - value = (value * 31) ^ hash(self.extraMap) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TimUserBean: - """ - Attributes: - - tid: 用户bean - - nickname: 昵称 - - remarkname: 备注名称 - - brithday: 生日 2000-01-01 - - gender: 性别 自行约定 如 : 0不知,1男,2女 - - headurl: 头像地址 http://xxx.jpg - - area: 地区 - - headbyte: 头像 - - photoBytes: 其他图片 - - extraList: 扩展字段 - - extraMap - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'tid', (Tid, Tid.thrift_spec), None, ), # 1 - (2, TType.STRING, 'nickname', None, None, ), # 2 - (3, TType.STRING, 'remarkname', None, None, ), # 3 - (4, TType.STRING, 'brithday', None, None, ), # 4 - (5, TType.I16, 'gender', None, None, ), # 5 - (6, TType.STRING, 'headurl', None, None, ), # 6 - (7, TType.STRUCT, 'area', (TimArea, TimArea.thrift_spec), None, ), # 7 - (8, TType.STRING, 'headbyte', None, None, ), # 8 - (9, TType.LIST, 'photoBytes', (TType.STRING,None), None, ), # 9 - (10, TType.LIST, 'extraList', (TType.STRUCT,(TimNode, TimNode.thrift_spec)), None, ), # 10 - (11, TType.MAP, 'extraMap', (TType.STRING,None,TType.STRING,None), None, ), # 11 - ) - - def __init__(self, tid=None, nickname=None, remarkname=None, brithday=None, gender=None, headurl=None, area=None, headbyte=None, photoBytes=None, extraList=None, extraMap=None,): - self.tid = tid - self.nickname = nickname - self.remarkname = remarkname - self.brithday = brithday - self.gender = gender - self.headurl = headurl - self.area = area - self.headbyte = headbyte - self.photoBytes = photoBytes - self.extraList = extraList - self.extraMap = extraMap - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.tid = Tid() - self.tid.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.nickname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.remarkname = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.brithday = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I16: - self.gender = iprot.readI16() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRING: - self.headurl = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.STRUCT: - self.area = TimArea() - self.area.read(iprot) - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.STRING: - self.headbyte = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 9: - if ftype == TType.LIST: - self.photoBytes = [] - (_etype67, _size64) = iprot.readListBegin() - for _i68 in xrange(_size64): - _elem69 = iprot.readString() - self.photoBytes.append(_elem69) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 10: - if ftype == TType.LIST: - self.extraList = [] - (_etype73, _size70) = iprot.readListBegin() - for _i74 in xrange(_size70): - _elem75 = TimNode() - _elem75.read(iprot) - self.extraList.append(_elem75) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 11: - if ftype == TType.MAP: - self.extraMap = {} - (_ktype77, _vtype78, _size76 ) = iprot.readMapBegin() - for _i80 in xrange(_size76): - _key81 = iprot.readString() - _val82 = iprot.readString() - self.extraMap[_key81] = _val82 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TimUserBean') - if self.tid is not None: - oprot.writeFieldBegin('tid', TType.STRUCT, 1) - self.tid.write(oprot) - oprot.writeFieldEnd() - if self.nickname is not None: - oprot.writeFieldBegin('nickname', TType.STRING, 2) - oprot.writeString(self.nickname) - oprot.writeFieldEnd() - if self.remarkname is not None: - oprot.writeFieldBegin('remarkname', TType.STRING, 3) - oprot.writeString(self.remarkname) - oprot.writeFieldEnd() - if self.brithday is not None: - oprot.writeFieldBegin('brithday', TType.STRING, 4) - oprot.writeString(self.brithday) - oprot.writeFieldEnd() - if self.gender is not None: - oprot.writeFieldBegin('gender', TType.I16, 5) - oprot.writeI16(self.gender) - oprot.writeFieldEnd() - if self.headurl is not None: - oprot.writeFieldBegin('headurl', TType.STRING, 6) - oprot.writeString(self.headurl) - oprot.writeFieldEnd() - if self.area is not None: - oprot.writeFieldBegin('area', TType.STRUCT, 7) - self.area.write(oprot) - oprot.writeFieldEnd() - if self.headbyte is not None: - oprot.writeFieldBegin('headbyte', TType.STRING, 8) - oprot.writeString(self.headbyte) - oprot.writeFieldEnd() - if self.photoBytes is not None: - oprot.writeFieldBegin('photoBytes', TType.LIST, 9) - oprot.writeListBegin(TType.STRING, len(self.photoBytes)) - for iter83 in self.photoBytes: - oprot.writeString(iter83) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.extraList is not None: - oprot.writeFieldBegin('extraList', TType.LIST, 10) - oprot.writeListBegin(TType.STRUCT, len(self.extraList)) - for iter84 in self.extraList: - iter84.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.extraMap is not None: - oprot.writeFieldBegin('extraMap', TType.MAP, 11) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) - for kiter85,viter86 in self.extraMap.items(): - oprot.writeString(kiter85) - oprot.writeString(viter86) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.tid) - value = (value * 31) ^ hash(self.nickname) - value = (value * 31) ^ hash(self.remarkname) - value = (value * 31) ^ hash(self.brithday) - value = (value * 31) ^ hash(self.gender) - value = (value * 31) ^ hash(self.headurl) - value = (value * 31) ^ hash(self.area) - value = (value * 31) ^ hash(self.headbyte) - value = (value * 31) ^ hash(self.photoBytes) - value = (value * 31) ^ hash(self.extraList) - value = (value * 31) ^ hash(self.extraMap) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TimRoom: - """ - Attributes: - - tid: 房间Tid - - founderTid: 创建人Tid - - HostsTid: 主持人Tid - - membersTid: memberTid - - headurl: 头像地址 http://xxx.jpg - - roomName: 房间名称 - - desc: 房间说明 - - createTime: 房间创建时间 - - extraList: 扩展字段 - - extraMap - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'tid', (Tid, Tid.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'founderTid', (Tid, Tid.thrift_spec), None, ), # 2 - (3, TType.LIST, 'HostsTid', (TType.STRUCT,(Tid, Tid.thrift_spec)), None, ), # 3 - (4, TType.LIST, 'membersTid', (TType.STRUCT,(Tid, Tid.thrift_spec)), None, ), # 4 - (5, TType.STRING, 'headurl', None, None, ), # 5 - (6, TType.STRING, 'roomName', None, None, ), # 6 - (7, TType.STRING, 'desc', None, None, ), # 7 - (8, TType.STRUCT, 'createTime', (TimTime, TimTime.thrift_spec), None, ), # 8 - (9, TType.LIST, 'extraList', (TType.STRUCT,(TimNode, TimNode.thrift_spec)), None, ), # 9 - (10, TType.MAP, 'extraMap', (TType.STRING,None,TType.STRING,None), None, ), # 10 - ) - - def __init__(self, tid=None, founderTid=None, HostsTid=None, membersTid=None, headurl=None, roomName=None, desc=None, createTime=None, extraList=None, extraMap=None,): - self.tid = tid - self.founderTid = founderTid - self.HostsTid = HostsTid - self.membersTid = membersTid - self.headurl = headurl - self.roomName = roomName - self.desc = desc - self.createTime = createTime - self.extraList = extraList - self.extraMap = extraMap - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.tid = Tid() - self.tid.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.founderTid = Tid() - self.founderTid.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.HostsTid = [] - (_etype90, _size87) = iprot.readListBegin() - for _i91 in xrange(_size87): - _elem92 = Tid() - _elem92.read(iprot) - self.HostsTid.append(_elem92) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.LIST: - self.membersTid = [] - (_etype96, _size93) = iprot.readListBegin() - for _i97 in xrange(_size93): - _elem98 = Tid() - _elem98.read(iprot) - self.membersTid.append(_elem98) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.headurl = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRING: - self.roomName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.STRING: - self.desc = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.STRUCT: - self.createTime = TimTime() - self.createTime.read(iprot) - else: - iprot.skip(ftype) - elif fid == 9: - if ftype == TType.LIST: - self.extraList = [] - (_etype102, _size99) = iprot.readListBegin() - for _i103 in xrange(_size99): - _elem104 = TimNode() - _elem104.read(iprot) - self.extraList.append(_elem104) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 10: - if ftype == TType.MAP: - self.extraMap = {} - (_ktype106, _vtype107, _size105 ) = iprot.readMapBegin() - for _i109 in xrange(_size105): - _key110 = iprot.readString() - _val111 = iprot.readString() - self.extraMap[_key110] = _val111 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TimRoom') - if self.tid is not None: - oprot.writeFieldBegin('tid', TType.STRUCT, 1) - self.tid.write(oprot) - oprot.writeFieldEnd() - if self.founderTid is not None: - oprot.writeFieldBegin('founderTid', TType.STRUCT, 2) - self.founderTid.write(oprot) - oprot.writeFieldEnd() - if self.HostsTid is not None: - oprot.writeFieldBegin('HostsTid', TType.LIST, 3) - oprot.writeListBegin(TType.STRUCT, len(self.HostsTid)) - for iter112 in self.HostsTid: - iter112.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.membersTid is not None: - oprot.writeFieldBegin('membersTid', TType.LIST, 4) - oprot.writeListBegin(TType.STRUCT, len(self.membersTid)) - for iter113 in self.membersTid: - iter113.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.headurl is not None: - oprot.writeFieldBegin('headurl', TType.STRING, 5) - oprot.writeString(self.headurl) - oprot.writeFieldEnd() - if self.roomName is not None: - oprot.writeFieldBegin('roomName', TType.STRING, 6) - oprot.writeString(self.roomName) - oprot.writeFieldEnd() - if self.desc is not None: - oprot.writeFieldBegin('desc', TType.STRING, 7) - oprot.writeString(self.desc) - oprot.writeFieldEnd() - if self.createTime is not None: - oprot.writeFieldBegin('createTime', TType.STRUCT, 8) - self.createTime.write(oprot) - oprot.writeFieldEnd() - if self.extraList is not None: - oprot.writeFieldBegin('extraList', TType.LIST, 9) - oprot.writeListBegin(TType.STRUCT, len(self.extraList)) - for iter114 in self.extraList: - iter114.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.extraMap is not None: - oprot.writeFieldBegin('extraMap', TType.MAP, 10) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) - for kiter115,viter116 in self.extraMap.items(): - oprot.writeString(kiter115) - oprot.writeString(viter116) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.tid) - value = (value * 31) ^ hash(self.founderTid) - value = (value * 31) ^ hash(self.HostsTid) - value = (value * 31) ^ hash(self.membersTid) - value = (value * 31) ^ hash(self.headurl) - value = (value * 31) ^ hash(self.roomName) - value = (value * 31) ^ hash(self.desc) - value = (value * 31) ^ hash(self.createTime) - value = (value * 31) ^ hash(self.extraList) - value = (value * 31) ^ hash(self.extraMap) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TimPBean: - """ - Attributes: - - threadId: 标识 - - fromTid - - toTid - - status: subscribe:订阅其他用户的状态 probe:请求获取其他用户的状态 unavailable:不可用,离线(offline)状态 - - type: normal:类似于email,主要特点是不要求响应; - chat:类似于qq里的好友即时聊天,主要特点是实时通讯; - groupchat:类似于聊天室里的群聊; - headline:用于发送alert和notification; - error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; - - priority: 优先权 0 。高优先级的resource能接受发送到bare JID的消息,低优先级的resource不能 - - show: chat:聊天中 away:暂时离开 xa:eXtend Away,长时间离开 dnd:勿打扰 online:在线 offline:离线 - - leaguerTid: 成员Tid 群聊时信息发送者Tid - - extraList: 扩展字段 - - error: 错误码 - - extraMap - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'threadId', None, None, ), # 1 - (2, TType.STRUCT, 'fromTid', (Tid, Tid.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'toTid', (Tid, Tid.thrift_spec), None, ), # 3 - (4, TType.STRING, 'status', None, None, ), # 4 - (5, TType.STRING, 'type', None, None, ), # 5 - (6, TType.I32, 'priority', None, None, ), # 6 - (7, TType.STRING, 'show', None, None, ), # 7 - (8, TType.STRUCT, 'leaguerTid', (Tid, Tid.thrift_spec), None, ), # 8 - (9, TType.LIST, 'extraList', (TType.STRUCT,(TimNode, TimNode.thrift_spec)), None, ), # 9 - (10, TType.STRUCT, 'error', (TimError, TimError.thrift_spec), None, ), # 10 - (11, TType.MAP, 'extraMap', (TType.STRING,None,TType.STRING,None), None, ), # 11 - ) - - def __init__(self, threadId=None, fromTid=None, toTid=None, status=None, type=None, priority=None, show=None, leaguerTid=None, extraList=None, error=None, extraMap=None,): - self.threadId = threadId - self.fromTid = fromTid - self.toTid = toTid - self.status = status - self.type = type - self.priority = priority - self.show = show - self.leaguerTid = leaguerTid - self.extraList = extraList - self.error = error - self.extraMap = extraMap - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.threadId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.fromTid = Tid() - self.fromTid.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.toTid = Tid() - self.toTid.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.status = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.type = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.I32: - self.priority = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.STRING: - self.show = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.STRUCT: - self.leaguerTid = Tid() - self.leaguerTid.read(iprot) - else: - iprot.skip(ftype) - elif fid == 9: - if ftype == TType.LIST: - self.extraList = [] - (_etype120, _size117) = iprot.readListBegin() - for _i121 in xrange(_size117): - _elem122 = TimNode() - _elem122.read(iprot) - self.extraList.append(_elem122) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 10: - if ftype == TType.STRUCT: - self.error = TimError() - self.error.read(iprot) - else: - iprot.skip(ftype) - elif fid == 11: - if ftype == TType.MAP: - self.extraMap = {} - (_ktype124, _vtype125, _size123 ) = iprot.readMapBegin() - for _i127 in xrange(_size123): - _key128 = iprot.readString() - _val129 = iprot.readString() - self.extraMap[_key128] = _val129 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TimPBean') - if self.threadId is not None: - oprot.writeFieldBegin('threadId', TType.STRING, 1) - oprot.writeString(self.threadId) - oprot.writeFieldEnd() - if self.fromTid is not None: - oprot.writeFieldBegin('fromTid', TType.STRUCT, 2) - self.fromTid.write(oprot) - oprot.writeFieldEnd() - if self.toTid is not None: - oprot.writeFieldBegin('toTid', TType.STRUCT, 3) - self.toTid.write(oprot) - oprot.writeFieldEnd() - if self.status is not None: - oprot.writeFieldBegin('status', TType.STRING, 4) - oprot.writeString(self.status) - oprot.writeFieldEnd() - if self.type is not None: - oprot.writeFieldBegin('type', TType.STRING, 5) - oprot.writeString(self.type) - oprot.writeFieldEnd() - if self.priority is not None: - oprot.writeFieldBegin('priority', TType.I32, 6) - oprot.writeI32(self.priority) - oprot.writeFieldEnd() - if self.show is not None: - oprot.writeFieldBegin('show', TType.STRING, 7) - oprot.writeString(self.show) - oprot.writeFieldEnd() - if self.leaguerTid is not None: - oprot.writeFieldBegin('leaguerTid', TType.STRUCT, 8) - self.leaguerTid.write(oprot) - oprot.writeFieldEnd() - if self.extraList is not None: - oprot.writeFieldBegin('extraList', TType.LIST, 9) - oprot.writeListBegin(TType.STRUCT, len(self.extraList)) - for iter130 in self.extraList: - iter130.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.error is not None: - oprot.writeFieldBegin('error', TType.STRUCT, 10) - self.error.write(oprot) - oprot.writeFieldEnd() - if self.extraMap is not None: - oprot.writeFieldBegin('extraMap', TType.MAP, 11) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) - for kiter131,viter132 in self.extraMap.items(): - oprot.writeString(kiter131) - oprot.writeString(viter132) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.threadId is None: - raise TProtocol.TProtocolException(message='Required field threadId is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.threadId) - value = (value * 31) ^ hash(self.fromTid) - value = (value * 31) ^ hash(self.toTid) - value = (value * 31) ^ hash(self.status) - value = (value * 31) ^ hash(self.type) - value = (value * 31) ^ hash(self.priority) - value = (value * 31) ^ hash(self.show) - value = (value * 31) ^ hash(self.leaguerTid) - value = (value * 31) ^ hash(self.extraList) - value = (value * 31) ^ hash(self.error) - value = (value * 31) ^ hash(self.extraMap) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TimMBean: - """ - Attributes: - - threadId: 线程id - - mid: 消息id号 - - fromTid: 来源Tid - - toTid: 目标Tid - - body: 信息内容 - - type: normal:类似于email,主要特点是不要求响应; - chat:类似于qq里的好友即时聊天,主要特点是实时通讯; - groupchat:类似于聊天室里的群聊; - headline:用于发送alert和notification; - error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; - - msgType: 消息类型 1 文字 2 图片 3 语音 4视频 5混合 - - offline: 是否离线信息 - - leaguerTid: 成员Tid 群聊时信息发送者Tid - - extraList: 扩展字段 - - timestamp: 服务器发送信息时间戳(毫秒) - - error: 错误码 - - extraMap - - readstatus: 0未读 1已读 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'threadId', None, None, ), # 1 - (2, TType.STRING, 'mid', None, None, ), # 2 - (3, TType.STRUCT, 'fromTid', (Tid, Tid.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'toTid', (Tid, Tid.thrift_spec), None, ), # 4 - (5, TType.STRING, 'body', None, None, ), # 5 - (6, TType.STRING, 'type', None, None, ), # 6 - (7, TType.I16, 'msgType', None, None, ), # 7 - (8, TType.STRUCT, 'offline', (TimTime, TimTime.thrift_spec), None, ), # 8 - (9, TType.STRUCT, 'leaguerTid', (Tid, Tid.thrift_spec), None, ), # 9 - (10, TType.LIST, 'extraList', (TType.STRUCT,(TimNode, TimNode.thrift_spec)), None, ), # 10 - (11, TType.STRING, 'timestamp', None, None, ), # 11 - (12, TType.STRUCT, 'error', (TimError, TimError.thrift_spec), None, ), # 12 - (13, TType.MAP, 'extraMap', (TType.STRING,None,TType.STRING,None), None, ), # 13 - (14, TType.I16, 'readstatus', None, None, ), # 14 - ) - - def __init__(self, threadId=None, mid=None, fromTid=None, toTid=None, body=None, type=None, msgType=None, offline=None, leaguerTid=None, extraList=None, timestamp=None, error=None, extraMap=None, readstatus=None,): - self.threadId = threadId - self.mid = mid - self.fromTid = fromTid - self.toTid = toTid - self.body = body - self.type = type - self.msgType = msgType - self.offline = offline - self.leaguerTid = leaguerTid - self.extraList = extraList - self.timestamp = timestamp - self.error = error - self.extraMap = extraMap - self.readstatus = readstatus - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.threadId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.mid = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.fromTid = Tid() - self.fromTid.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.toTid = Tid() - self.toTid.read(iprot) - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.body = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRING: - self.type = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.I16: - self.msgType = iprot.readI16() - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.STRUCT: - self.offline = TimTime() - self.offline.read(iprot) - else: - iprot.skip(ftype) - elif fid == 9: - if ftype == TType.STRUCT: - self.leaguerTid = Tid() - self.leaguerTid.read(iprot) - else: - iprot.skip(ftype) - elif fid == 10: - if ftype == TType.LIST: - self.extraList = [] - (_etype136, _size133) = iprot.readListBegin() - for _i137 in xrange(_size133): - _elem138 = TimNode() - _elem138.read(iprot) - self.extraList.append(_elem138) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 11: - if ftype == TType.STRING: - self.timestamp = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 12: - if ftype == TType.STRUCT: - self.error = TimError() - self.error.read(iprot) - else: - iprot.skip(ftype) - elif fid == 13: - if ftype == TType.MAP: - self.extraMap = {} - (_ktype140, _vtype141, _size139 ) = iprot.readMapBegin() - for _i143 in xrange(_size139): - _key144 = iprot.readString() - _val145 = iprot.readString() - self.extraMap[_key144] = _val145 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 14: - if ftype == TType.I16: - self.readstatus = iprot.readI16() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TimMBean') - if self.threadId is not None: - oprot.writeFieldBegin('threadId', TType.STRING, 1) - oprot.writeString(self.threadId) - oprot.writeFieldEnd() - if self.mid is not None: - oprot.writeFieldBegin('mid', TType.STRING, 2) - oprot.writeString(self.mid) - oprot.writeFieldEnd() - if self.fromTid is not None: - oprot.writeFieldBegin('fromTid', TType.STRUCT, 3) - self.fromTid.write(oprot) - oprot.writeFieldEnd() - if self.toTid is not None: - oprot.writeFieldBegin('toTid', TType.STRUCT, 4) - self.toTid.write(oprot) - oprot.writeFieldEnd() - if self.body is not None: - oprot.writeFieldBegin('body', TType.STRING, 5) - oprot.writeString(self.body) - oprot.writeFieldEnd() - if self.type is not None: - oprot.writeFieldBegin('type', TType.STRING, 6) - oprot.writeString(self.type) - oprot.writeFieldEnd() - if self.msgType is not None: - oprot.writeFieldBegin('msgType', TType.I16, 7) - oprot.writeI16(self.msgType) - oprot.writeFieldEnd() - if self.offline is not None: - oprot.writeFieldBegin('offline', TType.STRUCT, 8) - self.offline.write(oprot) - oprot.writeFieldEnd() - if self.leaguerTid is not None: - oprot.writeFieldBegin('leaguerTid', TType.STRUCT, 9) - self.leaguerTid.write(oprot) - oprot.writeFieldEnd() - if self.extraList is not None: - oprot.writeFieldBegin('extraList', TType.LIST, 10) - oprot.writeListBegin(TType.STRUCT, len(self.extraList)) - for iter146 in self.extraList: - iter146.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.timestamp is not None: - oprot.writeFieldBegin('timestamp', TType.STRING, 11) - oprot.writeString(self.timestamp) - oprot.writeFieldEnd() - if self.error is not None: - oprot.writeFieldBegin('error', TType.STRUCT, 12) - self.error.write(oprot) - oprot.writeFieldEnd() - if self.extraMap is not None: - oprot.writeFieldBegin('extraMap', TType.MAP, 13) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) - for kiter147,viter148 in self.extraMap.items(): - oprot.writeString(kiter147) - oprot.writeString(viter148) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.readstatus is not None: - oprot.writeFieldBegin('readstatus', TType.I16, 14) - oprot.writeI16(self.readstatus) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.threadId is None: - raise TProtocol.TProtocolException(message='Required field threadId is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.threadId) - value = (value * 31) ^ hash(self.mid) - value = (value * 31) ^ hash(self.fromTid) - value = (value * 31) ^ hash(self.toTid) - value = (value * 31) ^ hash(self.body) - value = (value * 31) ^ hash(self.type) - value = (value * 31) ^ hash(self.msgType) - value = (value * 31) ^ hash(self.offline) - value = (value * 31) ^ hash(self.leaguerTid) - value = (value * 31) ^ hash(self.extraList) - value = (value * 31) ^ hash(self.timestamp) - value = (value * 31) ^ hash(self.error) - value = (value * 31) ^ hash(self.extraMap) - value = (value * 31) ^ hash(self.readstatus) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TimIqBean: - """ - Attributes: - - threadId: 线程id - - fromTid - - toTid - - type: Get :获取当前域值。类似于http get方法 - Set :设置或替换get查询的值。类似于http put方法。 - Result :说明成功的响应了先前的查询。类似于http状态码200。 - Error: 查询和响应中出现的错误。 - - extraList: 扩展字段 - - error: 错误码 - - extraMap - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'threadId', None, None, ), # 1 - (2, TType.STRUCT, 'fromTid', (Tid, Tid.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'toTid', (Tid, Tid.thrift_spec), None, ), # 3 - (4, TType.STRING, 'type', None, None, ), # 4 - (5, TType.LIST, 'extraList', (TType.STRUCT,(TimNode, TimNode.thrift_spec)), None, ), # 5 - (6, TType.STRUCT, 'error', (TimError, TimError.thrift_spec), None, ), # 6 - (7, TType.MAP, 'extraMap', (TType.STRING,None,TType.STRING,None), None, ), # 7 - ) - - def __init__(self, threadId=None, fromTid=None, toTid=None, type=None, extraList=None, error=None, extraMap=None,): - self.threadId = threadId - self.fromTid = fromTid - self.toTid = toTid - self.type = type - self.extraList = extraList - self.error = error - self.extraMap = extraMap - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.threadId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.fromTid = Tid() - self.fromTid.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.toTid = Tid() - self.toTid.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.type = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.LIST: - self.extraList = [] - (_etype152, _size149) = iprot.readListBegin() - for _i153 in xrange(_size149): - _elem154 = TimNode() - _elem154.read(iprot) - self.extraList.append(_elem154) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRUCT: - self.error = TimError() - self.error.read(iprot) - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.MAP: - self.extraMap = {} - (_ktype156, _vtype157, _size155 ) = iprot.readMapBegin() - for _i159 in xrange(_size155): - _key160 = iprot.readString() - _val161 = iprot.readString() - self.extraMap[_key160] = _val161 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TimIqBean') - if self.threadId is not None: - oprot.writeFieldBegin('threadId', TType.STRING, 1) - oprot.writeString(self.threadId) - oprot.writeFieldEnd() - if self.fromTid is not None: - oprot.writeFieldBegin('fromTid', TType.STRUCT, 2) - self.fromTid.write(oprot) - oprot.writeFieldEnd() - if self.toTid is not None: - oprot.writeFieldBegin('toTid', TType.STRUCT, 3) - self.toTid.write(oprot) - oprot.writeFieldEnd() - if self.type is not None: - oprot.writeFieldBegin('type', TType.STRING, 4) - oprot.writeString(self.type) - oprot.writeFieldEnd() - if self.extraList is not None: - oprot.writeFieldBegin('extraList', TType.LIST, 5) - oprot.writeListBegin(TType.STRUCT, len(self.extraList)) - for iter162 in self.extraList: - iter162.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.error is not None: - oprot.writeFieldBegin('error', TType.STRUCT, 6) - self.error.write(oprot) - oprot.writeFieldEnd() - if self.extraMap is not None: - oprot.writeFieldBegin('extraMap', TType.MAP, 7) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) - for kiter163,viter164 in self.extraMap.items(): - oprot.writeString(kiter163) - oprot.writeString(viter164) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.threadId is None: - raise TProtocol.TProtocolException(message='Required field threadId is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.threadId) - value = (value * 31) ^ hash(self.fromTid) - value = (value * 31) ^ hash(self.toTid) - value = (value * 31) ^ hash(self.type) - value = (value * 31) ^ hash(self.extraList) - value = (value * 31) ^ hash(self.error) - value = (value * 31) ^ hash(self.extraMap) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TimRoster: - """ - Attributes: - - subscription: none表示用户和contact之前没有任何的关系(虽然在server的buddy list中存在) - to表示用户能看到contact的presence,但是contact看不到用户的Presence - from和to的含义相反,指用户看不到contact的presence,但是contact可以看到 - both表示相关之间都能看到对方的presence - - tid - - name: 用户名 - - extraMap - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'subscription', None, None, ), # 1 - (2, TType.STRUCT, 'tid', (Tid, Tid.thrift_spec), None, ), # 2 - (3, TType.STRING, 'name', None, None, ), # 3 - (4, TType.MAP, 'extraMap', (TType.STRING,None,TType.STRING,None), None, ), # 4 - ) - - def __init__(self, subscription=None, tid=None, name=None, extraMap=None,): - self.subscription = subscription - self.tid = tid - self.name = name - self.extraMap = extraMap - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.subscription = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.tid = Tid() - self.tid.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.name = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.MAP: - self.extraMap = {} - (_ktype166, _vtype167, _size165 ) = iprot.readMapBegin() - for _i169 in xrange(_size165): - _key170 = iprot.readString() - _val171 = iprot.readString() - self.extraMap[_key170] = _val171 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TimRoster') - if self.subscription is not None: - oprot.writeFieldBegin('subscription', TType.STRING, 1) - oprot.writeString(self.subscription) - oprot.writeFieldEnd() - if self.tid is not None: - oprot.writeFieldBegin('tid', TType.STRUCT, 2) - self.tid.write(oprot) - oprot.writeFieldEnd() - if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 3) - oprot.writeString(self.name) - oprot.writeFieldEnd() - if self.extraMap is not None: - oprot.writeFieldBegin('extraMap', TType.MAP, 4) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) - for kiter172,viter173 in self.extraMap.items(): - oprot.writeString(kiter172) - oprot.writeString(viter173) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.subscription is None: - raise TProtocol.TProtocolException(message='Required field subscription is unset!') - if self.tid is None: - raise TProtocol.TProtocolException(message='Required field tid is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.subscription) - value = (value * 31) ^ hash(self.tid) - value = (value * 31) ^ hash(self.name) - value = (value * 31) ^ hash(self.extraMap) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TimRemoteUserBean: - """ - Attributes: - - error: 错误码 - - ub: 远程用户信息 - - extraMap - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'error', (TimError, TimError.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'ub', (TimUserBean, TimUserBean.thrift_spec), None, ), # 2 - (3, TType.MAP, 'extraMap', (TType.STRING,None,TType.STRING,None), None, ), # 3 - ) - - def __init__(self, error=None, ub=None, extraMap=None,): - self.error = error - self.ub = ub - self.extraMap = extraMap - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.error = TimError() - self.error.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.ub = TimUserBean() - self.ub.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.MAP: - self.extraMap = {} - (_ktype175, _vtype176, _size174 ) = iprot.readMapBegin() - for _i178 in xrange(_size174): - _key179 = iprot.readString() - _val180 = iprot.readString() - self.extraMap[_key179] = _val180 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TimRemoteUserBean') - if self.error is not None: - oprot.writeFieldBegin('error', TType.STRUCT, 1) - self.error.write(oprot) - oprot.writeFieldEnd() - if self.ub is not None: - oprot.writeFieldBegin('ub', TType.STRUCT, 2) - self.ub.write(oprot) - oprot.writeFieldEnd() - if self.extraMap is not None: - oprot.writeFieldBegin('extraMap', TType.MAP, 3) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) - for kiter181,viter182 in self.extraMap.items(): - oprot.writeString(kiter181) - oprot.writeString(viter182) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.error) - value = (value * 31) ^ hash(self.ub) - value = (value * 31) ^ hash(self.extraMap) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TimRemoteRoom: - """ - Attributes: - - error: 错误码 - - room: 远程房间信息 - - extraMap - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'error', (TimError, TimError.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'room', (TimRoom, TimRoom.thrift_spec), None, ), # 2 - (3, TType.MAP, 'extraMap', (TType.STRING,None,TType.STRING,None), None, ), # 3 - ) - - def __init__(self, error=None, room=None, extraMap=None,): - self.error = error - self.room = room - self.extraMap = extraMap - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.error = TimError() - self.error.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.room = TimRoom() - self.room.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.MAP: - self.extraMap = {} - (_ktype184, _vtype185, _size183 ) = iprot.readMapBegin() - for _i187 in xrange(_size183): - _key188 = iprot.readString() - _val189 = iprot.readString() - self.extraMap[_key188] = _val189 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TimRemoteRoom') - if self.error is not None: - oprot.writeFieldBegin('error', TType.STRUCT, 1) - self.error.write(oprot) - oprot.writeFieldEnd() - if self.room is not None: - oprot.writeFieldBegin('room', TType.STRUCT, 2) - self.room.write(oprot) - oprot.writeFieldEnd() - if self.extraMap is not None: - oprot.writeFieldBegin('extraMap', TType.MAP, 3) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) - for kiter190,viter191 in self.extraMap.items(): - oprot.writeString(kiter190) - oprot.writeString(viter191) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.error) - value = (value * 31) ^ hash(self.room) - value = (value * 31) ^ hash(self.extraMap) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TimResponseBean: - """ - Attributes: - - threadId - - error: 错误码 - - extraList: 附加信息 - - extraMap - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'threadId', None, None, ), # 1 - (2, TType.STRUCT, 'error', (TimError, TimError.thrift_spec), None, ), # 2 - (3, TType.LIST, 'extraList', (TType.STRUCT,(TimNode, TimNode.thrift_spec)), None, ), # 3 - (4, TType.MAP, 'extraMap', (TType.STRING,None,TType.STRING,None), None, ), # 4 - ) - - def __init__(self, threadId=None, error=None, extraList=None, extraMap=None,): - self.threadId = threadId - self.error = error - self.extraList = extraList - self.extraMap = extraMap - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.threadId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.error = TimError() - self.error.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.extraList = [] - (_etype195, _size192) = iprot.readListBegin() - for _i196 in xrange(_size192): - _elem197 = TimNode() - _elem197.read(iprot) - self.extraList.append(_elem197) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.MAP: - self.extraMap = {} - (_ktype199, _vtype200, _size198 ) = iprot.readMapBegin() - for _i202 in xrange(_size198): - _key203 = iprot.readString() - _val204 = iprot.readString() - self.extraMap[_key203] = _val204 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TimResponseBean') - if self.threadId is not None: - oprot.writeFieldBegin('threadId', TType.STRING, 1) - oprot.writeString(self.threadId) - oprot.writeFieldEnd() - if self.error is not None: - oprot.writeFieldBegin('error', TType.STRUCT, 2) - self.error.write(oprot) - oprot.writeFieldEnd() - if self.extraList is not None: - oprot.writeFieldBegin('extraList', TType.LIST, 3) - oprot.writeListBegin(TType.STRUCT, len(self.extraList)) - for iter205 in self.extraList: - iter205.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.extraMap is not None: - oprot.writeFieldBegin('extraMap', TType.MAP, 4) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) - for kiter206,viter207 in self.extraMap.items(): - oprot.writeString(kiter206) - oprot.writeString(viter207) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.threadId) - value = (value * 31) ^ hash(self.error) - value = (value * 31) ^ hash(self.extraList) - value = (value * 31) ^ hash(self.extraMap) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TimSock5Bean: - """ - Attributes: - - fromTid - - toTid - - addr: ip地址 - - port: 端口 - - transport: 传输类型 1:tcp 2:udp - - pubId: 发布id 通过发布id 可以连接两个发布id相同的用户 - - extraMap - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'fromTid', (Tid, Tid.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'toTid', (Tid, Tid.thrift_spec), None, ), # 2 - (3, TType.STRING, 'addr', None, None, ), # 3 - (4, TType.I32, 'port', None, None, ), # 4 - (5, TType.I16, 'transport', None, None, ), # 5 - (6, TType.STRING, 'pubId', None, None, ), # 6 - (7, TType.MAP, 'extraMap', (TType.STRING,None,TType.STRING,None), None, ), # 7 - ) - - def __init__(self, fromTid=None, toTid=None, addr=None, port=None, transport=None, pubId=None, extraMap=None,): - self.fromTid = fromTid - self.toTid = toTid - self.addr = addr - self.port = port - self.transport = transport - self.pubId = pubId - self.extraMap = extraMap - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.fromTid = Tid() - self.fromTid.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.toTid = Tid() - self.toTid.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.addr = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I32: - self.port = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I16: - self.transport = iprot.readI16() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRING: - self.pubId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.MAP: - self.extraMap = {} - (_ktype209, _vtype210, _size208 ) = iprot.readMapBegin() - for _i212 in xrange(_size208): - _key213 = iprot.readString() - _val214 = iprot.readString() - self.extraMap[_key213] = _val214 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TimSock5Bean') - if self.fromTid is not None: - oprot.writeFieldBegin('fromTid', TType.STRUCT, 1) - self.fromTid.write(oprot) - oprot.writeFieldEnd() - if self.toTid is not None: - oprot.writeFieldBegin('toTid', TType.STRUCT, 2) - self.toTid.write(oprot) - oprot.writeFieldEnd() - if self.addr is not None: - oprot.writeFieldBegin('addr', TType.STRING, 3) - oprot.writeString(self.addr) - oprot.writeFieldEnd() - if self.port is not None: - oprot.writeFieldBegin('port', TType.I32, 4) - oprot.writeI32(self.port) - oprot.writeFieldEnd() - if self.transport is not None: - oprot.writeFieldBegin('transport', TType.I16, 5) - oprot.writeI16(self.transport) - oprot.writeFieldEnd() - if self.pubId is not None: - oprot.writeFieldBegin('pubId', TType.STRING, 6) - oprot.writeString(self.pubId) - oprot.writeFieldEnd() - if self.extraMap is not None: - oprot.writeFieldBegin('extraMap', TType.MAP, 7) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) - for kiter215,viter216 in self.extraMap.items(): - oprot.writeString(kiter215) - oprot.writeString(viter216) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.fromTid is None: - raise TProtocol.TProtocolException(message='Required field fromTid is unset!') - if self.toTid is None: - raise TProtocol.TProtocolException(message='Required field toTid is unset!') - if self.addr is None: - raise TProtocol.TProtocolException(message='Required field addr is unset!') - if self.port is None: - raise TProtocol.TProtocolException(message='Required field port is unset!') - if self.transport is None: - raise TProtocol.TProtocolException(message='Required field transport is unset!') - if self.pubId is None: - raise TProtocol.TProtocolException(message='Required field pubId is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.fromTid) - value = (value * 31) ^ hash(self.toTid) - value = (value * 31) ^ hash(self.addr) - value = (value * 31) ^ hash(self.port) - value = (value * 31) ^ hash(self.transport) - value = (value * 31) ^ hash(self.pubId) - value = (value * 31) ^ hash(self.extraMap) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TimSock5Bytes: - """ - Attributes: - - pubId: 发布id - - index: 序号数据块 - - bytes: 数据块 - - extraMap - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'pubId', None, None, ), # 1 - (2, TType.I32, 'index', None, None, ), # 2 - (3, TType.LIST, 'bytes', (TType.STRING,None), None, ), # 3 - (4, TType.MAP, 'extraMap', (TType.STRING,None,TType.STRING,None), None, ), # 4 - ) - - def __init__(self, pubId=None, index=None, bytes=None, extraMap=None,): - self.pubId = pubId - self.index = index - self.bytes = bytes - self.extraMap = extraMap - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.pubId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.index = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.bytes = [] - (_etype220, _size217) = iprot.readListBegin() - for _i221 in xrange(_size217): - _elem222 = iprot.readString() - self.bytes.append(_elem222) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.MAP: - self.extraMap = {} - (_ktype224, _vtype225, _size223 ) = iprot.readMapBegin() - for _i227 in xrange(_size223): - _key228 = iprot.readString() - _val229 = iprot.readString() - self.extraMap[_key228] = _val229 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TimSock5Bytes') - if self.pubId is not None: - oprot.writeFieldBegin('pubId', TType.STRING, 1) - oprot.writeString(self.pubId) - oprot.writeFieldEnd() - if self.index is not None: - oprot.writeFieldBegin('index', TType.I32, 2) - oprot.writeI32(self.index) - oprot.writeFieldEnd() - if self.bytes is not None: - oprot.writeFieldBegin('bytes', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.bytes)) - for iter230 in self.bytes: - oprot.writeString(iter230) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.extraMap is not None: - oprot.writeFieldBegin('extraMap', TType.MAP, 4) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) - for kiter231,viter232 in self.extraMap.items(): - oprot.writeString(kiter231) - oprot.writeString(viter232) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.pubId is None: - raise TProtocol.TProtocolException(message='Required field pubId is unset!') - if self.index is None: - raise TProtocol.TProtocolException(message='Required field index is unset!') - if self.bytes is None: - raise TProtocol.TProtocolException(message='Required field bytes is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.pubId) - value = (value * 31) ^ hash(self.index) - value = (value * 31) ^ hash(self.bytes) - value = (value * 31) ^ hash(self.extraMap) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TimPage: - """ - Attributes: - - fromTimeStamp: 时间上 - - toTimeStamp: 时间下 - - limitCount: 条数 - - extraMap - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'fromTimeStamp', None, None, ), # 1 - (2, TType.STRING, 'toTimeStamp', None, None, ), # 2 - (3, TType.I32, 'limitCount', None, None, ), # 3 - (4, TType.MAP, 'extraMap', (TType.STRING,None,TType.STRING,None), None, ), # 4 - ) - - def __init__(self, fromTimeStamp=None, toTimeStamp=None, limitCount=None, extraMap=None,): - self.fromTimeStamp = fromTimeStamp - self.toTimeStamp = toTimeStamp - self.limitCount = limitCount - self.extraMap = extraMap - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.fromTimeStamp = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.toTimeStamp = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I32: - self.limitCount = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.MAP: - self.extraMap = {} - (_ktype234, _vtype235, _size233 ) = iprot.readMapBegin() - for _i237 in xrange(_size233): - _key238 = iprot.readString() - _val239 = iprot.readString() - self.extraMap[_key238] = _val239 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TimPage') - if self.fromTimeStamp is not None: - oprot.writeFieldBegin('fromTimeStamp', TType.STRING, 1) - oprot.writeString(self.fromTimeStamp) - oprot.writeFieldEnd() - if self.toTimeStamp is not None: - oprot.writeFieldBegin('toTimeStamp', TType.STRING, 2) - oprot.writeString(self.toTimeStamp) - oprot.writeFieldEnd() - if self.limitCount is not None: - oprot.writeFieldBegin('limitCount', TType.I32, 3) - oprot.writeI32(self.limitCount) - oprot.writeFieldEnd() - if self.extraMap is not None: - oprot.writeFieldBegin('extraMap', TType.MAP, 4) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) - for kiter240,viter241 in self.extraMap.items(): - oprot.writeString(kiter240) - oprot.writeString(viter241) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.fromTimeStamp) - value = (value * 31) ^ hash(self.toTimeStamp) - value = (value * 31) ^ hash(self.limitCount) - value = (value * 31) ^ hash(self.extraMap) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TimMessageIq: - """ - Attributes: - - tidlist: tid集合 - - timPage: 分页 - - midlist: mid集合 - - extraMap - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'tidlist', (TType.STRING,None), None, ), # 1 - (2, TType.STRUCT, 'timPage', (TimPage, TimPage.thrift_spec), None, ), # 2 - (3, TType.LIST, 'midlist', (TType.STRING,None), None, ), # 3 - (4, TType.MAP, 'extraMap', (TType.STRING,None,TType.STRING,None), None, ), # 4 - ) - - def __init__(self, tidlist=None, timPage=None, midlist=None, extraMap=None,): - self.tidlist = tidlist - self.timPage = timPage - self.midlist = midlist - self.extraMap = extraMap - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.LIST: - self.tidlist = [] - (_etype245, _size242) = iprot.readListBegin() - for _i246 in xrange(_size242): - _elem247 = iprot.readString() - self.tidlist.append(_elem247) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.timPage = TimPage() - self.timPage.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.midlist = [] - (_etype251, _size248) = iprot.readListBegin() - for _i252 in xrange(_size248): - _elem253 = iprot.readString() - self.midlist.append(_elem253) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.MAP: - self.extraMap = {} - (_ktype255, _vtype256, _size254 ) = iprot.readMapBegin() - for _i258 in xrange(_size254): - _key259 = iprot.readString() - _val260 = iprot.readString() - self.extraMap[_key259] = _val260 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TimMessageIq') - if self.tidlist is not None: - oprot.writeFieldBegin('tidlist', TType.LIST, 1) - oprot.writeListBegin(TType.STRING, len(self.tidlist)) - for iter261 in self.tidlist: - oprot.writeString(iter261) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.timPage is not None: - oprot.writeFieldBegin('timPage', TType.STRUCT, 2) - self.timPage.write(oprot) - oprot.writeFieldEnd() - if self.midlist is not None: - oprot.writeFieldBegin('midlist', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.midlist)) - for iter262 in self.midlist: - oprot.writeString(iter262) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.extraMap is not None: - oprot.writeFieldBegin('extraMap', TType.MAP, 4) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) - for kiter263,viter264 in self.extraMap.items(): - oprot.writeString(kiter263) - oprot.writeString(viter264) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.tidlist) - value = (value * 31) ^ hash(self.timPage) - value = (value * 31) ^ hash(self.midlist) - value = (value * 31) ^ hash(self.extraMap) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TimAuth: - """ - Attributes: - - domain: 域名 - - username: 用户名 - - pwd: 密码 - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'domain', None, None, ), # 1 - (2, TType.STRING, 'username', None, None, ), # 2 - (3, TType.STRING, 'pwd', None, None, ), # 3 - ) - - def __init__(self, domain=None, username=None, pwd=None,): - self.domain = domain - self.username = username - self.pwd = pwd - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.domain = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.username = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.pwd = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TimAuth') - if self.domain is not None: - oprot.writeFieldBegin('domain', TType.STRING, 1) - oprot.writeString(self.domain) - oprot.writeFieldEnd() - if self.username is not None: - oprot.writeFieldBegin('username', TType.STRING, 2) - oprot.writeString(self.username) - oprot.writeFieldEnd() - if self.pwd is not None: - oprot.writeFieldBegin('pwd', TType.STRING, 3) - oprot.writeString(self.pwd) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.domain) - value = (value * 31) ^ hash(self.username) - value = (value * 31) ^ hash(self.pwd) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TimMBeanList: - """ - Attributes: - - threadId - - timMBeanList: 信息列表 - - reqType: 类型 - - extraMap - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'threadId', None, None, ), # 1 - (2, TType.LIST, 'timMBeanList', (TType.STRUCT,(TimMBean, TimMBean.thrift_spec)), None, ), # 2 - (3, TType.STRING, 'reqType', None, None, ), # 3 - (4, TType.MAP, 'extraMap', (TType.STRING,None,TType.STRING,None), None, ), # 4 - ) - - def __init__(self, threadId=None, timMBeanList=None, reqType=None, extraMap=None,): - self.threadId = threadId - self.timMBeanList = timMBeanList - self.reqType = reqType - self.extraMap = extraMap - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.threadId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.timMBeanList = [] - (_etype268, _size265) = iprot.readListBegin() - for _i269 in xrange(_size265): - _elem270 = TimMBean() - _elem270.read(iprot) - self.timMBeanList.append(_elem270) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.reqType = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.MAP: - self.extraMap = {} - (_ktype272, _vtype273, _size271 ) = iprot.readMapBegin() - for _i275 in xrange(_size271): - _key276 = iprot.readString() - _val277 = iprot.readString() - self.extraMap[_key276] = _val277 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TimMBeanList') - if self.threadId is not None: - oprot.writeFieldBegin('threadId', TType.STRING, 1) - oprot.writeString(self.threadId) - oprot.writeFieldEnd() - if self.timMBeanList is not None: - oprot.writeFieldBegin('timMBeanList', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.timMBeanList)) - for iter278 in self.timMBeanList: - iter278.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.reqType is not None: - oprot.writeFieldBegin('reqType', TType.STRING, 3) - oprot.writeString(self.reqType) - oprot.writeFieldEnd() - if self.extraMap is not None: - oprot.writeFieldBegin('extraMap', TType.MAP, 4) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) - for kiter279,viter280 in self.extraMap.items(): - oprot.writeString(kiter279) - oprot.writeString(viter280) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.threadId is None: - raise TProtocol.TProtocolException(message='Required field threadId is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.threadId) - value = (value * 31) ^ hash(self.timMBeanList) - value = (value * 31) ^ hash(self.reqType) - value = (value * 31) ^ hash(self.extraMap) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TimPBeanList: - """ - Attributes: - - threadId - - timPBeanList: 状态信息列表 - - reqType: 类型 - - extraMap - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'threadId', None, None, ), # 1 - (2, TType.LIST, 'timPBeanList', (TType.STRUCT,(TimPBean, TimPBean.thrift_spec)), None, ), # 2 - (3, TType.STRING, 'reqType', None, None, ), # 3 - (4, TType.MAP, 'extraMap', (TType.STRING,None,TType.STRING,None), None, ), # 4 - ) - - def __init__(self, threadId=None, timPBeanList=None, reqType=None, extraMap=None,): - self.threadId = threadId - self.timPBeanList = timPBeanList - self.reqType = reqType - self.extraMap = extraMap - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.threadId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.timPBeanList = [] - (_etype284, _size281) = iprot.readListBegin() - for _i285 in xrange(_size281): - _elem286 = TimPBean() - _elem286.read(iprot) - self.timPBeanList.append(_elem286) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.reqType = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.MAP: - self.extraMap = {} - (_ktype288, _vtype289, _size287 ) = iprot.readMapBegin() - for _i291 in xrange(_size287): - _key292 = iprot.readString() - _val293 = iprot.readString() - self.extraMap[_key292] = _val293 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TimPBeanList') - if self.threadId is not None: - oprot.writeFieldBegin('threadId', TType.STRING, 1) - oprot.writeString(self.threadId) - oprot.writeFieldEnd() - if self.timPBeanList is not None: - oprot.writeFieldBegin('timPBeanList', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.timPBeanList)) - for iter294 in self.timPBeanList: - iter294.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.reqType is not None: - oprot.writeFieldBegin('reqType', TType.STRING, 3) - oprot.writeString(self.reqType) - oprot.writeFieldEnd() - if self.extraMap is not None: - oprot.writeFieldBegin('extraMap', TType.MAP, 4) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) - for kiter295,viter296 in self.extraMap.items(): - oprot.writeString(kiter295) - oprot.writeString(viter296) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.threadId is None: - raise TProtocol.TProtocolException(message='Required field threadId is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.threadId) - value = (value * 31) ^ hash(self.timPBeanList) - value = (value * 31) ^ hash(self.reqType) - value = (value * 31) ^ hash(self.extraMap) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TimPropertyBean: - """ - Attributes: - - threadId - - interflow: 消息合流 - - tls: tls - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'threadId', None, None, ), # 1 - (2, TType.STRING, 'interflow', None, None, ), # 2 - (3, TType.STRING, 'tls', None, None, ), # 3 - ) - - def __init__(self, threadId=None, interflow=None, tls=None,): - self.threadId = threadId - self.interflow = interflow - self.tls = tls - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.threadId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.interflow = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.tls = iprot.readString() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('TimPropertyBean') - if self.threadId is not None: - oprot.writeFieldBegin('threadId', TType.STRING, 1) - oprot.writeString(self.threadId) - oprot.writeFieldEnd() - if self.interflow is not None: - oprot.writeFieldBegin('interflow', TType.STRING, 2) - oprot.writeString(self.interflow) - oprot.writeFieldEnd() - if self.tls is not None: - oprot.writeFieldBegin('tls', TType.STRING, 3) - oprot.writeString(self.tls) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.threadId) - value = (value * 31) ^ hash(self.interflow) - value = (value * 31) ^ hash(self.tls) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) +all_structs = [] + + +class TimError(object): + """ + Attributes: + - errCode: 错误码 + - errMsg: 错误内容 + + """ + + + def __init__(self, errCode=None, errMsg=None,): + self.errCode = errCode + self.errMsg = errMsg + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.errCode = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.errMsg = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TimError') + if self.errCode is not None: + oprot.writeFieldBegin('errCode', TType.I32, 1) + oprot.writeI32(self.errCode) + oprot.writeFieldEnd() + if self.errMsg is not None: + oprot.writeFieldBegin('errMsg', TType.STRING, 2) + oprot.writeString(self.errMsg.encode('utf-8') if sys.version_info[0] == 2 else self.errMsg) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TimNode(object): + """ + Attributes: + - key: 键 + - value: 值 + + """ + + + def __init__(self, key=None, value=None,): + self.key = key + self.value = value + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.key = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.value = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TimNode') + if self.key is not None: + oprot.writeFieldBegin('key', TType.STRING, 1) + oprot.writeString(self.key.encode('utf-8') if sys.version_info[0] == 2 else self.key) + oprot.writeFieldEnd() + if self.value is not None: + oprot.writeFieldBegin('value', TType.STRING, 2) + oprot.writeString(self.value.encode('utf-8') if sys.version_info[0] == 2 else self.value) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TimAckBean(object): + """ + Attributes: + - id: id,返回所要回执协议的线程id + - ackType: 类型,自定义 如:ping,message等 + - ackStatus: 状态,如成功,失败等 + - extraList: 附加信息 + - err: 错误信息 + - extraMap + + """ + + + def __init__(self, id=None, ackType=None, ackStatus=None, extraList=None, err=None, extraMap=None,): + self.id = id + self.ackType = ackType + self.ackStatus = ackStatus + self.extraList = extraList + self.err = err + self.extraMap = extraMap + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.id = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.ackType = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.ackStatus = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.extraList = [] + (_etype3, _size0) = iprot.readListBegin() + for _i4 in range(_size0): + _elem5 = TimNode() + _elem5.read(iprot) + self.extraList.append(_elem5) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.err = TimError() + self.err.read(iprot) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.MAP: + self.extraMap = {} + (_ktype7, _vtype8, _size6) = iprot.readMapBegin() + for _i10 in range(_size6): + _key11 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val12 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.extraMap[_key11] = _val12 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TimAckBean') + if self.id is not None: + oprot.writeFieldBegin('id', TType.STRING, 1) + oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) + oprot.writeFieldEnd() + if self.ackType is not None: + oprot.writeFieldBegin('ackType', TType.STRING, 2) + oprot.writeString(self.ackType.encode('utf-8') if sys.version_info[0] == 2 else self.ackType) + oprot.writeFieldEnd() + if self.ackStatus is not None: + oprot.writeFieldBegin('ackStatus', TType.STRING, 3) + oprot.writeString(self.ackStatus.encode('utf-8') if sys.version_info[0] == 2 else self.ackStatus) + oprot.writeFieldEnd() + if self.extraList is not None: + oprot.writeFieldBegin('extraList', TType.LIST, 4) + oprot.writeListBegin(TType.STRUCT, len(self.extraList)) + for iter13 in self.extraList: + iter13.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.err is not None: + oprot.writeFieldBegin('err', TType.STRUCT, 5) + self.err.write(oprot) + oprot.writeFieldEnd() + if self.extraMap is not None: + oprot.writeFieldBegin('extraMap', TType.MAP, 6) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) + for kiter14, viter15 in self.extraMap.items(): + oprot.writeString(kiter14.encode('utf-8') if sys.version_info[0] == 2 else kiter14) + oprot.writeString(viter15.encode('utf-8') if sys.version_info[0] == 2 else viter15) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TimHBean(object): + """ + Attributes: + - chl: 渠道 + - platform: 平台 + - version: version 客户端协议版本 + + """ + + + def __init__(self, chl=None, platform=None, version=None,): + self.chl = chl + self.platform = platform + self.version = version + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.chl = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.platform = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I16: + self.version = iprot.readI16() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TimHBean') + if self.chl is not None: + oprot.writeFieldBegin('chl', TType.I32, 1) + oprot.writeI32(self.chl) + oprot.writeFieldEnd() + if self.platform is not None: + oprot.writeFieldBegin('platform', TType.I32, 2) + oprot.writeI32(self.platform) + oprot.writeFieldEnd() + if self.version is not None: + oprot.writeFieldBegin('version', TType.I16, 3) + oprot.writeI16(self.version) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.chl is None: + raise TProtocolException(message='Required field chl is unset!') + if self.version is None: + raise TProtocolException(message='Required field version is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TimParam(object): + """ + Attributes: + - timestamp: 服务器时间 + - version: 版本 + - lang: 语言 + - extraList: 附加信息 + - extraMap + - interflow: 消息合流 + - tls: tls + + """ + + + def __init__(self, timestamp=None, version=None, lang=None, extraList=None, extraMap=None, interflow=None, tls=None,): + self.timestamp = timestamp + self.version = version + self.lang = lang + self.extraList = extraList + self.extraMap = extraMap + self.interflow = interflow + self.tls = tls + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.timestamp = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I16: + self.version = iprot.readI16() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.lang = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.extraList = [] + (_etype19, _size16) = iprot.readListBegin() + for _i20 in range(_size16): + _elem21 = TimNode() + _elem21.read(iprot) + self.extraList.append(_elem21) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.MAP: + self.extraMap = {} + (_ktype23, _vtype24, _size22) = iprot.readMapBegin() + for _i26 in range(_size22): + _key27 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val28 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.extraMap[_key27] = _val28 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.interflow = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.tls = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TimParam') + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.STRING, 1) + oprot.writeString(self.timestamp.encode('utf-8') if sys.version_info[0] == 2 else self.timestamp) + oprot.writeFieldEnd() + if self.version is not None: + oprot.writeFieldBegin('version', TType.I16, 2) + oprot.writeI16(self.version) + oprot.writeFieldEnd() + if self.lang is not None: + oprot.writeFieldBegin('lang', TType.STRING, 3) + oprot.writeString(self.lang.encode('utf-8') if sys.version_info[0] == 2 else self.lang) + oprot.writeFieldEnd() + if self.extraList is not None: + oprot.writeFieldBegin('extraList', TType.LIST, 4) + oprot.writeListBegin(TType.STRUCT, len(self.extraList)) + for iter29 in self.extraList: + iter29.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.extraMap is not None: + oprot.writeFieldBegin('extraMap', TType.MAP, 5) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) + for kiter30, viter31 in self.extraMap.items(): + oprot.writeString(kiter30.encode('utf-8') if sys.version_info[0] == 2 else kiter30) + oprot.writeString(viter31.encode('utf-8') if sys.version_info[0] == 2 else viter31) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.interflow is not None: + oprot.writeFieldBegin('interflow', TType.STRING, 6) + oprot.writeString(self.interflow.encode('utf-8') if sys.version_info[0] == 2 else self.interflow) + oprot.writeFieldEnd() + if self.tls is not None: + oprot.writeFieldBegin('tls', TType.STRING, 7) + oprot.writeString(self.tls.encode('utf-8') if sys.version_info[0] == 2 else self.tls) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TimTime(object): + """ + Attributes: + - timestamp: 时间戳 (毫秒) + - formattime: 格式化时间 + + """ + + + def __init__(self, timestamp=None, formattime=None,): + self.timestamp = timestamp + self.formattime = formattime + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.timestamp = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.formattime = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TimTime') + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.STRING, 1) + oprot.writeString(self.timestamp.encode('utf-8') if sys.version_info[0] == 2 else self.timestamp) + oprot.writeFieldEnd() + if self.formattime is not None: + oprot.writeFieldBegin('formattime', TType.STRING, 2) + oprot.writeString(self.formattime.encode('utf-8') if sys.version_info[0] == 2 else self.formattime) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TimArea(object): + """ + Attributes: + - country: 国家 + - province: 省 + - city: 市 + - extraList: 附加信息:如区,镇,乡等 + - extraMap + + """ + + + def __init__(self, country=None, province=None, city=None, extraList=None, extraMap=None,): + self.country = country + self.province = province + self.city = city + self.extraList = extraList + self.extraMap = extraMap + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.country = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.province = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.city = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.extraList = [] + (_etype35, _size32) = iprot.readListBegin() + for _i36 in range(_size32): + _elem37 = TimNode() + _elem37.read(iprot) + self.extraList.append(_elem37) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.MAP: + self.extraMap = {} + (_ktype39, _vtype40, _size38) = iprot.readMapBegin() + for _i42 in range(_size38): + _key43 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val44 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.extraMap[_key43] = _val44 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TimArea') + if self.country is not None: + oprot.writeFieldBegin('country', TType.STRING, 1) + oprot.writeString(self.country.encode('utf-8') if sys.version_info[0] == 2 else self.country) + oprot.writeFieldEnd() + if self.province is not None: + oprot.writeFieldBegin('province', TType.STRING, 2) + oprot.writeString(self.province.encode('utf-8') if sys.version_info[0] == 2 else self.province) + oprot.writeFieldEnd() + if self.city is not None: + oprot.writeFieldBegin('city', TType.STRING, 3) + oprot.writeString(self.city.encode('utf-8') if sys.version_info[0] == 2 else self.city) + oprot.writeFieldEnd() + if self.extraList is not None: + oprot.writeFieldBegin('extraList', TType.LIST, 4) + oprot.writeListBegin(TType.STRUCT, len(self.extraList)) + for iter45 in self.extraList: + iter45.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.extraMap is not None: + oprot.writeFieldBegin('extraMap', TType.MAP, 5) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) + for kiter46, viter47 in self.extraMap.items(): + oprot.writeString(kiter46.encode('utf-8') if sys.version_info[0] == 2 else kiter46) + oprot.writeString(viter47.encode('utf-8') if sys.version_info[0] == 2 else viter47) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class Tid(object): + """ + Attributes: + - name: 登陆名 用户登录号,房间号等 + - domain: 域名 用于区分渠道等 appid,appsecret + - resource: 系统 自行约定 如 : 1IOS,2android,3H5,4WEB 等 + - type: normal,group + - extraList: 附加信息:如传递客户端信息 iphone6,xiaomi,huawei等 + - extraMap + + """ + + + def __init__(self, name=None, domain=None, resource=None, type=None, extraList=None, extraMap=None,): + self.name = name + self.domain = domain + self.resource = resource + self.type = type + self.extraList = extraList + self.extraMap = extraMap + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.domain = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.resource = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.type = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.extraList = [] + (_etype51, _size48) = iprot.readListBegin() + for _i52 in range(_size48): + _elem53 = TimNode() + _elem53.read(iprot) + self.extraList.append(_elem53) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.MAP: + self.extraMap = {} + (_ktype55, _vtype56, _size54) = iprot.readMapBegin() + for _i58 in range(_size54): + _key59 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val60 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.extraMap[_key59] = _val60 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('Tid') + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + if self.domain is not None: + oprot.writeFieldBegin('domain', TType.STRING, 2) + oprot.writeString(self.domain.encode('utf-8') if sys.version_info[0] == 2 else self.domain) + oprot.writeFieldEnd() + if self.resource is not None: + oprot.writeFieldBegin('resource', TType.STRING, 3) + oprot.writeString(self.resource.encode('utf-8') if sys.version_info[0] == 2 else self.resource) + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin('type', TType.STRING, 4) + oprot.writeString(self.type.encode('utf-8') if sys.version_info[0] == 2 else self.type) + oprot.writeFieldEnd() + if self.extraList is not None: + oprot.writeFieldBegin('extraList', TType.LIST, 5) + oprot.writeListBegin(TType.STRUCT, len(self.extraList)) + for iter61 in self.extraList: + iter61.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.extraMap is not None: + oprot.writeFieldBegin('extraMap', TType.MAP, 6) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) + for kiter62, viter63 in self.extraMap.items(): + oprot.writeString(kiter62.encode('utf-8') if sys.version_info[0] == 2 else kiter62) + oprot.writeString(viter63.encode('utf-8') if sys.version_info[0] == 2 else viter63) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.name is None: + raise TProtocolException(message='Required field name is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TimUserBean(object): + """ + Attributes: + - tid: 用户bean + - nickname: 昵称 + - remarkname: 备注名称 + - brithday: 生日 2000-01-01 + - gender: 性别 自行约定 如 : 0不知,1男,2女 + - headurl: 头像地址 http://xxx.jpg + - area: 地区 + - headbyte: 头像 + - photoBytes: 其他图片 + - extraList: 扩展字段 + - extraMap + + """ + + + def __init__(self, tid=None, nickname=None, remarkname=None, brithday=None, gender=None, headurl=None, area=None, headbyte=None, photoBytes=None, extraList=None, extraMap=None,): + self.tid = tid + self.nickname = nickname + self.remarkname = remarkname + self.brithday = brithday + self.gender = gender + self.headurl = headurl + self.area = area + self.headbyte = headbyte + self.photoBytes = photoBytes + self.extraList = extraList + self.extraMap = extraMap + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.tid = Tid() + self.tid.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.nickname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.remarkname = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.brithday = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I16: + self.gender = iprot.readI16() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.headurl = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRUCT: + self.area = TimArea() + self.area.read(iprot) + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRING: + self.headbyte = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.LIST: + self.photoBytes = [] + (_etype67, _size64) = iprot.readListBegin() + for _i68 in range(_size64): + _elem69 = iprot.readBinary() + self.photoBytes.append(_elem69) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.LIST: + self.extraList = [] + (_etype73, _size70) = iprot.readListBegin() + for _i74 in range(_size70): + _elem75 = TimNode() + _elem75.read(iprot) + self.extraList.append(_elem75) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.MAP: + self.extraMap = {} + (_ktype77, _vtype78, _size76) = iprot.readMapBegin() + for _i80 in range(_size76): + _key81 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val82 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.extraMap[_key81] = _val82 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TimUserBean') + if self.tid is not None: + oprot.writeFieldBegin('tid', TType.STRUCT, 1) + self.tid.write(oprot) + oprot.writeFieldEnd() + if self.nickname is not None: + oprot.writeFieldBegin('nickname', TType.STRING, 2) + oprot.writeString(self.nickname.encode('utf-8') if sys.version_info[0] == 2 else self.nickname) + oprot.writeFieldEnd() + if self.remarkname is not None: + oprot.writeFieldBegin('remarkname', TType.STRING, 3) + oprot.writeString(self.remarkname.encode('utf-8') if sys.version_info[0] == 2 else self.remarkname) + oprot.writeFieldEnd() + if self.brithday is not None: + oprot.writeFieldBegin('brithday', TType.STRING, 4) + oprot.writeString(self.brithday.encode('utf-8') if sys.version_info[0] == 2 else self.brithday) + oprot.writeFieldEnd() + if self.gender is not None: + oprot.writeFieldBegin('gender', TType.I16, 5) + oprot.writeI16(self.gender) + oprot.writeFieldEnd() + if self.headurl is not None: + oprot.writeFieldBegin('headurl', TType.STRING, 6) + oprot.writeString(self.headurl.encode('utf-8') if sys.version_info[0] == 2 else self.headurl) + oprot.writeFieldEnd() + if self.area is not None: + oprot.writeFieldBegin('area', TType.STRUCT, 7) + self.area.write(oprot) + oprot.writeFieldEnd() + if self.headbyte is not None: + oprot.writeFieldBegin('headbyte', TType.STRING, 8) + oprot.writeBinary(self.headbyte) + oprot.writeFieldEnd() + if self.photoBytes is not None: + oprot.writeFieldBegin('photoBytes', TType.LIST, 9) + oprot.writeListBegin(TType.STRING, len(self.photoBytes)) + for iter83 in self.photoBytes: + oprot.writeBinary(iter83) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.extraList is not None: + oprot.writeFieldBegin('extraList', TType.LIST, 10) + oprot.writeListBegin(TType.STRUCT, len(self.extraList)) + for iter84 in self.extraList: + iter84.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.extraMap is not None: + oprot.writeFieldBegin('extraMap', TType.MAP, 11) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) + for kiter85, viter86 in self.extraMap.items(): + oprot.writeString(kiter85.encode('utf-8') if sys.version_info[0] == 2 else kiter85) + oprot.writeString(viter86.encode('utf-8') if sys.version_info[0] == 2 else viter86) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TimRoom(object): + """ + Attributes: + - tid: 房间Tid + - founderTid: 创建人Tid + - HostsTid: 主持人Tid + - membersTid: memberTid + - headurl: 头像地址 http://xxx.jpg + - roomName: 房间名称 + - desc: 房间说明 + - createTime: 房间创建时间 + - extraList: 扩展字段 + - extraMap + + """ + + + def __init__(self, tid=None, founderTid=None, HostsTid=None, membersTid=None, headurl=None, roomName=None, desc=None, createTime=None, extraList=None, extraMap=None,): + self.tid = tid + self.founderTid = founderTid + self.HostsTid = HostsTid + self.membersTid = membersTid + self.headurl = headurl + self.roomName = roomName + self.desc = desc + self.createTime = createTime + self.extraList = extraList + self.extraMap = extraMap + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.tid = Tid() + self.tid.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.founderTid = Tid() + self.founderTid.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.HostsTid = [] + (_etype90, _size87) = iprot.readListBegin() + for _i91 in range(_size87): + _elem92 = Tid() + _elem92.read(iprot) + self.HostsTid.append(_elem92) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.membersTid = [] + (_etype96, _size93) = iprot.readListBegin() + for _i97 in range(_size93): + _elem98 = Tid() + _elem98.read(iprot) + self.membersTid.append(_elem98) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.headurl = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.roomName = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.desc = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRUCT: + self.createTime = TimTime() + self.createTime.read(iprot) + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.LIST: + self.extraList = [] + (_etype102, _size99) = iprot.readListBegin() + for _i103 in range(_size99): + _elem104 = TimNode() + _elem104.read(iprot) + self.extraList.append(_elem104) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.MAP: + self.extraMap = {} + (_ktype106, _vtype107, _size105) = iprot.readMapBegin() + for _i109 in range(_size105): + _key110 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val111 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.extraMap[_key110] = _val111 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TimRoom') + if self.tid is not None: + oprot.writeFieldBegin('tid', TType.STRUCT, 1) + self.tid.write(oprot) + oprot.writeFieldEnd() + if self.founderTid is not None: + oprot.writeFieldBegin('founderTid', TType.STRUCT, 2) + self.founderTid.write(oprot) + oprot.writeFieldEnd() + if self.HostsTid is not None: + oprot.writeFieldBegin('HostsTid', TType.LIST, 3) + oprot.writeListBegin(TType.STRUCT, len(self.HostsTid)) + for iter112 in self.HostsTid: + iter112.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.membersTid is not None: + oprot.writeFieldBegin('membersTid', TType.LIST, 4) + oprot.writeListBegin(TType.STRUCT, len(self.membersTid)) + for iter113 in self.membersTid: + iter113.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.headurl is not None: + oprot.writeFieldBegin('headurl', TType.STRING, 5) + oprot.writeString(self.headurl.encode('utf-8') if sys.version_info[0] == 2 else self.headurl) + oprot.writeFieldEnd() + if self.roomName is not None: + oprot.writeFieldBegin('roomName', TType.STRING, 6) + oprot.writeString(self.roomName.encode('utf-8') if sys.version_info[0] == 2 else self.roomName) + oprot.writeFieldEnd() + if self.desc is not None: + oprot.writeFieldBegin('desc', TType.STRING, 7) + oprot.writeString(self.desc.encode('utf-8') if sys.version_info[0] == 2 else self.desc) + oprot.writeFieldEnd() + if self.createTime is not None: + oprot.writeFieldBegin('createTime', TType.STRUCT, 8) + self.createTime.write(oprot) + oprot.writeFieldEnd() + if self.extraList is not None: + oprot.writeFieldBegin('extraList', TType.LIST, 9) + oprot.writeListBegin(TType.STRUCT, len(self.extraList)) + for iter114 in self.extraList: + iter114.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.extraMap is not None: + oprot.writeFieldBegin('extraMap', TType.MAP, 10) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) + for kiter115, viter116 in self.extraMap.items(): + oprot.writeString(kiter115.encode('utf-8') if sys.version_info[0] == 2 else kiter115) + oprot.writeString(viter116.encode('utf-8') if sys.version_info[0] == 2 else viter116) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TimPBean(object): + """ + Attributes: + - threadId: 标识 + - fromTid + - toTid + - status: subscribe:订阅其他用户的状态 probe:请求获取其他用户的状态 unavailable:不可用,离线(offline)状态 + - type: normal:类似于email,主要特点是不要求响应; + chat:类似于qq里的好友即时聊天,主要特点是实时通讯; + groupchat:类似于聊天室里的群聊; + headline:用于发送alert和notification; + error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; + - priority: 优先权 0 。高优先级的resource能接受发送到bare JID的消息,低优先级的resource不能 + - show: chat:聊天中 away:暂时离开 xa:eXtend Away,长时间离开 dnd:勿打扰 online:在线 offline:离线 + - leaguerTid: 成员Tid 群聊时信息发送者Tid + - extraList: 扩展字段 + - error: 错误码 + - extraMap + + """ + + + def __init__(self, threadId=None, fromTid=None, toTid=None, status=None, type=None, priority=None, show=None, leaguerTid=None, extraList=None, error=None, extraMap=None,): + self.threadId = threadId + self.fromTid = fromTid + self.toTid = toTid + self.status = status + self.type = type + self.priority = priority + self.show = show + self.leaguerTid = leaguerTid + self.extraList = extraList + self.error = error + self.extraMap = extraMap + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.threadId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.fromTid = Tid() + self.fromTid.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.toTid = Tid() + self.toTid.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.status = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.type = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.priority = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.show = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRUCT: + self.leaguerTid = Tid() + self.leaguerTid.read(iprot) + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.LIST: + self.extraList = [] + (_etype120, _size117) = iprot.readListBegin() + for _i121 in range(_size117): + _elem122 = TimNode() + _elem122.read(iprot) + self.extraList.append(_elem122) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRUCT: + self.error = TimError() + self.error.read(iprot) + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.MAP: + self.extraMap = {} + (_ktype124, _vtype125, _size123) = iprot.readMapBegin() + for _i127 in range(_size123): + _key128 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val129 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.extraMap[_key128] = _val129 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TimPBean') + if self.threadId is not None: + oprot.writeFieldBegin('threadId', TType.STRING, 1) + oprot.writeString(self.threadId.encode('utf-8') if sys.version_info[0] == 2 else self.threadId) + oprot.writeFieldEnd() + if self.fromTid is not None: + oprot.writeFieldBegin('fromTid', TType.STRUCT, 2) + self.fromTid.write(oprot) + oprot.writeFieldEnd() + if self.toTid is not None: + oprot.writeFieldBegin('toTid', TType.STRUCT, 3) + self.toTid.write(oprot) + oprot.writeFieldEnd() + if self.status is not None: + oprot.writeFieldBegin('status', TType.STRING, 4) + oprot.writeString(self.status.encode('utf-8') if sys.version_info[0] == 2 else self.status) + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin('type', TType.STRING, 5) + oprot.writeString(self.type.encode('utf-8') if sys.version_info[0] == 2 else self.type) + oprot.writeFieldEnd() + if self.priority is not None: + oprot.writeFieldBegin('priority', TType.I32, 6) + oprot.writeI32(self.priority) + oprot.writeFieldEnd() + if self.show is not None: + oprot.writeFieldBegin('show', TType.STRING, 7) + oprot.writeString(self.show.encode('utf-8') if sys.version_info[0] == 2 else self.show) + oprot.writeFieldEnd() + if self.leaguerTid is not None: + oprot.writeFieldBegin('leaguerTid', TType.STRUCT, 8) + self.leaguerTid.write(oprot) + oprot.writeFieldEnd() + if self.extraList is not None: + oprot.writeFieldBegin('extraList', TType.LIST, 9) + oprot.writeListBegin(TType.STRUCT, len(self.extraList)) + for iter130 in self.extraList: + iter130.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.error is not None: + oprot.writeFieldBegin('error', TType.STRUCT, 10) + self.error.write(oprot) + oprot.writeFieldEnd() + if self.extraMap is not None: + oprot.writeFieldBegin('extraMap', TType.MAP, 11) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) + for kiter131, viter132 in self.extraMap.items(): + oprot.writeString(kiter131.encode('utf-8') if sys.version_info[0] == 2 else kiter131) + oprot.writeString(viter132.encode('utf-8') if sys.version_info[0] == 2 else viter132) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.threadId is None: + raise TProtocolException(message='Required field threadId is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TimMBean(object): + """ + Attributes: + - threadId: 线程id + - mid: 消息id号 + - fromTid: 来源Tid + - toTid: 目标Tid + - body: 信息内容 + - type: normal:类似于email,主要特点是不要求响应; + chat:类似于qq里的好友即时聊天,主要特点是实时通讯; + groupchat:类似于聊天室里的群聊; + headline:用于发送alert和notification; + error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; + - msgType: 消息类型 1 文字 2 图片 3 语音 4视频 5混合 + - offline: 是否离线信息 + - leaguerTid: 成员Tid 群聊时信息发送者Tid + - extraList: 扩展字段 + - timestamp: 服务器发送信息时间戳(毫秒) + - error: 错误码 + - extraMap + - readstatus: 0未读 1已读 + + """ + + + def __init__(self, threadId=None, mid=None, fromTid=None, toTid=None, body=None, type=None, msgType=None, offline=None, leaguerTid=None, extraList=None, timestamp=None, error=None, extraMap=None, readstatus=None,): + self.threadId = threadId + self.mid = mid + self.fromTid = fromTid + self.toTid = toTid + self.body = body + self.type = type + self.msgType = msgType + self.offline = offline + self.leaguerTid = leaguerTid + self.extraList = extraList + self.timestamp = timestamp + self.error = error + self.extraMap = extraMap + self.readstatus = readstatus + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.threadId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.mid = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.fromTid = Tid() + self.fromTid.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.toTid = Tid() + self.toTid.read(iprot) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.body = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.type = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I16: + self.msgType = iprot.readI16() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRUCT: + self.offline = TimTime() + self.offline.read(iprot) + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.STRUCT: + self.leaguerTid = Tid() + self.leaguerTid.read(iprot) + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.LIST: + self.extraList = [] + (_etype136, _size133) = iprot.readListBegin() + for _i137 in range(_size133): + _elem138 = TimNode() + _elem138.read(iprot) + self.extraList.append(_elem138) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.STRING: + self.timestamp = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.STRUCT: + self.error = TimError() + self.error.read(iprot) + else: + iprot.skip(ftype) + elif fid == 13: + if ftype == TType.MAP: + self.extraMap = {} + (_ktype140, _vtype141, _size139) = iprot.readMapBegin() + for _i143 in range(_size139): + _key144 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val145 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.extraMap[_key144] = _val145 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 14: + if ftype == TType.I16: + self.readstatus = iprot.readI16() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TimMBean') + if self.threadId is not None: + oprot.writeFieldBegin('threadId', TType.STRING, 1) + oprot.writeString(self.threadId.encode('utf-8') if sys.version_info[0] == 2 else self.threadId) + oprot.writeFieldEnd() + if self.mid is not None: + oprot.writeFieldBegin('mid', TType.STRING, 2) + oprot.writeString(self.mid.encode('utf-8') if sys.version_info[0] == 2 else self.mid) + oprot.writeFieldEnd() + if self.fromTid is not None: + oprot.writeFieldBegin('fromTid', TType.STRUCT, 3) + self.fromTid.write(oprot) + oprot.writeFieldEnd() + if self.toTid is not None: + oprot.writeFieldBegin('toTid', TType.STRUCT, 4) + self.toTid.write(oprot) + oprot.writeFieldEnd() + if self.body is not None: + oprot.writeFieldBegin('body', TType.STRING, 5) + oprot.writeString(self.body.encode('utf-8') if sys.version_info[0] == 2 else self.body) + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin('type', TType.STRING, 6) + oprot.writeString(self.type.encode('utf-8') if sys.version_info[0] == 2 else self.type) + oprot.writeFieldEnd() + if self.msgType is not None: + oprot.writeFieldBegin('msgType', TType.I16, 7) + oprot.writeI16(self.msgType) + oprot.writeFieldEnd() + if self.offline is not None: + oprot.writeFieldBegin('offline', TType.STRUCT, 8) + self.offline.write(oprot) + oprot.writeFieldEnd() + if self.leaguerTid is not None: + oprot.writeFieldBegin('leaguerTid', TType.STRUCT, 9) + self.leaguerTid.write(oprot) + oprot.writeFieldEnd() + if self.extraList is not None: + oprot.writeFieldBegin('extraList', TType.LIST, 10) + oprot.writeListBegin(TType.STRUCT, len(self.extraList)) + for iter146 in self.extraList: + iter146.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.STRING, 11) + oprot.writeString(self.timestamp.encode('utf-8') if sys.version_info[0] == 2 else self.timestamp) + oprot.writeFieldEnd() + if self.error is not None: + oprot.writeFieldBegin('error', TType.STRUCT, 12) + self.error.write(oprot) + oprot.writeFieldEnd() + if self.extraMap is not None: + oprot.writeFieldBegin('extraMap', TType.MAP, 13) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) + for kiter147, viter148 in self.extraMap.items(): + oprot.writeString(kiter147.encode('utf-8') if sys.version_info[0] == 2 else kiter147) + oprot.writeString(viter148.encode('utf-8') if sys.version_info[0] == 2 else viter148) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.readstatus is not None: + oprot.writeFieldBegin('readstatus', TType.I16, 14) + oprot.writeI16(self.readstatus) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.threadId is None: + raise TProtocolException(message='Required field threadId is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TimIqBean(object): + """ + Attributes: + - threadId: 线程id + - fromTid + - toTid + - type: Get :获取当前域值。类似于http get方法 + Set :设置或替换get查询的值。类似于http put方法。 + Result :说明成功的响应了先前的查询。类似于http状态码200。 + Error: 查询和响应中出现的错误。 + - extraList: 扩展字段 + - error: 错误码 + - extraMap + + """ + + + def __init__(self, threadId=None, fromTid=None, toTid=None, type=None, extraList=None, error=None, extraMap=None,): + self.threadId = threadId + self.fromTid = fromTid + self.toTid = toTid + self.type = type + self.extraList = extraList + self.error = error + self.extraMap = extraMap + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.threadId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.fromTid = Tid() + self.fromTid.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.toTid = Tid() + self.toTid.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.type = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.extraList = [] + (_etype152, _size149) = iprot.readListBegin() + for _i153 in range(_size149): + _elem154 = TimNode() + _elem154.read(iprot) + self.extraList.append(_elem154) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRUCT: + self.error = TimError() + self.error.read(iprot) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.MAP: + self.extraMap = {} + (_ktype156, _vtype157, _size155) = iprot.readMapBegin() + for _i159 in range(_size155): + _key160 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val161 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.extraMap[_key160] = _val161 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TimIqBean') + if self.threadId is not None: + oprot.writeFieldBegin('threadId', TType.STRING, 1) + oprot.writeString(self.threadId.encode('utf-8') if sys.version_info[0] == 2 else self.threadId) + oprot.writeFieldEnd() + if self.fromTid is not None: + oprot.writeFieldBegin('fromTid', TType.STRUCT, 2) + self.fromTid.write(oprot) + oprot.writeFieldEnd() + if self.toTid is not None: + oprot.writeFieldBegin('toTid', TType.STRUCT, 3) + self.toTid.write(oprot) + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin('type', TType.STRING, 4) + oprot.writeString(self.type.encode('utf-8') if sys.version_info[0] == 2 else self.type) + oprot.writeFieldEnd() + if self.extraList is not None: + oprot.writeFieldBegin('extraList', TType.LIST, 5) + oprot.writeListBegin(TType.STRUCT, len(self.extraList)) + for iter162 in self.extraList: + iter162.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.error is not None: + oprot.writeFieldBegin('error', TType.STRUCT, 6) + self.error.write(oprot) + oprot.writeFieldEnd() + if self.extraMap is not None: + oprot.writeFieldBegin('extraMap', TType.MAP, 7) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) + for kiter163, viter164 in self.extraMap.items(): + oprot.writeString(kiter163.encode('utf-8') if sys.version_info[0] == 2 else kiter163) + oprot.writeString(viter164.encode('utf-8') if sys.version_info[0] == 2 else viter164) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.threadId is None: + raise TProtocolException(message='Required field threadId is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TimRoster(object): + """ + Attributes: + - subscription: none表示用户和contact之前没有任何的关系(虽然在server的buddy list中存在) + to表示用户能看到contact的presence,但是contact看不到用户的Presence + from和to的含义相反,指用户看不到contact的presence,但是contact可以看到 + both表示相关之间都能看到对方的presence + - tid + - name: 用户名 + - extraMap + + """ + + + def __init__(self, subscription=None, tid=None, name=None, extraMap=None,): + self.subscription = subscription + self.tid = tid + self.name = name + self.extraMap = extraMap + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.subscription = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.tid = Tid() + self.tid.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.extraMap = {} + (_ktype166, _vtype167, _size165) = iprot.readMapBegin() + for _i169 in range(_size165): + _key170 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val171 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.extraMap[_key170] = _val171 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TimRoster') + if self.subscription is not None: + oprot.writeFieldBegin('subscription', TType.STRING, 1) + oprot.writeString(self.subscription.encode('utf-8') if sys.version_info[0] == 2 else self.subscription) + oprot.writeFieldEnd() + if self.tid is not None: + oprot.writeFieldBegin('tid', TType.STRUCT, 2) + self.tid.write(oprot) + oprot.writeFieldEnd() + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 3) + oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + if self.extraMap is not None: + oprot.writeFieldBegin('extraMap', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) + for kiter172, viter173 in self.extraMap.items(): + oprot.writeString(kiter172.encode('utf-8') if sys.version_info[0] == 2 else kiter172) + oprot.writeString(viter173.encode('utf-8') if sys.version_info[0] == 2 else viter173) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.subscription is None: + raise TProtocolException(message='Required field subscription is unset!') + if self.tid is None: + raise TProtocolException(message='Required field tid is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TimRemoteUserBean(object): + """ + Attributes: + - error: 错误码 + - ub: 远程用户信息 + - extraMap + + """ + + + def __init__(self, error=None, ub=None, extraMap=None,): + self.error = error + self.ub = ub + self.extraMap = extraMap + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.error = TimError() + self.error.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.ub = TimUserBean() + self.ub.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.extraMap = {} + (_ktype175, _vtype176, _size174) = iprot.readMapBegin() + for _i178 in range(_size174): + _key179 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val180 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.extraMap[_key179] = _val180 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TimRemoteUserBean') + if self.error is not None: + oprot.writeFieldBegin('error', TType.STRUCT, 1) + self.error.write(oprot) + oprot.writeFieldEnd() + if self.ub is not None: + oprot.writeFieldBegin('ub', TType.STRUCT, 2) + self.ub.write(oprot) + oprot.writeFieldEnd() + if self.extraMap is not None: + oprot.writeFieldBegin('extraMap', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) + for kiter181, viter182 in self.extraMap.items(): + oprot.writeString(kiter181.encode('utf-8') if sys.version_info[0] == 2 else kiter181) + oprot.writeString(viter182.encode('utf-8') if sys.version_info[0] == 2 else viter182) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TimRemoteRoom(object): + """ + Attributes: + - error: 错误码 + - room: 远程房间信息 + - extraMap + + """ + + + def __init__(self, error=None, room=None, extraMap=None,): + self.error = error + self.room = room + self.extraMap = extraMap + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.error = TimError() + self.error.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.room = TimRoom() + self.room.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.extraMap = {} + (_ktype184, _vtype185, _size183) = iprot.readMapBegin() + for _i187 in range(_size183): + _key188 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val189 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.extraMap[_key188] = _val189 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TimRemoteRoom') + if self.error is not None: + oprot.writeFieldBegin('error', TType.STRUCT, 1) + self.error.write(oprot) + oprot.writeFieldEnd() + if self.room is not None: + oprot.writeFieldBegin('room', TType.STRUCT, 2) + self.room.write(oprot) + oprot.writeFieldEnd() + if self.extraMap is not None: + oprot.writeFieldBegin('extraMap', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) + for kiter190, viter191 in self.extraMap.items(): + oprot.writeString(kiter190.encode('utf-8') if sys.version_info[0] == 2 else kiter190) + oprot.writeString(viter191.encode('utf-8') if sys.version_info[0] == 2 else viter191) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TimResponseBean(object): + """ + Attributes: + - threadId + - error: 错误码 + - extraList: 附加信息 + - extraMap + + """ + + + def __init__(self, threadId=None, error=None, extraList=None, extraMap=None,): + self.threadId = threadId + self.error = error + self.extraList = extraList + self.extraMap = extraMap + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.threadId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.error = TimError() + self.error.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.extraList = [] + (_etype195, _size192) = iprot.readListBegin() + for _i196 in range(_size192): + _elem197 = TimNode() + _elem197.read(iprot) + self.extraList.append(_elem197) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.extraMap = {} + (_ktype199, _vtype200, _size198) = iprot.readMapBegin() + for _i202 in range(_size198): + _key203 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val204 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.extraMap[_key203] = _val204 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TimResponseBean') + if self.threadId is not None: + oprot.writeFieldBegin('threadId', TType.STRING, 1) + oprot.writeString(self.threadId.encode('utf-8') if sys.version_info[0] == 2 else self.threadId) + oprot.writeFieldEnd() + if self.error is not None: + oprot.writeFieldBegin('error', TType.STRUCT, 2) + self.error.write(oprot) + oprot.writeFieldEnd() + if self.extraList is not None: + oprot.writeFieldBegin('extraList', TType.LIST, 3) + oprot.writeListBegin(TType.STRUCT, len(self.extraList)) + for iter205 in self.extraList: + iter205.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.extraMap is not None: + oprot.writeFieldBegin('extraMap', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) + for kiter206, viter207 in self.extraMap.items(): + oprot.writeString(kiter206.encode('utf-8') if sys.version_info[0] == 2 else kiter206) + oprot.writeString(viter207.encode('utf-8') if sys.version_info[0] == 2 else viter207) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TimSock5Bean(object): + """ + Attributes: + - fromTid + - toTid + - addr: ip地址 + - port: 端口 + - transport: 传输类型 1:tcp 2:udp + - pubId: 发布id 通过发布id 可以连接两个发布id相同的用户 + - extraMap + + """ + + + def __init__(self, fromTid=None, toTid=None, addr=None, port=None, transport=None, pubId=None, extraMap=None,): + self.fromTid = fromTid + self.toTid = toTid + self.addr = addr + self.port = port + self.transport = transport + self.pubId = pubId + self.extraMap = extraMap + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.fromTid = Tid() + self.fromTid.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.toTid = Tid() + self.toTid.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.addr = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.port = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I16: + self.transport = iprot.readI16() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.pubId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.MAP: + self.extraMap = {} + (_ktype209, _vtype210, _size208) = iprot.readMapBegin() + for _i212 in range(_size208): + _key213 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val214 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.extraMap[_key213] = _val214 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TimSock5Bean') + if self.fromTid is not None: + oprot.writeFieldBegin('fromTid', TType.STRUCT, 1) + self.fromTid.write(oprot) + oprot.writeFieldEnd() + if self.toTid is not None: + oprot.writeFieldBegin('toTid', TType.STRUCT, 2) + self.toTid.write(oprot) + oprot.writeFieldEnd() + if self.addr is not None: + oprot.writeFieldBegin('addr', TType.STRING, 3) + oprot.writeString(self.addr.encode('utf-8') if sys.version_info[0] == 2 else self.addr) + oprot.writeFieldEnd() + if self.port is not None: + oprot.writeFieldBegin('port', TType.I32, 4) + oprot.writeI32(self.port) + oprot.writeFieldEnd() + if self.transport is not None: + oprot.writeFieldBegin('transport', TType.I16, 5) + oprot.writeI16(self.transport) + oprot.writeFieldEnd() + if self.pubId is not None: + oprot.writeFieldBegin('pubId', TType.STRING, 6) + oprot.writeString(self.pubId.encode('utf-8') if sys.version_info[0] == 2 else self.pubId) + oprot.writeFieldEnd() + if self.extraMap is not None: + oprot.writeFieldBegin('extraMap', TType.MAP, 7) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) + for kiter215, viter216 in self.extraMap.items(): + oprot.writeString(kiter215.encode('utf-8') if sys.version_info[0] == 2 else kiter215) + oprot.writeString(viter216.encode('utf-8') if sys.version_info[0] == 2 else viter216) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.fromTid is None: + raise TProtocolException(message='Required field fromTid is unset!') + if self.toTid is None: + raise TProtocolException(message='Required field toTid is unset!') + if self.addr is None: + raise TProtocolException(message='Required field addr is unset!') + if self.port is None: + raise TProtocolException(message='Required field port is unset!') + if self.transport is None: + raise TProtocolException(message='Required field transport is unset!') + if self.pubId is None: + raise TProtocolException(message='Required field pubId is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TimSock5Bytes(object): + """ + Attributes: + - pubId: 发布id + - index: 序号数据块 + - bytes: 数据块 + - extraMap + + """ + + + def __init__(self, pubId=None, index=None, bytes=None, extraMap=None,): + self.pubId = pubId + self.index = index + self.bytes = bytes + self.extraMap = extraMap + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.pubId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.index = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.bytes = [] + (_etype220, _size217) = iprot.readListBegin() + for _i221 in range(_size217): + _elem222 = iprot.readBinary() + self.bytes.append(_elem222) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.extraMap = {} + (_ktype224, _vtype225, _size223) = iprot.readMapBegin() + for _i227 in range(_size223): + _key228 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val229 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.extraMap[_key228] = _val229 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TimSock5Bytes') + if self.pubId is not None: + oprot.writeFieldBegin('pubId', TType.STRING, 1) + oprot.writeString(self.pubId.encode('utf-8') if sys.version_info[0] == 2 else self.pubId) + oprot.writeFieldEnd() + if self.index is not None: + oprot.writeFieldBegin('index', TType.I32, 2) + oprot.writeI32(self.index) + oprot.writeFieldEnd() + if self.bytes is not None: + oprot.writeFieldBegin('bytes', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.bytes)) + for iter230 in self.bytes: + oprot.writeBinary(iter230) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.extraMap is not None: + oprot.writeFieldBegin('extraMap', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) + for kiter231, viter232 in self.extraMap.items(): + oprot.writeString(kiter231.encode('utf-8') if sys.version_info[0] == 2 else kiter231) + oprot.writeString(viter232.encode('utf-8') if sys.version_info[0] == 2 else viter232) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.pubId is None: + raise TProtocolException(message='Required field pubId is unset!') + if self.index is None: + raise TProtocolException(message='Required field index is unset!') + if self.bytes is None: + raise TProtocolException(message='Required field bytes is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TimPage(object): + """ + Attributes: + - fromTimeStamp: 时间上 + - toTimeStamp: 时间下 + - limitCount: 条数 + - extraMap + + """ + + + def __init__(self, fromTimeStamp=None, toTimeStamp=None, limitCount=None, extraMap=None,): + self.fromTimeStamp = fromTimeStamp + self.toTimeStamp = toTimeStamp + self.limitCount = limitCount + self.extraMap = extraMap + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.fromTimeStamp = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.toTimeStamp = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.limitCount = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.extraMap = {} + (_ktype234, _vtype235, _size233) = iprot.readMapBegin() + for _i237 in range(_size233): + _key238 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val239 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.extraMap[_key238] = _val239 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TimPage') + if self.fromTimeStamp is not None: + oprot.writeFieldBegin('fromTimeStamp', TType.STRING, 1) + oprot.writeString(self.fromTimeStamp.encode('utf-8') if sys.version_info[0] == 2 else self.fromTimeStamp) + oprot.writeFieldEnd() + if self.toTimeStamp is not None: + oprot.writeFieldBegin('toTimeStamp', TType.STRING, 2) + oprot.writeString(self.toTimeStamp.encode('utf-8') if sys.version_info[0] == 2 else self.toTimeStamp) + oprot.writeFieldEnd() + if self.limitCount is not None: + oprot.writeFieldBegin('limitCount', TType.I32, 3) + oprot.writeI32(self.limitCount) + oprot.writeFieldEnd() + if self.extraMap is not None: + oprot.writeFieldBegin('extraMap', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) + for kiter240, viter241 in self.extraMap.items(): + oprot.writeString(kiter240.encode('utf-8') if sys.version_info[0] == 2 else kiter240) + oprot.writeString(viter241.encode('utf-8') if sys.version_info[0] == 2 else viter241) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TimMessageIq(object): + """ + Attributes: + - tidlist: tid集合 + - timPage: 分页 + - midlist: mid集合 + - extraMap + + """ + + + def __init__(self, tidlist=None, timPage=None, midlist=None, extraMap=None,): + self.tidlist = tidlist + self.timPage = timPage + self.midlist = midlist + self.extraMap = extraMap + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.tidlist = [] + (_etype245, _size242) = iprot.readListBegin() + for _i246 in range(_size242): + _elem247 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.tidlist.append(_elem247) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.timPage = TimPage() + self.timPage.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.midlist = [] + (_etype251, _size248) = iprot.readListBegin() + for _i252 in range(_size248): + _elem253 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.midlist.append(_elem253) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.extraMap = {} + (_ktype255, _vtype256, _size254) = iprot.readMapBegin() + for _i258 in range(_size254): + _key259 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val260 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.extraMap[_key259] = _val260 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TimMessageIq') + if self.tidlist is not None: + oprot.writeFieldBegin('tidlist', TType.LIST, 1) + oprot.writeListBegin(TType.STRING, len(self.tidlist)) + for iter261 in self.tidlist: + oprot.writeString(iter261.encode('utf-8') if sys.version_info[0] == 2 else iter261) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.timPage is not None: + oprot.writeFieldBegin('timPage', TType.STRUCT, 2) + self.timPage.write(oprot) + oprot.writeFieldEnd() + if self.midlist is not None: + oprot.writeFieldBegin('midlist', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.midlist)) + for iter262 in self.midlist: + oprot.writeString(iter262.encode('utf-8') if sys.version_info[0] == 2 else iter262) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.extraMap is not None: + oprot.writeFieldBegin('extraMap', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) + for kiter263, viter264 in self.extraMap.items(): + oprot.writeString(kiter263.encode('utf-8') if sys.version_info[0] == 2 else kiter263) + oprot.writeString(viter264.encode('utf-8') if sys.version_info[0] == 2 else viter264) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TimAuth(object): + """ + Attributes: + - domain: 域名 + - username: 用户名 + - pwd: 密码 + + """ + + + def __init__(self, domain=None, username=None, pwd=None,): + self.domain = domain + self.username = username + self.pwd = pwd + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.domain = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.username = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.pwd = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TimAuth') + if self.domain is not None: + oprot.writeFieldBegin('domain', TType.STRING, 1) + oprot.writeString(self.domain.encode('utf-8') if sys.version_info[0] == 2 else self.domain) + oprot.writeFieldEnd() + if self.username is not None: + oprot.writeFieldBegin('username', TType.STRING, 2) + oprot.writeString(self.username.encode('utf-8') if sys.version_info[0] == 2 else self.username) + oprot.writeFieldEnd() + if self.pwd is not None: + oprot.writeFieldBegin('pwd', TType.STRING, 3) + oprot.writeString(self.pwd.encode('utf-8') if sys.version_info[0] == 2 else self.pwd) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TimMBeanList(object): + """ + Attributes: + - threadId + - timMBeanList: 信息列表 + - reqType: 类型 + - extraMap + + """ + + + def __init__(self, threadId=None, timMBeanList=None, reqType=None, extraMap=None,): + self.threadId = threadId + self.timMBeanList = timMBeanList + self.reqType = reqType + self.extraMap = extraMap + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.threadId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.timMBeanList = [] + (_etype268, _size265) = iprot.readListBegin() + for _i269 in range(_size265): + _elem270 = TimMBean() + _elem270.read(iprot) + self.timMBeanList.append(_elem270) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.reqType = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.extraMap = {} + (_ktype272, _vtype273, _size271) = iprot.readMapBegin() + for _i275 in range(_size271): + _key276 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val277 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.extraMap[_key276] = _val277 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TimMBeanList') + if self.threadId is not None: + oprot.writeFieldBegin('threadId', TType.STRING, 1) + oprot.writeString(self.threadId.encode('utf-8') if sys.version_info[0] == 2 else self.threadId) + oprot.writeFieldEnd() + if self.timMBeanList is not None: + oprot.writeFieldBegin('timMBeanList', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.timMBeanList)) + for iter278 in self.timMBeanList: + iter278.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.reqType is not None: + oprot.writeFieldBegin('reqType', TType.STRING, 3) + oprot.writeString(self.reqType.encode('utf-8') if sys.version_info[0] == 2 else self.reqType) + oprot.writeFieldEnd() + if self.extraMap is not None: + oprot.writeFieldBegin('extraMap', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) + for kiter279, viter280 in self.extraMap.items(): + oprot.writeString(kiter279.encode('utf-8') if sys.version_info[0] == 2 else kiter279) + oprot.writeString(viter280.encode('utf-8') if sys.version_info[0] == 2 else viter280) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.threadId is None: + raise TProtocolException(message='Required field threadId is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TimPBeanList(object): + """ + Attributes: + - threadId + - timPBeanList: 状态信息列表 + - reqType: 类型 + - extraMap + + """ + + + def __init__(self, threadId=None, timPBeanList=None, reqType=None, extraMap=None,): + self.threadId = threadId + self.timPBeanList = timPBeanList + self.reqType = reqType + self.extraMap = extraMap + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.threadId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.timPBeanList = [] + (_etype284, _size281) = iprot.readListBegin() + for _i285 in range(_size281): + _elem286 = TimPBean() + _elem286.read(iprot) + self.timPBeanList.append(_elem286) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.reqType = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.extraMap = {} + (_ktype288, _vtype289, _size287) = iprot.readMapBegin() + for _i291 in range(_size287): + _key292 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + _val293 = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + self.extraMap[_key292] = _val293 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TimPBeanList') + if self.threadId is not None: + oprot.writeFieldBegin('threadId', TType.STRING, 1) + oprot.writeString(self.threadId.encode('utf-8') if sys.version_info[0] == 2 else self.threadId) + oprot.writeFieldEnd() + if self.timPBeanList is not None: + oprot.writeFieldBegin('timPBeanList', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.timPBeanList)) + for iter294 in self.timPBeanList: + iter294.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.reqType is not None: + oprot.writeFieldBegin('reqType', TType.STRING, 3) + oprot.writeString(self.reqType.encode('utf-8') if sys.version_info[0] == 2 else self.reqType) + oprot.writeFieldEnd() + if self.extraMap is not None: + oprot.writeFieldBegin('extraMap', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.extraMap)) + for kiter295, viter296 in self.extraMap.items(): + oprot.writeString(kiter295.encode('utf-8') if sys.version_info[0] == 2 else kiter295) + oprot.writeString(viter296.encode('utf-8') if sys.version_info[0] == 2 else viter296) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.threadId is None: + raise TProtocolException(message='Required field threadId is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TimPropertyBean(object): + """ + Attributes: + - threadId + - interflow: 消息合流 + - tls: tls + + """ + + + def __init__(self, threadId=None, interflow=None, tls=None,): + self.threadId = threadId + self.interflow = interflow + self.tls = tls + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec]) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.threadId = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.interflow = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tls = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TimPropertyBean') + if self.threadId is not None: + oprot.writeFieldBegin('threadId', TType.STRING, 1) + oprot.writeString(self.threadId.encode('utf-8') if sys.version_info[0] == 2 else self.threadId) + oprot.writeFieldEnd() + if self.interflow is not None: + oprot.writeFieldBegin('interflow', TType.STRING, 2) + oprot.writeString(self.interflow.encode('utf-8') if sys.version_info[0] == 2 else self.interflow) + oprot.writeFieldEnd() + if self.tls is not None: + oprot.writeFieldBegin('tls', TType.STRING, 3) + oprot.writeString(self.tls.encode('utf-8') if sys.version_info[0] == 2 else self.tls) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(TimError) +TimError.thrift_spec = ( + None, # 0 + (1, TType.I32, 'errCode', None, None, ), # 1 + (2, TType.STRING, 'errMsg', 'UTF8', None, ), # 2 +) +all_structs.append(TimNode) +TimNode.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'key', 'UTF8', None, ), # 1 + (2, TType.STRING, 'value', 'UTF8', None, ), # 2 +) +all_structs.append(TimAckBean) +TimAckBean.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'id', 'UTF8', None, ), # 1 + (2, TType.STRING, 'ackType', 'UTF8', None, ), # 2 + (3, TType.STRING, 'ackStatus', 'UTF8', None, ), # 3 + (4, TType.LIST, 'extraList', (TType.STRUCT, [TimNode, None], False), None, ), # 4 + (5, TType.STRUCT, 'err', [TimError, None], None, ), # 5 + (6, TType.MAP, 'extraMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 6 +) +all_structs.append(TimHBean) +TimHBean.thrift_spec = ( + None, # 0 + (1, TType.I32, 'chl', None, None, ), # 1 + (2, TType.I32, 'platform', None, None, ), # 2 + (3, TType.I16, 'version', None, None, ), # 3 +) +all_structs.append(TimParam) +TimParam.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'timestamp', 'UTF8', None, ), # 1 + (2, TType.I16, 'version', None, None, ), # 2 + (3, TType.STRING, 'lang', 'UTF8', None, ), # 3 + (4, TType.LIST, 'extraList', (TType.STRUCT, [TimNode, None], False), None, ), # 4 + (5, TType.MAP, 'extraMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 5 + (6, TType.STRING, 'interflow', 'UTF8', None, ), # 6 + (7, TType.STRING, 'tls', 'UTF8', None, ), # 7 +) +all_structs.append(TimTime) +TimTime.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'timestamp', 'UTF8', None, ), # 1 + (2, TType.STRING, 'formattime', 'UTF8', None, ), # 2 +) +all_structs.append(TimArea) +TimArea.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'country', 'UTF8', None, ), # 1 + (2, TType.STRING, 'province', 'UTF8', None, ), # 2 + (3, TType.STRING, 'city', 'UTF8', None, ), # 3 + (4, TType.LIST, 'extraList', (TType.STRUCT, [TimNode, None], False), None, ), # 4 + (5, TType.MAP, 'extraMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 5 +) +all_structs.append(Tid) +Tid.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', 'UTF8', None, ), # 1 + (2, TType.STRING, 'domain', 'UTF8', None, ), # 2 + (3, TType.STRING, 'resource', 'UTF8', None, ), # 3 + (4, TType.STRING, 'type', 'UTF8', None, ), # 4 + (5, TType.LIST, 'extraList', (TType.STRUCT, [TimNode, None], False), None, ), # 5 + (6, TType.MAP, 'extraMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 6 +) +all_structs.append(TimUserBean) +TimUserBean.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tid', [Tid, None], None, ), # 1 + (2, TType.STRING, 'nickname', 'UTF8', None, ), # 2 + (3, TType.STRING, 'remarkname', 'UTF8', None, ), # 3 + (4, TType.STRING, 'brithday', 'UTF8', None, ), # 4 + (5, TType.I16, 'gender', None, None, ), # 5 + (6, TType.STRING, 'headurl', 'UTF8', None, ), # 6 + (7, TType.STRUCT, 'area', [TimArea, None], None, ), # 7 + (8, TType.STRING, 'headbyte', 'BINARY', None, ), # 8 + (9, TType.LIST, 'photoBytes', (TType.STRING, 'BINARY', False), None, ), # 9 + (10, TType.LIST, 'extraList', (TType.STRUCT, [TimNode, None], False), None, ), # 10 + (11, TType.MAP, 'extraMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 11 +) +all_structs.append(TimRoom) +TimRoom.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tid', [Tid, None], None, ), # 1 + (2, TType.STRUCT, 'founderTid', [Tid, None], None, ), # 2 + (3, TType.LIST, 'HostsTid', (TType.STRUCT, [Tid, None], False), None, ), # 3 + (4, TType.LIST, 'membersTid', (TType.STRUCT, [Tid, None], False), None, ), # 4 + (5, TType.STRING, 'headurl', 'UTF8', None, ), # 5 + (6, TType.STRING, 'roomName', 'UTF8', None, ), # 6 + (7, TType.STRING, 'desc', 'UTF8', None, ), # 7 + (8, TType.STRUCT, 'createTime', [TimTime, None], None, ), # 8 + (9, TType.LIST, 'extraList', (TType.STRUCT, [TimNode, None], False), None, ), # 9 + (10, TType.MAP, 'extraMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 10 +) +all_structs.append(TimPBean) +TimPBean.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'threadId', 'UTF8', None, ), # 1 + (2, TType.STRUCT, 'fromTid', [Tid, None], None, ), # 2 + (3, TType.STRUCT, 'toTid', [Tid, None], None, ), # 3 + (4, TType.STRING, 'status', 'UTF8', None, ), # 4 + (5, TType.STRING, 'type', 'UTF8', None, ), # 5 + (6, TType.I32, 'priority', None, None, ), # 6 + (7, TType.STRING, 'show', 'UTF8', None, ), # 7 + (8, TType.STRUCT, 'leaguerTid', [Tid, None], None, ), # 8 + (9, TType.LIST, 'extraList', (TType.STRUCT, [TimNode, None], False), None, ), # 9 + (10, TType.STRUCT, 'error', [TimError, None], None, ), # 10 + (11, TType.MAP, 'extraMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 11 +) +all_structs.append(TimMBean) +TimMBean.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'threadId', 'UTF8', None, ), # 1 + (2, TType.STRING, 'mid', 'UTF8', None, ), # 2 + (3, TType.STRUCT, 'fromTid', [Tid, None], None, ), # 3 + (4, TType.STRUCT, 'toTid', [Tid, None], None, ), # 4 + (5, TType.STRING, 'body', 'UTF8', None, ), # 5 + (6, TType.STRING, 'type', 'UTF8', None, ), # 6 + (7, TType.I16, 'msgType', None, None, ), # 7 + (8, TType.STRUCT, 'offline', [TimTime, None], None, ), # 8 + (9, TType.STRUCT, 'leaguerTid', [Tid, None], None, ), # 9 + (10, TType.LIST, 'extraList', (TType.STRUCT, [TimNode, None], False), None, ), # 10 + (11, TType.STRING, 'timestamp', 'UTF8', None, ), # 11 + (12, TType.STRUCT, 'error', [TimError, None], None, ), # 12 + (13, TType.MAP, 'extraMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 13 + (14, TType.I16, 'readstatus', None, None, ), # 14 +) +all_structs.append(TimIqBean) +TimIqBean.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'threadId', 'UTF8', None, ), # 1 + (2, TType.STRUCT, 'fromTid', [Tid, None], None, ), # 2 + (3, TType.STRUCT, 'toTid', [Tid, None], None, ), # 3 + (4, TType.STRING, 'type', 'UTF8', None, ), # 4 + (5, TType.LIST, 'extraList', (TType.STRUCT, [TimNode, None], False), None, ), # 5 + (6, TType.STRUCT, 'error', [TimError, None], None, ), # 6 + (7, TType.MAP, 'extraMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 7 +) +all_structs.append(TimRoster) +TimRoster.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'subscription', 'UTF8', None, ), # 1 + (2, TType.STRUCT, 'tid', [Tid, None], None, ), # 2 + (3, TType.STRING, 'name', 'UTF8', None, ), # 3 + (4, TType.MAP, 'extraMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 4 +) +all_structs.append(TimRemoteUserBean) +TimRemoteUserBean.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'error', [TimError, None], None, ), # 1 + (2, TType.STRUCT, 'ub', [TimUserBean, None], None, ), # 2 + (3, TType.MAP, 'extraMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 3 +) +all_structs.append(TimRemoteRoom) +TimRemoteRoom.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'error', [TimError, None], None, ), # 1 + (2, TType.STRUCT, 'room', [TimRoom, None], None, ), # 2 + (3, TType.MAP, 'extraMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 3 +) +all_structs.append(TimResponseBean) +TimResponseBean.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'threadId', 'UTF8', None, ), # 1 + (2, TType.STRUCT, 'error', [TimError, None], None, ), # 2 + (3, TType.LIST, 'extraList', (TType.STRUCT, [TimNode, None], False), None, ), # 3 + (4, TType.MAP, 'extraMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 4 +) +all_structs.append(TimSock5Bean) +TimSock5Bean.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'fromTid', [Tid, None], None, ), # 1 + (2, TType.STRUCT, 'toTid', [Tid, None], None, ), # 2 + (3, TType.STRING, 'addr', 'UTF8', None, ), # 3 + (4, TType.I32, 'port', None, None, ), # 4 + (5, TType.I16, 'transport', None, None, ), # 5 + (6, TType.STRING, 'pubId', 'UTF8', None, ), # 6 + (7, TType.MAP, 'extraMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 7 +) +all_structs.append(TimSock5Bytes) +TimSock5Bytes.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'pubId', 'UTF8', None, ), # 1 + (2, TType.I32, 'index', None, None, ), # 2 + (3, TType.LIST, 'bytes', (TType.STRING, 'BINARY', False), None, ), # 3 + (4, TType.MAP, 'extraMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 4 +) +all_structs.append(TimPage) +TimPage.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'fromTimeStamp', 'UTF8', None, ), # 1 + (2, TType.STRING, 'toTimeStamp', 'UTF8', None, ), # 2 + (3, TType.I32, 'limitCount', None, None, ), # 3 + (4, TType.MAP, 'extraMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 4 +) +all_structs.append(TimMessageIq) +TimMessageIq.thrift_spec = ( + None, # 0 + (1, TType.LIST, 'tidlist', (TType.STRING, 'UTF8', False), None, ), # 1 + (2, TType.STRUCT, 'timPage', [TimPage, None], None, ), # 2 + (3, TType.LIST, 'midlist', (TType.STRING, 'UTF8', False), None, ), # 3 + (4, TType.MAP, 'extraMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 4 +) +all_structs.append(TimAuth) +TimAuth.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'domain', 'UTF8', None, ), # 1 + (2, TType.STRING, 'username', 'UTF8', None, ), # 2 + (3, TType.STRING, 'pwd', 'UTF8', None, ), # 3 +) +all_structs.append(TimMBeanList) +TimMBeanList.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'threadId', 'UTF8', None, ), # 1 + (2, TType.LIST, 'timMBeanList', (TType.STRUCT, [TimMBean, None], False), None, ), # 2 + (3, TType.STRING, 'reqType', 'UTF8', None, ), # 3 + (4, TType.MAP, 'extraMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 4 +) +all_structs.append(TimPBeanList) +TimPBeanList.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'threadId', 'UTF8', None, ), # 1 + (2, TType.LIST, 'timPBeanList', (TType.STRUCT, [TimPBean, None], False), None, ), # 2 + (3, TType.STRING, 'reqType', 'UTF8', None, ), # 3 + (4, TType.MAP, 'extraMap', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 4 +) +all_structs.append(TimPropertyBean) +TimPropertyBean.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'threadId', 'UTF8', None, ), # 1 + (2, TType.STRING, 'interflow', 'UTF8', None, ), # 2 + (3, TType.STRING, 'tls', 'UTF8', None, ), # 3 +) +fix_spec(all_structs) +del all_structs diff --git a/protocols/gen-rb/i_tim.rb b/protocols/gen-rb/i_tim.rb index 11b8578..ac96bb6 100644 --- a/protocols/gen-rb/i_tim.rb +++ b/protocols/gen-rb/i_tim.rb @@ -1,5 +1,5 @@ # -# Autogenerated by Thrift Compiler (0.9.3) +# Autogenerated by Thrift Compiler (0.17.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # diff --git a/protocols/gen-rb/tim_constants.rb b/protocols/gen-rb/tim_constants.rb index 533810c..837d8e2 100644 --- a/protocols/gen-rb/tim_constants.rb +++ b/protocols/gen-rb/tim_constants.rb @@ -1,5 +1,5 @@ # -# Autogenerated by Thrift Compiler (0.9.3) +# Autogenerated by Thrift Compiler (0.17.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # diff --git a/protocols/gen-rb/tim_types.rb b/protocols/gen-rb/tim_types.rb index 014f90b..2d4a487 100644 --- a/protocols/gen-rb/tim_types.rb +++ b/protocols/gen-rb/tim_types.rb @@ -1,11 +1,61 @@ # -# Autogenerated by Thrift Compiler (0.9.3) +# Autogenerated by Thrift Compiler (0.17.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # require 'thrift' +class TimError; end + +class TimNode; end + +class TimAckBean; end + +class TimHBean; end + +class TimParam; end + +class TimTime; end + +class TimArea; end + +class Tid; end + +class TimUserBean; end + +class TimRoom; end + +class TimPBean; end + +class TimMBean; end + +class TimIqBean; end + +class TimRoster; end + +class TimRemoteUserBean; end + +class TimRemoteRoom; end + +class TimResponseBean; end + +class TimSock5Bean; end + +class TimSock5Bytes; end + +class TimPage; end + +class TimMessageIq; end + +class TimAuth; end + +class TimMBeanList; end + +class TimPBeanList; end + +class TimPropertyBean; end + class TimError include ::Thrift::Struct, ::Thrift::Struct_Union ERRCODE = 1 diff --git a/tim.route/route.go b/route/route.go similarity index 98% rename from tim.route/route.go rename to route/route.go index 0400f45..f39c5e8 100644 --- a/tim.route/route.go +++ b/route/route.go @@ -9,12 +9,13 @@ import ( "runtime/debug" "time" + . "tim/common" + . "tim/connect" + "tim/daoService" + . "tim/protocol" + "tim/utils" + "github.com/donnie4w/go-logger/logger" - . "tim.common" - . "tim.connect" - "tim.daoService" - . "tim.protocol" - "tim.utils" ) /**********************************************Message***********************************************/ diff --git a/tim.serializer/serializer_test.go b/serializer/serializer_test.go similarity index 56% rename from tim.serializer/serializer_test.go rename to serializer/serializer_test.go index ef225d6..47a7f37 100644 --- a/tim.serializer/serializer_test.go +++ b/serializer/serializer_test.go @@ -1,24 +1,25 @@ package serializer import ( + "context" "fmt" "testing" + "tim/base64Util" + "tim/protocol" - "git.apache.org/thrift.git/lib/go/thrift" - "tim.base64Util" - "tim.protocol" + "github.com/apache/thrift/lib/go/thrift" ) func Test_ser(t *testing.T) { mbean := protocol.NewTimMBean() body := "wuxiaodong" mbean.Body = &body - b, _ := thrift.NewTSerializer().Write(mbean) + b, _ := thrift.NewTSerializer().Write(context.Background(), mbean) base64str := string(base64Util.Base64Encode(b)) fmt.Println(">>>>>>>>", base64str) var mbean2 *protocol.TimMBean = protocol.NewTimMBean() - bb, _ := base64Util.Base64Decode([]byte(base64str)) - thrift.NewTDeserializer().Read(mbean2, bb) + bb, _ := base64Util.Base64Decode(base64str) + thrift.NewTDeserializer().Read(context.Background(), mbean2, bb) fmt.Println(mbean2) fmt.Println(*mbean2.Body) } diff --git a/tim.service/controller.go b/service/controller.go similarity index 91% rename from tim.service/controller.go rename to service/controller.go index c7558d7..827f899 100644 --- a/tim.service/controller.go +++ b/service/controller.go @@ -4,6 +4,7 @@ package service import ( + "context" "crypto/tls" "errors" "fmt" @@ -12,19 +13,20 @@ import ( "sync" "time" - "git.apache.org/thrift.git/lib/go/thrift" + "tim/FW" + "tim/cluster" + "tim/clusterRoute" + "tim/clusterServer" + . "tim/common" + . "tim/connect" + . "tim/impl" + . "tim/protocol" + "tim/route" + "tim/thriftserver" + "tim/utils" + + "github.com/apache/thrift/lib/go/thrift" "github.com/donnie4w/go-logger/logger" - "tim.FW" - "tim.cluster" - "tim.clusterRoute" - "tim.clusterServer" - . "tim.common" - . "tim.connect" - . "tim.impl" - . "tim.protocol" - "tim.route" - "tim.thriftserver" - "tim.utils" ) type Controlloer struct { @@ -141,7 +143,7 @@ func controllerHandler(tt thrift.TTransport) { *gorutineclose = true } }() - tu := &TimUser{Client: NewTimClient(tt), OverLimit: 3, Fw: FW.CONNECT, IdCardNo: utils.TimeMills(), Sendflag: make(chan string, 0), Sync: new(sync.Mutex)} + tu := &TimUser{Ts: tt, Client: NewTimClient(tt), OverLimit: 3, Fw: FW.CONNECT, IdCardNo: utils.TimeMills(), Sendflag: make(chan string, 0), Sync: new(sync.Mutex)} TP.AddConnect(tu) defer func() { if cluster.IsCluster() && tu.UserTid != nil { @@ -234,7 +236,7 @@ func controllerHandler(tt thrift.TTransport) { func NewTimClient(tt thrift.TTransport) *ITimClient { transportFactory := thrift.NewTBufferedTransportFactory(1024) protocolFactory := thrift.NewTCompactProtocolFactory() - useTransport := transportFactory.GetTransport(tt) + useTransport, _ := transportFactory.GetTransport(tt) return NewITimClientFactory(useTransport, protocolFactory) } @@ -259,7 +261,7 @@ func TimProcessor(client thrift.TTransport, tu *TimUser, gorutineclose *bool, mo handler := &TimImpl{Pub: pub, Client: client, Tu: tu} processor := NewITimProcessor(handler) for { - ok, err := processor.Process(compactprotocol, compactprotocol) + ok, err := processor.Process(context.Background(), compactprotocol, compactprotocol) if err, ok := err.(thrift.TTransportException); ok && err.TypeId() == thrift.END_OF_FILE { return nil } else if err != nil { diff --git a/tim.service/httpserver.go b/service/httpserver.go similarity index 90% rename from tim.service/httpserver.go rename to service/httpserver.go index df10614..957fa41 100644 --- a/tim.service/httpserver.go +++ b/service/httpserver.go @@ -4,6 +4,7 @@ package service import ( + "context" "fmt" "net/http" _ "net/http/pprof" @@ -11,13 +12,15 @@ import ( "strings" "time" - "git.apache.org/thrift.git/lib/go/thrift" + "github.com/apache/thrift/lib/go/thrift" + + "tim/daoService" + "tim/protocol" + + . "tim/common" + . "tim/impl" "github.com/donnie4w/go-logger/logger" - . "tim.common" - "tim.daoService" - . "tim.impl" - "tim.protocol" ) func Httpserver() { @@ -69,6 +72,6 @@ func tim(w http.ResponseWriter, r *http.Request) { outProtocol := protocolFactory.GetProtocol(transport) handler := &TimImpl{Ip: ipaddr} processor := protocol.NewITimProcessor(handler) - processor.Process(inProtocol, outProtocol) + processor.Process(context.Background(), inProtocol, outProtocol) } } diff --git a/tim.service/info.go b/service/info.go similarity index 98% rename from tim.service/info.go rename to service/info.go index 3b4bd80..84d361b 100644 --- a/tim.service/info.go +++ b/service/info.go @@ -10,9 +10,11 @@ import ( "runtime/debug" "strings" + . "tim/connect" + + "tim/hbase" + "github.com/donnie4w/go-logger/logger" - . "tim.connect" - "tim.hbase" ) func info(w http.ResponseWriter, r *http.Request) { diff --git a/tim.service/service.go b/service/service.go similarity index 97% rename from tim.service/service.go rename to service/service.go index 598eace..18ef380 100644 --- a/tim.service/service.go +++ b/service/service.go @@ -7,8 +7,9 @@ import ( "fmt" "net" + . "tim/common" + "github.com/donnie4w/go-logger/logger" - . "tim.common" ) func Start() { diff --git a/tim.tfClient/tfClient.go b/tfClient/tfClient.go similarity index 95% rename from tim.tfClient/tfClient.go rename to tfClient/tfClient.go index bdcab73..36c858f 100644 --- a/tim.tfClient/tfClient.go +++ b/tfClient/tfClient.go @@ -8,10 +8,10 @@ import ( "fmt" "runtime/debug" - "git.apache.org/thrift.git/lib/go/thrift" + "github.com/apache/thrift/lib/go/thrift" "github.com/donnie4w/go-logger/logger" - // . "tim.common" - . "tim.protocol" + + . "tim/protocol" ) func HttpClient(f func(*ITimClient) error, urlstr string) (err error) { diff --git a/tfClient/tfClient_test.go b/tfClient/tfClient_test.go new file mode 100644 index 0000000..dca9db7 --- /dev/null +++ b/tfClient/tfClient_test.go @@ -0,0 +1,31 @@ +package tfClient + +import ( + "testing" + // . "tim/protocol" +) + +func TestRemote(t *testing.T) { + // tid := NewTid() + + // tid.Name = "734604" + // pwd := "e10adc3949ba59abbe56e057f20f883e" + // HttpClient(func(client *ITimClient) { + // r, er := client.TimRemoteUserAuth(context.Background(), tid, pwd, nil) + // if er == nil && r != nil { + // fmt.Println(r) + // if r.ExtraMap != nil { + // if password, ok := r.ExtraMap["password"]; ok { + // if pwd == password { + // fmt.Print("ok") + // } + // } + // if extraAuth, ok := r.ExtraMap["extraAuth"]; ok { + // if pwd == extraAuth { + // fmt.Print("ok2") + // } + // } + // } + // } + // }) +} diff --git a/tim.thriftserver/server.go b/thriftserver/server.go similarity index 94% rename from tim.thriftserver/server.go rename to thriftserver/server.go index 767cae6..60a9636 100644 --- a/tim.thriftserver/server.go +++ b/thriftserver/server.go @@ -4,11 +4,12 @@ package thriftserver import ( + "context" "fmt" "log" "runtime/debug" - thrift "git.apache.org/thrift.git/lib/go/thrift" + "github.com/apache/thrift/lib/go/thrift" ) // Simple, non-concurrent server for testing. @@ -73,7 +74,7 @@ func NewTSimpleServerFactory6(processorFactory thrift.TProcessorFactory, serverT outputTransportFactory: outputTransportFactory, inputProtocolFactory: inputProtocolFactory, outputProtocolFactory: outputProtocolFactory, - quit: make(chan struct{}, 1), + quit: make(chan struct{}, 1), } } @@ -143,8 +144,8 @@ func (p *TSimpleServer) Stop() error { func (p *TSimpleServer) processRequests(client thrift.TTransport) error { processor := p.processorFactory.GetProcessor(client) - inputTransport := p.inputTransportFactory.GetTransport(client) - outputTransport := p.outputTransportFactory.GetTransport(client) + inputTransport, _ := p.inputTransportFactory.GetTransport(client) + outputTransport, _ := p.outputTransportFactory.GetTransport(client) inputProtocol := p.inputProtocolFactory.GetProtocol(inputTransport) outputProtocol := p.outputProtocolFactory.GetProtocol(outputTransport) defer func() { @@ -159,7 +160,7 @@ func (p *TSimpleServer) processRequests(client thrift.TTransport) error { defer outputTransport.Close() } for { - ok, err := processor.Process(inputProtocol, outputProtocol) + ok, err := processor.Process(context.Background(), inputProtocol, outputProtocol) if err, ok := err.(thrift.TTransportException); ok && err.TypeId() == thrift.END_OF_FILE { return nil } else if err != nil { diff --git a/tim.ticker/ticker.go b/ticker/ticker.go similarity index 95% rename from tim.ticker/ticker.go rename to ticker/ticker.go index 3ba5383..f9d9f7d 100644 --- a/tim.ticker/ticker.go +++ b/ticker/ticker.go @@ -7,9 +7,10 @@ import ( "runtime/debug" "time" + . "tim/common" + "tim/daoService" + "github.com/donnie4w/go-logger/logger" - . "tim.common" - "tim.daoService" ) func TickerStart() { diff --git a/tim.go b/tim.go index 1e8c5b9..36835f2 100644 --- a/tim.go +++ b/tim.go @@ -8,15 +8,18 @@ import ( "fmt" "os" - gdao "github.com/donnie4w/gdao" + . "tim/common" + + "tim/DB" + "tim/cluster" + "tim/daoService" + "tim/service" + "tim/ticker" + + . "tim/protocol" + + "github.com/donnie4w/gdao" "github.com/donnie4w/go-logger/logger" - "tim.DB" - "tim.cluster" - . "tim.common" - "tim.daoService" - . "tim.protocol" - "tim.service" - "tim.ticker" ) func init() { diff --git a/tim.hbase/thbaseservice.go b/tim.hbase/thbaseservice.go deleted file mode 100644 index 63a1f9f..0000000 --- a/tim.hbase/thbaseservice.go +++ /dev/null @@ -1,8964 +0,0 @@ -// Autogenerated by Thrift Compiler (0.9.3) -// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - -package hbase - -import ( - "bytes" - "fmt" - "git.apache.org/thrift.git/lib/go/thrift" -) - -// (needed to ensure safety because of naive import list construction.) -var _ = thrift.ZERO -var _ = fmt.Printf -var _ = bytes.Equal - -type THBaseService interface { - // Test for the existence of columns in the table, as specified in the TGet. - // - // @return true if the specified TGet matches one or more keys, false if not - // - // Parameters: - // - Table: the table to check on - // - Tget: the TGet to check for - Exists(table []byte, tget *TGet) (r bool, err error) - // Method for getting data from a row. - // - // If the row cannot be found an empty Result is returned. - // This can be checked by the empty field of the TResult - // - // @return the result - // - // Parameters: - // - Table: the table to get from - // - Tget: the TGet to fetch - Get(table []byte, tget *TGet) (r *TResult_, err error) - // Method for getting multiple rows. - // - // If a row cannot be found there will be a null - // value in the result list for that TGet at the - // same position. - // - // So the Results are in the same order as the TGets. - // - // Parameters: - // - Table: the table to get from - // - Tgets: a list of TGets to fetch, the Result list - // will have the Results at corresponding positions - // or null if there was an error - GetMultiple(table []byte, tgets []*TGet) (r []*TResult_, err error) - // Commit a TPut to a table. - // - // Parameters: - // - Table: the table to put data in - // - Tput: the TPut to put - Put(table []byte, tput *TPut) (err error) - // Atomically checks if a row/family/qualifier value matches the expected - // value. If it does, it adds the TPut. - // - // @return true if the new put was executed, false otherwise - // - // Parameters: - // - Table: to check in and put to - // - Row: row to check - // - Family: column family to check - // - Qualifier: column qualifier to check - // - Value: the expected value, if not provided the - // check is for the non-existence of the - // column in question - // - Tput: the TPut to put if the check succeeds - CheckAndPut(table []byte, row []byte, family []byte, qualifier []byte, value []byte, tput *TPut) (r bool, err error) - // Commit a List of Puts to the table. - // - // Parameters: - // - Table: the table to put data in - // - Tputs: a list of TPuts to commit - PutMultiple(table []byte, tputs []*TPut) (err error) - // Deletes as specified by the TDelete. - // - // Note: "delete" is a reserved keyword and cannot be used in Thrift - // thus the inconsistent naming scheme from the other functions. - // - // Parameters: - // - Table: the table to delete from - // - Tdelete: the TDelete to delete - DeleteSingle(table []byte, tdelete *TDelete) (err error) - // Bulk commit a List of TDeletes to the table. - // - // Throws a TIOError if any of the deletes fail. - // - // Always returns an empty list for backwards compatibility. - // - // Parameters: - // - Table: the table to delete from - // - Tdeletes: list of TDeletes to delete - DeleteMultiple(table []byte, tdeletes []*TDelete) (r []*TDelete, err error) - // Atomically checks if a row/family/qualifier value matches the expected - // value. If it does, it adds the delete. - // - // @return true if the new delete was executed, false otherwise - // - // Parameters: - // - Table: to check in and delete from - // - Row: row to check - // - Family: column family to check - // - Qualifier: column qualifier to check - // - Value: the expected value, if not provided the - // check is for the non-existence of the - // column in question - // - Tdelete: the TDelete to execute if the check succeeds - CheckAndDelete(table []byte, row []byte, family []byte, qualifier []byte, value []byte, tdelete *TDelete) (r bool, err error) - // Parameters: - // - Table: the table to increment the value on - // - Tincrement: the TIncrement to increment - Increment(table []byte, tincrement *TIncrement) (r *TResult_, err error) - // Parameters: - // - Table: the table to append the value on - // - Tappend: the TAppend to append - Append(table []byte, tappend *TAppend) (r *TResult_, err error) - // Get a Scanner for the provided TScan object. - // - // @return Scanner Id to be used with other scanner procedures - // - // Parameters: - // - Table: the table to get the Scanner for - // - Tscan: the scan object to get a Scanner for - OpenScanner(table []byte, tscan *TScan) (r int32, err error) - // Grabs multiple rows from a Scanner. - // - // @return Between zero and numRows TResults - // - // Parameters: - // - ScannerId: the Id of the Scanner to return rows from. This is an Id returned from the openScanner function. - // - NumRows: number of rows to return - GetScannerRows(scannerId int32, numRows int32) (r []*TResult_, err error) - // Closes the scanner. Should be called to free server side resources timely. - // Typically close once the scanner is not needed anymore, i.e. after looping - // over it to get all the required rows. - // - // Parameters: - // - ScannerId: the Id of the Scanner to close * - CloseScanner(scannerId int32) (err error) - // mutateRow performs multiple mutations atomically on a single row. - // - // Parameters: - // - Table: table to apply the mutations - // - TrowMutations: mutations to apply - MutateRow(table []byte, trowMutations *TRowMutations) (err error) - // Get results for the provided TScan object. - // This helper function opens a scanner, get the results and close the scanner. - // - // @return between zero and numRows TResults - // - // Parameters: - // - Table: the table to get the Scanner for - // - Tscan: the scan object to get a Scanner for - // - NumRows: number of rows to return - GetScannerResults(table []byte, tscan *TScan, numRows int32) (r []*TResult_, err error) - // Given a table and a row get the location of the region that - // would contain the given row key. - // - // reload = true means the cache will be cleared and the location - // will be fetched from meta. - // - // Parameters: - // - Table - // - Row - // - Reload - GetRegionLocation(table []byte, row []byte, reload bool) (r *THRegionLocation, err error) - // Get all of the region locations for a given table. - // - // - // Parameters: - // - Table - GetAllRegionLocations(table []byte) (r []*THRegionLocation, err error) - // Atomically checks if a row/family/qualifier value matches the expected - // value. If it does, it mutates the row. - // - // @return true if the row was mutated, false otherwise - // - // Parameters: - // - Table: to check in and delete from - // - Row: row to check - // - Family: column family to check - // - Qualifier: column qualifier to check - // - CompareOp: comparison to make on the value - // - Value: the expected value to be compared against, if not provided the - // check is for the non-existence of the column in question - // - RowMutations: row mutations to execute if the value matches - CheckAndMutate(table []byte, row []byte, family []byte, qualifier []byte, compareOp TCompareOp, value []byte, rowMutations *TRowMutations) (r bool, err error) -} - -type THBaseServiceClient struct { - Transport thrift.TTransport - ProtocolFactory thrift.TProtocolFactory - InputProtocol thrift.TProtocol - OutputProtocol thrift.TProtocol - SeqId int32 -} - -func NewTHBaseServiceClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *THBaseServiceClient { - return &THBaseServiceClient{Transport: t, - ProtocolFactory: f, - InputProtocol: f.GetProtocol(t), - OutputProtocol: f.GetProtocol(t), - SeqId: 0, - } -} - -func NewTHBaseServiceClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *THBaseServiceClient { - return &THBaseServiceClient{Transport: t, - ProtocolFactory: nil, - InputProtocol: iprot, - OutputProtocol: oprot, - SeqId: 0, - } -} - -// Test for the existence of columns in the table, as specified in the TGet. -// -// @return true if the specified TGet matches one or more keys, false if not -// -// Parameters: -// - Table: the table to check on -// - Tget: the TGet to check for -func (p *THBaseServiceClient) Exists(table []byte, tget *TGet) (r bool, err error) { - if err = p.sendExists(table, tget); err != nil { - return - } - return p.recvExists() -} - -func (p *THBaseServiceClient) sendExists(table []byte, tget *TGet) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("exists", thrift.CALL, p.SeqId); err != nil { - return - } - args := THBaseServiceExistsArgs{ - Table: table, - Tget: tget, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *THBaseServiceClient) recvExists() (value bool, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "exists" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "exists failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "exists failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error21 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error22 error - error22, err = error21.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error22 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "exists failed: invalid message type") - return - } - result := THBaseServiceExistsResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - if result.Io != nil { - err = result.Io - return - } - value = result.GetSuccess() - return -} - -// Method for getting data from a row. -// -// If the row cannot be found an empty Result is returned. -// This can be checked by the empty field of the TResult -// -// @return the result -// -// Parameters: -// - Table: the table to get from -// - Tget: the TGet to fetch -func (p *THBaseServiceClient) Get(table []byte, tget *TGet) (r *TResult_, err error) { - if err = p.sendGet(table, tget); err != nil { - return - } - return p.recvGet() -} - -func (p *THBaseServiceClient) sendGet(table []byte, tget *TGet) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("get", thrift.CALL, p.SeqId); err != nil { - return - } - args := THBaseServiceGetArgs{ - Table: table, - Tget: tget, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *THBaseServiceClient) recvGet() (value *TResult_, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "get" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "get failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "get failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error23 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error24 error - error24, err = error23.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error24 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "get failed: invalid message type") - return - } - result := THBaseServiceGetResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - if result.Io != nil { - err = result.Io - return - } - value = result.GetSuccess() - return -} - -// Method for getting multiple rows. -// -// If a row cannot be found there will be a null -// value in the result list for that TGet at the -// same position. -// -// So the Results are in the same order as the TGets. -// -// Parameters: -// - Table: the table to get from -// - Tgets: a list of TGets to fetch, the Result list -// will have the Results at corresponding positions -// or null if there was an error -func (p *THBaseServiceClient) GetMultiple(table []byte, tgets []*TGet) (r []*TResult_, err error) { - if err = p.sendGetMultiple(table, tgets); err != nil { - return - } - return p.recvGetMultiple() -} - -func (p *THBaseServiceClient) sendGetMultiple(table []byte, tgets []*TGet) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("getMultiple", thrift.CALL, p.SeqId); err != nil { - return - } - args := THBaseServiceGetMultipleArgs{ - Table: table, - Tgets: tgets, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *THBaseServiceClient) recvGetMultiple() (value []*TResult_, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "getMultiple" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "getMultiple failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "getMultiple failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error25 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error26 error - error26, err = error25.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error26 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "getMultiple failed: invalid message type") - return - } - result := THBaseServiceGetMultipleResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - if result.Io != nil { - err = result.Io - return - } - value = result.GetSuccess() - return -} - -// Commit a TPut to a table. -// -// Parameters: -// - Table: the table to put data in -// - Tput: the TPut to put -func (p *THBaseServiceClient) Put(table []byte, tput *TPut) (err error) { - if err = p.sendPut(table, tput); err != nil { - return - } - return p.recvPut() -} - -func (p *THBaseServiceClient) sendPut(table []byte, tput *TPut) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("put", thrift.CALL, p.SeqId); err != nil { - return - } - args := THBaseServicePutArgs{ - Table: table, - Tput: tput, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *THBaseServiceClient) recvPut() (err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "put" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "put failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "put failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error27 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error28 error - error28, err = error27.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error28 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "put failed: invalid message type") - return - } - result := THBaseServicePutResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - if result.Io != nil { - err = result.Io - return - } - return -} - -// Atomically checks if a row/family/qualifier value matches the expected -// value. If it does, it adds the TPut. -// -// @return true if the new put was executed, false otherwise -// -// Parameters: -// - Table: to check in and put to -// - Row: row to check -// - Family: column family to check -// - Qualifier: column qualifier to check -// - Value: the expected value, if not provided the -// check is for the non-existence of the -// column in question -// - Tput: the TPut to put if the check succeeds -func (p *THBaseServiceClient) CheckAndPut(table []byte, row []byte, family []byte, qualifier []byte, value []byte, tput *TPut) (r bool, err error) { - if err = p.sendCheckAndPut(table, row, family, qualifier, value, tput); err != nil { - return - } - return p.recvCheckAndPut() -} - -func (p *THBaseServiceClient) sendCheckAndPut(table []byte, row []byte, family []byte, qualifier []byte, value []byte, tput *TPut) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("checkAndPut", thrift.CALL, p.SeqId); err != nil { - return - } - args := THBaseServiceCheckAndPutArgs{ - Table: table, - Row: row, - Family: family, - Qualifier: qualifier, - Value: value, - Tput: tput, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *THBaseServiceClient) recvCheckAndPut() (value bool, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "checkAndPut" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "checkAndPut failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "checkAndPut failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error29 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error30 error - error30, err = error29.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error30 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "checkAndPut failed: invalid message type") - return - } - result := THBaseServiceCheckAndPutResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - if result.Io != nil { - err = result.Io - return - } - value = result.GetSuccess() - return -} - -// Commit a List of Puts to the table. -// -// Parameters: -// - Table: the table to put data in -// - Tputs: a list of TPuts to commit -func (p *THBaseServiceClient) PutMultiple(table []byte, tputs []*TPut) (err error) { - if err = p.sendPutMultiple(table, tputs); err != nil { - return - } - return p.recvPutMultiple() -} - -func (p *THBaseServiceClient) sendPutMultiple(table []byte, tputs []*TPut) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("putMultiple", thrift.CALL, p.SeqId); err != nil { - return - } - args := THBaseServicePutMultipleArgs{ - Table: table, - Tputs: tputs, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *THBaseServiceClient) recvPutMultiple() (err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "putMultiple" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "putMultiple failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "putMultiple failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error31 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error32 error - error32, err = error31.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error32 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "putMultiple failed: invalid message type") - return - } - result := THBaseServicePutMultipleResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - if result.Io != nil { - err = result.Io - return - } - return -} - -// Deletes as specified by the TDelete. -// -// Note: "delete" is a reserved keyword and cannot be used in Thrift -// thus the inconsistent naming scheme from the other functions. -// -// Parameters: -// - Table: the table to delete from -// - Tdelete: the TDelete to delete -func (p *THBaseServiceClient) DeleteSingle(table []byte, tdelete *TDelete) (err error) { - if err = p.sendDeleteSingle(table, tdelete); err != nil { - return - } - return p.recvDeleteSingle() -} - -func (p *THBaseServiceClient) sendDeleteSingle(table []byte, tdelete *TDelete) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("deleteSingle", thrift.CALL, p.SeqId); err != nil { - return - } - args := THBaseServiceDeleteSingleArgs{ - Table: table, - Tdelete: tdelete, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *THBaseServiceClient) recvDeleteSingle() (err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "deleteSingle" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "deleteSingle failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "deleteSingle failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error33 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error34 error - error34, err = error33.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error34 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "deleteSingle failed: invalid message type") - return - } - result := THBaseServiceDeleteSingleResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - if result.Io != nil { - err = result.Io - return - } - return -} - -// Bulk commit a List of TDeletes to the table. -// -// Throws a TIOError if any of the deletes fail. -// -// Always returns an empty list for backwards compatibility. -// -// Parameters: -// - Table: the table to delete from -// - Tdeletes: list of TDeletes to delete -func (p *THBaseServiceClient) DeleteMultiple(table []byte, tdeletes []*TDelete) (r []*TDelete, err error) { - if err = p.sendDeleteMultiple(table, tdeletes); err != nil { - return - } - return p.recvDeleteMultiple() -} - -func (p *THBaseServiceClient) sendDeleteMultiple(table []byte, tdeletes []*TDelete) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("deleteMultiple", thrift.CALL, p.SeqId); err != nil { - return - } - args := THBaseServiceDeleteMultipleArgs{ - Table: table, - Tdeletes: tdeletes, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *THBaseServiceClient) recvDeleteMultiple() (value []*TDelete, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "deleteMultiple" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "deleteMultiple failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "deleteMultiple failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error35 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error36 error - error36, err = error35.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error36 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "deleteMultiple failed: invalid message type") - return - } - result := THBaseServiceDeleteMultipleResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - if result.Io != nil { - err = result.Io - return - } - value = result.GetSuccess() - return -} - -// Atomically checks if a row/family/qualifier value matches the expected -// value. If it does, it adds the delete. -// -// @return true if the new delete was executed, false otherwise -// -// Parameters: -// - Table: to check in and delete from -// - Row: row to check -// - Family: column family to check -// - Qualifier: column qualifier to check -// - Value: the expected value, if not provided the -// check is for the non-existence of the -// column in question -// - Tdelete: the TDelete to execute if the check succeeds -func (p *THBaseServiceClient) CheckAndDelete(table []byte, row []byte, family []byte, qualifier []byte, value []byte, tdelete *TDelete) (r bool, err error) { - if err = p.sendCheckAndDelete(table, row, family, qualifier, value, tdelete); err != nil { - return - } - return p.recvCheckAndDelete() -} - -func (p *THBaseServiceClient) sendCheckAndDelete(table []byte, row []byte, family []byte, qualifier []byte, value []byte, tdelete *TDelete) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("checkAndDelete", thrift.CALL, p.SeqId); err != nil { - return - } - args := THBaseServiceCheckAndDeleteArgs{ - Table: table, - Row: row, - Family: family, - Qualifier: qualifier, - Value: value, - Tdelete: tdelete, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *THBaseServiceClient) recvCheckAndDelete() (value bool, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "checkAndDelete" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "checkAndDelete failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "checkAndDelete failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error37 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error38 error - error38, err = error37.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error38 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "checkAndDelete failed: invalid message type") - return - } - result := THBaseServiceCheckAndDeleteResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - if result.Io != nil { - err = result.Io - return - } - value = result.GetSuccess() - return -} - -// Parameters: -// - Table: the table to increment the value on -// - Tincrement: the TIncrement to increment -func (p *THBaseServiceClient) Increment(table []byte, tincrement *TIncrement) (r *TResult_, err error) { - if err = p.sendIncrement(table, tincrement); err != nil { - return - } - return p.recvIncrement() -} - -func (p *THBaseServiceClient) sendIncrement(table []byte, tincrement *TIncrement) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("increment", thrift.CALL, p.SeqId); err != nil { - return - } - args := THBaseServiceIncrementArgs{ - Table: table, - Tincrement: tincrement, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *THBaseServiceClient) recvIncrement() (value *TResult_, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "increment" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "increment failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "increment failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error39 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error40 error - error40, err = error39.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error40 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "increment failed: invalid message type") - return - } - result := THBaseServiceIncrementResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - if result.Io != nil { - err = result.Io - return - } - value = result.GetSuccess() - return -} - -// Parameters: -// - Table: the table to append the value on -// - Tappend: the TAppend to append -func (p *THBaseServiceClient) Append(table []byte, tappend *TAppend) (r *TResult_, err error) { - if err = p.sendAppend(table, tappend); err != nil { - return - } - return p.recvAppend() -} - -func (p *THBaseServiceClient) sendAppend(table []byte, tappend *TAppend) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("append", thrift.CALL, p.SeqId); err != nil { - return - } - args := THBaseServiceAppendArgs{ - Table: table, - Tappend: tappend, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *THBaseServiceClient) recvAppend() (value *TResult_, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "append" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "append failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "append failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error41 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error42 error - error42, err = error41.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error42 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "append failed: invalid message type") - return - } - result := THBaseServiceAppendResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - if result.Io != nil { - err = result.Io - return - } - value = result.GetSuccess() - return -} - -// Get a Scanner for the provided TScan object. -// -// @return Scanner Id to be used with other scanner procedures -// -// Parameters: -// - Table: the table to get the Scanner for -// - Tscan: the scan object to get a Scanner for -func (p *THBaseServiceClient) OpenScanner(table []byte, tscan *TScan) (r int32, err error) { - if err = p.sendOpenScanner(table, tscan); err != nil { - return - } - return p.recvOpenScanner() -} - -func (p *THBaseServiceClient) sendOpenScanner(table []byte, tscan *TScan) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("openScanner", thrift.CALL, p.SeqId); err != nil { - return - } - args := THBaseServiceOpenScannerArgs{ - Table: table, - Tscan: tscan, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *THBaseServiceClient) recvOpenScanner() (value int32, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "openScanner" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "openScanner failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "openScanner failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error43 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error44 error - error44, err = error43.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error44 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "openScanner failed: invalid message type") - return - } - result := THBaseServiceOpenScannerResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - if result.Io != nil { - err = result.Io - return - } - value = result.GetSuccess() - return -} - -// Grabs multiple rows from a Scanner. -// -// @return Between zero and numRows TResults -// -// Parameters: -// - ScannerId: the Id of the Scanner to return rows from. This is an Id returned from the openScanner function. -// - NumRows: number of rows to return -func (p *THBaseServiceClient) GetScannerRows(scannerId int32, numRows int32) (r []*TResult_, err error) { - if err = p.sendGetScannerRows(scannerId, numRows); err != nil { - return - } - return p.recvGetScannerRows() -} - -func (p *THBaseServiceClient) sendGetScannerRows(scannerId int32, numRows int32) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("getScannerRows", thrift.CALL, p.SeqId); err != nil { - return - } - args := THBaseServiceGetScannerRowsArgs{ - ScannerId: scannerId, - NumRows: numRows, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *THBaseServiceClient) recvGetScannerRows() (value []*TResult_, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "getScannerRows" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "getScannerRows failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "getScannerRows failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error45 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error46 error - error46, err = error45.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error46 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "getScannerRows failed: invalid message type") - return - } - result := THBaseServiceGetScannerRowsResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - if result.Io != nil { - err = result.Io - return - } else if result.Ia != nil { - err = result.Ia - return - } - value = result.GetSuccess() - return -} - -// Closes the scanner. Should be called to free server side resources timely. -// Typically close once the scanner is not needed anymore, i.e. after looping -// over it to get all the required rows. -// -// Parameters: -// - ScannerId: the Id of the Scanner to close * -func (p *THBaseServiceClient) CloseScanner(scannerId int32) (err error) { - if err = p.sendCloseScanner(scannerId); err != nil { - return - } - return p.recvCloseScanner() -} - -func (p *THBaseServiceClient) sendCloseScanner(scannerId int32) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("closeScanner", thrift.CALL, p.SeqId); err != nil { - return - } - args := THBaseServiceCloseScannerArgs{ - ScannerId: scannerId, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *THBaseServiceClient) recvCloseScanner() (err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "closeScanner" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "closeScanner failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "closeScanner failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error47 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error48 error - error48, err = error47.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error48 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "closeScanner failed: invalid message type") - return - } - result := THBaseServiceCloseScannerResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - if result.Io != nil { - err = result.Io - return - } else if result.Ia != nil { - err = result.Ia - return - } - return -} - -// mutateRow performs multiple mutations atomically on a single row. -// -// Parameters: -// - Table: table to apply the mutations -// - TrowMutations: mutations to apply -func (p *THBaseServiceClient) MutateRow(table []byte, trowMutations *TRowMutations) (err error) { - if err = p.sendMutateRow(table, trowMutations); err != nil { - return - } - return p.recvMutateRow() -} - -func (p *THBaseServiceClient) sendMutateRow(table []byte, trowMutations *TRowMutations) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("mutateRow", thrift.CALL, p.SeqId); err != nil { - return - } - args := THBaseServiceMutateRowArgs{ - Table: table, - TrowMutations: trowMutations, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *THBaseServiceClient) recvMutateRow() (err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "mutateRow" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "mutateRow failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "mutateRow failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error49 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error50 error - error50, err = error49.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error50 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "mutateRow failed: invalid message type") - return - } - result := THBaseServiceMutateRowResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - if result.Io != nil { - err = result.Io - return - } - return -} - -// Get results for the provided TScan object. -// This helper function opens a scanner, get the results and close the scanner. -// -// @return between zero and numRows TResults -// -// Parameters: -// - Table: the table to get the Scanner for -// - Tscan: the scan object to get a Scanner for -// - NumRows: number of rows to return -func (p *THBaseServiceClient) GetScannerResults(table []byte, tscan *TScan, numRows int32) (r []*TResult_, err error) { - if err = p.sendGetScannerResults(table, tscan, numRows); err != nil { - return - } - return p.recvGetScannerResults() -} - -func (p *THBaseServiceClient) sendGetScannerResults(table []byte, tscan *TScan, numRows int32) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("getScannerResults", thrift.CALL, p.SeqId); err != nil { - return - } - args := THBaseServiceGetScannerResultsArgs{ - Table: table, - Tscan: tscan, - NumRows: numRows, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *THBaseServiceClient) recvGetScannerResults() (value []*TResult_, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "getScannerResults" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "getScannerResults failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "getScannerResults failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error51 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error52 error - error52, err = error51.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error52 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "getScannerResults failed: invalid message type") - return - } - result := THBaseServiceGetScannerResultsResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - if result.Io != nil { - err = result.Io - return - } - value = result.GetSuccess() - return -} - -// Given a table and a row get the location of the region that -// would contain the given row key. -// -// reload = true means the cache will be cleared and the location -// will be fetched from meta. -// -// Parameters: -// - Table -// - Row -// - Reload -func (p *THBaseServiceClient) GetRegionLocation(table []byte, row []byte, reload bool) (r *THRegionLocation, err error) { - if err = p.sendGetRegionLocation(table, row, reload); err != nil { - return - } - return p.recvGetRegionLocation() -} - -func (p *THBaseServiceClient) sendGetRegionLocation(table []byte, row []byte, reload bool) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("getRegionLocation", thrift.CALL, p.SeqId); err != nil { - return - } - args := THBaseServiceGetRegionLocationArgs{ - Table: table, - Row: row, - Reload: reload, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *THBaseServiceClient) recvGetRegionLocation() (value *THRegionLocation, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "getRegionLocation" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "getRegionLocation failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "getRegionLocation failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error53 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error54 error - error54, err = error53.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error54 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "getRegionLocation failed: invalid message type") - return - } - result := THBaseServiceGetRegionLocationResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - if result.Io != nil { - err = result.Io - return - } - value = result.GetSuccess() - return -} - -// Get all of the region locations for a given table. -// -// -// Parameters: -// - Table -func (p *THBaseServiceClient) GetAllRegionLocations(table []byte) (r []*THRegionLocation, err error) { - if err = p.sendGetAllRegionLocations(table); err != nil { - return - } - return p.recvGetAllRegionLocations() -} - -func (p *THBaseServiceClient) sendGetAllRegionLocations(table []byte) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("getAllRegionLocations", thrift.CALL, p.SeqId); err != nil { - return - } - args := THBaseServiceGetAllRegionLocationsArgs{ - Table: table, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *THBaseServiceClient) recvGetAllRegionLocations() (value []*THRegionLocation, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "getAllRegionLocations" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "getAllRegionLocations failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "getAllRegionLocations failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error55 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error56 error - error56, err = error55.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error56 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "getAllRegionLocations failed: invalid message type") - return - } - result := THBaseServiceGetAllRegionLocationsResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - if result.Io != nil { - err = result.Io - return - } - value = result.GetSuccess() - return -} - -// Atomically checks if a row/family/qualifier value matches the expected -// value. If it does, it mutates the row. -// -// @return true if the row was mutated, false otherwise -// -// Parameters: -// - Table: to check in and delete from -// - Row: row to check -// - Family: column family to check -// - Qualifier: column qualifier to check -// - CompareOp: comparison to make on the value -// - Value: the expected value to be compared against, if not provided the -// check is for the non-existence of the column in question -// - RowMutations: row mutations to execute if the value matches -func (p *THBaseServiceClient) CheckAndMutate(table []byte, row []byte, family []byte, qualifier []byte, compareOp TCompareOp, value []byte, rowMutations *TRowMutations) (r bool, err error) { - if err = p.sendCheckAndMutate(table, row, family, qualifier, compareOp, value, rowMutations); err != nil { - return - } - return p.recvCheckAndMutate() -} - -func (p *THBaseServiceClient) sendCheckAndMutate(table []byte, row []byte, family []byte, qualifier []byte, compareOp TCompareOp, value []byte, rowMutations *TRowMutations) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("checkAndMutate", thrift.CALL, p.SeqId); err != nil { - return - } - args := THBaseServiceCheckAndMutateArgs{ - Table: table, - Row: row, - Family: family, - Qualifier: qualifier, - CompareOp: compareOp, - Value: value, - RowMutations: rowMutations, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *THBaseServiceClient) recvCheckAndMutate() (value bool, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "checkAndMutate" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "checkAndMutate failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "checkAndMutate failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error57 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error58 error - error58, err = error57.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error58 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "checkAndMutate failed: invalid message type") - return - } - result := THBaseServiceCheckAndMutateResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - if result.Io != nil { - err = result.Io - return - } - value = result.GetSuccess() - return -} - -type THBaseServiceProcessor struct { - processorMap map[string]thrift.TProcessorFunction - handler THBaseService -} - -func (p *THBaseServiceProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction) { - p.processorMap[key] = processor -} - -func (p *THBaseServiceProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool) { - processor, ok = p.processorMap[key] - return processor, ok -} - -func (p *THBaseServiceProcessor) ProcessorMap() map[string]thrift.TProcessorFunction { - return p.processorMap -} - -func NewTHBaseServiceProcessor(handler THBaseService) *THBaseServiceProcessor { - - self59 := &THBaseServiceProcessor{handler: handler, processorMap: make(map[string]thrift.TProcessorFunction)} - self59.processorMap["exists"] = &tHBaseServiceProcessorExists{handler: handler} - self59.processorMap["get"] = &tHBaseServiceProcessorGet{handler: handler} - self59.processorMap["getMultiple"] = &tHBaseServiceProcessorGetMultiple{handler: handler} - self59.processorMap["put"] = &tHBaseServiceProcessorPut{handler: handler} - self59.processorMap["checkAndPut"] = &tHBaseServiceProcessorCheckAndPut{handler: handler} - self59.processorMap["putMultiple"] = &tHBaseServiceProcessorPutMultiple{handler: handler} - self59.processorMap["deleteSingle"] = &tHBaseServiceProcessorDeleteSingle{handler: handler} - self59.processorMap["deleteMultiple"] = &tHBaseServiceProcessorDeleteMultiple{handler: handler} - self59.processorMap["checkAndDelete"] = &tHBaseServiceProcessorCheckAndDelete{handler: handler} - self59.processorMap["increment"] = &tHBaseServiceProcessorIncrement{handler: handler} - self59.processorMap["append"] = &tHBaseServiceProcessorAppend{handler: handler} - self59.processorMap["openScanner"] = &tHBaseServiceProcessorOpenScanner{handler: handler} - self59.processorMap["getScannerRows"] = &tHBaseServiceProcessorGetScannerRows{handler: handler} - self59.processorMap["closeScanner"] = &tHBaseServiceProcessorCloseScanner{handler: handler} - self59.processorMap["mutateRow"] = &tHBaseServiceProcessorMutateRow{handler: handler} - self59.processorMap["getScannerResults"] = &tHBaseServiceProcessorGetScannerResults{handler: handler} - self59.processorMap["getRegionLocation"] = &tHBaseServiceProcessorGetRegionLocation{handler: handler} - self59.processorMap["getAllRegionLocations"] = &tHBaseServiceProcessorGetAllRegionLocations{handler: handler} - self59.processorMap["checkAndMutate"] = &tHBaseServiceProcessorCheckAndMutate{handler: handler} - return self59 -} - -func (p *THBaseServiceProcessor) Process(iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - name, _, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return false, err - } - if processor, ok := p.GetProcessorFunction(name); ok { - return processor.Process(seqId, iprot, oprot) - } - iprot.Skip(thrift.STRUCT) - iprot.ReadMessageEnd() - x60 := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function "+name) - oprot.WriteMessageBegin(name, thrift.EXCEPTION, seqId) - x60.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, x60 - -} - -type tHBaseServiceProcessorExists struct { - handler THBaseService -} - -func (p *tHBaseServiceProcessorExists) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := THBaseServiceExistsArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("exists", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := THBaseServiceExistsResult{} - var retval bool - var err2 error - if retval, err2 = p.handler.Exists(args.Table, args.Tget); err2 != nil { - switch v := err2.(type) { - case *TIOError: - result.Io = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing exists: "+err2.Error()) - oprot.WriteMessageBegin("exists", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } - } else { - result.Success = &retval - } - if err2 = oprot.WriteMessageBegin("exists", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type tHBaseServiceProcessorGet struct { - handler THBaseService -} - -func (p *tHBaseServiceProcessorGet) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := THBaseServiceGetArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("get", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := THBaseServiceGetResult{} - var retval *TResult_ - var err2 error - if retval, err2 = p.handler.Get(args.Table, args.Tget); err2 != nil { - switch v := err2.(type) { - case *TIOError: - result.Io = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing get: "+err2.Error()) - oprot.WriteMessageBegin("get", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("get", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type tHBaseServiceProcessorGetMultiple struct { - handler THBaseService -} - -func (p *tHBaseServiceProcessorGetMultiple) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := THBaseServiceGetMultipleArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("getMultiple", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := THBaseServiceGetMultipleResult{} - var retval []*TResult_ - var err2 error - if retval, err2 = p.handler.GetMultiple(args.Table, args.Tgets); err2 != nil { - switch v := err2.(type) { - case *TIOError: - result.Io = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getMultiple: "+err2.Error()) - oprot.WriteMessageBegin("getMultiple", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("getMultiple", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type tHBaseServiceProcessorPut struct { - handler THBaseService -} - -func (p *tHBaseServiceProcessorPut) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := THBaseServicePutArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("put", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := THBaseServicePutResult{} - var err2 error - if err2 = p.handler.Put(args.Table, args.Tput); err2 != nil { - switch v := err2.(type) { - case *TIOError: - result.Io = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing put: "+err2.Error()) - oprot.WriteMessageBegin("put", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } - } - if err2 = oprot.WriteMessageBegin("put", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type tHBaseServiceProcessorCheckAndPut struct { - handler THBaseService -} - -func (p *tHBaseServiceProcessorCheckAndPut) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := THBaseServiceCheckAndPutArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("checkAndPut", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := THBaseServiceCheckAndPutResult{} - var retval bool - var err2 error - if retval, err2 = p.handler.CheckAndPut(args.Table, args.Row, args.Family, args.Qualifier, args.Value, args.Tput); err2 != nil { - switch v := err2.(type) { - case *TIOError: - result.Io = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing checkAndPut: "+err2.Error()) - oprot.WriteMessageBegin("checkAndPut", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } - } else { - result.Success = &retval - } - if err2 = oprot.WriteMessageBegin("checkAndPut", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type tHBaseServiceProcessorPutMultiple struct { - handler THBaseService -} - -func (p *tHBaseServiceProcessorPutMultiple) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := THBaseServicePutMultipleArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("putMultiple", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := THBaseServicePutMultipleResult{} - var err2 error - if err2 = p.handler.PutMultiple(args.Table, args.Tputs); err2 != nil { - switch v := err2.(type) { - case *TIOError: - result.Io = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing putMultiple: "+err2.Error()) - oprot.WriteMessageBegin("putMultiple", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } - } - if err2 = oprot.WriteMessageBegin("putMultiple", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type tHBaseServiceProcessorDeleteSingle struct { - handler THBaseService -} - -func (p *tHBaseServiceProcessorDeleteSingle) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := THBaseServiceDeleteSingleArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("deleteSingle", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := THBaseServiceDeleteSingleResult{} - var err2 error - if err2 = p.handler.DeleteSingle(args.Table, args.Tdelete); err2 != nil { - switch v := err2.(type) { - case *TIOError: - result.Io = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteSingle: "+err2.Error()) - oprot.WriteMessageBegin("deleteSingle", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } - } - if err2 = oprot.WriteMessageBegin("deleteSingle", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type tHBaseServiceProcessorDeleteMultiple struct { - handler THBaseService -} - -func (p *tHBaseServiceProcessorDeleteMultiple) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := THBaseServiceDeleteMultipleArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("deleteMultiple", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := THBaseServiceDeleteMultipleResult{} - var retval []*TDelete - var err2 error - if retval, err2 = p.handler.DeleteMultiple(args.Table, args.Tdeletes); err2 != nil { - switch v := err2.(type) { - case *TIOError: - result.Io = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing deleteMultiple: "+err2.Error()) - oprot.WriteMessageBegin("deleteMultiple", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("deleteMultiple", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type tHBaseServiceProcessorCheckAndDelete struct { - handler THBaseService -} - -func (p *tHBaseServiceProcessorCheckAndDelete) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := THBaseServiceCheckAndDeleteArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("checkAndDelete", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := THBaseServiceCheckAndDeleteResult{} - var retval bool - var err2 error - if retval, err2 = p.handler.CheckAndDelete(args.Table, args.Row, args.Family, args.Qualifier, args.Value, args.Tdelete); err2 != nil { - switch v := err2.(type) { - case *TIOError: - result.Io = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing checkAndDelete: "+err2.Error()) - oprot.WriteMessageBegin("checkAndDelete", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } - } else { - result.Success = &retval - } - if err2 = oprot.WriteMessageBegin("checkAndDelete", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type tHBaseServiceProcessorIncrement struct { - handler THBaseService -} - -func (p *tHBaseServiceProcessorIncrement) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := THBaseServiceIncrementArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("increment", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := THBaseServiceIncrementResult{} - var retval *TResult_ - var err2 error - if retval, err2 = p.handler.Increment(args.Table, args.Tincrement); err2 != nil { - switch v := err2.(type) { - case *TIOError: - result.Io = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing increment: "+err2.Error()) - oprot.WriteMessageBegin("increment", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("increment", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type tHBaseServiceProcessorAppend struct { - handler THBaseService -} - -func (p *tHBaseServiceProcessorAppend) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := THBaseServiceAppendArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("append", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := THBaseServiceAppendResult{} - var retval *TResult_ - var err2 error - if retval, err2 = p.handler.Append(args.Table, args.Tappend); err2 != nil { - switch v := err2.(type) { - case *TIOError: - result.Io = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing append: "+err2.Error()) - oprot.WriteMessageBegin("append", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("append", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type tHBaseServiceProcessorOpenScanner struct { - handler THBaseService -} - -func (p *tHBaseServiceProcessorOpenScanner) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := THBaseServiceOpenScannerArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("openScanner", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := THBaseServiceOpenScannerResult{} - var retval int32 - var err2 error - if retval, err2 = p.handler.OpenScanner(args.Table, args.Tscan); err2 != nil { - switch v := err2.(type) { - case *TIOError: - result.Io = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing openScanner: "+err2.Error()) - oprot.WriteMessageBegin("openScanner", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } - } else { - result.Success = &retval - } - if err2 = oprot.WriteMessageBegin("openScanner", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type tHBaseServiceProcessorGetScannerRows struct { - handler THBaseService -} - -func (p *tHBaseServiceProcessorGetScannerRows) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := THBaseServiceGetScannerRowsArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("getScannerRows", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := THBaseServiceGetScannerRowsResult{} - var retval []*TResult_ - var err2 error - if retval, err2 = p.handler.GetScannerRows(args.ScannerId, args.NumRows); err2 != nil { - switch v := err2.(type) { - case *TIOError: - result.Io = v - case *TIllegalArgument: - result.Ia = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getScannerRows: "+err2.Error()) - oprot.WriteMessageBegin("getScannerRows", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("getScannerRows", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type tHBaseServiceProcessorCloseScanner struct { - handler THBaseService -} - -func (p *tHBaseServiceProcessorCloseScanner) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := THBaseServiceCloseScannerArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("closeScanner", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := THBaseServiceCloseScannerResult{} - var err2 error - if err2 = p.handler.CloseScanner(args.ScannerId); err2 != nil { - switch v := err2.(type) { - case *TIOError: - result.Io = v - case *TIllegalArgument: - result.Ia = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing closeScanner: "+err2.Error()) - oprot.WriteMessageBegin("closeScanner", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } - } - if err2 = oprot.WriteMessageBegin("closeScanner", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type tHBaseServiceProcessorMutateRow struct { - handler THBaseService -} - -func (p *tHBaseServiceProcessorMutateRow) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := THBaseServiceMutateRowArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("mutateRow", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := THBaseServiceMutateRowResult{} - var err2 error - if err2 = p.handler.MutateRow(args.Table, args.TrowMutations); err2 != nil { - switch v := err2.(type) { - case *TIOError: - result.Io = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing mutateRow: "+err2.Error()) - oprot.WriteMessageBegin("mutateRow", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } - } - if err2 = oprot.WriteMessageBegin("mutateRow", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type tHBaseServiceProcessorGetScannerResults struct { - handler THBaseService -} - -func (p *tHBaseServiceProcessorGetScannerResults) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := THBaseServiceGetScannerResultsArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("getScannerResults", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := THBaseServiceGetScannerResultsResult{} - var retval []*TResult_ - var err2 error - if retval, err2 = p.handler.GetScannerResults(args.Table, args.Tscan, args.NumRows); err2 != nil { - switch v := err2.(type) { - case *TIOError: - result.Io = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getScannerResults: "+err2.Error()) - oprot.WriteMessageBegin("getScannerResults", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("getScannerResults", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type tHBaseServiceProcessorGetRegionLocation struct { - handler THBaseService -} - -func (p *tHBaseServiceProcessorGetRegionLocation) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := THBaseServiceGetRegionLocationArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("getRegionLocation", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := THBaseServiceGetRegionLocationResult{} - var retval *THRegionLocation - var err2 error - if retval, err2 = p.handler.GetRegionLocation(args.Table, args.Row, args.Reload); err2 != nil { - switch v := err2.(type) { - case *TIOError: - result.Io = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getRegionLocation: "+err2.Error()) - oprot.WriteMessageBegin("getRegionLocation", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("getRegionLocation", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type tHBaseServiceProcessorGetAllRegionLocations struct { - handler THBaseService -} - -func (p *tHBaseServiceProcessorGetAllRegionLocations) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := THBaseServiceGetAllRegionLocationsArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("getAllRegionLocations", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := THBaseServiceGetAllRegionLocationsResult{} - var retval []*THRegionLocation - var err2 error - if retval, err2 = p.handler.GetAllRegionLocations(args.Table); err2 != nil { - switch v := err2.(type) { - case *TIOError: - result.Io = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing getAllRegionLocations: "+err2.Error()) - oprot.WriteMessageBegin("getAllRegionLocations", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("getAllRegionLocations", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type tHBaseServiceProcessorCheckAndMutate struct { - handler THBaseService -} - -func (p *tHBaseServiceProcessorCheckAndMutate) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := THBaseServiceCheckAndMutateArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("checkAndMutate", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := THBaseServiceCheckAndMutateResult{} - var retval bool - var err2 error - if retval, err2 = p.handler.CheckAndMutate(args.Table, args.Row, args.Family, args.Qualifier, args.CompareOp, args.Value, args.RowMutations); err2 != nil { - switch v := err2.(type) { - case *TIOError: - result.Io = v - default: - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing checkAndMutate: "+err2.Error()) - oprot.WriteMessageBegin("checkAndMutate", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } - } else { - result.Success = &retval - } - if err2 = oprot.WriteMessageBegin("checkAndMutate", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -// HELPER FUNCTIONS AND STRUCTURES - -// Attributes: -// - Table: the table to check on -// - Tget: the TGet to check for -type THBaseServiceExistsArgs struct { - Table []byte `thrift:"table,1,required" json:"table"` - Tget *TGet `thrift:"tget,2,required" json:"tget"` -} - -func NewTHBaseServiceExistsArgs() *THBaseServiceExistsArgs { - return &THBaseServiceExistsArgs{} -} - -func (p *THBaseServiceExistsArgs) GetTable() []byte { - return p.Table -} - -var THBaseServiceExistsArgs_Tget_DEFAULT *TGet - -func (p *THBaseServiceExistsArgs) GetTget() *TGet { - if !p.IsSetTget() { - return THBaseServiceExistsArgs_Tget_DEFAULT - } - return p.Tget -} -func (p *THBaseServiceExistsArgs) IsSetTget() bool { - return p.Tget != nil -} - -func (p *THBaseServiceExistsArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetTable bool = false - var issetTget bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetTable = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetTget = true - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetTable { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")) - } - if !issetTget { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tget is not set")) - } - return nil -} - -func (p *THBaseServiceExistsArgs) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Table = v - } - return nil -} - -func (p *THBaseServiceExistsArgs) readField2(iprot thrift.TProtocol) error { - p.Tget = &TGet{} - if err := p.Tget.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tget), err) - } - return nil -} - -func (p *THBaseServiceExistsArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("exists_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceExistsArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("table", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) - } - if err := oprot.WriteBinary(p.Table); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) - } - return err -} - -func (p *THBaseServiceExistsArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tget", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tget: ", p), err) - } - if err := p.Tget.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tget), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tget: ", p), err) - } - return err -} - -func (p *THBaseServiceExistsArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceExistsArgs(%+v)", *p) -} - -// Attributes: -// - Success -// - Io -type THBaseServiceExistsResult struct { - Success *bool `thrift:"success,0" json:"success,omitempty"` - Io *TIOError `thrift:"io,1" json:"io,omitempty"` -} - -func NewTHBaseServiceExistsResult() *THBaseServiceExistsResult { - return &THBaseServiceExistsResult{} -} - -var THBaseServiceExistsResult_Success_DEFAULT bool - -func (p *THBaseServiceExistsResult) GetSuccess() bool { - if !p.IsSetSuccess() { - return THBaseServiceExistsResult_Success_DEFAULT - } - return *p.Success -} - -var THBaseServiceExistsResult_Io_DEFAULT *TIOError - -func (p *THBaseServiceExistsResult) GetIo() *TIOError { - if !p.IsSetIo() { - return THBaseServiceExistsResult_Io_DEFAULT - } - return p.Io -} -func (p *THBaseServiceExistsResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *THBaseServiceExistsResult) IsSetIo() bool { - return p.Io != nil -} - -func (p *THBaseServiceExistsResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *THBaseServiceExistsResult) readField0(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - p.Success = &v - } - return nil -} - -func (p *THBaseServiceExistsResult) readField1(iprot thrift.TProtocol) error { - p.Io = &TIOError{} - if err := p.Io.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) - } - return nil -} - -func (p *THBaseServiceExistsResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("exists_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceExistsResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.BOOL, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := oprot.WriteBool(bool(*p.Success)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *THBaseServiceExistsResult) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetIo() { - if err := oprot.WriteFieldBegin("io", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) - } - if err := p.Io.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) - } - } - return err -} - -func (p *THBaseServiceExistsResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceExistsResult(%+v)", *p) -} - -// Attributes: -// - Table: the table to get from -// - Tget: the TGet to fetch -type THBaseServiceGetArgs struct { - Table []byte `thrift:"table,1,required" json:"table"` - Tget *TGet `thrift:"tget,2,required" json:"tget"` -} - -func NewTHBaseServiceGetArgs() *THBaseServiceGetArgs { - return &THBaseServiceGetArgs{} -} - -func (p *THBaseServiceGetArgs) GetTable() []byte { - return p.Table -} - -var THBaseServiceGetArgs_Tget_DEFAULT *TGet - -func (p *THBaseServiceGetArgs) GetTget() *TGet { - if !p.IsSetTget() { - return THBaseServiceGetArgs_Tget_DEFAULT - } - return p.Tget -} -func (p *THBaseServiceGetArgs) IsSetTget() bool { - return p.Tget != nil -} - -func (p *THBaseServiceGetArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetTable bool = false - var issetTget bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetTable = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetTget = true - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetTable { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")) - } - if !issetTget { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tget is not set")) - } - return nil -} - -func (p *THBaseServiceGetArgs) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Table = v - } - return nil -} - -func (p *THBaseServiceGetArgs) readField2(iprot thrift.TProtocol) error { - p.Tget = &TGet{} - if err := p.Tget.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tget), err) - } - return nil -} - -func (p *THBaseServiceGetArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("get_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceGetArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("table", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) - } - if err := oprot.WriteBinary(p.Table); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) - } - return err -} - -func (p *THBaseServiceGetArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tget", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tget: ", p), err) - } - if err := p.Tget.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tget), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tget: ", p), err) - } - return err -} - -func (p *THBaseServiceGetArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceGetArgs(%+v)", *p) -} - -// Attributes: -// - Success -// - Io -type THBaseServiceGetResult struct { - Success *TResult_ `thrift:"success,0" json:"success,omitempty"` - Io *TIOError `thrift:"io,1" json:"io,omitempty"` -} - -func NewTHBaseServiceGetResult() *THBaseServiceGetResult { - return &THBaseServiceGetResult{} -} - -var THBaseServiceGetResult_Success_DEFAULT *TResult_ - -func (p *THBaseServiceGetResult) GetSuccess() *TResult_ { - if !p.IsSetSuccess() { - return THBaseServiceGetResult_Success_DEFAULT - } - return p.Success -} - -var THBaseServiceGetResult_Io_DEFAULT *TIOError - -func (p *THBaseServiceGetResult) GetIo() *TIOError { - if !p.IsSetIo() { - return THBaseServiceGetResult_Io_DEFAULT - } - return p.Io -} -func (p *THBaseServiceGetResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *THBaseServiceGetResult) IsSetIo() bool { - return p.Io != nil -} - -func (p *THBaseServiceGetResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *THBaseServiceGetResult) readField0(iprot thrift.TProtocol) error { - p.Success = &TResult_{} - if err := p.Success.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) - } - return nil -} - -func (p *THBaseServiceGetResult) readField1(iprot thrift.TProtocol) error { - p.Io = &TIOError{} - if err := p.Io.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) - } - return nil -} - -func (p *THBaseServiceGetResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("get_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceGetResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := p.Success.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *THBaseServiceGetResult) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetIo() { - if err := oprot.WriteFieldBegin("io", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) - } - if err := p.Io.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) - } - } - return err -} - -func (p *THBaseServiceGetResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceGetResult(%+v)", *p) -} - -// Attributes: -// - Table: the table to get from -// - Tgets: a list of TGets to fetch, the Result list -// will have the Results at corresponding positions -// or null if there was an error -type THBaseServiceGetMultipleArgs struct { - Table []byte `thrift:"table,1,required" json:"table"` - Tgets []*TGet `thrift:"tgets,2,required" json:"tgets"` -} - -func NewTHBaseServiceGetMultipleArgs() *THBaseServiceGetMultipleArgs { - return &THBaseServiceGetMultipleArgs{} -} - -func (p *THBaseServiceGetMultipleArgs) GetTable() []byte { - return p.Table -} - -func (p *THBaseServiceGetMultipleArgs) GetTgets() []*TGet { - return p.Tgets -} -func (p *THBaseServiceGetMultipleArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetTable bool = false - var issetTgets bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetTable = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetTgets = true - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetTable { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")) - } - if !issetTgets { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tgets is not set")) - } - return nil -} - -func (p *THBaseServiceGetMultipleArgs) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Table = v - } - return nil -} - -func (p *THBaseServiceGetMultipleArgs) readField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TGet, 0, size) - p.Tgets = tSlice - for i := 0; i < size; i++ { - _elem61 := &TGet{} - if err := _elem61.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem61), err) - } - p.Tgets = append(p.Tgets, _elem61) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *THBaseServiceGetMultipleArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getMultiple_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceGetMultipleArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("table", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) - } - if err := oprot.WriteBinary(p.Table); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) - } - return err -} - -func (p *THBaseServiceGetMultipleArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tgets", thrift.LIST, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tgets: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Tgets)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Tgets { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tgets: ", p), err) - } - return err -} - -func (p *THBaseServiceGetMultipleArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceGetMultipleArgs(%+v)", *p) -} - -// Attributes: -// - Success -// - Io -type THBaseServiceGetMultipleResult struct { - Success []*TResult_ `thrift:"success,0" json:"success,omitempty"` - Io *TIOError `thrift:"io,1" json:"io,omitempty"` -} - -func NewTHBaseServiceGetMultipleResult() *THBaseServiceGetMultipleResult { - return &THBaseServiceGetMultipleResult{} -} - -var THBaseServiceGetMultipleResult_Success_DEFAULT []*TResult_ - -func (p *THBaseServiceGetMultipleResult) GetSuccess() []*TResult_ { - return p.Success -} - -var THBaseServiceGetMultipleResult_Io_DEFAULT *TIOError - -func (p *THBaseServiceGetMultipleResult) GetIo() *TIOError { - if !p.IsSetIo() { - return THBaseServiceGetMultipleResult_Io_DEFAULT - } - return p.Io -} -func (p *THBaseServiceGetMultipleResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *THBaseServiceGetMultipleResult) IsSetIo() bool { - return p.Io != nil -} - -func (p *THBaseServiceGetMultipleResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *THBaseServiceGetMultipleResult) readField0(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TResult_, 0, size) - p.Success = tSlice - for i := 0; i < size; i++ { - _elem62 := &TResult_{} - if err := _elem62.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem62), err) - } - p.Success = append(p.Success, _elem62) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *THBaseServiceGetMultipleResult) readField1(iprot thrift.TProtocol) error { - p.Io = &TIOError{} - if err := p.Io.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) - } - return nil -} - -func (p *THBaseServiceGetMultipleResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getMultiple_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceGetMultipleResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.LIST, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Success)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Success { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *THBaseServiceGetMultipleResult) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetIo() { - if err := oprot.WriteFieldBegin("io", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) - } - if err := p.Io.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) - } - } - return err -} - -func (p *THBaseServiceGetMultipleResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceGetMultipleResult(%+v)", *p) -} - -// Attributes: -// - Table: the table to put data in -// - Tput: the TPut to put -type THBaseServicePutArgs struct { - Table []byte `thrift:"table,1,required" json:"table"` - Tput *TPut `thrift:"tput,2,required" json:"tput"` -} - -func NewTHBaseServicePutArgs() *THBaseServicePutArgs { - return &THBaseServicePutArgs{} -} - -func (p *THBaseServicePutArgs) GetTable() []byte { - return p.Table -} - -var THBaseServicePutArgs_Tput_DEFAULT *TPut - -func (p *THBaseServicePutArgs) GetTput() *TPut { - if !p.IsSetTput() { - return THBaseServicePutArgs_Tput_DEFAULT - } - return p.Tput -} -func (p *THBaseServicePutArgs) IsSetTput() bool { - return p.Tput != nil -} - -func (p *THBaseServicePutArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetTable bool = false - var issetTput bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetTable = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetTput = true - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetTable { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")) - } - if !issetTput { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tput is not set")) - } - return nil -} - -func (p *THBaseServicePutArgs) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Table = v - } - return nil -} - -func (p *THBaseServicePutArgs) readField2(iprot thrift.TProtocol) error { - p.Tput = &TPut{} - if err := p.Tput.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tput), err) - } - return nil -} - -func (p *THBaseServicePutArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("put_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServicePutArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("table", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) - } - if err := oprot.WriteBinary(p.Table); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) - } - return err -} - -func (p *THBaseServicePutArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tput", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tput: ", p), err) - } - if err := p.Tput.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tput), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tput: ", p), err) - } - return err -} - -func (p *THBaseServicePutArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServicePutArgs(%+v)", *p) -} - -// Attributes: -// - Io -type THBaseServicePutResult struct { - Io *TIOError `thrift:"io,1" json:"io,omitempty"` -} - -func NewTHBaseServicePutResult() *THBaseServicePutResult { - return &THBaseServicePutResult{} -} - -var THBaseServicePutResult_Io_DEFAULT *TIOError - -func (p *THBaseServicePutResult) GetIo() *TIOError { - if !p.IsSetIo() { - return THBaseServicePutResult_Io_DEFAULT - } - return p.Io -} -func (p *THBaseServicePutResult) IsSetIo() bool { - return p.Io != nil -} - -func (p *THBaseServicePutResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *THBaseServicePutResult) readField1(iprot thrift.TProtocol) error { - p.Io = &TIOError{} - if err := p.Io.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) - } - return nil -} - -func (p *THBaseServicePutResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("put_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServicePutResult) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetIo() { - if err := oprot.WriteFieldBegin("io", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) - } - if err := p.Io.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) - } - } - return err -} - -func (p *THBaseServicePutResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServicePutResult(%+v)", *p) -} - -// Attributes: -// - Table: to check in and put to -// - Row: row to check -// - Family: column family to check -// - Qualifier: column qualifier to check -// - Value: the expected value, if not provided the -// check is for the non-existence of the -// column in question -// - Tput: the TPut to put if the check succeeds -type THBaseServiceCheckAndPutArgs struct { - Table []byte `thrift:"table,1,required" json:"table"` - Row []byte `thrift:"row,2,required" json:"row"` - Family []byte `thrift:"family,3,required" json:"family"` - Qualifier []byte `thrift:"qualifier,4,required" json:"qualifier"` - Value []byte `thrift:"value,5" json:"value"` - Tput *TPut `thrift:"tput,6,required" json:"tput"` -} - -func NewTHBaseServiceCheckAndPutArgs() *THBaseServiceCheckAndPutArgs { - return &THBaseServiceCheckAndPutArgs{} -} - -func (p *THBaseServiceCheckAndPutArgs) GetTable() []byte { - return p.Table -} - -func (p *THBaseServiceCheckAndPutArgs) GetRow() []byte { - return p.Row -} - -func (p *THBaseServiceCheckAndPutArgs) GetFamily() []byte { - return p.Family -} - -func (p *THBaseServiceCheckAndPutArgs) GetQualifier() []byte { - return p.Qualifier -} - -func (p *THBaseServiceCheckAndPutArgs) GetValue() []byte { - return p.Value -} - -var THBaseServiceCheckAndPutArgs_Tput_DEFAULT *TPut - -func (p *THBaseServiceCheckAndPutArgs) GetTput() *TPut { - if !p.IsSetTput() { - return THBaseServiceCheckAndPutArgs_Tput_DEFAULT - } - return p.Tput -} -func (p *THBaseServiceCheckAndPutArgs) IsSetTput() bool { - return p.Tput != nil -} - -func (p *THBaseServiceCheckAndPutArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetTable bool = false - var issetRow bool = false - var issetFamily bool = false - var issetQualifier bool = false - var issetTput bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetTable = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetRow = true - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - issetFamily = true - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - issetQualifier = true - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - issetTput = true - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetTable { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")) - } - if !issetRow { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Row is not set")) - } - if !issetFamily { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Family is not set")) - } - if !issetQualifier { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Qualifier is not set")) - } - if !issetTput { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tput is not set")) - } - return nil -} - -func (p *THBaseServiceCheckAndPutArgs) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Table = v - } - return nil -} - -func (p *THBaseServiceCheckAndPutArgs) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Row = v - } - return nil -} - -func (p *THBaseServiceCheckAndPutArgs) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.Family = v - } - return nil -} - -func (p *THBaseServiceCheckAndPutArgs) readField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 4: ", err) - } else { - p.Qualifier = v - } - return nil -} - -func (p *THBaseServiceCheckAndPutArgs) readField5(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 5: ", err) - } else { - p.Value = v - } - return nil -} - -func (p *THBaseServiceCheckAndPutArgs) readField6(iprot thrift.TProtocol) error { - p.Tput = &TPut{} - if err := p.Tput.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tput), err) - } - return nil -} - -func (p *THBaseServiceCheckAndPutArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("checkAndPut_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceCheckAndPutArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("table", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) - } - if err := oprot.WriteBinary(p.Table); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) - } - return err -} - -func (p *THBaseServiceCheckAndPutArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("row", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:row: ", p), err) - } - if err := oprot.WriteBinary(p.Row); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.row (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:row: ", p), err) - } - return err -} - -func (p *THBaseServiceCheckAndPutArgs) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("family", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:family: ", p), err) - } - if err := oprot.WriteBinary(p.Family); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.family (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:family: ", p), err) - } - return err -} - -func (p *THBaseServiceCheckAndPutArgs) writeField4(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("qualifier", thrift.STRING, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:qualifier: ", p), err) - } - if err := oprot.WriteBinary(p.Qualifier); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.qualifier (4) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:qualifier: ", p), err) - } - return err -} - -func (p *THBaseServiceCheckAndPutArgs) writeField5(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("value", thrift.STRING, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:value: ", p), err) - } - if err := oprot.WriteBinary(p.Value); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.value (5) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:value: ", p), err) - } - return err -} - -func (p *THBaseServiceCheckAndPutArgs) writeField6(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tput", thrift.STRUCT, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:tput: ", p), err) - } - if err := p.Tput.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tput), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:tput: ", p), err) - } - return err -} - -func (p *THBaseServiceCheckAndPutArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceCheckAndPutArgs(%+v)", *p) -} - -// Attributes: -// - Success -// - Io -type THBaseServiceCheckAndPutResult struct { - Success *bool `thrift:"success,0" json:"success,omitempty"` - Io *TIOError `thrift:"io,1" json:"io,omitempty"` -} - -func NewTHBaseServiceCheckAndPutResult() *THBaseServiceCheckAndPutResult { - return &THBaseServiceCheckAndPutResult{} -} - -var THBaseServiceCheckAndPutResult_Success_DEFAULT bool - -func (p *THBaseServiceCheckAndPutResult) GetSuccess() bool { - if !p.IsSetSuccess() { - return THBaseServiceCheckAndPutResult_Success_DEFAULT - } - return *p.Success -} - -var THBaseServiceCheckAndPutResult_Io_DEFAULT *TIOError - -func (p *THBaseServiceCheckAndPutResult) GetIo() *TIOError { - if !p.IsSetIo() { - return THBaseServiceCheckAndPutResult_Io_DEFAULT - } - return p.Io -} -func (p *THBaseServiceCheckAndPutResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *THBaseServiceCheckAndPutResult) IsSetIo() bool { - return p.Io != nil -} - -func (p *THBaseServiceCheckAndPutResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *THBaseServiceCheckAndPutResult) readField0(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - p.Success = &v - } - return nil -} - -func (p *THBaseServiceCheckAndPutResult) readField1(iprot thrift.TProtocol) error { - p.Io = &TIOError{} - if err := p.Io.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) - } - return nil -} - -func (p *THBaseServiceCheckAndPutResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("checkAndPut_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceCheckAndPutResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.BOOL, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := oprot.WriteBool(bool(*p.Success)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *THBaseServiceCheckAndPutResult) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetIo() { - if err := oprot.WriteFieldBegin("io", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) - } - if err := p.Io.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) - } - } - return err -} - -func (p *THBaseServiceCheckAndPutResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceCheckAndPutResult(%+v)", *p) -} - -// Attributes: -// - Table: the table to put data in -// - Tputs: a list of TPuts to commit -type THBaseServicePutMultipleArgs struct { - Table []byte `thrift:"table,1,required" json:"table"` - Tputs []*TPut `thrift:"tputs,2,required" json:"tputs"` -} - -func NewTHBaseServicePutMultipleArgs() *THBaseServicePutMultipleArgs { - return &THBaseServicePutMultipleArgs{} -} - -func (p *THBaseServicePutMultipleArgs) GetTable() []byte { - return p.Table -} - -func (p *THBaseServicePutMultipleArgs) GetTputs() []*TPut { - return p.Tputs -} -func (p *THBaseServicePutMultipleArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetTable bool = false - var issetTputs bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetTable = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetTputs = true - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetTable { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")) - } - if !issetTputs { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tputs is not set")) - } - return nil -} - -func (p *THBaseServicePutMultipleArgs) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Table = v - } - return nil -} - -func (p *THBaseServicePutMultipleArgs) readField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TPut, 0, size) - p.Tputs = tSlice - for i := 0; i < size; i++ { - _elem63 := &TPut{} - if err := _elem63.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem63), err) - } - p.Tputs = append(p.Tputs, _elem63) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *THBaseServicePutMultipleArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("putMultiple_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServicePutMultipleArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("table", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) - } - if err := oprot.WriteBinary(p.Table); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) - } - return err -} - -func (p *THBaseServicePutMultipleArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tputs", thrift.LIST, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tputs: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Tputs)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Tputs { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tputs: ", p), err) - } - return err -} - -func (p *THBaseServicePutMultipleArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServicePutMultipleArgs(%+v)", *p) -} - -// Attributes: -// - Io -type THBaseServicePutMultipleResult struct { - Io *TIOError `thrift:"io,1" json:"io,omitempty"` -} - -func NewTHBaseServicePutMultipleResult() *THBaseServicePutMultipleResult { - return &THBaseServicePutMultipleResult{} -} - -var THBaseServicePutMultipleResult_Io_DEFAULT *TIOError - -func (p *THBaseServicePutMultipleResult) GetIo() *TIOError { - if !p.IsSetIo() { - return THBaseServicePutMultipleResult_Io_DEFAULT - } - return p.Io -} -func (p *THBaseServicePutMultipleResult) IsSetIo() bool { - return p.Io != nil -} - -func (p *THBaseServicePutMultipleResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *THBaseServicePutMultipleResult) readField1(iprot thrift.TProtocol) error { - p.Io = &TIOError{} - if err := p.Io.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) - } - return nil -} - -func (p *THBaseServicePutMultipleResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("putMultiple_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServicePutMultipleResult) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetIo() { - if err := oprot.WriteFieldBegin("io", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) - } - if err := p.Io.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) - } - } - return err -} - -func (p *THBaseServicePutMultipleResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServicePutMultipleResult(%+v)", *p) -} - -// Attributes: -// - Table: the table to delete from -// - Tdelete: the TDelete to delete -type THBaseServiceDeleteSingleArgs struct { - Table []byte `thrift:"table,1,required" json:"table"` - Tdelete *TDelete `thrift:"tdelete,2,required" json:"tdelete"` -} - -func NewTHBaseServiceDeleteSingleArgs() *THBaseServiceDeleteSingleArgs { - return &THBaseServiceDeleteSingleArgs{} -} - -func (p *THBaseServiceDeleteSingleArgs) GetTable() []byte { - return p.Table -} - -var THBaseServiceDeleteSingleArgs_Tdelete_DEFAULT *TDelete - -func (p *THBaseServiceDeleteSingleArgs) GetTdelete() *TDelete { - if !p.IsSetTdelete() { - return THBaseServiceDeleteSingleArgs_Tdelete_DEFAULT - } - return p.Tdelete -} -func (p *THBaseServiceDeleteSingleArgs) IsSetTdelete() bool { - return p.Tdelete != nil -} - -func (p *THBaseServiceDeleteSingleArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetTable bool = false - var issetTdelete bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetTable = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetTdelete = true - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetTable { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")) - } - if !issetTdelete { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tdelete is not set")) - } - return nil -} - -func (p *THBaseServiceDeleteSingleArgs) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Table = v - } - return nil -} - -func (p *THBaseServiceDeleteSingleArgs) readField2(iprot thrift.TProtocol) error { - p.Tdelete = &TDelete{ - DeleteType: 1, - } - if err := p.Tdelete.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tdelete), err) - } - return nil -} - -func (p *THBaseServiceDeleteSingleArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("deleteSingle_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceDeleteSingleArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("table", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) - } - if err := oprot.WriteBinary(p.Table); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) - } - return err -} - -func (p *THBaseServiceDeleteSingleArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tdelete", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tdelete: ", p), err) - } - if err := p.Tdelete.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tdelete), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tdelete: ", p), err) - } - return err -} - -func (p *THBaseServiceDeleteSingleArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceDeleteSingleArgs(%+v)", *p) -} - -// Attributes: -// - Io -type THBaseServiceDeleteSingleResult struct { - Io *TIOError `thrift:"io,1" json:"io,omitempty"` -} - -func NewTHBaseServiceDeleteSingleResult() *THBaseServiceDeleteSingleResult { - return &THBaseServiceDeleteSingleResult{} -} - -var THBaseServiceDeleteSingleResult_Io_DEFAULT *TIOError - -func (p *THBaseServiceDeleteSingleResult) GetIo() *TIOError { - if !p.IsSetIo() { - return THBaseServiceDeleteSingleResult_Io_DEFAULT - } - return p.Io -} -func (p *THBaseServiceDeleteSingleResult) IsSetIo() bool { - return p.Io != nil -} - -func (p *THBaseServiceDeleteSingleResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *THBaseServiceDeleteSingleResult) readField1(iprot thrift.TProtocol) error { - p.Io = &TIOError{} - if err := p.Io.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) - } - return nil -} - -func (p *THBaseServiceDeleteSingleResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("deleteSingle_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceDeleteSingleResult) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetIo() { - if err := oprot.WriteFieldBegin("io", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) - } - if err := p.Io.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) - } - } - return err -} - -func (p *THBaseServiceDeleteSingleResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceDeleteSingleResult(%+v)", *p) -} - -// Attributes: -// - Table: the table to delete from -// - Tdeletes: list of TDeletes to delete -type THBaseServiceDeleteMultipleArgs struct { - Table []byte `thrift:"table,1,required" json:"table"` - Tdeletes []*TDelete `thrift:"tdeletes,2,required" json:"tdeletes"` -} - -func NewTHBaseServiceDeleteMultipleArgs() *THBaseServiceDeleteMultipleArgs { - return &THBaseServiceDeleteMultipleArgs{} -} - -func (p *THBaseServiceDeleteMultipleArgs) GetTable() []byte { - return p.Table -} - -func (p *THBaseServiceDeleteMultipleArgs) GetTdeletes() []*TDelete { - return p.Tdeletes -} -func (p *THBaseServiceDeleteMultipleArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetTable bool = false - var issetTdeletes bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetTable = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetTdeletes = true - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetTable { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")) - } - if !issetTdeletes { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tdeletes is not set")) - } - return nil -} - -func (p *THBaseServiceDeleteMultipleArgs) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Table = v - } - return nil -} - -func (p *THBaseServiceDeleteMultipleArgs) readField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TDelete, 0, size) - p.Tdeletes = tSlice - for i := 0; i < size; i++ { - _elem64 := &TDelete{ - DeleteType: 1, - } - if err := _elem64.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem64), err) - } - p.Tdeletes = append(p.Tdeletes, _elem64) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *THBaseServiceDeleteMultipleArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("deleteMultiple_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceDeleteMultipleArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("table", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) - } - if err := oprot.WriteBinary(p.Table); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) - } - return err -} - -func (p *THBaseServiceDeleteMultipleArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tdeletes", thrift.LIST, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tdeletes: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Tdeletes)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Tdeletes { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tdeletes: ", p), err) - } - return err -} - -func (p *THBaseServiceDeleteMultipleArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceDeleteMultipleArgs(%+v)", *p) -} - -// Attributes: -// - Success -// - Io -type THBaseServiceDeleteMultipleResult struct { - Success []*TDelete `thrift:"success,0" json:"success,omitempty"` - Io *TIOError `thrift:"io,1" json:"io,omitempty"` -} - -func NewTHBaseServiceDeleteMultipleResult() *THBaseServiceDeleteMultipleResult { - return &THBaseServiceDeleteMultipleResult{} -} - -var THBaseServiceDeleteMultipleResult_Success_DEFAULT []*TDelete - -func (p *THBaseServiceDeleteMultipleResult) GetSuccess() []*TDelete { - return p.Success -} - -var THBaseServiceDeleteMultipleResult_Io_DEFAULT *TIOError - -func (p *THBaseServiceDeleteMultipleResult) GetIo() *TIOError { - if !p.IsSetIo() { - return THBaseServiceDeleteMultipleResult_Io_DEFAULT - } - return p.Io -} -func (p *THBaseServiceDeleteMultipleResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *THBaseServiceDeleteMultipleResult) IsSetIo() bool { - return p.Io != nil -} - -func (p *THBaseServiceDeleteMultipleResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *THBaseServiceDeleteMultipleResult) readField0(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TDelete, 0, size) - p.Success = tSlice - for i := 0; i < size; i++ { - _elem65 := &TDelete{ - DeleteType: 1, - } - if err := _elem65.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem65), err) - } - p.Success = append(p.Success, _elem65) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *THBaseServiceDeleteMultipleResult) readField1(iprot thrift.TProtocol) error { - p.Io = &TIOError{} - if err := p.Io.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) - } - return nil -} - -func (p *THBaseServiceDeleteMultipleResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("deleteMultiple_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceDeleteMultipleResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.LIST, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Success)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Success { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *THBaseServiceDeleteMultipleResult) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetIo() { - if err := oprot.WriteFieldBegin("io", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) - } - if err := p.Io.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) - } - } - return err -} - -func (p *THBaseServiceDeleteMultipleResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceDeleteMultipleResult(%+v)", *p) -} - -// Attributes: -// - Table: to check in and delete from -// - Row: row to check -// - Family: column family to check -// - Qualifier: column qualifier to check -// - Value: the expected value, if not provided the -// check is for the non-existence of the -// column in question -// - Tdelete: the TDelete to execute if the check succeeds -type THBaseServiceCheckAndDeleteArgs struct { - Table []byte `thrift:"table,1,required" json:"table"` - Row []byte `thrift:"row,2,required" json:"row"` - Family []byte `thrift:"family,3,required" json:"family"` - Qualifier []byte `thrift:"qualifier,4,required" json:"qualifier"` - Value []byte `thrift:"value,5" json:"value"` - Tdelete *TDelete `thrift:"tdelete,6,required" json:"tdelete"` -} - -func NewTHBaseServiceCheckAndDeleteArgs() *THBaseServiceCheckAndDeleteArgs { - return &THBaseServiceCheckAndDeleteArgs{} -} - -func (p *THBaseServiceCheckAndDeleteArgs) GetTable() []byte { - return p.Table -} - -func (p *THBaseServiceCheckAndDeleteArgs) GetRow() []byte { - return p.Row -} - -func (p *THBaseServiceCheckAndDeleteArgs) GetFamily() []byte { - return p.Family -} - -func (p *THBaseServiceCheckAndDeleteArgs) GetQualifier() []byte { - return p.Qualifier -} - -func (p *THBaseServiceCheckAndDeleteArgs) GetValue() []byte { - return p.Value -} - -var THBaseServiceCheckAndDeleteArgs_Tdelete_DEFAULT *TDelete - -func (p *THBaseServiceCheckAndDeleteArgs) GetTdelete() *TDelete { - if !p.IsSetTdelete() { - return THBaseServiceCheckAndDeleteArgs_Tdelete_DEFAULT - } - return p.Tdelete -} -func (p *THBaseServiceCheckAndDeleteArgs) IsSetTdelete() bool { - return p.Tdelete != nil -} - -func (p *THBaseServiceCheckAndDeleteArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetTable bool = false - var issetRow bool = false - var issetFamily bool = false - var issetQualifier bool = false - var issetTdelete bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetTable = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetRow = true - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - issetFamily = true - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - issetQualifier = true - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - issetTdelete = true - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetTable { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")) - } - if !issetRow { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Row is not set")) - } - if !issetFamily { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Family is not set")) - } - if !issetQualifier { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Qualifier is not set")) - } - if !issetTdelete { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tdelete is not set")) - } - return nil -} - -func (p *THBaseServiceCheckAndDeleteArgs) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Table = v - } - return nil -} - -func (p *THBaseServiceCheckAndDeleteArgs) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Row = v - } - return nil -} - -func (p *THBaseServiceCheckAndDeleteArgs) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.Family = v - } - return nil -} - -func (p *THBaseServiceCheckAndDeleteArgs) readField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 4: ", err) - } else { - p.Qualifier = v - } - return nil -} - -func (p *THBaseServiceCheckAndDeleteArgs) readField5(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 5: ", err) - } else { - p.Value = v - } - return nil -} - -func (p *THBaseServiceCheckAndDeleteArgs) readField6(iprot thrift.TProtocol) error { - p.Tdelete = &TDelete{ - DeleteType: 1, - } - if err := p.Tdelete.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tdelete), err) - } - return nil -} - -func (p *THBaseServiceCheckAndDeleteArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("checkAndDelete_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceCheckAndDeleteArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("table", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) - } - if err := oprot.WriteBinary(p.Table); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) - } - return err -} - -func (p *THBaseServiceCheckAndDeleteArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("row", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:row: ", p), err) - } - if err := oprot.WriteBinary(p.Row); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.row (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:row: ", p), err) - } - return err -} - -func (p *THBaseServiceCheckAndDeleteArgs) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("family", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:family: ", p), err) - } - if err := oprot.WriteBinary(p.Family); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.family (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:family: ", p), err) - } - return err -} - -func (p *THBaseServiceCheckAndDeleteArgs) writeField4(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("qualifier", thrift.STRING, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:qualifier: ", p), err) - } - if err := oprot.WriteBinary(p.Qualifier); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.qualifier (4) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:qualifier: ", p), err) - } - return err -} - -func (p *THBaseServiceCheckAndDeleteArgs) writeField5(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("value", thrift.STRING, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:value: ", p), err) - } - if err := oprot.WriteBinary(p.Value); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.value (5) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:value: ", p), err) - } - return err -} - -func (p *THBaseServiceCheckAndDeleteArgs) writeField6(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tdelete", thrift.STRUCT, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:tdelete: ", p), err) - } - if err := p.Tdelete.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tdelete), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:tdelete: ", p), err) - } - return err -} - -func (p *THBaseServiceCheckAndDeleteArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceCheckAndDeleteArgs(%+v)", *p) -} - -// Attributes: -// - Success -// - Io -type THBaseServiceCheckAndDeleteResult struct { - Success *bool `thrift:"success,0" json:"success,omitempty"` - Io *TIOError `thrift:"io,1" json:"io,omitempty"` -} - -func NewTHBaseServiceCheckAndDeleteResult() *THBaseServiceCheckAndDeleteResult { - return &THBaseServiceCheckAndDeleteResult{} -} - -var THBaseServiceCheckAndDeleteResult_Success_DEFAULT bool - -func (p *THBaseServiceCheckAndDeleteResult) GetSuccess() bool { - if !p.IsSetSuccess() { - return THBaseServiceCheckAndDeleteResult_Success_DEFAULT - } - return *p.Success -} - -var THBaseServiceCheckAndDeleteResult_Io_DEFAULT *TIOError - -func (p *THBaseServiceCheckAndDeleteResult) GetIo() *TIOError { - if !p.IsSetIo() { - return THBaseServiceCheckAndDeleteResult_Io_DEFAULT - } - return p.Io -} -func (p *THBaseServiceCheckAndDeleteResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *THBaseServiceCheckAndDeleteResult) IsSetIo() bool { - return p.Io != nil -} - -func (p *THBaseServiceCheckAndDeleteResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *THBaseServiceCheckAndDeleteResult) readField0(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - p.Success = &v - } - return nil -} - -func (p *THBaseServiceCheckAndDeleteResult) readField1(iprot thrift.TProtocol) error { - p.Io = &TIOError{} - if err := p.Io.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) - } - return nil -} - -func (p *THBaseServiceCheckAndDeleteResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("checkAndDelete_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceCheckAndDeleteResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.BOOL, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := oprot.WriteBool(bool(*p.Success)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *THBaseServiceCheckAndDeleteResult) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetIo() { - if err := oprot.WriteFieldBegin("io", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) - } - if err := p.Io.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) - } - } - return err -} - -func (p *THBaseServiceCheckAndDeleteResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceCheckAndDeleteResult(%+v)", *p) -} - -// Attributes: -// - Table: the table to increment the value on -// - Tincrement: the TIncrement to increment -type THBaseServiceIncrementArgs struct { - Table []byte `thrift:"table,1,required" json:"table"` - Tincrement *TIncrement `thrift:"tincrement,2,required" json:"tincrement"` -} - -func NewTHBaseServiceIncrementArgs() *THBaseServiceIncrementArgs { - return &THBaseServiceIncrementArgs{} -} - -func (p *THBaseServiceIncrementArgs) GetTable() []byte { - return p.Table -} - -var THBaseServiceIncrementArgs_Tincrement_DEFAULT *TIncrement - -func (p *THBaseServiceIncrementArgs) GetTincrement() *TIncrement { - if !p.IsSetTincrement() { - return THBaseServiceIncrementArgs_Tincrement_DEFAULT - } - return p.Tincrement -} -func (p *THBaseServiceIncrementArgs) IsSetTincrement() bool { - return p.Tincrement != nil -} - -func (p *THBaseServiceIncrementArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetTable bool = false - var issetTincrement bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetTable = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetTincrement = true - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetTable { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")) - } - if !issetTincrement { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tincrement is not set")) - } - return nil -} - -func (p *THBaseServiceIncrementArgs) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Table = v - } - return nil -} - -func (p *THBaseServiceIncrementArgs) readField2(iprot thrift.TProtocol) error { - p.Tincrement = &TIncrement{} - if err := p.Tincrement.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tincrement), err) - } - return nil -} - -func (p *THBaseServiceIncrementArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("increment_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceIncrementArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("table", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) - } - if err := oprot.WriteBinary(p.Table); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) - } - return err -} - -func (p *THBaseServiceIncrementArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tincrement", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tincrement: ", p), err) - } - if err := p.Tincrement.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tincrement), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tincrement: ", p), err) - } - return err -} - -func (p *THBaseServiceIncrementArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceIncrementArgs(%+v)", *p) -} - -// Attributes: -// - Success -// - Io -type THBaseServiceIncrementResult struct { - Success *TResult_ `thrift:"success,0" json:"success,omitempty"` - Io *TIOError `thrift:"io,1" json:"io,omitempty"` -} - -func NewTHBaseServiceIncrementResult() *THBaseServiceIncrementResult { - return &THBaseServiceIncrementResult{} -} - -var THBaseServiceIncrementResult_Success_DEFAULT *TResult_ - -func (p *THBaseServiceIncrementResult) GetSuccess() *TResult_ { - if !p.IsSetSuccess() { - return THBaseServiceIncrementResult_Success_DEFAULT - } - return p.Success -} - -var THBaseServiceIncrementResult_Io_DEFAULT *TIOError - -func (p *THBaseServiceIncrementResult) GetIo() *TIOError { - if !p.IsSetIo() { - return THBaseServiceIncrementResult_Io_DEFAULT - } - return p.Io -} -func (p *THBaseServiceIncrementResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *THBaseServiceIncrementResult) IsSetIo() bool { - return p.Io != nil -} - -func (p *THBaseServiceIncrementResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *THBaseServiceIncrementResult) readField0(iprot thrift.TProtocol) error { - p.Success = &TResult_{} - if err := p.Success.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) - } - return nil -} - -func (p *THBaseServiceIncrementResult) readField1(iprot thrift.TProtocol) error { - p.Io = &TIOError{} - if err := p.Io.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) - } - return nil -} - -func (p *THBaseServiceIncrementResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("increment_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceIncrementResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := p.Success.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *THBaseServiceIncrementResult) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetIo() { - if err := oprot.WriteFieldBegin("io", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) - } - if err := p.Io.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) - } - } - return err -} - -func (p *THBaseServiceIncrementResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceIncrementResult(%+v)", *p) -} - -// Attributes: -// - Table: the table to append the value on -// - Tappend: the TAppend to append -type THBaseServiceAppendArgs struct { - Table []byte `thrift:"table,1,required" json:"table"` - Tappend *TAppend `thrift:"tappend,2,required" json:"tappend"` -} - -func NewTHBaseServiceAppendArgs() *THBaseServiceAppendArgs { - return &THBaseServiceAppendArgs{} -} - -func (p *THBaseServiceAppendArgs) GetTable() []byte { - return p.Table -} - -var THBaseServiceAppendArgs_Tappend_DEFAULT *TAppend - -func (p *THBaseServiceAppendArgs) GetTappend() *TAppend { - if !p.IsSetTappend() { - return THBaseServiceAppendArgs_Tappend_DEFAULT - } - return p.Tappend -} -func (p *THBaseServiceAppendArgs) IsSetTappend() bool { - return p.Tappend != nil -} - -func (p *THBaseServiceAppendArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetTable bool = false - var issetTappend bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetTable = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetTappend = true - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetTable { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")) - } - if !issetTappend { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tappend is not set")) - } - return nil -} - -func (p *THBaseServiceAppendArgs) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Table = v - } - return nil -} - -func (p *THBaseServiceAppendArgs) readField2(iprot thrift.TProtocol) error { - p.Tappend = &TAppend{} - if err := p.Tappend.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tappend), err) - } - return nil -} - -func (p *THBaseServiceAppendArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("append_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceAppendArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("table", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) - } - if err := oprot.WriteBinary(p.Table); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) - } - return err -} - -func (p *THBaseServiceAppendArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tappend", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tappend: ", p), err) - } - if err := p.Tappend.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tappend), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tappend: ", p), err) - } - return err -} - -func (p *THBaseServiceAppendArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceAppendArgs(%+v)", *p) -} - -// Attributes: -// - Success -// - Io -type THBaseServiceAppendResult struct { - Success *TResult_ `thrift:"success,0" json:"success,omitempty"` - Io *TIOError `thrift:"io,1" json:"io,omitempty"` -} - -func NewTHBaseServiceAppendResult() *THBaseServiceAppendResult { - return &THBaseServiceAppendResult{} -} - -var THBaseServiceAppendResult_Success_DEFAULT *TResult_ - -func (p *THBaseServiceAppendResult) GetSuccess() *TResult_ { - if !p.IsSetSuccess() { - return THBaseServiceAppendResult_Success_DEFAULT - } - return p.Success -} - -var THBaseServiceAppendResult_Io_DEFAULT *TIOError - -func (p *THBaseServiceAppendResult) GetIo() *TIOError { - if !p.IsSetIo() { - return THBaseServiceAppendResult_Io_DEFAULT - } - return p.Io -} -func (p *THBaseServiceAppendResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *THBaseServiceAppendResult) IsSetIo() bool { - return p.Io != nil -} - -func (p *THBaseServiceAppendResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *THBaseServiceAppendResult) readField0(iprot thrift.TProtocol) error { - p.Success = &TResult_{} - if err := p.Success.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) - } - return nil -} - -func (p *THBaseServiceAppendResult) readField1(iprot thrift.TProtocol) error { - p.Io = &TIOError{} - if err := p.Io.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) - } - return nil -} - -func (p *THBaseServiceAppendResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("append_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceAppendResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := p.Success.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *THBaseServiceAppendResult) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetIo() { - if err := oprot.WriteFieldBegin("io", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) - } - if err := p.Io.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) - } - } - return err -} - -func (p *THBaseServiceAppendResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceAppendResult(%+v)", *p) -} - -// Attributes: -// - Table: the table to get the Scanner for -// - Tscan: the scan object to get a Scanner for -type THBaseServiceOpenScannerArgs struct { - Table []byte `thrift:"table,1,required" json:"table"` - Tscan *TScan `thrift:"tscan,2,required" json:"tscan"` -} - -func NewTHBaseServiceOpenScannerArgs() *THBaseServiceOpenScannerArgs { - return &THBaseServiceOpenScannerArgs{} -} - -func (p *THBaseServiceOpenScannerArgs) GetTable() []byte { - return p.Table -} - -var THBaseServiceOpenScannerArgs_Tscan_DEFAULT *TScan - -func (p *THBaseServiceOpenScannerArgs) GetTscan() *TScan { - if !p.IsSetTscan() { - return THBaseServiceOpenScannerArgs_Tscan_DEFAULT - } - return p.Tscan -} -func (p *THBaseServiceOpenScannerArgs) IsSetTscan() bool { - return p.Tscan != nil -} - -func (p *THBaseServiceOpenScannerArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetTable bool = false - var issetTscan bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetTable = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetTscan = true - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetTable { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")) - } - if !issetTscan { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tscan is not set")) - } - return nil -} - -func (p *THBaseServiceOpenScannerArgs) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Table = v - } - return nil -} - -func (p *THBaseServiceOpenScannerArgs) readField2(iprot thrift.TProtocol) error { - p.Tscan = &TScan{ - MaxVersions: 1, - } - if err := p.Tscan.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tscan), err) - } - return nil -} - -func (p *THBaseServiceOpenScannerArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("openScanner_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceOpenScannerArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("table", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) - } - if err := oprot.WriteBinary(p.Table); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) - } - return err -} - -func (p *THBaseServiceOpenScannerArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tscan", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tscan: ", p), err) - } - if err := p.Tscan.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tscan), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tscan: ", p), err) - } - return err -} - -func (p *THBaseServiceOpenScannerArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceOpenScannerArgs(%+v)", *p) -} - -// Attributes: -// - Success -// - Io -type THBaseServiceOpenScannerResult struct { - Success *int32 `thrift:"success,0" json:"success,omitempty"` - Io *TIOError `thrift:"io,1" json:"io,omitempty"` -} - -func NewTHBaseServiceOpenScannerResult() *THBaseServiceOpenScannerResult { - return &THBaseServiceOpenScannerResult{} -} - -var THBaseServiceOpenScannerResult_Success_DEFAULT int32 - -func (p *THBaseServiceOpenScannerResult) GetSuccess() int32 { - if !p.IsSetSuccess() { - return THBaseServiceOpenScannerResult_Success_DEFAULT - } - return *p.Success -} - -var THBaseServiceOpenScannerResult_Io_DEFAULT *TIOError - -func (p *THBaseServiceOpenScannerResult) GetIo() *TIOError { - if !p.IsSetIo() { - return THBaseServiceOpenScannerResult_Io_DEFAULT - } - return p.Io -} -func (p *THBaseServiceOpenScannerResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *THBaseServiceOpenScannerResult) IsSetIo() bool { - return p.Io != nil -} - -func (p *THBaseServiceOpenScannerResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *THBaseServiceOpenScannerResult) readField0(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - p.Success = &v - } - return nil -} - -func (p *THBaseServiceOpenScannerResult) readField1(iprot thrift.TProtocol) error { - p.Io = &TIOError{} - if err := p.Io.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) - } - return nil -} - -func (p *THBaseServiceOpenScannerResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("openScanner_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceOpenScannerResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.I32, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := oprot.WriteI32(int32(*p.Success)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *THBaseServiceOpenScannerResult) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetIo() { - if err := oprot.WriteFieldBegin("io", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) - } - if err := p.Io.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) - } - } - return err -} - -func (p *THBaseServiceOpenScannerResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceOpenScannerResult(%+v)", *p) -} - -// Attributes: -// - ScannerId: the Id of the Scanner to return rows from. This is an Id returned from the openScanner function. -// - NumRows: number of rows to return -type THBaseServiceGetScannerRowsArgs struct { - ScannerId int32 `thrift:"scannerId,1,required" json:"scannerId"` - NumRows int32 `thrift:"numRows,2" json:"numRows"` -} - -func NewTHBaseServiceGetScannerRowsArgs() *THBaseServiceGetScannerRowsArgs { - return &THBaseServiceGetScannerRowsArgs{ - NumRows: 1, - } -} - -func (p *THBaseServiceGetScannerRowsArgs) GetScannerId() int32 { - return p.ScannerId -} - -func (p *THBaseServiceGetScannerRowsArgs) GetNumRows() int32 { - return p.NumRows -} -func (p *THBaseServiceGetScannerRowsArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetScannerId bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetScannerId = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetScannerId { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ScannerId is not set")) - } - return nil -} - -func (p *THBaseServiceGetScannerRowsArgs) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.ScannerId = v - } - return nil -} - -func (p *THBaseServiceGetScannerRowsArgs) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.NumRows = v - } - return nil -} - -func (p *THBaseServiceGetScannerRowsArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getScannerRows_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceGetScannerRowsArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("scannerId", thrift.I32, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:scannerId: ", p), err) - } - if err := oprot.WriteI32(int32(p.ScannerId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.scannerId (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:scannerId: ", p), err) - } - return err -} - -func (p *THBaseServiceGetScannerRowsArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("numRows", thrift.I32, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:numRows: ", p), err) - } - if err := oprot.WriteI32(int32(p.NumRows)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.numRows (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:numRows: ", p), err) - } - return err -} - -func (p *THBaseServiceGetScannerRowsArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceGetScannerRowsArgs(%+v)", *p) -} - -// Attributes: -// - Success -// - Io -// - Ia: if the scannerId is invalid -type THBaseServiceGetScannerRowsResult struct { - Success []*TResult_ `thrift:"success,0" json:"success,omitempty"` - Io *TIOError `thrift:"io,1" json:"io,omitempty"` - Ia *TIllegalArgument `thrift:"ia,2" json:"ia,omitempty"` -} - -func NewTHBaseServiceGetScannerRowsResult() *THBaseServiceGetScannerRowsResult { - return &THBaseServiceGetScannerRowsResult{} -} - -var THBaseServiceGetScannerRowsResult_Success_DEFAULT []*TResult_ - -func (p *THBaseServiceGetScannerRowsResult) GetSuccess() []*TResult_ { - return p.Success -} - -var THBaseServiceGetScannerRowsResult_Io_DEFAULT *TIOError - -func (p *THBaseServiceGetScannerRowsResult) GetIo() *TIOError { - if !p.IsSetIo() { - return THBaseServiceGetScannerRowsResult_Io_DEFAULT - } - return p.Io -} - -var THBaseServiceGetScannerRowsResult_Ia_DEFAULT *TIllegalArgument - -func (p *THBaseServiceGetScannerRowsResult) GetIa() *TIllegalArgument { - if !p.IsSetIa() { - return THBaseServiceGetScannerRowsResult_Ia_DEFAULT - } - return p.Ia -} -func (p *THBaseServiceGetScannerRowsResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *THBaseServiceGetScannerRowsResult) IsSetIo() bool { - return p.Io != nil -} - -func (p *THBaseServiceGetScannerRowsResult) IsSetIa() bool { - return p.Ia != nil -} - -func (p *THBaseServiceGetScannerRowsResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *THBaseServiceGetScannerRowsResult) readField0(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TResult_, 0, size) - p.Success = tSlice - for i := 0; i < size; i++ { - _elem66 := &TResult_{} - if err := _elem66.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem66), err) - } - p.Success = append(p.Success, _elem66) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *THBaseServiceGetScannerRowsResult) readField1(iprot thrift.TProtocol) error { - p.Io = &TIOError{} - if err := p.Io.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) - } - return nil -} - -func (p *THBaseServiceGetScannerRowsResult) readField2(iprot thrift.TProtocol) error { - p.Ia = &TIllegalArgument{} - if err := p.Ia.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Ia), err) - } - return nil -} - -func (p *THBaseServiceGetScannerRowsResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getScannerRows_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceGetScannerRowsResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.LIST, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Success)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Success { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *THBaseServiceGetScannerRowsResult) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetIo() { - if err := oprot.WriteFieldBegin("io", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) - } - if err := p.Io.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) - } - } - return err -} - -func (p *THBaseServiceGetScannerRowsResult) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetIa() { - if err := oprot.WriteFieldBegin("ia", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:ia: ", p), err) - } - if err := p.Ia.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Ia), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:ia: ", p), err) - } - } - return err -} - -func (p *THBaseServiceGetScannerRowsResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceGetScannerRowsResult(%+v)", *p) -} - -// Attributes: -// - ScannerId: the Id of the Scanner to close * -type THBaseServiceCloseScannerArgs struct { - ScannerId int32 `thrift:"scannerId,1,required" json:"scannerId"` -} - -func NewTHBaseServiceCloseScannerArgs() *THBaseServiceCloseScannerArgs { - return &THBaseServiceCloseScannerArgs{} -} - -func (p *THBaseServiceCloseScannerArgs) GetScannerId() int32 { - return p.ScannerId -} -func (p *THBaseServiceCloseScannerArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetScannerId bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetScannerId = true - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetScannerId { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ScannerId is not set")) - } - return nil -} - -func (p *THBaseServiceCloseScannerArgs) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.ScannerId = v - } - return nil -} - -func (p *THBaseServiceCloseScannerArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("closeScanner_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceCloseScannerArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("scannerId", thrift.I32, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:scannerId: ", p), err) - } - if err := oprot.WriteI32(int32(p.ScannerId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.scannerId (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:scannerId: ", p), err) - } - return err -} - -func (p *THBaseServiceCloseScannerArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceCloseScannerArgs(%+v)", *p) -} - -// Attributes: -// - Io -// - Ia: if the scannerId is invalid -type THBaseServiceCloseScannerResult struct { - Io *TIOError `thrift:"io,1" json:"io,omitempty"` - Ia *TIllegalArgument `thrift:"ia,2" json:"ia,omitempty"` -} - -func NewTHBaseServiceCloseScannerResult() *THBaseServiceCloseScannerResult { - return &THBaseServiceCloseScannerResult{} -} - -var THBaseServiceCloseScannerResult_Io_DEFAULT *TIOError - -func (p *THBaseServiceCloseScannerResult) GetIo() *TIOError { - if !p.IsSetIo() { - return THBaseServiceCloseScannerResult_Io_DEFAULT - } - return p.Io -} - -var THBaseServiceCloseScannerResult_Ia_DEFAULT *TIllegalArgument - -func (p *THBaseServiceCloseScannerResult) GetIa() *TIllegalArgument { - if !p.IsSetIa() { - return THBaseServiceCloseScannerResult_Ia_DEFAULT - } - return p.Ia -} -func (p *THBaseServiceCloseScannerResult) IsSetIo() bool { - return p.Io != nil -} - -func (p *THBaseServiceCloseScannerResult) IsSetIa() bool { - return p.Ia != nil -} - -func (p *THBaseServiceCloseScannerResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *THBaseServiceCloseScannerResult) readField1(iprot thrift.TProtocol) error { - p.Io = &TIOError{} - if err := p.Io.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) - } - return nil -} - -func (p *THBaseServiceCloseScannerResult) readField2(iprot thrift.TProtocol) error { - p.Ia = &TIllegalArgument{} - if err := p.Ia.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Ia), err) - } - return nil -} - -func (p *THBaseServiceCloseScannerResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("closeScanner_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceCloseScannerResult) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetIo() { - if err := oprot.WriteFieldBegin("io", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) - } - if err := p.Io.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) - } - } - return err -} - -func (p *THBaseServiceCloseScannerResult) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetIa() { - if err := oprot.WriteFieldBegin("ia", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:ia: ", p), err) - } - if err := p.Ia.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Ia), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:ia: ", p), err) - } - } - return err -} - -func (p *THBaseServiceCloseScannerResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceCloseScannerResult(%+v)", *p) -} - -// Attributes: -// - Table: table to apply the mutations -// - TrowMutations: mutations to apply -type THBaseServiceMutateRowArgs struct { - Table []byte `thrift:"table,1,required" json:"table"` - TrowMutations *TRowMutations `thrift:"trowMutations,2,required" json:"trowMutations"` -} - -func NewTHBaseServiceMutateRowArgs() *THBaseServiceMutateRowArgs { - return &THBaseServiceMutateRowArgs{} -} - -func (p *THBaseServiceMutateRowArgs) GetTable() []byte { - return p.Table -} - -var THBaseServiceMutateRowArgs_TrowMutations_DEFAULT *TRowMutations - -func (p *THBaseServiceMutateRowArgs) GetTrowMutations() *TRowMutations { - if !p.IsSetTrowMutations() { - return THBaseServiceMutateRowArgs_TrowMutations_DEFAULT - } - return p.TrowMutations -} -func (p *THBaseServiceMutateRowArgs) IsSetTrowMutations() bool { - return p.TrowMutations != nil -} - -func (p *THBaseServiceMutateRowArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetTable bool = false - var issetTrowMutations bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetTable = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetTrowMutations = true - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetTable { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")) - } - if !issetTrowMutations { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TrowMutations is not set")) - } - return nil -} - -func (p *THBaseServiceMutateRowArgs) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Table = v - } - return nil -} - -func (p *THBaseServiceMutateRowArgs) readField2(iprot thrift.TProtocol) error { - p.TrowMutations = &TRowMutations{} - if err := p.TrowMutations.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TrowMutations), err) - } - return nil -} - -func (p *THBaseServiceMutateRowArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("mutateRow_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceMutateRowArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("table", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) - } - if err := oprot.WriteBinary(p.Table); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) - } - return err -} - -func (p *THBaseServiceMutateRowArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("trowMutations", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:trowMutations: ", p), err) - } - if err := p.TrowMutations.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TrowMutations), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:trowMutations: ", p), err) - } - return err -} - -func (p *THBaseServiceMutateRowArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceMutateRowArgs(%+v)", *p) -} - -// Attributes: -// - Io -type THBaseServiceMutateRowResult struct { - Io *TIOError `thrift:"io,1" json:"io,omitempty"` -} - -func NewTHBaseServiceMutateRowResult() *THBaseServiceMutateRowResult { - return &THBaseServiceMutateRowResult{} -} - -var THBaseServiceMutateRowResult_Io_DEFAULT *TIOError - -func (p *THBaseServiceMutateRowResult) GetIo() *TIOError { - if !p.IsSetIo() { - return THBaseServiceMutateRowResult_Io_DEFAULT - } - return p.Io -} -func (p *THBaseServiceMutateRowResult) IsSetIo() bool { - return p.Io != nil -} - -func (p *THBaseServiceMutateRowResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *THBaseServiceMutateRowResult) readField1(iprot thrift.TProtocol) error { - p.Io = &TIOError{} - if err := p.Io.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) - } - return nil -} - -func (p *THBaseServiceMutateRowResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("mutateRow_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceMutateRowResult) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetIo() { - if err := oprot.WriteFieldBegin("io", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) - } - if err := p.Io.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) - } - } - return err -} - -func (p *THBaseServiceMutateRowResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceMutateRowResult(%+v)", *p) -} - -// Attributes: -// - Table: the table to get the Scanner for -// - Tscan: the scan object to get a Scanner for -// - NumRows: number of rows to return -type THBaseServiceGetScannerResultsArgs struct { - Table []byte `thrift:"table,1,required" json:"table"` - Tscan *TScan `thrift:"tscan,2,required" json:"tscan"` - NumRows int32 `thrift:"numRows,3" json:"numRows"` -} - -func NewTHBaseServiceGetScannerResultsArgs() *THBaseServiceGetScannerResultsArgs { - return &THBaseServiceGetScannerResultsArgs{ - NumRows: 1, - } -} - -func (p *THBaseServiceGetScannerResultsArgs) GetTable() []byte { - return p.Table -} - -var THBaseServiceGetScannerResultsArgs_Tscan_DEFAULT *TScan - -func (p *THBaseServiceGetScannerResultsArgs) GetTscan() *TScan { - if !p.IsSetTscan() { - return THBaseServiceGetScannerResultsArgs_Tscan_DEFAULT - } - return p.Tscan -} - -func (p *THBaseServiceGetScannerResultsArgs) GetNumRows() int32 { - return p.NumRows -} -func (p *THBaseServiceGetScannerResultsArgs) IsSetTscan() bool { - return p.Tscan != nil -} - -func (p *THBaseServiceGetScannerResultsArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetTable bool = false - var issetTscan bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetTable = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetTscan = true - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetTable { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")) - } - if !issetTscan { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tscan is not set")) - } - return nil -} - -func (p *THBaseServiceGetScannerResultsArgs) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Table = v - } - return nil -} - -func (p *THBaseServiceGetScannerResultsArgs) readField2(iprot thrift.TProtocol) error { - p.Tscan = &TScan{ - MaxVersions: 1, - } - if err := p.Tscan.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tscan), err) - } - return nil -} - -func (p *THBaseServiceGetScannerResultsArgs) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.NumRows = v - } - return nil -} - -func (p *THBaseServiceGetScannerResultsArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getScannerResults_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceGetScannerResultsArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("table", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) - } - if err := oprot.WriteBinary(p.Table); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) - } - return err -} - -func (p *THBaseServiceGetScannerResultsArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tscan", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tscan: ", p), err) - } - if err := p.Tscan.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tscan), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tscan: ", p), err) - } - return err -} - -func (p *THBaseServiceGetScannerResultsArgs) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("numRows", thrift.I32, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:numRows: ", p), err) - } - if err := oprot.WriteI32(int32(p.NumRows)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.numRows (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:numRows: ", p), err) - } - return err -} - -func (p *THBaseServiceGetScannerResultsArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceGetScannerResultsArgs(%+v)", *p) -} - -// Attributes: -// - Success -// - Io -type THBaseServiceGetScannerResultsResult struct { - Success []*TResult_ `thrift:"success,0" json:"success,omitempty"` - Io *TIOError `thrift:"io,1" json:"io,omitempty"` -} - -func NewTHBaseServiceGetScannerResultsResult() *THBaseServiceGetScannerResultsResult { - return &THBaseServiceGetScannerResultsResult{} -} - -var THBaseServiceGetScannerResultsResult_Success_DEFAULT []*TResult_ - -func (p *THBaseServiceGetScannerResultsResult) GetSuccess() []*TResult_ { - return p.Success -} - -var THBaseServiceGetScannerResultsResult_Io_DEFAULT *TIOError - -func (p *THBaseServiceGetScannerResultsResult) GetIo() *TIOError { - if !p.IsSetIo() { - return THBaseServiceGetScannerResultsResult_Io_DEFAULT - } - return p.Io -} -func (p *THBaseServiceGetScannerResultsResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *THBaseServiceGetScannerResultsResult) IsSetIo() bool { - return p.Io != nil -} - -func (p *THBaseServiceGetScannerResultsResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *THBaseServiceGetScannerResultsResult) readField0(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TResult_, 0, size) - p.Success = tSlice - for i := 0; i < size; i++ { - _elem67 := &TResult_{} - if err := _elem67.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem67), err) - } - p.Success = append(p.Success, _elem67) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *THBaseServiceGetScannerResultsResult) readField1(iprot thrift.TProtocol) error { - p.Io = &TIOError{} - if err := p.Io.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) - } - return nil -} - -func (p *THBaseServiceGetScannerResultsResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getScannerResults_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceGetScannerResultsResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.LIST, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Success)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Success { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *THBaseServiceGetScannerResultsResult) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetIo() { - if err := oprot.WriteFieldBegin("io", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) - } - if err := p.Io.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) - } - } - return err -} - -func (p *THBaseServiceGetScannerResultsResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceGetScannerResultsResult(%+v)", *p) -} - -// Attributes: -// - Table -// - Row -// - Reload -type THBaseServiceGetRegionLocationArgs struct { - Table []byte `thrift:"table,1,required" json:"table"` - Row []byte `thrift:"row,2,required" json:"row"` - Reload bool `thrift:"reload,3" json:"reload"` -} - -func NewTHBaseServiceGetRegionLocationArgs() *THBaseServiceGetRegionLocationArgs { - return &THBaseServiceGetRegionLocationArgs{} -} - -func (p *THBaseServiceGetRegionLocationArgs) GetTable() []byte { - return p.Table -} - -func (p *THBaseServiceGetRegionLocationArgs) GetRow() []byte { - return p.Row -} - -func (p *THBaseServiceGetRegionLocationArgs) GetReload() bool { - return p.Reload -} -func (p *THBaseServiceGetRegionLocationArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetTable bool = false - var issetRow bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetTable = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetRow = true - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetTable { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")) - } - if !issetRow { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Row is not set")) - } - return nil -} - -func (p *THBaseServiceGetRegionLocationArgs) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Table = v - } - return nil -} - -func (p *THBaseServiceGetRegionLocationArgs) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Row = v - } - return nil -} - -func (p *THBaseServiceGetRegionLocationArgs) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.Reload = v - } - return nil -} - -func (p *THBaseServiceGetRegionLocationArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getRegionLocation_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceGetRegionLocationArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("table", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) - } - if err := oprot.WriteBinary(p.Table); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) - } - return err -} - -func (p *THBaseServiceGetRegionLocationArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("row", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:row: ", p), err) - } - if err := oprot.WriteBinary(p.Row); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.row (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:row: ", p), err) - } - return err -} - -func (p *THBaseServiceGetRegionLocationArgs) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("reload", thrift.BOOL, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:reload: ", p), err) - } - if err := oprot.WriteBool(bool(p.Reload)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.reload (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:reload: ", p), err) - } - return err -} - -func (p *THBaseServiceGetRegionLocationArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceGetRegionLocationArgs(%+v)", *p) -} - -// Attributes: -// - Success -// - Io -type THBaseServiceGetRegionLocationResult struct { - Success *THRegionLocation `thrift:"success,0" json:"success,omitempty"` - Io *TIOError `thrift:"io,1" json:"io,omitempty"` -} - -func NewTHBaseServiceGetRegionLocationResult() *THBaseServiceGetRegionLocationResult { - return &THBaseServiceGetRegionLocationResult{} -} - -var THBaseServiceGetRegionLocationResult_Success_DEFAULT *THRegionLocation - -func (p *THBaseServiceGetRegionLocationResult) GetSuccess() *THRegionLocation { - if !p.IsSetSuccess() { - return THBaseServiceGetRegionLocationResult_Success_DEFAULT - } - return p.Success -} - -var THBaseServiceGetRegionLocationResult_Io_DEFAULT *TIOError - -func (p *THBaseServiceGetRegionLocationResult) GetIo() *TIOError { - if !p.IsSetIo() { - return THBaseServiceGetRegionLocationResult_Io_DEFAULT - } - return p.Io -} -func (p *THBaseServiceGetRegionLocationResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *THBaseServiceGetRegionLocationResult) IsSetIo() bool { - return p.Io != nil -} - -func (p *THBaseServiceGetRegionLocationResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *THBaseServiceGetRegionLocationResult) readField0(iprot thrift.TProtocol) error { - p.Success = &THRegionLocation{} - if err := p.Success.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) - } - return nil -} - -func (p *THBaseServiceGetRegionLocationResult) readField1(iprot thrift.TProtocol) error { - p.Io = &TIOError{} - if err := p.Io.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) - } - return nil -} - -func (p *THBaseServiceGetRegionLocationResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getRegionLocation_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceGetRegionLocationResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := p.Success.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *THBaseServiceGetRegionLocationResult) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetIo() { - if err := oprot.WriteFieldBegin("io", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) - } - if err := p.Io.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) - } - } - return err -} - -func (p *THBaseServiceGetRegionLocationResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceGetRegionLocationResult(%+v)", *p) -} - -// Attributes: -// - Table -type THBaseServiceGetAllRegionLocationsArgs struct { - Table []byte `thrift:"table,1,required" json:"table"` -} - -func NewTHBaseServiceGetAllRegionLocationsArgs() *THBaseServiceGetAllRegionLocationsArgs { - return &THBaseServiceGetAllRegionLocationsArgs{} -} - -func (p *THBaseServiceGetAllRegionLocationsArgs) GetTable() []byte { - return p.Table -} -func (p *THBaseServiceGetAllRegionLocationsArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetTable bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetTable = true - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetTable { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")) - } - return nil -} - -func (p *THBaseServiceGetAllRegionLocationsArgs) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Table = v - } - return nil -} - -func (p *THBaseServiceGetAllRegionLocationsArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getAllRegionLocations_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceGetAllRegionLocationsArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("table", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) - } - if err := oprot.WriteBinary(p.Table); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) - } - return err -} - -func (p *THBaseServiceGetAllRegionLocationsArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceGetAllRegionLocationsArgs(%+v)", *p) -} - -// Attributes: -// - Success -// - Io -type THBaseServiceGetAllRegionLocationsResult struct { - Success []*THRegionLocation `thrift:"success,0" json:"success,omitempty"` - Io *TIOError `thrift:"io,1" json:"io,omitempty"` -} - -func NewTHBaseServiceGetAllRegionLocationsResult() *THBaseServiceGetAllRegionLocationsResult { - return &THBaseServiceGetAllRegionLocationsResult{} -} - -var THBaseServiceGetAllRegionLocationsResult_Success_DEFAULT []*THRegionLocation - -func (p *THBaseServiceGetAllRegionLocationsResult) GetSuccess() []*THRegionLocation { - return p.Success -} - -var THBaseServiceGetAllRegionLocationsResult_Io_DEFAULT *TIOError - -func (p *THBaseServiceGetAllRegionLocationsResult) GetIo() *TIOError { - if !p.IsSetIo() { - return THBaseServiceGetAllRegionLocationsResult_Io_DEFAULT - } - return p.Io -} -func (p *THBaseServiceGetAllRegionLocationsResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *THBaseServiceGetAllRegionLocationsResult) IsSetIo() bool { - return p.Io != nil -} - -func (p *THBaseServiceGetAllRegionLocationsResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *THBaseServiceGetAllRegionLocationsResult) readField0(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*THRegionLocation, 0, size) - p.Success = tSlice - for i := 0; i < size; i++ { - _elem68 := &THRegionLocation{} - if err := _elem68.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem68), err) - } - p.Success = append(p.Success, _elem68) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *THBaseServiceGetAllRegionLocationsResult) readField1(iprot thrift.TProtocol) error { - p.Io = &TIOError{} - if err := p.Io.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) - } - return nil -} - -func (p *THBaseServiceGetAllRegionLocationsResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("getAllRegionLocations_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceGetAllRegionLocationsResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.LIST, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Success)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Success { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *THBaseServiceGetAllRegionLocationsResult) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetIo() { - if err := oprot.WriteFieldBegin("io", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) - } - if err := p.Io.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) - } - } - return err -} - -func (p *THBaseServiceGetAllRegionLocationsResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceGetAllRegionLocationsResult(%+v)", *p) -} - -// Attributes: -// - Table: to check in and delete from -// - Row: row to check -// - Family: column family to check -// - Qualifier: column qualifier to check -// - CompareOp: comparison to make on the value -// - Value: the expected value to be compared against, if not provided the -// check is for the non-existence of the column in question -// - RowMutations: row mutations to execute if the value matches -type THBaseServiceCheckAndMutateArgs struct { - Table []byte `thrift:"table,1,required" json:"table"` - Row []byte `thrift:"row,2,required" json:"row"` - Family []byte `thrift:"family,3,required" json:"family"` - Qualifier []byte `thrift:"qualifier,4,required" json:"qualifier"` - CompareOp TCompareOp `thrift:"compareOp,5,required" json:"compareOp"` - Value []byte `thrift:"value,6" json:"value"` - RowMutations *TRowMutations `thrift:"rowMutations,7,required" json:"rowMutations"` -} - -func NewTHBaseServiceCheckAndMutateArgs() *THBaseServiceCheckAndMutateArgs { - return &THBaseServiceCheckAndMutateArgs{} -} - -func (p *THBaseServiceCheckAndMutateArgs) GetTable() []byte { - return p.Table -} - -func (p *THBaseServiceCheckAndMutateArgs) GetRow() []byte { - return p.Row -} - -func (p *THBaseServiceCheckAndMutateArgs) GetFamily() []byte { - return p.Family -} - -func (p *THBaseServiceCheckAndMutateArgs) GetQualifier() []byte { - return p.Qualifier -} - -func (p *THBaseServiceCheckAndMutateArgs) GetCompareOp() TCompareOp { - return p.CompareOp -} - -func (p *THBaseServiceCheckAndMutateArgs) GetValue() []byte { - return p.Value -} - -var THBaseServiceCheckAndMutateArgs_RowMutations_DEFAULT *TRowMutations - -func (p *THBaseServiceCheckAndMutateArgs) GetRowMutations() *TRowMutations { - if !p.IsSetRowMutations() { - return THBaseServiceCheckAndMutateArgs_RowMutations_DEFAULT - } - return p.RowMutations -} -func (p *THBaseServiceCheckAndMutateArgs) IsSetRowMutations() bool { - return p.RowMutations != nil -} - -func (p *THBaseServiceCheckAndMutateArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetTable bool = false - var issetRow bool = false - var issetFamily bool = false - var issetQualifier bool = false - var issetCompareOp bool = false - var issetRowMutations bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetTable = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetRow = true - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - issetFamily = true - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - issetQualifier = true - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - issetCompareOp = true - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - case 7: - if err := p.readField7(iprot); err != nil { - return err - } - issetRowMutations = true - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetTable { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Table is not set")) - } - if !issetRow { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Row is not set")) - } - if !issetFamily { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Family is not set")) - } - if !issetQualifier { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Qualifier is not set")) - } - if !issetCompareOp { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field CompareOp is not set")) - } - if !issetRowMutations { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field RowMutations is not set")) - } - return nil -} - -func (p *THBaseServiceCheckAndMutateArgs) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Table = v - } - return nil -} - -func (p *THBaseServiceCheckAndMutateArgs) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Row = v - } - return nil -} - -func (p *THBaseServiceCheckAndMutateArgs) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.Family = v - } - return nil -} - -func (p *THBaseServiceCheckAndMutateArgs) readField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 4: ", err) - } else { - p.Qualifier = v - } - return nil -} - -func (p *THBaseServiceCheckAndMutateArgs) readField5(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 5: ", err) - } else { - temp := TCompareOp(v) - p.CompareOp = temp - } - return nil -} - -func (p *THBaseServiceCheckAndMutateArgs) readField6(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 6: ", err) - } else { - p.Value = v - } - return nil -} - -func (p *THBaseServiceCheckAndMutateArgs) readField7(iprot thrift.TProtocol) error { - p.RowMutations = &TRowMutations{} - if err := p.RowMutations.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.RowMutations), err) - } - return nil -} - -func (p *THBaseServiceCheckAndMutateArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("checkAndMutate_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := p.writeField7(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceCheckAndMutateArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("table", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:table: ", p), err) - } - if err := oprot.WriteBinary(p.Table); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.table (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:table: ", p), err) - } - return err -} - -func (p *THBaseServiceCheckAndMutateArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("row", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:row: ", p), err) - } - if err := oprot.WriteBinary(p.Row); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.row (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:row: ", p), err) - } - return err -} - -func (p *THBaseServiceCheckAndMutateArgs) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("family", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:family: ", p), err) - } - if err := oprot.WriteBinary(p.Family); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.family (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:family: ", p), err) - } - return err -} - -func (p *THBaseServiceCheckAndMutateArgs) writeField4(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("qualifier", thrift.STRING, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:qualifier: ", p), err) - } - if err := oprot.WriteBinary(p.Qualifier); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.qualifier (4) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:qualifier: ", p), err) - } - return err -} - -func (p *THBaseServiceCheckAndMutateArgs) writeField5(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("compareOp", thrift.I32, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:compareOp: ", p), err) - } - if err := oprot.WriteI32(int32(p.CompareOp)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.compareOp (5) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:compareOp: ", p), err) - } - return err -} - -func (p *THBaseServiceCheckAndMutateArgs) writeField6(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("value", thrift.STRING, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:value: ", p), err) - } - if err := oprot.WriteBinary(p.Value); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.value (6) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:value: ", p), err) - } - return err -} - -func (p *THBaseServiceCheckAndMutateArgs) writeField7(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("rowMutations", thrift.STRUCT, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:rowMutations: ", p), err) - } - if err := p.RowMutations.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.RowMutations), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:rowMutations: ", p), err) - } - return err -} - -func (p *THBaseServiceCheckAndMutateArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceCheckAndMutateArgs(%+v)", *p) -} - -// Attributes: -// - Success -// - Io -type THBaseServiceCheckAndMutateResult struct { - Success *bool `thrift:"success,0" json:"success,omitempty"` - Io *TIOError `thrift:"io,1" json:"io,omitempty"` -} - -func NewTHBaseServiceCheckAndMutateResult() *THBaseServiceCheckAndMutateResult { - return &THBaseServiceCheckAndMutateResult{} -} - -var THBaseServiceCheckAndMutateResult_Success_DEFAULT bool - -func (p *THBaseServiceCheckAndMutateResult) GetSuccess() bool { - if !p.IsSetSuccess() { - return THBaseServiceCheckAndMutateResult_Success_DEFAULT - } - return *p.Success -} - -var THBaseServiceCheckAndMutateResult_Io_DEFAULT *TIOError - -func (p *THBaseServiceCheckAndMutateResult) GetIo() *TIOError { - if !p.IsSetIo() { - return THBaseServiceCheckAndMutateResult_Io_DEFAULT - } - return p.Io -} -func (p *THBaseServiceCheckAndMutateResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *THBaseServiceCheckAndMutateResult) IsSetIo() bool { - return p.Io != nil -} - -func (p *THBaseServiceCheckAndMutateResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *THBaseServiceCheckAndMutateResult) readField0(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - p.Success = &v - } - return nil -} - -func (p *THBaseServiceCheckAndMutateResult) readField1(iprot thrift.TProtocol) error { - p.Io = &TIOError{} - if err := p.Io.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Io), err) - } - return nil -} - -func (p *THBaseServiceCheckAndMutateResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("checkAndMutate_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THBaseServiceCheckAndMutateResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.BOOL, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := oprot.WriteBool(bool(*p.Success)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *THBaseServiceCheckAndMutateResult) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetIo() { - if err := oprot.WriteFieldBegin("io", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:io: ", p), err) - } - if err := p.Io.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Io), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:io: ", p), err) - } - } - return err -} - -func (p *THBaseServiceCheckAndMutateResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THBaseServiceCheckAndMutateResult(%+v)", *p) -} diff --git a/tim.hbase/ttypes.go b/tim.hbase/ttypes.go deleted file mode 100644 index 2d03596..0000000 --- a/tim.hbase/ttypes.go +++ /dev/null @@ -1,5133 +0,0 @@ -// Autogenerated by Thrift Compiler (0.9.3) -// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - -package hbase - -import ( - "bytes" - "fmt" - "git.apache.org/thrift.git/lib/go/thrift" -) - -// (needed to ensure safety because of naive import list construction.) -var _ = thrift.ZERO -var _ = fmt.Printf -var _ = bytes.Equal - -var GoUnusedProtection__ int - -//Specify type of delete: -// - DELETE_COLUMN means exactly one version will be removed, -// - DELETE_COLUMNS means previous versions will also be removed. -type TDeleteType int64 - -const ( - TDeleteType_DELETE_COLUMN TDeleteType = 0 - TDeleteType_DELETE_COLUMNS TDeleteType = 1 -) - -func (p TDeleteType) String() string { - switch p { - case TDeleteType_DELETE_COLUMN: - return "DELETE_COLUMN" - case TDeleteType_DELETE_COLUMNS: - return "DELETE_COLUMNS" - } - return "" -} - -func TDeleteTypeFromString(s string) (TDeleteType, error) { - switch s { - case "DELETE_COLUMN": - return TDeleteType_DELETE_COLUMN, nil - case "DELETE_COLUMNS": - return TDeleteType_DELETE_COLUMNS, nil - } - return TDeleteType(0), fmt.Errorf("not a valid TDeleteType string") -} - -func TDeleteTypePtr(v TDeleteType) *TDeleteType { return &v } - -func (p TDeleteType) MarshalText() ([]byte, error) { - return []byte(p.String()), nil -} - -func (p *TDeleteType) UnmarshalText(text []byte) error { - q, err := TDeleteTypeFromString(string(text)) - if err != nil { - return err - } - *p = q - return nil -} - -//Specify Durability: -// - SKIP_WAL means do not write the Mutation to the WAL. -// - ASYNC_WAL means write the Mutation to the WAL asynchronously, -// - SYNC_WAL means write the Mutation to the WAL synchronously, -// - FSYNC_WAL means Write the Mutation to the WAL synchronously and force the entries to disk. -type TDurability int64 - -const ( - TDurability_SKIP_WAL TDurability = 1 - TDurability_ASYNC_WAL TDurability = 2 - TDurability_SYNC_WAL TDurability = 3 - TDurability_FSYNC_WAL TDurability = 4 -) - -func (p TDurability) String() string { - switch p { - case TDurability_SKIP_WAL: - return "SKIP_WAL" - case TDurability_ASYNC_WAL: - return "ASYNC_WAL" - case TDurability_SYNC_WAL: - return "SYNC_WAL" - case TDurability_FSYNC_WAL: - return "FSYNC_WAL" - } - return "" -} - -func TDurabilityFromString(s string) (TDurability, error) { - switch s { - case "SKIP_WAL": - return TDurability_SKIP_WAL, nil - case "ASYNC_WAL": - return TDurability_ASYNC_WAL, nil - case "SYNC_WAL": - return TDurability_SYNC_WAL, nil - case "FSYNC_WAL": - return TDurability_FSYNC_WAL, nil - } - return TDurability(0), fmt.Errorf("not a valid TDurability string") -} - -func TDurabilityPtr(v TDurability) *TDurability { return &v } - -func (p TDurability) MarshalText() ([]byte, error) { - return []byte(p.String()), nil -} - -func (p *TDurability) UnmarshalText(text []byte) error { - q, err := TDurabilityFromString(string(text)) - if err != nil { - return err - } - *p = q - return nil -} - -//Thrift wrapper around -//org.apache.hadoop.hbase.filter.CompareFilter$CompareOp. -type TCompareOp int64 - -const ( - TCompareOp_LESS TCompareOp = 0 - TCompareOp_LESS_OR_EQUAL TCompareOp = 1 - TCompareOp_EQUAL TCompareOp = 2 - TCompareOp_NOT_EQUAL TCompareOp = 3 - TCompareOp_GREATER_OR_EQUAL TCompareOp = 4 - TCompareOp_GREATER TCompareOp = 5 - TCompareOp_NO_OP TCompareOp = 6 -) - -func (p TCompareOp) String() string { - switch p { - case TCompareOp_LESS: - return "LESS" - case TCompareOp_LESS_OR_EQUAL: - return "LESS_OR_EQUAL" - case TCompareOp_EQUAL: - return "EQUAL" - case TCompareOp_NOT_EQUAL: - return "NOT_EQUAL" - case TCompareOp_GREATER_OR_EQUAL: - return "GREATER_OR_EQUAL" - case TCompareOp_GREATER: - return "GREATER" - case TCompareOp_NO_OP: - return "NO_OP" - } - return "" -} - -func TCompareOpFromString(s string) (TCompareOp, error) { - switch s { - case "LESS": - return TCompareOp_LESS, nil - case "LESS_OR_EQUAL": - return TCompareOp_LESS_OR_EQUAL, nil - case "EQUAL": - return TCompareOp_EQUAL, nil - case "NOT_EQUAL": - return TCompareOp_NOT_EQUAL, nil - case "GREATER_OR_EQUAL": - return TCompareOp_GREATER_OR_EQUAL, nil - case "GREATER": - return TCompareOp_GREATER, nil - case "NO_OP": - return TCompareOp_NO_OP, nil - } - return TCompareOp(0), fmt.Errorf("not a valid TCompareOp string") -} - -func TCompareOpPtr(v TCompareOp) *TCompareOp { return &v } - -func (p TCompareOp) MarshalText() ([]byte, error) { - return []byte(p.String()), nil -} - -func (p *TCompareOp) UnmarshalText(text []byte) error { - q, err := TCompareOpFromString(string(text)) - if err != nil { - return err - } - *p = q - return nil -} - -// Attributes: -// - MinStamp -// - MaxStamp -type TTimeRange struct { - MinStamp int64 `thrift:"minStamp,1,required" json:"minStamp"` - MaxStamp int64 `thrift:"maxStamp,2,required" json:"maxStamp"` -} - -func NewTTimeRange() *TTimeRange { - return &TTimeRange{} -} - -func (p *TTimeRange) GetMinStamp() int64 { - return p.MinStamp -} - -func (p *TTimeRange) GetMaxStamp() int64 { - return p.MaxStamp -} -func (p *TTimeRange) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetMinStamp bool = false - var issetMaxStamp bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetMinStamp = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetMaxStamp = true - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetMinStamp { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MinStamp is not set")) - } - if !issetMaxStamp { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field MaxStamp is not set")) - } - return nil -} - -func (p *TTimeRange) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.MinStamp = v - } - return nil -} - -func (p *TTimeRange) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.MaxStamp = v - } - return nil -} - -func (p *TTimeRange) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TTimeRange"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TTimeRange) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("minStamp", thrift.I64, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:minStamp: ", p), err) - } - if err := oprot.WriteI64(int64(p.MinStamp)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.minStamp (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:minStamp: ", p), err) - } - return err -} - -func (p *TTimeRange) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("maxStamp", thrift.I64, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:maxStamp: ", p), err) - } - if err := oprot.WriteI64(int64(p.MaxStamp)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.maxStamp (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:maxStamp: ", p), err) - } - return err -} - -func (p *TTimeRange) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TTimeRange(%+v)", *p) -} - -// Addresses a single cell or multiple cells -// in a HBase table by column family and optionally -// a column qualifier and timestamp -// -// Attributes: -// - Family -// - Qualifier -// - Timestamp -type TColumn struct { - Family []byte `thrift:"family,1,required" json:"family"` - Qualifier []byte `thrift:"qualifier,2" json:"qualifier,omitempty"` - Timestamp *int64 `thrift:"timestamp,3" json:"timestamp,omitempty"` -} - -func NewTColumn() *TColumn { - return &TColumn{} -} - -func (p *TColumn) GetFamily() []byte { - return p.Family -} - -var TColumn_Qualifier_DEFAULT []byte - -func (p *TColumn) GetQualifier() []byte { - return p.Qualifier -} - -var TColumn_Timestamp_DEFAULT int64 - -func (p *TColumn) GetTimestamp() int64 { - if !p.IsSetTimestamp() { - return TColumn_Timestamp_DEFAULT - } - return *p.Timestamp -} -func (p *TColumn) IsSetQualifier() bool { - return p.Qualifier != nil -} - -func (p *TColumn) IsSetTimestamp() bool { - return p.Timestamp != nil -} - -func (p *TColumn) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetFamily bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetFamily = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetFamily { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Family is not set")) - } - return nil -} - -func (p *TColumn) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Family = v - } - return nil -} - -func (p *TColumn) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Qualifier = v - } - return nil -} - -func (p *TColumn) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.Timestamp = &v - } - return nil -} - -func (p *TColumn) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TColumn"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TColumn) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("family", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:family: ", p), err) - } - if err := oprot.WriteBinary(p.Family); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.family (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:family: ", p), err) - } - return err -} - -func (p *TColumn) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetQualifier() { - if err := oprot.WriteFieldBegin("qualifier", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:qualifier: ", p), err) - } - if err := oprot.WriteBinary(p.Qualifier); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.qualifier (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:qualifier: ", p), err) - } - } - return err -} - -func (p *TColumn) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetTimestamp() { - if err := oprot.WriteFieldBegin("timestamp", thrift.I64, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:timestamp: ", p), err) - } - if err := oprot.WriteI64(int64(*p.Timestamp)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.timestamp (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:timestamp: ", p), err) - } - } - return err -} - -func (p *TColumn) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TColumn(%+v)", *p) -} - -// Represents a single cell and its value. -// -// Attributes: -// - Family -// - Qualifier -// - Value -// - Timestamp -// - Tags -type TColumnValue struct { - Family []byte `thrift:"family,1,required" json:"family"` - Qualifier []byte `thrift:"qualifier,2,required" json:"qualifier"` - Value []byte `thrift:"value,3,required" json:"value"` - Timestamp *int64 `thrift:"timestamp,4" json:"timestamp,omitempty"` - Tags []byte `thrift:"tags,5" json:"tags,omitempty"` -} - -func NewTColumnValue() *TColumnValue { - return &TColumnValue{} -} - -func (p *TColumnValue) GetFamily() []byte { - return p.Family -} - -func (p *TColumnValue) GetQualifier() []byte { - return p.Qualifier -} - -func (p *TColumnValue) GetValue() []byte { - return p.Value -} - -var TColumnValue_Timestamp_DEFAULT int64 - -func (p *TColumnValue) GetTimestamp() int64 { - if !p.IsSetTimestamp() { - return TColumnValue_Timestamp_DEFAULT - } - return *p.Timestamp -} - -var TColumnValue_Tags_DEFAULT []byte - -func (p *TColumnValue) GetTags() []byte { - return p.Tags -} -func (p *TColumnValue) IsSetTimestamp() bool { - return p.Timestamp != nil -} - -func (p *TColumnValue) IsSetTags() bool { - return p.Tags != nil -} - -func (p *TColumnValue) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetFamily bool = false - var issetQualifier bool = false - var issetValue bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetFamily = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetQualifier = true - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - issetValue = true - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetFamily { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Family is not set")) - } - if !issetQualifier { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Qualifier is not set")) - } - if !issetValue { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Value is not set")) - } - return nil -} - -func (p *TColumnValue) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Family = v - } - return nil -} - -func (p *TColumnValue) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Qualifier = v - } - return nil -} - -func (p *TColumnValue) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.Value = v - } - return nil -} - -func (p *TColumnValue) readField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { - return thrift.PrependError("error reading field 4: ", err) - } else { - p.Timestamp = &v - } - return nil -} - -func (p *TColumnValue) readField5(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 5: ", err) - } else { - p.Tags = v - } - return nil -} - -func (p *TColumnValue) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TColumnValue"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TColumnValue) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("family", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:family: ", p), err) - } - if err := oprot.WriteBinary(p.Family); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.family (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:family: ", p), err) - } - return err -} - -func (p *TColumnValue) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("qualifier", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:qualifier: ", p), err) - } - if err := oprot.WriteBinary(p.Qualifier); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.qualifier (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:qualifier: ", p), err) - } - return err -} - -func (p *TColumnValue) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("value", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:value: ", p), err) - } - if err := oprot.WriteBinary(p.Value); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.value (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:value: ", p), err) - } - return err -} - -func (p *TColumnValue) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetTimestamp() { - if err := oprot.WriteFieldBegin("timestamp", thrift.I64, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:timestamp: ", p), err) - } - if err := oprot.WriteI64(int64(*p.Timestamp)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.timestamp (4) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:timestamp: ", p), err) - } - } - return err -} - -func (p *TColumnValue) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetTags() { - if err := oprot.WriteFieldBegin("tags", thrift.STRING, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:tags: ", p), err) - } - if err := oprot.WriteBinary(p.Tags); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.tags (5) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:tags: ", p), err) - } - } - return err -} - -func (p *TColumnValue) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TColumnValue(%+v)", *p) -} - -// Represents a single cell and the amount to increment it by -// -// Attributes: -// - Family -// - Qualifier -// - Amount -type TColumnIncrement struct { - Family []byte `thrift:"family,1,required" json:"family"` - Qualifier []byte `thrift:"qualifier,2,required" json:"qualifier"` - Amount int64 `thrift:"amount,3" json:"amount,omitempty"` -} - -func NewTColumnIncrement() *TColumnIncrement { - return &TColumnIncrement{ - Amount: 1, - } -} - -func (p *TColumnIncrement) GetFamily() []byte { - return p.Family -} - -func (p *TColumnIncrement) GetQualifier() []byte { - return p.Qualifier -} - -var TColumnIncrement_Amount_DEFAULT int64 = 1 - -func (p *TColumnIncrement) GetAmount() int64 { - return p.Amount -} -func (p *TColumnIncrement) IsSetAmount() bool { - return p.Amount != TColumnIncrement_Amount_DEFAULT -} - -func (p *TColumnIncrement) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetFamily bool = false - var issetQualifier bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetFamily = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetQualifier = true - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetFamily { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Family is not set")) - } - if !issetQualifier { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Qualifier is not set")) - } - return nil -} - -func (p *TColumnIncrement) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Family = v - } - return nil -} - -func (p *TColumnIncrement) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Qualifier = v - } - return nil -} - -func (p *TColumnIncrement) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.Amount = v - } - return nil -} - -func (p *TColumnIncrement) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TColumnIncrement"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TColumnIncrement) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("family", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:family: ", p), err) - } - if err := oprot.WriteBinary(p.Family); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.family (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:family: ", p), err) - } - return err -} - -func (p *TColumnIncrement) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("qualifier", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:qualifier: ", p), err) - } - if err := oprot.WriteBinary(p.Qualifier); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.qualifier (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:qualifier: ", p), err) - } - return err -} - -func (p *TColumnIncrement) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetAmount() { - if err := oprot.WriteFieldBegin("amount", thrift.I64, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:amount: ", p), err) - } - if err := oprot.WriteI64(int64(p.Amount)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.amount (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:amount: ", p), err) - } - } - return err -} - -func (p *TColumnIncrement) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TColumnIncrement(%+v)", *p) -} - -// if no Result is found, row and columnValues will not be set. -// -// Attributes: -// - Row -// - ColumnValues -type TResult_ struct { - Row []byte `thrift:"row,1" json:"row,omitempty"` - ColumnValues []*TColumnValue `thrift:"columnValues,2,required" json:"columnValues"` -} - -func NewTResult_() *TResult_ { - return &TResult_{} -} - -var TResult__Row_DEFAULT []byte - -func (p *TResult_) GetRow() []byte { - return p.Row -} - -func (p *TResult_) GetColumnValues() []*TColumnValue { - return p.ColumnValues -} -func (p *TResult_) IsSetRow() bool { - return p.Row != nil -} - -func (p *TResult_) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetColumnValues bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetColumnValues = true - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetColumnValues { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ColumnValues is not set")) - } - return nil -} - -func (p *TResult_) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Row = v - } - return nil -} - -func (p *TResult_) readField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TColumnValue, 0, size) - p.ColumnValues = tSlice - for i := 0; i < size; i++ { - _elem0 := &TColumnValue{} - if err := _elem0.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem0), err) - } - p.ColumnValues = append(p.ColumnValues, _elem0) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TResult_) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TResult"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TResult_) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetRow() { - if err := oprot.WriteFieldBegin("row", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:row: ", p), err) - } - if err := oprot.WriteBinary(p.Row); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.row (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:row: ", p), err) - } - } - return err -} - -func (p *TResult_) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("columnValues", thrift.LIST, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:columnValues: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ColumnValues)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.ColumnValues { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:columnValues: ", p), err) - } - return err -} - -func (p *TResult_) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TResult_(%+v)", *p) -} - -// Attributes: -// - Labels -type TAuthorization struct { - Labels []string `thrift:"labels,1" json:"labels,omitempty"` -} - -func NewTAuthorization() *TAuthorization { - return &TAuthorization{} -} - -var TAuthorization_Labels_DEFAULT []string - -func (p *TAuthorization) GetLabels() []string { - return p.Labels -} -func (p *TAuthorization) IsSetLabels() bool { - return p.Labels != nil -} - -func (p *TAuthorization) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TAuthorization) readField1(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]string, 0, size) - p.Labels = tSlice - for i := 0; i < size; i++ { - var _elem1 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _elem1 = v - } - p.Labels = append(p.Labels, _elem1) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TAuthorization) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TAuthorization"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TAuthorization) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetLabels() { - if err := oprot.WriteFieldBegin("labels", thrift.LIST, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:labels: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRING, len(p.Labels)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Labels { - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:labels: ", p), err) - } - } - return err -} - -func (p *TAuthorization) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TAuthorization(%+v)", *p) -} - -// Attributes: -// - Expression -type TCellVisibility struct { - Expression *string `thrift:"expression,1" json:"expression,omitempty"` -} - -func NewTCellVisibility() *TCellVisibility { - return &TCellVisibility{} -} - -var TCellVisibility_Expression_DEFAULT string - -func (p *TCellVisibility) GetExpression() string { - if !p.IsSetExpression() { - return TCellVisibility_Expression_DEFAULT - } - return *p.Expression -} -func (p *TCellVisibility) IsSetExpression() bool { - return p.Expression != nil -} - -func (p *TCellVisibility) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TCellVisibility) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Expression = &v - } - return nil -} - -func (p *TCellVisibility) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TCellVisibility"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TCellVisibility) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetExpression() { - if err := oprot.WriteFieldBegin("expression", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:expression: ", p), err) - } - if err := oprot.WriteString(string(*p.Expression)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.expression (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:expression: ", p), err) - } - } - return err -} - -func (p *TCellVisibility) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TCellVisibility(%+v)", *p) -} - -// Used to perform Get operations on a single row. -// -// The scope can be further narrowed down by specifying a list of -// columns or column families. -// -// To get everything for a row, instantiate a Get object with just the row to get. -// To further define the scope of what to get you can add a timestamp or time range -// with an optional maximum number of versions to return. -// -// If you specify a time range and a timestamp the range is ignored. -// Timestamps on TColumns are ignored. -// -// Attributes: -// - Row -// - Columns -// - Timestamp -// - TimeRange -// - MaxVersions -// - FilterString -// - Attributes -// - Authorizations -type TGet struct { - Row []byte `thrift:"row,1,required" json:"row"` - Columns []*TColumn `thrift:"columns,2" json:"columns,omitempty"` - Timestamp *int64 `thrift:"timestamp,3" json:"timestamp,omitempty"` - TimeRange *TTimeRange `thrift:"timeRange,4" json:"timeRange,omitempty"` - MaxVersions *int32 `thrift:"maxVersions,5" json:"maxVersions,omitempty"` - FilterString []byte `thrift:"filterString,6" json:"filterString,omitempty"` - Attributes map[string][]byte `thrift:"attributes,7" json:"attributes,omitempty"` - Authorizations *TAuthorization `thrift:"authorizations,8" json:"authorizations,omitempty"` -} - -func NewTGet() *TGet { - return &TGet{} -} - -func (p *TGet) GetRow() []byte { - return p.Row -} - -var TGet_Columns_DEFAULT []*TColumn - -func (p *TGet) GetColumns() []*TColumn { - return p.Columns -} - -var TGet_Timestamp_DEFAULT int64 - -func (p *TGet) GetTimestamp() int64 { - if !p.IsSetTimestamp() { - return TGet_Timestamp_DEFAULT - } - return *p.Timestamp -} - -var TGet_TimeRange_DEFAULT *TTimeRange - -func (p *TGet) GetTimeRange() *TTimeRange { - if !p.IsSetTimeRange() { - return TGet_TimeRange_DEFAULT - } - return p.TimeRange -} - -var TGet_MaxVersions_DEFAULT int32 - -func (p *TGet) GetMaxVersions() int32 { - if !p.IsSetMaxVersions() { - return TGet_MaxVersions_DEFAULT - } - return *p.MaxVersions -} - -var TGet_FilterString_DEFAULT []byte - -func (p *TGet) GetFilterString() []byte { - return p.FilterString -} - -var TGet_Attributes_DEFAULT map[string][]byte - -func (p *TGet) GetAttributes() map[string][]byte { - return p.Attributes -} - -var TGet_Authorizations_DEFAULT *TAuthorization - -func (p *TGet) GetAuthorizations() *TAuthorization { - if !p.IsSetAuthorizations() { - return TGet_Authorizations_DEFAULT - } - return p.Authorizations -} -func (p *TGet) IsSetColumns() bool { - return p.Columns != nil -} - -func (p *TGet) IsSetTimestamp() bool { - return p.Timestamp != nil -} - -func (p *TGet) IsSetTimeRange() bool { - return p.TimeRange != nil -} - -func (p *TGet) IsSetMaxVersions() bool { - return p.MaxVersions != nil -} - -func (p *TGet) IsSetFilterString() bool { - return p.FilterString != nil -} - -func (p *TGet) IsSetAttributes() bool { - return p.Attributes != nil -} - -func (p *TGet) IsSetAuthorizations() bool { - return p.Authorizations != nil -} - -func (p *TGet) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetRow bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetRow = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - case 7: - if err := p.readField7(iprot); err != nil { - return err - } - case 8: - if err := p.readField8(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetRow { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Row is not set")) - } - return nil -} - -func (p *TGet) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Row = v - } - return nil -} - -func (p *TGet) readField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TColumn, 0, size) - p.Columns = tSlice - for i := 0; i < size; i++ { - _elem2 := &TColumn{} - if err := _elem2.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem2), err) - } - p.Columns = append(p.Columns, _elem2) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TGet) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.Timestamp = &v - } - return nil -} - -func (p *TGet) readField4(iprot thrift.TProtocol) error { - p.TimeRange = &TTimeRange{} - if err := p.TimeRange.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TimeRange), err) - } - return nil -} - -func (p *TGet) readField5(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 5: ", err) - } else { - p.MaxVersions = &v - } - return nil -} - -func (p *TGet) readField6(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 6: ", err) - } else { - p.FilterString = v - } - return nil -} - -func (p *TGet) readField7(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string][]byte, size) - p.Attributes = tMap - for i := 0; i < size; i++ { - var _key3 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key3 = v - } - var _val4 []byte - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val4 = v - } - p.Attributes[_key3] = _val4 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TGet) readField8(iprot thrift.TProtocol) error { - p.Authorizations = &TAuthorization{} - if err := p.Authorizations.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Authorizations), err) - } - return nil -} - -func (p *TGet) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TGet"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := p.writeField7(oprot); err != nil { - return err - } - if err := p.writeField8(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TGet) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("row", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:row: ", p), err) - } - if err := oprot.WriteBinary(p.Row); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.row (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:row: ", p), err) - } - return err -} - -func (p *TGet) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetColumns() { - if err := oprot.WriteFieldBegin("columns", thrift.LIST, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:columns: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Columns)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Columns { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:columns: ", p), err) - } - } - return err -} - -func (p *TGet) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetTimestamp() { - if err := oprot.WriteFieldBegin("timestamp", thrift.I64, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:timestamp: ", p), err) - } - if err := oprot.WriteI64(int64(*p.Timestamp)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.timestamp (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:timestamp: ", p), err) - } - } - return err -} - -func (p *TGet) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetTimeRange() { - if err := oprot.WriteFieldBegin("timeRange", thrift.STRUCT, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:timeRange: ", p), err) - } - if err := p.TimeRange.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TimeRange), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:timeRange: ", p), err) - } - } - return err -} - -func (p *TGet) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetMaxVersions() { - if err := oprot.WriteFieldBegin("maxVersions", thrift.I32, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:maxVersions: ", p), err) - } - if err := oprot.WriteI32(int32(*p.MaxVersions)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.maxVersions (5) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:maxVersions: ", p), err) - } - } - return err -} - -func (p *TGet) writeField6(oprot thrift.TProtocol) (err error) { - if p.IsSetFilterString() { - if err := oprot.WriteFieldBegin("filterString", thrift.STRING, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:filterString: ", p), err) - } - if err := oprot.WriteBinary(p.FilterString); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.filterString (6) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:filterString: ", p), err) - } - } - return err -} - -func (p *TGet) writeField7(oprot thrift.TProtocol) (err error) { - if p.IsSetAttributes() { - if err := oprot.WriteFieldBegin("attributes", thrift.MAP, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:attributes: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.Attributes)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.Attributes { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteBinary(v); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:attributes: ", p), err) - } - } - return err -} - -func (p *TGet) writeField8(oprot thrift.TProtocol) (err error) { - if p.IsSetAuthorizations() { - if err := oprot.WriteFieldBegin("authorizations", thrift.STRUCT, 8); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:authorizations: ", p), err) - } - if err := p.Authorizations.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Authorizations), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 8:authorizations: ", p), err) - } - } - return err -} - -func (p *TGet) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TGet(%+v)", *p) -} - -// Used to perform Put operations for a single row. -// -// Add column values to this object and they'll be added. -// You can provide a default timestamp if the column values -// don't have one. If you don't provide a default timestamp -// the current time is inserted. -// -// You can specify how this Put should be written to the write-ahead Log (WAL) -// by changing the durability. If you don't provide durability, it defaults to -// column family's default setting for durability. -// -// Attributes: -// - Row -// - ColumnValues -// - Timestamp -// - Attributes -// - Durability -// - CellVisibility -type TPut struct { - Row []byte `thrift:"row,1,required" json:"row"` - ColumnValues []*TColumnValue `thrift:"columnValues,2,required" json:"columnValues"` - Timestamp *int64 `thrift:"timestamp,3" json:"timestamp,omitempty"` - // unused field # 4 - Attributes map[string][]byte `thrift:"attributes,5" json:"attributes,omitempty"` - Durability *TDurability `thrift:"durability,6" json:"durability,omitempty"` - CellVisibility *TCellVisibility `thrift:"cellVisibility,7" json:"cellVisibility,omitempty"` -} - -func NewTPut() *TPut { - return &TPut{} -} - -func (p *TPut) GetRow() []byte { - return p.Row -} - -func (p *TPut) GetColumnValues() []*TColumnValue { - return p.ColumnValues -} - -var TPut_Timestamp_DEFAULT int64 - -func (p *TPut) GetTimestamp() int64 { - if !p.IsSetTimestamp() { - return TPut_Timestamp_DEFAULT - } - return *p.Timestamp -} - -var TPut_Attributes_DEFAULT map[string][]byte - -func (p *TPut) GetAttributes() map[string][]byte { - return p.Attributes -} - -var TPut_Durability_DEFAULT TDurability - -func (p *TPut) GetDurability() TDurability { - if !p.IsSetDurability() { - return TPut_Durability_DEFAULT - } - return *p.Durability -} - -var TPut_CellVisibility_DEFAULT *TCellVisibility - -func (p *TPut) GetCellVisibility() *TCellVisibility { - if !p.IsSetCellVisibility() { - return TPut_CellVisibility_DEFAULT - } - return p.CellVisibility -} -func (p *TPut) IsSetTimestamp() bool { - return p.Timestamp != nil -} - -func (p *TPut) IsSetAttributes() bool { - return p.Attributes != nil -} - -func (p *TPut) IsSetDurability() bool { - return p.Durability != nil -} - -func (p *TPut) IsSetCellVisibility() bool { - return p.CellVisibility != nil -} - -func (p *TPut) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetRow bool = false - var issetColumnValues bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetRow = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetColumnValues = true - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - case 7: - if err := p.readField7(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetRow { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Row is not set")) - } - if !issetColumnValues { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ColumnValues is not set")) - } - return nil -} - -func (p *TPut) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Row = v - } - return nil -} - -func (p *TPut) readField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TColumnValue, 0, size) - p.ColumnValues = tSlice - for i := 0; i < size; i++ { - _elem5 := &TColumnValue{} - if err := _elem5.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem5), err) - } - p.ColumnValues = append(p.ColumnValues, _elem5) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TPut) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.Timestamp = &v - } - return nil -} - -func (p *TPut) readField5(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string][]byte, size) - p.Attributes = tMap - for i := 0; i < size; i++ { - var _key6 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key6 = v - } - var _val7 []byte - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val7 = v - } - p.Attributes[_key6] = _val7 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TPut) readField6(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 6: ", err) - } else { - temp := TDurability(v) - p.Durability = &temp - } - return nil -} - -func (p *TPut) readField7(iprot thrift.TProtocol) error { - p.CellVisibility = &TCellVisibility{} - if err := p.CellVisibility.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.CellVisibility), err) - } - return nil -} - -func (p *TPut) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TPut"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := p.writeField7(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TPut) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("row", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:row: ", p), err) - } - if err := oprot.WriteBinary(p.Row); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.row (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:row: ", p), err) - } - return err -} - -func (p *TPut) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("columnValues", thrift.LIST, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:columnValues: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ColumnValues)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.ColumnValues { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:columnValues: ", p), err) - } - return err -} - -func (p *TPut) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetTimestamp() { - if err := oprot.WriteFieldBegin("timestamp", thrift.I64, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:timestamp: ", p), err) - } - if err := oprot.WriteI64(int64(*p.Timestamp)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.timestamp (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:timestamp: ", p), err) - } - } - return err -} - -func (p *TPut) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetAttributes() { - if err := oprot.WriteFieldBegin("attributes", thrift.MAP, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:attributes: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.Attributes)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.Attributes { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteBinary(v); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:attributes: ", p), err) - } - } - return err -} - -func (p *TPut) writeField6(oprot thrift.TProtocol) (err error) { - if p.IsSetDurability() { - if err := oprot.WriteFieldBegin("durability", thrift.I32, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:durability: ", p), err) - } - if err := oprot.WriteI32(int32(*p.Durability)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.durability (6) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:durability: ", p), err) - } - } - return err -} - -func (p *TPut) writeField7(oprot thrift.TProtocol) (err error) { - if p.IsSetCellVisibility() { - if err := oprot.WriteFieldBegin("cellVisibility", thrift.STRUCT, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:cellVisibility: ", p), err) - } - if err := p.CellVisibility.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.CellVisibility), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:cellVisibility: ", p), err) - } - } - return err -} - -func (p *TPut) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TPut(%+v)", *p) -} - -// Used to perform Delete operations on a single row. -// -// The scope can be further narrowed down by specifying a list of -// columns or column families as TColumns. -// -// Specifying only a family in a TColumn will delete the whole family. -// If a timestamp is specified all versions with a timestamp less than -// or equal to this will be deleted. If no timestamp is specified the -// current time will be used. -// -// Specifying a family and a column qualifier in a TColumn will delete only -// this qualifier. If a timestamp is specified only versions equal -// to this timestamp will be deleted. If no timestamp is specified the -// most recent version will be deleted. To delete all previous versions, -// specify the DELETE_COLUMNS TDeleteType. -// -// The top level timestamp is only used if a complete row should be deleted -// (i.e. no columns are passed) and if it is specified it works the same way -// as if you had added a TColumn for every column family and this timestamp -// (i.e. all versions older than or equal in all column families will be deleted) -// -// You can specify how this Delete should be written to the write-ahead Log (WAL) -// by changing the durability. If you don't provide durability, it defaults to -// column family's default setting for durability. -// -// Attributes: -// - Row -// - Columns -// - Timestamp -// - DeleteType -// - Attributes -// - Durability -type TDelete struct { - Row []byte `thrift:"row,1,required" json:"row"` - Columns []*TColumn `thrift:"columns,2" json:"columns,omitempty"` - Timestamp *int64 `thrift:"timestamp,3" json:"timestamp,omitempty"` - DeleteType TDeleteType `thrift:"deleteType,4" json:"deleteType,omitempty"` - // unused field # 5 - Attributes map[string][]byte `thrift:"attributes,6" json:"attributes,omitempty"` - Durability *TDurability `thrift:"durability,7" json:"durability,omitempty"` -} - -func NewTDelete() *TDelete { - return &TDelete{ - DeleteType: 1, - } -} - -func (p *TDelete) GetRow() []byte { - return p.Row -} - -var TDelete_Columns_DEFAULT []*TColumn - -func (p *TDelete) GetColumns() []*TColumn { - return p.Columns -} - -var TDelete_Timestamp_DEFAULT int64 - -func (p *TDelete) GetTimestamp() int64 { - if !p.IsSetTimestamp() { - return TDelete_Timestamp_DEFAULT - } - return *p.Timestamp -} - -var TDelete_DeleteType_DEFAULT TDeleteType = 1 - -func (p *TDelete) GetDeleteType() TDeleteType { - return p.DeleteType -} - -var TDelete_Attributes_DEFAULT map[string][]byte - -func (p *TDelete) GetAttributes() map[string][]byte { - return p.Attributes -} - -var TDelete_Durability_DEFAULT TDurability - -func (p *TDelete) GetDurability() TDurability { - if !p.IsSetDurability() { - return TDelete_Durability_DEFAULT - } - return *p.Durability -} -func (p *TDelete) IsSetColumns() bool { - return p.Columns != nil -} - -func (p *TDelete) IsSetTimestamp() bool { - return p.Timestamp != nil -} - -func (p *TDelete) IsSetDeleteType() bool { - return p.DeleteType != TDelete_DeleteType_DEFAULT -} - -func (p *TDelete) IsSetAttributes() bool { - return p.Attributes != nil -} - -func (p *TDelete) IsSetDurability() bool { - return p.Durability != nil -} - -func (p *TDelete) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetRow bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetRow = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - case 7: - if err := p.readField7(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetRow { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Row is not set")) - } - return nil -} - -func (p *TDelete) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Row = v - } - return nil -} - -func (p *TDelete) readField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TColumn, 0, size) - p.Columns = tSlice - for i := 0; i < size; i++ { - _elem8 := &TColumn{} - if err := _elem8.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem8), err) - } - p.Columns = append(p.Columns, _elem8) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TDelete) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.Timestamp = &v - } - return nil -} - -func (p *TDelete) readField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 4: ", err) - } else { - temp := TDeleteType(v) - p.DeleteType = temp - } - return nil -} - -func (p *TDelete) readField6(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string][]byte, size) - p.Attributes = tMap - for i := 0; i < size; i++ { - var _key9 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key9 = v - } - var _val10 []byte - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val10 = v - } - p.Attributes[_key9] = _val10 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TDelete) readField7(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 7: ", err) - } else { - temp := TDurability(v) - p.Durability = &temp - } - return nil -} - -func (p *TDelete) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TDelete"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := p.writeField7(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TDelete) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("row", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:row: ", p), err) - } - if err := oprot.WriteBinary(p.Row); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.row (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:row: ", p), err) - } - return err -} - -func (p *TDelete) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetColumns() { - if err := oprot.WriteFieldBegin("columns", thrift.LIST, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:columns: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Columns)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Columns { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:columns: ", p), err) - } - } - return err -} - -func (p *TDelete) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetTimestamp() { - if err := oprot.WriteFieldBegin("timestamp", thrift.I64, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:timestamp: ", p), err) - } - if err := oprot.WriteI64(int64(*p.Timestamp)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.timestamp (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:timestamp: ", p), err) - } - } - return err -} - -func (p *TDelete) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetDeleteType() { - if err := oprot.WriteFieldBegin("deleteType", thrift.I32, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:deleteType: ", p), err) - } - if err := oprot.WriteI32(int32(p.DeleteType)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.deleteType (4) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:deleteType: ", p), err) - } - } - return err -} - -func (p *TDelete) writeField6(oprot thrift.TProtocol) (err error) { - if p.IsSetAttributes() { - if err := oprot.WriteFieldBegin("attributes", thrift.MAP, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:attributes: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.Attributes)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.Attributes { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteBinary(v); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:attributes: ", p), err) - } - } - return err -} - -func (p *TDelete) writeField7(oprot thrift.TProtocol) (err error) { - if p.IsSetDurability() { - if err := oprot.WriteFieldBegin("durability", thrift.I32, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:durability: ", p), err) - } - if err := oprot.WriteI32(int32(*p.Durability)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.durability (7) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:durability: ", p), err) - } - } - return err -} - -func (p *TDelete) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TDelete(%+v)", *p) -} - -// Used to perform Increment operations for a single row. -// -// You can specify how this Increment should be written to the write-ahead Log (WAL) -// by changing the durability. If you don't provide durability, it defaults to -// column family's default setting for durability. -// -// Attributes: -// - Row -// - Columns -// - Attributes -// - Durability -// - CellVisibility -type TIncrement struct { - Row []byte `thrift:"row,1,required" json:"row"` - Columns []*TColumnIncrement `thrift:"columns,2,required" json:"columns"` - // unused field # 3 - Attributes map[string][]byte `thrift:"attributes,4" json:"attributes,omitempty"` - Durability *TDurability `thrift:"durability,5" json:"durability,omitempty"` - CellVisibility *TCellVisibility `thrift:"cellVisibility,6" json:"cellVisibility,omitempty"` -} - -func NewTIncrement() *TIncrement { - return &TIncrement{} -} - -func (p *TIncrement) GetRow() []byte { - return p.Row -} - -func (p *TIncrement) GetColumns() []*TColumnIncrement { - return p.Columns -} - -var TIncrement_Attributes_DEFAULT map[string][]byte - -func (p *TIncrement) GetAttributes() map[string][]byte { - return p.Attributes -} - -var TIncrement_Durability_DEFAULT TDurability - -func (p *TIncrement) GetDurability() TDurability { - if !p.IsSetDurability() { - return TIncrement_Durability_DEFAULT - } - return *p.Durability -} - -var TIncrement_CellVisibility_DEFAULT *TCellVisibility - -func (p *TIncrement) GetCellVisibility() *TCellVisibility { - if !p.IsSetCellVisibility() { - return TIncrement_CellVisibility_DEFAULT - } - return p.CellVisibility -} -func (p *TIncrement) IsSetAttributes() bool { - return p.Attributes != nil -} - -func (p *TIncrement) IsSetDurability() bool { - return p.Durability != nil -} - -func (p *TIncrement) IsSetCellVisibility() bool { - return p.CellVisibility != nil -} - -func (p *TIncrement) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetRow bool = false - var issetColumns bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetRow = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetColumns = true - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetRow { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Row is not set")) - } - if !issetColumns { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Columns is not set")) - } - return nil -} - -func (p *TIncrement) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Row = v - } - return nil -} - -func (p *TIncrement) readField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TColumnIncrement, 0, size) - p.Columns = tSlice - for i := 0; i < size; i++ { - _elem11 := &TColumnIncrement{ - Amount: 1, - } - if err := _elem11.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem11), err) - } - p.Columns = append(p.Columns, _elem11) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TIncrement) readField4(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string][]byte, size) - p.Attributes = tMap - for i := 0; i < size; i++ { - var _key12 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key12 = v - } - var _val13 []byte - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val13 = v - } - p.Attributes[_key12] = _val13 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TIncrement) readField5(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 5: ", err) - } else { - temp := TDurability(v) - p.Durability = &temp - } - return nil -} - -func (p *TIncrement) readField6(iprot thrift.TProtocol) error { - p.CellVisibility = &TCellVisibility{} - if err := p.CellVisibility.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.CellVisibility), err) - } - return nil -} - -func (p *TIncrement) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TIncrement"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TIncrement) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("row", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:row: ", p), err) - } - if err := oprot.WriteBinary(p.Row); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.row (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:row: ", p), err) - } - return err -} - -func (p *TIncrement) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("columns", thrift.LIST, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:columns: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Columns)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Columns { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:columns: ", p), err) - } - return err -} - -func (p *TIncrement) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetAttributes() { - if err := oprot.WriteFieldBegin("attributes", thrift.MAP, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:attributes: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.Attributes)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.Attributes { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteBinary(v); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:attributes: ", p), err) - } - } - return err -} - -func (p *TIncrement) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetDurability() { - if err := oprot.WriteFieldBegin("durability", thrift.I32, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:durability: ", p), err) - } - if err := oprot.WriteI32(int32(*p.Durability)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.durability (5) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:durability: ", p), err) - } - } - return err -} - -func (p *TIncrement) writeField6(oprot thrift.TProtocol) (err error) { - if p.IsSetCellVisibility() { - if err := oprot.WriteFieldBegin("cellVisibility", thrift.STRUCT, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:cellVisibility: ", p), err) - } - if err := p.CellVisibility.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.CellVisibility), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:cellVisibility: ", p), err) - } - } - return err -} - -func (p *TIncrement) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TIncrement(%+v)", *p) -} - -// Attributes: -// - Row -// - Columns -// - Attributes -// - Durability -// - CellVisibility -type TAppend struct { - Row []byte `thrift:"row,1,required" json:"row"` - Columns []*TColumnValue `thrift:"columns,2,required" json:"columns"` - Attributes map[string][]byte `thrift:"attributes,3" json:"attributes,omitempty"` - Durability *TDurability `thrift:"durability,4" json:"durability,omitempty"` - CellVisibility *TCellVisibility `thrift:"cellVisibility,5" json:"cellVisibility,omitempty"` -} - -func NewTAppend() *TAppend { - return &TAppend{} -} - -func (p *TAppend) GetRow() []byte { - return p.Row -} - -func (p *TAppend) GetColumns() []*TColumnValue { - return p.Columns -} - -var TAppend_Attributes_DEFAULT map[string][]byte - -func (p *TAppend) GetAttributes() map[string][]byte { - return p.Attributes -} - -var TAppend_Durability_DEFAULT TDurability - -func (p *TAppend) GetDurability() TDurability { - if !p.IsSetDurability() { - return TAppend_Durability_DEFAULT - } - return *p.Durability -} - -var TAppend_CellVisibility_DEFAULT *TCellVisibility - -func (p *TAppend) GetCellVisibility() *TCellVisibility { - if !p.IsSetCellVisibility() { - return TAppend_CellVisibility_DEFAULT - } - return p.CellVisibility -} -func (p *TAppend) IsSetAttributes() bool { - return p.Attributes != nil -} - -func (p *TAppend) IsSetDurability() bool { - return p.Durability != nil -} - -func (p *TAppend) IsSetCellVisibility() bool { - return p.CellVisibility != nil -} - -func (p *TAppend) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetRow bool = false - var issetColumns bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetRow = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetColumns = true - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetRow { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Row is not set")) - } - if !issetColumns { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Columns is not set")) - } - return nil -} - -func (p *TAppend) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Row = v - } - return nil -} - -func (p *TAppend) readField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TColumnValue, 0, size) - p.Columns = tSlice - for i := 0; i < size; i++ { - _elem14 := &TColumnValue{} - if err := _elem14.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem14), err) - } - p.Columns = append(p.Columns, _elem14) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TAppend) readField3(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string][]byte, size) - p.Attributes = tMap - for i := 0; i < size; i++ { - var _key15 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key15 = v - } - var _val16 []byte - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val16 = v - } - p.Attributes[_key15] = _val16 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TAppend) readField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 4: ", err) - } else { - temp := TDurability(v) - p.Durability = &temp - } - return nil -} - -func (p *TAppend) readField5(iprot thrift.TProtocol) error { - p.CellVisibility = &TCellVisibility{} - if err := p.CellVisibility.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.CellVisibility), err) - } - return nil -} - -func (p *TAppend) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TAppend"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TAppend) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("row", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:row: ", p), err) - } - if err := oprot.WriteBinary(p.Row); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.row (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:row: ", p), err) - } - return err -} - -func (p *TAppend) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("columns", thrift.LIST, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:columns: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Columns)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Columns { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:columns: ", p), err) - } - return err -} - -func (p *TAppend) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetAttributes() { - if err := oprot.WriteFieldBegin("attributes", thrift.MAP, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:attributes: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.Attributes)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.Attributes { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteBinary(v); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:attributes: ", p), err) - } - } - return err -} - -func (p *TAppend) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetDurability() { - if err := oprot.WriteFieldBegin("durability", thrift.I32, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:durability: ", p), err) - } - if err := oprot.WriteI32(int32(*p.Durability)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.durability (4) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:durability: ", p), err) - } - } - return err -} - -func (p *TAppend) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetCellVisibility() { - if err := oprot.WriteFieldBegin("cellVisibility", thrift.STRUCT, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:cellVisibility: ", p), err) - } - if err := p.CellVisibility.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.CellVisibility), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:cellVisibility: ", p), err) - } - } - return err -} - -func (p *TAppend) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TAppend(%+v)", *p) -} - -// Any timestamps in the columns are ignored, use timeRange to select by timestamp. -// Max versions defaults to 1. -// -// Attributes: -// - StartRow -// - StopRow -// - Columns -// - Caching -// - MaxVersions -// - TimeRange -// - FilterString -// - BatchSize -// - Attributes -// - Authorizations -// - Reversed -// - CacheBlocks -type TScan struct { - StartRow []byte `thrift:"startRow,1" json:"startRow,omitempty"` - StopRow []byte `thrift:"stopRow,2" json:"stopRow,omitempty"` - Columns []*TColumn `thrift:"columns,3" json:"columns,omitempty"` - Caching *int32 `thrift:"caching,4" json:"caching,omitempty"` - MaxVersions int32 `thrift:"maxVersions,5" json:"maxVersions,omitempty"` - TimeRange *TTimeRange `thrift:"timeRange,6" json:"timeRange,omitempty"` - FilterString []byte `thrift:"filterString,7" json:"filterString,omitempty"` - BatchSize *int32 `thrift:"batchSize,8" json:"batchSize,omitempty"` - Attributes map[string][]byte `thrift:"attributes,9" json:"attributes,omitempty"` - Authorizations *TAuthorization `thrift:"authorizations,10" json:"authorizations,omitempty"` - Reversed *bool `thrift:"reversed,11" json:"reversed,omitempty"` - CacheBlocks *bool `thrift:"cacheBlocks,12" json:"cacheBlocks,omitempty"` -} - -func NewTScan() *TScan { - return &TScan{ - MaxVersions: 1, - } -} - -var TScan_StartRow_DEFAULT []byte - -func (p *TScan) GetStartRow() []byte { - return p.StartRow -} - -var TScan_StopRow_DEFAULT []byte - -func (p *TScan) GetStopRow() []byte { - return p.StopRow -} - -var TScan_Columns_DEFAULT []*TColumn - -func (p *TScan) GetColumns() []*TColumn { - return p.Columns -} - -var TScan_Caching_DEFAULT int32 - -func (p *TScan) GetCaching() int32 { - if !p.IsSetCaching() { - return TScan_Caching_DEFAULT - } - return *p.Caching -} - -var TScan_MaxVersions_DEFAULT int32 = 1 - -func (p *TScan) GetMaxVersions() int32 { - return p.MaxVersions -} - -var TScan_TimeRange_DEFAULT *TTimeRange - -func (p *TScan) GetTimeRange() *TTimeRange { - if !p.IsSetTimeRange() { - return TScan_TimeRange_DEFAULT - } - return p.TimeRange -} - -var TScan_FilterString_DEFAULT []byte - -func (p *TScan) GetFilterString() []byte { - return p.FilterString -} - -var TScan_BatchSize_DEFAULT int32 - -func (p *TScan) GetBatchSize() int32 { - if !p.IsSetBatchSize() { - return TScan_BatchSize_DEFAULT - } - return *p.BatchSize -} - -var TScan_Attributes_DEFAULT map[string][]byte - -func (p *TScan) GetAttributes() map[string][]byte { - return p.Attributes -} - -var TScan_Authorizations_DEFAULT *TAuthorization - -func (p *TScan) GetAuthorizations() *TAuthorization { - if !p.IsSetAuthorizations() { - return TScan_Authorizations_DEFAULT - } - return p.Authorizations -} - -var TScan_Reversed_DEFAULT bool - -func (p *TScan) GetReversed() bool { - if !p.IsSetReversed() { - return TScan_Reversed_DEFAULT - } - return *p.Reversed -} - -var TScan_CacheBlocks_DEFAULT bool - -func (p *TScan) GetCacheBlocks() bool { - if !p.IsSetCacheBlocks() { - return TScan_CacheBlocks_DEFAULT - } - return *p.CacheBlocks -} -func (p *TScan) IsSetStartRow() bool { - return p.StartRow != nil -} - -func (p *TScan) IsSetStopRow() bool { - return p.StopRow != nil -} - -func (p *TScan) IsSetColumns() bool { - return p.Columns != nil -} - -func (p *TScan) IsSetCaching() bool { - return p.Caching != nil -} - -func (p *TScan) IsSetMaxVersions() bool { - return p.MaxVersions != TScan_MaxVersions_DEFAULT -} - -func (p *TScan) IsSetTimeRange() bool { - return p.TimeRange != nil -} - -func (p *TScan) IsSetFilterString() bool { - return p.FilterString != nil -} - -func (p *TScan) IsSetBatchSize() bool { - return p.BatchSize != nil -} - -func (p *TScan) IsSetAttributes() bool { - return p.Attributes != nil -} - -func (p *TScan) IsSetAuthorizations() bool { - return p.Authorizations != nil -} - -func (p *TScan) IsSetReversed() bool { - return p.Reversed != nil -} - -func (p *TScan) IsSetCacheBlocks() bool { - return p.CacheBlocks != nil -} - -func (p *TScan) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - case 7: - if err := p.readField7(iprot); err != nil { - return err - } - case 8: - if err := p.readField8(iprot); err != nil { - return err - } - case 9: - if err := p.readField9(iprot); err != nil { - return err - } - case 10: - if err := p.readField10(iprot); err != nil { - return err - } - case 11: - if err := p.readField11(iprot); err != nil { - return err - } - case 12: - if err := p.readField12(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TScan) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.StartRow = v - } - return nil -} - -func (p *TScan) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.StopRow = v - } - return nil -} - -func (p *TScan) readField3(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TColumn, 0, size) - p.Columns = tSlice - for i := 0; i < size; i++ { - _elem17 := &TColumn{} - if err := _elem17.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem17), err) - } - p.Columns = append(p.Columns, _elem17) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TScan) readField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 4: ", err) - } else { - p.Caching = &v - } - return nil -} - -func (p *TScan) readField5(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 5: ", err) - } else { - p.MaxVersions = v - } - return nil -} - -func (p *TScan) readField6(iprot thrift.TProtocol) error { - p.TimeRange = &TTimeRange{} - if err := p.TimeRange.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TimeRange), err) - } - return nil -} - -func (p *TScan) readField7(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 7: ", err) - } else { - p.FilterString = v - } - return nil -} - -func (p *TScan) readField8(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 8: ", err) - } else { - p.BatchSize = &v - } - return nil -} - -func (p *TScan) readField9(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string][]byte, size) - p.Attributes = tMap - for i := 0; i < size; i++ { - var _key18 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key18 = v - } - var _val19 []byte - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val19 = v - } - p.Attributes[_key18] = _val19 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TScan) readField10(iprot thrift.TProtocol) error { - p.Authorizations = &TAuthorization{} - if err := p.Authorizations.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Authorizations), err) - } - return nil -} - -func (p *TScan) readField11(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(); err != nil { - return thrift.PrependError("error reading field 11: ", err) - } else { - p.Reversed = &v - } - return nil -} - -func (p *TScan) readField12(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(); err != nil { - return thrift.PrependError("error reading field 12: ", err) - } else { - p.CacheBlocks = &v - } - return nil -} - -func (p *TScan) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TScan"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := p.writeField7(oprot); err != nil { - return err - } - if err := p.writeField8(oprot); err != nil { - return err - } - if err := p.writeField9(oprot); err != nil { - return err - } - if err := p.writeField10(oprot); err != nil { - return err - } - if err := p.writeField11(oprot); err != nil { - return err - } - if err := p.writeField12(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TScan) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetStartRow() { - if err := oprot.WriteFieldBegin("startRow", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:startRow: ", p), err) - } - if err := oprot.WriteBinary(p.StartRow); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.startRow (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:startRow: ", p), err) - } - } - return err -} - -func (p *TScan) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetStopRow() { - if err := oprot.WriteFieldBegin("stopRow", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:stopRow: ", p), err) - } - if err := oprot.WriteBinary(p.StopRow); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.stopRow (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:stopRow: ", p), err) - } - } - return err -} - -func (p *TScan) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetColumns() { - if err := oprot.WriteFieldBegin("columns", thrift.LIST, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:columns: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Columns)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Columns { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:columns: ", p), err) - } - } - return err -} - -func (p *TScan) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetCaching() { - if err := oprot.WriteFieldBegin("caching", thrift.I32, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:caching: ", p), err) - } - if err := oprot.WriteI32(int32(*p.Caching)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.caching (4) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:caching: ", p), err) - } - } - return err -} - -func (p *TScan) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetMaxVersions() { - if err := oprot.WriteFieldBegin("maxVersions", thrift.I32, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:maxVersions: ", p), err) - } - if err := oprot.WriteI32(int32(p.MaxVersions)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.maxVersions (5) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:maxVersions: ", p), err) - } - } - return err -} - -func (p *TScan) writeField6(oprot thrift.TProtocol) (err error) { - if p.IsSetTimeRange() { - if err := oprot.WriteFieldBegin("timeRange", thrift.STRUCT, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:timeRange: ", p), err) - } - if err := p.TimeRange.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TimeRange), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:timeRange: ", p), err) - } - } - return err -} - -func (p *TScan) writeField7(oprot thrift.TProtocol) (err error) { - if p.IsSetFilterString() { - if err := oprot.WriteFieldBegin("filterString", thrift.STRING, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:filterString: ", p), err) - } - if err := oprot.WriteBinary(p.FilterString); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.filterString (7) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:filterString: ", p), err) - } - } - return err -} - -func (p *TScan) writeField8(oprot thrift.TProtocol) (err error) { - if p.IsSetBatchSize() { - if err := oprot.WriteFieldBegin("batchSize", thrift.I32, 8); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:batchSize: ", p), err) - } - if err := oprot.WriteI32(int32(*p.BatchSize)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.batchSize (8) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 8:batchSize: ", p), err) - } - } - return err -} - -func (p *TScan) writeField9(oprot thrift.TProtocol) (err error) { - if p.IsSetAttributes() { - if err := oprot.WriteFieldBegin("attributes", thrift.MAP, 9); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:attributes: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.Attributes)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.Attributes { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteBinary(v); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 9:attributes: ", p), err) - } - } - return err -} - -func (p *TScan) writeField10(oprot thrift.TProtocol) (err error) { - if p.IsSetAuthorizations() { - if err := oprot.WriteFieldBegin("authorizations", thrift.STRUCT, 10); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:authorizations: ", p), err) - } - if err := p.Authorizations.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Authorizations), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 10:authorizations: ", p), err) - } - } - return err -} - -func (p *TScan) writeField11(oprot thrift.TProtocol) (err error) { - if p.IsSetReversed() { - if err := oprot.WriteFieldBegin("reversed", thrift.BOOL, 11); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:reversed: ", p), err) - } - if err := oprot.WriteBool(bool(*p.Reversed)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.reversed (11) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 11:reversed: ", p), err) - } - } - return err -} - -func (p *TScan) writeField12(oprot thrift.TProtocol) (err error) { - if p.IsSetCacheBlocks() { - if err := oprot.WriteFieldBegin("cacheBlocks", thrift.BOOL, 12); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 12:cacheBlocks: ", p), err) - } - if err := oprot.WriteBool(bool(*p.CacheBlocks)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.cacheBlocks (12) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 12:cacheBlocks: ", p), err) - } - } - return err -} - -func (p *TScan) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TScan(%+v)", *p) -} - -// Atomic mutation for the specified row. It can be either Put or Delete. -// -// Attributes: -// - Put -// - DeleteSingle -type TMutation struct { - Put *TPut `thrift:"put,1" json:"put,omitempty"` - DeleteSingle *TDelete `thrift:"deleteSingle,2" json:"deleteSingle,omitempty"` -} - -func NewTMutation() *TMutation { - return &TMutation{} -} - -var TMutation_Put_DEFAULT *TPut - -func (p *TMutation) GetPut() *TPut { - if !p.IsSetPut() { - return TMutation_Put_DEFAULT - } - return p.Put -} - -var TMutation_DeleteSingle_DEFAULT *TDelete - -func (p *TMutation) GetDeleteSingle() *TDelete { - if !p.IsSetDeleteSingle() { - return TMutation_DeleteSingle_DEFAULT - } - return p.DeleteSingle -} -func (p *TMutation) CountSetFieldsTMutation() int { - count := 0 - if p.IsSetPut() { - count++ - } - if p.IsSetDeleteSingle() { - count++ - } - return count - -} - -func (p *TMutation) IsSetPut() bool { - return p.Put != nil -} - -func (p *TMutation) IsSetDeleteSingle() bool { - return p.DeleteSingle != nil -} - -func (p *TMutation) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TMutation) readField1(iprot thrift.TProtocol) error { - p.Put = &TPut{} - if err := p.Put.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Put), err) - } - return nil -} - -func (p *TMutation) readField2(iprot thrift.TProtocol) error { - p.DeleteSingle = &TDelete{ - DeleteType: 1, - } - if err := p.DeleteSingle.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.DeleteSingle), err) - } - return nil -} - -func (p *TMutation) Write(oprot thrift.TProtocol) error { - if c := p.CountSetFieldsTMutation(); c != 1 { - return fmt.Errorf("%T write union: exactly one field must be set (%d set).", p, c) - } - if err := oprot.WriteStructBegin("TMutation"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TMutation) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetPut() { - if err := oprot.WriteFieldBegin("put", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:put: ", p), err) - } - if err := p.Put.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Put), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:put: ", p), err) - } - } - return err -} - -func (p *TMutation) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetDeleteSingle() { - if err := oprot.WriteFieldBegin("deleteSingle", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:deleteSingle: ", p), err) - } - if err := p.DeleteSingle.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.DeleteSingle), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:deleteSingle: ", p), err) - } - } - return err -} - -func (p *TMutation) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TMutation(%+v)", *p) -} - -// A TRowMutations object is used to apply a number of Mutations to a single row. -// -// Attributes: -// - Row -// - Mutations -type TRowMutations struct { - Row []byte `thrift:"row,1,required" json:"row"` - Mutations []*TMutation `thrift:"mutations,2,required" json:"mutations"` -} - -func NewTRowMutations() *TRowMutations { - return &TRowMutations{} -} - -func (p *TRowMutations) GetRow() []byte { - return p.Row -} - -func (p *TRowMutations) GetMutations() []*TMutation { - return p.Mutations -} -func (p *TRowMutations) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetRow bool = false - var issetMutations bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetRow = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetMutations = true - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetRow { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Row is not set")) - } - if !issetMutations { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Mutations is not set")) - } - return nil -} - -func (p *TRowMutations) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Row = v - } - return nil -} - -func (p *TRowMutations) readField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TMutation, 0, size) - p.Mutations = tSlice - for i := 0; i < size; i++ { - _elem20 := &TMutation{} - if err := _elem20.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem20), err) - } - p.Mutations = append(p.Mutations, _elem20) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TRowMutations) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TRowMutations"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TRowMutations) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("row", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:row: ", p), err) - } - if err := oprot.WriteBinary(p.Row); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.row (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:row: ", p), err) - } - return err -} - -func (p *TRowMutations) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("mutations", thrift.LIST, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:mutations: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Mutations)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Mutations { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:mutations: ", p), err) - } - return err -} - -func (p *TRowMutations) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TRowMutations(%+v)", *p) -} - -// Attributes: -// - RegionId -// - TableName -// - StartKey -// - EndKey -// - Offline -// - Split -// - ReplicaId -type THRegionInfo struct { - RegionId int64 `thrift:"regionId,1,required" json:"regionId"` - TableName []byte `thrift:"tableName,2,required" json:"tableName"` - StartKey []byte `thrift:"startKey,3" json:"startKey,omitempty"` - EndKey []byte `thrift:"endKey,4" json:"endKey,omitempty"` - Offline *bool `thrift:"offline,5" json:"offline,omitempty"` - Split *bool `thrift:"split,6" json:"split,omitempty"` - ReplicaId *int32 `thrift:"replicaId,7" json:"replicaId,omitempty"` -} - -func NewTHRegionInfo() *THRegionInfo { - return &THRegionInfo{} -} - -func (p *THRegionInfo) GetRegionId() int64 { - return p.RegionId -} - -func (p *THRegionInfo) GetTableName() []byte { - return p.TableName -} - -var THRegionInfo_StartKey_DEFAULT []byte - -func (p *THRegionInfo) GetStartKey() []byte { - return p.StartKey -} - -var THRegionInfo_EndKey_DEFAULT []byte - -func (p *THRegionInfo) GetEndKey() []byte { - return p.EndKey -} - -var THRegionInfo_Offline_DEFAULT bool - -func (p *THRegionInfo) GetOffline() bool { - if !p.IsSetOffline() { - return THRegionInfo_Offline_DEFAULT - } - return *p.Offline -} - -var THRegionInfo_Split_DEFAULT bool - -func (p *THRegionInfo) GetSplit() bool { - if !p.IsSetSplit() { - return THRegionInfo_Split_DEFAULT - } - return *p.Split -} - -var THRegionInfo_ReplicaId_DEFAULT int32 - -func (p *THRegionInfo) GetReplicaId() int32 { - if !p.IsSetReplicaId() { - return THRegionInfo_ReplicaId_DEFAULT - } - return *p.ReplicaId -} -func (p *THRegionInfo) IsSetStartKey() bool { - return p.StartKey != nil -} - -func (p *THRegionInfo) IsSetEndKey() bool { - return p.EndKey != nil -} - -func (p *THRegionInfo) IsSetOffline() bool { - return p.Offline != nil -} - -func (p *THRegionInfo) IsSetSplit() bool { - return p.Split != nil -} - -func (p *THRegionInfo) IsSetReplicaId() bool { - return p.ReplicaId != nil -} - -func (p *THRegionInfo) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetRegionId bool = false - var issetTableName bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetRegionId = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetTableName = true - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - case 7: - if err := p.readField7(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetRegionId { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field RegionId is not set")) - } - if !issetTableName { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field TableName is not set")) - } - return nil -} - -func (p *THRegionInfo) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.RegionId = v - } - return nil -} - -func (p *THRegionInfo) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.TableName = v - } - return nil -} - -func (p *THRegionInfo) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.StartKey = v - } - return nil -} - -func (p *THRegionInfo) readField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 4: ", err) - } else { - p.EndKey = v - } - return nil -} - -func (p *THRegionInfo) readField5(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(); err != nil { - return thrift.PrependError("error reading field 5: ", err) - } else { - p.Offline = &v - } - return nil -} - -func (p *THRegionInfo) readField6(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBool(); err != nil { - return thrift.PrependError("error reading field 6: ", err) - } else { - p.Split = &v - } - return nil -} - -func (p *THRegionInfo) readField7(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 7: ", err) - } else { - p.ReplicaId = &v - } - return nil -} - -func (p *THRegionInfo) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("THRegionInfo"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := p.writeField7(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THRegionInfo) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("regionId", thrift.I64, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:regionId: ", p), err) - } - if err := oprot.WriteI64(int64(p.RegionId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.regionId (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:regionId: ", p), err) - } - return err -} - -func (p *THRegionInfo) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tableName", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tableName: ", p), err) - } - if err := oprot.WriteBinary(p.TableName); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.tableName (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tableName: ", p), err) - } - return err -} - -func (p *THRegionInfo) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetStartKey() { - if err := oprot.WriteFieldBegin("startKey", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:startKey: ", p), err) - } - if err := oprot.WriteBinary(p.StartKey); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.startKey (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:startKey: ", p), err) - } - } - return err -} - -func (p *THRegionInfo) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetEndKey() { - if err := oprot.WriteFieldBegin("endKey", thrift.STRING, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:endKey: ", p), err) - } - if err := oprot.WriteBinary(p.EndKey); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.endKey (4) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:endKey: ", p), err) - } - } - return err -} - -func (p *THRegionInfo) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetOffline() { - if err := oprot.WriteFieldBegin("offline", thrift.BOOL, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:offline: ", p), err) - } - if err := oprot.WriteBool(bool(*p.Offline)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.offline (5) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:offline: ", p), err) - } - } - return err -} - -func (p *THRegionInfo) writeField6(oprot thrift.TProtocol) (err error) { - if p.IsSetSplit() { - if err := oprot.WriteFieldBegin("split", thrift.BOOL, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:split: ", p), err) - } - if err := oprot.WriteBool(bool(*p.Split)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.split (6) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:split: ", p), err) - } - } - return err -} - -func (p *THRegionInfo) writeField7(oprot thrift.TProtocol) (err error) { - if p.IsSetReplicaId() { - if err := oprot.WriteFieldBegin("replicaId", thrift.I32, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:replicaId: ", p), err) - } - if err := oprot.WriteI32(int32(*p.ReplicaId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.replicaId (7) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:replicaId: ", p), err) - } - } - return err -} - -func (p *THRegionInfo) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THRegionInfo(%+v)", *p) -} - -// Attributes: -// - HostName -// - Port -// - StartCode -type TServerName struct { - HostName string `thrift:"hostName,1,required" json:"hostName"` - Port *int32 `thrift:"port,2" json:"port,omitempty"` - StartCode *int64 `thrift:"startCode,3" json:"startCode,omitempty"` -} - -func NewTServerName() *TServerName { - return &TServerName{} -} - -func (p *TServerName) GetHostName() string { - return p.HostName -} - -var TServerName_Port_DEFAULT int32 - -func (p *TServerName) GetPort() int32 { - if !p.IsSetPort() { - return TServerName_Port_DEFAULT - } - return *p.Port -} - -var TServerName_StartCode_DEFAULT int64 - -func (p *TServerName) GetStartCode() int64 { - if !p.IsSetStartCode() { - return TServerName_StartCode_DEFAULT - } - return *p.StartCode -} -func (p *TServerName) IsSetPort() bool { - return p.Port != nil -} - -func (p *TServerName) IsSetStartCode() bool { - return p.StartCode != nil -} - -func (p *TServerName) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetHostName bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetHostName = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetHostName { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field HostName is not set")) - } - return nil -} - -func (p *TServerName) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.HostName = v - } - return nil -} - -func (p *TServerName) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Port = &v - } - return nil -} - -func (p *TServerName) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI64(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.StartCode = &v - } - return nil -} - -func (p *TServerName) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TServerName"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TServerName) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("hostName", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:hostName: ", p), err) - } - if err := oprot.WriteString(string(p.HostName)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.hostName (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:hostName: ", p), err) - } - return err -} - -func (p *TServerName) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetPort() { - if err := oprot.WriteFieldBegin("port", thrift.I32, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:port: ", p), err) - } - if err := oprot.WriteI32(int32(*p.Port)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.port (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:port: ", p), err) - } - } - return err -} - -func (p *TServerName) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetStartCode() { - if err := oprot.WriteFieldBegin("startCode", thrift.I64, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:startCode: ", p), err) - } - if err := oprot.WriteI64(int64(*p.StartCode)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.startCode (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:startCode: ", p), err) - } - } - return err -} - -func (p *TServerName) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TServerName(%+v)", *p) -} - -// Attributes: -// - ServerName -// - RegionInfo -type THRegionLocation struct { - ServerName *TServerName `thrift:"serverName,1,required" json:"serverName"` - RegionInfo *THRegionInfo `thrift:"regionInfo,2,required" json:"regionInfo"` -} - -func NewTHRegionLocation() *THRegionLocation { - return &THRegionLocation{} -} - -var THRegionLocation_ServerName_DEFAULT *TServerName - -func (p *THRegionLocation) GetServerName() *TServerName { - if !p.IsSetServerName() { - return THRegionLocation_ServerName_DEFAULT - } - return p.ServerName -} - -var THRegionLocation_RegionInfo_DEFAULT *THRegionInfo - -func (p *THRegionLocation) GetRegionInfo() *THRegionInfo { - if !p.IsSetRegionInfo() { - return THRegionLocation_RegionInfo_DEFAULT - } - return p.RegionInfo -} -func (p *THRegionLocation) IsSetServerName() bool { - return p.ServerName != nil -} - -func (p *THRegionLocation) IsSetRegionInfo() bool { - return p.RegionInfo != nil -} - -func (p *THRegionLocation) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetServerName bool = false - var issetRegionInfo bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetServerName = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetRegionInfo = true - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetServerName { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ServerName is not set")) - } - if !issetRegionInfo { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field RegionInfo is not set")) - } - return nil -} - -func (p *THRegionLocation) readField1(iprot thrift.TProtocol) error { - p.ServerName = &TServerName{} - if err := p.ServerName.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ServerName), err) - } - return nil -} - -func (p *THRegionLocation) readField2(iprot thrift.TProtocol) error { - p.RegionInfo = &THRegionInfo{} - if err := p.RegionInfo.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.RegionInfo), err) - } - return nil -} - -func (p *THRegionLocation) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("THRegionLocation"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *THRegionLocation) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("serverName", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:serverName: ", p), err) - } - if err := p.ServerName.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ServerName), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:serverName: ", p), err) - } - return err -} - -func (p *THRegionLocation) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("regionInfo", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:regionInfo: ", p), err) - } - if err := p.RegionInfo.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.RegionInfo), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:regionInfo: ", p), err) - } - return err -} - -func (p *THRegionLocation) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("THRegionLocation(%+v)", *p) -} - -// A TIOError exception signals that an error occurred communicating -// to the HBase master or a HBase region server. Also used to return -// more general HBase error conditions. -// -// Attributes: -// - Message -type TIOError struct { - Message *string `thrift:"message,1" json:"message,omitempty"` -} - -func NewTIOError() *TIOError { - return &TIOError{} -} - -var TIOError_Message_DEFAULT string - -func (p *TIOError) GetMessage() string { - if !p.IsSetMessage() { - return TIOError_Message_DEFAULT - } - return *p.Message -} -func (p *TIOError) IsSetMessage() bool { - return p.Message != nil -} - -func (p *TIOError) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TIOError) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Message = &v - } - return nil -} - -func (p *TIOError) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TIOError"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TIOError) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetMessage() { - if err := oprot.WriteFieldBegin("message", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:message: ", p), err) - } - if err := oprot.WriteString(string(*p.Message)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.message (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:message: ", p), err) - } - } - return err -} - -func (p *TIOError) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TIOError(%+v)", *p) -} - -func (p *TIOError) Error() string { - return p.String() -} - -// A TIllegalArgument exception indicates an illegal or invalid -// argument was passed into a procedure. -// -// Attributes: -// - Message -type TIllegalArgument struct { - Message *string `thrift:"message,1" json:"message,omitempty"` -} - -func NewTIllegalArgument() *TIllegalArgument { - return &TIllegalArgument{} -} - -var TIllegalArgument_Message_DEFAULT string - -func (p *TIllegalArgument) GetMessage() string { - if !p.IsSetMessage() { - return TIllegalArgument_Message_DEFAULT - } - return *p.Message -} -func (p *TIllegalArgument) IsSetMessage() bool { - return p.Message != nil -} - -func (p *TIllegalArgument) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TIllegalArgument) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Message = &v - } - return nil -} - -func (p *TIllegalArgument) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TIllegalArgument"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TIllegalArgument) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetMessage() { - if err := oprot.WriteFieldBegin("message", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:message: ", p), err) - } - if err := oprot.WriteString(string(*p.Message)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.message (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:message: ", p), err) - } - } - return err -} - -func (p *TIllegalArgument) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TIllegalArgument(%+v)", *p) -} - -func (p *TIllegalArgument) Error() string { - return p.String() -} diff --git a/tim.protocol/itim.go b/tim.protocol/itim.go deleted file mode 100644 index f7e4c8a..0000000 --- a/tim.protocol/itim.go +++ /dev/null @@ -1,5753 +0,0 @@ -// Autogenerated by Thrift Compiler (0.9.3) -// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - -package protocol - -import ( - "bytes" - "fmt" - "git.apache.org/thrift.git/lib/go/thrift" -) - -// (needed to ensure safety because of naive import list construction.) -var _ = thrift.ZERO -var _ = fmt.Printf -var _ = bytes.Equal - -type ITim interface { - // 流程开始 - // - // Parameters: - // - Param - TimStream(param *TimParam) (err error) - // tls协议 - TimStarttls() (err error) - // 登陆协议 - // - // Parameters: - // - Tid - // - Pwd - TimLogin(tid *Tid, pwd string) (err error) - // 回执信息 - // - // Parameters: - // - Ab - TimAck(ab *TimAckBean) (err error) - // 广播出席协议或接收广播协议 - // - // Parameters: - // - Pbean - TimPresence(pbean *TimPBean) (err error) - // 发送信息或接收信息 - // - // Parameters: - // - Mbean - TimMessage(mbean *TimMBean) (err error) - // ping 心跳协议 - // - // Parameters: - // - ThreadId - TimPing(threadId string) (err error) - // 错误通知 - // - // Parameters: - // - E - TimError(e *TimError) (err error) - // 登出协议 - TimLogout() (err error) - // 注册协议 - // - // Parameters: - // - Tid - // - Auth - TimRegist(tid *Tid, auth string) (err error) - // 花名册 - // - // Parameters: - // - Roster - TimRoser(roster *TimRoster) (err error) - // 发送信息或接收信息列表(合流) - // - // Parameters: - // - MbeanList - TimMessageList(mbeanList *TimMBeanList) (err error) - // 发送状态信息列表(合流) - // - // Parameters: - // - PbeanList - TimPresenceList(pbeanList *TimPBeanList) (err error) - // 信息请求 get请求数据 del删除 - // - // Parameters: - // - TimMsgIq - // - IqType - TimMessageIq(timMsgIq *TimMessageIq, iqType string) (err error) - // 信息请求 - // - // Parameters: - // - Mbean - TimMessageResult_(mbean *TimMBean) (err error) - // 用户协议属性请求 - // - // Parameters: - // - Tpb - TimProperty(tpb *TimPropertyBean) (err error) - // 请求远程验证信息 - // - // Parameters: - // - Tid - // - Pwd - // - Auth - TimRemoteUserAuth(tid *Tid, pwd string, auth *TimAuth) (r *TimRemoteUserBean, err error) - // 请求远程用户信息 - // - // Parameters: - // - Tid - // - Auth - TimRemoteUserGet(tid *Tid, auth *TimAuth) (r *TimRemoteUserBean, err error) - // 编辑远程用户信息 - // - // Parameters: - // - Tid - // - Ub - // - Auth - TimRemoteUserEdit(tid *Tid, ub *TimUserBean, auth *TimAuth) (r *TimRemoteUserBean, err error) - // 广播出席协议或接收广播协议 - // - // Parameters: - // - Pbean - // - Auth - TimResponsePresence(pbean *TimPBean, auth *TimAuth) (r *TimResponseBean, err error) - // 发送信息或接收信息 - // - // Parameters: - // - Mbean - // - Auth - TimResponseMessage(mbean *TimMBean, auth *TimAuth) (r *TimResponseBean, err error) - // 信息请求 get请求数据 del删除(辅助接口) - // - // Parameters: - // - TimMsgIq - // - IqType - // - Auth - TimResponseMessageIq(timMsgIq *TimMessageIq, iqType string, auth *TimAuth) (r *TimMBeanList, err error) - // 广播出席协议或接收广播协议 - // - // Parameters: - // - PbeanList - // - Auth - TimResponsePresenceList(pbeanList *TimPBeanList, auth *TimAuth) (r *TimResponseBean, err error) - // 发送信息或接收信息 - // - // Parameters: - // - MbeanList - // - Auth - TimResponseMessageList(mbeanList *TimMBeanList, auth *TimAuth) (r *TimResponseBean, err error) -} - -type ITimClient struct { - Transport thrift.TTransport - ProtocolFactory thrift.TProtocolFactory - InputProtocol thrift.TProtocol - OutputProtocol thrift.TProtocol - SeqId int32 -} - -func NewITimClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *ITimClient { - return &ITimClient{Transport: t, - ProtocolFactory: f, - InputProtocol: f.GetProtocol(t), - OutputProtocol: f.GetProtocol(t), - SeqId: 0, - } -} - -func NewITimClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *ITimClient { - return &ITimClient{Transport: t, - ProtocolFactory: nil, - InputProtocol: iprot, - OutputProtocol: oprot, - SeqId: 0, - } -} - -// 流程开始 -// -// Parameters: -// - Param -func (p *ITimClient) TimStream(param *TimParam) (err error) { - if err = p.sendTimStream(param); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimStream(param *TimParam) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timStream", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimStreamArgs{ - Param: param, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// tls协议 -func (p *ITimClient) TimStarttls() (err error) { - if err = p.sendTimStarttls(); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimStarttls() (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timStarttls", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimStarttlsArgs{} - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 登陆协议 -// -// Parameters: -// - Tid -// - Pwd -func (p *ITimClient) TimLogin(tid *Tid, pwd string) (err error) { - if err = p.sendTimLogin(tid, pwd); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimLogin(tid *Tid, pwd string) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timLogin", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimLoginArgs{ - Tid: tid, - Pwd: pwd, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 回执信息 -// -// Parameters: -// - Ab -func (p *ITimClient) TimAck(ab *TimAckBean) (err error) { - if err = p.sendTimAck(ab); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimAck(ab *TimAckBean) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timAck", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimAckArgs{ - Ab: ab, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 广播出席协议或接收广播协议 -// -// Parameters: -// - Pbean -func (p *ITimClient) TimPresence(pbean *TimPBean) (err error) { - if err = p.sendTimPresence(pbean); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimPresence(pbean *TimPBean) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timPresence", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimPresenceArgs{ - Pbean: pbean, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 发送信息或接收信息 -// -// Parameters: -// - Mbean -func (p *ITimClient) TimMessage(mbean *TimMBean) (err error) { - if err = p.sendTimMessage(mbean); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimMessage(mbean *TimMBean) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timMessage", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimMessageArgs{ - Mbean: mbean, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// ping 心跳协议 -// -// Parameters: -// - ThreadId -func (p *ITimClient) TimPing(threadId string) (err error) { - if err = p.sendTimPing(threadId); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimPing(threadId string) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timPing", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimPingArgs{ - ThreadId: threadId, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 错误通知 -// -// Parameters: -// - E -func (p *ITimClient) TimError(e *TimError) (err error) { - if err = p.sendTimError(e); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimError(e *TimError) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timError", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimErrorArgs{ - E: e, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 登出协议 -func (p *ITimClient) TimLogout() (err error) { - if err = p.sendTimLogout(); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimLogout() (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timLogout", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimLogoutArgs{} - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 注册协议 -// -// Parameters: -// - Tid -// - Auth -func (p *ITimClient) TimRegist(tid *Tid, auth string) (err error) { - if err = p.sendTimRegist(tid, auth); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimRegist(tid *Tid, auth string) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timRegist", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimRegistArgs{ - Tid: tid, - Auth: auth, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 花名册 -// -// Parameters: -// - Roster -func (p *ITimClient) TimRoser(roster *TimRoster) (err error) { - if err = p.sendTimRoser(roster); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimRoser(roster *TimRoster) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timRoser", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimRoserArgs{ - Roster: roster, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 发送信息或接收信息列表(合流) -// -// Parameters: -// - MbeanList -func (p *ITimClient) TimMessageList(mbeanList *TimMBeanList) (err error) { - if err = p.sendTimMessageList(mbeanList); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimMessageList(mbeanList *TimMBeanList) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timMessageList", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimMessageListArgs{ - MbeanList: mbeanList, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 发送状态信息列表(合流) -// -// Parameters: -// - PbeanList -func (p *ITimClient) TimPresenceList(pbeanList *TimPBeanList) (err error) { - if err = p.sendTimPresenceList(pbeanList); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimPresenceList(pbeanList *TimPBeanList) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timPresenceList", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimPresenceListArgs{ - PbeanList: pbeanList, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 信息请求 get请求数据 del删除 -// -// Parameters: -// - TimMsgIq -// - IqType -func (p *ITimClient) TimMessageIq(timMsgIq *TimMessageIq, iqType string) (err error) { - if err = p.sendTimMessageIq(timMsgIq, iqType); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimMessageIq(timMsgIq *TimMessageIq, iqType string) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timMessageIq", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimMessageIqArgs{ - TimMsgIq: timMsgIq, - IqType: iqType, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 信息请求 -// -// Parameters: -// - Mbean -func (p *ITimClient) TimMessageResult_(mbean *TimMBean) (err error) { - if err = p.sendTimMessageResult_(mbean); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimMessageResult_(mbean *TimMBean) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timMessageResult", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimMessageResultArgs{ - Mbean: mbean, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 用户协议属性请求 -// -// Parameters: -// - Tpb -func (p *ITimClient) TimProperty(tpb *TimPropertyBean) (err error) { - if err = p.sendTimProperty(tpb); err != nil { - return - } - return -} - -func (p *ITimClient) sendTimProperty(tpb *TimPropertyBean) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timProperty", thrift.ONEWAY, p.SeqId); err != nil { - return - } - args := ITimTimPropertyArgs{ - Tpb: tpb, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -// 请求远程验证信息 -// -// Parameters: -// - Tid -// - Pwd -// - Auth -func (p *ITimClient) TimRemoteUserAuth(tid *Tid, pwd string, auth *TimAuth) (r *TimRemoteUserBean, err error) { - if err = p.sendTimRemoteUserAuth(tid, pwd, auth); err != nil { - return - } - return p.recvTimRemoteUserAuth() -} - -func (p *ITimClient) sendTimRemoteUserAuth(tid *Tid, pwd string, auth *TimAuth) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timRemoteUserAuth", thrift.CALL, p.SeqId); err != nil { - return - } - args := ITimTimRemoteUserAuthArgs{ - Tid: tid, - Pwd: pwd, - Auth: auth, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *ITimClient) recvTimRemoteUserAuth() (value *TimRemoteUserBean, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "timRemoteUserAuth" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "timRemoteUserAuth failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "timRemoteUserAuth failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error56 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error57 error - error57, err = error56.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error57 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "timRemoteUserAuth failed: invalid message type") - return - } - result := ITimTimRemoteUserAuthResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - value = result.GetSuccess() - return -} - -// 请求远程用户信息 -// -// Parameters: -// - Tid -// - Auth -func (p *ITimClient) TimRemoteUserGet(tid *Tid, auth *TimAuth) (r *TimRemoteUserBean, err error) { - if err = p.sendTimRemoteUserGet(tid, auth); err != nil { - return - } - return p.recvTimRemoteUserGet() -} - -func (p *ITimClient) sendTimRemoteUserGet(tid *Tid, auth *TimAuth) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timRemoteUserGet", thrift.CALL, p.SeqId); err != nil { - return - } - args := ITimTimRemoteUserGetArgs{ - Tid: tid, - Auth: auth, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *ITimClient) recvTimRemoteUserGet() (value *TimRemoteUserBean, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "timRemoteUserGet" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "timRemoteUserGet failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "timRemoteUserGet failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error58 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error59 error - error59, err = error58.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error59 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "timRemoteUserGet failed: invalid message type") - return - } - result := ITimTimRemoteUserGetResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - value = result.GetSuccess() - return -} - -// 编辑远程用户信息 -// -// Parameters: -// - Tid -// - Ub -// - Auth -func (p *ITimClient) TimRemoteUserEdit(tid *Tid, ub *TimUserBean, auth *TimAuth) (r *TimRemoteUserBean, err error) { - if err = p.sendTimRemoteUserEdit(tid, ub, auth); err != nil { - return - } - return p.recvTimRemoteUserEdit() -} - -func (p *ITimClient) sendTimRemoteUserEdit(tid *Tid, ub *TimUserBean, auth *TimAuth) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timRemoteUserEdit", thrift.CALL, p.SeqId); err != nil { - return - } - args := ITimTimRemoteUserEditArgs{ - Tid: tid, - Ub: ub, - Auth: auth, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *ITimClient) recvTimRemoteUserEdit() (value *TimRemoteUserBean, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "timRemoteUserEdit" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "timRemoteUserEdit failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "timRemoteUserEdit failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error60 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error61 error - error61, err = error60.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error61 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "timRemoteUserEdit failed: invalid message type") - return - } - result := ITimTimRemoteUserEditResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - value = result.GetSuccess() - return -} - -// 广播出席协议或接收广播协议 -// -// Parameters: -// - Pbean -// - Auth -func (p *ITimClient) TimResponsePresence(pbean *TimPBean, auth *TimAuth) (r *TimResponseBean, err error) { - if err = p.sendTimResponsePresence(pbean, auth); err != nil { - return - } - return p.recvTimResponsePresence() -} - -func (p *ITimClient) sendTimResponsePresence(pbean *TimPBean, auth *TimAuth) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timResponsePresence", thrift.CALL, p.SeqId); err != nil { - return - } - args := ITimTimResponsePresenceArgs{ - Pbean: pbean, - Auth: auth, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *ITimClient) recvTimResponsePresence() (value *TimResponseBean, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "timResponsePresence" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "timResponsePresence failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "timResponsePresence failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error62 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error63 error - error63, err = error62.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error63 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "timResponsePresence failed: invalid message type") - return - } - result := ITimTimResponsePresenceResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - value = result.GetSuccess() - return -} - -// 发送信息或接收信息 -// -// Parameters: -// - Mbean -// - Auth -func (p *ITimClient) TimResponseMessage(mbean *TimMBean, auth *TimAuth) (r *TimResponseBean, err error) { - if err = p.sendTimResponseMessage(mbean, auth); err != nil { - return - } - return p.recvTimResponseMessage() -} - -func (p *ITimClient) sendTimResponseMessage(mbean *TimMBean, auth *TimAuth) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timResponseMessage", thrift.CALL, p.SeqId); err != nil { - return - } - args := ITimTimResponseMessageArgs{ - Mbean: mbean, - Auth: auth, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *ITimClient) recvTimResponseMessage() (value *TimResponseBean, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "timResponseMessage" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "timResponseMessage failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "timResponseMessage failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error64 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error65 error - error65, err = error64.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error65 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "timResponseMessage failed: invalid message type") - return - } - result := ITimTimResponseMessageResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - value = result.GetSuccess() - return -} - -// 信息请求 get请求数据 del删除(辅助接口) -// -// Parameters: -// - TimMsgIq -// - IqType -// - Auth -func (p *ITimClient) TimResponseMessageIq(timMsgIq *TimMessageIq, iqType string, auth *TimAuth) (r *TimMBeanList, err error) { - if err = p.sendTimResponseMessageIq(timMsgIq, iqType, auth); err != nil { - return - } - return p.recvTimResponseMessageIq() -} - -func (p *ITimClient) sendTimResponseMessageIq(timMsgIq *TimMessageIq, iqType string, auth *TimAuth) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timResponseMessageIq", thrift.CALL, p.SeqId); err != nil { - return - } - args := ITimTimResponseMessageIqArgs{ - TimMsgIq: timMsgIq, - IqType: iqType, - Auth: auth, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *ITimClient) recvTimResponseMessageIq() (value *TimMBeanList, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "timResponseMessageIq" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "timResponseMessageIq failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "timResponseMessageIq failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error66 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error67 error - error67, err = error66.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error67 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "timResponseMessageIq failed: invalid message type") - return - } - result := ITimTimResponseMessageIqResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - value = result.GetSuccess() - return -} - -// 广播出席协议或接收广播协议 -// -// Parameters: -// - PbeanList -// - Auth -func (p *ITimClient) TimResponsePresenceList(pbeanList *TimPBeanList, auth *TimAuth) (r *TimResponseBean, err error) { - if err = p.sendTimResponsePresenceList(pbeanList, auth); err != nil { - return - } - return p.recvTimResponsePresenceList() -} - -func (p *ITimClient) sendTimResponsePresenceList(pbeanList *TimPBeanList, auth *TimAuth) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timResponsePresenceList", thrift.CALL, p.SeqId); err != nil { - return - } - args := ITimTimResponsePresenceListArgs{ - PbeanList: pbeanList, - Auth: auth, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *ITimClient) recvTimResponsePresenceList() (value *TimResponseBean, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "timResponsePresenceList" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "timResponsePresenceList failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "timResponsePresenceList failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error68 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error69 error - error69, err = error68.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error69 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "timResponsePresenceList failed: invalid message type") - return - } - result := ITimTimResponsePresenceListResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - value = result.GetSuccess() - return -} - -// 发送信息或接收信息 -// -// Parameters: -// - MbeanList -// - Auth -func (p *ITimClient) TimResponseMessageList(mbeanList *TimMBeanList, auth *TimAuth) (r *TimResponseBean, err error) { - if err = p.sendTimResponseMessageList(mbeanList, auth); err != nil { - return - } - return p.recvTimResponseMessageList() -} - -func (p *ITimClient) sendTimResponseMessageList(mbeanList *TimMBeanList, auth *TimAuth) (err error) { - oprot := p.OutputProtocol - if oprot == nil { - oprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.OutputProtocol = oprot - } - p.SeqId++ - if err = oprot.WriteMessageBegin("timResponseMessageList", thrift.CALL, p.SeqId); err != nil { - return - } - args := ITimTimResponseMessageListArgs{ - MbeanList: mbeanList, - Auth: auth, - } - if err = args.Write(oprot); err != nil { - return - } - if err = oprot.WriteMessageEnd(); err != nil { - return - } - return oprot.Flush() -} - -func (p *ITimClient) recvTimResponseMessageList() (value *TimResponseBean, err error) { - iprot := p.InputProtocol - if iprot == nil { - iprot = p.ProtocolFactory.GetProtocol(p.Transport) - p.InputProtocol = iprot - } - method, mTypeId, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return - } - if method != "timResponseMessageList" { - err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "timResponseMessageList failed: wrong method name") - return - } - if p.SeqId != seqId { - err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "timResponseMessageList failed: out of sequence response") - return - } - if mTypeId == thrift.EXCEPTION { - error70 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception") - var error71 error - error71, err = error70.Read(iprot) - if err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - err = error71 - return - } - if mTypeId != thrift.REPLY { - err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "timResponseMessageList failed: invalid message type") - return - } - result := ITimTimResponseMessageListResult{} - if err = result.Read(iprot); err != nil { - return - } - if err = iprot.ReadMessageEnd(); err != nil { - return - } - value = result.GetSuccess() - return -} - -type ITimProcessor struct { - processorMap map[string]thrift.TProcessorFunction - handler ITim -} - -func (p *ITimProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction) { - p.processorMap[key] = processor -} - -func (p *ITimProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool) { - processor, ok = p.processorMap[key] - return processor, ok -} - -func (p *ITimProcessor) ProcessorMap() map[string]thrift.TProcessorFunction { - return p.processorMap -} - -func NewITimProcessor(handler ITim) *ITimProcessor { - - self72 := &ITimProcessor{handler: handler, processorMap: make(map[string]thrift.TProcessorFunction)} - self72.processorMap["timStream"] = &iTimProcessorTimStream{handler: handler} - self72.processorMap["timStarttls"] = &iTimProcessorTimStarttls{handler: handler} - self72.processorMap["timLogin"] = &iTimProcessorTimLogin{handler: handler} - self72.processorMap["timAck"] = &iTimProcessorTimAck{handler: handler} - self72.processorMap["timPresence"] = &iTimProcessorTimPresence{handler: handler} - self72.processorMap["timMessage"] = &iTimProcessorTimMessage{handler: handler} - self72.processorMap["timPing"] = &iTimProcessorTimPing{handler: handler} - self72.processorMap["timError"] = &iTimProcessorTimError{handler: handler} - self72.processorMap["timLogout"] = &iTimProcessorTimLogout{handler: handler} - self72.processorMap["timRegist"] = &iTimProcessorTimRegist{handler: handler} - self72.processorMap["timRoser"] = &iTimProcessorTimRoser{handler: handler} - self72.processorMap["timMessageList"] = &iTimProcessorTimMessageList{handler: handler} - self72.processorMap["timPresenceList"] = &iTimProcessorTimPresenceList{handler: handler} - self72.processorMap["timMessageIq"] = &iTimProcessorTimMessageIq{handler: handler} - self72.processorMap["timMessageResult"] = &iTimProcessorTimMessageResult_{handler: handler} - self72.processorMap["timProperty"] = &iTimProcessorTimProperty{handler: handler} - self72.processorMap["timRemoteUserAuth"] = &iTimProcessorTimRemoteUserAuth{handler: handler} - self72.processorMap["timRemoteUserGet"] = &iTimProcessorTimRemoteUserGet{handler: handler} - self72.processorMap["timRemoteUserEdit"] = &iTimProcessorTimRemoteUserEdit{handler: handler} - self72.processorMap["timResponsePresence"] = &iTimProcessorTimResponsePresence{handler: handler} - self72.processorMap["timResponseMessage"] = &iTimProcessorTimResponseMessage{handler: handler} - self72.processorMap["timResponseMessageIq"] = &iTimProcessorTimResponseMessageIq{handler: handler} - self72.processorMap["timResponsePresenceList"] = &iTimProcessorTimResponsePresenceList{handler: handler} - self72.processorMap["timResponseMessageList"] = &iTimProcessorTimResponseMessageList{handler: handler} - return self72 -} - -func (p *ITimProcessor) Process(iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - name, _, seqId, err := iprot.ReadMessageBegin() - if err != nil { - return false, err - } - if processor, ok := p.GetProcessorFunction(name); ok { - return processor.Process(seqId, iprot, oprot) - } - iprot.Skip(thrift.STRUCT) - iprot.ReadMessageEnd() - x73 := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function "+name) - oprot.WriteMessageBegin(name, thrift.EXCEPTION, seqId) - x73.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, x73 - -} - -type iTimProcessorTimStream struct { - handler ITim -} - -func (p *iTimProcessorTimStream) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimStreamArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimStream(args.Param); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimStarttls struct { - handler ITim -} - -func (p *iTimProcessorTimStarttls) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimStarttlsArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimStarttls(); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimLogin struct { - handler ITim -} - -func (p *iTimProcessorTimLogin) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimLoginArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimLogin(args.Tid, args.Pwd); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimAck struct { - handler ITim -} - -func (p *iTimProcessorTimAck) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimAckArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimAck(args.Ab); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimPresence struct { - handler ITim -} - -func (p *iTimProcessorTimPresence) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimPresenceArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimPresence(args.Pbean); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimMessage struct { - handler ITim -} - -func (p *iTimProcessorTimMessage) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimMessageArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimMessage(args.Mbean); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimPing struct { - handler ITim -} - -func (p *iTimProcessorTimPing) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimPingArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimPing(args.ThreadId); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimError struct { - handler ITim -} - -func (p *iTimProcessorTimError) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimErrorArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimError(args.E); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimLogout struct { - handler ITim -} - -func (p *iTimProcessorTimLogout) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimLogoutArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimLogout(); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimRegist struct { - handler ITim -} - -func (p *iTimProcessorTimRegist) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimRegistArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimRegist(args.Tid, args.Auth); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimRoser struct { - handler ITim -} - -func (p *iTimProcessorTimRoser) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimRoserArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimRoser(args.Roster); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimMessageList struct { - handler ITim -} - -func (p *iTimProcessorTimMessageList) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimMessageListArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimMessageList(args.MbeanList); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimPresenceList struct { - handler ITim -} - -func (p *iTimProcessorTimPresenceList) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimPresenceListArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimPresenceList(args.PbeanList); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimMessageIq struct { - handler ITim -} - -func (p *iTimProcessorTimMessageIq) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimMessageIqArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimMessageIq(args.TimMsgIq, args.IqType); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimMessageResult_ struct { - handler ITim -} - -func (p *iTimProcessorTimMessageResult_) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimMessageResultArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimMessageResult_(args.Mbean); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimProperty struct { - handler ITim -} - -func (p *iTimProcessorTimProperty) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimPropertyArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - return false, err - } - - iprot.ReadMessageEnd() - var err2 error - if err2 = p.handler.TimProperty(args.Tpb); err2 != nil { - return true, err2 - } - return true, nil -} - -type iTimProcessorTimRemoteUserAuth struct { - handler ITim -} - -func (p *iTimProcessorTimRemoteUserAuth) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimRemoteUserAuthArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("timRemoteUserAuth", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := ITimTimRemoteUserAuthResult{} - var retval *TimRemoteUserBean - var err2 error - if retval, err2 = p.handler.TimRemoteUserAuth(args.Tid, args.Pwd, args.Auth); err2 != nil { - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timRemoteUserAuth: "+err2.Error()) - oprot.WriteMessageBegin("timRemoteUserAuth", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("timRemoteUserAuth", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type iTimProcessorTimRemoteUserGet struct { - handler ITim -} - -func (p *iTimProcessorTimRemoteUserGet) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimRemoteUserGetArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("timRemoteUserGet", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := ITimTimRemoteUserGetResult{} - var retval *TimRemoteUserBean - var err2 error - if retval, err2 = p.handler.TimRemoteUserGet(args.Tid, args.Auth); err2 != nil { - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timRemoteUserGet: "+err2.Error()) - oprot.WriteMessageBegin("timRemoteUserGet", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("timRemoteUserGet", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type iTimProcessorTimRemoteUserEdit struct { - handler ITim -} - -func (p *iTimProcessorTimRemoteUserEdit) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimRemoteUserEditArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("timRemoteUserEdit", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := ITimTimRemoteUserEditResult{} - var retval *TimRemoteUserBean - var err2 error - if retval, err2 = p.handler.TimRemoteUserEdit(args.Tid, args.Ub, args.Auth); err2 != nil { - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timRemoteUserEdit: "+err2.Error()) - oprot.WriteMessageBegin("timRemoteUserEdit", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("timRemoteUserEdit", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type iTimProcessorTimResponsePresence struct { - handler ITim -} - -func (p *iTimProcessorTimResponsePresence) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimResponsePresenceArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("timResponsePresence", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := ITimTimResponsePresenceResult{} - var retval *TimResponseBean - var err2 error - if retval, err2 = p.handler.TimResponsePresence(args.Pbean, args.Auth); err2 != nil { - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timResponsePresence: "+err2.Error()) - oprot.WriteMessageBegin("timResponsePresence", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("timResponsePresence", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type iTimProcessorTimResponseMessage struct { - handler ITim -} - -func (p *iTimProcessorTimResponseMessage) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimResponseMessageArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("timResponseMessage", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := ITimTimResponseMessageResult{} - var retval *TimResponseBean - var err2 error - if retval, err2 = p.handler.TimResponseMessage(args.Mbean, args.Auth); err2 != nil { - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timResponseMessage: "+err2.Error()) - oprot.WriteMessageBegin("timResponseMessage", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("timResponseMessage", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type iTimProcessorTimResponseMessageIq struct { - handler ITim -} - -func (p *iTimProcessorTimResponseMessageIq) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimResponseMessageIqArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("timResponseMessageIq", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := ITimTimResponseMessageIqResult{} - var retval *TimMBeanList - var err2 error - if retval, err2 = p.handler.TimResponseMessageIq(args.TimMsgIq, args.IqType, args.Auth); err2 != nil { - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timResponseMessageIq: "+err2.Error()) - oprot.WriteMessageBegin("timResponseMessageIq", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("timResponseMessageIq", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type iTimProcessorTimResponsePresenceList struct { - handler ITim -} - -func (p *iTimProcessorTimResponsePresenceList) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimResponsePresenceListArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("timResponsePresenceList", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := ITimTimResponsePresenceListResult{} - var retval *TimResponseBean - var err2 error - if retval, err2 = p.handler.TimResponsePresenceList(args.PbeanList, args.Auth); err2 != nil { - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timResponsePresenceList: "+err2.Error()) - oprot.WriteMessageBegin("timResponsePresenceList", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("timResponsePresenceList", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -type iTimProcessorTimResponseMessageList struct { - handler ITim -} - -func (p *iTimProcessorTimResponseMessageList) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) { - args := ITimTimResponseMessageListArgs{} - if err = args.Read(iprot); err != nil { - iprot.ReadMessageEnd() - x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error()) - oprot.WriteMessageBegin("timResponseMessageList", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return false, err - } - - iprot.ReadMessageEnd() - result := ITimTimResponseMessageListResult{} - var retval *TimResponseBean - var err2 error - if retval, err2 = p.handler.TimResponseMessageList(args.MbeanList, args.Auth); err2 != nil { - x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing timResponseMessageList: "+err2.Error()) - oprot.WriteMessageBegin("timResponseMessageList", thrift.EXCEPTION, seqId) - x.Write(oprot) - oprot.WriteMessageEnd() - oprot.Flush() - return true, err2 - } else { - result.Success = retval - } - if err2 = oprot.WriteMessageBegin("timResponseMessageList", thrift.REPLY, seqId); err2 != nil { - err = err2 - } - if err2 = result.Write(oprot); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil { - err = err2 - } - if err2 = oprot.Flush(); err == nil && err2 != nil { - err = err2 - } - if err != nil { - return - } - return true, err -} - -// HELPER FUNCTIONS AND STRUCTURES - -// Attributes: -// - Param -type ITimTimStreamArgs struct { - Param *TimParam `thrift:"param,1" json:"param"` -} - -func NewITimTimStreamArgs() *ITimTimStreamArgs { - return &ITimTimStreamArgs{} -} - -var ITimTimStreamArgs_Param_DEFAULT *TimParam - -func (p *ITimTimStreamArgs) GetParam() *TimParam { - if !p.IsSetParam() { - return ITimTimStreamArgs_Param_DEFAULT - } - return p.Param -} -func (p *ITimTimStreamArgs) IsSetParam() bool { - return p.Param != nil -} - -func (p *ITimTimStreamArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimStreamArgs) readField1(iprot thrift.TProtocol) error { - p.Param = &TimParam{} - if err := p.Param.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Param), err) - } - return nil -} - -func (p *ITimTimStreamArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timStream_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimStreamArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("param", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:param: ", p), err) - } - if err := p.Param.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Param), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:param: ", p), err) - } - return err -} - -func (p *ITimTimStreamArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimStreamArgs(%+v)", *p) -} - -type ITimTimStarttlsArgs struct { -} - -func NewITimTimStarttlsArgs() *ITimTimStarttlsArgs { - return &ITimTimStarttlsArgs{} -} - -func (p *ITimTimStarttlsArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimStarttlsArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timStarttls_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimStarttlsArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimStarttlsArgs(%+v)", *p) -} - -// Attributes: -// - Tid -// - Pwd -type ITimTimLoginArgs struct { - Tid *Tid `thrift:"tid,1" json:"tid"` - Pwd string `thrift:"pwd,2" json:"pwd"` -} - -func NewITimTimLoginArgs() *ITimTimLoginArgs { - return &ITimTimLoginArgs{} -} - -var ITimTimLoginArgs_Tid_DEFAULT *Tid - -func (p *ITimTimLoginArgs) GetTid() *Tid { - if !p.IsSetTid() { - return ITimTimLoginArgs_Tid_DEFAULT - } - return p.Tid -} - -func (p *ITimTimLoginArgs) GetPwd() string { - return p.Pwd -} -func (p *ITimTimLoginArgs) IsSetTid() bool { - return p.Tid != nil -} - -func (p *ITimTimLoginArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimLoginArgs) readField1(iprot thrift.TProtocol) error { - p.Tid = &Tid{} - if err := p.Tid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) - } - return nil -} - -func (p *ITimTimLoginArgs) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Pwd = v - } - return nil -} - -func (p *ITimTimLoginArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timLogin_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimLoginArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tid", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) - } - if err := p.Tid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) - } - return err -} - -func (p *ITimTimLoginArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("pwd", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:pwd: ", p), err) - } - if err := oprot.WriteString(string(p.Pwd)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.pwd (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:pwd: ", p), err) - } - return err -} - -func (p *ITimTimLoginArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimLoginArgs(%+v)", *p) -} - -// Attributes: -// - Ab -type ITimTimAckArgs struct { - Ab *TimAckBean `thrift:"ab,1" json:"ab"` -} - -func NewITimTimAckArgs() *ITimTimAckArgs { - return &ITimTimAckArgs{} -} - -var ITimTimAckArgs_Ab_DEFAULT *TimAckBean - -func (p *ITimTimAckArgs) GetAb() *TimAckBean { - if !p.IsSetAb() { - return ITimTimAckArgs_Ab_DEFAULT - } - return p.Ab -} -func (p *ITimTimAckArgs) IsSetAb() bool { - return p.Ab != nil -} - -func (p *ITimTimAckArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimAckArgs) readField1(iprot thrift.TProtocol) error { - p.Ab = &TimAckBean{} - if err := p.Ab.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Ab), err) - } - return nil -} - -func (p *ITimTimAckArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timAck_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimAckArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("ab", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:ab: ", p), err) - } - if err := p.Ab.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Ab), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:ab: ", p), err) - } - return err -} - -func (p *ITimTimAckArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimAckArgs(%+v)", *p) -} - -// Attributes: -// - Pbean -type ITimTimPresenceArgs struct { - Pbean *TimPBean `thrift:"pbean,1" json:"pbean"` -} - -func NewITimTimPresenceArgs() *ITimTimPresenceArgs { - return &ITimTimPresenceArgs{} -} - -var ITimTimPresenceArgs_Pbean_DEFAULT *TimPBean - -func (p *ITimTimPresenceArgs) GetPbean() *TimPBean { - if !p.IsSetPbean() { - return ITimTimPresenceArgs_Pbean_DEFAULT - } - return p.Pbean -} -func (p *ITimTimPresenceArgs) IsSetPbean() bool { - return p.Pbean != nil -} - -func (p *ITimTimPresenceArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimPresenceArgs) readField1(iprot thrift.TProtocol) error { - p.Pbean = &TimPBean{} - if err := p.Pbean.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Pbean), err) - } - return nil -} - -func (p *ITimTimPresenceArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timPresence_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimPresenceArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("pbean", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pbean: ", p), err) - } - if err := p.Pbean.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Pbean), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:pbean: ", p), err) - } - return err -} - -func (p *ITimTimPresenceArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimPresenceArgs(%+v)", *p) -} - -// Attributes: -// - Mbean -type ITimTimMessageArgs struct { - Mbean *TimMBean `thrift:"mbean,1" json:"mbean"` -} - -func NewITimTimMessageArgs() *ITimTimMessageArgs { - return &ITimTimMessageArgs{} -} - -var ITimTimMessageArgs_Mbean_DEFAULT *TimMBean - -func (p *ITimTimMessageArgs) GetMbean() *TimMBean { - if !p.IsSetMbean() { - return ITimTimMessageArgs_Mbean_DEFAULT - } - return p.Mbean -} -func (p *ITimTimMessageArgs) IsSetMbean() bool { - return p.Mbean != nil -} - -func (p *ITimTimMessageArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimMessageArgs) readField1(iprot thrift.TProtocol) error { - p.Mbean = &TimMBean{} - if err := p.Mbean.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Mbean), err) - } - return nil -} - -func (p *ITimTimMessageArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timMessage_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimMessageArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("mbean", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:mbean: ", p), err) - } - if err := p.Mbean.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Mbean), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:mbean: ", p), err) - } - return err -} - -func (p *ITimTimMessageArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimMessageArgs(%+v)", *p) -} - -// Attributes: -// - ThreadId -type ITimTimPingArgs struct { - ThreadId string `thrift:"threadId,1" json:"threadId"` -} - -func NewITimTimPingArgs() *ITimTimPingArgs { - return &ITimTimPingArgs{} -} - -func (p *ITimTimPingArgs) GetThreadId() string { - return p.ThreadId -} -func (p *ITimTimPingArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimPingArgs) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.ThreadId = v - } - return nil -} - -func (p *ITimTimPingArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timPing_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimPingArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("threadId", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) - } - if err := oprot.WriteString(string(p.ThreadId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) - } - return err -} - -func (p *ITimTimPingArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimPingArgs(%+v)", *p) -} - -// Attributes: -// - E -type ITimTimErrorArgs struct { - E *TimError `thrift:"e,1" json:"e"` -} - -func NewITimTimErrorArgs() *ITimTimErrorArgs { - return &ITimTimErrorArgs{} -} - -var ITimTimErrorArgs_E_DEFAULT *TimError - -func (p *ITimTimErrorArgs) GetE() *TimError { - if !p.IsSetE() { - return ITimTimErrorArgs_E_DEFAULT - } - return p.E -} -func (p *ITimTimErrorArgs) IsSetE() bool { - return p.E != nil -} - -func (p *ITimTimErrorArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimErrorArgs) readField1(iprot thrift.TProtocol) error { - p.E = &TimError{} - if err := p.E.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.E), err) - } - return nil -} - -func (p *ITimTimErrorArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timError_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimErrorArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("e", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:e: ", p), err) - } - if err := p.E.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.E), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:e: ", p), err) - } - return err -} - -func (p *ITimTimErrorArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimErrorArgs(%+v)", *p) -} - -type ITimTimLogoutArgs struct { -} - -func NewITimTimLogoutArgs() *ITimTimLogoutArgs { - return &ITimTimLogoutArgs{} -} - -func (p *ITimTimLogoutArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimLogoutArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timLogout_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimLogoutArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimLogoutArgs(%+v)", *p) -} - -// Attributes: -// - Tid -// - Auth -type ITimTimRegistArgs struct { - Tid *Tid `thrift:"tid,1" json:"tid"` - Auth string `thrift:"auth,2" json:"auth"` -} - -func NewITimTimRegistArgs() *ITimTimRegistArgs { - return &ITimTimRegistArgs{} -} - -var ITimTimRegistArgs_Tid_DEFAULT *Tid - -func (p *ITimTimRegistArgs) GetTid() *Tid { - if !p.IsSetTid() { - return ITimTimRegistArgs_Tid_DEFAULT - } - return p.Tid -} - -func (p *ITimTimRegistArgs) GetAuth() string { - return p.Auth -} -func (p *ITimTimRegistArgs) IsSetTid() bool { - return p.Tid != nil -} - -func (p *ITimTimRegistArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimRegistArgs) readField1(iprot thrift.TProtocol) error { - p.Tid = &Tid{} - if err := p.Tid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) - } - return nil -} - -func (p *ITimTimRegistArgs) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Auth = v - } - return nil -} - -func (p *ITimTimRegistArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timRegist_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimRegistArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tid", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) - } - if err := p.Tid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) - } - return err -} - -func (p *ITimTimRegistArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("auth", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:auth: ", p), err) - } - if err := oprot.WriteString(string(p.Auth)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.auth (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:auth: ", p), err) - } - return err -} - -func (p *ITimTimRegistArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimRegistArgs(%+v)", *p) -} - -// Attributes: -// - Roster -type ITimTimRoserArgs struct { - Roster *TimRoster `thrift:"roster,1" json:"roster"` -} - -func NewITimTimRoserArgs() *ITimTimRoserArgs { - return &ITimTimRoserArgs{} -} - -var ITimTimRoserArgs_Roster_DEFAULT *TimRoster - -func (p *ITimTimRoserArgs) GetRoster() *TimRoster { - if !p.IsSetRoster() { - return ITimTimRoserArgs_Roster_DEFAULT - } - return p.Roster -} -func (p *ITimTimRoserArgs) IsSetRoster() bool { - return p.Roster != nil -} - -func (p *ITimTimRoserArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimRoserArgs) readField1(iprot thrift.TProtocol) error { - p.Roster = &TimRoster{} - if err := p.Roster.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Roster), err) - } - return nil -} - -func (p *ITimTimRoserArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timRoser_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimRoserArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("roster", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:roster: ", p), err) - } - if err := p.Roster.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Roster), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:roster: ", p), err) - } - return err -} - -func (p *ITimTimRoserArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimRoserArgs(%+v)", *p) -} - -// Attributes: -// - MbeanList -type ITimTimMessageListArgs struct { - MbeanList *TimMBeanList `thrift:"mbeanList,1" json:"mbeanList"` -} - -func NewITimTimMessageListArgs() *ITimTimMessageListArgs { - return &ITimTimMessageListArgs{} -} - -var ITimTimMessageListArgs_MbeanList_DEFAULT *TimMBeanList - -func (p *ITimTimMessageListArgs) GetMbeanList() *TimMBeanList { - if !p.IsSetMbeanList() { - return ITimTimMessageListArgs_MbeanList_DEFAULT - } - return p.MbeanList -} -func (p *ITimTimMessageListArgs) IsSetMbeanList() bool { - return p.MbeanList != nil -} - -func (p *ITimTimMessageListArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimMessageListArgs) readField1(iprot thrift.TProtocol) error { - p.MbeanList = &TimMBeanList{} - if err := p.MbeanList.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.MbeanList), err) - } - return nil -} - -func (p *ITimTimMessageListArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timMessageList_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimMessageListArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("mbeanList", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:mbeanList: ", p), err) - } - if err := p.MbeanList.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.MbeanList), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:mbeanList: ", p), err) - } - return err -} - -func (p *ITimTimMessageListArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimMessageListArgs(%+v)", *p) -} - -// Attributes: -// - PbeanList -type ITimTimPresenceListArgs struct { - PbeanList *TimPBeanList `thrift:"pbeanList,1" json:"pbeanList"` -} - -func NewITimTimPresenceListArgs() *ITimTimPresenceListArgs { - return &ITimTimPresenceListArgs{} -} - -var ITimTimPresenceListArgs_PbeanList_DEFAULT *TimPBeanList - -func (p *ITimTimPresenceListArgs) GetPbeanList() *TimPBeanList { - if !p.IsSetPbeanList() { - return ITimTimPresenceListArgs_PbeanList_DEFAULT - } - return p.PbeanList -} -func (p *ITimTimPresenceListArgs) IsSetPbeanList() bool { - return p.PbeanList != nil -} - -func (p *ITimTimPresenceListArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimPresenceListArgs) readField1(iprot thrift.TProtocol) error { - p.PbeanList = &TimPBeanList{} - if err := p.PbeanList.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.PbeanList), err) - } - return nil -} - -func (p *ITimTimPresenceListArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timPresenceList_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimPresenceListArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("pbeanList", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pbeanList: ", p), err) - } - if err := p.PbeanList.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.PbeanList), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:pbeanList: ", p), err) - } - return err -} - -func (p *ITimTimPresenceListArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimPresenceListArgs(%+v)", *p) -} - -// Attributes: -// - TimMsgIq -// - IqType -type ITimTimMessageIqArgs struct { - TimMsgIq *TimMessageIq `thrift:"timMsgIq,1" json:"timMsgIq"` - IqType string `thrift:"iqType,2" json:"iqType"` -} - -func NewITimTimMessageIqArgs() *ITimTimMessageIqArgs { - return &ITimTimMessageIqArgs{} -} - -var ITimTimMessageIqArgs_TimMsgIq_DEFAULT *TimMessageIq - -func (p *ITimTimMessageIqArgs) GetTimMsgIq() *TimMessageIq { - if !p.IsSetTimMsgIq() { - return ITimTimMessageIqArgs_TimMsgIq_DEFAULT - } - return p.TimMsgIq -} - -func (p *ITimTimMessageIqArgs) GetIqType() string { - return p.IqType -} -func (p *ITimTimMessageIqArgs) IsSetTimMsgIq() bool { - return p.TimMsgIq != nil -} - -func (p *ITimTimMessageIqArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimMessageIqArgs) readField1(iprot thrift.TProtocol) error { - p.TimMsgIq = &TimMessageIq{} - if err := p.TimMsgIq.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TimMsgIq), err) - } - return nil -} - -func (p *ITimTimMessageIqArgs) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.IqType = v - } - return nil -} - -func (p *ITimTimMessageIqArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timMessageIq_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimMessageIqArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("timMsgIq", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:timMsgIq: ", p), err) - } - if err := p.TimMsgIq.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TimMsgIq), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:timMsgIq: ", p), err) - } - return err -} - -func (p *ITimTimMessageIqArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("iqType", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:iqType: ", p), err) - } - if err := oprot.WriteString(string(p.IqType)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.iqType (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:iqType: ", p), err) - } - return err -} - -func (p *ITimTimMessageIqArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimMessageIqArgs(%+v)", *p) -} - -// Attributes: -// - Mbean -type ITimTimMessageResultArgs struct { - Mbean *TimMBean `thrift:"mbean,1" json:"mbean"` -} - -func NewITimTimMessageResultArgs() *ITimTimMessageResultArgs { - return &ITimTimMessageResultArgs{} -} - -var ITimTimMessageResultArgs_Mbean_DEFAULT *TimMBean - -func (p *ITimTimMessageResultArgs) GetMbean() *TimMBean { - if !p.IsSetMbean() { - return ITimTimMessageResultArgs_Mbean_DEFAULT - } - return p.Mbean -} -func (p *ITimTimMessageResultArgs) IsSetMbean() bool { - return p.Mbean != nil -} - -func (p *ITimTimMessageResultArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimMessageResultArgs) readField1(iprot thrift.TProtocol) error { - p.Mbean = &TimMBean{} - if err := p.Mbean.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Mbean), err) - } - return nil -} - -func (p *ITimTimMessageResultArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timMessageResult_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimMessageResultArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("mbean", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:mbean: ", p), err) - } - if err := p.Mbean.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Mbean), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:mbean: ", p), err) - } - return err -} - -func (p *ITimTimMessageResultArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimMessageResultArgs(%+v)", *p) -} - -// Attributes: -// - Tpb -type ITimTimPropertyArgs struct { - Tpb *TimPropertyBean `thrift:"tpb,1" json:"tpb"` -} - -func NewITimTimPropertyArgs() *ITimTimPropertyArgs { - return &ITimTimPropertyArgs{} -} - -var ITimTimPropertyArgs_Tpb_DEFAULT *TimPropertyBean - -func (p *ITimTimPropertyArgs) GetTpb() *TimPropertyBean { - if !p.IsSetTpb() { - return ITimTimPropertyArgs_Tpb_DEFAULT - } - return p.Tpb -} -func (p *ITimTimPropertyArgs) IsSetTpb() bool { - return p.Tpb != nil -} - -func (p *ITimTimPropertyArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimPropertyArgs) readField1(iprot thrift.TProtocol) error { - p.Tpb = &TimPropertyBean{} - if err := p.Tpb.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tpb), err) - } - return nil -} - -func (p *ITimTimPropertyArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timProperty_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimPropertyArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tpb", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tpb: ", p), err) - } - if err := p.Tpb.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tpb), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tpb: ", p), err) - } - return err -} - -func (p *ITimTimPropertyArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimPropertyArgs(%+v)", *p) -} - -// Attributes: -// - Tid -// - Pwd -// - Auth -type ITimTimRemoteUserAuthArgs struct { - Tid *Tid `thrift:"tid,1" json:"tid"` - Pwd string `thrift:"pwd,2" json:"pwd"` - Auth *TimAuth `thrift:"auth,3" json:"auth"` -} - -func NewITimTimRemoteUserAuthArgs() *ITimTimRemoteUserAuthArgs { - return &ITimTimRemoteUserAuthArgs{} -} - -var ITimTimRemoteUserAuthArgs_Tid_DEFAULT *Tid - -func (p *ITimTimRemoteUserAuthArgs) GetTid() *Tid { - if !p.IsSetTid() { - return ITimTimRemoteUserAuthArgs_Tid_DEFAULT - } - return p.Tid -} - -func (p *ITimTimRemoteUserAuthArgs) GetPwd() string { - return p.Pwd -} - -var ITimTimRemoteUserAuthArgs_Auth_DEFAULT *TimAuth - -func (p *ITimTimRemoteUserAuthArgs) GetAuth() *TimAuth { - if !p.IsSetAuth() { - return ITimTimRemoteUserAuthArgs_Auth_DEFAULT - } - return p.Auth -} -func (p *ITimTimRemoteUserAuthArgs) IsSetTid() bool { - return p.Tid != nil -} - -func (p *ITimTimRemoteUserAuthArgs) IsSetAuth() bool { - return p.Auth != nil -} - -func (p *ITimTimRemoteUserAuthArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimRemoteUserAuthArgs) readField1(iprot thrift.TProtocol) error { - p.Tid = &Tid{} - if err := p.Tid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) - } - return nil -} - -func (p *ITimTimRemoteUserAuthArgs) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Pwd = v - } - return nil -} - -func (p *ITimTimRemoteUserAuthArgs) readField3(iprot thrift.TProtocol) error { - p.Auth = &TimAuth{} - if err := p.Auth.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) - } - return nil -} - -func (p *ITimTimRemoteUserAuthArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timRemoteUserAuth_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimRemoteUserAuthArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tid", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) - } - if err := p.Tid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) - } - return err -} - -func (p *ITimTimRemoteUserAuthArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("pwd", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:pwd: ", p), err) - } - if err := oprot.WriteString(string(p.Pwd)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.pwd (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:pwd: ", p), err) - } - return err -} - -func (p *ITimTimRemoteUserAuthArgs) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("auth", thrift.STRUCT, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:auth: ", p), err) - } - if err := p.Auth.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:auth: ", p), err) - } - return err -} - -func (p *ITimTimRemoteUserAuthArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimRemoteUserAuthArgs(%+v)", *p) -} - -// Attributes: -// - Success -type ITimTimRemoteUserAuthResult struct { - Success *TimRemoteUserBean `thrift:"success,0" json:"success,omitempty"` -} - -func NewITimTimRemoteUserAuthResult() *ITimTimRemoteUserAuthResult { - return &ITimTimRemoteUserAuthResult{} -} - -var ITimTimRemoteUserAuthResult_Success_DEFAULT *TimRemoteUserBean - -func (p *ITimTimRemoteUserAuthResult) GetSuccess() *TimRemoteUserBean { - if !p.IsSetSuccess() { - return ITimTimRemoteUserAuthResult_Success_DEFAULT - } - return p.Success -} -func (p *ITimTimRemoteUserAuthResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *ITimTimRemoteUserAuthResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimRemoteUserAuthResult) readField0(iprot thrift.TProtocol) error { - p.Success = &TimRemoteUserBean{} - if err := p.Success.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) - } - return nil -} - -func (p *ITimTimRemoteUserAuthResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timRemoteUserAuth_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimRemoteUserAuthResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := p.Success.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *ITimTimRemoteUserAuthResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimRemoteUserAuthResult(%+v)", *p) -} - -// Attributes: -// - Tid -// - Auth -type ITimTimRemoteUserGetArgs struct { - Tid *Tid `thrift:"tid,1" json:"tid"` - Auth *TimAuth `thrift:"auth,2" json:"auth"` -} - -func NewITimTimRemoteUserGetArgs() *ITimTimRemoteUserGetArgs { - return &ITimTimRemoteUserGetArgs{} -} - -var ITimTimRemoteUserGetArgs_Tid_DEFAULT *Tid - -func (p *ITimTimRemoteUserGetArgs) GetTid() *Tid { - if !p.IsSetTid() { - return ITimTimRemoteUserGetArgs_Tid_DEFAULT - } - return p.Tid -} - -var ITimTimRemoteUserGetArgs_Auth_DEFAULT *TimAuth - -func (p *ITimTimRemoteUserGetArgs) GetAuth() *TimAuth { - if !p.IsSetAuth() { - return ITimTimRemoteUserGetArgs_Auth_DEFAULT - } - return p.Auth -} -func (p *ITimTimRemoteUserGetArgs) IsSetTid() bool { - return p.Tid != nil -} - -func (p *ITimTimRemoteUserGetArgs) IsSetAuth() bool { - return p.Auth != nil -} - -func (p *ITimTimRemoteUserGetArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimRemoteUserGetArgs) readField1(iprot thrift.TProtocol) error { - p.Tid = &Tid{} - if err := p.Tid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) - } - return nil -} - -func (p *ITimTimRemoteUserGetArgs) readField2(iprot thrift.TProtocol) error { - p.Auth = &TimAuth{} - if err := p.Auth.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) - } - return nil -} - -func (p *ITimTimRemoteUserGetArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timRemoteUserGet_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimRemoteUserGetArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tid", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) - } - if err := p.Tid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) - } - return err -} - -func (p *ITimTimRemoteUserGetArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("auth", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:auth: ", p), err) - } - if err := p.Auth.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:auth: ", p), err) - } - return err -} - -func (p *ITimTimRemoteUserGetArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimRemoteUserGetArgs(%+v)", *p) -} - -// Attributes: -// - Success -type ITimTimRemoteUserGetResult struct { - Success *TimRemoteUserBean `thrift:"success,0" json:"success,omitempty"` -} - -func NewITimTimRemoteUserGetResult() *ITimTimRemoteUserGetResult { - return &ITimTimRemoteUserGetResult{} -} - -var ITimTimRemoteUserGetResult_Success_DEFAULT *TimRemoteUserBean - -func (p *ITimTimRemoteUserGetResult) GetSuccess() *TimRemoteUserBean { - if !p.IsSetSuccess() { - return ITimTimRemoteUserGetResult_Success_DEFAULT - } - return p.Success -} -func (p *ITimTimRemoteUserGetResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *ITimTimRemoteUserGetResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimRemoteUserGetResult) readField0(iprot thrift.TProtocol) error { - p.Success = &TimRemoteUserBean{} - if err := p.Success.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) - } - return nil -} - -func (p *ITimTimRemoteUserGetResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timRemoteUserGet_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimRemoteUserGetResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := p.Success.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *ITimTimRemoteUserGetResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimRemoteUserGetResult(%+v)", *p) -} - -// Attributes: -// - Tid -// - Ub -// - Auth -type ITimTimRemoteUserEditArgs struct { - Tid *Tid `thrift:"tid,1" json:"tid"` - Ub *TimUserBean `thrift:"ub,2" json:"ub"` - Auth *TimAuth `thrift:"auth,3" json:"auth"` -} - -func NewITimTimRemoteUserEditArgs() *ITimTimRemoteUserEditArgs { - return &ITimTimRemoteUserEditArgs{} -} - -var ITimTimRemoteUserEditArgs_Tid_DEFAULT *Tid - -func (p *ITimTimRemoteUserEditArgs) GetTid() *Tid { - if !p.IsSetTid() { - return ITimTimRemoteUserEditArgs_Tid_DEFAULT - } - return p.Tid -} - -var ITimTimRemoteUserEditArgs_Ub_DEFAULT *TimUserBean - -func (p *ITimTimRemoteUserEditArgs) GetUb() *TimUserBean { - if !p.IsSetUb() { - return ITimTimRemoteUserEditArgs_Ub_DEFAULT - } - return p.Ub -} - -var ITimTimRemoteUserEditArgs_Auth_DEFAULT *TimAuth - -func (p *ITimTimRemoteUserEditArgs) GetAuth() *TimAuth { - if !p.IsSetAuth() { - return ITimTimRemoteUserEditArgs_Auth_DEFAULT - } - return p.Auth -} -func (p *ITimTimRemoteUserEditArgs) IsSetTid() bool { - return p.Tid != nil -} - -func (p *ITimTimRemoteUserEditArgs) IsSetUb() bool { - return p.Ub != nil -} - -func (p *ITimTimRemoteUserEditArgs) IsSetAuth() bool { - return p.Auth != nil -} - -func (p *ITimTimRemoteUserEditArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimRemoteUserEditArgs) readField1(iprot thrift.TProtocol) error { - p.Tid = &Tid{} - if err := p.Tid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) - } - return nil -} - -func (p *ITimTimRemoteUserEditArgs) readField2(iprot thrift.TProtocol) error { - p.Ub = &TimUserBean{} - if err := p.Ub.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Ub), err) - } - return nil -} - -func (p *ITimTimRemoteUserEditArgs) readField3(iprot thrift.TProtocol) error { - p.Auth = &TimAuth{} - if err := p.Auth.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) - } - return nil -} - -func (p *ITimTimRemoteUserEditArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timRemoteUserEdit_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimRemoteUserEditArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tid", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) - } - if err := p.Tid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) - } - return err -} - -func (p *ITimTimRemoteUserEditArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("ub", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:ub: ", p), err) - } - if err := p.Ub.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Ub), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:ub: ", p), err) - } - return err -} - -func (p *ITimTimRemoteUserEditArgs) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("auth", thrift.STRUCT, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:auth: ", p), err) - } - if err := p.Auth.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:auth: ", p), err) - } - return err -} - -func (p *ITimTimRemoteUserEditArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimRemoteUserEditArgs(%+v)", *p) -} - -// Attributes: -// - Success -type ITimTimRemoteUserEditResult struct { - Success *TimRemoteUserBean `thrift:"success,0" json:"success,omitempty"` -} - -func NewITimTimRemoteUserEditResult() *ITimTimRemoteUserEditResult { - return &ITimTimRemoteUserEditResult{} -} - -var ITimTimRemoteUserEditResult_Success_DEFAULT *TimRemoteUserBean - -func (p *ITimTimRemoteUserEditResult) GetSuccess() *TimRemoteUserBean { - if !p.IsSetSuccess() { - return ITimTimRemoteUserEditResult_Success_DEFAULT - } - return p.Success -} -func (p *ITimTimRemoteUserEditResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *ITimTimRemoteUserEditResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimRemoteUserEditResult) readField0(iprot thrift.TProtocol) error { - p.Success = &TimRemoteUserBean{} - if err := p.Success.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) - } - return nil -} - -func (p *ITimTimRemoteUserEditResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timRemoteUserEdit_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimRemoteUserEditResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := p.Success.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *ITimTimRemoteUserEditResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimRemoteUserEditResult(%+v)", *p) -} - -// Attributes: -// - Pbean -// - Auth -type ITimTimResponsePresenceArgs struct { - Pbean *TimPBean `thrift:"pbean,1" json:"pbean"` - Auth *TimAuth `thrift:"auth,2" json:"auth"` -} - -func NewITimTimResponsePresenceArgs() *ITimTimResponsePresenceArgs { - return &ITimTimResponsePresenceArgs{} -} - -var ITimTimResponsePresenceArgs_Pbean_DEFAULT *TimPBean - -func (p *ITimTimResponsePresenceArgs) GetPbean() *TimPBean { - if !p.IsSetPbean() { - return ITimTimResponsePresenceArgs_Pbean_DEFAULT - } - return p.Pbean -} - -var ITimTimResponsePresenceArgs_Auth_DEFAULT *TimAuth - -func (p *ITimTimResponsePresenceArgs) GetAuth() *TimAuth { - if !p.IsSetAuth() { - return ITimTimResponsePresenceArgs_Auth_DEFAULT - } - return p.Auth -} -func (p *ITimTimResponsePresenceArgs) IsSetPbean() bool { - return p.Pbean != nil -} - -func (p *ITimTimResponsePresenceArgs) IsSetAuth() bool { - return p.Auth != nil -} - -func (p *ITimTimResponsePresenceArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimResponsePresenceArgs) readField1(iprot thrift.TProtocol) error { - p.Pbean = &TimPBean{} - if err := p.Pbean.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Pbean), err) - } - return nil -} - -func (p *ITimTimResponsePresenceArgs) readField2(iprot thrift.TProtocol) error { - p.Auth = &TimAuth{} - if err := p.Auth.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) - } - return nil -} - -func (p *ITimTimResponsePresenceArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timResponsePresence_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimResponsePresenceArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("pbean", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pbean: ", p), err) - } - if err := p.Pbean.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Pbean), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:pbean: ", p), err) - } - return err -} - -func (p *ITimTimResponsePresenceArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("auth", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:auth: ", p), err) - } - if err := p.Auth.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:auth: ", p), err) - } - return err -} - -func (p *ITimTimResponsePresenceArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimResponsePresenceArgs(%+v)", *p) -} - -// Attributes: -// - Success -type ITimTimResponsePresenceResult struct { - Success *TimResponseBean `thrift:"success,0" json:"success,omitempty"` -} - -func NewITimTimResponsePresenceResult() *ITimTimResponsePresenceResult { - return &ITimTimResponsePresenceResult{} -} - -var ITimTimResponsePresenceResult_Success_DEFAULT *TimResponseBean - -func (p *ITimTimResponsePresenceResult) GetSuccess() *TimResponseBean { - if !p.IsSetSuccess() { - return ITimTimResponsePresenceResult_Success_DEFAULT - } - return p.Success -} -func (p *ITimTimResponsePresenceResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *ITimTimResponsePresenceResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimResponsePresenceResult) readField0(iprot thrift.TProtocol) error { - p.Success = &TimResponseBean{} - if err := p.Success.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) - } - return nil -} - -func (p *ITimTimResponsePresenceResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timResponsePresence_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimResponsePresenceResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := p.Success.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *ITimTimResponsePresenceResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimResponsePresenceResult(%+v)", *p) -} - -// Attributes: -// - Mbean -// - Auth -type ITimTimResponseMessageArgs struct { - Mbean *TimMBean `thrift:"mbean,1" json:"mbean"` - Auth *TimAuth `thrift:"auth,2" json:"auth"` -} - -func NewITimTimResponseMessageArgs() *ITimTimResponseMessageArgs { - return &ITimTimResponseMessageArgs{} -} - -var ITimTimResponseMessageArgs_Mbean_DEFAULT *TimMBean - -func (p *ITimTimResponseMessageArgs) GetMbean() *TimMBean { - if !p.IsSetMbean() { - return ITimTimResponseMessageArgs_Mbean_DEFAULT - } - return p.Mbean -} - -var ITimTimResponseMessageArgs_Auth_DEFAULT *TimAuth - -func (p *ITimTimResponseMessageArgs) GetAuth() *TimAuth { - if !p.IsSetAuth() { - return ITimTimResponseMessageArgs_Auth_DEFAULT - } - return p.Auth -} -func (p *ITimTimResponseMessageArgs) IsSetMbean() bool { - return p.Mbean != nil -} - -func (p *ITimTimResponseMessageArgs) IsSetAuth() bool { - return p.Auth != nil -} - -func (p *ITimTimResponseMessageArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimResponseMessageArgs) readField1(iprot thrift.TProtocol) error { - p.Mbean = &TimMBean{} - if err := p.Mbean.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Mbean), err) - } - return nil -} - -func (p *ITimTimResponseMessageArgs) readField2(iprot thrift.TProtocol) error { - p.Auth = &TimAuth{} - if err := p.Auth.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) - } - return nil -} - -func (p *ITimTimResponseMessageArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timResponseMessage_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimResponseMessageArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("mbean", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:mbean: ", p), err) - } - if err := p.Mbean.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Mbean), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:mbean: ", p), err) - } - return err -} - -func (p *ITimTimResponseMessageArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("auth", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:auth: ", p), err) - } - if err := p.Auth.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:auth: ", p), err) - } - return err -} - -func (p *ITimTimResponseMessageArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimResponseMessageArgs(%+v)", *p) -} - -// Attributes: -// - Success -type ITimTimResponseMessageResult struct { - Success *TimResponseBean `thrift:"success,0" json:"success,omitempty"` -} - -func NewITimTimResponseMessageResult() *ITimTimResponseMessageResult { - return &ITimTimResponseMessageResult{} -} - -var ITimTimResponseMessageResult_Success_DEFAULT *TimResponseBean - -func (p *ITimTimResponseMessageResult) GetSuccess() *TimResponseBean { - if !p.IsSetSuccess() { - return ITimTimResponseMessageResult_Success_DEFAULT - } - return p.Success -} -func (p *ITimTimResponseMessageResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *ITimTimResponseMessageResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimResponseMessageResult) readField0(iprot thrift.TProtocol) error { - p.Success = &TimResponseBean{} - if err := p.Success.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) - } - return nil -} - -func (p *ITimTimResponseMessageResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timResponseMessage_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimResponseMessageResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := p.Success.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *ITimTimResponseMessageResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimResponseMessageResult(%+v)", *p) -} - -// Attributes: -// - TimMsgIq -// - IqType -// - Auth -type ITimTimResponseMessageIqArgs struct { - TimMsgIq *TimMessageIq `thrift:"timMsgIq,1" json:"timMsgIq"` - IqType string `thrift:"iqType,2" json:"iqType"` - Auth *TimAuth `thrift:"auth,3" json:"auth"` -} - -func NewITimTimResponseMessageIqArgs() *ITimTimResponseMessageIqArgs { - return &ITimTimResponseMessageIqArgs{} -} - -var ITimTimResponseMessageIqArgs_TimMsgIq_DEFAULT *TimMessageIq - -func (p *ITimTimResponseMessageIqArgs) GetTimMsgIq() *TimMessageIq { - if !p.IsSetTimMsgIq() { - return ITimTimResponseMessageIqArgs_TimMsgIq_DEFAULT - } - return p.TimMsgIq -} - -func (p *ITimTimResponseMessageIqArgs) GetIqType() string { - return p.IqType -} - -var ITimTimResponseMessageIqArgs_Auth_DEFAULT *TimAuth - -func (p *ITimTimResponseMessageIqArgs) GetAuth() *TimAuth { - if !p.IsSetAuth() { - return ITimTimResponseMessageIqArgs_Auth_DEFAULT - } - return p.Auth -} -func (p *ITimTimResponseMessageIqArgs) IsSetTimMsgIq() bool { - return p.TimMsgIq != nil -} - -func (p *ITimTimResponseMessageIqArgs) IsSetAuth() bool { - return p.Auth != nil -} - -func (p *ITimTimResponseMessageIqArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimResponseMessageIqArgs) readField1(iprot thrift.TProtocol) error { - p.TimMsgIq = &TimMessageIq{} - if err := p.TimMsgIq.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TimMsgIq), err) - } - return nil -} - -func (p *ITimTimResponseMessageIqArgs) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.IqType = v - } - return nil -} - -func (p *ITimTimResponseMessageIqArgs) readField3(iprot thrift.TProtocol) error { - p.Auth = &TimAuth{} - if err := p.Auth.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) - } - return nil -} - -func (p *ITimTimResponseMessageIqArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timResponseMessageIq_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimResponseMessageIqArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("timMsgIq", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:timMsgIq: ", p), err) - } - if err := p.TimMsgIq.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TimMsgIq), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:timMsgIq: ", p), err) - } - return err -} - -func (p *ITimTimResponseMessageIqArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("iqType", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:iqType: ", p), err) - } - if err := oprot.WriteString(string(p.IqType)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.iqType (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:iqType: ", p), err) - } - return err -} - -func (p *ITimTimResponseMessageIqArgs) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("auth", thrift.STRUCT, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:auth: ", p), err) - } - if err := p.Auth.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:auth: ", p), err) - } - return err -} - -func (p *ITimTimResponseMessageIqArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimResponseMessageIqArgs(%+v)", *p) -} - -// Attributes: -// - Success -type ITimTimResponseMessageIqResult struct { - Success *TimMBeanList `thrift:"success,0" json:"success,omitempty"` -} - -func NewITimTimResponseMessageIqResult() *ITimTimResponseMessageIqResult { - return &ITimTimResponseMessageIqResult{} -} - -var ITimTimResponseMessageIqResult_Success_DEFAULT *TimMBeanList - -func (p *ITimTimResponseMessageIqResult) GetSuccess() *TimMBeanList { - if !p.IsSetSuccess() { - return ITimTimResponseMessageIqResult_Success_DEFAULT - } - return p.Success -} -func (p *ITimTimResponseMessageIqResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *ITimTimResponseMessageIqResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimResponseMessageIqResult) readField0(iprot thrift.TProtocol) error { - p.Success = &TimMBeanList{} - if err := p.Success.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) - } - return nil -} - -func (p *ITimTimResponseMessageIqResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timResponseMessageIq_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimResponseMessageIqResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := p.Success.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *ITimTimResponseMessageIqResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimResponseMessageIqResult(%+v)", *p) -} - -// Attributes: -// - PbeanList -// - Auth -type ITimTimResponsePresenceListArgs struct { - PbeanList *TimPBeanList `thrift:"pbeanList,1" json:"pbeanList"` - Auth *TimAuth `thrift:"auth,2" json:"auth"` -} - -func NewITimTimResponsePresenceListArgs() *ITimTimResponsePresenceListArgs { - return &ITimTimResponsePresenceListArgs{} -} - -var ITimTimResponsePresenceListArgs_PbeanList_DEFAULT *TimPBeanList - -func (p *ITimTimResponsePresenceListArgs) GetPbeanList() *TimPBeanList { - if !p.IsSetPbeanList() { - return ITimTimResponsePresenceListArgs_PbeanList_DEFAULT - } - return p.PbeanList -} - -var ITimTimResponsePresenceListArgs_Auth_DEFAULT *TimAuth - -func (p *ITimTimResponsePresenceListArgs) GetAuth() *TimAuth { - if !p.IsSetAuth() { - return ITimTimResponsePresenceListArgs_Auth_DEFAULT - } - return p.Auth -} -func (p *ITimTimResponsePresenceListArgs) IsSetPbeanList() bool { - return p.PbeanList != nil -} - -func (p *ITimTimResponsePresenceListArgs) IsSetAuth() bool { - return p.Auth != nil -} - -func (p *ITimTimResponsePresenceListArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimResponsePresenceListArgs) readField1(iprot thrift.TProtocol) error { - p.PbeanList = &TimPBeanList{} - if err := p.PbeanList.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.PbeanList), err) - } - return nil -} - -func (p *ITimTimResponsePresenceListArgs) readField2(iprot thrift.TProtocol) error { - p.Auth = &TimAuth{} - if err := p.Auth.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) - } - return nil -} - -func (p *ITimTimResponsePresenceListArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timResponsePresenceList_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimResponsePresenceListArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("pbeanList", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pbeanList: ", p), err) - } - if err := p.PbeanList.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.PbeanList), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:pbeanList: ", p), err) - } - return err -} - -func (p *ITimTimResponsePresenceListArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("auth", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:auth: ", p), err) - } - if err := p.Auth.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:auth: ", p), err) - } - return err -} - -func (p *ITimTimResponsePresenceListArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimResponsePresenceListArgs(%+v)", *p) -} - -// Attributes: -// - Success -type ITimTimResponsePresenceListResult struct { - Success *TimResponseBean `thrift:"success,0" json:"success,omitempty"` -} - -func NewITimTimResponsePresenceListResult() *ITimTimResponsePresenceListResult { - return &ITimTimResponsePresenceListResult{} -} - -var ITimTimResponsePresenceListResult_Success_DEFAULT *TimResponseBean - -func (p *ITimTimResponsePresenceListResult) GetSuccess() *TimResponseBean { - if !p.IsSetSuccess() { - return ITimTimResponsePresenceListResult_Success_DEFAULT - } - return p.Success -} -func (p *ITimTimResponsePresenceListResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *ITimTimResponsePresenceListResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimResponsePresenceListResult) readField0(iprot thrift.TProtocol) error { - p.Success = &TimResponseBean{} - if err := p.Success.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) - } - return nil -} - -func (p *ITimTimResponsePresenceListResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timResponsePresenceList_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimResponsePresenceListResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := p.Success.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *ITimTimResponsePresenceListResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimResponsePresenceListResult(%+v)", *p) -} - -// Attributes: -// - MbeanList -// - Auth -type ITimTimResponseMessageListArgs struct { - MbeanList *TimMBeanList `thrift:"mbeanList,1" json:"mbeanList"` - Auth *TimAuth `thrift:"auth,2" json:"auth"` -} - -func NewITimTimResponseMessageListArgs() *ITimTimResponseMessageListArgs { - return &ITimTimResponseMessageListArgs{} -} - -var ITimTimResponseMessageListArgs_MbeanList_DEFAULT *TimMBeanList - -func (p *ITimTimResponseMessageListArgs) GetMbeanList() *TimMBeanList { - if !p.IsSetMbeanList() { - return ITimTimResponseMessageListArgs_MbeanList_DEFAULT - } - return p.MbeanList -} - -var ITimTimResponseMessageListArgs_Auth_DEFAULT *TimAuth - -func (p *ITimTimResponseMessageListArgs) GetAuth() *TimAuth { - if !p.IsSetAuth() { - return ITimTimResponseMessageListArgs_Auth_DEFAULT - } - return p.Auth -} -func (p *ITimTimResponseMessageListArgs) IsSetMbeanList() bool { - return p.MbeanList != nil -} - -func (p *ITimTimResponseMessageListArgs) IsSetAuth() bool { - return p.Auth != nil -} - -func (p *ITimTimResponseMessageListArgs) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimResponseMessageListArgs) readField1(iprot thrift.TProtocol) error { - p.MbeanList = &TimMBeanList{} - if err := p.MbeanList.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.MbeanList), err) - } - return nil -} - -func (p *ITimTimResponseMessageListArgs) readField2(iprot thrift.TProtocol) error { - p.Auth = &TimAuth{} - if err := p.Auth.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Auth), err) - } - return nil -} - -func (p *ITimTimResponseMessageListArgs) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timResponseMessageList_args"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimResponseMessageListArgs) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("mbeanList", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:mbeanList: ", p), err) - } - if err := p.MbeanList.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.MbeanList), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:mbeanList: ", p), err) - } - return err -} - -func (p *ITimTimResponseMessageListArgs) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("auth", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:auth: ", p), err) - } - if err := p.Auth.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Auth), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:auth: ", p), err) - } - return err -} - -func (p *ITimTimResponseMessageListArgs) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimResponseMessageListArgs(%+v)", *p) -} - -// Attributes: -// - Success -type ITimTimResponseMessageListResult struct { - Success *TimResponseBean `thrift:"success,0" json:"success,omitempty"` -} - -func NewITimTimResponseMessageListResult() *ITimTimResponseMessageListResult { - return &ITimTimResponseMessageListResult{} -} - -var ITimTimResponseMessageListResult_Success_DEFAULT *TimResponseBean - -func (p *ITimTimResponseMessageListResult) GetSuccess() *TimResponseBean { - if !p.IsSetSuccess() { - return ITimTimResponseMessageListResult_Success_DEFAULT - } - return p.Success -} -func (p *ITimTimResponseMessageListResult) IsSetSuccess() bool { - return p.Success != nil -} - -func (p *ITimTimResponseMessageListResult) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 0: - if err := p.readField0(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *ITimTimResponseMessageListResult) readField0(iprot thrift.TProtocol) error { - p.Success = &TimResponseBean{} - if err := p.Success.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err) - } - return nil -} - -func (p *ITimTimResponseMessageListResult) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("timResponseMessageList_result"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField0(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *ITimTimResponseMessageListResult) writeField0(oprot thrift.TProtocol) (err error) { - if p.IsSetSuccess() { - if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) - } - if err := p.Success.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) - } - } - return err -} - -func (p *ITimTimResponseMessageListResult) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("ITimTimResponseMessageListResult(%+v)", *p) -} diff --git a/tim.protocol/ttypes.go b/tim.protocol/ttypes.go deleted file mode 100644 index 019e080..0000000 --- a/tim.protocol/ttypes.go +++ /dev/null @@ -1,8254 +0,0 @@ -// Autogenerated by Thrift Compiler (0.9.3) -// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - -package protocol - -import ( - "bytes" - "fmt" - "git.apache.org/thrift.git/lib/go/thrift" -) - -// (needed to ensure safety because of naive import list construction.) -var _ = thrift.ZERO -var _ = fmt.Printf -var _ = bytes.Equal - -var GoUnusedProtection__ int - -// Attributes: -// - ErrCode: 错误码 -// - ErrMsg: 错误内容 -type TimError struct { - ErrCode *int32 `thrift:"errCode,1" json:"errCode,omitempty"` - ErrMsg *string `thrift:"errMsg,2" json:"errMsg,omitempty"` -} - -func NewTimError() *TimError { - return &TimError{} -} - -var TimError_ErrCode_DEFAULT int32 - -func (p *TimError) GetErrCode() int32 { - if !p.IsSetErrCode() { - return TimError_ErrCode_DEFAULT - } - return *p.ErrCode -} - -var TimError_ErrMsg_DEFAULT string - -func (p *TimError) GetErrMsg() string { - if !p.IsSetErrMsg() { - return TimError_ErrMsg_DEFAULT - } - return *p.ErrMsg -} -func (p *TimError) IsSetErrCode() bool { - return p.ErrCode != nil -} - -func (p *TimError) IsSetErrMsg() bool { - return p.ErrMsg != nil -} - -func (p *TimError) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimError) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.ErrCode = &v - } - return nil -} - -func (p *TimError) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.ErrMsg = &v - } - return nil -} - -func (p *TimError) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimError"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimError) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetErrCode() { - if err := oprot.WriteFieldBegin("errCode", thrift.I32, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:errCode: ", p), err) - } - if err := oprot.WriteI32(int32(*p.ErrCode)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.errCode (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:errCode: ", p), err) - } - } - return err -} - -func (p *TimError) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetErrMsg() { - if err := oprot.WriteFieldBegin("errMsg", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:errMsg: ", p), err) - } - if err := oprot.WriteString(string(*p.ErrMsg)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.errMsg (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:errMsg: ", p), err) - } - } - return err -} - -func (p *TimError) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimError(%+v)", *p) -} - -// Attributes: -// - Key: 键 -// - Value: 值 -type TimNode struct { - Key *string `thrift:"key,1" json:"key,omitempty"` - Value *string `thrift:"value,2" json:"value,omitempty"` -} - -func NewTimNode() *TimNode { - return &TimNode{} -} - -var TimNode_Key_DEFAULT string - -func (p *TimNode) GetKey() string { - if !p.IsSetKey() { - return TimNode_Key_DEFAULT - } - return *p.Key -} - -var TimNode_Value_DEFAULT string - -func (p *TimNode) GetValue() string { - if !p.IsSetValue() { - return TimNode_Value_DEFAULT - } - return *p.Value -} -func (p *TimNode) IsSetKey() bool { - return p.Key != nil -} - -func (p *TimNode) IsSetValue() bool { - return p.Value != nil -} - -func (p *TimNode) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimNode) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Key = &v - } - return nil -} - -func (p *TimNode) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Value = &v - } - return nil -} - -func (p *TimNode) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimNode"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimNode) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetKey() { - if err := oprot.WriteFieldBegin("key", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:key: ", p), err) - } - if err := oprot.WriteString(string(*p.Key)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.key (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:key: ", p), err) - } - } - return err -} - -func (p *TimNode) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetValue() { - if err := oprot.WriteFieldBegin("value", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:value: ", p), err) - } - if err := oprot.WriteString(string(*p.Value)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.value (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:value: ", p), err) - } - } - return err -} - -func (p *TimNode) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimNode(%+v)", *p) -} - -// Attributes: -// - ID: id,返回所要回执协议的线程id -// - AckType: 类型,自定义 如:ping,message等 -// - AckStatus: 状态,如成功,失败等 -// - ExtraList: 附加信息 -// - Err: 错误信息 -// - ExtraMap -type TimAckBean struct { - ID *string `thrift:"id,1" json:"id,omitempty"` - AckType *string `thrift:"ackType,2" json:"ackType,omitempty"` - AckStatus *string `thrift:"ackStatus,3" json:"ackStatus,omitempty"` - ExtraList []*TimNode `thrift:"extraList,4" json:"extraList,omitempty"` - Err *TimError `thrift:"err,5" json:"err,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,6" json:"extraMap,omitempty"` -} - -func NewTimAckBean() *TimAckBean { - return &TimAckBean{} -} - -var TimAckBean_ID_DEFAULT string - -func (p *TimAckBean) GetID() string { - if !p.IsSetID() { - return TimAckBean_ID_DEFAULT - } - return *p.ID -} - -var TimAckBean_AckType_DEFAULT string - -func (p *TimAckBean) GetAckType() string { - if !p.IsSetAckType() { - return TimAckBean_AckType_DEFAULT - } - return *p.AckType -} - -var TimAckBean_AckStatus_DEFAULT string - -func (p *TimAckBean) GetAckStatus() string { - if !p.IsSetAckStatus() { - return TimAckBean_AckStatus_DEFAULT - } - return *p.AckStatus -} - -var TimAckBean_ExtraList_DEFAULT []*TimNode - -func (p *TimAckBean) GetExtraList() []*TimNode { - return p.ExtraList -} - -var TimAckBean_Err_DEFAULT *TimError - -func (p *TimAckBean) GetErr() *TimError { - if !p.IsSetErr() { - return TimAckBean_Err_DEFAULT - } - return p.Err -} - -var TimAckBean_ExtraMap_DEFAULT map[string]string - -func (p *TimAckBean) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimAckBean) IsSetID() bool { - return p.ID != nil -} - -func (p *TimAckBean) IsSetAckType() bool { - return p.AckType != nil -} - -func (p *TimAckBean) IsSetAckStatus() bool { - return p.AckStatus != nil -} - -func (p *TimAckBean) IsSetExtraList() bool { - return p.ExtraList != nil -} - -func (p *TimAckBean) IsSetErr() bool { - return p.Err != nil -} - -func (p *TimAckBean) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimAckBean) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimAckBean) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.ID = &v - } - return nil -} - -func (p *TimAckBean) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.AckType = &v - } - return nil -} - -func (p *TimAckBean) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.AckStatus = &v - } - return nil -} - -func (p *TimAckBean) readField4(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TimNode, 0, size) - p.ExtraList = tSlice - for i := 0; i < size; i++ { - _elem0 := &TimNode{} - if err := _elem0.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem0), err) - } - p.ExtraList = append(p.ExtraList, _elem0) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimAckBean) readField5(iprot thrift.TProtocol) error { - p.Err = &TimError{} - if err := p.Err.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Err), err) - } - return nil -} - -func (p *TimAckBean) readField6(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key1 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key1 = v - } - var _val2 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val2 = v - } - p.ExtraMap[_key1] = _val2 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimAckBean) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimAckBean"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimAckBean) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetID() { - if err := oprot.WriteFieldBegin("id", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:id: ", p), err) - } - if err := oprot.WriteString(string(*p.ID)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.id (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:id: ", p), err) - } - } - return err -} - -func (p *TimAckBean) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetAckType() { - if err := oprot.WriteFieldBegin("ackType", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:ackType: ", p), err) - } - if err := oprot.WriteString(string(*p.AckType)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.ackType (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:ackType: ", p), err) - } - } - return err -} - -func (p *TimAckBean) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetAckStatus() { - if err := oprot.WriteFieldBegin("ackStatus", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:ackStatus: ", p), err) - } - if err := oprot.WriteString(string(*p.AckStatus)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.ackStatus (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:ackStatus: ", p), err) - } - } - return err -} - -func (p *TimAckBean) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraList() { - if err := oprot.WriteFieldBegin("extraList", thrift.LIST, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraList: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ExtraList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.ExtraList { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraList: ", p), err) - } - } - return err -} - -func (p *TimAckBean) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetErr() { - if err := oprot.WriteFieldBegin("err", thrift.STRUCT, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:err: ", p), err) - } - if err := p.Err.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Err), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:err: ", p), err) - } - } - return err -} - -func (p *TimAckBean) writeField6(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:extraMap: ", p), err) - } - } - return err -} - -func (p *TimAckBean) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimAckBean(%+v)", *p) -} - -// Attributes: -// - Chl: 渠道 -// - Platform: 平台 -// - Version: version 客户端协议版本 -type TimHBean struct { - Chl int32 `thrift:"chl,1,required" json:"chl"` - Platform *int32 `thrift:"platform,2" json:"platform,omitempty"` - Version int16 `thrift:"version,3,required" json:"version"` -} - -func NewTimHBean() *TimHBean { - return &TimHBean{} -} - -func (p *TimHBean) GetChl() int32 { - return p.Chl -} - -var TimHBean_Platform_DEFAULT int32 - -func (p *TimHBean) GetPlatform() int32 { - if !p.IsSetPlatform() { - return TimHBean_Platform_DEFAULT - } - return *p.Platform -} - -func (p *TimHBean) GetVersion() int16 { - return p.Version -} -func (p *TimHBean) IsSetPlatform() bool { - return p.Platform != nil -} - -func (p *TimHBean) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetChl bool = false - var issetVersion bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetChl = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - issetVersion = true - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetChl { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Chl is not set")) - } - if !issetVersion { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Version is not set")) - } - return nil -} - -func (p *TimHBean) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Chl = v - } - return nil -} - -func (p *TimHBean) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Platform = &v - } - return nil -} - -func (p *TimHBean) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI16(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.Version = v - } - return nil -} - -func (p *TimHBean) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimHBean"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimHBean) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("chl", thrift.I32, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:chl: ", p), err) - } - if err := oprot.WriteI32(int32(p.Chl)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.chl (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:chl: ", p), err) - } - return err -} - -func (p *TimHBean) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetPlatform() { - if err := oprot.WriteFieldBegin("platform", thrift.I32, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:platform: ", p), err) - } - if err := oprot.WriteI32(int32(*p.Platform)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.platform (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:platform: ", p), err) - } - } - return err -} - -func (p *TimHBean) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("version", thrift.I16, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:version: ", p), err) - } - if err := oprot.WriteI16(int16(p.Version)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.version (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:version: ", p), err) - } - return err -} - -func (p *TimHBean) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimHBean(%+v)", *p) -} - -// Attributes: -// - Timestamp: 服务器时间 -// - Version: 版本 -// - Lang: 语言 -// - ExtraList: 附加信息 -// - ExtraMap -// - Interflow: 消息合流 -// - TLS: tls -type TimParam struct { - Timestamp *string `thrift:"timestamp,1" json:"timestamp,omitempty"` - Version *int16 `thrift:"version,2" json:"version,omitempty"` - Lang *string `thrift:"lang,3" json:"lang,omitempty"` - ExtraList []*TimNode `thrift:"extraList,4" json:"extraList,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,5" json:"extraMap,omitempty"` - Interflow *string `thrift:"interflow,6" json:"interflow,omitempty"` - TLS *string `thrift:"tls,7" json:"tls,omitempty"` -} - -func NewTimParam() *TimParam { - return &TimParam{} -} - -var TimParam_Timestamp_DEFAULT string - -func (p *TimParam) GetTimestamp() string { - if !p.IsSetTimestamp() { - return TimParam_Timestamp_DEFAULT - } - return *p.Timestamp -} - -var TimParam_Version_DEFAULT int16 - -func (p *TimParam) GetVersion() int16 { - if !p.IsSetVersion() { - return TimParam_Version_DEFAULT - } - return *p.Version -} - -var TimParam_Lang_DEFAULT string - -func (p *TimParam) GetLang() string { - if !p.IsSetLang() { - return TimParam_Lang_DEFAULT - } - return *p.Lang -} - -var TimParam_ExtraList_DEFAULT []*TimNode - -func (p *TimParam) GetExtraList() []*TimNode { - return p.ExtraList -} - -var TimParam_ExtraMap_DEFAULT map[string]string - -func (p *TimParam) GetExtraMap() map[string]string { - return p.ExtraMap -} - -var TimParam_Interflow_DEFAULT string - -func (p *TimParam) GetInterflow() string { - if !p.IsSetInterflow() { - return TimParam_Interflow_DEFAULT - } - return *p.Interflow -} - -var TimParam_TLS_DEFAULT string - -func (p *TimParam) GetTLS() string { - if !p.IsSetTLS() { - return TimParam_TLS_DEFAULT - } - return *p.TLS -} -func (p *TimParam) IsSetTimestamp() bool { - return p.Timestamp != nil -} - -func (p *TimParam) IsSetVersion() bool { - return p.Version != nil -} - -func (p *TimParam) IsSetLang() bool { - return p.Lang != nil -} - -func (p *TimParam) IsSetExtraList() bool { - return p.ExtraList != nil -} - -func (p *TimParam) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimParam) IsSetInterflow() bool { - return p.Interflow != nil -} - -func (p *TimParam) IsSetTLS() bool { - return p.TLS != nil -} - -func (p *TimParam) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - case 7: - if err := p.readField7(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimParam) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Timestamp = &v - } - return nil -} - -func (p *TimParam) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI16(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Version = &v - } - return nil -} - -func (p *TimParam) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.Lang = &v - } - return nil -} - -func (p *TimParam) readField4(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TimNode, 0, size) - p.ExtraList = tSlice - for i := 0; i < size; i++ { - _elem3 := &TimNode{} - if err := _elem3.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem3), err) - } - p.ExtraList = append(p.ExtraList, _elem3) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimParam) readField5(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key4 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key4 = v - } - var _val5 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val5 = v - } - p.ExtraMap[_key4] = _val5 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimParam) readField6(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 6: ", err) - } else { - p.Interflow = &v - } - return nil -} - -func (p *TimParam) readField7(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 7: ", err) - } else { - p.TLS = &v - } - return nil -} - -func (p *TimParam) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimParam"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := p.writeField7(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimParam) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetTimestamp() { - if err := oprot.WriteFieldBegin("timestamp", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:timestamp: ", p), err) - } - if err := oprot.WriteString(string(*p.Timestamp)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.timestamp (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:timestamp: ", p), err) - } - } - return err -} - -func (p *TimParam) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetVersion() { - if err := oprot.WriteFieldBegin("version", thrift.I16, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:version: ", p), err) - } - if err := oprot.WriteI16(int16(*p.Version)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.version (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:version: ", p), err) - } - } - return err -} - -func (p *TimParam) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetLang() { - if err := oprot.WriteFieldBegin("lang", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:lang: ", p), err) - } - if err := oprot.WriteString(string(*p.Lang)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.lang (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:lang: ", p), err) - } - } - return err -} - -func (p *TimParam) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraList() { - if err := oprot.WriteFieldBegin("extraList", thrift.LIST, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraList: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ExtraList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.ExtraList { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraList: ", p), err) - } - } - return err -} - -func (p *TimParam) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:extraMap: ", p), err) - } - } - return err -} - -func (p *TimParam) writeField6(oprot thrift.TProtocol) (err error) { - if p.IsSetInterflow() { - if err := oprot.WriteFieldBegin("interflow", thrift.STRING, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:interflow: ", p), err) - } - if err := oprot.WriteString(string(*p.Interflow)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.interflow (6) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:interflow: ", p), err) - } - } - return err -} - -func (p *TimParam) writeField7(oprot thrift.TProtocol) (err error) { - if p.IsSetTLS() { - if err := oprot.WriteFieldBegin("tls", thrift.STRING, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:tls: ", p), err) - } - if err := oprot.WriteString(string(*p.TLS)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.tls (7) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:tls: ", p), err) - } - } - return err -} - -func (p *TimParam) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimParam(%+v)", *p) -} - -// Attributes: -// - Timestamp: 时间戳 (毫秒) -// - Formattime: 格式化时间 -type TimTime struct { - Timestamp *string `thrift:"timestamp,1" json:"timestamp,omitempty"` - Formattime *string `thrift:"formattime,2" json:"formattime,omitempty"` -} - -func NewTimTime() *TimTime { - return &TimTime{} -} - -var TimTime_Timestamp_DEFAULT string - -func (p *TimTime) GetTimestamp() string { - if !p.IsSetTimestamp() { - return TimTime_Timestamp_DEFAULT - } - return *p.Timestamp -} - -var TimTime_Formattime_DEFAULT string - -func (p *TimTime) GetFormattime() string { - if !p.IsSetFormattime() { - return TimTime_Formattime_DEFAULT - } - return *p.Formattime -} -func (p *TimTime) IsSetTimestamp() bool { - return p.Timestamp != nil -} - -func (p *TimTime) IsSetFormattime() bool { - return p.Formattime != nil -} - -func (p *TimTime) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimTime) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Timestamp = &v - } - return nil -} - -func (p *TimTime) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Formattime = &v - } - return nil -} - -func (p *TimTime) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimTime"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimTime) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetTimestamp() { - if err := oprot.WriteFieldBegin("timestamp", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:timestamp: ", p), err) - } - if err := oprot.WriteString(string(*p.Timestamp)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.timestamp (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:timestamp: ", p), err) - } - } - return err -} - -func (p *TimTime) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetFormattime() { - if err := oprot.WriteFieldBegin("formattime", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:formattime: ", p), err) - } - if err := oprot.WriteString(string(*p.Formattime)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.formattime (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:formattime: ", p), err) - } - } - return err -} - -func (p *TimTime) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimTime(%+v)", *p) -} - -// Attributes: -// - Country: 国家 -// - Province: 省 -// - City: 市 -// - ExtraList: 附加信息:如区,镇,乡等 -// - ExtraMap -type TimArea struct { - Country *string `thrift:"country,1" json:"country,omitempty"` - Province *string `thrift:"province,2" json:"province,omitempty"` - City *string `thrift:"city,3" json:"city,omitempty"` - ExtraList []*TimNode `thrift:"extraList,4" json:"extraList,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,5" json:"extraMap,omitempty"` -} - -func NewTimArea() *TimArea { - return &TimArea{} -} - -var TimArea_Country_DEFAULT string - -func (p *TimArea) GetCountry() string { - if !p.IsSetCountry() { - return TimArea_Country_DEFAULT - } - return *p.Country -} - -var TimArea_Province_DEFAULT string - -func (p *TimArea) GetProvince() string { - if !p.IsSetProvince() { - return TimArea_Province_DEFAULT - } - return *p.Province -} - -var TimArea_City_DEFAULT string - -func (p *TimArea) GetCity() string { - if !p.IsSetCity() { - return TimArea_City_DEFAULT - } - return *p.City -} - -var TimArea_ExtraList_DEFAULT []*TimNode - -func (p *TimArea) GetExtraList() []*TimNode { - return p.ExtraList -} - -var TimArea_ExtraMap_DEFAULT map[string]string - -func (p *TimArea) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimArea) IsSetCountry() bool { - return p.Country != nil -} - -func (p *TimArea) IsSetProvince() bool { - return p.Province != nil -} - -func (p *TimArea) IsSetCity() bool { - return p.City != nil -} - -func (p *TimArea) IsSetExtraList() bool { - return p.ExtraList != nil -} - -func (p *TimArea) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimArea) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimArea) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Country = &v - } - return nil -} - -func (p *TimArea) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Province = &v - } - return nil -} - -func (p *TimArea) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.City = &v - } - return nil -} - -func (p *TimArea) readField4(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TimNode, 0, size) - p.ExtraList = tSlice - for i := 0; i < size; i++ { - _elem6 := &TimNode{} - if err := _elem6.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem6), err) - } - p.ExtraList = append(p.ExtraList, _elem6) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimArea) readField5(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key7 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key7 = v - } - var _val8 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val8 = v - } - p.ExtraMap[_key7] = _val8 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimArea) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimArea"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimArea) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetCountry() { - if err := oprot.WriteFieldBegin("country", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:country: ", p), err) - } - if err := oprot.WriteString(string(*p.Country)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.country (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:country: ", p), err) - } - } - return err -} - -func (p *TimArea) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetProvince() { - if err := oprot.WriteFieldBegin("province", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:province: ", p), err) - } - if err := oprot.WriteString(string(*p.Province)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.province (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:province: ", p), err) - } - } - return err -} - -func (p *TimArea) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetCity() { - if err := oprot.WriteFieldBegin("city", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:city: ", p), err) - } - if err := oprot.WriteString(string(*p.City)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.city (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:city: ", p), err) - } - } - return err -} - -func (p *TimArea) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraList() { - if err := oprot.WriteFieldBegin("extraList", thrift.LIST, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraList: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ExtraList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.ExtraList { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraList: ", p), err) - } - } - return err -} - -func (p *TimArea) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:extraMap: ", p), err) - } - } - return err -} - -func (p *TimArea) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimArea(%+v)", *p) -} - -// Attributes: -// - Name: 登陆名 用户登录号,房间号等 -// - Domain: 域名 用于区分渠道等 appid,appsecret -// - Resource: 系统 自行约定 如 : 1IOS,2android,3H5,4WEB 等 -// - Type: normal,group -// - ExtraList: 附加信息:如传递客户端信息 iphone6,xiaomi,huawei等 -// - ExtraMap -type Tid struct { - Name string `thrift:"name,1,required" json:"name"` - Domain *string `thrift:"domain,2" json:"domain,omitempty"` - Resource *string `thrift:"resource,3" json:"resource,omitempty"` - Type *string `thrift:"type,4" json:"type,omitempty"` - ExtraList []*TimNode `thrift:"extraList,5" json:"extraList,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,6" json:"extraMap,omitempty"` -} - -func NewTid() *Tid { - return &Tid{} -} - -func (p *Tid) GetName() string { - return p.Name -} - -var Tid_Domain_DEFAULT string - -func (p *Tid) GetDomain() string { - if !p.IsSetDomain() { - return Tid_Domain_DEFAULT - } - return *p.Domain -} - -var Tid_Resource_DEFAULT string - -func (p *Tid) GetResource() string { - if !p.IsSetResource() { - return Tid_Resource_DEFAULT - } - return *p.Resource -} - -var Tid_Type_DEFAULT string - -func (p *Tid) GetType() string { - if !p.IsSetType() { - return Tid_Type_DEFAULT - } - return *p.Type -} - -var Tid_ExtraList_DEFAULT []*TimNode - -func (p *Tid) GetExtraList() []*TimNode { - return p.ExtraList -} - -var Tid_ExtraMap_DEFAULT map[string]string - -func (p *Tid) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *Tid) IsSetDomain() bool { - return p.Domain != nil -} - -func (p *Tid) IsSetResource() bool { - return p.Resource != nil -} - -func (p *Tid) IsSetType() bool { - return p.Type != nil -} - -func (p *Tid) IsSetExtraList() bool { - return p.ExtraList != nil -} - -func (p *Tid) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *Tid) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetName bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetName = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetName { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Name is not set")) - } - return nil -} - -func (p *Tid) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Name = v - } - return nil -} - -func (p *Tid) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Domain = &v - } - return nil -} - -func (p *Tid) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.Resource = &v - } - return nil -} - -func (p *Tid) readField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 4: ", err) - } else { - p.Type = &v - } - return nil -} - -func (p *Tid) readField5(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TimNode, 0, size) - p.ExtraList = tSlice - for i := 0; i < size; i++ { - _elem9 := &TimNode{} - if err := _elem9.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem9), err) - } - p.ExtraList = append(p.ExtraList, _elem9) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *Tid) readField6(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key10 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key10 = v - } - var _val11 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val11 = v - } - p.ExtraMap[_key10] = _val11 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *Tid) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("Tid"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *Tid) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("name", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:name: ", p), err) - } - if err := oprot.WriteString(string(p.Name)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.name (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:name: ", p), err) - } - return err -} - -func (p *Tid) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetDomain() { - if err := oprot.WriteFieldBegin("domain", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:domain: ", p), err) - } - if err := oprot.WriteString(string(*p.Domain)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.domain (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:domain: ", p), err) - } - } - return err -} - -func (p *Tid) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetResource() { - if err := oprot.WriteFieldBegin("resource", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:resource: ", p), err) - } - if err := oprot.WriteString(string(*p.Resource)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.resource (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:resource: ", p), err) - } - } - return err -} - -func (p *Tid) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetType() { - if err := oprot.WriteFieldBegin("type", thrift.STRING, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:type: ", p), err) - } - if err := oprot.WriteString(string(*p.Type)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.type (4) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:type: ", p), err) - } - } - return err -} - -func (p *Tid) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraList() { - if err := oprot.WriteFieldBegin("extraList", thrift.LIST, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:extraList: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ExtraList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.ExtraList { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:extraList: ", p), err) - } - } - return err -} - -func (p *Tid) writeField6(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:extraMap: ", p), err) - } - } - return err -} - -func (p *Tid) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("Tid(%+v)", *p) -} - -// Attributes: -// - Tid: 用户bean -// - Nickname: 昵称 -// - Remarkname: 备注名称 -// - Brithday: 生日 2000-01-01 -// - Gender: 性别 自行约定 如 : 0不知,1男,2女 -// - Headurl: 头像地址 http://xxx.jpg -// - Area: 地区 -// - Headbyte: 头像 -// - PhotoBytes: 其他图片 -// - ExtraList: 扩展字段 -// - ExtraMap -type TimUserBean struct { - Tid *Tid `thrift:"tid,1" json:"tid,omitempty"` - Nickname *string `thrift:"nickname,2" json:"nickname,omitempty"` - Remarkname *string `thrift:"remarkname,3" json:"remarkname,omitempty"` - Brithday *string `thrift:"brithday,4" json:"brithday,omitempty"` - Gender *int16 `thrift:"gender,5" json:"gender,omitempty"` - Headurl *string `thrift:"headurl,6" json:"headurl,omitempty"` - Area *TimArea `thrift:"area,7" json:"area,omitempty"` - Headbyte []byte `thrift:"headbyte,8" json:"headbyte,omitempty"` - PhotoBytes [][]byte `thrift:"photoBytes,9" json:"photoBytes,omitempty"` - ExtraList []*TimNode `thrift:"extraList,10" json:"extraList,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,11" json:"extraMap,omitempty"` -} - -func NewTimUserBean() *TimUserBean { - return &TimUserBean{} -} - -var TimUserBean_Tid_DEFAULT *Tid - -func (p *TimUserBean) GetTid() *Tid { - if !p.IsSetTid() { - return TimUserBean_Tid_DEFAULT - } - return p.Tid -} - -var TimUserBean_Nickname_DEFAULT string - -func (p *TimUserBean) GetNickname() string { - if !p.IsSetNickname() { - return TimUserBean_Nickname_DEFAULT - } - return *p.Nickname -} - -var TimUserBean_Remarkname_DEFAULT string - -func (p *TimUserBean) GetRemarkname() string { - if !p.IsSetRemarkname() { - return TimUserBean_Remarkname_DEFAULT - } - return *p.Remarkname -} - -var TimUserBean_Brithday_DEFAULT string - -func (p *TimUserBean) GetBrithday() string { - if !p.IsSetBrithday() { - return TimUserBean_Brithday_DEFAULT - } - return *p.Brithday -} - -var TimUserBean_Gender_DEFAULT int16 - -func (p *TimUserBean) GetGender() int16 { - if !p.IsSetGender() { - return TimUserBean_Gender_DEFAULT - } - return *p.Gender -} - -var TimUserBean_Headurl_DEFAULT string - -func (p *TimUserBean) GetHeadurl() string { - if !p.IsSetHeadurl() { - return TimUserBean_Headurl_DEFAULT - } - return *p.Headurl -} - -var TimUserBean_Area_DEFAULT *TimArea - -func (p *TimUserBean) GetArea() *TimArea { - if !p.IsSetArea() { - return TimUserBean_Area_DEFAULT - } - return p.Area -} - -var TimUserBean_Headbyte_DEFAULT []byte - -func (p *TimUserBean) GetHeadbyte() []byte { - return p.Headbyte -} - -var TimUserBean_PhotoBytes_DEFAULT [][]byte - -func (p *TimUserBean) GetPhotoBytes() [][]byte { - return p.PhotoBytes -} - -var TimUserBean_ExtraList_DEFAULT []*TimNode - -func (p *TimUserBean) GetExtraList() []*TimNode { - return p.ExtraList -} - -var TimUserBean_ExtraMap_DEFAULT map[string]string - -func (p *TimUserBean) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimUserBean) IsSetTid() bool { - return p.Tid != nil -} - -func (p *TimUserBean) IsSetNickname() bool { - return p.Nickname != nil -} - -func (p *TimUserBean) IsSetRemarkname() bool { - return p.Remarkname != nil -} - -func (p *TimUserBean) IsSetBrithday() bool { - return p.Brithday != nil -} - -func (p *TimUserBean) IsSetGender() bool { - return p.Gender != nil -} - -func (p *TimUserBean) IsSetHeadurl() bool { - return p.Headurl != nil -} - -func (p *TimUserBean) IsSetArea() bool { - return p.Area != nil -} - -func (p *TimUserBean) IsSetHeadbyte() bool { - return p.Headbyte != nil -} - -func (p *TimUserBean) IsSetPhotoBytes() bool { - return p.PhotoBytes != nil -} - -func (p *TimUserBean) IsSetExtraList() bool { - return p.ExtraList != nil -} - -func (p *TimUserBean) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimUserBean) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - case 7: - if err := p.readField7(iprot); err != nil { - return err - } - case 8: - if err := p.readField8(iprot); err != nil { - return err - } - case 9: - if err := p.readField9(iprot); err != nil { - return err - } - case 10: - if err := p.readField10(iprot); err != nil { - return err - } - case 11: - if err := p.readField11(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimUserBean) readField1(iprot thrift.TProtocol) error { - p.Tid = &Tid{} - if err := p.Tid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) - } - return nil -} - -func (p *TimUserBean) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Nickname = &v - } - return nil -} - -func (p *TimUserBean) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.Remarkname = &v - } - return nil -} - -func (p *TimUserBean) readField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 4: ", err) - } else { - p.Brithday = &v - } - return nil -} - -func (p *TimUserBean) readField5(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI16(); err != nil { - return thrift.PrependError("error reading field 5: ", err) - } else { - p.Gender = &v - } - return nil -} - -func (p *TimUserBean) readField6(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 6: ", err) - } else { - p.Headurl = &v - } - return nil -} - -func (p *TimUserBean) readField7(iprot thrift.TProtocol) error { - p.Area = &TimArea{} - if err := p.Area.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Area), err) - } - return nil -} - -func (p *TimUserBean) readField8(iprot thrift.TProtocol) error { - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 8: ", err) - } else { - p.Headbyte = v - } - return nil -} - -func (p *TimUserBean) readField9(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([][]byte, 0, size) - p.PhotoBytes = tSlice - for i := 0; i < size; i++ { - var _elem12 []byte - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _elem12 = v - } - p.PhotoBytes = append(p.PhotoBytes, _elem12) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimUserBean) readField10(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TimNode, 0, size) - p.ExtraList = tSlice - for i := 0; i < size; i++ { - _elem13 := &TimNode{} - if err := _elem13.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem13), err) - } - p.ExtraList = append(p.ExtraList, _elem13) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimUserBean) readField11(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key14 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key14 = v - } - var _val15 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val15 = v - } - p.ExtraMap[_key14] = _val15 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimUserBean) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimUserBean"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := p.writeField7(oprot); err != nil { - return err - } - if err := p.writeField8(oprot); err != nil { - return err - } - if err := p.writeField9(oprot); err != nil { - return err - } - if err := p.writeField10(oprot); err != nil { - return err - } - if err := p.writeField11(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimUserBean) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetTid() { - if err := oprot.WriteFieldBegin("tid", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) - } - if err := p.Tid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) - } - } - return err -} - -func (p *TimUserBean) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetNickname() { - if err := oprot.WriteFieldBegin("nickname", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:nickname: ", p), err) - } - if err := oprot.WriteString(string(*p.Nickname)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.nickname (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:nickname: ", p), err) - } - } - return err -} - -func (p *TimUserBean) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetRemarkname() { - if err := oprot.WriteFieldBegin("remarkname", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:remarkname: ", p), err) - } - if err := oprot.WriteString(string(*p.Remarkname)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.remarkname (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:remarkname: ", p), err) - } - } - return err -} - -func (p *TimUserBean) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetBrithday() { - if err := oprot.WriteFieldBegin("brithday", thrift.STRING, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:brithday: ", p), err) - } - if err := oprot.WriteString(string(*p.Brithday)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.brithday (4) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:brithday: ", p), err) - } - } - return err -} - -func (p *TimUserBean) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetGender() { - if err := oprot.WriteFieldBegin("gender", thrift.I16, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:gender: ", p), err) - } - if err := oprot.WriteI16(int16(*p.Gender)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.gender (5) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:gender: ", p), err) - } - } - return err -} - -func (p *TimUserBean) writeField6(oprot thrift.TProtocol) (err error) { - if p.IsSetHeadurl() { - if err := oprot.WriteFieldBegin("headurl", thrift.STRING, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:headurl: ", p), err) - } - if err := oprot.WriteString(string(*p.Headurl)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.headurl (6) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:headurl: ", p), err) - } - } - return err -} - -func (p *TimUserBean) writeField7(oprot thrift.TProtocol) (err error) { - if p.IsSetArea() { - if err := oprot.WriteFieldBegin("area", thrift.STRUCT, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:area: ", p), err) - } - if err := p.Area.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Area), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:area: ", p), err) - } - } - return err -} - -func (p *TimUserBean) writeField8(oprot thrift.TProtocol) (err error) { - if p.IsSetHeadbyte() { - if err := oprot.WriteFieldBegin("headbyte", thrift.STRING, 8); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:headbyte: ", p), err) - } - if err := oprot.WriteBinary(p.Headbyte); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.headbyte (8) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 8:headbyte: ", p), err) - } - } - return err -} - -func (p *TimUserBean) writeField9(oprot thrift.TProtocol) (err error) { - if p.IsSetPhotoBytes() { - if err := oprot.WriteFieldBegin("photoBytes", thrift.LIST, 9); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:photoBytes: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRING, len(p.PhotoBytes)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.PhotoBytes { - if err := oprot.WriteBinary(v); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 9:photoBytes: ", p), err) - } - } - return err -} - -func (p *TimUserBean) writeField10(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraList() { - if err := oprot.WriteFieldBegin("extraList", thrift.LIST, 10); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:extraList: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ExtraList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.ExtraList { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 10:extraList: ", p), err) - } - } - return err -} - -func (p *TimUserBean) writeField11(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 11); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 11:extraMap: ", p), err) - } - } - return err -} - -func (p *TimUserBean) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimUserBean(%+v)", *p) -} - -// Attributes: -// - Tid: 房间Tid -// - FounderTid: 创建人Tid -// - HostsTid: 主持人Tid -// - MembersTid: memberTid -// - Headurl: 头像地址 http://xxx.jpg -// - RoomName: 房间名称 -// - Desc: 房间说明 -// - CreateTime: 房间创建时间 -// - ExtraList: 扩展字段 -// - ExtraMap -type TimRoom struct { - Tid *Tid `thrift:"tid,1" json:"tid,omitempty"` - FounderTid *Tid `thrift:"founderTid,2" json:"founderTid,omitempty"` - HostsTid []*Tid `thrift:"HostsTid,3" json:"HostsTid,omitempty"` - MembersTid []*Tid `thrift:"membersTid,4" json:"membersTid,omitempty"` - Headurl *string `thrift:"headurl,5" json:"headurl,omitempty"` - RoomName *string `thrift:"roomName,6" json:"roomName,omitempty"` - Desc *string `thrift:"desc,7" json:"desc,omitempty"` - CreateTime *TimTime `thrift:"createTime,8" json:"createTime,omitempty"` - ExtraList []*TimNode `thrift:"extraList,9" json:"extraList,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,10" json:"extraMap,omitempty"` -} - -func NewTimRoom() *TimRoom { - return &TimRoom{} -} - -var TimRoom_Tid_DEFAULT *Tid - -func (p *TimRoom) GetTid() *Tid { - if !p.IsSetTid() { - return TimRoom_Tid_DEFAULT - } - return p.Tid -} - -var TimRoom_FounderTid_DEFAULT *Tid - -func (p *TimRoom) GetFounderTid() *Tid { - if !p.IsSetFounderTid() { - return TimRoom_FounderTid_DEFAULT - } - return p.FounderTid -} - -var TimRoom_HostsTid_DEFAULT []*Tid - -func (p *TimRoom) GetHostsTid() []*Tid { - return p.HostsTid -} - -var TimRoom_MembersTid_DEFAULT []*Tid - -func (p *TimRoom) GetMembersTid() []*Tid { - return p.MembersTid -} - -var TimRoom_Headurl_DEFAULT string - -func (p *TimRoom) GetHeadurl() string { - if !p.IsSetHeadurl() { - return TimRoom_Headurl_DEFAULT - } - return *p.Headurl -} - -var TimRoom_RoomName_DEFAULT string - -func (p *TimRoom) GetRoomName() string { - if !p.IsSetRoomName() { - return TimRoom_RoomName_DEFAULT - } - return *p.RoomName -} - -var TimRoom_Desc_DEFAULT string - -func (p *TimRoom) GetDesc() string { - if !p.IsSetDesc() { - return TimRoom_Desc_DEFAULT - } - return *p.Desc -} - -var TimRoom_CreateTime_DEFAULT *TimTime - -func (p *TimRoom) GetCreateTime() *TimTime { - if !p.IsSetCreateTime() { - return TimRoom_CreateTime_DEFAULT - } - return p.CreateTime -} - -var TimRoom_ExtraList_DEFAULT []*TimNode - -func (p *TimRoom) GetExtraList() []*TimNode { - return p.ExtraList -} - -var TimRoom_ExtraMap_DEFAULT map[string]string - -func (p *TimRoom) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimRoom) IsSetTid() bool { - return p.Tid != nil -} - -func (p *TimRoom) IsSetFounderTid() bool { - return p.FounderTid != nil -} - -func (p *TimRoom) IsSetHostsTid() bool { - return p.HostsTid != nil -} - -func (p *TimRoom) IsSetMembersTid() bool { - return p.MembersTid != nil -} - -func (p *TimRoom) IsSetHeadurl() bool { - return p.Headurl != nil -} - -func (p *TimRoom) IsSetRoomName() bool { - return p.RoomName != nil -} - -func (p *TimRoom) IsSetDesc() bool { - return p.Desc != nil -} - -func (p *TimRoom) IsSetCreateTime() bool { - return p.CreateTime != nil -} - -func (p *TimRoom) IsSetExtraList() bool { - return p.ExtraList != nil -} - -func (p *TimRoom) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimRoom) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - case 7: - if err := p.readField7(iprot); err != nil { - return err - } - case 8: - if err := p.readField8(iprot); err != nil { - return err - } - case 9: - if err := p.readField9(iprot); err != nil { - return err - } - case 10: - if err := p.readField10(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimRoom) readField1(iprot thrift.TProtocol) error { - p.Tid = &Tid{} - if err := p.Tid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) - } - return nil -} - -func (p *TimRoom) readField2(iprot thrift.TProtocol) error { - p.FounderTid = &Tid{} - if err := p.FounderTid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.FounderTid), err) - } - return nil -} - -func (p *TimRoom) readField3(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*Tid, 0, size) - p.HostsTid = tSlice - for i := 0; i < size; i++ { - _elem16 := &Tid{} - if err := _elem16.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem16), err) - } - p.HostsTid = append(p.HostsTid, _elem16) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimRoom) readField4(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*Tid, 0, size) - p.MembersTid = tSlice - for i := 0; i < size; i++ { - _elem17 := &Tid{} - if err := _elem17.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem17), err) - } - p.MembersTid = append(p.MembersTid, _elem17) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimRoom) readField5(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 5: ", err) - } else { - p.Headurl = &v - } - return nil -} - -func (p *TimRoom) readField6(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 6: ", err) - } else { - p.RoomName = &v - } - return nil -} - -func (p *TimRoom) readField7(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 7: ", err) - } else { - p.Desc = &v - } - return nil -} - -func (p *TimRoom) readField8(iprot thrift.TProtocol) error { - p.CreateTime = &TimTime{} - if err := p.CreateTime.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.CreateTime), err) - } - return nil -} - -func (p *TimRoom) readField9(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TimNode, 0, size) - p.ExtraList = tSlice - for i := 0; i < size; i++ { - _elem18 := &TimNode{} - if err := _elem18.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem18), err) - } - p.ExtraList = append(p.ExtraList, _elem18) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimRoom) readField10(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key19 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key19 = v - } - var _val20 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val20 = v - } - p.ExtraMap[_key19] = _val20 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimRoom) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimRoom"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := p.writeField7(oprot); err != nil { - return err - } - if err := p.writeField8(oprot); err != nil { - return err - } - if err := p.writeField9(oprot); err != nil { - return err - } - if err := p.writeField10(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimRoom) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetTid() { - if err := oprot.WriteFieldBegin("tid", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tid: ", p), err) - } - if err := p.Tid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tid: ", p), err) - } - } - return err -} - -func (p *TimRoom) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetFounderTid() { - if err := oprot.WriteFieldBegin("founderTid", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:founderTid: ", p), err) - } - if err := p.FounderTid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.FounderTid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:founderTid: ", p), err) - } - } - return err -} - -func (p *TimRoom) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetHostsTid() { - if err := oprot.WriteFieldBegin("HostsTid", thrift.LIST, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:HostsTid: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.HostsTid)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.HostsTid { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:HostsTid: ", p), err) - } - } - return err -} - -func (p *TimRoom) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetMembersTid() { - if err := oprot.WriteFieldBegin("membersTid", thrift.LIST, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:membersTid: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.MembersTid)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.MembersTid { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:membersTid: ", p), err) - } - } - return err -} - -func (p *TimRoom) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetHeadurl() { - if err := oprot.WriteFieldBegin("headurl", thrift.STRING, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:headurl: ", p), err) - } - if err := oprot.WriteString(string(*p.Headurl)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.headurl (5) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:headurl: ", p), err) - } - } - return err -} - -func (p *TimRoom) writeField6(oprot thrift.TProtocol) (err error) { - if p.IsSetRoomName() { - if err := oprot.WriteFieldBegin("roomName", thrift.STRING, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:roomName: ", p), err) - } - if err := oprot.WriteString(string(*p.RoomName)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.roomName (6) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:roomName: ", p), err) - } - } - return err -} - -func (p *TimRoom) writeField7(oprot thrift.TProtocol) (err error) { - if p.IsSetDesc() { - if err := oprot.WriteFieldBegin("desc", thrift.STRING, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:desc: ", p), err) - } - if err := oprot.WriteString(string(*p.Desc)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.desc (7) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:desc: ", p), err) - } - } - return err -} - -func (p *TimRoom) writeField8(oprot thrift.TProtocol) (err error) { - if p.IsSetCreateTime() { - if err := oprot.WriteFieldBegin("createTime", thrift.STRUCT, 8); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:createTime: ", p), err) - } - if err := p.CreateTime.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.CreateTime), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 8:createTime: ", p), err) - } - } - return err -} - -func (p *TimRoom) writeField9(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraList() { - if err := oprot.WriteFieldBegin("extraList", thrift.LIST, 9); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:extraList: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ExtraList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.ExtraList { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 9:extraList: ", p), err) - } - } - return err -} - -func (p *TimRoom) writeField10(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 10); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 10:extraMap: ", p), err) - } - } - return err -} - -func (p *TimRoom) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimRoom(%+v)", *p) -} - -// Attributes: -// - ThreadId: 标识 -// - FromTid -// - ToTid -// - Status: subscribe:订阅其他用户的状态 probe:请求获取其他用户的状态 unavailable:不可用,离线(offline)状态 -// - Type: normal:类似于email,主要特点是不要求响应; -// chat:类似于qq里的好友即时聊天,主要特点是实时通讯; -// groupchat:类似于聊天室里的群聊; -// headline:用于发送alert和notification; -// error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; -// - Priority: 优先权 0 。高优先级的resource能接受发送到bare JID的消息,低优先级的resource不能 -// - Show: chat:聊天中 away:暂时离开 xa:eXtend Away,长时间离开 dnd:勿打扰 online:在线 offline:离线 -// - LeaguerTid: 成员Tid 群聊时信息发送者Tid -// - ExtraList: 扩展字段 -// - Error: 错误码 -// - ExtraMap -type TimPBean struct { - ThreadId string `thrift:"threadId,1,required" json:"threadId"` - FromTid *Tid `thrift:"fromTid,2" json:"fromTid,omitempty"` - ToTid *Tid `thrift:"toTid,3" json:"toTid,omitempty"` - Status *string `thrift:"status,4" json:"status,omitempty"` - Type *string `thrift:"type,5" json:"type,omitempty"` - Priority *int32 `thrift:"priority,6" json:"priority,omitempty"` - Show *string `thrift:"show,7" json:"show,omitempty"` - LeaguerTid *Tid `thrift:"leaguerTid,8" json:"leaguerTid,omitempty"` - ExtraList []*TimNode `thrift:"extraList,9" json:"extraList,omitempty"` - Error *TimError `thrift:"error,10" json:"error,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,11" json:"extraMap,omitempty"` -} - -func NewTimPBean() *TimPBean { - return &TimPBean{} -} - -func (p *TimPBean) GetThreadId() string { - return p.ThreadId -} - -var TimPBean_FromTid_DEFAULT *Tid - -func (p *TimPBean) GetFromTid() *Tid { - if !p.IsSetFromTid() { - return TimPBean_FromTid_DEFAULT - } - return p.FromTid -} - -var TimPBean_ToTid_DEFAULT *Tid - -func (p *TimPBean) GetToTid() *Tid { - if !p.IsSetToTid() { - return TimPBean_ToTid_DEFAULT - } - return p.ToTid -} - -var TimPBean_Status_DEFAULT string - -func (p *TimPBean) GetStatus() string { - if !p.IsSetStatus() { - return TimPBean_Status_DEFAULT - } - return *p.Status -} - -var TimPBean_Type_DEFAULT string - -func (p *TimPBean) GetType() string { - if !p.IsSetType() { - return TimPBean_Type_DEFAULT - } - return *p.Type -} - -var TimPBean_Priority_DEFAULT int32 - -func (p *TimPBean) GetPriority() int32 { - if !p.IsSetPriority() { - return TimPBean_Priority_DEFAULT - } - return *p.Priority -} - -var TimPBean_Show_DEFAULT string - -func (p *TimPBean) GetShow() string { - if !p.IsSetShow() { - return TimPBean_Show_DEFAULT - } - return *p.Show -} - -var TimPBean_LeaguerTid_DEFAULT *Tid - -func (p *TimPBean) GetLeaguerTid() *Tid { - if !p.IsSetLeaguerTid() { - return TimPBean_LeaguerTid_DEFAULT - } - return p.LeaguerTid -} - -var TimPBean_ExtraList_DEFAULT []*TimNode - -func (p *TimPBean) GetExtraList() []*TimNode { - return p.ExtraList -} - -var TimPBean_Error_DEFAULT *TimError - -func (p *TimPBean) GetError() *TimError { - if !p.IsSetError() { - return TimPBean_Error_DEFAULT - } - return p.Error -} - -var TimPBean_ExtraMap_DEFAULT map[string]string - -func (p *TimPBean) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimPBean) IsSetFromTid() bool { - return p.FromTid != nil -} - -func (p *TimPBean) IsSetToTid() bool { - return p.ToTid != nil -} - -func (p *TimPBean) IsSetStatus() bool { - return p.Status != nil -} - -func (p *TimPBean) IsSetType() bool { - return p.Type != nil -} - -func (p *TimPBean) IsSetPriority() bool { - return p.Priority != nil -} - -func (p *TimPBean) IsSetShow() bool { - return p.Show != nil -} - -func (p *TimPBean) IsSetLeaguerTid() bool { - return p.LeaguerTid != nil -} - -func (p *TimPBean) IsSetExtraList() bool { - return p.ExtraList != nil -} - -func (p *TimPBean) IsSetError() bool { - return p.Error != nil -} - -func (p *TimPBean) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimPBean) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetThreadId bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetThreadId = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - case 7: - if err := p.readField7(iprot); err != nil { - return err - } - case 8: - if err := p.readField8(iprot); err != nil { - return err - } - case 9: - if err := p.readField9(iprot); err != nil { - return err - } - case 10: - if err := p.readField10(iprot); err != nil { - return err - } - case 11: - if err := p.readField11(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetThreadId { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ThreadId is not set")) - } - return nil -} - -func (p *TimPBean) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.ThreadId = v - } - return nil -} - -func (p *TimPBean) readField2(iprot thrift.TProtocol) error { - p.FromTid = &Tid{} - if err := p.FromTid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.FromTid), err) - } - return nil -} - -func (p *TimPBean) readField3(iprot thrift.TProtocol) error { - p.ToTid = &Tid{} - if err := p.ToTid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ToTid), err) - } - return nil -} - -func (p *TimPBean) readField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 4: ", err) - } else { - p.Status = &v - } - return nil -} - -func (p *TimPBean) readField5(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 5: ", err) - } else { - p.Type = &v - } - return nil -} - -func (p *TimPBean) readField6(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 6: ", err) - } else { - p.Priority = &v - } - return nil -} - -func (p *TimPBean) readField7(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 7: ", err) - } else { - p.Show = &v - } - return nil -} - -func (p *TimPBean) readField8(iprot thrift.TProtocol) error { - p.LeaguerTid = &Tid{} - if err := p.LeaguerTid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.LeaguerTid), err) - } - return nil -} - -func (p *TimPBean) readField9(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TimNode, 0, size) - p.ExtraList = tSlice - for i := 0; i < size; i++ { - _elem21 := &TimNode{} - if err := _elem21.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem21), err) - } - p.ExtraList = append(p.ExtraList, _elem21) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimPBean) readField10(iprot thrift.TProtocol) error { - p.Error = &TimError{} - if err := p.Error.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Error), err) - } - return nil -} - -func (p *TimPBean) readField11(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key22 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key22 = v - } - var _val23 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val23 = v - } - p.ExtraMap[_key22] = _val23 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimPBean) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimPBean"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := p.writeField7(oprot); err != nil { - return err - } - if err := p.writeField8(oprot); err != nil { - return err - } - if err := p.writeField9(oprot); err != nil { - return err - } - if err := p.writeField10(oprot); err != nil { - return err - } - if err := p.writeField11(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimPBean) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("threadId", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) - } - if err := oprot.WriteString(string(p.ThreadId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) - } - return err -} - -func (p *TimPBean) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetFromTid() { - if err := oprot.WriteFieldBegin("fromTid", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:fromTid: ", p), err) - } - if err := p.FromTid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.FromTid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:fromTid: ", p), err) - } - } - return err -} - -func (p *TimPBean) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetToTid() { - if err := oprot.WriteFieldBegin("toTid", thrift.STRUCT, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:toTid: ", p), err) - } - if err := p.ToTid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ToTid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:toTid: ", p), err) - } - } - return err -} - -func (p *TimPBean) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetStatus() { - if err := oprot.WriteFieldBegin("status", thrift.STRING, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:status: ", p), err) - } - if err := oprot.WriteString(string(*p.Status)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.status (4) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:status: ", p), err) - } - } - return err -} - -func (p *TimPBean) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetType() { - if err := oprot.WriteFieldBegin("type", thrift.STRING, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:type: ", p), err) - } - if err := oprot.WriteString(string(*p.Type)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.type (5) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:type: ", p), err) - } - } - return err -} - -func (p *TimPBean) writeField6(oprot thrift.TProtocol) (err error) { - if p.IsSetPriority() { - if err := oprot.WriteFieldBegin("priority", thrift.I32, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:priority: ", p), err) - } - if err := oprot.WriteI32(int32(*p.Priority)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.priority (6) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:priority: ", p), err) - } - } - return err -} - -func (p *TimPBean) writeField7(oprot thrift.TProtocol) (err error) { - if p.IsSetShow() { - if err := oprot.WriteFieldBegin("show", thrift.STRING, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:show: ", p), err) - } - if err := oprot.WriteString(string(*p.Show)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.show (7) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:show: ", p), err) - } - } - return err -} - -func (p *TimPBean) writeField8(oprot thrift.TProtocol) (err error) { - if p.IsSetLeaguerTid() { - if err := oprot.WriteFieldBegin("leaguerTid", thrift.STRUCT, 8); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:leaguerTid: ", p), err) - } - if err := p.LeaguerTid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.LeaguerTid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 8:leaguerTid: ", p), err) - } - } - return err -} - -func (p *TimPBean) writeField9(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraList() { - if err := oprot.WriteFieldBegin("extraList", thrift.LIST, 9); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:extraList: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ExtraList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.ExtraList { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 9:extraList: ", p), err) - } - } - return err -} - -func (p *TimPBean) writeField10(oprot thrift.TProtocol) (err error) { - if p.IsSetError() { - if err := oprot.WriteFieldBegin("error", thrift.STRUCT, 10); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:error: ", p), err) - } - if err := p.Error.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Error), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 10:error: ", p), err) - } - } - return err -} - -func (p *TimPBean) writeField11(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 11); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 11:extraMap: ", p), err) - } - } - return err -} - -func (p *TimPBean) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimPBean(%+v)", *p) -} - -// Attributes: -// - ThreadId: 线程id -// - Mid: 消息id号 -// - FromTid: 来源Tid -// - ToTid: 目标Tid -// - Body: 信息内容 -// - Type: normal:类似于email,主要特点是不要求响应; -// chat:类似于qq里的好友即时聊天,主要特点是实时通讯; -// groupchat:类似于聊天室里的群聊; -// headline:用于发送alert和notification; -// error:如果发送message出错,发现错误的实体会用这个类别来通知发送者出错了; -// - MsgType: 消息类型 1 文字 2 图片 3 语音 4视频 5混合 -// - Offline: 是否离线信息 -// - LeaguerTid: 成员Tid 群聊时信息发送者Tid -// - ExtraList: 扩展字段 -// - Timestamp: 服务器发送信息时间戳(毫秒) -// - Error: 错误码 -// - ExtraMap -// - Readstatus: 0未读 1已读 -type TimMBean struct { - ThreadId string `thrift:"threadId,1,required" json:"threadId"` - Mid *string `thrift:"mid,2" json:"mid,omitempty"` - FromTid *Tid `thrift:"fromTid,3" json:"fromTid,omitempty"` - ToTid *Tid `thrift:"toTid,4" json:"toTid,omitempty"` - Body *string `thrift:"body,5" json:"body,omitempty"` - Type *string `thrift:"type,6" json:"type,omitempty"` - MsgType *int16 `thrift:"msgType,7" json:"msgType,omitempty"` - Offline *TimTime `thrift:"offline,8" json:"offline,omitempty"` - LeaguerTid *Tid `thrift:"leaguerTid,9" json:"leaguerTid,omitempty"` - ExtraList []*TimNode `thrift:"extraList,10" json:"extraList,omitempty"` - Timestamp *string `thrift:"timestamp,11" json:"timestamp,omitempty"` - Error *TimError `thrift:"error,12" json:"error,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,13" json:"extraMap,omitempty"` - Readstatus *int16 `thrift:"readstatus,14" json:"readstatus,omitempty"` -} - -func NewTimMBean() *TimMBean { - return &TimMBean{} -} - -func (p *TimMBean) GetThreadId() string { - return p.ThreadId -} - -var TimMBean_Mid_DEFAULT string - -func (p *TimMBean) GetMid() string { - if !p.IsSetMid() { - return TimMBean_Mid_DEFAULT - } - return *p.Mid -} - -var TimMBean_FromTid_DEFAULT *Tid - -func (p *TimMBean) GetFromTid() *Tid { - if !p.IsSetFromTid() { - return TimMBean_FromTid_DEFAULT - } - return p.FromTid -} - -var TimMBean_ToTid_DEFAULT *Tid - -func (p *TimMBean) GetToTid() *Tid { - if !p.IsSetToTid() { - return TimMBean_ToTid_DEFAULT - } - return p.ToTid -} - -var TimMBean_Body_DEFAULT string - -func (p *TimMBean) GetBody() string { - if !p.IsSetBody() { - return TimMBean_Body_DEFAULT - } - return *p.Body -} - -var TimMBean_Type_DEFAULT string - -func (p *TimMBean) GetType() string { - if !p.IsSetType() { - return TimMBean_Type_DEFAULT - } - return *p.Type -} - -var TimMBean_MsgType_DEFAULT int16 - -func (p *TimMBean) GetMsgType() int16 { - if !p.IsSetMsgType() { - return TimMBean_MsgType_DEFAULT - } - return *p.MsgType -} - -var TimMBean_Offline_DEFAULT *TimTime - -func (p *TimMBean) GetOffline() *TimTime { - if !p.IsSetOffline() { - return TimMBean_Offline_DEFAULT - } - return p.Offline -} - -var TimMBean_LeaguerTid_DEFAULT *Tid - -func (p *TimMBean) GetLeaguerTid() *Tid { - if !p.IsSetLeaguerTid() { - return TimMBean_LeaguerTid_DEFAULT - } - return p.LeaguerTid -} - -var TimMBean_ExtraList_DEFAULT []*TimNode - -func (p *TimMBean) GetExtraList() []*TimNode { - return p.ExtraList -} - -var TimMBean_Timestamp_DEFAULT string - -func (p *TimMBean) GetTimestamp() string { - if !p.IsSetTimestamp() { - return TimMBean_Timestamp_DEFAULT - } - return *p.Timestamp -} - -var TimMBean_Error_DEFAULT *TimError - -func (p *TimMBean) GetError() *TimError { - if !p.IsSetError() { - return TimMBean_Error_DEFAULT - } - return p.Error -} - -var TimMBean_ExtraMap_DEFAULT map[string]string - -func (p *TimMBean) GetExtraMap() map[string]string { - return p.ExtraMap -} - -var TimMBean_Readstatus_DEFAULT int16 - -func (p *TimMBean) GetReadstatus() int16 { - if !p.IsSetReadstatus() { - return TimMBean_Readstatus_DEFAULT - } - return *p.Readstatus -} -func (p *TimMBean) IsSetMid() bool { - return p.Mid != nil -} - -func (p *TimMBean) IsSetFromTid() bool { - return p.FromTid != nil -} - -func (p *TimMBean) IsSetToTid() bool { - return p.ToTid != nil -} - -func (p *TimMBean) IsSetBody() bool { - return p.Body != nil -} - -func (p *TimMBean) IsSetType() bool { - return p.Type != nil -} - -func (p *TimMBean) IsSetMsgType() bool { - return p.MsgType != nil -} - -func (p *TimMBean) IsSetOffline() bool { - return p.Offline != nil -} - -func (p *TimMBean) IsSetLeaguerTid() bool { - return p.LeaguerTid != nil -} - -func (p *TimMBean) IsSetExtraList() bool { - return p.ExtraList != nil -} - -func (p *TimMBean) IsSetTimestamp() bool { - return p.Timestamp != nil -} - -func (p *TimMBean) IsSetError() bool { - return p.Error != nil -} - -func (p *TimMBean) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimMBean) IsSetReadstatus() bool { - return p.Readstatus != nil -} - -func (p *TimMBean) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetThreadId bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetThreadId = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - case 7: - if err := p.readField7(iprot); err != nil { - return err - } - case 8: - if err := p.readField8(iprot); err != nil { - return err - } - case 9: - if err := p.readField9(iprot); err != nil { - return err - } - case 10: - if err := p.readField10(iprot); err != nil { - return err - } - case 11: - if err := p.readField11(iprot); err != nil { - return err - } - case 12: - if err := p.readField12(iprot); err != nil { - return err - } - case 13: - if err := p.readField13(iprot); err != nil { - return err - } - case 14: - if err := p.readField14(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetThreadId { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ThreadId is not set")) - } - return nil -} - -func (p *TimMBean) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.ThreadId = v - } - return nil -} - -func (p *TimMBean) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Mid = &v - } - return nil -} - -func (p *TimMBean) readField3(iprot thrift.TProtocol) error { - p.FromTid = &Tid{} - if err := p.FromTid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.FromTid), err) - } - return nil -} - -func (p *TimMBean) readField4(iprot thrift.TProtocol) error { - p.ToTid = &Tid{} - if err := p.ToTid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ToTid), err) - } - return nil -} - -func (p *TimMBean) readField5(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 5: ", err) - } else { - p.Body = &v - } - return nil -} - -func (p *TimMBean) readField6(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 6: ", err) - } else { - p.Type = &v - } - return nil -} - -func (p *TimMBean) readField7(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI16(); err != nil { - return thrift.PrependError("error reading field 7: ", err) - } else { - p.MsgType = &v - } - return nil -} - -func (p *TimMBean) readField8(iprot thrift.TProtocol) error { - p.Offline = &TimTime{} - if err := p.Offline.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Offline), err) - } - return nil -} - -func (p *TimMBean) readField9(iprot thrift.TProtocol) error { - p.LeaguerTid = &Tid{} - if err := p.LeaguerTid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.LeaguerTid), err) - } - return nil -} - -func (p *TimMBean) readField10(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TimNode, 0, size) - p.ExtraList = tSlice - for i := 0; i < size; i++ { - _elem24 := &TimNode{} - if err := _elem24.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem24), err) - } - p.ExtraList = append(p.ExtraList, _elem24) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimMBean) readField11(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 11: ", err) - } else { - p.Timestamp = &v - } - return nil -} - -func (p *TimMBean) readField12(iprot thrift.TProtocol) error { - p.Error = &TimError{} - if err := p.Error.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Error), err) - } - return nil -} - -func (p *TimMBean) readField13(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key25 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key25 = v - } - var _val26 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val26 = v - } - p.ExtraMap[_key25] = _val26 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimMBean) readField14(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI16(); err != nil { - return thrift.PrependError("error reading field 14: ", err) - } else { - p.Readstatus = &v - } - return nil -} - -func (p *TimMBean) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimMBean"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := p.writeField7(oprot); err != nil { - return err - } - if err := p.writeField8(oprot); err != nil { - return err - } - if err := p.writeField9(oprot); err != nil { - return err - } - if err := p.writeField10(oprot); err != nil { - return err - } - if err := p.writeField11(oprot); err != nil { - return err - } - if err := p.writeField12(oprot); err != nil { - return err - } - if err := p.writeField13(oprot); err != nil { - return err - } - if err := p.writeField14(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimMBean) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("threadId", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) - } - if err := oprot.WriteString(string(p.ThreadId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) - } - return err -} - -func (p *TimMBean) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetMid() { - if err := oprot.WriteFieldBegin("mid", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:mid: ", p), err) - } - if err := oprot.WriteString(string(*p.Mid)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.mid (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:mid: ", p), err) - } - } - return err -} - -func (p *TimMBean) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetFromTid() { - if err := oprot.WriteFieldBegin("fromTid", thrift.STRUCT, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:fromTid: ", p), err) - } - if err := p.FromTid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.FromTid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:fromTid: ", p), err) - } - } - return err -} - -func (p *TimMBean) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetToTid() { - if err := oprot.WriteFieldBegin("toTid", thrift.STRUCT, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:toTid: ", p), err) - } - if err := p.ToTid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ToTid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:toTid: ", p), err) - } - } - return err -} - -func (p *TimMBean) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetBody() { - if err := oprot.WriteFieldBegin("body", thrift.STRING, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:body: ", p), err) - } - if err := oprot.WriteString(string(*p.Body)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.body (5) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:body: ", p), err) - } - } - return err -} - -func (p *TimMBean) writeField6(oprot thrift.TProtocol) (err error) { - if p.IsSetType() { - if err := oprot.WriteFieldBegin("type", thrift.STRING, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:type: ", p), err) - } - if err := oprot.WriteString(string(*p.Type)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.type (6) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:type: ", p), err) - } - } - return err -} - -func (p *TimMBean) writeField7(oprot thrift.TProtocol) (err error) { - if p.IsSetMsgType() { - if err := oprot.WriteFieldBegin("msgType", thrift.I16, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:msgType: ", p), err) - } - if err := oprot.WriteI16(int16(*p.MsgType)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.msgType (7) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:msgType: ", p), err) - } - } - return err -} - -func (p *TimMBean) writeField8(oprot thrift.TProtocol) (err error) { - if p.IsSetOffline() { - if err := oprot.WriteFieldBegin("offline", thrift.STRUCT, 8); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:offline: ", p), err) - } - if err := p.Offline.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Offline), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 8:offline: ", p), err) - } - } - return err -} - -func (p *TimMBean) writeField9(oprot thrift.TProtocol) (err error) { - if p.IsSetLeaguerTid() { - if err := oprot.WriteFieldBegin("leaguerTid", thrift.STRUCT, 9); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:leaguerTid: ", p), err) - } - if err := p.LeaguerTid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.LeaguerTid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 9:leaguerTid: ", p), err) - } - } - return err -} - -func (p *TimMBean) writeField10(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraList() { - if err := oprot.WriteFieldBegin("extraList", thrift.LIST, 10); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:extraList: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ExtraList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.ExtraList { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 10:extraList: ", p), err) - } - } - return err -} - -func (p *TimMBean) writeField11(oprot thrift.TProtocol) (err error) { - if p.IsSetTimestamp() { - if err := oprot.WriteFieldBegin("timestamp", thrift.STRING, 11); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:timestamp: ", p), err) - } - if err := oprot.WriteString(string(*p.Timestamp)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.timestamp (11) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 11:timestamp: ", p), err) - } - } - return err -} - -func (p *TimMBean) writeField12(oprot thrift.TProtocol) (err error) { - if p.IsSetError() { - if err := oprot.WriteFieldBegin("error", thrift.STRUCT, 12); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 12:error: ", p), err) - } - if err := p.Error.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Error), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 12:error: ", p), err) - } - } - return err -} - -func (p *TimMBean) writeField13(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 13); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 13:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 13:extraMap: ", p), err) - } - } - return err -} - -func (p *TimMBean) writeField14(oprot thrift.TProtocol) (err error) { - if p.IsSetReadstatus() { - if err := oprot.WriteFieldBegin("readstatus", thrift.I16, 14); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 14:readstatus: ", p), err) - } - if err := oprot.WriteI16(int16(*p.Readstatus)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.readstatus (14) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 14:readstatus: ", p), err) - } - } - return err -} - -func (p *TimMBean) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimMBean(%+v)", *p) -} - -// Attributes: -// - ThreadId: 线程id -// - FromTid -// - ToTid -// - Type: Get :获取当前域值。类似于http get方法 -// Set :设置或替换get查询的值。类似于http put方法。 -// Result :说明成功的响应了先前的查询。类似于http状态码200。 -// Error: 查询和响应中出现的错误。 -// - ExtraList: 扩展字段 -// - Error: 错误码 -// - ExtraMap -type TimIqBean struct { - ThreadId string `thrift:"threadId,1,required" json:"threadId"` - FromTid *Tid `thrift:"fromTid,2" json:"fromTid,omitempty"` - ToTid *Tid `thrift:"toTid,3" json:"toTid,omitempty"` - Type *string `thrift:"type,4" json:"type,omitempty"` - ExtraList []*TimNode `thrift:"extraList,5" json:"extraList,omitempty"` - Error *TimError `thrift:"error,6" json:"error,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,7" json:"extraMap,omitempty"` -} - -func NewTimIqBean() *TimIqBean { - return &TimIqBean{} -} - -func (p *TimIqBean) GetThreadId() string { - return p.ThreadId -} - -var TimIqBean_FromTid_DEFAULT *Tid - -func (p *TimIqBean) GetFromTid() *Tid { - if !p.IsSetFromTid() { - return TimIqBean_FromTid_DEFAULT - } - return p.FromTid -} - -var TimIqBean_ToTid_DEFAULT *Tid - -func (p *TimIqBean) GetToTid() *Tid { - if !p.IsSetToTid() { - return TimIqBean_ToTid_DEFAULT - } - return p.ToTid -} - -var TimIqBean_Type_DEFAULT string - -func (p *TimIqBean) GetType() string { - if !p.IsSetType() { - return TimIqBean_Type_DEFAULT - } - return *p.Type -} - -var TimIqBean_ExtraList_DEFAULT []*TimNode - -func (p *TimIqBean) GetExtraList() []*TimNode { - return p.ExtraList -} - -var TimIqBean_Error_DEFAULT *TimError - -func (p *TimIqBean) GetError() *TimError { - if !p.IsSetError() { - return TimIqBean_Error_DEFAULT - } - return p.Error -} - -var TimIqBean_ExtraMap_DEFAULT map[string]string - -func (p *TimIqBean) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimIqBean) IsSetFromTid() bool { - return p.FromTid != nil -} - -func (p *TimIqBean) IsSetToTid() bool { - return p.ToTid != nil -} - -func (p *TimIqBean) IsSetType() bool { - return p.Type != nil -} - -func (p *TimIqBean) IsSetExtraList() bool { - return p.ExtraList != nil -} - -func (p *TimIqBean) IsSetError() bool { - return p.Error != nil -} - -func (p *TimIqBean) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimIqBean) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetThreadId bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetThreadId = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - case 7: - if err := p.readField7(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetThreadId { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ThreadId is not set")) - } - return nil -} - -func (p *TimIqBean) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.ThreadId = v - } - return nil -} - -func (p *TimIqBean) readField2(iprot thrift.TProtocol) error { - p.FromTid = &Tid{} - if err := p.FromTid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.FromTid), err) - } - return nil -} - -func (p *TimIqBean) readField3(iprot thrift.TProtocol) error { - p.ToTid = &Tid{} - if err := p.ToTid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ToTid), err) - } - return nil -} - -func (p *TimIqBean) readField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 4: ", err) - } else { - p.Type = &v - } - return nil -} - -func (p *TimIqBean) readField5(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TimNode, 0, size) - p.ExtraList = tSlice - for i := 0; i < size; i++ { - _elem27 := &TimNode{} - if err := _elem27.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem27), err) - } - p.ExtraList = append(p.ExtraList, _elem27) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimIqBean) readField6(iprot thrift.TProtocol) error { - p.Error = &TimError{} - if err := p.Error.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Error), err) - } - return nil -} - -func (p *TimIqBean) readField7(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key28 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key28 = v - } - var _val29 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val29 = v - } - p.ExtraMap[_key28] = _val29 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimIqBean) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimIqBean"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := p.writeField7(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimIqBean) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("threadId", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) - } - if err := oprot.WriteString(string(p.ThreadId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) - } - return err -} - -func (p *TimIqBean) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetFromTid() { - if err := oprot.WriteFieldBegin("fromTid", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:fromTid: ", p), err) - } - if err := p.FromTid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.FromTid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:fromTid: ", p), err) - } - } - return err -} - -func (p *TimIqBean) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetToTid() { - if err := oprot.WriteFieldBegin("toTid", thrift.STRUCT, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:toTid: ", p), err) - } - if err := p.ToTid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ToTid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:toTid: ", p), err) - } - } - return err -} - -func (p *TimIqBean) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetType() { - if err := oprot.WriteFieldBegin("type", thrift.STRING, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:type: ", p), err) - } - if err := oprot.WriteString(string(*p.Type)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.type (4) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:type: ", p), err) - } - } - return err -} - -func (p *TimIqBean) writeField5(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraList() { - if err := oprot.WriteFieldBegin("extraList", thrift.LIST, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:extraList: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ExtraList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.ExtraList { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:extraList: ", p), err) - } - } - return err -} - -func (p *TimIqBean) writeField6(oprot thrift.TProtocol) (err error) { - if p.IsSetError() { - if err := oprot.WriteFieldBegin("error", thrift.STRUCT, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:error: ", p), err) - } - if err := p.Error.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Error), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:error: ", p), err) - } - } - return err -} - -func (p *TimIqBean) writeField7(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:extraMap: ", p), err) - } - } - return err -} - -func (p *TimIqBean) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimIqBean(%+v)", *p) -} - -// Attributes: -// - Subscription: none表示用户和contact之前没有任何的关系(虽然在server的buddy list中存在) -// to表示用户能看到contact的presence,但是contact看不到用户的Presence -// from和to的含义相反,指用户看不到contact的presence,但是contact可以看到 -// both表示相关之间都能看到对方的presence -// - Tid -// - Name: 用户名 -// - ExtraMap -type TimRoster struct { - Subscription string `thrift:"subscription,1,required" json:"subscription"` - Tid *Tid `thrift:"tid,2,required" json:"tid"` - Name *string `thrift:"name,3" json:"name,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,4" json:"extraMap,omitempty"` -} - -func NewTimRoster() *TimRoster { - return &TimRoster{} -} - -func (p *TimRoster) GetSubscription() string { - return p.Subscription -} - -var TimRoster_Tid_DEFAULT *Tid - -func (p *TimRoster) GetTid() *Tid { - if !p.IsSetTid() { - return TimRoster_Tid_DEFAULT - } - return p.Tid -} - -var TimRoster_Name_DEFAULT string - -func (p *TimRoster) GetName() string { - if !p.IsSetName() { - return TimRoster_Name_DEFAULT - } - return *p.Name -} - -var TimRoster_ExtraMap_DEFAULT map[string]string - -func (p *TimRoster) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimRoster) IsSetTid() bool { - return p.Tid != nil -} - -func (p *TimRoster) IsSetName() bool { - return p.Name != nil -} - -func (p *TimRoster) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimRoster) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetSubscription bool = false - var issetTid bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetSubscription = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetTid = true - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetSubscription { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Subscription is not set")) - } - if !issetTid { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Tid is not set")) - } - return nil -} - -func (p *TimRoster) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Subscription = v - } - return nil -} - -func (p *TimRoster) readField2(iprot thrift.TProtocol) error { - p.Tid = &Tid{} - if err := p.Tid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Tid), err) - } - return nil -} - -func (p *TimRoster) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.Name = &v - } - return nil -} - -func (p *TimRoster) readField4(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key30 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key30 = v - } - var _val31 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val31 = v - } - p.ExtraMap[_key30] = _val31 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimRoster) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimRoster"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimRoster) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("subscription", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:subscription: ", p), err) - } - if err := oprot.WriteString(string(p.Subscription)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.subscription (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:subscription: ", p), err) - } - return err -} - -func (p *TimRoster) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("tid", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:tid: ", p), err) - } - if err := p.Tid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Tid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:tid: ", p), err) - } - return err -} - -func (p *TimRoster) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetName() { - if err := oprot.WriteFieldBegin("name", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:name: ", p), err) - } - if err := oprot.WriteString(string(*p.Name)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.name (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:name: ", p), err) - } - } - return err -} - -func (p *TimRoster) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) - } - } - return err -} - -func (p *TimRoster) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimRoster(%+v)", *p) -} - -// Attributes: -// - Error: 错误码 -// - Ub: 远程用户信息 -// - ExtraMap -type TimRemoteUserBean struct { - Error *TimError `thrift:"error,1" json:"error,omitempty"` - Ub *TimUserBean `thrift:"ub,2" json:"ub,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,3" json:"extraMap,omitempty"` -} - -func NewTimRemoteUserBean() *TimRemoteUserBean { - return &TimRemoteUserBean{} -} - -var TimRemoteUserBean_Error_DEFAULT *TimError - -func (p *TimRemoteUserBean) GetError() *TimError { - if !p.IsSetError() { - return TimRemoteUserBean_Error_DEFAULT - } - return p.Error -} - -var TimRemoteUserBean_Ub_DEFAULT *TimUserBean - -func (p *TimRemoteUserBean) GetUb() *TimUserBean { - if !p.IsSetUb() { - return TimRemoteUserBean_Ub_DEFAULT - } - return p.Ub -} - -var TimRemoteUserBean_ExtraMap_DEFAULT map[string]string - -func (p *TimRemoteUserBean) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimRemoteUserBean) IsSetError() bool { - return p.Error != nil -} - -func (p *TimRemoteUserBean) IsSetUb() bool { - return p.Ub != nil -} - -func (p *TimRemoteUserBean) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimRemoteUserBean) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimRemoteUserBean) readField1(iprot thrift.TProtocol) error { - p.Error = &TimError{} - if err := p.Error.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Error), err) - } - return nil -} - -func (p *TimRemoteUserBean) readField2(iprot thrift.TProtocol) error { - p.Ub = &TimUserBean{} - if err := p.Ub.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Ub), err) - } - return nil -} - -func (p *TimRemoteUserBean) readField3(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key32 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key32 = v - } - var _val33 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val33 = v - } - p.ExtraMap[_key32] = _val33 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimRemoteUserBean) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimRemoteUserBean"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimRemoteUserBean) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetError() { - if err := oprot.WriteFieldBegin("error", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:error: ", p), err) - } - if err := p.Error.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Error), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:error: ", p), err) - } - } - return err -} - -func (p *TimRemoteUserBean) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetUb() { - if err := oprot.WriteFieldBegin("ub", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:ub: ", p), err) - } - if err := p.Ub.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Ub), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:ub: ", p), err) - } - } - return err -} - -func (p *TimRemoteUserBean) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:extraMap: ", p), err) - } - } - return err -} - -func (p *TimRemoteUserBean) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimRemoteUserBean(%+v)", *p) -} - -// Attributes: -// - Error: 错误码 -// - Room: 远程房间信息 -// - ExtraMap -type TimRemoteRoom struct { - Error *TimError `thrift:"error,1" json:"error,omitempty"` - Room *TimRoom `thrift:"room,2" json:"room,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,3" json:"extraMap,omitempty"` -} - -func NewTimRemoteRoom() *TimRemoteRoom { - return &TimRemoteRoom{} -} - -var TimRemoteRoom_Error_DEFAULT *TimError - -func (p *TimRemoteRoom) GetError() *TimError { - if !p.IsSetError() { - return TimRemoteRoom_Error_DEFAULT - } - return p.Error -} - -var TimRemoteRoom_Room_DEFAULT *TimRoom - -func (p *TimRemoteRoom) GetRoom() *TimRoom { - if !p.IsSetRoom() { - return TimRemoteRoom_Room_DEFAULT - } - return p.Room -} - -var TimRemoteRoom_ExtraMap_DEFAULT map[string]string - -func (p *TimRemoteRoom) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimRemoteRoom) IsSetError() bool { - return p.Error != nil -} - -func (p *TimRemoteRoom) IsSetRoom() bool { - return p.Room != nil -} - -func (p *TimRemoteRoom) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimRemoteRoom) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimRemoteRoom) readField1(iprot thrift.TProtocol) error { - p.Error = &TimError{} - if err := p.Error.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Error), err) - } - return nil -} - -func (p *TimRemoteRoom) readField2(iprot thrift.TProtocol) error { - p.Room = &TimRoom{} - if err := p.Room.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Room), err) - } - return nil -} - -func (p *TimRemoteRoom) readField3(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key34 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key34 = v - } - var _val35 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val35 = v - } - p.ExtraMap[_key34] = _val35 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimRemoteRoom) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimRemoteRoom"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimRemoteRoom) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetError() { - if err := oprot.WriteFieldBegin("error", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:error: ", p), err) - } - if err := p.Error.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Error), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:error: ", p), err) - } - } - return err -} - -func (p *TimRemoteRoom) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetRoom() { - if err := oprot.WriteFieldBegin("room", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:room: ", p), err) - } - if err := p.Room.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Room), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:room: ", p), err) - } - } - return err -} - -func (p *TimRemoteRoom) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:extraMap: ", p), err) - } - } - return err -} - -func (p *TimRemoteRoom) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimRemoteRoom(%+v)", *p) -} - -// Attributes: -// - ThreadId -// - Error: 错误码 -// - ExtraList: 附加信息 -// - ExtraMap -type TimResponseBean struct { - ThreadId *string `thrift:"threadId,1" json:"threadId,omitempty"` - Error *TimError `thrift:"error,2" json:"error,omitempty"` - ExtraList []*TimNode `thrift:"extraList,3" json:"extraList,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,4" json:"extraMap,omitempty"` -} - -func NewTimResponseBean() *TimResponseBean { - return &TimResponseBean{} -} - -var TimResponseBean_ThreadId_DEFAULT string - -func (p *TimResponseBean) GetThreadId() string { - if !p.IsSetThreadId() { - return TimResponseBean_ThreadId_DEFAULT - } - return *p.ThreadId -} - -var TimResponseBean_Error_DEFAULT *TimError - -func (p *TimResponseBean) GetError() *TimError { - if !p.IsSetError() { - return TimResponseBean_Error_DEFAULT - } - return p.Error -} - -var TimResponseBean_ExtraList_DEFAULT []*TimNode - -func (p *TimResponseBean) GetExtraList() []*TimNode { - return p.ExtraList -} - -var TimResponseBean_ExtraMap_DEFAULT map[string]string - -func (p *TimResponseBean) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimResponseBean) IsSetThreadId() bool { - return p.ThreadId != nil -} - -func (p *TimResponseBean) IsSetError() bool { - return p.Error != nil -} - -func (p *TimResponseBean) IsSetExtraList() bool { - return p.ExtraList != nil -} - -func (p *TimResponseBean) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimResponseBean) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimResponseBean) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.ThreadId = &v - } - return nil -} - -func (p *TimResponseBean) readField2(iprot thrift.TProtocol) error { - p.Error = &TimError{} - if err := p.Error.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Error), err) - } - return nil -} - -func (p *TimResponseBean) readField3(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TimNode, 0, size) - p.ExtraList = tSlice - for i := 0; i < size; i++ { - _elem36 := &TimNode{} - if err := _elem36.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem36), err) - } - p.ExtraList = append(p.ExtraList, _elem36) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimResponseBean) readField4(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key37 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key37 = v - } - var _val38 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val38 = v - } - p.ExtraMap[_key37] = _val38 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimResponseBean) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimResponseBean"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimResponseBean) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetThreadId() { - if err := oprot.WriteFieldBegin("threadId", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) - } - if err := oprot.WriteString(string(*p.ThreadId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) - } - } - return err -} - -func (p *TimResponseBean) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetError() { - if err := oprot.WriteFieldBegin("error", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:error: ", p), err) - } - if err := p.Error.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Error), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:error: ", p), err) - } - } - return err -} - -func (p *TimResponseBean) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraList() { - if err := oprot.WriteFieldBegin("extraList", thrift.LIST, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:extraList: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.ExtraList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.ExtraList { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:extraList: ", p), err) - } - } - return err -} - -func (p *TimResponseBean) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) - } - } - return err -} - -func (p *TimResponseBean) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimResponseBean(%+v)", *p) -} - -// Attributes: -// - FromTid -// - ToTid -// - Addr: ip地址 -// - Port: 端口 -// - Transport: 传输类型 1:tcp 2:udp -// - PubId: 发布id 通过发布id 可以连接两个发布id相同的用户 -// - ExtraMap -type TimSock5Bean struct { - FromTid *Tid `thrift:"fromTid,1,required" json:"fromTid"` - ToTid *Tid `thrift:"toTid,2,required" json:"toTid"` - Addr string `thrift:"addr,3,required" json:"addr"` - Port int32 `thrift:"port,4,required" json:"port"` - Transport int16 `thrift:"transport,5,required" json:"transport"` - PubId string `thrift:"pubId,6,required" json:"pubId"` - ExtraMap map[string]string `thrift:"extraMap,7" json:"extraMap,omitempty"` -} - -func NewTimSock5Bean() *TimSock5Bean { - return &TimSock5Bean{} -} - -var TimSock5Bean_FromTid_DEFAULT *Tid - -func (p *TimSock5Bean) GetFromTid() *Tid { - if !p.IsSetFromTid() { - return TimSock5Bean_FromTid_DEFAULT - } - return p.FromTid -} - -var TimSock5Bean_ToTid_DEFAULT *Tid - -func (p *TimSock5Bean) GetToTid() *Tid { - if !p.IsSetToTid() { - return TimSock5Bean_ToTid_DEFAULT - } - return p.ToTid -} - -func (p *TimSock5Bean) GetAddr() string { - return p.Addr -} - -func (p *TimSock5Bean) GetPort() int32 { - return p.Port -} - -func (p *TimSock5Bean) GetTransport() int16 { - return p.Transport -} - -func (p *TimSock5Bean) GetPubId() string { - return p.PubId -} - -var TimSock5Bean_ExtraMap_DEFAULT map[string]string - -func (p *TimSock5Bean) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimSock5Bean) IsSetFromTid() bool { - return p.FromTid != nil -} - -func (p *TimSock5Bean) IsSetToTid() bool { - return p.ToTid != nil -} - -func (p *TimSock5Bean) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimSock5Bean) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetFromTid bool = false - var issetToTid bool = false - var issetAddr bool = false - var issetPort bool = false - var issetTransport bool = false - var issetPubId bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetFromTid = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetToTid = true - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - issetAddr = true - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - issetPort = true - case 5: - if err := p.readField5(iprot); err != nil { - return err - } - issetTransport = true - case 6: - if err := p.readField6(iprot); err != nil { - return err - } - issetPubId = true - case 7: - if err := p.readField7(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetFromTid { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field FromTid is not set")) - } - if !issetToTid { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ToTid is not set")) - } - if !issetAddr { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Addr is not set")) - } - if !issetPort { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Port is not set")) - } - if !issetTransport { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Transport is not set")) - } - if !issetPubId { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PubId is not set")) - } - return nil -} - -func (p *TimSock5Bean) readField1(iprot thrift.TProtocol) error { - p.FromTid = &Tid{} - if err := p.FromTid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.FromTid), err) - } - return nil -} - -func (p *TimSock5Bean) readField2(iprot thrift.TProtocol) error { - p.ToTid = &Tid{} - if err := p.ToTid.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ToTid), err) - } - return nil -} - -func (p *TimSock5Bean) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.Addr = v - } - return nil -} - -func (p *TimSock5Bean) readField4(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 4: ", err) - } else { - p.Port = v - } - return nil -} - -func (p *TimSock5Bean) readField5(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI16(); err != nil { - return thrift.PrependError("error reading field 5: ", err) - } else { - p.Transport = v - } - return nil -} - -func (p *TimSock5Bean) readField6(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 6: ", err) - } else { - p.PubId = v - } - return nil -} - -func (p *TimSock5Bean) readField7(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key39 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key39 = v - } - var _val40 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val40 = v - } - p.ExtraMap[_key39] = _val40 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimSock5Bean) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimSock5Bean"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := p.writeField5(oprot); err != nil { - return err - } - if err := p.writeField6(oprot); err != nil { - return err - } - if err := p.writeField7(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimSock5Bean) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("fromTid", thrift.STRUCT, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:fromTid: ", p), err) - } - if err := p.FromTid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.FromTid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:fromTid: ", p), err) - } - return err -} - -func (p *TimSock5Bean) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("toTid", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:toTid: ", p), err) - } - if err := p.ToTid.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ToTid), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:toTid: ", p), err) - } - return err -} - -func (p *TimSock5Bean) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("addr", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:addr: ", p), err) - } - if err := oprot.WriteString(string(p.Addr)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.addr (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:addr: ", p), err) - } - return err -} - -func (p *TimSock5Bean) writeField4(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("port", thrift.I32, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:port: ", p), err) - } - if err := oprot.WriteI32(int32(p.Port)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.port (4) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:port: ", p), err) - } - return err -} - -func (p *TimSock5Bean) writeField5(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("transport", thrift.I16, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:transport: ", p), err) - } - if err := oprot.WriteI16(int16(p.Transport)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.transport (5) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:transport: ", p), err) - } - return err -} - -func (p *TimSock5Bean) writeField6(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("pubId", thrift.STRING, 6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:pubId: ", p), err) - } - if err := oprot.WriteString(string(p.PubId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.pubId (6) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 6:pubId: ", p), err) - } - return err -} - -func (p *TimSock5Bean) writeField7(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:extraMap: ", p), err) - } - } - return err -} - -func (p *TimSock5Bean) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimSock5Bean(%+v)", *p) -} - -// Attributes: -// - PubId: 发布id -// - Index: 序号数据块 -// - Bytes: 数据块 -// - ExtraMap -type TimSock5Bytes struct { - PubId string `thrift:"pubId,1,required" json:"pubId"` - Index int32 `thrift:"index,2,required" json:"index"` - Bytes [][]byte `thrift:"bytes,3,required" json:"bytes"` - ExtraMap map[string]string `thrift:"extraMap,4" json:"extraMap,omitempty"` -} - -func NewTimSock5Bytes() *TimSock5Bytes { - return &TimSock5Bytes{} -} - -func (p *TimSock5Bytes) GetPubId() string { - return p.PubId -} - -func (p *TimSock5Bytes) GetIndex() int32 { - return p.Index -} - -func (p *TimSock5Bytes) GetBytes() [][]byte { - return p.Bytes -} - -var TimSock5Bytes_ExtraMap_DEFAULT map[string]string - -func (p *TimSock5Bytes) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimSock5Bytes) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimSock5Bytes) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetPubId bool = false - var issetIndex bool = false - var issetBytes bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetPubId = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - issetIndex = true - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - issetBytes = true - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetPubId { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field PubId is not set")) - } - if !issetIndex { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Index is not set")) - } - if !issetBytes { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Bytes is not set")) - } - return nil -} - -func (p *TimSock5Bytes) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.PubId = v - } - return nil -} - -func (p *TimSock5Bytes) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Index = v - } - return nil -} - -func (p *TimSock5Bytes) readField3(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([][]byte, 0, size) - p.Bytes = tSlice - for i := 0; i < size; i++ { - var _elem41 []byte - if v, err := iprot.ReadBinary(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _elem41 = v - } - p.Bytes = append(p.Bytes, _elem41) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimSock5Bytes) readField4(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key42 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key42 = v - } - var _val43 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val43 = v - } - p.ExtraMap[_key42] = _val43 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimSock5Bytes) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimSock5Bytes"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimSock5Bytes) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("pubId", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:pubId: ", p), err) - } - if err := oprot.WriteString(string(p.PubId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.pubId (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:pubId: ", p), err) - } - return err -} - -func (p *TimSock5Bytes) writeField2(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("index", thrift.I32, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:index: ", p), err) - } - if err := oprot.WriteI32(int32(p.Index)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.index (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:index: ", p), err) - } - return err -} - -func (p *TimSock5Bytes) writeField3(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("bytes", thrift.LIST, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:bytes: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRING, len(p.Bytes)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Bytes { - if err := oprot.WriteBinary(v); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:bytes: ", p), err) - } - return err -} - -func (p *TimSock5Bytes) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) - } - } - return err -} - -func (p *TimSock5Bytes) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimSock5Bytes(%+v)", *p) -} - -// Attributes: -// - FromTimeStamp: 时间上 -// - ToTimeStamp: 时间下 -// - LimitCount: 条数 -// - ExtraMap -type TimPage struct { - FromTimeStamp *string `thrift:"fromTimeStamp,1" json:"fromTimeStamp,omitempty"` - ToTimeStamp *string `thrift:"toTimeStamp,2" json:"toTimeStamp,omitempty"` - LimitCount *int32 `thrift:"limitCount,3" json:"limitCount,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,4" json:"extraMap,omitempty"` -} - -func NewTimPage() *TimPage { - return &TimPage{} -} - -var TimPage_FromTimeStamp_DEFAULT string - -func (p *TimPage) GetFromTimeStamp() string { - if !p.IsSetFromTimeStamp() { - return TimPage_FromTimeStamp_DEFAULT - } - return *p.FromTimeStamp -} - -var TimPage_ToTimeStamp_DEFAULT string - -func (p *TimPage) GetToTimeStamp() string { - if !p.IsSetToTimeStamp() { - return TimPage_ToTimeStamp_DEFAULT - } - return *p.ToTimeStamp -} - -var TimPage_LimitCount_DEFAULT int32 - -func (p *TimPage) GetLimitCount() int32 { - if !p.IsSetLimitCount() { - return TimPage_LimitCount_DEFAULT - } - return *p.LimitCount -} - -var TimPage_ExtraMap_DEFAULT map[string]string - -func (p *TimPage) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimPage) IsSetFromTimeStamp() bool { - return p.FromTimeStamp != nil -} - -func (p *TimPage) IsSetToTimeStamp() bool { - return p.ToTimeStamp != nil -} - -func (p *TimPage) IsSetLimitCount() bool { - return p.LimitCount != nil -} - -func (p *TimPage) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimPage) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimPage) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.FromTimeStamp = &v - } - return nil -} - -func (p *TimPage) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.ToTimeStamp = &v - } - return nil -} - -func (p *TimPage) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.LimitCount = &v - } - return nil -} - -func (p *TimPage) readField4(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key44 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key44 = v - } - var _val45 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val45 = v - } - p.ExtraMap[_key44] = _val45 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimPage) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimPage"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimPage) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetFromTimeStamp() { - if err := oprot.WriteFieldBegin("fromTimeStamp", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:fromTimeStamp: ", p), err) - } - if err := oprot.WriteString(string(*p.FromTimeStamp)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.fromTimeStamp (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:fromTimeStamp: ", p), err) - } - } - return err -} - -func (p *TimPage) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetToTimeStamp() { - if err := oprot.WriteFieldBegin("toTimeStamp", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:toTimeStamp: ", p), err) - } - if err := oprot.WriteString(string(*p.ToTimeStamp)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.toTimeStamp (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:toTimeStamp: ", p), err) - } - } - return err -} - -func (p *TimPage) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetLimitCount() { - if err := oprot.WriteFieldBegin("limitCount", thrift.I32, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:limitCount: ", p), err) - } - if err := oprot.WriteI32(int32(*p.LimitCount)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.limitCount (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:limitCount: ", p), err) - } - } - return err -} - -func (p *TimPage) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) - } - } - return err -} - -func (p *TimPage) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimPage(%+v)", *p) -} - -// Attributes: -// - Tidlist: tid集合 -// - TimPage: 分页 -// - Midlist: mid集合 -// - ExtraMap -type TimMessageIq struct { - Tidlist []string `thrift:"tidlist,1" json:"tidlist,omitempty"` - TimPage *TimPage `thrift:"timPage,2" json:"timPage,omitempty"` - Midlist []string `thrift:"midlist,3" json:"midlist,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,4" json:"extraMap,omitempty"` -} - -func NewTimMessageIq() *TimMessageIq { - return &TimMessageIq{} -} - -var TimMessageIq_Tidlist_DEFAULT []string - -func (p *TimMessageIq) GetTidlist() []string { - return p.Tidlist -} - -var TimMessageIq_TimPage_DEFAULT *TimPage - -func (p *TimMessageIq) GetTimPage() *TimPage { - if !p.IsSetTimPage() { - return TimMessageIq_TimPage_DEFAULT - } - return p.TimPage -} - -var TimMessageIq_Midlist_DEFAULT []string - -func (p *TimMessageIq) GetMidlist() []string { - return p.Midlist -} - -var TimMessageIq_ExtraMap_DEFAULT map[string]string - -func (p *TimMessageIq) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimMessageIq) IsSetTidlist() bool { - return p.Tidlist != nil -} - -func (p *TimMessageIq) IsSetTimPage() bool { - return p.TimPage != nil -} - -func (p *TimMessageIq) IsSetMidlist() bool { - return p.Midlist != nil -} - -func (p *TimMessageIq) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimMessageIq) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimMessageIq) readField1(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]string, 0, size) - p.Tidlist = tSlice - for i := 0; i < size; i++ { - var _elem46 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _elem46 = v - } - p.Tidlist = append(p.Tidlist, _elem46) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimMessageIq) readField2(iprot thrift.TProtocol) error { - p.TimPage = &TimPage{} - if err := p.TimPage.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TimPage), err) - } - return nil -} - -func (p *TimMessageIq) readField3(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]string, 0, size) - p.Midlist = tSlice - for i := 0; i < size; i++ { - var _elem47 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _elem47 = v - } - p.Midlist = append(p.Midlist, _elem47) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimMessageIq) readField4(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key48 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key48 = v - } - var _val49 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val49 = v - } - p.ExtraMap[_key48] = _val49 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimMessageIq) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimMessageIq"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimMessageIq) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetTidlist() { - if err := oprot.WriteFieldBegin("tidlist", thrift.LIST, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:tidlist: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRING, len(p.Tidlist)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Tidlist { - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:tidlist: ", p), err) - } - } - return err -} - -func (p *TimMessageIq) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetTimPage() { - if err := oprot.WriteFieldBegin("timPage", thrift.STRUCT, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:timPage: ", p), err) - } - if err := p.TimPage.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TimPage), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:timPage: ", p), err) - } - } - return err -} - -func (p *TimMessageIq) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetMidlist() { - if err := oprot.WriteFieldBegin("midlist", thrift.LIST, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:midlist: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRING, len(p.Midlist)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Midlist { - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:midlist: ", p), err) - } - } - return err -} - -func (p *TimMessageIq) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) - } - } - return err -} - -func (p *TimMessageIq) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimMessageIq(%+v)", *p) -} - -// Attributes: -// - Domain: 域名 -// - Username: 用户名 -// - Pwd: 密码 -type TimAuth struct { - Domain *string `thrift:"domain,1" json:"domain,omitempty"` - Username *string `thrift:"username,2" json:"username,omitempty"` - Pwd *string `thrift:"pwd,3" json:"pwd,omitempty"` -} - -func NewTimAuth() *TimAuth { - return &TimAuth{} -} - -var TimAuth_Domain_DEFAULT string - -func (p *TimAuth) GetDomain() string { - if !p.IsSetDomain() { - return TimAuth_Domain_DEFAULT - } - return *p.Domain -} - -var TimAuth_Username_DEFAULT string - -func (p *TimAuth) GetUsername() string { - if !p.IsSetUsername() { - return TimAuth_Username_DEFAULT - } - return *p.Username -} - -var TimAuth_Pwd_DEFAULT string - -func (p *TimAuth) GetPwd() string { - if !p.IsSetPwd() { - return TimAuth_Pwd_DEFAULT - } - return *p.Pwd -} -func (p *TimAuth) IsSetDomain() bool { - return p.Domain != nil -} - -func (p *TimAuth) IsSetUsername() bool { - return p.Username != nil -} - -func (p *TimAuth) IsSetPwd() bool { - return p.Pwd != nil -} - -func (p *TimAuth) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimAuth) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.Domain = &v - } - return nil -} - -func (p *TimAuth) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Username = &v - } - return nil -} - -func (p *TimAuth) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.Pwd = &v - } - return nil -} - -func (p *TimAuth) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimAuth"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimAuth) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetDomain() { - if err := oprot.WriteFieldBegin("domain", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:domain: ", p), err) - } - if err := oprot.WriteString(string(*p.Domain)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.domain (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:domain: ", p), err) - } - } - return err -} - -func (p *TimAuth) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetUsername() { - if err := oprot.WriteFieldBegin("username", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:username: ", p), err) - } - if err := oprot.WriteString(string(*p.Username)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.username (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:username: ", p), err) - } - } - return err -} - -func (p *TimAuth) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetPwd() { - if err := oprot.WriteFieldBegin("pwd", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:pwd: ", p), err) - } - if err := oprot.WriteString(string(*p.Pwd)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.pwd (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:pwd: ", p), err) - } - } - return err -} - -func (p *TimAuth) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimAuth(%+v)", *p) -} - -// Attributes: -// - ThreadId -// - TimMBeanList: 信息列表 -// - ReqType: 类型 -// - ExtraMap -type TimMBeanList struct { - ThreadId string `thrift:"threadId,1,required" json:"threadId"` - TimMBeanList []*TimMBean `thrift:"timMBeanList,2" json:"timMBeanList,omitempty"` - ReqType *string `thrift:"reqType,3" json:"reqType,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,4" json:"extraMap,omitempty"` -} - -func NewTimMBeanList() *TimMBeanList { - return &TimMBeanList{} -} - -func (p *TimMBeanList) GetThreadId() string { - return p.ThreadId -} - -var TimMBeanList_TimMBeanList_DEFAULT []*TimMBean - -func (p *TimMBeanList) GetTimMBeanList() []*TimMBean { - return p.TimMBeanList -} - -var TimMBeanList_ReqType_DEFAULT string - -func (p *TimMBeanList) GetReqType() string { - if !p.IsSetReqType() { - return TimMBeanList_ReqType_DEFAULT - } - return *p.ReqType -} - -var TimMBeanList_ExtraMap_DEFAULT map[string]string - -func (p *TimMBeanList) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimMBeanList) IsSetTimMBeanList() bool { - return p.TimMBeanList != nil -} - -func (p *TimMBeanList) IsSetReqType() bool { - return p.ReqType != nil -} - -func (p *TimMBeanList) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimMBeanList) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetThreadId bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetThreadId = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetThreadId { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ThreadId is not set")) - } - return nil -} - -func (p *TimMBeanList) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.ThreadId = v - } - return nil -} - -func (p *TimMBeanList) readField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TimMBean, 0, size) - p.TimMBeanList = tSlice - for i := 0; i < size; i++ { - _elem50 := &TimMBean{} - if err := _elem50.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem50), err) - } - p.TimMBeanList = append(p.TimMBeanList, _elem50) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimMBeanList) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.ReqType = &v - } - return nil -} - -func (p *TimMBeanList) readField4(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key51 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key51 = v - } - var _val52 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val52 = v - } - p.ExtraMap[_key51] = _val52 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimMBeanList) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimMBeanList"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimMBeanList) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("threadId", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) - } - if err := oprot.WriteString(string(p.ThreadId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) - } - return err -} - -func (p *TimMBeanList) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetTimMBeanList() { - if err := oprot.WriteFieldBegin("timMBeanList", thrift.LIST, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:timMBeanList: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.TimMBeanList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.TimMBeanList { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:timMBeanList: ", p), err) - } - } - return err -} - -func (p *TimMBeanList) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetReqType() { - if err := oprot.WriteFieldBegin("reqType", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:reqType: ", p), err) - } - if err := oprot.WriteString(string(*p.ReqType)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.reqType (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:reqType: ", p), err) - } - } - return err -} - -func (p *TimMBeanList) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) - } - } - return err -} - -func (p *TimMBeanList) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimMBeanList(%+v)", *p) -} - -// Attributes: -// - ThreadId -// - TimPBeanList: 状态信息列表 -// - ReqType: 类型 -// - ExtraMap -type TimPBeanList struct { - ThreadId string `thrift:"threadId,1,required" json:"threadId"` - TimPBeanList []*TimPBean `thrift:"timPBeanList,2" json:"timPBeanList,omitempty"` - ReqType *string `thrift:"reqType,3" json:"reqType,omitempty"` - ExtraMap map[string]string `thrift:"extraMap,4" json:"extraMap,omitempty"` -} - -func NewTimPBeanList() *TimPBeanList { - return &TimPBeanList{} -} - -func (p *TimPBeanList) GetThreadId() string { - return p.ThreadId -} - -var TimPBeanList_TimPBeanList_DEFAULT []*TimPBean - -func (p *TimPBeanList) GetTimPBeanList() []*TimPBean { - return p.TimPBeanList -} - -var TimPBeanList_ReqType_DEFAULT string - -func (p *TimPBeanList) GetReqType() string { - if !p.IsSetReqType() { - return TimPBeanList_ReqType_DEFAULT - } - return *p.ReqType -} - -var TimPBeanList_ExtraMap_DEFAULT map[string]string - -func (p *TimPBeanList) GetExtraMap() map[string]string { - return p.ExtraMap -} -func (p *TimPBeanList) IsSetTimPBeanList() bool { - return p.TimPBeanList != nil -} - -func (p *TimPBeanList) IsSetReqType() bool { - return p.ReqType != nil -} - -func (p *TimPBeanList) IsSetExtraMap() bool { - return p.ExtraMap != nil -} - -func (p *TimPBeanList) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - var issetThreadId bool = false - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - issetThreadId = true - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - case 4: - if err := p.readField4(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - if !issetThreadId { - return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field ThreadId is not set")) - } - return nil -} - -func (p *TimPBeanList) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.ThreadId = v - } - return nil -} - -func (p *TimPBeanList) readField2(iprot thrift.TProtocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]*TimPBean, 0, size) - p.TimPBeanList = tSlice - for i := 0; i < size; i++ { - _elem53 := &TimPBean{} - if err := _elem53.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem53), err) - } - p.TimPBeanList = append(p.TimPBeanList, _elem53) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil -} - -func (p *TimPBeanList) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.ReqType = &v - } - return nil -} - -func (p *TimPBeanList) readField4(iprot thrift.TProtocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.ExtraMap = tMap - for i := 0; i < size; i++ { - var _key54 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key54 = v - } - var _val55 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val55 = v - } - p.ExtraMap[_key54] = _val55 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil -} - -func (p *TimPBeanList) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimPBeanList"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := p.writeField4(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimPBeanList) writeField1(oprot thrift.TProtocol) (err error) { - if err := oprot.WriteFieldBegin("threadId", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) - } - if err := oprot.WriteString(string(p.ThreadId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) - } - return err -} - -func (p *TimPBeanList) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetTimPBeanList() { - if err := oprot.WriteFieldBegin("timPBeanList", thrift.LIST, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:timPBeanList: ", p), err) - } - if err := oprot.WriteListBegin(thrift.STRUCT, len(p.TimPBeanList)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.TimPBeanList { - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:timPBeanList: ", p), err) - } - } - return err -} - -func (p *TimPBeanList) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetReqType() { - if err := oprot.WriteFieldBegin("reqType", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:reqType: ", p), err) - } - if err := oprot.WriteString(string(*p.ReqType)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.reqType (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:reqType: ", p), err) - } - } - return err -} - -func (p *TimPBeanList) writeField4(oprot thrift.TProtocol) (err error) { - if p.IsSetExtraMap() { - if err := oprot.WriteFieldBegin("extraMap", thrift.MAP, 4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:extraMap: ", p), err) - } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ExtraMap)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.ExtraMap { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 4:extraMap: ", p), err) - } - } - return err -} - -func (p *TimPBeanList) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimPBeanList(%+v)", *p) -} - -// Attributes: -// - ThreadId -// - Interflow: 消息合流 -// - TLS: tls -type TimPropertyBean struct { - ThreadId *string `thrift:"threadId,1" json:"threadId,omitempty"` - Interflow *string `thrift:"interflow,2" json:"interflow,omitempty"` - TLS *string `thrift:"tls,3" json:"tls,omitempty"` -} - -func NewTimPropertyBean() *TimPropertyBean { - return &TimPropertyBean{} -} - -var TimPropertyBean_ThreadId_DEFAULT string - -func (p *TimPropertyBean) GetThreadId() string { - if !p.IsSetThreadId() { - return TimPropertyBean_ThreadId_DEFAULT - } - return *p.ThreadId -} - -var TimPropertyBean_Interflow_DEFAULT string - -func (p *TimPropertyBean) GetInterflow() string { - if !p.IsSetInterflow() { - return TimPropertyBean_Interflow_DEFAULT - } - return *p.Interflow -} - -var TimPropertyBean_TLS_DEFAULT string - -func (p *TimPropertyBean) GetTLS() string { - if !p.IsSetTLS() { - return TimPropertyBean_TLS_DEFAULT - } - return *p.TLS -} -func (p *TimPropertyBean) IsSetThreadId() bool { - return p.ThreadId != nil -} - -func (p *TimPropertyBean) IsSetInterflow() bool { - return p.Interflow != nil -} - -func (p *TimPropertyBean) IsSetTLS() bool { - return p.TLS != nil -} - -func (p *TimPropertyBean) Read(iprot thrift.TProtocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { - break - } - switch fieldId { - case 1: - if err := p.readField1(iprot); err != nil { - return err - } - case 2: - if err := p.readField2(iprot); err != nil { - return err - } - case 3: - if err := p.readField3(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil -} - -func (p *TimPropertyBean) readField1(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - p.ThreadId = &v - } - return nil -} - -func (p *TimPropertyBean) readField2(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Interflow = &v - } - return nil -} - -func (p *TimPropertyBean) readField3(iprot thrift.TProtocol) error { - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 3: ", err) - } else { - p.TLS = &v - } - return nil -} - -func (p *TimPropertyBean) Write(oprot thrift.TProtocol) error { - if err := oprot.WriteStructBegin("TimPropertyBean"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) - } - if err := p.writeField1(oprot); err != nil { - return err - } - if err := p.writeField2(oprot); err != nil { - return err - } - if err := p.writeField3(oprot); err != nil { - return err - } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) - } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) - } - return nil -} - -func (p *TimPropertyBean) writeField1(oprot thrift.TProtocol) (err error) { - if p.IsSetThreadId() { - if err := oprot.WriteFieldBegin("threadId", thrift.STRING, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:threadId: ", p), err) - } - if err := oprot.WriteString(string(*p.ThreadId)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.threadId (1) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:threadId: ", p), err) - } - } - return err -} - -func (p *TimPropertyBean) writeField2(oprot thrift.TProtocol) (err error) { - if p.IsSetInterflow() { - if err := oprot.WriteFieldBegin("interflow", thrift.STRING, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:interflow: ", p), err) - } - if err := oprot.WriteString(string(*p.Interflow)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.interflow (2) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:interflow: ", p), err) - } - } - return err -} - -func (p *TimPropertyBean) writeField3(oprot thrift.TProtocol) (err error) { - if p.IsSetTLS() { - if err := oprot.WriteFieldBegin("tls", thrift.STRING, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:tls: ", p), err) - } - if err := oprot.WriteString(string(*p.TLS)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.tls (3) field write error: ", p), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:tls: ", p), err) - } - } - return err -} - -func (p *TimPropertyBean) String() string { - if p == nil { - return "" - } - return fmt.Sprintf("TimPropertyBean(%+v)", *p) -} diff --git a/tim.tfClient/tfClient_test.go b/tim.tfClient/tfClient_test.go deleted file mode 100644 index d1773a1..0000000 --- a/tim.tfClient/tfClient_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package tfClient - -import ( - "fmt" - "testing" - - // "git.apache.org/thrift.git/lib/go/thrift" - // "github.com/donnie4w/go-logger/logger" - // . "tim.common" - . "tim.protocol" -) - -func TestRemote(t *testing.T) { - tid := NewTid() - - tid.Name = "734604" - pwd := "e10adc3949ba59abbe56e057f20f883e" - HttpClient(func(client *ITimClient) { - r, er := client.TimRemoteUserAuth(tid, pwd) - if er == nil && r != nil { - fmt.Println(r) - if r.ExtraMap != nil { - if password, ok := r.ExtraMap["password"]; ok { - if pwd == password { - fmt.Print("ok") - } - } - if extraAuth, ok := r.ExtraMap["extraAuth"]; ok { - if pwd == extraAuth { - fmt.Print("ok2") - } - } - } - } - }) -} diff --git a/tim.xml b/tim.xml index 60b7b14..f644f77 100644 --- a/tim.xml +++ b/tim.xml @@ -2,9 +2,9 @@ 6666 0.0.0.0 120 - C:/Users/dong/Desktop/tim + log tim.log - root:123456@tcp(127.0.0.1:3306)/tim + root:123@tcp(127.0.0.1:3306)/tim 20 5 0 diff --git a/tim.utils/strutil.go b/utils/strutil.go similarity index 100% rename from tim.utils/strutil.go rename to utils/strutil.go diff --git a/tim.utils/utils.go b/utils/utils.go similarity index 100% rename from tim.utils/utils.go rename to utils/utils.go diff --git a/tim.utils/utils_test.go b/utils/utils_test.go similarity index 100% rename from tim.utils/utils_test.go rename to utils/utils_test.go