CustomsClearanceService.php 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  1. <?php
  2. /*
  3. * Copyright (c) 2008-2016 vip.com, All Rights Reserved.
  4. *
  5. * Powered by com.vip.osp.osp-idlc-2.5.11.
  6. *
  7. */
  8. namespace vipapis\cup\customs;
  9. interface CustomsClearanceServiceIf{
  10. public function healthCheck();
  11. public function queryCustomsClearance(\com\vip\vop\cup\api\customs\QueryCustomsClearanceReq $req);
  12. }
  13. class _CustomsClearanceServiceClient extends \Osp\Base\OspStub implements \vipapis\cup\customs\CustomsClearanceServiceIf{
  14. public function __construct(){
  15. parent::__construct("vipapis.cup.customs.CustomsClearanceService", "1.0.0");
  16. }
  17. public function healthCheck(){
  18. $this->send_healthCheck();
  19. return $this->recv_healthCheck();
  20. }
  21. public function send_healthCheck(){
  22. $this->initInvocation("healthCheck");
  23. $args = new \vipapis\cup\customs\CustomsClearanceService_healthCheck_args();
  24. $this->send_base($args);
  25. }
  26. public function recv_healthCheck(){
  27. $result = new \vipapis\cup\customs\CustomsClearanceService_healthCheck_result();
  28. $this->receive_base($result);
  29. if ($result->success !== null){
  30. return $result->success;
  31. }
  32. }
  33. public function queryCustomsClearance(\com\vip\vop\cup\api\customs\QueryCustomsClearanceReq $req){
  34. $this->send_queryCustomsClearance( $req);
  35. return $this->recv_queryCustomsClearance();
  36. }
  37. public function send_queryCustomsClearance(\com\vip\vop\cup\api\customs\QueryCustomsClearanceReq $req){
  38. $this->initInvocation("queryCustomsClearance");
  39. $args = new \vipapis\cup\customs\CustomsClearanceService_queryCustomsClearance_args();
  40. $args->req = $req;
  41. $this->send_base($args);
  42. }
  43. public function recv_queryCustomsClearance(){
  44. $result = new \vipapis\cup\customs\CustomsClearanceService_queryCustomsClearance_result();
  45. $this->receive_base($result);
  46. if ($result->success !== null){
  47. return $result->success;
  48. }
  49. }
  50. }
  51. class CustomsClearanceService_healthCheck_args {
  52. static $_TSPEC;
  53. public function __construct($vals=null){
  54. if (!isset(self::$_TSPEC)){
  55. self::$_TSPEC = array(
  56. );
  57. }
  58. if (is_array($vals)){
  59. }
  60. }
  61. public function read($input){
  62. }
  63. public function write($output){
  64. $xfer = 0;
  65. $xfer += $output->writeStructBegin();
  66. $xfer += $output->writeFieldStop();
  67. $xfer += $output->writeStructEnd();
  68. return $xfer;
  69. }
  70. }
  71. class CustomsClearanceService_queryCustomsClearance_args {
  72. static $_TSPEC;
  73. public $req = null;
  74. public function __construct($vals=null){
  75. if (!isset(self::$_TSPEC)){
  76. self::$_TSPEC = array(
  77. 1 => array(
  78. 'var' => 'req'
  79. ),
  80. );
  81. }
  82. if (is_array($vals)){
  83. if (isset($vals['req'])){
  84. $this->req = $vals['req'];
  85. }
  86. }
  87. }
  88. public function read($input){
  89. if(true) {
  90. $this->req = new \com\vip\vop\cup\api\customs\QueryCustomsClearanceReq();
  91. $this->req->read($input);
  92. }
  93. }
  94. public function write($output){
  95. $xfer = 0;
  96. $xfer += $output->writeStructBegin();
  97. $xfer += $output->writeFieldBegin('req');
  98. if (!is_object($this->req)) {
  99. throw new \Osp\Exception\OspException('Bad type in structure.', \Osp\Exception\OspException::INVALID_DATA);
  100. }
  101. $xfer += $this->req->write($output);
  102. $xfer += $output->writeFieldEnd();
  103. $xfer += $output->writeFieldStop();
  104. $xfer += $output->writeStructEnd();
  105. return $xfer;
  106. }
  107. }
  108. class CustomsClearanceService_healthCheck_result {
  109. static $_TSPEC;
  110. public $success = null;
  111. public function __construct($vals=null){
  112. if (!isset(self::$_TSPEC)){
  113. self::$_TSPEC = array(
  114. 0 => array(
  115. 'var' => 'success'
  116. ),
  117. );
  118. }
  119. if (is_array($vals)){
  120. if (isset($vals['success'])){
  121. $this->success = $vals['success'];
  122. }
  123. }
  124. }
  125. public function read($input){
  126. if(true) {
  127. $this->success = new \com\vip\hermes\core\health\CheckResult();
  128. $this->success->read($input);
  129. }
  130. }
  131. public function write($output){
  132. $xfer = 0;
  133. $xfer += $output->writeStructBegin();
  134. if($this->success !== null) {
  135. $xfer += $output->writeFieldBegin('success');
  136. if (!is_object($this->success)) {
  137. throw new \Osp\Exception\OspException('Bad type in structure.', \Osp\Exception\OspException::INVALID_DATA);
  138. }
  139. $xfer += $this->success->write($output);
  140. $xfer += $output->writeFieldEnd();
  141. }
  142. $xfer += $output->writeFieldStop();
  143. $xfer += $output->writeStructEnd();
  144. return $xfer;
  145. }
  146. }
  147. class CustomsClearanceService_queryCustomsClearance_result {
  148. static $_TSPEC;
  149. public $success = null;
  150. public function __construct($vals=null){
  151. if (!isset(self::$_TSPEC)){
  152. self::$_TSPEC = array(
  153. 0 => array(
  154. 'var' => 'success'
  155. ),
  156. );
  157. }
  158. if (is_array($vals)){
  159. if (isset($vals['success'])){
  160. $this->success = $vals['success'];
  161. }
  162. }
  163. }
  164. public function read($input){
  165. if(true) {
  166. $this->success = new \com\vip\vop\cup\api\customs\QueryCustomsClearanceResponse();
  167. $this->success->read($input);
  168. }
  169. }
  170. public function write($output){
  171. $xfer = 0;
  172. $xfer += $output->writeStructBegin();
  173. if($this->success !== null) {
  174. $xfer += $output->writeFieldBegin('success');
  175. if (!is_object($this->success)) {
  176. throw new \Osp\Exception\OspException('Bad type in structure.', \Osp\Exception\OspException::INVALID_DATA);
  177. }
  178. $xfer += $this->success->write($output);
  179. $xfer += $output->writeFieldEnd();
  180. }
  181. $xfer += $output->writeFieldStop();
  182. $xfer += $output->writeStructEnd();
  183. return $xfer;
  184. }
  185. }
  186. ?>