Class TargetingSetting.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<TargetingSetting.Builder>
com.google.ads.googleads.v18.common.TargetingSetting.Builder
All Implemented Interfaces:
TargetingSettingOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
TargetingSetting

public static final class TargetingSetting.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<TargetingSetting.Builder> implements TargetingSettingOrBuilder
 Settings for the targeting-related features, at the campaign and ad group
 levels. For more details about the targeting setting, visit
 https://support.google.com/google-ads/answer/7365594
 
Protobuf type google.ads.googleads.v18.common.TargetingSetting
  • 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<TargetingSetting.Builder>
    • clear

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

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

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

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

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

      public TargetingSetting.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<TargetingSetting.Builder>
    • clearField

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

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

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

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

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

      public TargetingSetting.Builder mergeFrom(TargetingSetting other)
    • isInitialized

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

      public TargetingSetting.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<TargetingSetting.Builder>
      Throws:
      IOException
    • getTargetRestrictionsList

      public List<TargetRestriction> getTargetRestrictionsList()
       The per-targeting-dimension setting to restrict the reach of your campaign
       or ad group.
       
      repeated .google.ads.googleads.v18.common.TargetRestriction target_restrictions = 1;
      Specified by:
      getTargetRestrictionsList in interface TargetingSettingOrBuilder
    • getTargetRestrictionsCount

      public int getTargetRestrictionsCount()
       The per-targeting-dimension setting to restrict the reach of your campaign
       or ad group.
       
      repeated .google.ads.googleads.v18.common.TargetRestriction target_restrictions = 1;
      Specified by:
      getTargetRestrictionsCount in interface TargetingSettingOrBuilder
    • getTargetRestrictions

      public TargetRestriction getTargetRestrictions(int index)
       The per-targeting-dimension setting to restrict the reach of your campaign
       or ad group.
       
      repeated .google.ads.googleads.v18.common.TargetRestriction target_restrictions = 1;
      Specified by:
      getTargetRestrictions in interface TargetingSettingOrBuilder
    • setTargetRestrictions

      public TargetingSetting.Builder setTargetRestrictions(int index, TargetRestriction value)
       The per-targeting-dimension setting to restrict the reach of your campaign
       or ad group.
       
      repeated .google.ads.googleads.v18.common.TargetRestriction target_restrictions = 1;
    • setTargetRestrictions

      public TargetingSetting.Builder setTargetRestrictions(int index, TargetRestriction.Builder builderForValue)
       The per-targeting-dimension setting to restrict the reach of your campaign
       or ad group.
       
      repeated .google.ads.googleads.v18.common.TargetRestriction target_restrictions = 1;
    • addTargetRestrictions

      public TargetingSetting.Builder addTargetRestrictions(TargetRestriction value)
       The per-targeting-dimension setting to restrict the reach of your campaign
       or ad group.
       
      repeated .google.ads.googleads.v18.common.TargetRestriction target_restrictions = 1;
    • addTargetRestrictions

      public TargetingSetting.Builder addTargetRestrictions(int index, TargetRestriction value)
       The per-targeting-dimension setting to restrict the reach of your campaign
       or ad group.
       
      repeated .google.ads.googleads.v18.common.TargetRestriction target_restrictions = 1;
    • addTargetRestrictions

      public TargetingSetting.Builder addTargetRestrictions(TargetRestriction.Builder builderForValue)
       The per-targeting-dimension setting to restrict the reach of your campaign
       or ad group.
       
      repeated .google.ads.googleads.v18.common.TargetRestriction target_restrictions = 1;
    • addTargetRestrictions

      public TargetingSetting.Builder addTargetRestrictions(int index, TargetRestriction.Builder builderForValue)
       The per-targeting-dimension setting to restrict the reach of your campaign
       or ad group.
       
      repeated .google.ads.googleads.v18.common.TargetRestriction target_restrictions = 1;
    • addAllTargetRestrictions

      public TargetingSetting.Builder addAllTargetRestrictions(Iterable<? extends TargetRestriction> values)
       The per-targeting-dimension setting to restrict the reach of your campaign
       or ad group.
       
      repeated .google.ads.googleads.v18.common.TargetRestriction target_restrictions = 1;
    • clearTargetRestrictions

      public TargetingSetting.Builder clearTargetRestrictions()
       The per-targeting-dimension setting to restrict the reach of your campaign
       or ad group.
       
      repeated .google.ads.googleads.v18.common.TargetRestriction target_restrictions = 1;
    • removeTargetRestrictions

      public TargetingSetting.Builder removeTargetRestrictions(int index)
       The per-targeting-dimension setting to restrict the reach of your campaign
       or ad group.
       
      repeated .google.ads.googleads.v18.common.TargetRestriction target_restrictions = 1;
    • getTargetRestrictionsBuilder

      public TargetRestriction.Builder getTargetRestrictionsBuilder(int index)
       The per-targeting-dimension setting to restrict the reach of your campaign
       or ad group.
       
      repeated .google.ads.googleads.v18.common.TargetRestriction target_restrictions = 1;
    • getTargetRestrictionsOrBuilder

      public TargetRestrictionOrBuilder getTargetRestrictionsOrBuilder(int index)
       The per-targeting-dimension setting to restrict the reach of your campaign
       or ad group.
       
      repeated .google.ads.googleads.v18.common.TargetRestriction target_restrictions = 1;
      Specified by:
      getTargetRestrictionsOrBuilder in interface TargetingSettingOrBuilder
    • getTargetRestrictionsOrBuilderList

      public List<? extends TargetRestrictionOrBuilder> getTargetRestrictionsOrBuilderList()
       The per-targeting-dimension setting to restrict the reach of your campaign
       or ad group.
       
      repeated .google.ads.googleads.v18.common.TargetRestriction target_restrictions = 1;
      Specified by:
      getTargetRestrictionsOrBuilderList in interface TargetingSettingOrBuilder
    • addTargetRestrictionsBuilder

      public TargetRestriction.Builder addTargetRestrictionsBuilder()
       The per-targeting-dimension setting to restrict the reach of your campaign
       or ad group.
       
      repeated .google.ads.googleads.v18.common.TargetRestriction target_restrictions = 1;
    • addTargetRestrictionsBuilder

      public TargetRestriction.Builder addTargetRestrictionsBuilder(int index)
       The per-targeting-dimension setting to restrict the reach of your campaign
       or ad group.
       
      repeated .google.ads.googleads.v18.common.TargetRestriction target_restrictions = 1;
    • getTargetRestrictionsBuilderList

      public List<TargetRestriction.Builder> getTargetRestrictionsBuilderList()
       The per-targeting-dimension setting to restrict the reach of your campaign
       or ad group.
       
      repeated .google.ads.googleads.v18.common.TargetRestriction target_restrictions = 1;
    • getTargetRestrictionOperationsList

      public List<TargetRestrictionOperation> getTargetRestrictionOperationsList()
       The list of operations changing the target restrictions.
      
       Adding a target restriction with a targeting dimension that already exists
       causes the existing target restriction to be replaced with the new value.
       
      repeated .google.ads.googleads.v18.common.TargetRestrictionOperation target_restriction_operations = 2;
      Specified by:
      getTargetRestrictionOperationsList in interface TargetingSettingOrBuilder
    • getTargetRestrictionOperationsCount

      public int getTargetRestrictionOperationsCount()
       The list of operations changing the target restrictions.
      
       Adding a target restriction with a targeting dimension that already exists
       causes the existing target restriction to be replaced with the new value.
       
      repeated .google.ads.googleads.v18.common.TargetRestrictionOperation target_restriction_operations = 2;
      Specified by:
      getTargetRestrictionOperationsCount in interface TargetingSettingOrBuilder
    • getTargetRestrictionOperations

      public TargetRestrictionOperation getTargetRestrictionOperations(int index)
       The list of operations changing the target restrictions.
      
       Adding a target restriction with a targeting dimension that already exists
       causes the existing target restriction to be replaced with the new value.
       
      repeated .google.ads.googleads.v18.common.TargetRestrictionOperation target_restriction_operations = 2;
      Specified by:
      getTargetRestrictionOperations in interface TargetingSettingOrBuilder
    • setTargetRestrictionOperations

      public TargetingSetting.Builder setTargetRestrictionOperations(int index, TargetRestrictionOperation value)
       The list of operations changing the target restrictions.
      
       Adding a target restriction with a targeting dimension that already exists
       causes the existing target restriction to be replaced with the new value.
       
      repeated .google.ads.googleads.v18.common.TargetRestrictionOperation target_restriction_operations = 2;
    • setTargetRestrictionOperations

      public TargetingSetting.Builder setTargetRestrictionOperations(int index, TargetRestrictionOperation.Builder builderForValue)
       The list of operations changing the target restrictions.
      
       Adding a target restriction with a targeting dimension that already exists
       causes the existing target restriction to be replaced with the new value.
       
      repeated .google.ads.googleads.v18.common.TargetRestrictionOperation target_restriction_operations = 2;
    • addTargetRestrictionOperations

      public TargetingSetting.Builder addTargetRestrictionOperations(TargetRestrictionOperation value)
       The list of operations changing the target restrictions.
      
       Adding a target restriction with a targeting dimension that already exists
       causes the existing target restriction to be replaced with the new value.
       
      repeated .google.ads.googleads.v18.common.TargetRestrictionOperation target_restriction_operations = 2;
    • addTargetRestrictionOperations

      public TargetingSetting.Builder addTargetRestrictionOperations(int index, TargetRestrictionOperation value)
       The list of operations changing the target restrictions.
      
       Adding a target restriction with a targeting dimension that already exists
       causes the existing target restriction to be replaced with the new value.
       
      repeated .google.ads.googleads.v18.common.TargetRestrictionOperation target_restriction_operations = 2;
    • addTargetRestrictionOperations

      public TargetingSetting.Builder addTargetRestrictionOperations(TargetRestrictionOperation.Builder builderForValue)
       The list of operations changing the target restrictions.
      
       Adding a target restriction with a targeting dimension that already exists
       causes the existing target restriction to be replaced with the new value.
       
      repeated .google.ads.googleads.v18.common.TargetRestrictionOperation target_restriction_operations = 2;
    • addTargetRestrictionOperations

      public TargetingSetting.Builder addTargetRestrictionOperations(int index, TargetRestrictionOperation.Builder builderForValue)
       The list of operations changing the target restrictions.
      
       Adding a target restriction with a targeting dimension that already exists
       causes the existing target restriction to be replaced with the new value.
       
      repeated .google.ads.googleads.v18.common.TargetRestrictionOperation target_restriction_operations = 2;
    • addAllTargetRestrictionOperations

      public TargetingSetting.Builder addAllTargetRestrictionOperations(Iterable<? extends TargetRestrictionOperation> values)
       The list of operations changing the target restrictions.
      
       Adding a target restriction with a targeting dimension that already exists
       causes the existing target restriction to be replaced with the new value.
       
      repeated .google.ads.googleads.v18.common.TargetRestrictionOperation target_restriction_operations = 2;
    • clearTargetRestrictionOperations

      public TargetingSetting.Builder clearTargetRestrictionOperations()
       The list of operations changing the target restrictions.
      
       Adding a target restriction with a targeting dimension that already exists
       causes the existing target restriction to be replaced with the new value.
       
      repeated .google.ads.googleads.v18.common.TargetRestrictionOperation target_restriction_operations = 2;
    • removeTargetRestrictionOperations

      public TargetingSetting.Builder removeTargetRestrictionOperations(int index)
       The list of operations changing the target restrictions.
      
       Adding a target restriction with a targeting dimension that already exists
       causes the existing target restriction to be replaced with the new value.
       
      repeated .google.ads.googleads.v18.common.TargetRestrictionOperation target_restriction_operations = 2;
    • getTargetRestrictionOperationsBuilder

      public TargetRestrictionOperation.Builder getTargetRestrictionOperationsBuilder(int index)
       The list of operations changing the target restrictions.
      
       Adding a target restriction with a targeting dimension that already exists
       causes the existing target restriction to be replaced with the new value.
       
      repeated .google.ads.googleads.v18.common.TargetRestrictionOperation target_restriction_operations = 2;
    • getTargetRestrictionOperationsOrBuilder

      public TargetRestrictionOperationOrBuilder getTargetRestrictionOperationsOrBuilder(int index)
       The list of operations changing the target restrictions.
      
       Adding a target restriction with a targeting dimension that already exists
       causes the existing target restriction to be replaced with the new value.
       
      repeated .google.ads.googleads.v18.common.TargetRestrictionOperation target_restriction_operations = 2;
      Specified by:
      getTargetRestrictionOperationsOrBuilder in interface TargetingSettingOrBuilder
    • getTargetRestrictionOperationsOrBuilderList

      public List<? extends TargetRestrictionOperationOrBuilder> getTargetRestrictionOperationsOrBuilderList()
       The list of operations changing the target restrictions.
      
       Adding a target restriction with a targeting dimension that already exists
       causes the existing target restriction to be replaced with the new value.
       
      repeated .google.ads.googleads.v18.common.TargetRestrictionOperation target_restriction_operations = 2;
      Specified by:
      getTargetRestrictionOperationsOrBuilderList in interface TargetingSettingOrBuilder
    • addTargetRestrictionOperationsBuilder

      public TargetRestrictionOperation.Builder addTargetRestrictionOperationsBuilder()
       The list of operations changing the target restrictions.
      
       Adding a target restriction with a targeting dimension that already exists
       causes the existing target restriction to be replaced with the new value.
       
      repeated .google.ads.googleads.v18.common.TargetRestrictionOperation target_restriction_operations = 2;
    • addTargetRestrictionOperationsBuilder

      public TargetRestrictionOperation.Builder addTargetRestrictionOperationsBuilder(int index)
       The list of operations changing the target restrictions.
      
       Adding a target restriction with a targeting dimension that already exists
       causes the existing target restriction to be replaced with the new value.
       
      repeated .google.ads.googleads.v18.common.TargetRestrictionOperation target_restriction_operations = 2;
    • getTargetRestrictionOperationsBuilderList

      public List<TargetRestrictionOperation.Builder> getTargetRestrictionOperationsBuilderList()
       The list of operations changing the target restrictions.
      
       Adding a target restriction with a targeting dimension that already exists
       causes the existing target restriction to be replaced with the new value.
       
      repeated .google.ads.googleads.v18.common.TargetRestrictionOperation target_restriction_operations = 2;
    • setUnknownFields

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

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