public function write($output) { $xfer = 0; $xfer += $output->writeStructBegin('FichaAvaliacaoElegibilidadeThrift'); if ($this->uuidFicha !== null) { $xfer += $output->writeFieldBegin('uuidFicha', TType::STRING, 1); $xfer += $output->writeString($this->uuidFicha); $xfer += $output->writeFieldEnd(); } if ($this->tpCdsOrigem !== null) { $xfer += $output->writeFieldBegin('tpCdsOrigem', TType::I32, 2); $xfer += $output->writeI32($this->tpCdsOrigem); $xfer += $output->writeFieldEnd(); } if ($this->cnsCidadao !== null) { $xfer += $output->writeFieldBegin('cnsCidadao', TType::STRING, 4); $xfer += $output->writeString($this->cnsCidadao); $xfer += $output->writeFieldEnd(); } if ($this->nomeCidadao !== null) { $xfer += $output->writeFieldBegin('nomeCidadao', TType::STRING, 5); $xfer += $output->writeString($this->nomeCidadao); $xfer += $output->writeFieldEnd(); } if ($this->nomeSocialCidadao !== null) { $xfer += $output->writeFieldBegin('nomeSocialCidadao', TType::STRING, 6); $xfer += $output->writeString($this->nomeSocialCidadao); $xfer += $output->writeFieldEnd(); } if ($this->dataNascimentoCidadao !== null) { $xfer += $output->writeFieldBegin('dataNascimentoCidadao', TType::I64, 7); $xfer += $output->writeI64($this->dataNascimentoCidadao); $xfer += $output->writeFieldEnd(); } if ($this->sexoCidadao !== null) { $xfer += $output->writeFieldBegin('sexoCidadao', TType::I64, 8); $xfer += $output->writeI64($this->sexoCidadao); $xfer += $output->writeFieldEnd(); } if ($this->racaCorCidadao !== null) { $xfer += $output->writeFieldBegin('racaCorCidadao', TType::I64, 9); $xfer += $output->writeI64($this->racaCorCidadao); $xfer += $output->writeFieldEnd(); } if ($this->nomeMaeCidadao !== null) { $xfer += $output->writeFieldBegin('nomeMaeCidadao', TType::STRING, 10); $xfer += $output->writeString($this->nomeMaeCidadao); $xfer += $output->writeFieldEnd(); } if ($this->desconheceNomeMae !== null) { $xfer += $output->writeFieldBegin('desconheceNomeMae', TType::BOOL, 11); $xfer += $output->writeBool($this->desconheceNomeMae); $xfer += $output->writeFieldEnd(); } if ($this->codigoIbgeMunicipioNascimento !== null) { $xfer += $output->writeFieldBegin('codigoIbgeMunicipioNascimento', TType::STRING, 12); $xfer += $output->writeString($this->codigoIbgeMunicipioNascimento); $xfer += $output->writeFieldEnd(); } if ($this->nacionalidadeCidadao !== null) { $xfer += $output->writeFieldBegin('nacionalidadeCidadao', TType::I64, 13); $xfer += $output->writeI64($this->nacionalidadeCidadao); $xfer += $output->writeFieldEnd(); } if ($this->emailCidadao !== null) { $xfer += $output->writeFieldBegin('emailCidadao', TType::STRING, 14); $xfer += $output->writeString($this->emailCidadao); $xfer += $output->writeFieldEnd(); } if ($this->numeroNisPisPasep !== null) { $xfer += $output->writeFieldBegin('numeroNisPisPasep', TType::STRING, 15); $xfer += $output->writeString($this->numeroNisPisPasep); $xfer += $output->writeFieldEnd(); } if ($this->endereco !== null) { if (!is_object($this->endereco)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('endereco', TType::STRUCT, 16); $xfer += $this->endereco->write($output); $xfer += $output->writeFieldEnd(); } if ($this->atencaoDomiciliarProcedencia !== null) { $xfer += $output->writeFieldBegin('atencaoDomiciliarProcedencia', TType::I64, 17); $xfer += $output->writeI64($this->atencaoDomiciliarProcedencia); $xfer += $output->writeFieldEnd(); } if ($this->atencaoDomiciliarModalidade !== null) { $xfer += $output->writeFieldBegin('atencaoDomiciliarModalidade', TType::I64, 18); $xfer += $output->writeI64($this->atencaoDomiciliarModalidade); $xfer += $output->writeFieldEnd(); } if ($this->condicoesAvaliadas !== null) { if (!is_array($this->condicoesAvaliadas)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('condicoesAvaliadas', TType::LST, 19); $output->writeListBegin(TType::I64, count($this->condicoesAvaliadas)); foreach ($this->condicoesAvaliadas as $iter12) { $xfer += $output->writeI64($iter12); } $output->writeListEnd(); $xfer += $output->writeFieldEnd(); } if ($this->cid10Principal !== null) { $xfer += $output->writeFieldBegin('cid10Principal', TType::STRING, 20); $xfer += $output->writeString($this->cid10Principal); $xfer += $output->writeFieldEnd(); } if ($this->cid10SecundarioUm !== null) { $xfer += $output->writeFieldBegin('cid10SecundarioUm', TType::STRING, 21); $xfer += $output->writeString($this->cid10SecundarioUm); $xfer += $output->writeFieldEnd(); } if ($this->cid10SecundarioDois !== null) { $xfer += $output->writeFieldBegin('cid10SecundarioDois', TType::STRING, 22); $xfer += $output->writeString($this->cid10SecundarioDois); $xfer += $output->writeFieldEnd(); } if ($this->conclusaoDestinoElegivel !== null) { $xfer += $output->writeFieldBegin('conclusaoDestinoElegivel', TType::I64, 23); $xfer += $output->writeI64($this->conclusaoDestinoElegivel); $xfer += $output->writeFieldEnd(); } if ($this->conclusaoDestinoInelegivel !== null) { if (!is_array($this->conclusaoDestinoInelegivel)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('conclusaoDestinoInelegivel', TType::LST, 24); $output->writeListBegin(TType::I64, count($this->conclusaoDestinoInelegivel)); foreach ($this->conclusaoDestinoInelegivel as $iter13) { $xfer += $output->writeI64($iter13); } $output->writeListEnd(); $xfer += $output->writeFieldEnd(); } if ($this->cuidadorCidadao !== null) { $xfer += $output->writeFieldBegin('cuidadorCidadao', TType::I64, 25); $xfer += $output->writeI64($this->cuidadorCidadao); $xfer += $output->writeFieldEnd(); } if ($this->turno !== null) { $xfer += $output->writeFieldBegin('turno', TType::I64, 26); $xfer += $output->writeI64($this->turno); $xfer += $output->writeFieldEnd(); } if ($this->headerTransport !== null) { if (!is_object($this->headerTransport)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('headerTransport', TType::STRUCT, 27); $xfer += $this->headerTransport->write($output); $xfer += $output->writeFieldEnd(); } if ($this->nomePaiCidadao !== null) { $xfer += $output->writeFieldBegin('nomePaiCidadao', TType::STRING, 28); $xfer += $output->writeString($this->nomePaiCidadao); $xfer += $output->writeFieldEnd(); } if ($this->desconheceNomePai !== null) { $xfer += $output->writeFieldBegin('desconheceNomePai', TType::BOOL, 29); $xfer += $output->writeBool($this->desconheceNomePai); $xfer += $output->writeFieldEnd(); } if ($this->dtNaturalizacao !== null) { $xfer += $output->writeFieldBegin('dtNaturalizacao', TType::I64, 30); $xfer += $output->writeI64($this->dtNaturalizacao); $xfer += $output->writeFieldEnd(); } if ($this->portariaNaturalizacao !== null) { $xfer += $output->writeFieldBegin('portariaNaturalizacao', TType::STRING, 31); $xfer += $output->writeString($this->portariaNaturalizacao); $xfer += $output->writeFieldEnd(); } if ($this->dtEntradaBrasil !== null) { $xfer += $output->writeFieldBegin('dtEntradaBrasil', TType::I64, 32); $xfer += $output->writeI64($this->dtEntradaBrasil); $xfer += $output->writeFieldEnd(); } if ($this->paisNascimento !== null) { $xfer += $output->writeFieldBegin('paisNascimento', TType::I64, 33); $xfer += $output->writeI64($this->paisNascimento); $xfer += $output->writeFieldEnd(); } if ($this->etnia !== null) { $xfer += $output->writeFieldBegin('etnia', TType::I64, 34); $xfer += $output->writeI64($this->etnia); $xfer += $output->writeFieldEnd(); } if ($this->cnsCuidador !== null) { $xfer += $output->writeFieldBegin('cnsCuidador', TType::STRING, 35); $xfer += $output->writeString($this->cnsCuidador); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; }
public function write($output) { $xfer = 0; $xfer += $output->writeStructBegin('CadastroDomiciliarThrift'); if ($this->animaisNoDomicilio !== null) { if (!is_array($this->animaisNoDomicilio)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('animaisNoDomicilio', TType::LST, 1); $output->writeListBegin(TType::I64, count($this->animaisNoDomicilio)); foreach ($this->animaisNoDomicilio as $iter12) { $xfer += $output->writeI64($iter12); } $output->writeListEnd(); $xfer += $output->writeFieldEnd(); } if ($this->condicaoMoradia !== null) { if (!is_object($this->condicaoMoradia)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('condicaoMoradia', TType::STRUCT, 2); $xfer += $this->condicaoMoradia->write($output); $xfer += $output->writeFieldEnd(); } if ($this->enderecoLocalPermanencia !== null) { if (!is_object($this->enderecoLocalPermanencia)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('enderecoLocalPermanencia', TType::STRUCT, 4); $xfer += $this->enderecoLocalPermanencia->write($output); $xfer += $output->writeFieldEnd(); } if ($this->familias !== null) { if (!is_array($this->familias)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('familias', TType::LST, 5); $output->writeListBegin(TType::STRUCT, count($this->familias)); foreach ($this->familias as $iter13) { $xfer += $iter13->write($output); } $output->writeListEnd(); $xfer += $output->writeFieldEnd(); } if ($this->fichaAtualizada !== null) { $xfer += $output->writeFieldBegin('fichaAtualizada', TType::BOOL, 6); $xfer += $output->writeBool($this->fichaAtualizada); $xfer += $output->writeFieldEnd(); } if ($this->quantosAnimaisNoDomicilio !== null) { $xfer += $output->writeFieldBegin('quantosAnimaisNoDomicilio', TType::STRING, 7); $xfer += $output->writeString($this->quantosAnimaisNoDomicilio); $xfer += $output->writeFieldEnd(); } if ($this->stAnimaisNoDomicilio !== null) { $xfer += $output->writeFieldBegin('stAnimaisNoDomicilio', TType::BOOL, 8); $xfer += $output->writeBool($this->stAnimaisNoDomicilio); $xfer += $output->writeFieldEnd(); } if ($this->statusTermoRecusa !== null) { $xfer += $output->writeFieldBegin('statusTermoRecusa', TType::BOOL, 9); $xfer += $output->writeBool($this->statusTermoRecusa); $xfer += $output->writeFieldEnd(); } if ($this->tpCdsOrigem !== null) { $xfer += $output->writeFieldBegin('tpCdsOrigem', TType::I32, 10); $xfer += $output->writeI32($this->tpCdsOrigem); $xfer += $output->writeFieldEnd(); } if ($this->uuid !== null) { $xfer += $output->writeFieldBegin('uuid', TType::STRING, 11); $xfer += $output->writeString($this->uuid); $xfer += $output->writeFieldEnd(); } if ($this->uuidFichaOriginadora !== null) { $xfer += $output->writeFieldBegin('uuidFichaOriginadora', TType::STRING, 12); $xfer += $output->writeString($this->uuidFichaOriginadora); $xfer += $output->writeFieldEnd(); } if ($this->tipoDeImovel !== null) { $xfer += $output->writeFieldBegin('tipoDeImovel', TType::I64, 13); $xfer += $output->writeI64($this->tipoDeImovel); $xfer += $output->writeFieldEnd(); } if ($this->instituicaoPermanencia !== null) { if (!is_object($this->instituicaoPermanencia)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('instituicaoPermanencia', TType::STRUCT, 14); $xfer += $this->instituicaoPermanencia->write($output); $xfer += $output->writeFieldEnd(); } if ($this->headerTransport !== null) { if (!is_object($this->headerTransport)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('headerTransport', TType::STRUCT, 15); $xfer += $this->headerTransport->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; }