public void Read (TProtocol iprot)
 {
   bool isset_uuidFicha = false;
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.String) {
           UuidFicha = iprot.ReadString();
           isset_uuidFicha = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.String) {
           OutraLocalidade = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 7:
         if (field.Type == TType.I64) {
           Inep = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 11:
         if (field.Type == TType.I32) {
           NumParticipantes = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 12:
         if (field.Type == TType.I32) {
           NumAvaliacoesAlteradas = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 13:
         if (field.Type == TType.List) {
           {
             Profissionais = new List<ProfissionalCboRowItemThrift>();
             TList _list0 = iprot.ReadListBegin();
             for( int _i1 = 0; _i1 < _list0.Count; ++_i1)
             {
               ProfissionalCboRowItemThrift _elem2;
               _elem2 = new ProfissionalCboRowItemThrift();
               _elem2.Read(iprot);
               Profissionais.Add(_elem2);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 14:
         if (field.Type == TType.I64) {
           AtividadeTipo = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 15:
         if (field.Type == TType.List) {
           {
             TemasParaReuniao = new List<long>();
             TList _list3 = iprot.ReadListBegin();
             for( int _i4 = 0; _i4 < _list3.Count; ++_i4)
             {
               long _elem5;
               _elem5 = iprot.ReadI64();
               TemasParaReuniao.Add(_elem5);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 16:
         if (field.Type == TType.List) {
           {
             PublicoAlvo = new List<long>();
             TList _list6 = iprot.ReadListBegin();
             for( int _i7 = 0; _i7 < _list6.Count; ++_i7)
             {
               long _elem8;
               _elem8 = iprot.ReadI64();
               PublicoAlvo.Add(_elem8);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 18:
         if (field.Type == TType.List) {
           {
             Participantes = new List<ParticipanteRowItemThrift>();
             TList _list9 = iprot.ReadListBegin();
             for( int _i10 = 0; _i10 < _list9.Count; ++_i10)
             {
               ParticipanteRowItemThrift _elem11;
               _elem11 = new ParticipanteRowItemThrift();
               _elem11.Read(iprot);
               Participantes.Add(_elem11);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 19:
         if (field.Type == TType.I32) {
           TbCdsOrigem = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 21:
         if (field.Type == TType.String) {
           CnesLocalAtividade = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 22:
         if (field.Type == TType.String) {
           Procedimento = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 23:
         if (field.Type == TType.I64) {
           Turno = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 24:
         if (field.Type == TType.Struct) {
           HeaderTransport = new br.gov.saude.esusab.ras.common.UnicaLotacaoHeaderThrift();
           HeaderTransport.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 25:
         if (field.Type == TType.List) {
           {
             TemasParaSaude = new List<long>();
             TList _list12 = iprot.ReadListBegin();
             for( int _i13 = 0; _i13 < _list12.Count; ++_i13)
             {
               long _elem14;
               _elem14 = iprot.ReadI64();
               TemasParaSaude.Add(_elem14);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 26:
         if (field.Type == TType.List) {
           {
             PraticasEmSaude = new List<long>();
             TList _list15 = iprot.ReadListBegin();
             for( int _i16 = 0; _i16 < _list15.Count; ++_i16)
             {
               long _elem17;
               _elem17 = iprot.ReadI64();
               PraticasEmSaude.Add(_elem17);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_uuidFicha)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
Example #2
0
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                bool   isset_uuid = false;
                TField field;
                iprot.ReadStructBegin();
                while (true)
                {
                    field = iprot.ReadFieldBegin();
                    if (field.Type == TType.Stop)
                    {
                        break;
                    }
                    switch (field.ID)
                    {
                    case 1:
                        if (field.Type == TType.Struct)
                        {
                            CondicoesDeSaude = new CondicoesDeSaudeThrift();
                            CondicoesDeSaude.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 3:
                        if (field.Type == TType.Struct)
                        {
                            EmSituacaoDeRua = new EmSituacaoDeRuaThrift();
                            EmSituacaoDeRua.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.Bool)
                        {
                            FichaAtualizada = iprot.ReadBool();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 5:
                        if (field.Type == TType.Struct)
                        {
                            IdentificacaoUsuarioCidadao = new IdentificacaoUsuarioCidadaoThrift();
                            IdentificacaoUsuarioCidadao.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 6:
                        if (field.Type == TType.Struct)
                        {
                            InformacoesSocioDemograficas = new InformacoesSocioDemograficasThrift();
                            InformacoesSocioDemograficas.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 7:
                        if (field.Type == TType.Bool)
                        {
                            StatusTermoRecusaCadastroIndividualAtencaoBasica = iprot.ReadBool();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 8:
                        if (field.Type == TType.I32)
                        {
                            TpCdsOrigem = iprot.ReadI32();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 9:
                        if (field.Type == TType.String)
                        {
                            Uuid       = iprot.ReadString();
                            isset_uuid = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 10:
                        if (field.Type == TType.String)
                        {
                            UuidFichaOriginadora = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 11:
                        if (field.Type == TType.String)
                        {
                            UuidCidadao = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 12:
                        if (field.Type == TType.Struct)
                        {
                            SaidaCidadaoCadastro = new SaidaCidadaoCadastroThrift();
                            SaidaCidadaoCadastro.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 13:
                        if (field.Type == TType.Struct)
                        {
                            HeaderTransport = new br.gov.saude.esusab.ras.common.UnicaLotacaoHeaderThrift();
                            HeaderTransport.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
                if (!isset_uuid)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA);
                }
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
        public void Read(TProtocol iprot)
        {
            bool   isset_uuidFicha = false;
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.String)
                    {
                        UuidFicha       = iprot.ReadString();
                        isset_uuidFicha = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 4:
                    if (field.Type == TType.String)
                    {
                        OutraLocalidade = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 7:
                    if (field.Type == TType.I64)
                    {
                        Inep = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 11:
                    if (field.Type == TType.I32)
                    {
                        NumParticipantes = iprot.ReadI32();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 12:
                    if (field.Type == TType.I32)
                    {
                        NumAvaliacoesAlteradas = iprot.ReadI32();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 13:
                    if (field.Type == TType.List)
                    {
                        {
                            Profissionais = new List <ProfissionalCboRowItemThrift>();
                            TList _list0 = iprot.ReadListBegin();
                            for (int _i1 = 0; _i1 < _list0.Count; ++_i1)
                            {
                                ProfissionalCboRowItemThrift _elem2;
                                _elem2 = new ProfissionalCboRowItemThrift();
                                _elem2.Read(iprot);
                                Profissionais.Add(_elem2);
                            }
                            iprot.ReadListEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 14:
                    if (field.Type == TType.I64)
                    {
                        AtividadeTipo = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 15:
                    if (field.Type == TType.List)
                    {
                        {
                            TemasParaReuniao = new List <long>();
                            TList _list3 = iprot.ReadListBegin();
                            for (int _i4 = 0; _i4 < _list3.Count; ++_i4)
                            {
                                long _elem5;
                                _elem5 = iprot.ReadI64();
                                TemasParaReuniao.Add(_elem5);
                            }
                            iprot.ReadListEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 16:
                    if (field.Type == TType.List)
                    {
                        {
                            PublicoAlvo = new List <long>();
                            TList _list6 = iprot.ReadListBegin();
                            for (int _i7 = 0; _i7 < _list6.Count; ++_i7)
                            {
                                long _elem8;
                                _elem8 = iprot.ReadI64();
                                PublicoAlvo.Add(_elem8);
                            }
                            iprot.ReadListEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 18:
                    if (field.Type == TType.List)
                    {
                        {
                            Participantes = new List <ParticipanteRowItemThrift>();
                            TList _list9 = iprot.ReadListBegin();
                            for (int _i10 = 0; _i10 < _list9.Count; ++_i10)
                            {
                                ParticipanteRowItemThrift _elem11;
                                _elem11 = new ParticipanteRowItemThrift();
                                _elem11.Read(iprot);
                                Participantes.Add(_elem11);
                            }
                            iprot.ReadListEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 19:
                    if (field.Type == TType.I32)
                    {
                        TbCdsOrigem = iprot.ReadI32();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 21:
                    if (field.Type == TType.String)
                    {
                        CnesLocalAtividade = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 22:
                    if (field.Type == TType.String)
                    {
                        Procedimento = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 23:
                    if (field.Type == TType.I64)
                    {
                        Turno = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 24:
                    if (field.Type == TType.Struct)
                    {
                        HeaderTransport = new br.gov.saude.esusab.ras.common.UnicaLotacaoHeaderThrift();
                        HeaderTransport.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 25:
                    if (field.Type == TType.List)
                    {
                        {
                            TemasParaSaude = new List <long>();
                            TList _list12 = iprot.ReadListBegin();
                            for (int _i13 = 0; _i13 < _list12.Count; ++_i13)
                            {
                                long _elem14;
                                _elem14 = iprot.ReadI64();
                                TemasParaSaude.Add(_elem14);
                            }
                            iprot.ReadListEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 26:
                    if (field.Type == TType.List)
                    {
                        {
                            PraticasEmSaude = new List <long>();
                            TList _list15 = iprot.ReadListBegin();
                            for (int _i16 = 0; _i16 < _list15.Count; ++_i16)
                            {
                                long _elem17;
                                _elem17 = iprot.ReadI64();
                                PraticasEmSaude.Add(_elem17);
                            }
                            iprot.ReadListEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 27:
                    if (field.Type == TType.Bool)
                    {
                        PseEducacao = iprot.ReadBool();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 28:
                    if (field.Type == TType.Bool)
                    {
                        PseSaude = iprot.ReadBool();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
            if (!isset_uuidFicha)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
        }
 public void Read (TProtocol iprot)
 {
   bool isset_uuid = false;
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.Struct) {
           CondicoesDeSaude = new CondicoesDeSaudeThrift();
           CondicoesDeSaude.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.Struct) {
           EmSituacaoDeRua = new EmSituacaoDeRuaThrift();
           EmSituacaoDeRua.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.Bool) {
           FichaAtualizada = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 5:
         if (field.Type == TType.Struct) {
           IdentificacaoUsuarioCidadao = new IdentificacaoUsuarioCidadaoThrift();
           IdentificacaoUsuarioCidadao.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 6:
         if (field.Type == TType.Struct) {
           InformacoesSocioDemograficas = new InformacoesSocioDemograficasThrift();
           InformacoesSocioDemograficas.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 7:
         if (field.Type == TType.Bool) {
           StatusTermoRecusaCadastroIndividualAtencaoBasica = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 8:
         if (field.Type == TType.I32) {
           TpCdsOrigem = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 9:
         if (field.Type == TType.String) {
           Uuid = iprot.ReadString();
           isset_uuid = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 10:
         if (field.Type == TType.String) {
           UuidFichaOriginadora = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 11:
         if (field.Type == TType.String) {
           UuidCidadao = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 12:
         if (field.Type == TType.Struct) {
           SaidaCidadaoCadastro = new SaidaCidadaoCadastroThrift();
           SaidaCidadaoCadastro.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 13:
         if (field.Type == TType.Struct) {
           HeaderTransport = new br.gov.saude.esusab.ras.common.UnicaLotacaoHeaderThrift();
           HeaderTransport.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_uuid)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
Example #5
0
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                bool   isset_uuid = false;
                TField field;
                iprot.ReadStructBegin();
                while (true)
                {
                    field = iprot.ReadFieldBegin();
                    if (field.Type == TType.Stop)
                    {
                        break;
                    }
                    switch (field.ID)
                    {
                    case 1:
                        if (field.Type == TType.List)
                        {
                            {
                                AnimaisNoDomicilio = new List <long>();
                                TList _list0 = iprot.ReadListBegin();
                                for (int _i1 = 0; _i1 < _list0.Count; ++_i1)
                                {
                                    long _elem2;
                                    _elem2 = iprot.ReadI64();
                                    AnimaisNoDomicilio.Add(_elem2);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.Struct)
                        {
                            CondicaoMoradia = new CondicaoMoradiaThrift();
                            CondicaoMoradia.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.Struct)
                        {
                            EnderecoLocalPermanencia = new br.gov.saude.esusab.ras.common.EnderecoLocalPermanenciaThrift();
                            EnderecoLocalPermanencia.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 5:
                        if (field.Type == TType.List)
                        {
                            {
                                Familias = new List <FamiliaRowThrift>();
                                TList _list3 = iprot.ReadListBegin();
                                for (int _i4 = 0; _i4 < _list3.Count; ++_i4)
                                {
                                    FamiliaRowThrift _elem5;
                                    _elem5 = new FamiliaRowThrift();
                                    _elem5.Read(iprot);
                                    Familias.Add(_elem5);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 6:
                        if (field.Type == TType.Bool)
                        {
                            FichaAtualizada = iprot.ReadBool();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 7:
                        if (field.Type == TType.String)
                        {
                            QuantosAnimaisNoDomicilio = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 8:
                        if (field.Type == TType.Bool)
                        {
                            StAnimaisNoDomicilio = iprot.ReadBool();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 9:
                        if (field.Type == TType.Bool)
                        {
                            StatusTermoRecusa = iprot.ReadBool();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 10:
                        if (field.Type == TType.I32)
                        {
                            TpCdsOrigem = iprot.ReadI32();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 11:
                        if (field.Type == TType.String)
                        {
                            Uuid       = iprot.ReadString();
                            isset_uuid = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 12:
                        if (field.Type == TType.String)
                        {
                            UuidFichaOriginadora = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 13:
                        if (field.Type == TType.I64)
                        {
                            TipoDeImovel = iprot.ReadI64();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 14:
                        if (field.Type == TType.Struct)
                        {
                            InstituicaoPermanencia = new InstituicaoPermanenciaThrift();
                            InstituicaoPermanencia.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 15:
                        if (field.Type == TType.Struct)
                        {
                            HeaderTransport = new br.gov.saude.esusab.ras.common.UnicaLotacaoHeaderThrift();
                            HeaderTransport.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
                if (!isset_uuid)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA);
                }
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
 public void Read (TProtocol iprot)
 {
   bool isset_uuidFicha = false;
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.String) {
           UuidFicha = iprot.ReadString();
           isset_uuidFicha = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.I32) {
           TpCdsOrigem = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.Struct) {
           HeaderTransport = new br.gov.saude.esusab.ras.common.UnicaLotacaoHeaderThrift();
           HeaderTransport.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.List) {
           {
             AtendProcedimentos = new List<FichaProcedimentoChildThrift>();
             TList _list8 = iprot.ReadListBegin();
             for( int _i9 = 0; _i9 < _list8.Count; ++_i9)
             {
               FichaProcedimentoChildThrift _elem10;
               _elem10 = new FichaProcedimentoChildThrift();
               _elem10.Read(iprot);
               AtendProcedimentos.Add(_elem10);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 5:
         if (field.Type == TType.I64) {
           NumTotalAfericaoPa = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 6:
         if (field.Type == TType.I64) {
           NumTotalGlicemiaCapilar = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 7:
         if (field.Type == TType.I64) {
           NumTotalAfericaoTemperatura = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 8:
         if (field.Type == TType.I64) {
           NumTotalMedicaoAltura = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 9:
         if (field.Type == TType.I64) {
           NumTotalCurativoSimples = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 10:
         if (field.Type == TType.I64) {
           NumTotalMedicaoPeso = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 11:
         if (field.Type == TType.I64) {
           NumTotalColetaMaterialParaExameLaboratorial = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_uuidFicha)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
Example #7
0
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                bool   isset_uuidFicha = false;
                TField field;
                iprot.ReadStructBegin();
                while (true)
                {
                    field = iprot.ReadFieldBegin();
                    if (field.Type == TType.Stop)
                    {
                        break;
                    }
                    switch (field.ID)
                    {
                    case 1:
                        if (field.Type == TType.String)
                        {
                            UuidFicha       = iprot.ReadString();
                            isset_uuidFicha = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.I32)
                        {
                            TpCdsOrigem = iprot.ReadI32();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 3:
                        if (field.Type == TType.Struct)
                        {
                            HeaderTransport = new br.gov.saude.esusab.ras.common.UnicaLotacaoHeaderThrift();
                            HeaderTransport.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.List)
                        {
                            {
                                Vacinacoes = new List <FichaVacinacaoChildThrift>();
                                TList _list4 = iprot.ReadListBegin();
                                for (int _i5 = 0; _i5 < _list4.Count; ++_i5)
                                {
                                    FichaVacinacaoChildThrift _elem6;
                                    _elem6 = new FichaVacinacaoChildThrift();
                                    _elem6.Read(iprot);
                                    Vacinacoes.Add(_elem6);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
                if (!isset_uuidFicha)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA);
                }
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
 public void Read (TProtocol iprot)
 {
   bool isset_uuid = false;
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.List) {
           {
             AnimaisNoDomicilio = new List<long>();
             TList _list0 = iprot.ReadListBegin();
             for( int _i1 = 0; _i1 < _list0.Count; ++_i1)
             {
               long _elem2;
               _elem2 = iprot.ReadI64();
               AnimaisNoDomicilio.Add(_elem2);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           CondicaoMoradia = new CondicaoMoradiaThrift();
           CondicaoMoradia.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.Struct) {
           EnderecoLocalPermanencia = new br.gov.saude.esusab.ras.common.EnderecoLocalPermanenciaThrift();
           EnderecoLocalPermanencia.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 5:
         if (field.Type == TType.List) {
           {
             Familias = new List<FamiliaRowThrift>();
             TList _list3 = iprot.ReadListBegin();
             for( int _i4 = 0; _i4 < _list3.Count; ++_i4)
             {
               FamiliaRowThrift _elem5;
               _elem5 = new FamiliaRowThrift();
               _elem5.Read(iprot);
               Familias.Add(_elem5);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 6:
         if (field.Type == TType.Bool) {
           FichaAtualizada = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 7:
         if (field.Type == TType.String) {
           QuantosAnimaisNoDomicilio = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 8:
         if (field.Type == TType.Bool) {
           StAnimaisNoDomicilio = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 9:
         if (field.Type == TType.Bool) {
           StatusTermoRecusa = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 10:
         if (field.Type == TType.I32) {
           TpCdsOrigem = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 11:
         if (field.Type == TType.String) {
           Uuid = iprot.ReadString();
           isset_uuid = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 12:
         if (field.Type == TType.String) {
           UuidFichaOriginadora = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 13:
         if (field.Type == TType.I64) {
           TipoDeImovel = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 14:
         if (field.Type == TType.Struct) {
           InstituicaoPermanencia = new InstituicaoPermanenciaThrift();
           InstituicaoPermanencia.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 15:
         if (field.Type == TType.Struct) {
           HeaderTransport = new br.gov.saude.esusab.ras.common.UnicaLotacaoHeaderThrift();
           HeaderTransport.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_uuid)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
 public void Read (TProtocol iprot)
 {
   bool isset_uuidFicha = false;
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.Struct) {
           HeaderTransport = new br.gov.saude.esusab.ras.common.UnicaLotacaoHeaderThrift();
           HeaderTransport.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           UuidFicha = iprot.ReadString();
           isset_uuidFicha = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.I32) {
           TpCdsOrigem = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.I64) {
           Turno = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 5:
         if (field.Type == TType.String) {
           CnsCidadao = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 6:
         if (field.Type == TType.String) {
           CnsResponsavelFamiliar = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 7:
         if (field.Type == TType.I64) {
           DataRealizacaoTesteOlhinho = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 8:
         if (field.Type == TType.I64) {
           CoResultadoTesteOlhinho = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 9:
         if (field.Type == TType.I64) {
           DataRealizacaoExameFundoOlho = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 10:
         if (field.Type == TType.I64) {
           CoResultadoExameFundoOlho = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 11:
         if (field.Type == TType.I64) {
           DataRealizacaoTesteOrelhinha = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 12:
         if (field.Type == TType.I64) {
           CoResultadoTesteOrelhinha = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 13:
         if (field.Type == TType.I64) {
           DataRealizacaoUSTransfontanela = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 14:
         if (field.Type == TType.I64) {
           CoResultadoUsTransfontanela = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 15:
         if (field.Type == TType.I64) {
           DataRealizacaoTomografiaComputadorizada = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 16:
         if (field.Type == TType.I64) {
           CoResultadoTomografiaComputadorizada = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 17:
         if (field.Type == TType.I64) {
           DataRealizacaoRessonanciaMagnetica = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 18:
         if (field.Type == TType.I64) {
           CoResultadoRessonanciaMagnetica = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_uuidFicha)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
 public void Read (TProtocol iprot)
 {
   bool isset_uuidFicha = false;
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.String) {
           UuidFicha = iprot.ReadString();
           isset_uuidFicha = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.I32) {
           TpCdsOrigem = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.Struct) {
           HeaderTransport = new br.gov.saude.esusab.ras.common.UnicaLotacaoHeaderThrift();
           HeaderTransport.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.List) {
           {
             VisitasDomiciliares = new List<FichaVisitaDomiciliarChildThrift>();
             TList _list4 = iprot.ReadListBegin();
             for( int _i5 = 0; _i5 < _list4.Count; ++_i5)
             {
               FichaVisitaDomiciliarChildThrift _elem6;
               _elem6 = new FichaVisitaDomiciliarChildThrift();
               _elem6.Read(iprot);
               VisitasDomiciliares.Add(_elem6);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_uuidFicha)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
 public void Read (TProtocol iprot)
 {
   bool isset_uuidFicha = false;
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.Struct) {
           HeaderTransport = new br.gov.saude.esusab.ras.common.UnicaLotacaoHeaderThrift();
           HeaderTransport.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.String) {
           CnsCidadao = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.String) {
           IdentificacaoUsuario = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.I64) {
           DataNascimento = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 5:
         if (field.Type == TType.I64) {
           Sexo = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 6:
         if (field.Type == TType.I64) {
           LocalAtendimento = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 7:
         if (field.Type == TType.List) {
           {
             PerguntasQuestionarioCriancasMenoresSeisMeses = new List<PerguntaQuestionarioCriancasMenoresSeisMesesThrift>();
             TList _list4 = iprot.ReadListBegin();
             for( int _i5 = 0; _i5 < _list4.Count; ++_i5)
             {
               PerguntaQuestionarioCriancasMenoresSeisMesesThrift _elem6;
               _elem6 = new PerguntaQuestionarioCriancasMenoresSeisMesesThrift();
               _elem6.Read(iprot);
               PerguntasQuestionarioCriancasMenoresSeisMeses.Add(_elem6);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 8:
         if (field.Type == TType.List) {
           {
             PerguntasQuestionarioCriancasDeSeisVinteTresMeses = new List<PerguntaQuestionarioCriancasDeSeisVinteTresMesesThrift>();
             TList _list7 = iprot.ReadListBegin();
             for( int _i8 = 0; _i8 < _list7.Count; ++_i8)
             {
               PerguntaQuestionarioCriancasDeSeisVinteTresMesesThrift _elem9;
               _elem9 = new PerguntaQuestionarioCriancasDeSeisVinteTresMesesThrift();
               _elem9.Read(iprot);
               PerguntasQuestionarioCriancasDeSeisVinteTresMeses.Add(_elem9);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 9:
         if (field.Type == TType.List) {
           {
             PerguntasQuestionarioCriancasComMaisDoisAnos = new List<PerguntaQuestionarioCriancasComMaisDoisAnosThrift>();
             TList _list10 = iprot.ReadListBegin();
             for( int _i11 = 0; _i11 < _list10.Count; ++_i11)
             {
               PerguntaQuestionarioCriancasComMaisDoisAnosThrift _elem12;
               _elem12 = new PerguntaQuestionarioCriancasComMaisDoisAnosThrift();
               _elem12.Read(iprot);
               PerguntasQuestionarioCriancasComMaisDoisAnos.Add(_elem12);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 10:
         if (field.Type == TType.String) {
           UuidFicha = iprot.ReadString();
           isset_uuidFicha = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 11:
         if (field.Type == TType.I32) {
           TpCdsOrigem = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
   if (!isset_uuidFicha)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                bool   isset_uuidFicha = false;
                TField field;
                iprot.ReadStructBegin();
                while (true)
                {
                    field = iprot.ReadFieldBegin();
                    if (field.Type == TType.Stop)
                    {
                        break;
                    }
                    switch (field.ID)
                    {
                    case 1:
                        if (field.Type == TType.Struct)
                        {
                            HeaderTransport = new br.gov.saude.esusab.ras.common.UnicaLotacaoHeaderThrift();
                            HeaderTransport.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.String)
                        {
                            CnsCidadao = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.I64)
                        {
                            DataNascimento = iprot.ReadI64();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 5:
                        if (field.Type == TType.I64)
                        {
                            Sexo = iprot.ReadI64();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 6:
                        if (field.Type == TType.I64)
                        {
                            LocalAtendimento = iprot.ReadI64();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 7:
                        if (field.Type == TType.List)
                        {
                            {
                                PerguntasQuestionarioCriancasMenoresSeisMeses = new List <PerguntaQuestionarioCriancasMenoresSeisMesesThrift>();
                                TList _list4 = iprot.ReadListBegin();
                                for (int _i5 = 0; _i5 < _list4.Count; ++_i5)
                                {
                                    PerguntaQuestionarioCriancasMenoresSeisMesesThrift _elem6;
                                    _elem6 = new PerguntaQuestionarioCriancasMenoresSeisMesesThrift();
                                    _elem6.Read(iprot);
                                    PerguntasQuestionarioCriancasMenoresSeisMeses.Add(_elem6);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 8:
                        if (field.Type == TType.List)
                        {
                            {
                                PerguntasQuestionarioCriancasDeSeisVinteTresMeses = new List <PerguntaQuestionarioCriancasDeSeisVinteTresMesesThrift>();
                                TList _list7 = iprot.ReadListBegin();
                                for (int _i8 = 0; _i8 < _list7.Count; ++_i8)
                                {
                                    PerguntaQuestionarioCriancasDeSeisVinteTresMesesThrift _elem9;
                                    _elem9 = new PerguntaQuestionarioCriancasDeSeisVinteTresMesesThrift();
                                    _elem9.Read(iprot);
                                    PerguntasQuestionarioCriancasDeSeisVinteTresMeses.Add(_elem9);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 9:
                        if (field.Type == TType.List)
                        {
                            {
                                PerguntasQuestionarioCriancasComMaisDoisAnos = new List <PerguntaQuestionarioCriancasComMaisDoisAnosThrift>();
                                TList _list10 = iprot.ReadListBegin();
                                for (int _i11 = 0; _i11 < _list10.Count; ++_i11)
                                {
                                    PerguntaQuestionarioCriancasComMaisDoisAnosThrift _elem12;
                                    _elem12 = new PerguntaQuestionarioCriancasComMaisDoisAnosThrift();
                                    _elem12.Read(iprot);
                                    PerguntasQuestionarioCriancasComMaisDoisAnos.Add(_elem12);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 10:
                        if (field.Type == TType.String)
                        {
                            UuidFicha       = iprot.ReadString();
                            isset_uuidFicha = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 11:
                        if (field.Type == TType.I32)
                        {
                            TpCdsOrigem = iprot.ReadI32();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 12:
                        if (field.Type == TType.String)
                        {
                            CpfCidadao = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
                if (!isset_uuidFicha)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA);
                }
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
        public void Read(TProtocol iprot)
        {
            bool   isset_uuidFicha = false;
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.String)
                    {
                        UuidFicha       = iprot.ReadString();
                        isset_uuidFicha = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.I32)
                    {
                        TpCdsOrigem = iprot.ReadI32();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 3:
                    if (field.Type == TType.Struct)
                    {
                        HeaderTransport = new br.gov.saude.esusab.ras.common.UnicaLotacaoHeaderThrift();
                        HeaderTransport.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 4:
                    if (field.Type == TType.List)
                    {
                        {
                            AtendProcedimentos = new List <FichaProcedimentoChildThrift>();
                            TList _list8 = iprot.ReadListBegin();
                            for (int _i9 = 0; _i9 < _list8.Count; ++_i9)
                            {
                                FichaProcedimentoChildThrift _elem10;
                                _elem10 = new FichaProcedimentoChildThrift();
                                _elem10.Read(iprot);
                                AtendProcedimentos.Add(_elem10);
                            }
                            iprot.ReadListEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 5:
                    if (field.Type == TType.I64)
                    {
                        NumTotalAfericaoPa = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 6:
                    if (field.Type == TType.I64)
                    {
                        NumTotalGlicemiaCapilar = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 7:
                    if (field.Type == TType.I64)
                    {
                        NumTotalAfericaoTemperatura = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 8:
                    if (field.Type == TType.I64)
                    {
                        NumTotalMedicaoAltura = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 9:
                    if (field.Type == TType.I64)
                    {
                        NumTotalCurativoSimples = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 10:
                    if (field.Type == TType.I64)
                    {
                        NumTotalMedicaoPeso = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 11:
                    if (field.Type == TType.I64)
                    {
                        NumTotalColetaMaterialParaExameLaboratorial = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
            if (!isset_uuidFicha)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
        }
        public void Read(TProtocol iprot)
        {
            bool   isset_uuidFicha = false;
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.Struct)
                    {
                        HeaderTransport = new br.gov.saude.esusab.ras.common.UnicaLotacaoHeaderThrift();
                        HeaderTransport.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.String)
                    {
                        UuidFicha       = iprot.ReadString();
                        isset_uuidFicha = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 3:
                    if (field.Type == TType.I32)
                    {
                        TpCdsOrigem = iprot.ReadI32();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 4:
                    if (field.Type == TType.I64)
                    {
                        Turno = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 5:
                    if (field.Type == TType.String)
                    {
                        CnsCidadao = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 6:
                    if (field.Type == TType.String)
                    {
                        CnsResponsavelFamiliar = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 7:
                    if (field.Type == TType.I64)
                    {
                        DataRealizacaoTesteOlhinho = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 8:
                    if (field.Type == TType.I64)
                    {
                        CoResultadoTesteOlhinho = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 9:
                    if (field.Type == TType.I64)
                    {
                        DataRealizacaoExameFundoOlho = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 10:
                    if (field.Type == TType.I64)
                    {
                        CoResultadoExameFundoOlho = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 11:
                    if (field.Type == TType.I64)
                    {
                        DataRealizacaoTesteOrelhinha = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 12:
                    if (field.Type == TType.I64)
                    {
                        CoResultadoTesteOrelhinha = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 13:
                    if (field.Type == TType.I64)
                    {
                        DataRealizacaoUSTransfontanela = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 14:
                    if (field.Type == TType.I64)
                    {
                        CoResultadoUsTransfontanela = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 15:
                    if (field.Type == TType.I64)
                    {
                        DataRealizacaoTomografiaComputadorizada = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 16:
                    if (field.Type == TType.I64)
                    {
                        CoResultadoTomografiaComputadorizada = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 17:
                    if (field.Type == TType.I64)
                    {
                        DataRealizacaoRessonanciaMagnetica = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 18:
                    if (field.Type == TType.I64)
                    {
                        CoResultadoRessonanciaMagnetica = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
            if (!isset_uuidFicha)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
        }