Пример #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();
        }
Пример #2
0
        public override string ToString()
        {
            StringBuilder __sb    = new StringBuilder("User(");
            bool          __first = true;

            if (UserId != null && __isset.userId)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("UserId: ");
                __sb.Append(UserId);
            }
            if (Email != null && __isset.email)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Email: ");
                __sb.Append(Email);
            }
            if (UserName != null && __isset.userName)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("UserName: "******", ");
                }
                __first = false;
                __sb.Append("Password: "******", ");
                }
                __first = false;
                __sb.Append("LastActivityDate: ");
                __sb.Append(LastActivityDate);
            }
            if (PrimaryContactNumber != null && __isset.primaryContactNumber)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("PrimaryContactNumber: ");
                __sb.Append(PrimaryContactNumber);
            }
            if (__isset.isApproved)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("IsApproved: ");
                __sb.Append(IsApproved);
            }
            if (__isset.isLockedOut)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("IsLockedOut: ");
                __sb.Append(IsLockedOut);
            }
            if (__isset.isActivated)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("IsActivated: ");
                __sb.Append(IsActivated);
            }
            if (CreateDate != null && __isset.createDate)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("CreateDate: ");
                __sb.Append(CreateDate);
            }
            if (LastLoginDate != null && __isset.lastLoginDate)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("LastLoginDate: ");
                __sb.Append(LastLoginDate);
            }
            if (LastPasswordChangedDate != null && __isset.lastPasswordChangedDate)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("LastPasswordChangedDate: ");
                __sb.Append(LastPasswordChangedDate);
            }
            if (LastLockoutDate != null && __isset.lastLockoutDate)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("LastLockoutDate: ");
                __sb.Append(LastLockoutDate);
            }
            if (__isset.failedPasswordAttemptCount)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("FailedPasswordAttemptCount: ");
                __sb.Append(FailedPasswordAttemptCount);
            }
            if (__isset.isFirstLogin)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("IsFirstLogin: "******", ");
                }
                __first = false;
                __sb.Append("CTag: ");
                __sb.Append(CTag);
            }
            if (__isset.hasDeactivated)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("HasDeactivated: ");
                __sb.Append(HasDeactivated);
            }
            if (__isset.chatStatus)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("ChatStatus: ");
                __sb.Append(ChatStatus);
            }
            if (UserInfo != null && __isset.userInfo)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("UserInfo: ");
                __sb.Append(UserInfo == null ? "<null>" : UserInfo.ToString());
            }
            if (UserInfoPerson != null && __isset.userInfoPerson)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("UserInfoPerson: ");
                __sb.Append(UserInfoPerson == null ? "<null>" : UserInfoPerson.ToString());
            }
            if (UserCategory != null && __isset.userCategory)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("UserCategory: ");
                __sb.Append(UserCategory == null ? "<null>" : UserCategory.ToString());
            }
            if (Contact != null && __isset.contact)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Contact: ");
                __sb.Append(Contact == null ? "<null>" : Contact.ToString());
            }
            if (Status != null && __isset.status)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Status: ");
                __sb.Append(Status == null ? "<null>" : Status.ToString());
            }
            if (Session != null && __isset.session)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Session: ");
                __sb.Append(Session == null ? "<null>" : Session.ToString());
            }
            if (DeviceId != null && __isset.deviceId)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("DeviceId: ");
                __sb.Append(DeviceId);
            }
            if (UserGUID != null && __isset.userGUID)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("UserGUID: ");
                __sb.Append(UserGUID);
            }
            if (MobileResetCode != null && __isset.mobileResetCode)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("MobileResetCode: ");
                __sb.Append(MobileResetCode);
            }
            if (UserInforCompany != null && __isset.userInforCompany)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("UserInforCompany: ");
                __sb.Append(UserInforCompany == null ? "<null>" : UserInforCompany.ToString());
            }
            if (__isset.isMobile)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("IsMobile: ");
                __sb.Append(IsMobile);
            }
            if (__isset.dbStatusCode)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("DbStatusCode: ");
                __sb.Append(DbStatusCode);
            }
            if (UsernameEmail != null && __isset.usernameEmail)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("UsernameEmail: ");
                __sb.Append(UsernameEmail);
            }
            if (DeviceType != null && __isset.deviceType)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("DeviceType: ");
                __sb.Append(DeviceType);
            }
            if (PushCode != null && __isset.pushCode)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("PushCode: ");
                __sb.Append(PushCode);
            }
            if (__isset.dbSubStatusCode)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("DbSubStatusCode: ");
                __sb.Append(DbSubStatusCode);
            }
            if (DbStatusMsg != null && __isset.dbStatusMsg)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("DbStatusMsg: ");
                __sb.Append(DbStatusMsg);
            }
            __sb.Append(")");
            return(__sb.ToString());
        }