Ejemplo n.º 1
0
        public void MergeFrom(UserList other)
        {
            if (other == null)
            {
                return;
            }
            if (other.ResourceName.Length != 0)
            {
                ResourceName = other.ResourceName;
            }
            if (other.id_ != null)
            {
                if (id_ == null || other.Id != 0L)
                {
                    Id = other.Id;
                }
            }
            if (other.readOnly_ != null)
            {
                if (readOnly_ == null || other.ReadOnly != false)
                {
                    ReadOnly = other.ReadOnly;
                }
            }
            if (other.name_ != null)
            {
                if (name_ == null || other.Name != "")
                {
                    Name = other.Name;
                }
            }
            if (other.description_ != null)
            {
                if (description_ == null || other.Description != "")
                {
                    Description = other.Description;
                }
            }
            if (other.MembershipStatus != 0)
            {
                MembershipStatus = other.MembershipStatus;
            }
            if (other.integrationCode_ != null)
            {
                if (integrationCode_ == null || other.IntegrationCode != "")
                {
                    IntegrationCode = other.IntegrationCode;
                }
            }
            if (other.membershipLifeSpan_ != null)
            {
                if (membershipLifeSpan_ == null || other.MembershipLifeSpan != 0L)
                {
                    MembershipLifeSpan = other.MembershipLifeSpan;
                }
            }
            if (other.sizeForDisplay_ != null)
            {
                if (sizeForDisplay_ == null || other.SizeForDisplay != 0L)
                {
                    SizeForDisplay = other.SizeForDisplay;
                }
            }
            if (other.SizeRangeForDisplay != 0)
            {
                SizeRangeForDisplay = other.SizeRangeForDisplay;
            }
            if (other.sizeForSearch_ != null)
            {
                if (sizeForSearch_ == null || other.SizeForSearch != 0L)
                {
                    SizeForSearch = other.SizeForSearch;
                }
            }
            if (other.SizeRangeForSearch != 0)
            {
                SizeRangeForSearch = other.SizeRangeForSearch;
            }
            if (other.Type != 0)
            {
                Type = other.Type;
            }
            if (other.ClosingReason != 0)
            {
                ClosingReason = other.ClosingReason;
            }
            if (other.AccessReason != 0)
            {
                AccessReason = other.AccessReason;
            }
            if (other.AccountUserListStatus != 0)
            {
                AccountUserListStatus = other.AccountUserListStatus;
            }
            if (other.eligibleForSearch_ != null)
            {
                if (eligibleForSearch_ == null || other.EligibleForSearch != false)
                {
                    EligibleForSearch = other.EligibleForSearch;
                }
            }
            if (other.eligibleForDisplay_ != null)
            {
                if (eligibleForDisplay_ == null || other.EligibleForDisplay != false)
                {
                    EligibleForDisplay = other.EligibleForDisplay;
                }
            }
            switch (other.UserListCase)
            {
            case UserListOneofCase.CrmBasedUserList:
                if (CrmBasedUserList == null)
                {
                    CrmBasedUserList = new global::Google.Ads.GoogleAds.V0.Common.CrmBasedUserListInfo();
                }
                CrmBasedUserList.MergeFrom(other.CrmBasedUserList);
                break;

            case UserListOneofCase.SimilarUserList:
                if (SimilarUserList == null)
                {
                    SimilarUserList = new global::Google.Ads.GoogleAds.V0.Common.SimilarUserListInfo();
                }
                SimilarUserList.MergeFrom(other.SimilarUserList);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Ejemplo n.º 2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (ResourceName.Length != 0)
            {
                hash ^= ResourceName.GetHashCode();
            }
            if (id_ != null)
            {
                hash ^= Id.GetHashCode();
            }
            if (readOnly_ != null)
            {
                hash ^= ReadOnly.GetHashCode();
            }
            if (name_ != null)
            {
                hash ^= Name.GetHashCode();
            }
            if (description_ != null)
            {
                hash ^= Description.GetHashCode();
            }
            if (MembershipStatus != 0)
            {
                hash ^= MembershipStatus.GetHashCode();
            }
            if (integrationCode_ != null)
            {
                hash ^= IntegrationCode.GetHashCode();
            }
            if (membershipLifeSpan_ != null)
            {
                hash ^= MembershipLifeSpan.GetHashCode();
            }
            if (sizeForDisplay_ != null)
            {
                hash ^= SizeForDisplay.GetHashCode();
            }
            if (SizeRangeForDisplay != 0)
            {
                hash ^= SizeRangeForDisplay.GetHashCode();
            }
            if (sizeForSearch_ != null)
            {
                hash ^= SizeForSearch.GetHashCode();
            }
            if (SizeRangeForSearch != 0)
            {
                hash ^= SizeRangeForSearch.GetHashCode();
            }
            if (Type != 0)
            {
                hash ^= Type.GetHashCode();
            }
            if (ClosingReason != 0)
            {
                hash ^= ClosingReason.GetHashCode();
            }
            if (AccessReason != 0)
            {
                hash ^= AccessReason.GetHashCode();
            }
            if (AccountUserListStatus != 0)
            {
                hash ^= AccountUserListStatus.GetHashCode();
            }
            if (eligibleForSearch_ != null)
            {
                hash ^= EligibleForSearch.GetHashCode();
            }
            if (eligibleForDisplay_ != null)
            {
                hash ^= EligibleForDisplay.GetHashCode();
            }
            if (userListCase_ == UserListOneofCase.CrmBasedUserList)
            {
                hash ^= CrmBasedUserList.GetHashCode();
            }
            if (userListCase_ == UserListOneofCase.SimilarUserList)
            {
                hash ^= SimilarUserList.GetHashCode();
            }
            hash ^= (int)userListCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }