public void Read(TProtocol iprot)
        {
            bool   isset_uuidFicha = false;
            bool   isset_responsavelCnesUnidade = 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.I64)
                    {
                        DtAtividadeColetiva = iprot.ReadI64();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

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

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

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

                case 6:
                    if (field.Type == TType.I64)
                    {
                        HoraFim = iprot.ReadI64();
                    }
                    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 8:
                    if (field.Type == TType.String)
                    {
                        ResponsavelCns = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

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

                case 10:
                    if (field.Type == TType.String)
                    {
                        ResponsavelNumIne = iprot.ReadString();
                    }
                    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 17:
                    if (field.Type == TType.List)
                    {
                        {
                            PraticasTemasParaSaude = new List <long>();
                            TList _list9 = iprot.ReadListBegin();
                            for (int _i10 = 0; _i10 < _list9.Count; ++_i10)
                            {
                                long _elem11;
                                _elem11 = iprot.ReadI64();
                                PraticasTemasParaSaude.Add(_elem11);
                            }
                            iprot.ReadListEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 18:
                    if (field.Type == TType.List)
                    {
                        {
                            Participantes = new List <ParticipanteRowItemThrift>();
                            TList _list12 = iprot.ReadListBegin();
                            for (int _i13 = 0; _i13 < _list12.Count; ++_i13)
                            {
                                ParticipanteRowItemThrift _elem14;
                                _elem14 = new ParticipanteRowItemThrift();
                                _elem14.Read(iprot);
                                Participantes.Add(_elem14);
                            }
                            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 20:
                    if (field.Type == TType.String)
                    {
                        CodigoIbgeMunicipio = 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);
            }
            if (!isset_responsavelCnesUnidade)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
        }
 public void Read (TProtocol iprot)
 {
   bool isset_uuidFicha = false;
   bool isset_responsavelCnesUnidade = 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.I64) {
           DtAtividadeColetiva = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.I32) {
           NumParticipantesProgramados = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.String) {
           LocalAtividade = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 5:
         if (field.Type == TType.I64) {
           HoraInicio = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 6:
         if (field.Type == TType.I64) {
           HoraFim = iprot.ReadI64();
         } 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 8:
         if (field.Type == TType.String) {
           ResponsavelCns = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 9:
         if (field.Type == TType.String) {
           ResponsavelCnesUnidade = iprot.ReadString();
           isset_responsavelCnesUnidade = true;
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 10:
         if (field.Type == TType.String) {
           ResponsavelNumIne = iprot.ReadString();
         } 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 17:
         if (field.Type == TType.List) {
           {
             PraticasTemasParaSaude = new List<long>();
             TList _list9 = iprot.ReadListBegin();
             for( int _i10 = 0; _i10 < _list9.Count; ++_i10)
             {
               long _elem11;
               _elem11 = iprot.ReadI64();
               PraticasTemasParaSaude.Add(_elem11);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 18:
         if (field.Type == TType.List) {
           {
             Participantes = new List<ParticipanteRowItemThrift>();
             TList _list12 = iprot.ReadListBegin();
             for( int _i13 = 0; _i13 < _list12.Count; ++_i13)
             {
               ParticipanteRowItemThrift _elem14;
               _elem14 = new ParticipanteRowItemThrift();
               _elem14.Read(iprot);
               Participantes.Add(_elem14);
             }
             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 20:
         if (field.Type == TType.String) {
           CodigoIbgeMunicipio = 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);
   if (!isset_responsavelCnesUnidade)
     throw new TProtocolException(TProtocolException.INVALID_DATA);
 }