public function __construct($vals = null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array(1 => array('var' => 'service_id', 'type' => TType::STRING), 2 => array('var' => 'key', 'type' => TType::STRING), 3 => array('var' => 'type', 'type' => TType::STRING), 4 => array('var' => 'version', 'type' => TType::I64), 5 => array('var' => 'value', 'type' => TType::STRING)); } if (is_array($vals)) { if (isset($vals['service_id'])) { $this->service_id = $vals['service_id']; } if (isset($vals['key'])) { $this->key = $vals['key']; } if (isset($vals['type'])) { $this->type = $vals['type']; } if (isset($vals['version'])) { $this->version = $vals['version']; } if (isset($vals['value'])) { $this->value = $vals['value']; } } }
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->status = new \TStatus(); $xfer += $this->status->read($input); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::LST) { $this->updated_objects = array(); $_size21 = 0; $_etype24 = 0; $xfer += $input->readListBegin($_etype24, $_size21); for ($_i25 = 0; $_i25 < $_size21; ++$_i25) { $elem26 = null; $elem26 = new \TVersionedObject(); $xfer += $elem26->read($input); $this->updated_objects[] = $elem26; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 3: if ($ftype == TType::LST) { $this->deleted_object_keys = array(); $_size27 = 0; $_etype30 = 0; $xfer += $input->readListBegin($_etype30, $_size27); for ($_i31 = 0; $_i31 < $_size27; ++$_i31) { $elem32 = null; $xfer += $input->readString($elem32); $this->deleted_object_keys[] = $elem32; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; default: $xfer += $input->skip($ftype); break; } $xfer += $input->readFieldEnd(); } $xfer += $input->readStructEnd(); return $xfer; }