public Read ( |
||
iprot | ||
return | void |
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(); } }