public override int GetHashCode()
        {
            int hash = 1;

            if (ResourceName.Length != 0)
            {
                hash ^= ResourceName.GetHashCode();
            }
            if (adGroup_ != null)
            {
                hash ^= AdGroup.GetHashCode();
            }
            if (criterionId_ != null)
            {
                hash ^= CriterionId.GetHashCode();
            }
            if (bidModifier_ != null)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseNullableDoubleEqualityComparer.GetHashCode(BidModifier);
            }
            if (baseAdGroup_ != null)
            {
                hash ^= BaseAdGroup.GetHashCode();
            }
            if (BidModifierSource != 0)
            {
                hash ^= BidModifierSource.GetHashCode();
            }
            if (criterionCase_ == CriterionOneofCase.HotelDateSelectionType)
            {
                hash ^= HotelDateSelectionType.GetHashCode();
            }
            if (criterionCase_ == CriterionOneofCase.HotelAdvanceBookingWindow)
            {
                hash ^= HotelAdvanceBookingWindow.GetHashCode();
            }
            if (criterionCase_ == CriterionOneofCase.HotelLengthOfStay)
            {
                hash ^= HotelLengthOfStay.GetHashCode();
            }
            if (criterionCase_ == CriterionOneofCase.HotelCheckInDay)
            {
                hash ^= HotelCheckInDay.GetHashCode();
            }
            if (criterionCase_ == CriterionOneofCase.Device)
            {
                hash ^= Device.GetHashCode();
            }
            if (criterionCase_ == CriterionOneofCase.PreferredContent)
            {
                hash ^= PreferredContent.GetHashCode();
            }
            hash ^= (int)criterionCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Exemple #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (ResourceName.Length != 0)
            {
                hash ^= ResourceName.GetHashCode();
            }
            if (HasAdGroup)
            {
                hash ^= AdGroup.GetHashCode();
            }
            if (HasCriterionId)
            {
                hash ^= CriterionId.GetHashCode();
            }
            if (HasBidModifier)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(BidModifier);
            }
            if (HasBaseAdGroup)
            {
                hash ^= BaseAdGroup.GetHashCode();
            }
            if (BidModifierSource != global::Google.Ads.GoogleAds.V7.Enums.BidModifierSourceEnum.Types.BidModifierSource.Unspecified)
            {
                hash ^= BidModifierSource.GetHashCode();
            }
            if (criterionCase_ == CriterionOneofCase.HotelDateSelectionType)
            {
                hash ^= HotelDateSelectionType.GetHashCode();
            }
            if (criterionCase_ == CriterionOneofCase.HotelAdvanceBookingWindow)
            {
                hash ^= HotelAdvanceBookingWindow.GetHashCode();
            }
            if (criterionCase_ == CriterionOneofCase.HotelLengthOfStay)
            {
                hash ^= HotelLengthOfStay.GetHashCode();
            }
            if (criterionCase_ == CriterionOneofCase.HotelCheckInDay)
            {
                hash ^= HotelCheckInDay.GetHashCode();
            }
            if (criterionCase_ == CriterionOneofCase.Device)
            {
                hash ^= Device.GetHashCode();
            }
            if (criterionCase_ == CriterionOneofCase.PreferredContent)
            {
                hash ^= PreferredContent.GetHashCode();
            }
            if (criterionCase_ == CriterionOneofCase.HotelCheckInDateRange)
            {
                hash ^= HotelCheckInDateRange.GetHashCode();
            }
            hash ^= (int)criterionCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }