Beispiel #1
0
        public void Write(TProtocol oprot)
        {
            TStruct struc = new TStruct("UserContactSettings");

            oprot.WriteStructBegin(struc);
            TField field = new TField();

            if (__isset.userId)
            {
                field.Name = "userId";
                field.Type = TType.I32;
                field.ID   = 1;
                oprot.WriteFieldBegin(field);
                oprot.WriteI32(UserId);
                oprot.WriteFieldEnd();
            }
            if (__isset.fieldId)
            {
                field.Name = "fieldId";
                field.Type = TType.I32;
                field.ID   = 2;
                oprot.WriteFieldBegin(field);
                oprot.WriteI32(FieldId);
                oprot.WriteFieldEnd();
            }
            if (__isset.contactChatNetworkId)
            {
                field.Name = "contactChatNetworkId";
                field.Type = TType.I32;
                field.ID   = 3;
                oprot.WriteFieldBegin(field);
                oprot.WriteI32(ContactChatNetworkId);
                oprot.WriteFieldEnd();
            }
            if (__isset.@value)
            {
                field.Name = "value";
                field.Type = TType.I32;
                field.ID   = 4;
                oprot.WriteFieldBegin(field);
                oprot.WriteI32(Value);
                oprot.WriteFieldEnd();
            }
            if (__isset.mode)
            {
                field.Name = "mode";
                field.Type = TType.I16;
                field.ID   = 5;
                oprot.WriteFieldBegin(field);
                oprot.WriteI16(Mode);
                oprot.WriteFieldEnd();
            }
            if (__isset.contactCustomId)
            {
                field.Name = "contactCustomId";
                field.Type = TType.I64;
                field.ID   = 6;
                oprot.WriteFieldBegin(field);
                oprot.WriteI64(ContactCustomId);
                oprot.WriteFieldEnd();
            }
            if (__isset.contactId)
            {
                field.Name = "contactId";
                field.Type = TType.I64;
                field.ID   = 7;
                oprot.WriteFieldBegin(field);
                oprot.WriteI64(ContactId);
                oprot.WriteFieldEnd();
            }
            if (EntriesInPage != null && __isset.entriesInPage)
            {
                field.Name = "entriesInPage";
                field.Type = TType.String;
                field.ID   = 8;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(EntriesInPage);
                oprot.WriteFieldEnd();
            }
            if (EntryList != null && __isset.entryList)
            {
                field.Name = "entryList";
                field.Type = TType.String;
                field.ID   = 9;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(EntryList);
                oprot.WriteFieldEnd();
            }
            if (__isset.isDefault)
            {
                field.Name = "isDefault";
                field.Type = TType.Bool;
                field.ID   = 10;
                oprot.WriteFieldBegin(field);
                oprot.WriteBool(IsDefault);
                oprot.WriteFieldEnd();
            }
            if (__isset.isBasicPrimary)
            {
                field.Name = "isBasicPrimary";
                field.Type = TType.Bool;
                field.ID   = 11;
                oprot.WriteFieldBegin(field);
                oprot.WriteBool(IsBasicPrimary);
                oprot.WriteFieldEnd();
            }
            if (UserInfo != null && __isset.userInfo)
            {
                field.Name = "userInfo";
                field.Type = TType.Struct;
                field.ID   = 12;
                oprot.WriteFieldBegin(field);
                UserInfo.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (UserInfoPerson != null && __isset.userInfoPerson)
            {
                field.Name = "userInfoPerson";
                field.Type = TType.Struct;
                field.ID   = 13;
                oprot.WriteFieldBegin(field);
                UserInfoPerson.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (User != null && __isset.user)
            {
                field.Name = "user";
                field.Type = TType.Struct;
                field.ID   = 14;
                oprot.WriteFieldBegin(field);
                User.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (UserCategory != null && __isset.userCategory)
            {
                field.Name = "userCategory";
                field.Type = TType.Struct;
                field.ID   = 15;
                oprot.WriteFieldBegin(field);
                UserCategory.Write(oprot);
                oprot.WriteFieldEnd();
            }
            oprot.WriteFieldStop();
            oprot.WriteStructEnd();
        }
Beispiel #2
0
        public void Write(TProtocol oprot)
        {
            TStruct struc = new TStruct("Friend");

            oprot.WriteStructBegin(struc);
            TField field = new TField();

            if (UserInfo != null && __isset.userInfo)
            {
                field.Name = "userInfo";
                field.Type = TType.Struct;
                field.ID   = 1;
                oprot.WriteFieldBegin(field);
                UserInfo.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (User != null && __isset.user)
            {
                field.Name = "user";
                field.Type = TType.Struct;
                field.ID   = 2;
                oprot.WriteFieldBegin(field);
                User.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (AddedOn != null && __isset.addedOn)
            {
                field.Name = "addedOn";
                field.Type = TType.String;
                field.ID   = 3;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(AddedOn);
                oprot.WriteFieldEnd();
            }
            if (RelationshipType != null && __isset.relationshipType)
            {
                field.Name = "relationshipType";
                field.Type = TType.Struct;
                field.ID   = 4;
                oprot.WriteFieldBegin(field);
                RelationshipType.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (__isset.isClose)
            {
                field.Name = "isClose";
                field.Type = TType.Bool;
                field.ID   = 5;
                oprot.WriteFieldBegin(field);
                oprot.WriteBool(IsClose);
                oprot.WriteFieldEnd();
            }
            if (UserInfoPerson != null && __isset.userInfoPerson)
            {
                field.Name = "userInfoPerson";
                field.Type = TType.Struct;
                field.ID   = 6;
                oprot.WriteFieldBegin(field);
                UserInfoPerson.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (StatusType != null && __isset.statusType)
            {
                field.Name = "statusType";
                field.Type = TType.Struct;
                field.ID   = 7;
                oprot.WriteFieldBegin(field);
                StatusType.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (SettingPerson != null && __isset.settingPerson)
            {
                field.Name = "settingPerson";
                field.Type = TType.Struct;
                field.ID   = 8;
                oprot.WriteFieldBegin(field);
                SettingPerson.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (Country != null && __isset.country)
            {
                field.Name = "country";
                field.Type = TType.Struct;
                field.ID   = 9;
                oprot.WriteFieldBegin(field);
                Country.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (Industry != null && __isset.industry)
            {
                field.Name = "industry";
                field.Type = TType.Struct;
                field.ID   = 10;
                oprot.WriteFieldBegin(field);
                Industry.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (__isset.canMessage)
            {
                field.Name = "canMessage";
                field.Type = TType.Bool;
                field.ID   = 11;
                oprot.WriteFieldBegin(field);
                oprot.WriteBool(CanMessage);
                oprot.WriteFieldEnd();
            }
            if (__isset.dbStatusCode)
            {
                field.Name = "dbStatusCode";
                field.Type = TType.I32;
                field.ID   = 12;
                oprot.WriteFieldBegin(field);
                oprot.WriteI32(DbStatusCode);
                oprot.WriteFieldEnd();
            }
            if (CTag != null && __isset.cTag)
            {
                field.Name = "cTag";
                field.Type = TType.String;
                field.ID   = 13;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(CTag);
                oprot.WriteFieldEnd();
            }
            if (__isset.friendshipStatus)
            {
                field.Name = "friendshipStatus";
                field.Type = TType.I32;
                field.ID   = 14;
                oprot.WriteFieldBegin(field);
                oprot.WriteI32(FriendshipStatus);
                oprot.WriteFieldEnd();
            }
            if (__isset.fromPhoneBook)
            {
                field.Name = "fromPhoneBook";
                field.Type = TType.Bool;
                field.ID   = 15;
                oprot.WriteFieldBegin(field);
                oprot.WriteBool(FromPhoneBook);
                oprot.WriteFieldEnd();
            }
            if (__isset.receiveConnectionRequest)
            {
                field.Name = "receiveConnectionRequest";
                field.Type = TType.Bool;
                field.ID   = 16;
                oprot.WriteFieldBegin(field);
                oprot.WriteBool(ReceiveConnectionRequest);
                oprot.WriteFieldEnd();
            }
            if (__isset.allowAddingChatGroup)
            {
                field.Name = "allowAddingChatGroup";
                field.Type = TType.Bool;
                field.ID   = 17;
                oprot.WriteFieldBegin(field);
                oprot.WriteBool(AllowAddingChatGroup);
                oprot.WriteFieldEnd();
            }
            if (__isset.allowMsgForword)
            {
                field.Name = "allowMsgForword";
                field.Type = TType.Bool;
                field.ID   = 18;
                oprot.WriteFieldBegin(field);
                oprot.WriteBool(AllowMsgForword);
                oprot.WriteFieldEnd();
            }
            if (__isset.dbSubStatusCode)
            {
                field.Name = "dbSubStatusCode";
                field.Type = TType.I32;
                field.ID   = 19;
                oprot.WriteFieldBegin(field);
                oprot.WriteI32(DbSubStatusCode);
                oprot.WriteFieldEnd();
            }
            if (DbStatusMsg != null && __isset.dbStatusMsg)
            {
                field.Name = "dbStatusMsg";
                field.Type = TType.String;
                field.ID   = 20;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(DbStatusMsg);
                oprot.WriteFieldEnd();
            }
            if (__isset.requestId)
            {
                field.Name = "requestId";
                field.Type = TType.I32;
                field.ID   = 21;
                oprot.WriteFieldBegin(field);
                oprot.WriteI32(RequestId);
                oprot.WriteFieldEnd();
            }
            if (__isset.requestTypeId)
            {
                field.Name = "requestTypeId";
                field.Type = TType.I32;
                field.ID   = 22;
                oprot.WriteFieldBegin(field);
                oprot.WriteI32(RequestTypeId);
                oprot.WriteFieldEnd();
            }
            if (LastUpdated != null && __isset.lastUpdated)
            {
                field.Name = "lastUpdated";
                field.Type = TType.String;
                field.ID   = 23;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(LastUpdated);
                oprot.WriteFieldEnd();
            }
            oprot.WriteFieldStop();
            oprot.WriteStructEnd();
        }