SecondRankService.php 55 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910
  1. <?php
  2. namespace OpenSearch\Generated\SecondRank;
  3. /**
  4. * Autogenerated by Thrift Compiler (0.10.0)
  5. *
  6. * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  7. * @generated
  8. */
  9. use Thrift\Base\TBase;
  10. use Thrift\Type\TType;
  11. use Thrift\Type\TMessageType;
  12. use Thrift\Exception\TException;
  13. use Thrift\Exception\TProtocolException;
  14. use Thrift\Protocol\TProtocol;
  15. use Thrift\Protocol\TBinaryProtocolAccelerated;
  16. use Thrift\Exception\TApplicationException;
  17. interface SecondRankServiceIf {
  18. /**
  19. * @param \OpenSearch\Generated\SecondRank\SecondRank $secondRank
  20. * @return \OpenSearch\Generated\SecondRank\SecondRank
  21. * @throws \OpenSearch\Generated\Common\OpenSearchException
  22. * @throws \OpenSearch\Generated\Common\OpenSearchClientException
  23. */
  24. public function save(\OpenSearch\Generated\SecondRank\SecondRank $secondRank);
  25. /**
  26. * @return \OpenSearch\Generated\SecondRank\SecondRank[]
  27. * @throws \OpenSearch\Generated\Common\OpenSearchException
  28. * @throws \OpenSearch\Generated\Common\OpenSearchClientException
  29. */
  30. public function listAll();
  31. /**
  32. * @param string $id
  33. * @return \OpenSearch\Generated\SecondRank\SecondRank
  34. * @throws \OpenSearch\Generated\Common\OpenSearchException
  35. * @throws \OpenSearch\Generated\Common\OpenSearchClientException
  36. */
  37. public function getById($id);
  38. /**
  39. * @param string $appId
  40. * @param string $name
  41. * @return \OpenSearch\Generated\SecondRank\SecondRank[]
  42. * @throws \OpenSearch\Generated\Common\OpenSearchException
  43. * @throws \OpenSearch\Generated\Common\OpenSearchClientException
  44. */
  45. public function listByAppIdAndName($appId, $name);
  46. /**
  47. * @param string $id
  48. * @param \OpenSearch\Generated\SecondRank\SecondRank $secondRank
  49. * @return \OpenSearch\Generated\SecondRank\SecondRank
  50. * @throws \OpenSearch\Generated\Common\OpenSearchException
  51. * @throws \OpenSearch\Generated\Common\OpenSearchClientException
  52. */
  53. public function updateById($id, \OpenSearch\Generated\SecondRank\SecondRank $secondRank);
  54. /**
  55. * @param string $id
  56. * @return \OpenSearch\Generated\SecondRank\SecondRank
  57. * @throws \OpenSearch\Generated\Common\OpenSearchException
  58. * @throws \OpenSearch\Generated\Common\OpenSearchClientException
  59. */
  60. public function removeById($id);
  61. }
  62. class SecondRankServiceClient implements \OpenSearch\Generated\SecondRank\SecondRankServiceIf {
  63. protected $input_ = null;
  64. protected $output_ = null;
  65. protected $seqid_ = 0;
  66. public function __construct($input, $output=null) {
  67. $this->input_ = $input;
  68. $this->output_ = $output ? $output : $input;
  69. }
  70. public function save(\OpenSearch\Generated\SecondRank\SecondRank $secondRank)
  71. {
  72. $this->send_save($secondRank);
  73. return $this->recv_save();
  74. }
  75. public function send_save(\OpenSearch\Generated\SecondRank\SecondRank $secondRank)
  76. {
  77. $args = new \OpenSearch\Generated\SecondRank\SecondRankService_save_args();
  78. $args->secondRank = $secondRank;
  79. $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
  80. if ($bin_accel)
  81. {
  82. thrift_protocol_write_binary($this->output_, 'save', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  83. }
  84. else
  85. {
  86. $this->output_->writeMessageBegin('save', TMessageType::CALL, $this->seqid_);
  87. $args->write($this->output_);
  88. $this->output_->writeMessageEnd();
  89. $this->output_->getTransport()->flush();
  90. }
  91. }
  92. public function recv_save()
  93. {
  94. $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
  95. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\OpenSearch\Generated\SecondRank\SecondRankService_save_result', $this->input_->isStrictRead());
  96. else
  97. {
  98. $rseqid = 0;
  99. $fname = null;
  100. $mtype = 0;
  101. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  102. if ($mtype == TMessageType::EXCEPTION) {
  103. $x = new TApplicationException();
  104. $x->read($this->input_);
  105. $this->input_->readMessageEnd();
  106. throw $x;
  107. }
  108. $result = new \OpenSearch\Generated\SecondRank\SecondRankService_save_result();
  109. $result->read($this->input_);
  110. $this->input_->readMessageEnd();
  111. }
  112. if ($result->success !== null) {
  113. return $result->success;
  114. }
  115. if ($result->error !== null) {
  116. throw $result->error;
  117. }
  118. if ($result->e !== null) {
  119. throw $result->e;
  120. }
  121. throw new \Exception("save failed: unknown result");
  122. }
  123. public function listAll()
  124. {
  125. $this->send_listAll();
  126. return $this->recv_listAll();
  127. }
  128. public function send_listAll()
  129. {
  130. $args = new \OpenSearch\Generated\SecondRank\SecondRankService_listAll_args();
  131. $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
  132. if ($bin_accel)
  133. {
  134. thrift_protocol_write_binary($this->output_, 'listAll', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  135. }
  136. else
  137. {
  138. $this->output_->writeMessageBegin('listAll', TMessageType::CALL, $this->seqid_);
  139. $args->write($this->output_);
  140. $this->output_->writeMessageEnd();
  141. $this->output_->getTransport()->flush();
  142. }
  143. }
  144. public function recv_listAll()
  145. {
  146. $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
  147. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\OpenSearch\Generated\SecondRank\SecondRankService_listAll_result', $this->input_->isStrictRead());
  148. else
  149. {
  150. $rseqid = 0;
  151. $fname = null;
  152. $mtype = 0;
  153. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  154. if ($mtype == TMessageType::EXCEPTION) {
  155. $x = new TApplicationException();
  156. $x->read($this->input_);
  157. $this->input_->readMessageEnd();
  158. throw $x;
  159. }
  160. $result = new \OpenSearch\Generated\SecondRank\SecondRankService_listAll_result();
  161. $result->read($this->input_);
  162. $this->input_->readMessageEnd();
  163. }
  164. if ($result->success !== null) {
  165. return $result->success;
  166. }
  167. if ($result->error !== null) {
  168. throw $result->error;
  169. }
  170. if ($result->e !== null) {
  171. throw $result->e;
  172. }
  173. throw new \Exception("listAll failed: unknown result");
  174. }
  175. public function getById($id)
  176. {
  177. $this->send_getById($id);
  178. return $this->recv_getById();
  179. }
  180. public function send_getById($id)
  181. {
  182. $args = new \OpenSearch\Generated\SecondRank\SecondRankService_getById_args();
  183. $args->id = $id;
  184. $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
  185. if ($bin_accel)
  186. {
  187. thrift_protocol_write_binary($this->output_, 'getById', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  188. }
  189. else
  190. {
  191. $this->output_->writeMessageBegin('getById', TMessageType::CALL, $this->seqid_);
  192. $args->write($this->output_);
  193. $this->output_->writeMessageEnd();
  194. $this->output_->getTransport()->flush();
  195. }
  196. }
  197. public function recv_getById()
  198. {
  199. $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
  200. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\OpenSearch\Generated\SecondRank\SecondRankService_getById_result', $this->input_->isStrictRead());
  201. else
  202. {
  203. $rseqid = 0;
  204. $fname = null;
  205. $mtype = 0;
  206. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  207. if ($mtype == TMessageType::EXCEPTION) {
  208. $x = new TApplicationException();
  209. $x->read($this->input_);
  210. $this->input_->readMessageEnd();
  211. throw $x;
  212. }
  213. $result = new \OpenSearch\Generated\SecondRank\SecondRankService_getById_result();
  214. $result->read($this->input_);
  215. $this->input_->readMessageEnd();
  216. }
  217. if ($result->success !== null) {
  218. return $result->success;
  219. }
  220. if ($result->error !== null) {
  221. throw $result->error;
  222. }
  223. if ($result->e !== null) {
  224. throw $result->e;
  225. }
  226. throw new \Exception("getById failed: unknown result");
  227. }
  228. public function listByAppIdAndName($appId, $name)
  229. {
  230. $this->send_listByAppIdAndName($appId, $name);
  231. return $this->recv_listByAppIdAndName();
  232. }
  233. public function send_listByAppIdAndName($appId, $name)
  234. {
  235. $args = new \OpenSearch\Generated\SecondRank\SecondRankService_listByAppIdAndName_args();
  236. $args->appId = $appId;
  237. $args->name = $name;
  238. $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
  239. if ($bin_accel)
  240. {
  241. thrift_protocol_write_binary($this->output_, 'listByAppIdAndName', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  242. }
  243. else
  244. {
  245. $this->output_->writeMessageBegin('listByAppIdAndName', TMessageType::CALL, $this->seqid_);
  246. $args->write($this->output_);
  247. $this->output_->writeMessageEnd();
  248. $this->output_->getTransport()->flush();
  249. }
  250. }
  251. public function recv_listByAppIdAndName()
  252. {
  253. $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
  254. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\OpenSearch\Generated\SecondRank\SecondRankService_listByAppIdAndName_result', $this->input_->isStrictRead());
  255. else
  256. {
  257. $rseqid = 0;
  258. $fname = null;
  259. $mtype = 0;
  260. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  261. if ($mtype == TMessageType::EXCEPTION) {
  262. $x = new TApplicationException();
  263. $x->read($this->input_);
  264. $this->input_->readMessageEnd();
  265. throw $x;
  266. }
  267. $result = new \OpenSearch\Generated\SecondRank\SecondRankService_listByAppIdAndName_result();
  268. $result->read($this->input_);
  269. $this->input_->readMessageEnd();
  270. }
  271. if ($result->success !== null) {
  272. return $result->success;
  273. }
  274. if ($result->error !== null) {
  275. throw $result->error;
  276. }
  277. if ($result->e !== null) {
  278. throw $result->e;
  279. }
  280. throw new \Exception("listByAppIdAndName failed: unknown result");
  281. }
  282. public function updateById($id, \OpenSearch\Generated\SecondRank\SecondRank $secondRank)
  283. {
  284. $this->send_updateById($id, $secondRank);
  285. return $this->recv_updateById();
  286. }
  287. public function send_updateById($id, \OpenSearch\Generated\SecondRank\SecondRank $secondRank)
  288. {
  289. $args = new \OpenSearch\Generated\SecondRank\SecondRankService_updateById_args();
  290. $args->id = $id;
  291. $args->secondRank = $secondRank;
  292. $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
  293. if ($bin_accel)
  294. {
  295. thrift_protocol_write_binary($this->output_, 'updateById', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  296. }
  297. else
  298. {
  299. $this->output_->writeMessageBegin('updateById', TMessageType::CALL, $this->seqid_);
  300. $args->write($this->output_);
  301. $this->output_->writeMessageEnd();
  302. $this->output_->getTransport()->flush();
  303. }
  304. }
  305. public function recv_updateById()
  306. {
  307. $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
  308. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\OpenSearch\Generated\SecondRank\SecondRankService_updateById_result', $this->input_->isStrictRead());
  309. else
  310. {
  311. $rseqid = 0;
  312. $fname = null;
  313. $mtype = 0;
  314. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  315. if ($mtype == TMessageType::EXCEPTION) {
  316. $x = new TApplicationException();
  317. $x->read($this->input_);
  318. $this->input_->readMessageEnd();
  319. throw $x;
  320. }
  321. $result = new \OpenSearch\Generated\SecondRank\SecondRankService_updateById_result();
  322. $result->read($this->input_);
  323. $this->input_->readMessageEnd();
  324. }
  325. if ($result->success !== null) {
  326. return $result->success;
  327. }
  328. if ($result->error !== null) {
  329. throw $result->error;
  330. }
  331. if ($result->e !== null) {
  332. throw $result->e;
  333. }
  334. throw new \Exception("updateById failed: unknown result");
  335. }
  336. public function removeById($id)
  337. {
  338. $this->send_removeById($id);
  339. return $this->recv_removeById();
  340. }
  341. public function send_removeById($id)
  342. {
  343. $args = new \OpenSearch\Generated\SecondRank\SecondRankService_removeById_args();
  344. $args->id = $id;
  345. $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
  346. if ($bin_accel)
  347. {
  348. thrift_protocol_write_binary($this->output_, 'removeById', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
  349. }
  350. else
  351. {
  352. $this->output_->writeMessageBegin('removeById', TMessageType::CALL, $this->seqid_);
  353. $args->write($this->output_);
  354. $this->output_->writeMessageEnd();
  355. $this->output_->getTransport()->flush();
  356. }
  357. }
  358. public function recv_removeById()
  359. {
  360. $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
  361. if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\OpenSearch\Generated\SecondRank\SecondRankService_removeById_result', $this->input_->isStrictRead());
  362. else
  363. {
  364. $rseqid = 0;
  365. $fname = null;
  366. $mtype = 0;
  367. $this->input_->readMessageBegin($fname, $mtype, $rseqid);
  368. if ($mtype == TMessageType::EXCEPTION) {
  369. $x = new TApplicationException();
  370. $x->read($this->input_);
  371. $this->input_->readMessageEnd();
  372. throw $x;
  373. }
  374. $result = new \OpenSearch\Generated\SecondRank\SecondRankService_removeById_result();
  375. $result->read($this->input_);
  376. $this->input_->readMessageEnd();
  377. }
  378. if ($result->success !== null) {
  379. return $result->success;
  380. }
  381. if ($result->error !== null) {
  382. throw $result->error;
  383. }
  384. if ($result->e !== null) {
  385. throw $result->e;
  386. }
  387. throw new \Exception("removeById failed: unknown result");
  388. }
  389. }
  390. // HELPER FUNCTIONS AND STRUCTURES
  391. class SecondRankService_save_args {
  392. static $_TSPEC;
  393. /**
  394. * @var \OpenSearch\Generated\SecondRank\SecondRank
  395. */
  396. public $secondRank = null;
  397. public function __construct($vals=null) {
  398. if (!isset(self::$_TSPEC)) {
  399. self::$_TSPEC = array(
  400. 1 => array(
  401. 'var' => 'secondRank',
  402. 'type' => TType::STRUCT,
  403. 'class' => '\OpenSearch\Generated\SecondRank\SecondRank',
  404. ),
  405. );
  406. }
  407. if (is_array($vals)) {
  408. if (isset($vals['secondRank'])) {
  409. $this->secondRank = $vals['secondRank'];
  410. }
  411. }
  412. }
  413. public function getName() {
  414. return 'SecondRankService_save_args';
  415. }
  416. public function read($input)
  417. {
  418. $xfer = 0;
  419. $fname = null;
  420. $ftype = 0;
  421. $fid = 0;
  422. $xfer += $input->readStructBegin($fname);
  423. while (true)
  424. {
  425. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  426. if ($ftype == TType::STOP) {
  427. break;
  428. }
  429. switch ($fid)
  430. {
  431. case 1:
  432. if ($ftype == TType::STRUCT) {
  433. $this->secondRank = new \OpenSearch\Generated\SecondRank\SecondRank();
  434. $xfer += $this->secondRank->read($input);
  435. } else {
  436. $xfer += $input->skip($ftype);
  437. }
  438. break;
  439. default:
  440. $xfer += $input->skip($ftype);
  441. break;
  442. }
  443. $xfer += $input->readFieldEnd();
  444. }
  445. $xfer += $input->readStructEnd();
  446. return $xfer;
  447. }
  448. public function write($output) {
  449. $xfer = 0;
  450. $xfer += $output->writeStructBegin('SecondRankService_save_args');
  451. if ($this->secondRank !== null) {
  452. if (!is_object($this->secondRank)) {
  453. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  454. }
  455. $xfer += $output->writeFieldBegin('secondRank', TType::STRUCT, 1);
  456. $xfer += $this->secondRank->write($output);
  457. $xfer += $output->writeFieldEnd();
  458. }
  459. $xfer += $output->writeFieldStop();
  460. $xfer += $output->writeStructEnd();
  461. return $xfer;
  462. }
  463. }
  464. class SecondRankService_save_result {
  465. static $_TSPEC;
  466. /**
  467. * @var \OpenSearch\Generated\SecondRank\SecondRank
  468. */
  469. public $success = null;
  470. /**
  471. * @var \OpenSearch\Generated\Common\OpenSearchException
  472. */
  473. public $error = null;
  474. /**
  475. * @var \OpenSearch\Generated\Common\OpenSearchClientException
  476. */
  477. public $e = null;
  478. public function __construct($vals=null) {
  479. if (!isset(self::$_TSPEC)) {
  480. self::$_TSPEC = array(
  481. 0 => array(
  482. 'var' => 'success',
  483. 'type' => TType::STRUCT,
  484. 'class' => '\OpenSearch\Generated\SecondRank\SecondRank',
  485. ),
  486. 1 => array(
  487. 'var' => 'error',
  488. 'type' => TType::STRUCT,
  489. 'class' => '\OpenSearch\Generated\Common\OpenSearchException',
  490. ),
  491. 2 => array(
  492. 'var' => 'e',
  493. 'type' => TType::STRUCT,
  494. 'class' => '\OpenSearch\Generated\Common\OpenSearchClientException',
  495. ),
  496. );
  497. }
  498. if (is_array($vals)) {
  499. if (isset($vals['success'])) {
  500. $this->success = $vals['success'];
  501. }
  502. if (isset($vals['error'])) {
  503. $this->error = $vals['error'];
  504. }
  505. if (isset($vals['e'])) {
  506. $this->e = $vals['e'];
  507. }
  508. }
  509. }
  510. public function getName() {
  511. return 'SecondRankService_save_result';
  512. }
  513. public function read($input)
  514. {
  515. $xfer = 0;
  516. $fname = null;
  517. $ftype = 0;
  518. $fid = 0;
  519. $xfer += $input->readStructBegin($fname);
  520. while (true)
  521. {
  522. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  523. if ($ftype == TType::STOP) {
  524. break;
  525. }
  526. switch ($fid)
  527. {
  528. case 0:
  529. if ($ftype == TType::STRUCT) {
  530. $this->success = new \OpenSearch\Generated\SecondRank\SecondRank();
  531. $xfer += $this->success->read($input);
  532. } else {
  533. $xfer += $input->skip($ftype);
  534. }
  535. break;
  536. case 1:
  537. if ($ftype == TType::STRUCT) {
  538. $this->error = new \OpenSearch\Generated\Common\OpenSearchException();
  539. $xfer += $this->error->read($input);
  540. } else {
  541. $xfer += $input->skip($ftype);
  542. }
  543. break;
  544. case 2:
  545. if ($ftype == TType::STRUCT) {
  546. $this->e = new \OpenSearch\Generated\Common\OpenSearchClientException();
  547. $xfer += $this->e->read($input);
  548. } else {
  549. $xfer += $input->skip($ftype);
  550. }
  551. break;
  552. default:
  553. $xfer += $input->skip($ftype);
  554. break;
  555. }
  556. $xfer += $input->readFieldEnd();
  557. }
  558. $xfer += $input->readStructEnd();
  559. return $xfer;
  560. }
  561. public function write($output) {
  562. $xfer = 0;
  563. $xfer += $output->writeStructBegin('SecondRankService_save_result');
  564. if ($this->success !== null) {
  565. if (!is_object($this->success)) {
  566. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  567. }
  568. $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
  569. $xfer += $this->success->write($output);
  570. $xfer += $output->writeFieldEnd();
  571. }
  572. if ($this->error !== null) {
  573. $xfer += $output->writeFieldBegin('error', TType::STRUCT, 1);
  574. $xfer += $this->error->write($output);
  575. $xfer += $output->writeFieldEnd();
  576. }
  577. if ($this->e !== null) {
  578. $xfer += $output->writeFieldBegin('e', TType::STRUCT, 2);
  579. $xfer += $this->e->write($output);
  580. $xfer += $output->writeFieldEnd();
  581. }
  582. $xfer += $output->writeFieldStop();
  583. $xfer += $output->writeStructEnd();
  584. return $xfer;
  585. }
  586. }
  587. class SecondRankService_listAll_args {
  588. static $_TSPEC;
  589. public function __construct() {
  590. if (!isset(self::$_TSPEC)) {
  591. self::$_TSPEC = array(
  592. );
  593. }
  594. }
  595. public function getName() {
  596. return 'SecondRankService_listAll_args';
  597. }
  598. public function read($input)
  599. {
  600. $xfer = 0;
  601. $fname = null;
  602. $ftype = 0;
  603. $fid = 0;
  604. $xfer += $input->readStructBegin($fname);
  605. while (true)
  606. {
  607. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  608. if ($ftype == TType::STOP) {
  609. break;
  610. }
  611. switch ($fid)
  612. {
  613. default:
  614. $xfer += $input->skip($ftype);
  615. break;
  616. }
  617. $xfer += $input->readFieldEnd();
  618. }
  619. $xfer += $input->readStructEnd();
  620. return $xfer;
  621. }
  622. public function write($output) {
  623. $xfer = 0;
  624. $xfer += $output->writeStructBegin('SecondRankService_listAll_args');
  625. $xfer += $output->writeFieldStop();
  626. $xfer += $output->writeStructEnd();
  627. return $xfer;
  628. }
  629. }
  630. class SecondRankService_listAll_result {
  631. static $_TSPEC;
  632. /**
  633. * @var \OpenSearch\Generated\SecondRank\SecondRank[]
  634. */
  635. public $success = null;
  636. /**
  637. * @var \OpenSearch\Generated\Common\OpenSearchException
  638. */
  639. public $error = null;
  640. /**
  641. * @var \OpenSearch\Generated\Common\OpenSearchClientException
  642. */
  643. public $e = null;
  644. public function __construct($vals=null) {
  645. if (!isset(self::$_TSPEC)) {
  646. self::$_TSPEC = array(
  647. 0 => array(
  648. 'var' => 'success',
  649. 'type' => TType::LST,
  650. 'etype' => TType::STRUCT,
  651. 'elem' => array(
  652. 'type' => TType::STRUCT,
  653. 'class' => '\OpenSearch\Generated\SecondRank\SecondRank',
  654. ),
  655. ),
  656. 1 => array(
  657. 'var' => 'error',
  658. 'type' => TType::STRUCT,
  659. 'class' => '\OpenSearch\Generated\Common\OpenSearchException',
  660. ),
  661. 2 => array(
  662. 'var' => 'e',
  663. 'type' => TType::STRUCT,
  664. 'class' => '\OpenSearch\Generated\Common\OpenSearchClientException',
  665. ),
  666. );
  667. }
  668. if (is_array($vals)) {
  669. if (isset($vals['success'])) {
  670. $this->success = $vals['success'];
  671. }
  672. if (isset($vals['error'])) {
  673. $this->error = $vals['error'];
  674. }
  675. if (isset($vals['e'])) {
  676. $this->e = $vals['e'];
  677. }
  678. }
  679. }
  680. public function getName() {
  681. return 'SecondRankService_listAll_result';
  682. }
  683. public function read($input)
  684. {
  685. $xfer = 0;
  686. $fname = null;
  687. $ftype = 0;
  688. $fid = 0;
  689. $xfer += $input->readStructBegin($fname);
  690. while (true)
  691. {
  692. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  693. if ($ftype == TType::STOP) {
  694. break;
  695. }
  696. switch ($fid)
  697. {
  698. case 0:
  699. if ($ftype == TType::LST) {
  700. $this->success = array();
  701. $_size0 = 0;
  702. $_etype3 = 0;
  703. $xfer += $input->readListBegin($_etype3, $_size0);
  704. for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
  705. {
  706. $elem5 = null;
  707. $elem5 = new \OpenSearch\Generated\SecondRank\SecondRank();
  708. $xfer += $elem5->read($input);
  709. $this->success []= $elem5;
  710. }
  711. $xfer += $input->readListEnd();
  712. } else {
  713. $xfer += $input->skip($ftype);
  714. }
  715. break;
  716. case 1:
  717. if ($ftype == TType::STRUCT) {
  718. $this->error = new \OpenSearch\Generated\Common\OpenSearchException();
  719. $xfer += $this->error->read($input);
  720. } else {
  721. $xfer += $input->skip($ftype);
  722. }
  723. break;
  724. case 2:
  725. if ($ftype == TType::STRUCT) {
  726. $this->e = new \OpenSearch\Generated\Common\OpenSearchClientException();
  727. $xfer += $this->e->read($input);
  728. } else {
  729. $xfer += $input->skip($ftype);
  730. }
  731. break;
  732. default:
  733. $xfer += $input->skip($ftype);
  734. break;
  735. }
  736. $xfer += $input->readFieldEnd();
  737. }
  738. $xfer += $input->readStructEnd();
  739. return $xfer;
  740. }
  741. public function write($output) {
  742. $xfer = 0;
  743. $xfer += $output->writeStructBegin('SecondRankService_listAll_result');
  744. if ($this->success !== null) {
  745. if (!is_array($this->success)) {
  746. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  747. }
  748. $xfer += $output->writeFieldBegin('success', TType::LST, 0);
  749. {
  750. $output->writeListBegin(TType::STRUCT, count($this->success));
  751. {
  752. foreach ($this->success as $iter6)
  753. {
  754. $xfer += $iter6->write($output);
  755. }
  756. }
  757. $output->writeListEnd();
  758. }
  759. $xfer += $output->writeFieldEnd();
  760. }
  761. if ($this->error !== null) {
  762. $xfer += $output->writeFieldBegin('error', TType::STRUCT, 1);
  763. $xfer += $this->error->write($output);
  764. $xfer += $output->writeFieldEnd();
  765. }
  766. if ($this->e !== null) {
  767. $xfer += $output->writeFieldBegin('e', TType::STRUCT, 2);
  768. $xfer += $this->e->write($output);
  769. $xfer += $output->writeFieldEnd();
  770. }
  771. $xfer += $output->writeFieldStop();
  772. $xfer += $output->writeStructEnd();
  773. return $xfer;
  774. }
  775. }
  776. class SecondRankService_getById_args {
  777. static $_TSPEC;
  778. /**
  779. * @var string
  780. */
  781. public $id = null;
  782. public function __construct($vals=null) {
  783. if (!isset(self::$_TSPEC)) {
  784. self::$_TSPEC = array(
  785. 1 => array(
  786. 'var' => 'id',
  787. 'type' => TType::STRING,
  788. ),
  789. );
  790. }
  791. if (is_array($vals)) {
  792. if (isset($vals['id'])) {
  793. $this->id = $vals['id'];
  794. }
  795. }
  796. }
  797. public function getName() {
  798. return 'SecondRankService_getById_args';
  799. }
  800. public function read($input)
  801. {
  802. $xfer = 0;
  803. $fname = null;
  804. $ftype = 0;
  805. $fid = 0;
  806. $xfer += $input->readStructBegin($fname);
  807. while (true)
  808. {
  809. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  810. if ($ftype == TType::STOP) {
  811. break;
  812. }
  813. switch ($fid)
  814. {
  815. case 1:
  816. if ($ftype == TType::STRING) {
  817. $xfer += $input->readString($this->id);
  818. } else {
  819. $xfer += $input->skip($ftype);
  820. }
  821. break;
  822. default:
  823. $xfer += $input->skip($ftype);
  824. break;
  825. }
  826. $xfer += $input->readFieldEnd();
  827. }
  828. $xfer += $input->readStructEnd();
  829. return $xfer;
  830. }
  831. public function write($output) {
  832. $xfer = 0;
  833. $xfer += $output->writeStructBegin('SecondRankService_getById_args');
  834. if ($this->id !== null) {
  835. $xfer += $output->writeFieldBegin('id', TType::STRING, 1);
  836. $xfer += $output->writeString($this->id);
  837. $xfer += $output->writeFieldEnd();
  838. }
  839. $xfer += $output->writeFieldStop();
  840. $xfer += $output->writeStructEnd();
  841. return $xfer;
  842. }
  843. }
  844. class SecondRankService_getById_result {
  845. static $_TSPEC;
  846. /**
  847. * @var \OpenSearch\Generated\SecondRank\SecondRank
  848. */
  849. public $success = null;
  850. /**
  851. * @var \OpenSearch\Generated\Common\OpenSearchException
  852. */
  853. public $error = null;
  854. /**
  855. * @var \OpenSearch\Generated\Common\OpenSearchClientException
  856. */
  857. public $e = null;
  858. public function __construct($vals=null) {
  859. if (!isset(self::$_TSPEC)) {
  860. self::$_TSPEC = array(
  861. 0 => array(
  862. 'var' => 'success',
  863. 'type' => TType::STRUCT,
  864. 'class' => '\OpenSearch\Generated\SecondRank\SecondRank',
  865. ),
  866. 1 => array(
  867. 'var' => 'error',
  868. 'type' => TType::STRUCT,
  869. 'class' => '\OpenSearch\Generated\Common\OpenSearchException',
  870. ),
  871. 2 => array(
  872. 'var' => 'e',
  873. 'type' => TType::STRUCT,
  874. 'class' => '\OpenSearch\Generated\Common\OpenSearchClientException',
  875. ),
  876. );
  877. }
  878. if (is_array($vals)) {
  879. if (isset($vals['success'])) {
  880. $this->success = $vals['success'];
  881. }
  882. if (isset($vals['error'])) {
  883. $this->error = $vals['error'];
  884. }
  885. if (isset($vals['e'])) {
  886. $this->e = $vals['e'];
  887. }
  888. }
  889. }
  890. public function getName() {
  891. return 'SecondRankService_getById_result';
  892. }
  893. public function read($input)
  894. {
  895. $xfer = 0;
  896. $fname = null;
  897. $ftype = 0;
  898. $fid = 0;
  899. $xfer += $input->readStructBegin($fname);
  900. while (true)
  901. {
  902. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  903. if ($ftype == TType::STOP) {
  904. break;
  905. }
  906. switch ($fid)
  907. {
  908. case 0:
  909. if ($ftype == TType::STRUCT) {
  910. $this->success = new \OpenSearch\Generated\SecondRank\SecondRank();
  911. $xfer += $this->success->read($input);
  912. } else {
  913. $xfer += $input->skip($ftype);
  914. }
  915. break;
  916. case 1:
  917. if ($ftype == TType::STRUCT) {
  918. $this->error = new \OpenSearch\Generated\Common\OpenSearchException();
  919. $xfer += $this->error->read($input);
  920. } else {
  921. $xfer += $input->skip($ftype);
  922. }
  923. break;
  924. case 2:
  925. if ($ftype == TType::STRUCT) {
  926. $this->e = new \OpenSearch\Generated\Common\OpenSearchClientException();
  927. $xfer += $this->e->read($input);
  928. } else {
  929. $xfer += $input->skip($ftype);
  930. }
  931. break;
  932. default:
  933. $xfer += $input->skip($ftype);
  934. break;
  935. }
  936. $xfer += $input->readFieldEnd();
  937. }
  938. $xfer += $input->readStructEnd();
  939. return $xfer;
  940. }
  941. public function write($output) {
  942. $xfer = 0;
  943. $xfer += $output->writeStructBegin('SecondRankService_getById_result');
  944. if ($this->success !== null) {
  945. if (!is_object($this->success)) {
  946. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  947. }
  948. $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
  949. $xfer += $this->success->write($output);
  950. $xfer += $output->writeFieldEnd();
  951. }
  952. if ($this->error !== null) {
  953. $xfer += $output->writeFieldBegin('error', TType::STRUCT, 1);
  954. $xfer += $this->error->write($output);
  955. $xfer += $output->writeFieldEnd();
  956. }
  957. if ($this->e !== null) {
  958. $xfer += $output->writeFieldBegin('e', TType::STRUCT, 2);
  959. $xfer += $this->e->write($output);
  960. $xfer += $output->writeFieldEnd();
  961. }
  962. $xfer += $output->writeFieldStop();
  963. $xfer += $output->writeStructEnd();
  964. return $xfer;
  965. }
  966. }
  967. class SecondRankService_listByAppIdAndName_args {
  968. static $_TSPEC;
  969. /**
  970. * @var string
  971. */
  972. public $appId = null;
  973. /**
  974. * @var string
  975. */
  976. public $name = null;
  977. public function __construct($vals=null) {
  978. if (!isset(self::$_TSPEC)) {
  979. self::$_TSPEC = array(
  980. 1 => array(
  981. 'var' => 'appId',
  982. 'type' => TType::STRING,
  983. ),
  984. 2 => array(
  985. 'var' => 'name',
  986. 'type' => TType::STRING,
  987. ),
  988. );
  989. }
  990. if (is_array($vals)) {
  991. if (isset($vals['appId'])) {
  992. $this->appId = $vals['appId'];
  993. }
  994. if (isset($vals['name'])) {
  995. $this->name = $vals['name'];
  996. }
  997. }
  998. }
  999. public function getName() {
  1000. return 'SecondRankService_listByAppIdAndName_args';
  1001. }
  1002. public function read($input)
  1003. {
  1004. $xfer = 0;
  1005. $fname = null;
  1006. $ftype = 0;
  1007. $fid = 0;
  1008. $xfer += $input->readStructBegin($fname);
  1009. while (true)
  1010. {
  1011. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  1012. if ($ftype == TType::STOP) {
  1013. break;
  1014. }
  1015. switch ($fid)
  1016. {
  1017. case 1:
  1018. if ($ftype == TType::STRING) {
  1019. $xfer += $input->readString($this->appId);
  1020. } else {
  1021. $xfer += $input->skip($ftype);
  1022. }
  1023. break;
  1024. case 2:
  1025. if ($ftype == TType::STRING) {
  1026. $xfer += $input->readString($this->name);
  1027. } else {
  1028. $xfer += $input->skip($ftype);
  1029. }
  1030. break;
  1031. default:
  1032. $xfer += $input->skip($ftype);
  1033. break;
  1034. }
  1035. $xfer += $input->readFieldEnd();
  1036. }
  1037. $xfer += $input->readStructEnd();
  1038. return $xfer;
  1039. }
  1040. public function write($output) {
  1041. $xfer = 0;
  1042. $xfer += $output->writeStructBegin('SecondRankService_listByAppIdAndName_args');
  1043. if ($this->appId !== null) {
  1044. $xfer += $output->writeFieldBegin('appId', TType::STRING, 1);
  1045. $xfer += $output->writeString($this->appId);
  1046. $xfer += $output->writeFieldEnd();
  1047. }
  1048. if ($this->name !== null) {
  1049. $xfer += $output->writeFieldBegin('name', TType::STRING, 2);
  1050. $xfer += $output->writeString($this->name);
  1051. $xfer += $output->writeFieldEnd();
  1052. }
  1053. $xfer += $output->writeFieldStop();
  1054. $xfer += $output->writeStructEnd();
  1055. return $xfer;
  1056. }
  1057. }
  1058. class SecondRankService_listByAppIdAndName_result {
  1059. static $_TSPEC;
  1060. /**
  1061. * @var \OpenSearch\Generated\SecondRank\SecondRank[]
  1062. */
  1063. public $success = null;
  1064. /**
  1065. * @var \OpenSearch\Generated\Common\OpenSearchException
  1066. */
  1067. public $error = null;
  1068. /**
  1069. * @var \OpenSearch\Generated\Common\OpenSearchClientException
  1070. */
  1071. public $e = null;
  1072. public function __construct($vals=null) {
  1073. if (!isset(self::$_TSPEC)) {
  1074. self::$_TSPEC = array(
  1075. 0 => array(
  1076. 'var' => 'success',
  1077. 'type' => TType::LST,
  1078. 'etype' => TType::STRUCT,
  1079. 'elem' => array(
  1080. 'type' => TType::STRUCT,
  1081. 'class' => '\OpenSearch\Generated\SecondRank\SecondRank',
  1082. ),
  1083. ),
  1084. 1 => array(
  1085. 'var' => 'error',
  1086. 'type' => TType::STRUCT,
  1087. 'class' => '\OpenSearch\Generated\Common\OpenSearchException',
  1088. ),
  1089. 2 => array(
  1090. 'var' => 'e',
  1091. 'type' => TType::STRUCT,
  1092. 'class' => '\OpenSearch\Generated\Common\OpenSearchClientException',
  1093. ),
  1094. );
  1095. }
  1096. if (is_array($vals)) {
  1097. if (isset($vals['success'])) {
  1098. $this->success = $vals['success'];
  1099. }
  1100. if (isset($vals['error'])) {
  1101. $this->error = $vals['error'];
  1102. }
  1103. if (isset($vals['e'])) {
  1104. $this->e = $vals['e'];
  1105. }
  1106. }
  1107. }
  1108. public function getName() {
  1109. return 'SecondRankService_listByAppIdAndName_result';
  1110. }
  1111. public function read($input)
  1112. {
  1113. $xfer = 0;
  1114. $fname = null;
  1115. $ftype = 0;
  1116. $fid = 0;
  1117. $xfer += $input->readStructBegin($fname);
  1118. while (true)
  1119. {
  1120. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  1121. if ($ftype == TType::STOP) {
  1122. break;
  1123. }
  1124. switch ($fid)
  1125. {
  1126. case 0:
  1127. if ($ftype == TType::LST) {
  1128. $this->success = array();
  1129. $_size7 = 0;
  1130. $_etype10 = 0;
  1131. $xfer += $input->readListBegin($_etype10, $_size7);
  1132. for ($_i11 = 0; $_i11 < $_size7; ++$_i11)
  1133. {
  1134. $elem12 = null;
  1135. $elem12 = new \OpenSearch\Generated\SecondRank\SecondRank();
  1136. $xfer += $elem12->read($input);
  1137. $this->success []= $elem12;
  1138. }
  1139. $xfer += $input->readListEnd();
  1140. } else {
  1141. $xfer += $input->skip($ftype);
  1142. }
  1143. break;
  1144. case 1:
  1145. if ($ftype == TType::STRUCT) {
  1146. $this->error = new \OpenSearch\Generated\Common\OpenSearchException();
  1147. $xfer += $this->error->read($input);
  1148. } else {
  1149. $xfer += $input->skip($ftype);
  1150. }
  1151. break;
  1152. case 2:
  1153. if ($ftype == TType::STRUCT) {
  1154. $this->e = new \OpenSearch\Generated\Common\OpenSearchClientException();
  1155. $xfer += $this->e->read($input);
  1156. } else {
  1157. $xfer += $input->skip($ftype);
  1158. }
  1159. break;
  1160. default:
  1161. $xfer += $input->skip($ftype);
  1162. break;
  1163. }
  1164. $xfer += $input->readFieldEnd();
  1165. }
  1166. $xfer += $input->readStructEnd();
  1167. return $xfer;
  1168. }
  1169. public function write($output) {
  1170. $xfer = 0;
  1171. $xfer += $output->writeStructBegin('SecondRankService_listByAppIdAndName_result');
  1172. if ($this->success !== null) {
  1173. if (!is_array($this->success)) {
  1174. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  1175. }
  1176. $xfer += $output->writeFieldBegin('success', TType::LST, 0);
  1177. {
  1178. $output->writeListBegin(TType::STRUCT, count($this->success));
  1179. {
  1180. foreach ($this->success as $iter13)
  1181. {
  1182. $xfer += $iter13->write($output);
  1183. }
  1184. }
  1185. $output->writeListEnd();
  1186. }
  1187. $xfer += $output->writeFieldEnd();
  1188. }
  1189. if ($this->error !== null) {
  1190. $xfer += $output->writeFieldBegin('error', TType::STRUCT, 1);
  1191. $xfer += $this->error->write($output);
  1192. $xfer += $output->writeFieldEnd();
  1193. }
  1194. if ($this->e !== null) {
  1195. $xfer += $output->writeFieldBegin('e', TType::STRUCT, 2);
  1196. $xfer += $this->e->write($output);
  1197. $xfer += $output->writeFieldEnd();
  1198. }
  1199. $xfer += $output->writeFieldStop();
  1200. $xfer += $output->writeStructEnd();
  1201. return $xfer;
  1202. }
  1203. }
  1204. class SecondRankService_updateById_args {
  1205. static $_TSPEC;
  1206. /**
  1207. * @var string
  1208. */
  1209. public $id = null;
  1210. /**
  1211. * @var \OpenSearch\Generated\SecondRank\SecondRank
  1212. */
  1213. public $secondRank = null;
  1214. public function __construct($vals=null) {
  1215. if (!isset(self::$_TSPEC)) {
  1216. self::$_TSPEC = array(
  1217. 1 => array(
  1218. 'var' => 'id',
  1219. 'type' => TType::STRING,
  1220. ),
  1221. 2 => array(
  1222. 'var' => 'secondRank',
  1223. 'type' => TType::STRUCT,
  1224. 'class' => '\OpenSearch\Generated\SecondRank\SecondRank',
  1225. ),
  1226. );
  1227. }
  1228. if (is_array($vals)) {
  1229. if (isset($vals['id'])) {
  1230. $this->id = $vals['id'];
  1231. }
  1232. if (isset($vals['secondRank'])) {
  1233. $this->secondRank = $vals['secondRank'];
  1234. }
  1235. }
  1236. }
  1237. public function getName() {
  1238. return 'SecondRankService_updateById_args';
  1239. }
  1240. public function read($input)
  1241. {
  1242. $xfer = 0;
  1243. $fname = null;
  1244. $ftype = 0;
  1245. $fid = 0;
  1246. $xfer += $input->readStructBegin($fname);
  1247. while (true)
  1248. {
  1249. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  1250. if ($ftype == TType::STOP) {
  1251. break;
  1252. }
  1253. switch ($fid)
  1254. {
  1255. case 1:
  1256. if ($ftype == TType::STRING) {
  1257. $xfer += $input->readString($this->id);
  1258. } else {
  1259. $xfer += $input->skip($ftype);
  1260. }
  1261. break;
  1262. case 2:
  1263. if ($ftype == TType::STRUCT) {
  1264. $this->secondRank = new \OpenSearch\Generated\SecondRank\SecondRank();
  1265. $xfer += $this->secondRank->read($input);
  1266. } else {
  1267. $xfer += $input->skip($ftype);
  1268. }
  1269. break;
  1270. default:
  1271. $xfer += $input->skip($ftype);
  1272. break;
  1273. }
  1274. $xfer += $input->readFieldEnd();
  1275. }
  1276. $xfer += $input->readStructEnd();
  1277. return $xfer;
  1278. }
  1279. public function write($output) {
  1280. $xfer = 0;
  1281. $xfer += $output->writeStructBegin('SecondRankService_updateById_args');
  1282. if ($this->id !== null) {
  1283. $xfer += $output->writeFieldBegin('id', TType::STRING, 1);
  1284. $xfer += $output->writeString($this->id);
  1285. $xfer += $output->writeFieldEnd();
  1286. }
  1287. if ($this->secondRank !== null) {
  1288. if (!is_object($this->secondRank)) {
  1289. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  1290. }
  1291. $xfer += $output->writeFieldBegin('secondRank', TType::STRUCT, 2);
  1292. $xfer += $this->secondRank->write($output);
  1293. $xfer += $output->writeFieldEnd();
  1294. }
  1295. $xfer += $output->writeFieldStop();
  1296. $xfer += $output->writeStructEnd();
  1297. return $xfer;
  1298. }
  1299. }
  1300. class SecondRankService_updateById_result {
  1301. static $_TSPEC;
  1302. /**
  1303. * @var \OpenSearch\Generated\SecondRank\SecondRank
  1304. */
  1305. public $success = null;
  1306. /**
  1307. * @var \OpenSearch\Generated\Common\OpenSearchException
  1308. */
  1309. public $error = null;
  1310. /**
  1311. * @var \OpenSearch\Generated\Common\OpenSearchClientException
  1312. */
  1313. public $e = null;
  1314. public function __construct($vals=null) {
  1315. if (!isset(self::$_TSPEC)) {
  1316. self::$_TSPEC = array(
  1317. 0 => array(
  1318. 'var' => 'success',
  1319. 'type' => TType::STRUCT,
  1320. 'class' => '\OpenSearch\Generated\SecondRank\SecondRank',
  1321. ),
  1322. 1 => array(
  1323. 'var' => 'error',
  1324. 'type' => TType::STRUCT,
  1325. 'class' => '\OpenSearch\Generated\Common\OpenSearchException',
  1326. ),
  1327. 2 => array(
  1328. 'var' => 'e',
  1329. 'type' => TType::STRUCT,
  1330. 'class' => '\OpenSearch\Generated\Common\OpenSearchClientException',
  1331. ),
  1332. );
  1333. }
  1334. if (is_array($vals)) {
  1335. if (isset($vals['success'])) {
  1336. $this->success = $vals['success'];
  1337. }
  1338. if (isset($vals['error'])) {
  1339. $this->error = $vals['error'];
  1340. }
  1341. if (isset($vals['e'])) {
  1342. $this->e = $vals['e'];
  1343. }
  1344. }
  1345. }
  1346. public function getName() {
  1347. return 'SecondRankService_updateById_result';
  1348. }
  1349. public function read($input)
  1350. {
  1351. $xfer = 0;
  1352. $fname = null;
  1353. $ftype = 0;
  1354. $fid = 0;
  1355. $xfer += $input->readStructBegin($fname);
  1356. while (true)
  1357. {
  1358. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  1359. if ($ftype == TType::STOP) {
  1360. break;
  1361. }
  1362. switch ($fid)
  1363. {
  1364. case 0:
  1365. if ($ftype == TType::STRUCT) {
  1366. $this->success = new \OpenSearch\Generated\SecondRank\SecondRank();
  1367. $xfer += $this->success->read($input);
  1368. } else {
  1369. $xfer += $input->skip($ftype);
  1370. }
  1371. break;
  1372. case 1:
  1373. if ($ftype == TType::STRUCT) {
  1374. $this->error = new \OpenSearch\Generated\Common\OpenSearchException();
  1375. $xfer += $this->error->read($input);
  1376. } else {
  1377. $xfer += $input->skip($ftype);
  1378. }
  1379. break;
  1380. case 2:
  1381. if ($ftype == TType::STRUCT) {
  1382. $this->e = new \OpenSearch\Generated\Common\OpenSearchClientException();
  1383. $xfer += $this->e->read($input);
  1384. } else {
  1385. $xfer += $input->skip($ftype);
  1386. }
  1387. break;
  1388. default:
  1389. $xfer += $input->skip($ftype);
  1390. break;
  1391. }
  1392. $xfer += $input->readFieldEnd();
  1393. }
  1394. $xfer += $input->readStructEnd();
  1395. return $xfer;
  1396. }
  1397. public function write($output) {
  1398. $xfer = 0;
  1399. $xfer += $output->writeStructBegin('SecondRankService_updateById_result');
  1400. if ($this->success !== null) {
  1401. if (!is_object($this->success)) {
  1402. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  1403. }
  1404. $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
  1405. $xfer += $this->success->write($output);
  1406. $xfer += $output->writeFieldEnd();
  1407. }
  1408. if ($this->error !== null) {
  1409. $xfer += $output->writeFieldBegin('error', TType::STRUCT, 1);
  1410. $xfer += $this->error->write($output);
  1411. $xfer += $output->writeFieldEnd();
  1412. }
  1413. if ($this->e !== null) {
  1414. $xfer += $output->writeFieldBegin('e', TType::STRUCT, 2);
  1415. $xfer += $this->e->write($output);
  1416. $xfer += $output->writeFieldEnd();
  1417. }
  1418. $xfer += $output->writeFieldStop();
  1419. $xfer += $output->writeStructEnd();
  1420. return $xfer;
  1421. }
  1422. }
  1423. class SecondRankService_removeById_args {
  1424. static $_TSPEC;
  1425. /**
  1426. * @var string
  1427. */
  1428. public $id = null;
  1429. public function __construct($vals=null) {
  1430. if (!isset(self::$_TSPEC)) {
  1431. self::$_TSPEC = array(
  1432. 1 => array(
  1433. 'var' => 'id',
  1434. 'type' => TType::STRING,
  1435. ),
  1436. );
  1437. }
  1438. if (is_array($vals)) {
  1439. if (isset($vals['id'])) {
  1440. $this->id = $vals['id'];
  1441. }
  1442. }
  1443. }
  1444. public function getName() {
  1445. return 'SecondRankService_removeById_args';
  1446. }
  1447. public function read($input)
  1448. {
  1449. $xfer = 0;
  1450. $fname = null;
  1451. $ftype = 0;
  1452. $fid = 0;
  1453. $xfer += $input->readStructBegin($fname);
  1454. while (true)
  1455. {
  1456. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  1457. if ($ftype == TType::STOP) {
  1458. break;
  1459. }
  1460. switch ($fid)
  1461. {
  1462. case 1:
  1463. if ($ftype == TType::STRING) {
  1464. $xfer += $input->readString($this->id);
  1465. } else {
  1466. $xfer += $input->skip($ftype);
  1467. }
  1468. break;
  1469. default:
  1470. $xfer += $input->skip($ftype);
  1471. break;
  1472. }
  1473. $xfer += $input->readFieldEnd();
  1474. }
  1475. $xfer += $input->readStructEnd();
  1476. return $xfer;
  1477. }
  1478. public function write($output) {
  1479. $xfer = 0;
  1480. $xfer += $output->writeStructBegin('SecondRankService_removeById_args');
  1481. if ($this->id !== null) {
  1482. $xfer += $output->writeFieldBegin('id', TType::STRING, 1);
  1483. $xfer += $output->writeString($this->id);
  1484. $xfer += $output->writeFieldEnd();
  1485. }
  1486. $xfer += $output->writeFieldStop();
  1487. $xfer += $output->writeStructEnd();
  1488. return $xfer;
  1489. }
  1490. }
  1491. class SecondRankService_removeById_result {
  1492. static $_TSPEC;
  1493. /**
  1494. * @var \OpenSearch\Generated\SecondRank\SecondRank
  1495. */
  1496. public $success = null;
  1497. /**
  1498. * @var \OpenSearch\Generated\Common\OpenSearchException
  1499. */
  1500. public $error = null;
  1501. /**
  1502. * @var \OpenSearch\Generated\Common\OpenSearchClientException
  1503. */
  1504. public $e = null;
  1505. public function __construct($vals=null) {
  1506. if (!isset(self::$_TSPEC)) {
  1507. self::$_TSPEC = array(
  1508. 0 => array(
  1509. 'var' => 'success',
  1510. 'type' => TType::STRUCT,
  1511. 'class' => '\OpenSearch\Generated\SecondRank\SecondRank',
  1512. ),
  1513. 1 => array(
  1514. 'var' => 'error',
  1515. 'type' => TType::STRUCT,
  1516. 'class' => '\OpenSearch\Generated\Common\OpenSearchException',
  1517. ),
  1518. 2 => array(
  1519. 'var' => 'e',
  1520. 'type' => TType::STRUCT,
  1521. 'class' => '\OpenSearch\Generated\Common\OpenSearchClientException',
  1522. ),
  1523. );
  1524. }
  1525. if (is_array($vals)) {
  1526. if (isset($vals['success'])) {
  1527. $this->success = $vals['success'];
  1528. }
  1529. if (isset($vals['error'])) {
  1530. $this->error = $vals['error'];
  1531. }
  1532. if (isset($vals['e'])) {
  1533. $this->e = $vals['e'];
  1534. }
  1535. }
  1536. }
  1537. public function getName() {
  1538. return 'SecondRankService_removeById_result';
  1539. }
  1540. public function read($input)
  1541. {
  1542. $xfer = 0;
  1543. $fname = null;
  1544. $ftype = 0;
  1545. $fid = 0;
  1546. $xfer += $input->readStructBegin($fname);
  1547. while (true)
  1548. {
  1549. $xfer += $input->readFieldBegin($fname, $ftype, $fid);
  1550. if ($ftype == TType::STOP) {
  1551. break;
  1552. }
  1553. switch ($fid)
  1554. {
  1555. case 0:
  1556. if ($ftype == TType::STRUCT) {
  1557. $this->success = new \OpenSearch\Generated\SecondRank\SecondRank();
  1558. $xfer += $this->success->read($input);
  1559. } else {
  1560. $xfer += $input->skip($ftype);
  1561. }
  1562. break;
  1563. case 1:
  1564. if ($ftype == TType::STRUCT) {
  1565. $this->error = new \OpenSearch\Generated\Common\OpenSearchException();
  1566. $xfer += $this->error->read($input);
  1567. } else {
  1568. $xfer += $input->skip($ftype);
  1569. }
  1570. break;
  1571. case 2:
  1572. if ($ftype == TType::STRUCT) {
  1573. $this->e = new \OpenSearch\Generated\Common\OpenSearchClientException();
  1574. $xfer += $this->e->read($input);
  1575. } else {
  1576. $xfer += $input->skip($ftype);
  1577. }
  1578. break;
  1579. default:
  1580. $xfer += $input->skip($ftype);
  1581. break;
  1582. }
  1583. $xfer += $input->readFieldEnd();
  1584. }
  1585. $xfer += $input->readStructEnd();
  1586. return $xfer;
  1587. }
  1588. public function write($output) {
  1589. $xfer = 0;
  1590. $xfer += $output->writeStructBegin('SecondRankService_removeById_result');
  1591. if ($this->success !== null) {
  1592. if (!is_object($this->success)) {
  1593. throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
  1594. }
  1595. $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
  1596. $xfer += $this->success->write($output);
  1597. $xfer += $output->writeFieldEnd();
  1598. }
  1599. if ($this->error !== null) {
  1600. $xfer += $output->writeFieldBegin('error', TType::STRUCT, 1);
  1601. $xfer += $this->error->write($output);
  1602. $xfer += $output->writeFieldEnd();
  1603. }
  1604. if ($this->e !== null) {
  1605. $xfer += $output->writeFieldBegin('e', TType::STRUCT, 2);
  1606. $xfer += $this->e->write($output);
  1607. $xfer += $output->writeFieldEnd();
  1608. }
  1609. $xfer += $output->writeFieldStop();
  1610. $xfer += $output->writeStructEnd();
  1611. return $xfer;
  1612. }
  1613. }
  1614. class SecondRankServiceProcessor {
  1615. protected $handler_ = null;
  1616. public function __construct($handler) {
  1617. $this->handler_ = $handler;
  1618. }
  1619. public function process($input, $output) {
  1620. $rseqid = 0;
  1621. $fname = null;
  1622. $mtype = 0;
  1623. $input->readMessageBegin($fname, $mtype, $rseqid);
  1624. $methodname = 'process_'.$fname;
  1625. if (!method_exists($this, $methodname)) {
  1626. $input->skip(TType::STRUCT);
  1627. $input->readMessageEnd();
  1628. $x = new TApplicationException('Function '.$fname.' not implemented.', TApplicationException::UNKNOWN_METHOD);
  1629. $output->writeMessageBegin($fname, TMessageType::EXCEPTION, $rseqid);
  1630. $x->write($output);
  1631. $output->writeMessageEnd();
  1632. $output->getTransport()->flush();
  1633. return;
  1634. }
  1635. $this->$methodname($rseqid, $input, $output);
  1636. return true;
  1637. }
  1638. protected function process_save($seqid, $input, $output) {
  1639. $args = new \OpenSearch\Generated\SecondRank\SecondRankService_save_args();
  1640. $args->read($input);
  1641. $input->readMessageEnd();
  1642. $result = new \OpenSearch\Generated\SecondRank\SecondRankService_save_result();
  1643. try {
  1644. $result->success = $this->handler_->save($args->secondRank);
  1645. } catch (\OpenSearch\Generated\Common\OpenSearchException $error) {
  1646. $result->error = $error;
  1647. } catch (\OpenSearch\Generated\Common\OpenSearchClientException $e) {
  1648. $result->e = $e;
  1649. }
  1650. $bin_accel = ($output instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
  1651. if ($bin_accel)
  1652. {
  1653. thrift_protocol_write_binary($output, 'save', TMessageType::REPLY, $result, $seqid, $output->isStrictWrite());
  1654. }
  1655. else
  1656. {
  1657. $output->writeMessageBegin('save', TMessageType::REPLY, $seqid);
  1658. $result->write($output);
  1659. $output->writeMessageEnd();
  1660. $output->getTransport()->flush();
  1661. }
  1662. }
  1663. protected function process_listAll($seqid, $input, $output) {
  1664. $args = new \OpenSearch\Generated\SecondRank\SecondRankService_listAll_args();
  1665. $args->read($input);
  1666. $input->readMessageEnd();
  1667. $result = new \OpenSearch\Generated\SecondRank\SecondRankService_listAll_result();
  1668. try {
  1669. $result->success = $this->handler_->listAll();
  1670. } catch (\OpenSearch\Generated\Common\OpenSearchException $error) {
  1671. $result->error = $error;
  1672. } catch (\OpenSearch\Generated\Common\OpenSearchClientException $e) {
  1673. $result->e = $e;
  1674. }
  1675. $bin_accel = ($output instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
  1676. if ($bin_accel)
  1677. {
  1678. thrift_protocol_write_binary($output, 'listAll', TMessageType::REPLY, $result, $seqid, $output->isStrictWrite());
  1679. }
  1680. else
  1681. {
  1682. $output->writeMessageBegin('listAll', TMessageType::REPLY, $seqid);
  1683. $result->write($output);
  1684. $output->writeMessageEnd();
  1685. $output->getTransport()->flush();
  1686. }
  1687. }
  1688. protected function process_getById($seqid, $input, $output) {
  1689. $args = new \OpenSearch\Generated\SecondRank\SecondRankService_getById_args();
  1690. $args->read($input);
  1691. $input->readMessageEnd();
  1692. $result = new \OpenSearch\Generated\SecondRank\SecondRankService_getById_result();
  1693. try {
  1694. $result->success = $this->handler_->getById($args->id);
  1695. } catch (\OpenSearch\Generated\Common\OpenSearchException $error) {
  1696. $result->error = $error;
  1697. } catch (\OpenSearch\Generated\Common\OpenSearchClientException $e) {
  1698. $result->e = $e;
  1699. }
  1700. $bin_accel = ($output instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
  1701. if ($bin_accel)
  1702. {
  1703. thrift_protocol_write_binary($output, 'getById', TMessageType::REPLY, $result, $seqid, $output->isStrictWrite());
  1704. }
  1705. else
  1706. {
  1707. $output->writeMessageBegin('getById', TMessageType::REPLY, $seqid);
  1708. $result->write($output);
  1709. $output->writeMessageEnd();
  1710. $output->getTransport()->flush();
  1711. }
  1712. }
  1713. protected function process_listByAppIdAndName($seqid, $input, $output) {
  1714. $args = new \OpenSearch\Generated\SecondRank\SecondRankService_listByAppIdAndName_args();
  1715. $args->read($input);
  1716. $input->readMessageEnd();
  1717. $result = new \OpenSearch\Generated\SecondRank\SecondRankService_listByAppIdAndName_result();
  1718. try {
  1719. $result->success = $this->handler_->listByAppIdAndName($args->appId, $args->name);
  1720. } catch (\OpenSearch\Generated\Common\OpenSearchException $error) {
  1721. $result->error = $error;
  1722. } catch (\OpenSearch\Generated\Common\OpenSearchClientException $e) {
  1723. $result->e = $e;
  1724. }
  1725. $bin_accel = ($output instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
  1726. if ($bin_accel)
  1727. {
  1728. thrift_protocol_write_binary($output, 'listByAppIdAndName', TMessageType::REPLY, $result, $seqid, $output->isStrictWrite());
  1729. }
  1730. else
  1731. {
  1732. $output->writeMessageBegin('listByAppIdAndName', TMessageType::REPLY, $seqid);
  1733. $result->write($output);
  1734. $output->writeMessageEnd();
  1735. $output->getTransport()->flush();
  1736. }
  1737. }
  1738. protected function process_updateById($seqid, $input, $output) {
  1739. $args = new \OpenSearch\Generated\SecondRank\SecondRankService_updateById_args();
  1740. $args->read($input);
  1741. $input->readMessageEnd();
  1742. $result = new \OpenSearch\Generated\SecondRank\SecondRankService_updateById_result();
  1743. try {
  1744. $result->success = $this->handler_->updateById($args->id, $args->secondRank);
  1745. } catch (\OpenSearch\Generated\Common\OpenSearchException $error) {
  1746. $result->error = $error;
  1747. } catch (\OpenSearch\Generated\Common\OpenSearchClientException $e) {
  1748. $result->e = $e;
  1749. }
  1750. $bin_accel = ($output instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
  1751. if ($bin_accel)
  1752. {
  1753. thrift_protocol_write_binary($output, 'updateById', TMessageType::REPLY, $result, $seqid, $output->isStrictWrite());
  1754. }
  1755. else
  1756. {
  1757. $output->writeMessageBegin('updateById', TMessageType::REPLY, $seqid);
  1758. $result->write($output);
  1759. $output->writeMessageEnd();
  1760. $output->getTransport()->flush();
  1761. }
  1762. }
  1763. protected function process_removeById($seqid, $input, $output) {
  1764. $args = new \OpenSearch\Generated\SecondRank\SecondRankService_removeById_args();
  1765. $args->read($input);
  1766. $input->readMessageEnd();
  1767. $result = new \OpenSearch\Generated\SecondRank\SecondRankService_removeById_result();
  1768. try {
  1769. $result->success = $this->handler_->removeById($args->id);
  1770. } catch (\OpenSearch\Generated\Common\OpenSearchException $error) {
  1771. $result->error = $error;
  1772. } catch (\OpenSearch\Generated\Common\OpenSearchClientException $e) {
  1773. $result->e = $e;
  1774. }
  1775. $bin_accel = ($output instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
  1776. if ($bin_accel)
  1777. {
  1778. thrift_protocol_write_binary($output, 'removeById', TMessageType::REPLY, $result, $seqid, $output->isStrictWrite());
  1779. }
  1780. else
  1781. {
  1782. $output->writeMessageBegin('removeById', TMessageType::REPLY, $seqid);
  1783. $result->write($output);
  1784. $output->writeMessageEnd();
  1785. $output->getTransport()->flush();
  1786. }
  1787. }
  1788. }