| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- <?php
- /*
- * Copyright (c) 2008-2016 vip.com, All Rights Reserved.
- *
- * Powered by com.vip.osp.osp-idlc-2.5.11.
- *
- */
- namespace vipapis\order;
- class OxoOrderSource {
-
- static $_TSPEC;
- public $province = null;
- public $province_code = null;
-
- public function __construct($vals=null){
-
- if (!isset(self::$_TSPEC)){
-
- self::$_TSPEC = array(
- 1 => array(
- 'var' => 'province'
- ),
- 2 => array(
- 'var' => 'province_code'
- ),
-
- );
-
- }
-
- if (is_array($vals)){
-
-
- if (isset($vals['province'])){
-
- $this->province = $vals['province'];
- }
-
-
- if (isset($vals['province_code'])){
-
- $this->province_code = $vals['province_code'];
- }
-
-
- }
-
- }
-
-
- public function getName(){
-
- return 'OxoOrderSource';
- }
-
- public function read($input){
-
- $input->readStructBegin();
- while(true){
-
- $schemeField = $input->readFieldBegin();
- if ($schemeField == null) break;
- $needSkip = true;
-
-
- if ("province" == $schemeField){
-
- $needSkip = false;
- $input->readString($this->province);
-
- }
-
-
-
-
- if ("province_code" == $schemeField){
-
- $needSkip = false;
- $input->readString($this->province_code);
-
- }
-
-
-
- if($needSkip){
-
- \Osp\Protocol\ProtocolUtil::skip($input);
- }
-
- $input->readFieldEnd();
- }
-
- $input->readStructEnd();
-
-
-
- }
-
- public function write($output){
-
- $xfer = 0;
- $xfer += $output->writeStructBegin();
-
- if($this->province !== null) {
-
- $xfer += $output->writeFieldBegin('province');
- $xfer += $output->writeString($this->province);
-
- $xfer += $output->writeFieldEnd();
- }
-
-
- if($this->province_code !== null) {
-
- $xfer += $output->writeFieldBegin('province_code');
- $xfer += $output->writeString($this->province_code);
-
- $xfer += $output->writeFieldEnd();
- }
-
-
- $xfer += $output->writeFieldStop();
- $xfer += $output->writeStructEnd();
- return $xfer;
- }
-
- }
- ?>
|