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