Ejemplo n.º 1
0
 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::LST) {
                     $this->animaisNoDomicilio = array();
                     $_size0 = 0;
                     $_etype3 = 0;
                     $xfer += $input->readListBegin($_etype3, $_size0);
                     for ($_i4 = 0; $_i4 < $_size0; ++$_i4) {
                         $elem5 = null;
                         $xfer += $input->readI64($elem5);
                         $this->animaisNoDomicilio[] = $elem5;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == TType::STRUCT) {
                     $this->condicaoMoradia = new \br\gov\saude\esus\cds\transport\generated\thrift\cadastrodomiciliar\CondicaoMoradiaThrift();
                     $xfer += $this->condicaoMoradia->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 3:
                 if ($ftype == TType::STRUCT) {
                     $this->dadosGerais = new \br\gov\saude\esus\cds\transport\generated\thrift\common\HeaderCdsCadastroThrift();
                     $xfer += $this->dadosGerais->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 4:
                 if ($ftype == TType::STRUCT) {
                     $this->enderecoLocalPermanencia = new \br\gov\saude\esus\cds\transport\generated\thrift\common\EnderecoLocalPermanenciaThrift();
                     $xfer += $this->enderecoLocalPermanencia->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 5:
                 if ($ftype == TType::LST) {
                     $this->familias = array();
                     $_size6 = 0;
                     $_etype9 = 0;
                     $xfer += $input->readListBegin($_etype9, $_size6);
                     for ($_i10 = 0; $_i10 < $_size6; ++$_i10) {
                         $elem11 = null;
                         $elem11 = new \br\gov\saude\esus\cds\transport\generated\thrift\cadastrodomiciliar\FamiliaRowThrift();
                         $xfer += $elem11->read($input);
                         $this->familias[] = $elem11;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 6:
                 if ($ftype == TType::BOOL) {
                     $xfer += $input->readBool($this->fichaAtualizada);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 7:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->quantosAnimaisNoDomicilio);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 8:
                 if ($ftype == TType::BOOL) {
                     $xfer += $input->readBool($this->stAnimaisNoDomicilio);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 9:
                 if ($ftype == TType::BOOL) {
                     $xfer += $input->readBool($this->statusTermoRecusaCadastroDomiciliarAtencaoBasica);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 10:
                 if ($ftype == TType::I32) {
                     $xfer += $input->readI32($this->tpCdsOrigem);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 11:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->uuid);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 12:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->uuidFichaOriginadora);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }
Ejemplo n.º 2
0
 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::STRING) {
                     $xfer += $input->readString($this->uuidFicha);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == TType::I32) {
                     $xfer += $input->readI32($this->tpCdsOrigem);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 3:
                 if ($ftype == TType::STRUCT) {
                     $this->headerTransport = new \br\gov\saude\esus\cds\transport\generated\thrift\common\UnicaLotacaoHeaderThrift();
                     $xfer += $this->headerTransport->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 4:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->numeroCartaoSus);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 5:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->nomeCidadao);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 6:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->nomeSocialCidadao);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 7:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->dataNascimentoCidadao);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 8:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->sexoCidadao);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 9:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->racaCorCidadao);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 10:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->nomeMaeCidadao);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 11:
                 if ($ftype == TType::BOOL) {
                     $xfer += $input->readBool($this->desconheceNomeMae);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 12:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->codigoIbgeMunicipioNascimento);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 13:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->codigoNacionalidade);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 14:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->emailCidadao);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 15:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->numeroNisPisPasep);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 16:
                 if ($ftype == TType::STRUCT) {
                     $this->endereco = new \br\gov\saude\esus\cds\transport\generated\thrift\common\EnderecoLocalPermanenciaThrift();
                     $xfer += $this->endereco->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 17:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->atencaoDomiciliarOrigem);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 18:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->atencaoDomiciliarModalidade);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 19:
                 if ($ftype == TType::LST) {
                     $this->situacoesPresentes = array();
                     $_size0 = 0;
                     $_etype3 = 0;
                     $xfer += $input->readListBegin($_etype3, $_size0);
                     for ($_i4 = 0; $_i4 < $_size0; ++$_i4) {
                         $elem5 = null;
                         $xfer += $input->readI64($elem5);
                         $this->situacoesPresentes[] = $elem5;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 20:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->cid10Principal);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 21:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->cid10Segundo);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 22:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->cid10Terceiro);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 23:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->conclusaoDestinoElegivel);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 24:
                 if ($ftype == TType::LST) {
                     $this->conclusaoDestinoInelegivel = array();
                     $_size6 = 0;
                     $_etype9 = 0;
                     $xfer += $input->readListBegin($_etype9, $_size6);
                     for ($_i10 = 0; $_i10 < $_size6; ++$_i10) {
                         $elem11 = null;
                         $xfer += $input->readI64($elem11);
                         $this->conclusaoDestinoInelegivel[] = $elem11;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 25:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->cuidadorCidadao);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }