Class Forecast.Builder

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

    public static final class Forecast.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Forecast.Builder>
    implements ForecastOrBuilder
     Forecasted traffic metrics for the planned products and targeting.
     
    Protobuf type google.ads.googleads.v10.services.Forecast
    • 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<Forecast.Builder>
      • clear

        public Forecast.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<Forecast.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<Forecast.Builder>
      • getDefaultInstanceForType

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

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

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

        public Forecast.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<Forecast.Builder>
      • setField

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

        public Forecast.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<Forecast.Builder>
      • clearOneof

        public Forecast.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<Forecast.Builder>
      • setRepeatedField

        public Forecast.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<Forecast.Builder>
      • addRepeatedField

        public Forecast.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<Forecast.Builder>
      • mergeFrom

        public Forecast.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<Forecast.Builder>
      • isInitialized

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

        public Forecast.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<Forecast.Builder>
        Throws:
        java.io.IOException
      • hasOnTargetReach

        public boolean hasOnTargetReach()
         Number of unique people reached at least
         GenerateReachForecastRequest.min_effective_frequency or
         GenerateReachForecastRequest.effective_frequency_limit times that exactly
         matches the Targeting.
         Note that a minimum number of unique people must be reached in order for
         data to be reported. If the minimum number is not met, the on_target_reach
         value will be rounded to 0.
         
        optional int64 on_target_reach = 5;
        Specified by:
        hasOnTargetReach in interface ForecastOrBuilder
        Returns:
        Whether the onTargetReach field is set.
      • getOnTargetReach

        public long getOnTargetReach()
         Number of unique people reached at least
         GenerateReachForecastRequest.min_effective_frequency or
         GenerateReachForecastRequest.effective_frequency_limit times that exactly
         matches the Targeting.
         Note that a minimum number of unique people must be reached in order for
         data to be reported. If the minimum number is not met, the on_target_reach
         value will be rounded to 0.
         
        optional int64 on_target_reach = 5;
        Specified by:
        getOnTargetReach in interface ForecastOrBuilder
        Returns:
        The onTargetReach.
      • setOnTargetReach

        public Forecast.Builder setOnTargetReach​(long value)
         Number of unique people reached at least
         GenerateReachForecastRequest.min_effective_frequency or
         GenerateReachForecastRequest.effective_frequency_limit times that exactly
         matches the Targeting.
         Note that a minimum number of unique people must be reached in order for
         data to be reported. If the minimum number is not met, the on_target_reach
         value will be rounded to 0.
         
        optional int64 on_target_reach = 5;
        Parameters:
        value - The onTargetReach to set.
        Returns:
        This builder for chaining.
      • clearOnTargetReach

        public Forecast.Builder clearOnTargetReach()
         Number of unique people reached at least
         GenerateReachForecastRequest.min_effective_frequency or
         GenerateReachForecastRequest.effective_frequency_limit times that exactly
         matches the Targeting.
         Note that a minimum number of unique people must be reached in order for
         data to be reported. If the minimum number is not met, the on_target_reach
         value will be rounded to 0.
         
        optional int64 on_target_reach = 5;
        Returns:
        This builder for chaining.
      • hasTotalReach

        public boolean hasTotalReach()
         Total number of unique people reached at least
         GenerateReachForecastRequest.min_effective_frequency or
         GenerateReachForecastRequest.effective_frequency_limit times. This includes
         people that may fall outside the specified Targeting.
         Note that a minimum number of unique people must be reached in order for
         data to be reported. If the minimum number is not met, the total_reach
         value will be rounded to 0.
         
        optional int64 total_reach = 6;
        Specified by:
        hasTotalReach in interface ForecastOrBuilder
        Returns:
        Whether the totalReach field is set.
      • getTotalReach

        public long getTotalReach()
         Total number of unique people reached at least
         GenerateReachForecastRequest.min_effective_frequency or
         GenerateReachForecastRequest.effective_frequency_limit times. This includes
         people that may fall outside the specified Targeting.
         Note that a minimum number of unique people must be reached in order for
         data to be reported. If the minimum number is not met, the total_reach
         value will be rounded to 0.
         
        optional int64 total_reach = 6;
        Specified by:
        getTotalReach in interface ForecastOrBuilder
        Returns:
        The totalReach.
      • setTotalReach

        public Forecast.Builder setTotalReach​(long value)
         Total number of unique people reached at least
         GenerateReachForecastRequest.min_effective_frequency or
         GenerateReachForecastRequest.effective_frequency_limit times. This includes
         people that may fall outside the specified Targeting.
         Note that a minimum number of unique people must be reached in order for
         data to be reported. If the minimum number is not met, the total_reach
         value will be rounded to 0.
         
        optional int64 total_reach = 6;
        Parameters:
        value - The totalReach to set.
        Returns:
        This builder for chaining.
      • clearTotalReach

        public Forecast.Builder clearTotalReach()
         Total number of unique people reached at least
         GenerateReachForecastRequest.min_effective_frequency or
         GenerateReachForecastRequest.effective_frequency_limit times. This includes
         people that may fall outside the specified Targeting.
         Note that a minimum number of unique people must be reached in order for
         data to be reported. If the minimum number is not met, the total_reach
         value will be rounded to 0.
         
        optional int64 total_reach = 6;
        Returns:
        This builder for chaining.
      • hasOnTargetImpressions

        public boolean hasOnTargetImpressions()
         Number of ad impressions that exactly matches the Targeting.
         
        optional int64 on_target_impressions = 7;
        Specified by:
        hasOnTargetImpressions in interface ForecastOrBuilder
        Returns:
        Whether the onTargetImpressions field is set.
      • getOnTargetImpressions

        public long getOnTargetImpressions()
         Number of ad impressions that exactly matches the Targeting.
         
        optional int64 on_target_impressions = 7;
        Specified by:
        getOnTargetImpressions in interface ForecastOrBuilder
        Returns:
        The onTargetImpressions.
      • setOnTargetImpressions

        public Forecast.Builder setOnTargetImpressions​(long value)
         Number of ad impressions that exactly matches the Targeting.
         
        optional int64 on_target_impressions = 7;
        Parameters:
        value - The onTargetImpressions to set.
        Returns:
        This builder for chaining.
      • clearOnTargetImpressions

        public Forecast.Builder clearOnTargetImpressions()
         Number of ad impressions that exactly matches the Targeting.
         
        optional int64 on_target_impressions = 7;
        Returns:
        This builder for chaining.
      • hasTotalImpressions

        public boolean hasTotalImpressions()
         Total number of ad impressions. This includes impressions that may fall
         outside the specified Targeting, due to insufficient information on
         signed-in users.
         
        optional int64 total_impressions = 8;
        Specified by:
        hasTotalImpressions in interface ForecastOrBuilder
        Returns:
        Whether the totalImpressions field is set.
      • getTotalImpressions

        public long getTotalImpressions()
         Total number of ad impressions. This includes impressions that may fall
         outside the specified Targeting, due to insufficient information on
         signed-in users.
         
        optional int64 total_impressions = 8;
        Specified by:
        getTotalImpressions in interface ForecastOrBuilder
        Returns:
        The totalImpressions.
      • setTotalImpressions

        public Forecast.Builder setTotalImpressions​(long value)
         Total number of ad impressions. This includes impressions that may fall
         outside the specified Targeting, due to insufficient information on
         signed-in users.
         
        optional int64 total_impressions = 8;
        Parameters:
        value - The totalImpressions to set.
        Returns:
        This builder for chaining.
      • clearTotalImpressions

        public Forecast.Builder clearTotalImpressions()
         Total number of ad impressions. This includes impressions that may fall
         outside the specified Targeting, due to insufficient information on
         signed-in users.
         
        optional int64 total_impressions = 8;
        Returns:
        This builder for chaining.
      • hasViewableImpressions

        public boolean hasViewableImpressions()
         Number of times the ad's impressions were considered viewable.
         See https://support.google.com/google-ads/answer/7029393 for
         more information about what makes an ad viewable and how
         viewability is measured.
         
        optional int64 viewable_impressions = 9;
        Specified by:
        hasViewableImpressions in interface ForecastOrBuilder
        Returns:
        Whether the viewableImpressions field is set.
      • getViewableImpressions

        public long getViewableImpressions()
         Number of times the ad's impressions were considered viewable.
         See https://support.google.com/google-ads/answer/7029393 for
         more information about what makes an ad viewable and how
         viewability is measured.
         
        optional int64 viewable_impressions = 9;
        Specified by:
        getViewableImpressions in interface ForecastOrBuilder
        Returns:
        The viewableImpressions.
      • setViewableImpressions

        public Forecast.Builder setViewableImpressions​(long value)
         Number of times the ad's impressions were considered viewable.
         See https://support.google.com/google-ads/answer/7029393 for
         more information about what makes an ad viewable and how
         viewability is measured.
         
        optional int64 viewable_impressions = 9;
        Parameters:
        value - The viewableImpressions to set.
        Returns:
        This builder for chaining.
      • clearViewableImpressions

        public Forecast.Builder clearViewableImpressions()
         Number of times the ad's impressions were considered viewable.
         See https://support.google.com/google-ads/answer/7029393 for
         more information about what makes an ad viewable and how
         viewability is measured.
         
        optional int64 viewable_impressions = 9;
        Returns:
        This builder for chaining.
      • getEffectiveFrequencyBreakdownsList

        public java.util.List<EffectiveFrequencyBreakdown> getEffectiveFrequencyBreakdownsList()
         A list of effective frequency forecasts. The list is ordered starting with
         1+ and ending with the value set in
         GenerateReachForecastRequest.effective_frequency_limit. If no
         effective_frequency_limit was set, this list will be empty.
         
        repeated .google.ads.googleads.v10.services.EffectiveFrequencyBreakdown effective_frequency_breakdowns = 10;
        Specified by:
        getEffectiveFrequencyBreakdownsList in interface ForecastOrBuilder
      • getEffectiveFrequencyBreakdownsCount

        public int getEffectiveFrequencyBreakdownsCount()
         A list of effective frequency forecasts. The list is ordered starting with
         1+ and ending with the value set in
         GenerateReachForecastRequest.effective_frequency_limit. If no
         effective_frequency_limit was set, this list will be empty.
         
        repeated .google.ads.googleads.v10.services.EffectiveFrequencyBreakdown effective_frequency_breakdowns = 10;
        Specified by:
        getEffectiveFrequencyBreakdownsCount in interface ForecastOrBuilder
      • getEffectiveFrequencyBreakdowns

        public EffectiveFrequencyBreakdown getEffectiveFrequencyBreakdowns​(int index)
         A list of effective frequency forecasts. The list is ordered starting with
         1+ and ending with the value set in
         GenerateReachForecastRequest.effective_frequency_limit. If no
         effective_frequency_limit was set, this list will be empty.
         
        repeated .google.ads.googleads.v10.services.EffectiveFrequencyBreakdown effective_frequency_breakdowns = 10;
        Specified by:
        getEffectiveFrequencyBreakdowns in interface ForecastOrBuilder
      • setEffectiveFrequencyBreakdowns

        public Forecast.Builder setEffectiveFrequencyBreakdowns​(int index,
                                                                EffectiveFrequencyBreakdown value)
         A list of effective frequency forecasts. The list is ordered starting with
         1+ and ending with the value set in
         GenerateReachForecastRequest.effective_frequency_limit. If no
         effective_frequency_limit was set, this list will be empty.
         
        repeated .google.ads.googleads.v10.services.EffectiveFrequencyBreakdown effective_frequency_breakdowns = 10;
      • setEffectiveFrequencyBreakdowns

        public Forecast.Builder setEffectiveFrequencyBreakdowns​(int index,
                                                                EffectiveFrequencyBreakdown.Builder builderForValue)
         A list of effective frequency forecasts. The list is ordered starting with
         1+ and ending with the value set in
         GenerateReachForecastRequest.effective_frequency_limit. If no
         effective_frequency_limit was set, this list will be empty.
         
        repeated .google.ads.googleads.v10.services.EffectiveFrequencyBreakdown effective_frequency_breakdowns = 10;
      • addEffectiveFrequencyBreakdowns

        public Forecast.Builder addEffectiveFrequencyBreakdowns​(EffectiveFrequencyBreakdown value)
         A list of effective frequency forecasts. The list is ordered starting with
         1+ and ending with the value set in
         GenerateReachForecastRequest.effective_frequency_limit. If no
         effective_frequency_limit was set, this list will be empty.
         
        repeated .google.ads.googleads.v10.services.EffectiveFrequencyBreakdown effective_frequency_breakdowns = 10;
      • addEffectiveFrequencyBreakdowns

        public Forecast.Builder addEffectiveFrequencyBreakdowns​(int index,
                                                                EffectiveFrequencyBreakdown value)
         A list of effective frequency forecasts. The list is ordered starting with
         1+ and ending with the value set in
         GenerateReachForecastRequest.effective_frequency_limit. If no
         effective_frequency_limit was set, this list will be empty.
         
        repeated .google.ads.googleads.v10.services.EffectiveFrequencyBreakdown effective_frequency_breakdowns = 10;
      • addEffectiveFrequencyBreakdowns

        public Forecast.Builder addEffectiveFrequencyBreakdowns​(EffectiveFrequencyBreakdown.Builder builderForValue)
         A list of effective frequency forecasts. The list is ordered starting with
         1+ and ending with the value set in
         GenerateReachForecastRequest.effective_frequency_limit. If no
         effective_frequency_limit was set, this list will be empty.
         
        repeated .google.ads.googleads.v10.services.EffectiveFrequencyBreakdown effective_frequency_breakdowns = 10;
      • addEffectiveFrequencyBreakdowns

        public Forecast.Builder addEffectiveFrequencyBreakdowns​(int index,
                                                                EffectiveFrequencyBreakdown.Builder builderForValue)
         A list of effective frequency forecasts. The list is ordered starting with
         1+ and ending with the value set in
         GenerateReachForecastRequest.effective_frequency_limit. If no
         effective_frequency_limit was set, this list will be empty.
         
        repeated .google.ads.googleads.v10.services.EffectiveFrequencyBreakdown effective_frequency_breakdowns = 10;
      • addAllEffectiveFrequencyBreakdowns

        public Forecast.Builder addAllEffectiveFrequencyBreakdowns​(java.lang.Iterable<? extends EffectiveFrequencyBreakdown> values)
         A list of effective frequency forecasts. The list is ordered starting with
         1+ and ending with the value set in
         GenerateReachForecastRequest.effective_frequency_limit. If no
         effective_frequency_limit was set, this list will be empty.
         
        repeated .google.ads.googleads.v10.services.EffectiveFrequencyBreakdown effective_frequency_breakdowns = 10;
      • clearEffectiveFrequencyBreakdowns

        public Forecast.Builder clearEffectiveFrequencyBreakdowns()
         A list of effective frequency forecasts. The list is ordered starting with
         1+ and ending with the value set in
         GenerateReachForecastRequest.effective_frequency_limit. If no
         effective_frequency_limit was set, this list will be empty.
         
        repeated .google.ads.googleads.v10.services.EffectiveFrequencyBreakdown effective_frequency_breakdowns = 10;
      • removeEffectiveFrequencyBreakdowns

        public Forecast.Builder removeEffectiveFrequencyBreakdowns​(int index)
         A list of effective frequency forecasts. The list is ordered starting with
         1+ and ending with the value set in
         GenerateReachForecastRequest.effective_frequency_limit. If no
         effective_frequency_limit was set, this list will be empty.
         
        repeated .google.ads.googleads.v10.services.EffectiveFrequencyBreakdown effective_frequency_breakdowns = 10;
      • getEffectiveFrequencyBreakdownsBuilder

        public EffectiveFrequencyBreakdown.Builder getEffectiveFrequencyBreakdownsBuilder​(int index)
         A list of effective frequency forecasts. The list is ordered starting with
         1+ and ending with the value set in
         GenerateReachForecastRequest.effective_frequency_limit. If no
         effective_frequency_limit was set, this list will be empty.
         
        repeated .google.ads.googleads.v10.services.EffectiveFrequencyBreakdown effective_frequency_breakdowns = 10;
      • getEffectiveFrequencyBreakdownsOrBuilder

        public EffectiveFrequencyBreakdownOrBuilder getEffectiveFrequencyBreakdownsOrBuilder​(int index)
         A list of effective frequency forecasts. The list is ordered starting with
         1+ and ending with the value set in
         GenerateReachForecastRequest.effective_frequency_limit. If no
         effective_frequency_limit was set, this list will be empty.
         
        repeated .google.ads.googleads.v10.services.EffectiveFrequencyBreakdown effective_frequency_breakdowns = 10;
        Specified by:
        getEffectiveFrequencyBreakdownsOrBuilder in interface ForecastOrBuilder
      • getEffectiveFrequencyBreakdownsOrBuilderList

        public java.util.List<? extends EffectiveFrequencyBreakdownOrBuilder> getEffectiveFrequencyBreakdownsOrBuilderList()
         A list of effective frequency forecasts. The list is ordered starting with
         1+ and ending with the value set in
         GenerateReachForecastRequest.effective_frequency_limit. If no
         effective_frequency_limit was set, this list will be empty.
         
        repeated .google.ads.googleads.v10.services.EffectiveFrequencyBreakdown effective_frequency_breakdowns = 10;
        Specified by:
        getEffectiveFrequencyBreakdownsOrBuilderList in interface ForecastOrBuilder
      • addEffectiveFrequencyBreakdownsBuilder

        public EffectiveFrequencyBreakdown.Builder addEffectiveFrequencyBreakdownsBuilder()
         A list of effective frequency forecasts. The list is ordered starting with
         1+ and ending with the value set in
         GenerateReachForecastRequest.effective_frequency_limit. If no
         effective_frequency_limit was set, this list will be empty.
         
        repeated .google.ads.googleads.v10.services.EffectiveFrequencyBreakdown effective_frequency_breakdowns = 10;
      • addEffectiveFrequencyBreakdownsBuilder

        public EffectiveFrequencyBreakdown.Builder addEffectiveFrequencyBreakdownsBuilder​(int index)
         A list of effective frequency forecasts. The list is ordered starting with
         1+ and ending with the value set in
         GenerateReachForecastRequest.effective_frequency_limit. If no
         effective_frequency_limit was set, this list will be empty.
         
        repeated .google.ads.googleads.v10.services.EffectiveFrequencyBreakdown effective_frequency_breakdowns = 10;
      • getEffectiveFrequencyBreakdownsBuilderList

        public java.util.List<EffectiveFrequencyBreakdown.Builder> getEffectiveFrequencyBreakdownsBuilderList()
         A list of effective frequency forecasts. The list is ordered starting with
         1+ and ending with the value set in
         GenerateReachForecastRequest.effective_frequency_limit. If no
         effective_frequency_limit was set, this list will be empty.
         
        repeated .google.ads.googleads.v10.services.EffectiveFrequencyBreakdown effective_frequency_breakdowns = 10;
      • setUnknownFields

        public final Forecast.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<Forecast.Builder>
      • mergeUnknownFields

        public final Forecast.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<Forecast.Builder>