Class KeywordPlanHistoricalMetrics.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<KeywordPlanHistoricalMetrics.Builder>
com.google.ads.googleads.v18.common.KeywordPlanHistoricalMetrics.Builder
All Implemented Interfaces:
KeywordPlanHistoricalMetricsOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, 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, and so on.
 Refer to https://support.google.com/google-ads/answer/3022575 for more
 details.
 
Protobuf type google.ads.googleads.v18.common.KeywordPlanHistoricalMetrics
  • Method Details

    • 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>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear 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

      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
    • clone

      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<KeywordPlanHistoricalMetrics.Builder>
    • setField

      public KeywordPlanHistoricalMetrics.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<KeywordPlanHistoricalMetrics.Builder>
    • clearField

      public KeywordPlanHistoricalMetrics.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<KeywordPlanHistoricalMetrics.Builder>
    • clearOneof

      public KeywordPlanHistoricalMetrics.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<KeywordPlanHistoricalMetrics.Builder>
    • setRepeatedField

      public KeywordPlanHistoricalMetrics.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, 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, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<KeywordPlanHistoricalMetrics.Builder>
    • mergeFrom

      public KeywordPlanHistoricalMetrics.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<KeywordPlanHistoricalMetrics.Builder>
    • mergeFrom

    • 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 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:
      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.
    • getMonthlySearchVolumesList

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

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

      public MonthlySearchVolume getMonthlySearchVolumes(int index)
       Approximate number of searches on this query for the past twelve months.
       
      repeated .google.ads.googleads.v18.common.MonthlySearchVolume monthly_search_volumes = 6;
      Specified by:
      getMonthlySearchVolumes 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.v18.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.v18.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.v18.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.v18.common.MonthlySearchVolume monthly_search_volumes = 6;
    • addMonthlySearchVolumes

      public KeywordPlanHistoricalMetrics.Builder addMonthlySearchVolumes(MonthlySearchVolume.Builder builderForValue)
       Approximate number of searches on this query for the past twelve months.
       
      repeated .google.ads.googleads.v18.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.v18.common.MonthlySearchVolume monthly_search_volumes = 6;
    • addAllMonthlySearchVolumes

      public KeywordPlanHistoricalMetrics.Builder addAllMonthlySearchVolumes(Iterable<? extends MonthlySearchVolume> values)
       Approximate number of searches on this query for the past twelve months.
       
      repeated .google.ads.googleads.v18.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.v18.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.v18.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.v18.common.MonthlySearchVolume monthly_search_volumes = 6;
    • getMonthlySearchVolumesOrBuilder

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

      public List<? extends MonthlySearchVolumeOrBuilder> getMonthlySearchVolumesOrBuilderList()
       Approximate number of searches on this query for the past twelve months.
       
      repeated .google.ads.googleads.v18.common.MonthlySearchVolume monthly_search_volumes = 6;
      Specified by:
      getMonthlySearchVolumesOrBuilderList in interface KeywordPlanHistoricalMetricsOrBuilder
    • addMonthlySearchVolumesBuilder

      public MonthlySearchVolume.Builder addMonthlySearchVolumesBuilder()
       Approximate number of searches on this query for the past twelve months.
       
      repeated .google.ads.googleads.v18.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.v18.common.MonthlySearchVolume monthly_search_volumes = 6;
    • getMonthlySearchVolumesBuilderList

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

      public int getCompetitionValue()
       The competition level for the query.
       
      .google.ads.googleads.v18.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.v18.enums.KeywordPlanCompetitionLevelEnum.KeywordPlanCompetitionLevel competition = 2;
      Parameters:
      value - The enum numeric value on the wire for competition to set.
      Returns:
      This builder for chaining.
    • getCompetition

       The competition level for the query.
       
      .google.ads.googleads.v18.enums.KeywordPlanCompetitionLevelEnum.KeywordPlanCompetitionLevel competition = 2;
      Specified by:
      getCompetition in interface KeywordPlanHistoricalMetricsOrBuilder
      Returns:
      The competition.
    • setCompetition

       The competition level for the query.
       
      .google.ads.googleads.v18.enums.KeywordPlanCompetitionLevelEnum.KeywordPlanCompetitionLevel competition = 2;
      Parameters:
      value - The competition to set.
      Returns:
      This builder for chaining.
    • clearCompetition

      public KeywordPlanHistoricalMetrics.Builder clearCompetition()
       The competition level for the query.
       
      .google.ads.googleads.v18.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.
    • hasAverageCpcMicros

      public boolean hasAverageCpcMicros()
       Average Cost Per Click in micros for the keyword.
       
      optional int64 average_cpc_micros = 11;
      Specified by:
      hasAverageCpcMicros in interface KeywordPlanHistoricalMetricsOrBuilder
      Returns:
      Whether the averageCpcMicros field is set.
    • getAverageCpcMicros

      public long getAverageCpcMicros()
       Average Cost Per Click in micros for the keyword.
       
      optional int64 average_cpc_micros = 11;
      Specified by:
      getAverageCpcMicros in interface KeywordPlanHistoricalMetricsOrBuilder
      Returns:
      The averageCpcMicros.
    • setAverageCpcMicros

      public KeywordPlanHistoricalMetrics.Builder setAverageCpcMicros(long value)
       Average Cost Per Click in micros for the keyword.
       
      optional int64 average_cpc_micros = 11;
      Parameters:
      value - The averageCpcMicros to set.
      Returns:
      This builder for chaining.
    • clearAverageCpcMicros

      public KeywordPlanHistoricalMetrics.Builder clearAverageCpcMicros()
       Average Cost Per Click in micros for the keyword.
       
      optional int64 average_cpc_micros = 11;
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final KeywordPlanHistoricalMetrics.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<KeywordPlanHistoricalMetrics.Builder>
    • mergeUnknownFields

      public final KeywordPlanHistoricalMetrics.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<KeywordPlanHistoricalMetrics.Builder>