Class KeywordPlanHistoricalMetrics.Builder

  • All Implemented Interfaces:
    KeywordPlanHistoricalMetricsOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.lang.Cloneable
    Enclosing class:
    KeywordPlanHistoricalMetrics

    public static final class KeywordPlanHistoricalMetrics.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<KeywordPlanHistoricalMetrics.Builder>
    implements KeywordPlanHistoricalMetricsOrBuilder
     Historical metrics specific to the targeting options selected.
     Targeting options include geographies, network, etc.
     Refer to https://support.google.com/google-ads/answer/3022575 for more
     details.
     
    Protobuf type google.ads.googleads.v10.common.KeywordPlanHistoricalMetrics
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<KeywordPlanHistoricalMetrics.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<KeywordPlanHistoricalMetrics.Builder>
      • getDefaultInstanceForType

        public KeywordPlanHistoricalMetrics getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public KeywordPlanHistoricalMetrics build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public KeywordPlanHistoricalMetrics buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • setRepeatedField

        public KeywordPlanHistoricalMetrics.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                                     int index,
                                                                     java.lang.Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<KeywordPlanHistoricalMetrics.Builder>
      • addRepeatedField

        public KeywordPlanHistoricalMetrics.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                                     java.lang.Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<KeywordPlanHistoricalMetrics.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<KeywordPlanHistoricalMetrics.Builder>
      • mergeFrom

        public KeywordPlanHistoricalMetrics.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                       throws java.io.IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<KeywordPlanHistoricalMetrics.Builder>
        Throws:
        java.io.IOException
      • hasAvgMonthlySearches

        public boolean hasAvgMonthlySearches()
         Approximate number of monthly searches on this query averaged
         for the past 12 months.
         
        optional int64 avg_monthly_searches = 7;
        Specified by:
        hasAvgMonthlySearches in interface KeywordPlanHistoricalMetricsOrBuilder
        Returns:
        Whether the avgMonthlySearches field is set.
      • getAvgMonthlySearches

        public long getAvgMonthlySearches()
         Approximate number of monthly searches on this query averaged
         for the past 12 months.
         
        optional int64 avg_monthly_searches = 7;
        Specified by:
        getAvgMonthlySearches in interface KeywordPlanHistoricalMetricsOrBuilder
        Returns:
        The avgMonthlySearches.
      • setAvgMonthlySearches

        public KeywordPlanHistoricalMetrics.Builder setAvgMonthlySearches​(long value)
         Approximate number of monthly searches on this query averaged
         for the past 12 months.
         
        optional int64 avg_monthly_searches = 7;
        Parameters:
        value - The avgMonthlySearches to set.
        Returns:
        This builder for chaining.
      • clearAvgMonthlySearches

        public KeywordPlanHistoricalMetrics.Builder clearAvgMonthlySearches()
         Approximate number of monthly searches on this query averaged
         for the past 12 months.
         
        optional int64 avg_monthly_searches = 7;
        Returns:
        This builder for chaining.
      • getMonthlySearchVolumesCount

        public int getMonthlySearchVolumesCount()
         Approximate number of searches on this query for the past twelve months.
         
        repeated .google.ads.googleads.v10.common.MonthlySearchVolume monthly_search_volumes = 6;
        Specified by:
        getMonthlySearchVolumesCount in interface KeywordPlanHistoricalMetricsOrBuilder
      • setMonthlySearchVolumes

        public KeywordPlanHistoricalMetrics.Builder setMonthlySearchVolumes​(int index,
                                                                            MonthlySearchVolume value)
         Approximate number of searches on this query for the past twelve months.
         
        repeated .google.ads.googleads.v10.common.MonthlySearchVolume monthly_search_volumes = 6;
      • setMonthlySearchVolumes

        public KeywordPlanHistoricalMetrics.Builder setMonthlySearchVolumes​(int index,
                                                                            MonthlySearchVolume.Builder builderForValue)
         Approximate number of searches on this query for the past twelve months.
         
        repeated .google.ads.googleads.v10.common.MonthlySearchVolume monthly_search_volumes = 6;
      • addMonthlySearchVolumes

        public KeywordPlanHistoricalMetrics.Builder addMonthlySearchVolumes​(MonthlySearchVolume value)
         Approximate number of searches on this query for the past twelve months.
         
        repeated .google.ads.googleads.v10.common.MonthlySearchVolume monthly_search_volumes = 6;
      • addMonthlySearchVolumes

        public KeywordPlanHistoricalMetrics.Builder addMonthlySearchVolumes​(int index,
                                                                            MonthlySearchVolume value)
         Approximate number of searches on this query for the past twelve months.
         
        repeated .google.ads.googleads.v10.common.MonthlySearchVolume monthly_search_volumes = 6;
      • addMonthlySearchVolumes

        public KeywordPlanHistoricalMetrics.Builder addMonthlySearchVolumes​(int index,
                                                                            MonthlySearchVolume.Builder builderForValue)
         Approximate number of searches on this query for the past twelve months.
         
        repeated .google.ads.googleads.v10.common.MonthlySearchVolume monthly_search_volumes = 6;
      • addAllMonthlySearchVolumes

        public KeywordPlanHistoricalMetrics.Builder addAllMonthlySearchVolumes​(java.lang.Iterable<? extends MonthlySearchVolume> values)
         Approximate number of searches on this query for the past twelve months.
         
        repeated .google.ads.googleads.v10.common.MonthlySearchVolume monthly_search_volumes = 6;
      • clearMonthlySearchVolumes

        public KeywordPlanHistoricalMetrics.Builder clearMonthlySearchVolumes()
         Approximate number of searches on this query for the past twelve months.
         
        repeated .google.ads.googleads.v10.common.MonthlySearchVolume monthly_search_volumes = 6;
      • removeMonthlySearchVolumes

        public KeywordPlanHistoricalMetrics.Builder removeMonthlySearchVolumes​(int index)
         Approximate number of searches on this query for the past twelve months.
         
        repeated .google.ads.googleads.v10.common.MonthlySearchVolume monthly_search_volumes = 6;
      • getMonthlySearchVolumesBuilder

        public MonthlySearchVolume.Builder getMonthlySearchVolumesBuilder​(int index)
         Approximate number of searches on this query for the past twelve months.
         
        repeated .google.ads.googleads.v10.common.MonthlySearchVolume monthly_search_volumes = 6;
      • addMonthlySearchVolumesBuilder

        public MonthlySearchVolume.Builder addMonthlySearchVolumesBuilder()
         Approximate number of searches on this query for the past twelve months.
         
        repeated .google.ads.googleads.v10.common.MonthlySearchVolume monthly_search_volumes = 6;
      • addMonthlySearchVolumesBuilder

        public MonthlySearchVolume.Builder addMonthlySearchVolumesBuilder​(int index)
         Approximate number of searches on this query for the past twelve months.
         
        repeated .google.ads.googleads.v10.common.MonthlySearchVolume monthly_search_volumes = 6;
      • getMonthlySearchVolumesBuilderList

        public java.util.List<MonthlySearchVolume.Builder> getMonthlySearchVolumesBuilderList()
         Approximate number of searches on this query for the past twelve months.
         
        repeated .google.ads.googleads.v10.common.MonthlySearchVolume monthly_search_volumes = 6;
      • getCompetitionValue

        public int getCompetitionValue()
         The competition level for the query.
         
        .google.ads.googleads.v10.enums.KeywordPlanCompetitionLevelEnum.KeywordPlanCompetitionLevel competition = 2;
        Specified by:
        getCompetitionValue in interface KeywordPlanHistoricalMetricsOrBuilder
        Returns:
        The enum numeric value on the wire for competition.
      • setCompetitionValue

        public KeywordPlanHistoricalMetrics.Builder setCompetitionValue​(int value)
         The competition level for the query.
         
        .google.ads.googleads.v10.enums.KeywordPlanCompetitionLevelEnum.KeywordPlanCompetitionLevel competition = 2;
        Parameters:
        value - The enum numeric value on the wire for competition to set.
        Returns:
        This builder for chaining.
      • clearCompetition

        public KeywordPlanHistoricalMetrics.Builder clearCompetition()
         The competition level for the query.
         
        .google.ads.googleads.v10.enums.KeywordPlanCompetitionLevelEnum.KeywordPlanCompetitionLevel competition = 2;
        Returns:
        This builder for chaining.
      • hasCompetitionIndex

        public boolean hasCompetitionIndex()
         The competition index for the query in the range [0, 100].
         Shows how competitive ad placement is for a keyword.
         The level of competition from 0-100 is determined by the number of ad slots
         filled divided by the total number of ad slots available. If not enough
         data is available, null is returned.
         
        optional int64 competition_index = 8;
        Specified by:
        hasCompetitionIndex in interface KeywordPlanHistoricalMetricsOrBuilder
        Returns:
        Whether the competitionIndex field is set.
      • getCompetitionIndex

        public long getCompetitionIndex()
         The competition index for the query in the range [0, 100].
         Shows how competitive ad placement is for a keyword.
         The level of competition from 0-100 is determined by the number of ad slots
         filled divided by the total number of ad slots available. If not enough
         data is available, null is returned.
         
        optional int64 competition_index = 8;
        Specified by:
        getCompetitionIndex in interface KeywordPlanHistoricalMetricsOrBuilder
        Returns:
        The competitionIndex.
      • setCompetitionIndex

        public KeywordPlanHistoricalMetrics.Builder setCompetitionIndex​(long value)
         The competition index for the query in the range [0, 100].
         Shows how competitive ad placement is for a keyword.
         The level of competition from 0-100 is determined by the number of ad slots
         filled divided by the total number of ad slots available. If not enough
         data is available, null is returned.
         
        optional int64 competition_index = 8;
        Parameters:
        value - The competitionIndex to set.
        Returns:
        This builder for chaining.
      • clearCompetitionIndex

        public KeywordPlanHistoricalMetrics.Builder clearCompetitionIndex()
         The competition index for the query in the range [0, 100].
         Shows how competitive ad placement is for a keyword.
         The level of competition from 0-100 is determined by the number of ad slots
         filled divided by the total number of ad slots available. If not enough
         data is available, null is returned.
         
        optional int64 competition_index = 8;
        Returns:
        This builder for chaining.
      • hasLowTopOfPageBidMicros

        public boolean hasLowTopOfPageBidMicros()
         Top of page bid low range (20th percentile) in micros for the keyword.
         
        optional int64 low_top_of_page_bid_micros = 9;
        Specified by:
        hasLowTopOfPageBidMicros in interface KeywordPlanHistoricalMetricsOrBuilder
        Returns:
        Whether the lowTopOfPageBidMicros field is set.
      • getLowTopOfPageBidMicros

        public long getLowTopOfPageBidMicros()
         Top of page bid low range (20th percentile) in micros for the keyword.
         
        optional int64 low_top_of_page_bid_micros = 9;
        Specified by:
        getLowTopOfPageBidMicros in interface KeywordPlanHistoricalMetricsOrBuilder
        Returns:
        The lowTopOfPageBidMicros.
      • setLowTopOfPageBidMicros

        public KeywordPlanHistoricalMetrics.Builder setLowTopOfPageBidMicros​(long value)
         Top of page bid low range (20th percentile) in micros for the keyword.
         
        optional int64 low_top_of_page_bid_micros = 9;
        Parameters:
        value - The lowTopOfPageBidMicros to set.
        Returns:
        This builder for chaining.
      • clearLowTopOfPageBidMicros

        public KeywordPlanHistoricalMetrics.Builder clearLowTopOfPageBidMicros()
         Top of page bid low range (20th percentile) in micros for the keyword.
         
        optional int64 low_top_of_page_bid_micros = 9;
        Returns:
        This builder for chaining.
      • hasHighTopOfPageBidMicros

        public boolean hasHighTopOfPageBidMicros()
         Top of page bid high range (80th percentile) in micros for the keyword.
         
        optional int64 high_top_of_page_bid_micros = 10;
        Specified by:
        hasHighTopOfPageBidMicros in interface KeywordPlanHistoricalMetricsOrBuilder
        Returns:
        Whether the highTopOfPageBidMicros field is set.
      • getHighTopOfPageBidMicros

        public long getHighTopOfPageBidMicros()
         Top of page bid high range (80th percentile) in micros for the keyword.
         
        optional int64 high_top_of_page_bid_micros = 10;
        Specified by:
        getHighTopOfPageBidMicros in interface KeywordPlanHistoricalMetricsOrBuilder
        Returns:
        The highTopOfPageBidMicros.
      • setHighTopOfPageBidMicros

        public KeywordPlanHistoricalMetrics.Builder setHighTopOfPageBidMicros​(long value)
         Top of page bid high range (80th percentile) in micros for the keyword.
         
        optional int64 high_top_of_page_bid_micros = 10;
        Parameters:
        value - The highTopOfPageBidMicros to set.
        Returns:
        This builder for chaining.
      • clearHighTopOfPageBidMicros

        public KeywordPlanHistoricalMetrics.Builder clearHighTopOfPageBidMicros()
         Top of page bid high range (80th percentile) in micros for the keyword.
         
        optional int64 high_top_of_page_bid_micros = 10;
        Returns:
        This builder for chaining.