Пример #1
0
        public void MergeFrom(FeedItemSet other)
        {
            if (other == null)
            {
                return;
            }
            if (other.ResourceName.Length != 0)
            {
                ResourceName = other.ResourceName;
            }
            if (other.Feed.Length != 0)
            {
                Feed = other.Feed;
            }
            if (other.FeedItemSetId != 0L)
            {
                FeedItemSetId = other.FeedItemSetId;
            }
            if (other.DisplayName.Length != 0)
            {
                DisplayName = other.DisplayName;
            }
            if (other.Status != global::Google.Ads.GoogleAds.V6.Enums.FeedItemSetStatusEnum.Types.FeedItemSetStatus.Unspecified)
            {
                Status = other.Status;
            }
            switch (other.DynamicSetFilterCase)
            {
            case DynamicSetFilterOneofCase.DynamicLocationSetFilter:
                if (DynamicLocationSetFilter == null)
                {
                    DynamicLocationSetFilter = new global::Google.Ads.GoogleAds.V6.Common.DynamicLocationSetFilter();
                }
                DynamicLocationSetFilter.MergeFrom(other.DynamicLocationSetFilter);
                break;

            case DynamicSetFilterOneofCase.DynamicAffiliateLocationSetFilter:
                if (DynamicAffiliateLocationSetFilter == null)
                {
                    DynamicAffiliateLocationSetFilter = new global::Google.Ads.GoogleAds.V6.Common.DynamicAffiliateLocationSetFilter();
                }
                DynamicAffiliateLocationSetFilter.MergeFrom(other.DynamicAffiliateLocationSetFilter);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Пример #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (ResourceName.Length != 0)
            {
                hash ^= ResourceName.GetHashCode();
            }
            if (Feed.Length != 0)
            {
                hash ^= Feed.GetHashCode();
            }
            if (FeedItemSetId != 0L)
            {
                hash ^= FeedItemSetId.GetHashCode();
            }
            if (DisplayName.Length != 0)
            {
                hash ^= DisplayName.GetHashCode();
            }
            if (Status != global::Google.Ads.GoogleAds.V6.Enums.FeedItemSetStatusEnum.Types.FeedItemSetStatus.Unspecified)
            {
                hash ^= Status.GetHashCode();
            }
            if (dynamicSetFilterCase_ == DynamicSetFilterOneofCase.DynamicLocationSetFilter)
            {
                hash ^= DynamicLocationSetFilter.GetHashCode();
            }
            if (dynamicSetFilterCase_ == DynamicSetFilterOneofCase.DynamicAffiliateLocationSetFilter)
            {
                hash ^= DynamicAffiliateLocationSetFilter.GetHashCode();
            }
            hash ^= (int)dynamicSetFilterCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }