public function __construct($vals = null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array(1 => array('var' => 'service_id', 'type' => TType::STRING), 2 => array('var' => 'service_instances', 'type' => TType::LST, 'etype' => TType::STRUCT, 'elem' => array('type' => TType::STRUCT, 'class' => '\\TServiceInstance'))); } if (is_array($vals)) { if (isset($vals['service_id'])) { $this->service_id = $vals['service_id']; } if (isset($vals['service_instances'])) { $this->service_instances = $vals['service_instances']; } } }
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::I32) { $xfer += $input->readI32($this->protocolVersion); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::LST) { $this->service_memberships = array(); $_size0 = 0; $_etype3 = 0; $xfer += $input->readListBegin($_etype3, $_size0); for ($_i4 = 0; $_i4 < $_size0; ++$_i4) { $elem5 = null; $elem5 = new \TServiceMembership(); $xfer += $elem5->read($input); $this->service_memberships[] = $elem5; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 3: if ($ftype == TType::LST) { $this->updated_objects = array(); $_size6 = 0; $_etype9 = 0; $xfer += $input->readListBegin($_etype9, $_size6); for ($_i10 = 0; $_i10 < $_size6; ++$_i10) { $elem11 = null; $elem11 = new \TVersionedObject(); $xfer += $elem11->read($input); $this->updated_objects[] = $elem11; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 4: if ($ftype == TType::LST) { $this->deleted_object_keys = array(); $_size12 = 0; $_etype15 = 0; $xfer += $input->readListBegin($_etype15, $_size12); for ($_i16 = 0; $_i16 < $_size12; ++$_i16) { $elem17 = null; $xfer += $input->readString($elem17); $this->deleted_object_keys[] = $elem17; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; default: $xfer += $input->skip($ftype); break; } $xfer += $input->readFieldEnd(); } $xfer += $input->readStructEnd(); return $xfer; }