Esempio n. 1
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("TIncrement");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (Row == null)
         {
             throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Row not set");
         }
         field.Name = "row";
         field.Type = TType.String;
         field.ID   = 1;
         oprot.WriteFieldBegin(field);
         oprot.WriteBinary(Row);
         oprot.WriteFieldEnd();
         if (Columns == null)
         {
             throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Columns not set");
         }
         field.Name = "columns";
         field.Type = TType.List;
         field.ID   = 2;
         oprot.WriteFieldBegin(field);
         {
             oprot.WriteListBegin(new TList(TType.Struct, Columns.Count));
             foreach (TColumnIncrement _iter42 in Columns)
             {
                 _iter42.Write(oprot);
             }
             oprot.WriteListEnd();
         }
         oprot.WriteFieldEnd();
         if (Attributes != null && __isset.attributes)
         {
             field.Name = "attributes";
             field.Type = TType.Map;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteMapBegin(new TMap(TType.String, TType.String, Attributes.Count));
                 foreach (byte[] _iter43 in Attributes.Keys)
                 {
                     oprot.WriteBinary(_iter43);
                     oprot.WriteBinary(Attributes[_iter43]);
                 }
                 oprot.WriteMapEnd();
             }
             oprot.WriteFieldEnd();
         }
         if (__isset.durability)
         {
             field.Name = "durability";
             field.Type = TType.I32;
             field.ID   = 5;
             oprot.WriteFieldBegin(field);
             oprot.WriteI32((int)Durability);
             oprot.WriteFieldEnd();
         }
         if (CellVisibility != null && __isset.cellVisibility)
         {
             field.Name = "cellVisibility";
             field.Type = TType.Struct;
             field.ID   = 6;
             oprot.WriteFieldBegin(field);
             CellVisibility.Write(oprot);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
Esempio n. 2
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("CondicoesDeSaudeThrift");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (DescricaoCausaInternacaoEm12Meses != null && __isset.descricaoCausaInternacaoEm12Meses)
         {
             field.Name = "descricaoCausaInternacaoEm12Meses";
             field.Type = TType.String;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(DescricaoCausaInternacaoEm12Meses);
             oprot.WriteFieldEnd();
         }
         if (DescricaoOutraCondicao1 != null && __isset.descricaoOutraCondicao1)
         {
             field.Name = "descricaoOutraCondicao1";
             field.Type = TType.String;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(DescricaoOutraCondicao1);
             oprot.WriteFieldEnd();
         }
         if (DescricaoOutraCondicao2 != null && __isset.descricaoOutraCondicao2)
         {
             field.Name = "descricaoOutraCondicao2";
             field.Type = TType.String;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(DescricaoOutraCondicao2);
             oprot.WriteFieldEnd();
         }
         if (DescricaoOutraCondicao3 != null && __isset.descricaoOutraCondicao3)
         {
             field.Name = "descricaoOutraCondicao3";
             field.Type = TType.String;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(DescricaoOutraCondicao3);
             oprot.WriteFieldEnd();
         }
         if (DescricaoPlantasMedicinaisUsadas != null && __isset.descricaoPlantasMedicinaisUsadas)
         {
             field.Name = "descricaoPlantasMedicinaisUsadas";
             field.Type = TType.String;
             field.ID   = 5;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(DescricaoPlantasMedicinaisUsadas);
             oprot.WriteFieldEnd();
         }
         if (DoencaCardiaca != null && __isset.doencaCardiaca)
         {
             field.Name = "doencaCardiaca";
             field.Type = TType.List;
             field.ID   = 6;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteListBegin(new TList(TType.I64, DoencaCardiaca.Count));
                 foreach (long _iter9 in DoencaCardiaca)
                 {
                     oprot.WriteI64(_iter9);
                 }
                 oprot.WriteListEnd();
             }
             oprot.WriteFieldEnd();
         }
         if (DoencaRespiratoria != null && __isset.doencaRespiratoria)
         {
             field.Name = "doencaRespiratoria";
             field.Type = TType.List;
             field.ID   = 7;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteListBegin(new TList(TType.I64, DoencaRespiratoria.Count));
                 foreach (long _iter10 in DoencaRespiratoria)
                 {
                     oprot.WriteI64(_iter10);
                 }
                 oprot.WriteListEnd();
             }
             oprot.WriteFieldEnd();
         }
         if (DoencaRins != null && __isset.doencaRins)
         {
             field.Name = "doencaRins";
             field.Type = TType.List;
             field.ID   = 8;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteListBegin(new TList(TType.I64, DoencaRins.Count));
                 foreach (long _iter11 in DoencaRins)
                 {
                     oprot.WriteI64(_iter11);
                 }
                 oprot.WriteListEnd();
             }
             oprot.WriteFieldEnd();
         }
         if (MaternidadeDeReferencia != null && __isset.maternidadeDeReferencia)
         {
             field.Name = "maternidadeDeReferencia";
             field.Type = TType.String;
             field.ID   = 9;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(MaternidadeDeReferencia);
             oprot.WriteFieldEnd();
         }
         if (__isset.situacaoPeso)
         {
             field.Name = "situacaoPeso";
             field.Type = TType.I64;
             field.ID   = 10;
             oprot.WriteFieldBegin(field);
             oprot.WriteI64(SituacaoPeso);
             oprot.WriteFieldEnd();
         }
         if (__isset.statusEhDependenteAlcool)
         {
             field.Name = "statusEhDependenteAlcool";
             field.Type = TType.Bool;
             field.ID   = 11;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(StatusEhDependenteAlcool);
             oprot.WriteFieldEnd();
         }
         if (__isset.statusEhDependenteOutrasDrogas)
         {
             field.Name = "statusEhDependenteOutrasDrogas";
             field.Type = TType.Bool;
             field.ID   = 12;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(StatusEhDependenteOutrasDrogas);
             oprot.WriteFieldEnd();
         }
         if (__isset.statusEhFumante)
         {
             field.Name = "statusEhFumante";
             field.Type = TType.Bool;
             field.ID   = 13;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(StatusEhFumante);
             oprot.WriteFieldEnd();
         }
         if (__isset.statusEhGestante)
         {
             field.Name = "statusEhGestante";
             field.Type = TType.Bool;
             field.ID   = 14;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(StatusEhGestante);
             oprot.WriteFieldEnd();
         }
         if (__isset.statusEstaAcamado)
         {
             field.Name = "statusEstaAcamado";
             field.Type = TType.Bool;
             field.ID   = 15;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(StatusEstaAcamado);
             oprot.WriteFieldEnd();
         }
         if (__isset.statusEstaDomiciliado)
         {
             field.Name = "statusEstaDomiciliado";
             field.Type = TType.Bool;
             field.ID   = 16;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(StatusEstaDomiciliado);
             oprot.WriteFieldEnd();
         }
         if (__isset.statusTemDiabetes)
         {
             field.Name = "statusTemDiabetes";
             field.Type = TType.Bool;
             field.ID   = 17;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(StatusTemDiabetes);
             oprot.WriteFieldEnd();
         }
         if (__isset.statusTemDoencaRespiratoria)
         {
             field.Name = "statusTemDoencaRespiratoria";
             field.Type = TType.Bool;
             field.ID   = 18;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(StatusTemDoencaRespiratoria);
             oprot.WriteFieldEnd();
         }
         if (__isset.statusTemHanseniase)
         {
             field.Name = "statusTemHanseniase";
             field.Type = TType.Bool;
             field.ID   = 19;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(StatusTemHanseniase);
             oprot.WriteFieldEnd();
         }
         if (__isset.statusTemHipertensaoArterial)
         {
             field.Name = "statusTemHipertensaoArterial";
             field.Type = TType.Bool;
             field.ID   = 20;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(StatusTemHipertensaoArterial);
             oprot.WriteFieldEnd();
         }
         if (__isset.statusTemTeveCancer)
         {
             field.Name = "statusTemTeveCancer";
             field.Type = TType.Bool;
             field.ID   = 21;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(StatusTemTeveCancer);
             oprot.WriteFieldEnd();
         }
         if (__isset.statusTemTeveDoencasRins)
         {
             field.Name = "statusTemTeveDoencasRins";
             field.Type = TType.Bool;
             field.ID   = 22;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(StatusTemTeveDoencasRins);
             oprot.WriteFieldEnd();
         }
         if (__isset.statusTemTuberculose)
         {
             field.Name = "statusTemTuberculose";
             field.Type = TType.Bool;
             field.ID   = 23;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(StatusTemTuberculose);
             oprot.WriteFieldEnd();
         }
         if (__isset.statusTeveAvcDerrame)
         {
             field.Name = "statusTeveAvcDerrame";
             field.Type = TType.Bool;
             field.ID   = 24;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(StatusTeveAvcDerrame);
             oprot.WriteFieldEnd();
         }
         if (__isset.statusTeveDoencaCardiaca)
         {
             field.Name = "statusTeveDoencaCardiaca";
             field.Type = TType.Bool;
             field.ID   = 25;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(StatusTeveDoencaCardiaca);
             oprot.WriteFieldEnd();
         }
         if (__isset.statusTeveInfarto)
         {
             field.Name = "statusTeveInfarto";
             field.Type = TType.Bool;
             field.ID   = 26;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(StatusTeveInfarto);
             oprot.WriteFieldEnd();
         }
         if (__isset.statusTeveInternadoEm12Meses)
         {
             field.Name = "statusTeveInternadoEm12Meses";
             field.Type = TType.Bool;
             field.ID   = 27;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(StatusTeveInternadoEm12Meses);
             oprot.WriteFieldEnd();
         }
         if (__isset.statusUsaOutrasPraticasIntegrativasOuComplementares)
         {
             field.Name = "statusUsaOutrasPraticasIntegrativasOuComplementares";
             field.Type = TType.Bool;
             field.ID   = 29;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(StatusUsaOutrasPraticasIntegrativasOuComplementares);
             oprot.WriteFieldEnd();
         }
         if (__isset.statusUsaPlantaMedicinais)
         {
             field.Name = "statusUsaPlantaMedicinais";
             field.Type = TType.Bool;
             field.ID   = 30;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(StatusUsaPlantaMedicinais);
             oprot.WriteFieldEnd();
         }
         if (__isset.statusDiagnosticoMental)
         {
             field.Name = "statusDiagnosticoMental";
             field.Type = TType.Bool;
             field.ID   = 31;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(StatusDiagnosticoMental);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                TField field;
                iprot.ReadStructBegin();
                while (true)
                {
                    field = iprot.ReadFieldBegin();
                    if (field.Type == TType.Stop)
                    {
                        break;
                    }
                    switch (field.ID)
                    {
                    case 1:
                        if (field.Type == TType.I32)
                        {
                            Role = iprot.ReadI32();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

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

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

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
Esempio n. 4
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("PageHeader");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         field.Name = "type";
         field.Type = TType.I32;
         field.ID   = 1;
         oprot.WriteFieldBegin(field);
         oprot.WriteI32((int)Type);
         oprot.WriteFieldEnd();
         field.Name = "uncompressed_page_size";
         field.Type = TType.I32;
         field.ID   = 2;
         oprot.WriteFieldBegin(field);
         oprot.WriteI32(Uncompressed_page_size);
         oprot.WriteFieldEnd();
         field.Name = "compressed_page_size";
         field.Type = TType.I32;
         field.ID   = 3;
         oprot.WriteFieldBegin(field);
         oprot.WriteI32(Compressed_page_size);
         oprot.WriteFieldEnd();
         if (__isset.crc)
         {
             field.Name = "crc";
             field.Type = TType.I32;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             oprot.WriteI32(Crc);
             oprot.WriteFieldEnd();
         }
         if (Data_page_header != null && __isset.data_page_header)
         {
             field.Name = "data_page_header";
             field.Type = TType.Struct;
             field.ID   = 5;
             oprot.WriteFieldBegin(field);
             Data_page_header.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (Index_page_header != null && __isset.index_page_header)
         {
             field.Name = "index_page_header";
             field.Type = TType.Struct;
             field.ID   = 6;
             oprot.WriteFieldBegin(field);
             Index_page_header.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (Dictionary_page_header != null && __isset.dictionary_page_header)
         {
             field.Name = "dictionary_page_header";
             field.Type = TType.Struct;
             field.ID   = 7;
             oprot.WriteFieldBegin(field);
             Dictionary_page_header.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (Data_page_header_v2 != null && __isset.data_page_header_v2)
         {
             field.Name = "data_page_header_v2";
             field.Type = TType.Struct;
             field.ID   = 8;
             oprot.WriteFieldBegin(field);
             Data_page_header_v2.Write(oprot);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
Esempio n. 5
0
    public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
    {
        iprot.IncrementRecursionDepth();
        try
        {
            bool   isset_minStamp = false;
            bool   isset_maxStamp = false;
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);

            while (true)
            {
                field = await iprot.ReadFieldBeginAsync(cancellationToken);

                if (field.Type == TType.Stop)
                {
                    break;
                }

                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.I64)
                    {
                        MinStamp = await iprot.ReadI64Async(cancellationToken);

                        isset_minStamp = true;
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 2:
                    if (field.Type == TType.I64)
                    {
                        MaxStamp = await iprot.ReadI64Async(cancellationToken);

                        isset_maxStamp = true;
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                default:
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);

                    break;
                }

                await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);

            if (!isset_minStamp)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_maxStamp)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
        }
        finally
        {
            iprot.DecrementRecursionDepth();
        }
    }
Esempio n. 6
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("CoinUseReservation");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (ChannelId != null && __isset.channelId)
         {
             field.Name = "channelId";
             field.Type = TType.String;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(ChannelId);
             oprot.WriteFieldEnd();
         }
         if (ShopOrderId != null && __isset.shopOrderId)
         {
             field.Name = "shopOrderId";
             field.Type = TType.String;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(ShopOrderId);
             oprot.WriteFieldEnd();
         }
         if (__isset.appStoreCode)
         {
             field.Name = "appStoreCode";
             field.Type = TType.I32;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             oprot.WriteI32((int)AppStoreCode);
             oprot.WriteFieldEnd();
         }
         if (Items != null && __isset.items)
         {
             field.Name = "items";
             field.Type = TType.List;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteListBegin(new TList(TType.Struct, Items.Count));
                 foreach (CoinUseReservationItem _iter192 in Items)
                 {
                     _iter192.Write(oprot);
                 }
                 oprot.WriteListEnd();
             }
             oprot.WriteFieldEnd();
         }
         if (Country != null && __isset.country)
         {
             field.Name = "country";
             field.Type = TType.String;
             field.ID   = 5;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(Country);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                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)
                        {
                            Gid = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

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

                    case 4:
                        if (field.Type == TType.Struct)
                        {
                            CitedElement = new TDDIAbstractSACMElement();
                            CitedElement.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

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

                    case 7:
                        if (field.Type == TType.Struct)
                        {
                            Description = new TDDIDescription();
                            Description.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 8:
                        if (field.Type == TType.List)
                        {
                            {
                                ImplementationConstraint = new List <TDDIImplementationConstraintRef>();
                                TList _list1528 = iprot.ReadListBegin();
                                for (int _i1529 = 0; _i1529 < _list1528.Count; ++_i1529)
                                {
                                    TDDIImplementationConstraintRef _elem1530;
                                    _elem1530 = new TDDIImplementationConstraintRef();
                                    _elem1530.Read(iprot);
                                    ImplementationConstraint.Add(_elem1530);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 9:
                        if (field.Type == TType.List)
                        {
                            {
                                Note = new List <TDDINoteRef>();
                                TList _list1531 = iprot.ReadListBegin();
                                for (int _i1532 = 0; _i1532 < _list1531.Count; ++_i1532)
                                {
                                    TDDINoteRef _elem1533;
                                    _elem1533 = new TDDINoteRef();
                                    _elem1533.Read(iprot);
                                    Note.Add(_elem1533);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 10:
                        if (field.Type == TType.List)
                        {
                            {
                                TaggedValue = new List <TDDITaggedValueRef>();
                                TList _list1534 = iprot.ReadListBegin();
                                for (int _i1535 = 0; _i1535 < _list1534.Count; ++_i1535)
                                {
                                    TDDITaggedValueRef _elem1536;
                                    _elem1536 = new TDDITaggedValueRef();
                                    _elem1536.Read(iprot);
                                    TaggedValue.Add(_elem1536);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 11:
                        if (field.Type == TType.List)
                        {
                            {
                                TerminologyElement = new List <TDDIAbstractTerminologyElement>();
                                TList _list1537 = iprot.ReadListBegin();
                                for (int _i1538 = 0; _i1538 < _list1537.Count; ++_i1538)
                                {
                                    TDDIAbstractTerminologyElement _elem1539;
                                    _elem1539 = new TDDIAbstractTerminologyElement();
                                    _elem1539.Read(iprot);
                                    TerminologyElement.Add(_elem1539);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
Esempio n. 8
0
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                TField field;
                iprot.ReadStructBegin();
                while (true)
                {
                    field = iprot.ReadFieldBegin();
                    if (field.Type == TType.Stop)
                    {
                        break;
                    }
                    switch (field.ID)
                    {
                    case 1:
                        if (field.Type == TType.I32)
                        {
                            V1 = iprot.ReadI32();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

                    case 3:
                        if (field.Type == TType.Double)
                        {
                            Weight = iprot.ReadDouble();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

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

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
Esempio n. 9
0
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                TField field;
                iprot.ReadStructBegin();
                while (true)
                {
                    field = iprot.ReadFieldBegin();
                    if (field.Type == TType.Stop)
                    {
                        break;
                    }
                    switch (field.ID)
                    {
                    case 1:
                        if (field.Type == TType.I32)
                        {
                            MatchType = (THMatchType)iprot.ReadI32();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

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

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

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

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

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

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

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

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

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

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

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

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

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
Esempio n. 10
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("THClickDetails");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (__isset.matchType)
         {
             field.Name = "matchType";
             field.Type = TType.I32;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             oprot.WriteI32((int)MatchType);
             oprot.WriteFieldEnd();
         }
         if (DebugDetails != null && __isset.debugDetails)
         {
             field.Name = "debugDetails";
             field.Type = TType.Struct;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             DebugDetails.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (__isset.dateInstalled)
         {
             field.Name = "dateInstalled";
             field.Type = TType.I64;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             oprot.WriteI64(DateInstalled);
             oprot.WriteFieldEnd();
         }
         if (__isset.trackType)
         {
             field.Name = "trackType";
             field.Type = TType.I32;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             oprot.WriteI32((int)TrackType);
             oprot.WriteFieldEnd();
         }
         if (Os != null && __isset.os)
         {
             field.Name = "os";
             field.Type = TType.String;
             field.ID   = 5;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(Os);
             oprot.WriteFieldEnd();
         }
         if (OsVersion != null && __isset.osVersion)
         {
             field.Name = "osVersion";
             field.Type = TType.String;
             field.ID   = 6;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(OsVersion);
             oprot.WriteFieldEnd();
         }
         if (DeviceBrand != null && __isset.deviceBrand)
         {
             field.Name = "deviceBrand";
             field.Type = TType.String;
             field.ID   = 7;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(DeviceBrand);
             oprot.WriteFieldEnd();
         }
         if (DeviceModel != null && __isset.deviceModel)
         {
             field.Name = "deviceModel";
             field.Type = TType.String;
             field.ID   = 8;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(DeviceModel);
             oprot.WriteFieldEnd();
         }
         if (Country != null && __isset.country)
         {
             field.Name = "country";
             field.Type = TType.String;
             field.ID   = 9;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(Country);
             oprot.WriteFieldEnd();
         }
         if (City != null && __isset.city)
         {
             field.Name = "city";
             field.Type = TType.String;
             field.ID   = 10;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(City);
             oprot.WriteFieldEnd();
         }
         if (__isset.dateFirstInstalled)
         {
             field.Name = "dateFirstInstalled";
             field.Type = TType.I64;
             field.ID   = 11;
             oprot.WriteFieldBegin(field);
             oprot.WriteI64(DateFirstInstalled);
             oprot.WriteFieldEnd();
         }
         if (DeviceId != null && __isset.deviceId)
         {
             field.Name = "deviceId";
             field.Type = TType.String;
             field.ID   = 12;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(DeviceId);
             oprot.WriteFieldEnd();
         }
         if (UserId != null && __isset.userId)
         {
             field.Name = "userId";
             field.Type = TType.String;
             field.ID   = 13;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(UserId);
             oprot.WriteFieldEnd();
         }
         if (__isset.clickCreatedAt)
         {
             field.Name = "clickCreatedAt";
             field.Type = TType.I64;
             field.ID   = 14;
             oprot.WriteFieldBegin(field);
             oprot.WriteI64(ClickCreatedAt);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
Esempio n. 11
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("TDDIFMEAFailure");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (__isset.Id)
         {
             field.Name = "Id";
             field.Type = TType.I64;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             oprot.WriteI64(Id);
             oprot.WriteFieldEnd();
         }
         if (Name != null && __isset.Name)
         {
             field.Name = "Name";
             field.Type = TType.String;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(Name);
             oprot.WriteFieldEnd();
         }
         if (Description != null && __isset.Description)
         {
             field.Name = "Description";
             field.Type = TType.String;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(Description);
             oprot.WriteFieldEnd();
         }
         if (__isset.IsCitation)
         {
             field.Name = "IsCitation";
             field.Type = TType.Bool;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(IsCitation);
             oprot.WriteFieldEnd();
         }
         if (__isset.IsAbstract)
         {
             field.Name = "IsAbstract";
             field.Type = TType.Bool;
             field.ID   = 5;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(IsAbstract);
             oprot.WriteFieldEnd();
         }
         if (KeyValueMaps != null && __isset.KeyValueMaps)
         {
             field.Name = "KeyValueMaps";
             field.Type = TType.List;
             field.ID   = 6;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteListBegin(new TList(TType.Struct, KeyValueMaps.Count));
                 foreach (TDDIKeyValueMapRef _iter571 in KeyValueMaps)
                 {
                     _iter571.Write(oprot);
                 }
                 oprot.WriteListEnd();
             }
             oprot.WriteFieldEnd();
         }
         if (CitedElement != null && __isset.CitedElement)
         {
             field.Name = "CitedElement";
             field.Type = TType.Struct;
             field.ID   = 7;
             oprot.WriteFieldBegin(field);
             CitedElement.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (__isset.FailureRate)
         {
             field.Name = "FailureRate";
             field.Type = TType.Double;
             field.ID   = 8;
             oprot.WriteFieldBegin(field);
             oprot.WriteDouble(FailureRate);
             oprot.WriteFieldEnd();
         }
         if (FailureMode != null && __isset.FailureMode)
         {
             field.Name = "FailureMode";
             field.Type = TType.Struct;
             field.ID   = 9;
             oprot.WriteFieldBegin(field);
             FailureMode.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (ProbabilityDistribution != null && __isset.ProbabilityDistribution)
         {
             field.Name = "ProbabilityDistribution";
             field.Type = TType.Struct;
             field.ID   = 10;
             oprot.WriteFieldBegin(field);
             ProbabilityDistribution.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (OutputFailure != null && __isset.OutputFailure)
         {
             field.Name = "OutputFailure";
             field.Type = TType.Struct;
             field.ID   = 11;
             oprot.WriteFieldBegin(field);
             OutputFailure.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (InputFailure != null && __isset.InputFailure)
         {
             field.Name = "InputFailure";
             field.Type = TType.Struct;
             field.ID   = 12;
             oprot.WriteFieldBegin(field);
             InputFailure.Write(oprot);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
Esempio n. 12
0
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                TField field;
                iprot.ReadStructBegin();
                while (true)
                {
                    field = iprot.ReadFieldBegin();
                    if (field.Type == TType.Stop)
                    {
                        break;
                    }
                    switch (field.ID)
                    {
                    case 1:
                        if (field.Type == TType.I64)
                        {
                            Id = iprot.ReadI64();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

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

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

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

                    case 6:
                        if (field.Type == TType.List)
                        {
                            {
                                KeyValueMaps = new List <TDDIKeyValueMapRef>();
                                TList _list568 = iprot.ReadListBegin();
                                for (int _i569 = 0; _i569 < _list568.Count; ++_i569)
                                {
                                    TDDIKeyValueMapRef _elem570;
                                    _elem570 = new TDDIKeyValueMapRef();
                                    _elem570.Read(iprot);
                                    KeyValueMaps.Add(_elem570);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 7:
                        if (field.Type == TType.Struct)
                        {
                            CitedElement = new TDDIAbstractBaseElement();
                            CitedElement.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 8:
                        if (field.Type == TType.Double)
                        {
                            FailureRate = iprot.ReadDouble();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 9:
                        if (field.Type == TType.Struct)
                        {
                            FailureMode = new TDDIFailureMode();
                            FailureMode.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 10:
                        if (field.Type == TType.Struct)
                        {
                            ProbabilityDistribution = new TDDIProbabilityDistribution();
                            ProbabilityDistribution.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 11:
                        if (field.Type == TType.Struct)
                        {
                            OutputFailure = new TDDIOutputFailure();
                            OutputFailure.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
Esempio n. 13
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("Profile");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (Mid != null && __isset.mid)
         {
             field.Name = "mid";
             field.Type = TType.String;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(Mid);
             oprot.WriteFieldEnd();
         }
         if (Userid != null && __isset.userid)
         {
             field.Name = "userid";
             field.Type = TType.String;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(Userid);
             oprot.WriteFieldEnd();
         }
         if (Phone != null && __isset.phone)
         {
             field.Name = "phone";
             field.Type = TType.String;
             field.ID   = 10;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(Phone);
             oprot.WriteFieldEnd();
         }
         if (Email != null && __isset.email)
         {
             field.Name = "email";
             field.Type = TType.String;
             field.ID   = 11;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(Email);
             oprot.WriteFieldEnd();
         }
         if (RegionCode != null && __isset.regionCode)
         {
             field.Name = "regionCode";
             field.Type = TType.String;
             field.ID   = 12;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(RegionCode);
             oprot.WriteFieldEnd();
         }
         if (DisplayName != null && __isset.displayName)
         {
             field.Name = "displayName";
             field.Type = TType.String;
             field.ID   = 20;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(DisplayName);
             oprot.WriteFieldEnd();
         }
         if (PhoneticName != null && __isset.phoneticName)
         {
             field.Name = "phoneticName";
             field.Type = TType.String;
             field.ID   = 21;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(PhoneticName);
             oprot.WriteFieldEnd();
         }
         if (PictureStatus != null && __isset.pictureStatus)
         {
             field.Name = "pictureStatus";
             field.Type = TType.String;
             field.ID   = 22;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(PictureStatus);
             oprot.WriteFieldEnd();
         }
         if (ThumbnailUrl != null && __isset.thumbnailUrl)
         {
             field.Name = "thumbnailUrl";
             field.Type = TType.String;
             field.ID   = 23;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(ThumbnailUrl);
             oprot.WriteFieldEnd();
         }
         if (StatusMessage != null && __isset.statusMessage)
         {
             field.Name = "statusMessage";
             field.Type = TType.String;
             field.ID   = 24;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(StatusMessage);
             oprot.WriteFieldEnd();
         }
         if (__isset.allowSearchByUserid)
         {
             field.Name = "allowSearchByUserid";
             field.Type = TType.Bool;
             field.ID   = 31;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(AllowSearchByUserid);
             oprot.WriteFieldEnd();
         }
         if (__isset.allowSearchByEmail)
         {
             field.Name = "allowSearchByEmail";
             field.Type = TType.Bool;
             field.ID   = 32;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(AllowSearchByEmail);
             oprot.WriteFieldEnd();
         }
         if (PicturePath != null && __isset.picturePath)
         {
             field.Name = "picturePath";
             field.Type = TType.String;
             field.ID   = 33;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(PicturePath);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
Esempio n. 14
0
    public void Read(TProtocol iprot)
    {
        iprot.IncrementRecursionDepth();
        try
        {
            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)
                    {
                        Mid = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

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

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

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

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

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

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

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

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

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

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

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

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

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
        finally
        {
            iprot.DecrementRecursionDepth();
        }
    }
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("TDDITerminologyPackageInterface");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (Gid != null && __isset.Gid)
         {
             field.Name = "Gid";
             field.Type = TType.String;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(Gid);
             oprot.WriteFieldEnd();
         }
         if (__isset.IsCitation)
         {
             field.Name = "IsCitation";
             field.Type = TType.Bool;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(IsCitation);
             oprot.WriteFieldEnd();
         }
         if (__isset.IsAbstract)
         {
             field.Name = "IsAbstract";
             field.Type = TType.Bool;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(IsAbstract);
             oprot.WriteFieldEnd();
         }
         if (CitedElement != null && __isset.CitedElement)
         {
             field.Name = "CitedElement";
             field.Type = TType.Struct;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             CitedElement.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (AbstractForm != null && __isset.AbstractForm)
         {
             field.Name = "AbstractForm";
             field.Type = TType.Struct;
             field.ID   = 5;
             oprot.WriteFieldBegin(field);
             AbstractForm.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (Name != null && __isset.Name)
         {
             field.Name = "Name";
             field.Type = TType.Struct;
             field.ID   = 6;
             oprot.WriteFieldBegin(field);
             Name.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (Description != null && __isset.Description)
         {
             field.Name = "Description";
             field.Type = TType.Struct;
             field.ID   = 7;
             oprot.WriteFieldBegin(field);
             Description.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (ImplementationConstraint != null && __isset.ImplementationConstraint)
         {
             field.Name = "ImplementationConstraint";
             field.Type = TType.List;
             field.ID   = 8;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteListBegin(new TList(TType.Struct, ImplementationConstraint.Count));
                 foreach (TDDIImplementationConstraintRef _iter1540 in ImplementationConstraint)
                 {
                     _iter1540.Write(oprot);
                 }
                 oprot.WriteListEnd();
             }
             oprot.WriteFieldEnd();
         }
         if (Note != null && __isset.Note)
         {
             field.Name = "Note";
             field.Type = TType.List;
             field.ID   = 9;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteListBegin(new TList(TType.Struct, Note.Count));
                 foreach (TDDINoteRef _iter1541 in Note)
                 {
                     _iter1541.Write(oprot);
                 }
                 oprot.WriteListEnd();
             }
             oprot.WriteFieldEnd();
         }
         if (TaggedValue != null && __isset.TaggedValue)
         {
             field.Name = "TaggedValue";
             field.Type = TType.List;
             field.ID   = 10;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteListBegin(new TList(TType.Struct, TaggedValue.Count));
                 foreach (TDDITaggedValueRef _iter1542 in TaggedValue)
                 {
                     _iter1542.Write(oprot);
                 }
                 oprot.WriteListEnd();
             }
             oprot.WriteFieldEnd();
         }
         if (TerminologyElement != null && __isset.TerminologyElement)
         {
             field.Name = "TerminologyElement";
             field.Type = TType.List;
             field.ID   = 11;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteListBegin(new TList(TType.Struct, TerminologyElement.Count));
                 foreach (TDDIAbstractTerminologyElement _iter1543 in TerminologyElement)
                 {
                     _iter1543.Write(oprot);
                 }
                 oprot.WriteListEnd();
             }
             oprot.WriteFieldEnd();
         }
         if (Implements != null && __isset.Implements)
         {
             field.Name = "Implements";
             field.Type = TType.Struct;
             field.ID   = 12;
             oprot.WriteFieldBegin(field);
             Implements.Write(oprot);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
Esempio n. 16
0
        public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                TField field;
                await iprot.ReadStructBeginAsync(cancellationToken);

                while (true)
                {
                    field = await iprot.ReadFieldBeginAsync(cancellationToken);

                    if (field.Type == TType.Stop)
                    {
                        break;
                    }

                    switch (field.ID)
                    {
                    case 1:
                        if (field.Type == TType.I64)
                        {
                            Elapsed = await iprot.ReadI64Async(cancellationToken);
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.I64)
                        {
                            Rows_completed = await iprot.ReadI64Async(cancellationToken);
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    case 3:
                        if (field.Type == TType.I64)
                        {
                            Rows_estimated = await iprot.ReadI64Async(cancellationToken);
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.I64)
                        {
                            Rows_rejected = await iprot.ReadI64Async(cancellationToken);
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    default:
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);

                        break;
                    }

                    await iprot.ReadFieldEndAsync(cancellationToken);
                }

                await iprot.ReadStructEndAsync(cancellationToken);
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
Esempio n. 17
0
    public void Read(TProtocol iprot)
    {
        iprot.IncrementRecursionDepth();
        try
        {
            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)
                    {
                        OwnerMid = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

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

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

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

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
        finally
        {
            iprot.DecrementRecursionDepth();
        }
    }
Esempio n. 18
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("edge");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (__isset.v1)
         {
             field.Name = "v1";
             field.Type = TType.I32;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             oprot.WriteI32(V1);
             oprot.WriteFieldEnd();
         }
         if (__isset.v2)
         {
             field.Name = "v2";
             field.Type = TType.I32;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             oprot.WriteI32(V2);
             oprot.WriteFieldEnd();
         }
         if (__isset.weight)
         {
             field.Name = "weight";
             field.Type = TType.Double;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             oprot.WriteDouble(Weight);
             oprot.WriteFieldEnd();
         }
         if (__isset.directed)
         {
             field.Name = "directed";
             field.Type = TType.Bool;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(Directed);
             oprot.WriteFieldEnd();
         }
         if (Description != null && __isset.description)
         {
             field.Name = "description";
             field.Type = TType.String;
             field.ID   = 5;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(Description);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
Esempio n. 19
0
    public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
    {
        oprot.IncrementRecursionDepth();
        try
        {
            var struc = new TStruct("FriendChannelMatrix");
            await oprot.WriteStructBeginAsync(struc, cancellationToken);

            var field = new TField();
            if (ChannelId != null && __isset.channelId)
            {
                field.Name = "channelId";
                field.Type = TType.String;
                field.ID   = 1;
                await oprot.WriteFieldBeginAsync(field, cancellationToken);

                await oprot.WriteStringAsync(ChannelId, cancellationToken);

                await oprot.WriteFieldEndAsync(cancellationToken);
            }
            if (RepresentMid != null && __isset.representMid)
            {
                field.Name = "representMid";
                field.Type = TType.String;
                field.ID   = 2;
                await oprot.WriteFieldBeginAsync(field, cancellationToken);

                await oprot.WriteStringAsync(RepresentMid, cancellationToken);

                await oprot.WriteFieldEndAsync(cancellationToken);
            }
            if (__isset.count)
            {
                field.Name = "count";
                field.Type = TType.I32;
                field.ID   = 3;
                await oprot.WriteFieldBeginAsync(field, cancellationToken);

                await oprot.WriteI32Async(Count, cancellationToken);

                await oprot.WriteFieldEndAsync(cancellationToken);
            }
            if (__isset.point)
            {
                field.Name = "point";
                field.Type = TType.I32;
                field.ID   = 4;
                await oprot.WriteFieldBeginAsync(field, cancellationToken);

                await oprot.WriteI32Async(Point, cancellationToken);

                await oprot.WriteFieldEndAsync(cancellationToken);
            }
            await oprot.WriteFieldStopAsync(cancellationToken);

            await oprot.WriteStructEndAsync(cancellationToken);
        }
        finally
        {
            oprot.DecrementRecursionDepth();
        }
    }
Esempio n. 20
0
    public void Read(TProtocol iprot)
    {
        iprot.IncrementRecursionDepth();
        try
        {
            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)
                    {
                        ChannelId = iprot.ReadString();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

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

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

                case 4:
                    if (field.Type == TType.List)
                    {
                        {
                            Items = new List <CoinUseReservationItem>();
                            TList _list189 = iprot.ReadListBegin();
                            for (int _i190 = 0; _i190 < _list189.Count; ++_i190)
                            {
                                CoinUseReservationItem _elem191;
                                _elem191 = new CoinUseReservationItem();
                                _elem191.Read(iprot);
                                Items.Add(_elem191);
                            }
                            iprot.ReadListEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

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

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
        finally
        {
            iprot.DecrementRecursionDepth();
        }
    }
Esempio n. 21
0
    public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
    {
        iprot.IncrementRecursionDepth();
        try
        {
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);

            while (true)
            {
                field = await iprot.ReadFieldBeginAsync(cancellationToken);

                if (field.Type == TType.Stop)
                {
                    break;
                }

                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.String)
                    {
                        ChannelId = await iprot.ReadStringAsync(cancellationToken);
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 2:
                    if (field.Type == TType.String)
                    {
                        RepresentMid = await iprot.ReadStringAsync(cancellationToken);
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 3:
                    if (field.Type == TType.I32)
                    {
                        Count = await iprot.ReadI32Async(cancellationToken);
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 4:
                    if (field.Type == TType.I32)
                    {
                        Point = await iprot.ReadI32Async(cancellationToken);
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                default:
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);

                    break;
                }

                await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
        }
        finally
        {
            iprot.DecrementRecursionDepth();
        }
    }
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                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)
                        {
                            Status = new APIResponse();
                            Status.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.List)
                        {
                            {
                                Balances = new List <TokenBalance>();
                                TList _list87 = iprot.ReadListBegin();
                                for (int _i88 = 0; _i88 < _list87.Count; ++_i88)
                                {
                                    TokenBalance _elem89;
                                    _elem89 = new TokenBalance();
                                    _elem89.Read(iprot);
                                    Balances.Add(_elem89);
                                }
                                iprot.ReadListEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
    public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
    {
        iprot.IncrementRecursionDepth();
        try
        {
            TField field;
            await iprot.ReadStructBeginAsync(cancellationToken);

            while (true)
            {
                field = await iprot.ReadFieldBeginAsync(cancellationToken);

                if (field.Type == TType.Stop)
                {
                    break;
                }

                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.Set)
                    {
                        {
                            TSet _set4 = await iprot.ReadSetBeginAsync(cancellationToken);

                            AllowedTypes = new THashSet <ContentType>(_set4.Count);
                            for (int _i5 = 0; _i5 < _set4.Count; ++_i5)
                            {
                                ContentType _elem6;
                                _elem6 = (ContentType)await iprot.ReadI32Async(cancellationToken);

                                AllowedTypes.Add(_elem6);
                            }
                            await iprot.ReadSetEndAsync(cancellationToken);
                        }
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 2:
                    if (field.Type == TType.Struct)
                    {
                        PublicKey = new E2EEPublicKey();
                        await PublicKey.ReadAsync(iprot, cancellationToken);
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                default:
                    await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);

                    break;
                }

                await iprot.ReadFieldEndAsync(cancellationToken);
            }

            await iprot.ReadStructEndAsync(cancellationToken);
        }
        finally
        {
            iprot.DecrementRecursionDepth();
        }
    }
Esempio n. 24
0
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                bool   isset_type = false;
                bool   isset_uncompressed_page_size = false;
                bool   isset_compressed_page_size   = 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.I32)
                        {
                            Type       = (PageType)iprot.ReadI32();
                            isset_type = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

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

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

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

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

                    case 7:
                        if (field.Type == TType.Struct)
                        {
                            Dictionary_page_header = new DictionaryPageHeader();
                            Dictionary_page_header.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 8:
                        if (field.Type == TType.Struct)
                        {
                            Data_page_header_v2 = new DataPageHeaderV2();
                            Data_page_header_v2.Read(iprot);
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
                if (!isset_type)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA);
                }
                if (!isset_uncompressed_page_size)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA);
                }
                if (!isset_compressed_page_size)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA);
                }
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
Esempio n. 25
0
        public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                TField field;
                await iprot.ReadStructBeginAsync(cancellationToken);

                while (true)
                {
                    field = await iprot.ReadFieldBeginAsync(cancellationToken);

                    if (field.Type == TType.Stop)
                    {
                        break;
                    }

                    switch (field.ID)
                    {
                    case 1:
                        if (field.Type == TType.String)
                        {
                            DeviceId = await iprot.ReadStringAsync(cancellationToken);
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.String)
                        {
                            UserId = await iprot.ReadStringAsync(cancellationToken);
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    case 3:
                        if (field.Type == TType.String)
                        {
                            Name = await iprot.ReadStringAsync(cancellationToken);
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.I64)
                        {
                            Timestamp = await iprot.ReadI64Async(cancellationToken);
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    case 5:
                        if (field.Type == TType.Double)
                        {
                            Scale = await iprot.ReadDoubleAsync(cancellationToken);
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    default:
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);

                        break;
                    }

                    await iprot.ReadFieldEndAsync(cancellationToken);
                }

                await iprot.ReadStructEndAsync(cancellationToken);
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
Esempio n. 26
0
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                bool   isset_row     = false;
                bool   isset_columns = 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)
                        {
                            Row       = iprot.ReadBinary();
                            isset_row = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.List)
                        {
                            {
                                Columns = new List <TColumnIncrement>();
                                TList _list35 = iprot.ReadListBegin();
                                for (int _i36 = 0; _i36 < _list35.Count; ++_i36)
                                {
                                    TColumnIncrement _elem37;
                                    _elem37 = new TColumnIncrement();
                                    _elem37.Read(iprot);
                                    Columns.Add(_elem37);
                                }
                                iprot.ReadListEnd();
                            }
                            isset_columns = true;
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.Map)
                        {
                            {
                                Attributes = new Dictionary <byte[], byte[]>();
                                TMap _map38 = iprot.ReadMapBegin();
                                for (int _i39 = 0; _i39 < _map38.Count; ++_i39)
                                {
                                    byte[] _key40;
                                    byte[] _val41;
                                    _key40             = iprot.ReadBinary();
                                    _val41             = iprot.ReadBinary();
                                    Attributes[_key40] = _val41;
                                }
                                iprot.ReadMapEnd();
                            }
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

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

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
                if (!isset_row)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Row not set");
                }
                if (!isset_columns)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Columns not set");
                }
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
Esempio n. 27
0
        public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
            oprot.IncrementRecursionDepth();
            try
            {
                var struc = new TStruct("AxisActionTriggered");
                await oprot.WriteStructBeginAsync(struc, cancellationToken);

                var field = new TField();
                if (DeviceId != null && __isset.deviceId)
                {
                    field.Name = "deviceId";
                    field.Type = TType.String;
                    field.ID   = 1;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteStringAsync(DeviceId, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (UserId != null && __isset.userId)
                {
                    field.Name = "userId";
                    field.Type = TType.String;
                    field.ID   = 2;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteStringAsync(UserId, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (Name != null && __isset.name)
                {
                    field.Name = "name";
                    field.Type = TType.String;
                    field.ID   = 3;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteStringAsync(Name, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (__isset.timestamp)
                {
                    field.Name = "timestamp";
                    field.Type = TType.I64;
                    field.ID   = 4;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteI64Async(Timestamp, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (__isset.scale)
                {
                    field.Name = "scale";
                    field.Type = TType.Double;
                    field.ID   = 5;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteDoubleAsync(Scale, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                await oprot.WriteFieldStopAsync(cancellationToken);

                await oprot.WriteStructEndAsync(cancellationToken);
            }
            finally
            {
                oprot.DecrementRecursionDepth();
            }
        }
Esempio n. 28
0
        public void Read(TProtocol iprot)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                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)
                        {
                            DescricaoCausaInternacaoEm12Meses = iprot.ReadString();
                        }
                        else
                        {
                            TProtocolUtil.Skip(iprot, field.Type);
                        }
                        break;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    default:
                        TProtocolUtil.Skip(iprot, field.Type);
                        break;
                    }
                    iprot.ReadFieldEnd();
                }
                iprot.ReadStructEnd();
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
Esempio n. 29
0
        public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
            oprot.IncrementRecursionDepth();
            try
            {
                var struc = new TStruct("TImportStatus");
                await oprot.WriteStructBeginAsync(struc, cancellationToken);

                var field = new TField();
                if (isset.elapsed)
                {
                    field.Name = "elapsed";
                    field.Type = TType.I64;
                    field.ID   = 1;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteI64Async(Elapsed, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (isset.rows_completed)
                {
                    field.Name = "rows_completed";
                    field.Type = TType.I64;
                    field.ID   = 2;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteI64Async(Rows_completed, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (isset.rows_estimated)
                {
                    field.Name = "rows_estimated";
                    field.Type = TType.I64;
                    field.ID   = 3;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteI64Async(Rows_estimated, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (isset.rows_rejected)
                {
                    field.Name = "rows_rejected";
                    field.Type = TType.I64;
                    field.ID   = 4;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteI64Async(Rows_rejected, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                await oprot.WriteFieldStopAsync(cancellationToken);

                await oprot.WriteStructEndAsync(cancellationToken);
            }
            finally
            {
                oprot.DecrementRecursionDepth();
            }
        }
Esempio n. 30
0
        public static async Task SkipAsync(TProtocol prot, TType type, CancellationToken cancellationToken)
        {
            if (cancellationToken.IsCancellationRequested)
            {
                await Task.FromCanceled(cancellationToken);
            }

            prot.IncrementRecursionDepth();
            try
            {
                switch (type)
                {
                    case TType.Bool:
                        await prot.ReadBoolAsync(cancellationToken);
                        break;
                    case TType.Byte:
                        await prot.ReadByteAsync(cancellationToken);
                        break;
                    case TType.I16:
                        await prot.ReadI16Async(cancellationToken);
                        break;
                    case TType.I32:
                        await prot.ReadI32Async(cancellationToken);
                        break;
                    case TType.I64:
                        await prot.ReadI64Async(cancellationToken);
                        break;
                    case TType.Double:
                        await prot.ReadDoubleAsync(cancellationToken);
                        break;
                    case TType.String:
                        // Don't try to decode the string, just skip it.
                        await prot.ReadBinaryAsync(cancellationToken);
                        break;
                    case TType.Struct:
                        await prot.ReadStructBeginAsync(cancellationToken);
                        while (true)
                        {
                            var field = await prot.ReadFieldBeginAsync(cancellationToken);
                            if (field.Type == TType.Stop)
                            {
                                break;
                            }
                            await SkipAsync(prot, field.Type, cancellationToken);
                            await prot.ReadFieldEndAsync(cancellationToken);
                        }
                        await prot.ReadStructEndAsync(cancellationToken);
                        break;
                    case TType.Map:
                        var map = await prot.ReadMapBeginAsync(cancellationToken);
                        for (var i = 0; i < map.Count; i++)
                        {
                            await SkipAsync(prot, map.KeyType, cancellationToken);
                            await SkipAsync(prot, map.ValueType, cancellationToken);
                        }
                        await prot.ReadMapEndAsync(cancellationToken);
                        break;
                    case TType.Set:
                        var set = await prot.ReadSetBeginAsync(cancellationToken);
                        for (var i = 0; i < set.Count; i++)
                        {
                            await SkipAsync(prot, set.ElementType, cancellationToken);
                        }
                        await prot.ReadSetEndAsync(cancellationToken);
                        break;
                    case TType.List:
                        var list = await prot.ReadListBeginAsync(cancellationToken);
                        for (var i = 0; i < list.Count; i++)
                        {
                            await SkipAsync(prot, list.ElementType, cancellationToken);
                        }
                        await prot.ReadListEndAsync(cancellationToken);
                        break;
                    default:
                        throw new TProtocolException(TProtocolException.INVALID_DATA, "Unknown data type " + type.ToString("d"));
                }
            }
            finally
            {
                prot.DecrementRecursionDepth();
            }
        }
Esempio n. 31
0
        public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
        {
            oprot.IncrementRecursionDepth();
            try
            {
                var struc = new TStruct("Work");
                await oprot.WriteStructBeginAsync(struc, cancellationToken);

                var field = new TField();
                if (__isset.num1)
                {
                    field.Name = "num1";
                    field.Type = TType.I32;
                    field.ID   = 1;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteI32Async(Num1, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (__isset.num2)
                {
                    field.Name = "num2";
                    field.Type = TType.I32;
                    field.ID   = 2;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteI32Async(Num2, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (__isset.op)
                {
                    field.Name = "op";
                    field.Type = TType.I32;
                    field.ID   = 3;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteI32Async((int)Op, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                if (Comment != null && __isset.comment)
                {
                    field.Name = "comment";
                    field.Type = TType.String;
                    field.ID   = 4;
                    await oprot.WriteFieldBeginAsync(field, cancellationToken);

                    await oprot.WriteStringAsync(Comment, cancellationToken);

                    await oprot.WriteFieldEndAsync(cancellationToken);
                }
                await oprot.WriteFieldStopAsync(cancellationToken);

                await oprot.WriteStructEndAsync(cancellationToken);
            }
            finally
            {
                oprot.DecrementRecursionDepth();
            }
        }