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->dadosGerais !== null) { if (!is_object($this->dadosGerais)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('dadosGerais', TType::STRUCT, 3); $xfer += $this->dadosGerais->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->statusTermoRecusaCadastroDomiciliarAtencaoBasica !== null) { $xfer += $output->writeFieldBegin('statusTermoRecusaCadastroDomiciliarAtencaoBasica', TType::BOOL, 9); $xfer += $output->writeBool($this->statusTermoRecusaCadastroDomiciliarAtencaoBasica); $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(); } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; }
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->headerTransport !== null) { if (!is_object($this->headerTransport)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('headerTransport', TType::STRUCT, 3); $xfer += $this->headerTransport->write($output); $xfer += $output->writeFieldEnd(); } if ($this->numeroCartaoSus !== null) { $xfer += $output->writeFieldBegin('numeroCartaoSus', TType::STRING, 4); $xfer += $output->writeString($this->numeroCartaoSus); $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->codigoNacionalidade !== null) { $xfer += $output->writeFieldBegin('codigoNacionalidade', TType::I64, 13); $xfer += $output->writeI64($this->codigoNacionalidade); $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->atencaoDomiciliarOrigem !== null) { $xfer += $output->writeFieldBegin('atencaoDomiciliarOrigem', TType::I64, 17); $xfer += $output->writeI64($this->atencaoDomiciliarOrigem); $xfer += $output->writeFieldEnd(); } if ($this->atencaoDomiciliarModalidade !== null) { $xfer += $output->writeFieldBegin('atencaoDomiciliarModalidade', TType::I64, 18); $xfer += $output->writeI64($this->atencaoDomiciliarModalidade); $xfer += $output->writeFieldEnd(); } if ($this->situacoesPresentes !== null) { if (!is_array($this->situacoesPresentes)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('situacoesPresentes', TType::LST, 19); $output->writeListBegin(TType::I64, count($this->situacoesPresentes)); foreach ($this->situacoesPresentes 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->cid10Segundo !== null) { $xfer += $output->writeFieldBegin('cid10Segundo', TType::STRING, 21); $xfer += $output->writeString($this->cid10Segundo); $xfer += $output->writeFieldEnd(); } if ($this->cid10Terceiro !== null) { $xfer += $output->writeFieldBegin('cid10Terceiro', TType::STRING, 22); $xfer += $output->writeString($this->cid10Terceiro); $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(); } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; }