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

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

            if (UserId != null && __isset.userId)
            {
                field.Name = "userId";
                field.Type = TType.String;
                field.ID   = 1;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(UserId);
                oprot.WriteFieldEnd();
            }
            if (Email != null && __isset.email)
            {
                field.Name = "email";
                field.Type = TType.String;
                field.ID   = 2;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(Email);
                oprot.WriteFieldEnd();
            }
            if (UserName != null && __isset.userName)
            {
                field.Name = "userName";
                field.Type = TType.String;
                field.ID   = 3;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(UserName);
                oprot.WriteFieldEnd();
            }
            if (Password != null && __isset.password)
            {
                field.Name = "password";
                field.Type = TType.String;
                field.ID   = 4;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(Password);
                oprot.WriteFieldEnd();
            }
            if (LastActivityDate != null && __isset.lastActivityDate)
            {
                field.Name = "lastActivityDate";
                field.Type = TType.String;
                field.ID   = 5;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(LastActivityDate);
                oprot.WriteFieldEnd();
            }
            if (PrimaryContactNumber != null && __isset.primaryContactNumber)
            {
                field.Name = "primaryContactNumber";
                field.Type = TType.String;
                field.ID   = 6;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(PrimaryContactNumber);
                oprot.WriteFieldEnd();
            }
            if (__isset.isApproved)
            {
                field.Name = "isApproved";
                field.Type = TType.Bool;
                field.ID   = 7;
                oprot.WriteFieldBegin(field);
                oprot.WriteBool(IsApproved);
                oprot.WriteFieldEnd();
            }
            if (__isset.isLockedOut)
            {
                field.Name = "isLockedOut";
                field.Type = TType.Bool;
                field.ID   = 8;
                oprot.WriteFieldBegin(field);
                oprot.WriteBool(IsLockedOut);
                oprot.WriteFieldEnd();
            }
            if (__isset.isActivated)
            {
                field.Name = "isActivated";
                field.Type = TType.Bool;
                field.ID   = 9;
                oprot.WriteFieldBegin(field);
                oprot.WriteBool(IsActivated);
                oprot.WriteFieldEnd();
            }
            if (CreateDate != null && __isset.createDate)
            {
                field.Name = "createDate";
                field.Type = TType.String;
                field.ID   = 10;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(CreateDate);
                oprot.WriteFieldEnd();
            }
            if (LastLoginDate != null && __isset.lastLoginDate)
            {
                field.Name = "lastLoginDate";
                field.Type = TType.String;
                field.ID   = 11;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(LastLoginDate);
                oprot.WriteFieldEnd();
            }
            if (LastPasswordChangedDate != null && __isset.lastPasswordChangedDate)
            {
                field.Name = "lastPasswordChangedDate";
                field.Type = TType.String;
                field.ID   = 12;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(LastPasswordChangedDate);
                oprot.WriteFieldEnd();
            }
            if (LastLockoutDate != null && __isset.lastLockoutDate)
            {
                field.Name = "lastLockoutDate";
                field.Type = TType.String;
                field.ID   = 13;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(LastLockoutDate);
                oprot.WriteFieldEnd();
            }
            if (__isset.failedPasswordAttemptCount)
            {
                field.Name = "failedPasswordAttemptCount";
                field.Type = TType.I32;
                field.ID   = 14;
                oprot.WriteFieldBegin(field);
                oprot.WriteI32(FailedPasswordAttemptCount);
                oprot.WriteFieldEnd();
            }
            if (__isset.isFirstLogin)
            {
                field.Name = "isFirstLogin";
                field.Type = TType.Bool;
                field.ID   = 15;
                oprot.WriteFieldBegin(field);
                oprot.WriteBool(IsFirstLogin);
                oprot.WriteFieldEnd();
            }
            if (CTag != null && __isset.cTag)
            {
                field.Name = "cTag";
                field.Type = TType.String;
                field.ID   = 16;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(CTag);
                oprot.WriteFieldEnd();
            }
            if (__isset.hasDeactivated)
            {
                field.Name = "hasDeactivated";
                field.Type = TType.Bool;
                field.ID   = 17;
                oprot.WriteFieldBegin(field);
                oprot.WriteBool(HasDeactivated);
                oprot.WriteFieldEnd();
            }
            if (__isset.chatStatus)
            {
                field.Name = "chatStatus";
                field.Type = TType.I32;
                field.ID   = 18;
                oprot.WriteFieldBegin(field);
                oprot.WriteI32(ChatStatus);
                oprot.WriteFieldEnd();
            }
            if (UserInfo != null && __isset.userInfo)
            {
                field.Name = "userInfo";
                field.Type = TType.Struct;
                field.ID   = 19;
                oprot.WriteFieldBegin(field);
                UserInfo.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (UserInfoPerson != null && __isset.userInfoPerson)
            {
                field.Name = "userInfoPerson";
                field.Type = TType.Struct;
                field.ID   = 20;
                oprot.WriteFieldBegin(field);
                UserInfoPerson.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (UserCategory != null && __isset.userCategory)
            {
                field.Name = "userCategory";
                field.Type = TType.Struct;
                field.ID   = 21;
                oprot.WriteFieldBegin(field);
                UserCategory.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (Contact != null && __isset.contact)
            {
                field.Name = "contact";
                field.Type = TType.Struct;
                field.ID   = 22;
                oprot.WriteFieldBegin(field);
                Contact.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (Status != null && __isset.status)
            {
                field.Name = "status";
                field.Type = TType.Struct;
                field.ID   = 23;
                oprot.WriteFieldBegin(field);
                Status.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (Session != null && __isset.session)
            {
                field.Name = "session";
                field.Type = TType.Struct;
                field.ID   = 24;
                oprot.WriteFieldBegin(field);
                Session.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (DeviceId != null && __isset.deviceId)
            {
                field.Name = "deviceId";
                field.Type = TType.String;
                field.ID   = 25;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(DeviceId);
                oprot.WriteFieldEnd();
            }
            if (UserGUID != null && __isset.userGUID)
            {
                field.Name = "userGUID";
                field.Type = TType.String;
                field.ID   = 26;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(UserGUID);
                oprot.WriteFieldEnd();
            }
            if (MobileResetCode != null && __isset.mobileResetCode)
            {
                field.Name = "mobileResetCode";
                field.Type = TType.String;
                field.ID   = 27;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(MobileResetCode);
                oprot.WriteFieldEnd();
            }
            if (UserInforCompany != null && __isset.userInforCompany)
            {
                field.Name = "userInforCompany";
                field.Type = TType.Struct;
                field.ID   = 28;
                oprot.WriteFieldBegin(field);
                UserInforCompany.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (__isset.isMobile)
            {
                field.Name = "isMobile";
                field.Type = TType.Bool;
                field.ID   = 29;
                oprot.WriteFieldBegin(field);
                oprot.WriteBool(IsMobile);
                oprot.WriteFieldEnd();
            }
            if (__isset.dbStatusCode)
            {
                field.Name = "dbStatusCode";
                field.Type = TType.I32;
                field.ID   = 30;
                oprot.WriteFieldBegin(field);
                oprot.WriteI32(DbStatusCode);
                oprot.WriteFieldEnd();
            }
            if (UsernameEmail != null && __isset.usernameEmail)
            {
                field.Name = "usernameEmail";
                field.Type = TType.String;
                field.ID   = 31;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(UsernameEmail);
                oprot.WriteFieldEnd();
            }
            if (DeviceType != null && __isset.deviceType)
            {
                field.Name = "deviceType";
                field.Type = TType.String;
                field.ID   = 32;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(DeviceType);
                oprot.WriteFieldEnd();
            }
            if (PushCode != null && __isset.pushCode)
            {
                field.Name = "pushCode";
                field.Type = TType.String;
                field.ID   = 33;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(PushCode);
                oprot.WriteFieldEnd();
            }
            if (__isset.dbSubStatusCode)
            {
                field.Name = "dbSubStatusCode";
                field.Type = TType.I32;
                field.ID   = 34;
                oprot.WriteFieldBegin(field);
                oprot.WriteI32(DbSubStatusCode);
                oprot.WriteFieldEnd();
            }
            if (DbStatusMsg != null && __isset.dbStatusMsg)
            {
                field.Name = "dbStatusMsg";
                field.Type = TType.String;
                field.ID   = 35;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(DbStatusMsg);
                oprot.WriteFieldEnd();
            }
            oprot.WriteFieldStop();
            oprot.WriteStructEnd();
        }
        public void Write(TProtocol oprot)
        {
            TStruct struc = new TStruct("UserInfo");

            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.userTypeId)
            {
                field.Name = "userTypeId";
                field.Type = TType.I16;
                field.ID   = 2;
                oprot.WriteFieldBegin(field);
                oprot.WriteI16(UserTypeId);
                oprot.WriteFieldEnd();
            }
            if (TimeZone != null && __isset.timeZone)
            {
                field.Name = "timeZone";
                field.Type = TType.String;
                field.ID   = 3;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(TimeZone);
                oprot.WriteFieldEnd();
            }
            if (JoinedDate != null && __isset.joinedDate)
            {
                field.Name = "joinedDate";
                field.Type = TType.String;
                field.ID   = 4;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(JoinedDate);
                oprot.WriteFieldEnd();
            }
            if (CountryCode != null && __isset.countryCode)
            {
                field.Name = "countryCode";
                field.Type = TType.String;
                field.ID   = 5;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(CountryCode);
                oprot.WriteFieldEnd();
            }
            if (Visibility != null && __isset.visibility)
            {
                field.Name = "visibility";
                field.Type = TType.String;
                field.ID   = 6;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(Visibility);
                oprot.WriteFieldEnd();
            }
            if (HeadLine != null && __isset.headLine)
            {
                field.Name = "headLine";
                field.Type = TType.String;
                field.ID   = 7;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(HeadLine);
                oprot.WriteFieldEnd();
            }
            if (About != null && __isset.about)
            {
                field.Name = "about";
                field.Type = TType.String;
                field.ID   = 8;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(About);
                oprot.WriteFieldEnd();
            }
            if (Url != null && __isset.url)
            {
                field.Name = "url";
                field.Type = TType.String;
                field.ID   = 9;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(Url);
                oprot.WriteFieldEnd();
            }
            if (Picture != null && __isset.picture)
            {
                field.Name = "picture";
                field.Type = TType.String;
                field.ID   = 10;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(Picture);
                oprot.WriteFieldEnd();
            }
            if (LastUpdated != null && __isset.lastUpdated)
            {
                field.Name = "lastUpdated";
                field.Type = TType.String;
                field.ID   = 11;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(LastUpdated);
                oprot.WriteFieldEnd();
            }
            if (Address != null && __isset.address)
            {
                field.Name = "address";
                field.Type = TType.String;
                field.ID   = 12;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(Address);
                oprot.WriteFieldEnd();
            }
            if (UserName != null && __isset.userName)
            {
                field.Name = "userName";
                field.Type = TType.String;
                field.ID   = 13;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(UserName);
                oprot.WriteFieldEnd();
            }
            if (FullName != null && __isset.fullName)
            {
                field.Name = "fullName";
                field.Type = TType.String;
                field.ID   = 14;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(FullName);
                oprot.WriteFieldEnd();
            }
            if (Title != null && __isset.title)
            {
                field.Name = "title";
                field.Type = TType.String;
                field.ID   = 15;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(Title);
                oprot.WriteFieldEnd();
            }
            if (Email != null && __isset.email)
            {
                field.Name = "email";
                field.Type = TType.String;
                field.ID   = 16;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(Email);
                oprot.WriteFieldEnd();
            }
            if (FirstName != null && __isset.firstName)
            {
                field.Name = "firstName";
                field.Type = TType.String;
                field.ID   = 17;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(FirstName);
                oprot.WriteFieldEnd();
            }
            if (LastName != null && __isset.lastName)
            {
                field.Name = "lastName";
                field.Type = TType.String;
                field.ID   = 18;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(LastName);
                oprot.WriteFieldEnd();
            }
            if (Status != null && __isset.status)
            {
                field.Name = "status";
                field.Type = TType.Struct;
                field.ID   = 19;
                oprot.WriteFieldBegin(field);
                Status.Write(oprot);
                oprot.WriteFieldEnd();
            }
            if (PositionName != null && __isset.positionName)
            {
                field.Name = "positionName";
                field.Type = TType.String;
                field.ID   = 20;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(PositionName);
                oprot.WriteFieldEnd();
            }
            if (CallNumber != null && __isset.callNumber)
            {
                field.Name = "callNumber";
                field.Type = TType.String;
                field.ID   = 21;
                oprot.WriteFieldBegin(field);
                oprot.WriteString(CallNumber);
                oprot.WriteFieldEnd();
            }
            if (__isset.availableForMsg)
            {
                field.Name = "availableForMsg";
                field.Type = TType.Bool;
                field.ID   = 22;
                oprot.WriteFieldBegin(field);
                oprot.WriteBool(AvailableForMsg);
                oprot.WriteFieldEnd();
            }
            if (__isset.statusTypeId)
            {
                field.Name = "statusTypeId";
                field.Type = TType.I16;
                field.ID   = 23;
                oprot.WriteFieldBegin(field);
                oprot.WriteI16(StatusTypeId);
                oprot.WriteFieldEnd();
            }
            if (__isset.receptionMode)
            {
                field.Name = "receptionMode";
                field.Type = TType.I16;
                field.ID   = 24;
                oprot.WriteFieldBegin(field);
                oprot.WriteI16(ReceptionMode);
                oprot.WriteFieldEnd();
            }
            oprot.WriteFieldStop();
            oprot.WriteStructEnd();
        }