Class TargetRestriction.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<TargetRestriction.Builder>
com.google.ads.googleads.v22.common.TargetRestriction.Builder
All Implemented Interfaces:
TargetRestrictionOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
TargetRestriction

public static final class TargetRestriction.Builder extends com.google.protobuf.GeneratedMessage.Builder<TargetRestriction.Builder> implements TargetRestrictionOrBuilder
 The list of per-targeting-dimension targeting settings.
 
Protobuf type google.ads.googleads.v22.common.TargetRestriction
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    Indicates whether to restrict your ads to show only for the criteria you have selected for this targeting_dimension, or to target all values for this targeting_dimension and show ads based on your targeting in other TargetingDimensions.
    The targeting dimension that these settings apply to.
    boolean
    Indicates whether to restrict your ads to show only for the criteria you have selected for this targeting_dimension, or to target all values for this targeting_dimension and show ads based on your targeting in other TargetingDimensions.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    The targeting dimension that these settings apply to.
    int
    The targeting dimension that these settings apply to.
    boolean
    Indicates whether to restrict your ads to show only for the criteria you have selected for this targeting_dimension, or to target all values for this targeting_dimension and show ads based on your targeting in other TargetingDimensions.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    setBidOnly(boolean value)
    Indicates whether to restrict your ads to show only for the criteria you have selected for this targeting_dimension, or to target all values for this targeting_dimension and show ads based on your targeting in other TargetingDimensions.
    The targeting dimension that these settings apply to.
    The targeting dimension that these settings apply to.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<TargetRestriction.Builder>
    • clear

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

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

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

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

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

      public TargetRestriction.Builder mergeFrom(TargetRestriction other)
    • isInitialized

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

      public TargetRestriction.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<TargetRestriction.Builder>
      Throws:
      IOException
    • getTargetingDimensionValue

      public int getTargetingDimensionValue()
       The targeting dimension that these settings apply to.
       
      .google.ads.googleads.v22.enums.TargetingDimensionEnum.TargetingDimension targeting_dimension = 1;
      Specified by:
      getTargetingDimensionValue in interface TargetRestrictionOrBuilder
      Returns:
      The enum numeric value on the wire for targetingDimension.
    • setTargetingDimensionValue

      public TargetRestriction.Builder setTargetingDimensionValue(int value)
       The targeting dimension that these settings apply to.
       
      .google.ads.googleads.v22.enums.TargetingDimensionEnum.TargetingDimension targeting_dimension = 1;
      Parameters:
      value - The enum numeric value on the wire for targetingDimension to set.
      Returns:
      This builder for chaining.
    • getTargetingDimension

      public TargetingDimensionEnum.TargetingDimension getTargetingDimension()
       The targeting dimension that these settings apply to.
       
      .google.ads.googleads.v22.enums.TargetingDimensionEnum.TargetingDimension targeting_dimension = 1;
      Specified by:
      getTargetingDimension in interface TargetRestrictionOrBuilder
      Returns:
      The targetingDimension.
    • setTargetingDimension

       The targeting dimension that these settings apply to.
       
      .google.ads.googleads.v22.enums.TargetingDimensionEnum.TargetingDimension targeting_dimension = 1;
      Parameters:
      value - The targetingDimension to set.
      Returns:
      This builder for chaining.
    • clearTargetingDimension

      public TargetRestriction.Builder clearTargetingDimension()
       The targeting dimension that these settings apply to.
       
      .google.ads.googleads.v22.enums.TargetingDimensionEnum.TargetingDimension targeting_dimension = 1;
      Returns:
      This builder for chaining.
    • hasBidOnly

      public boolean hasBidOnly()
       Indicates whether to restrict your ads to show only for the criteria you
       have selected for this targeting_dimension, or to target all values for
       this targeting_dimension and show ads based on your targeting in other
       TargetingDimensions. A value of `true` means that these criteria will only
       apply bid modifiers, and not affect targeting. A value of `false` means
       that these criteria will restrict targeting as well as applying bid
       modifiers.
       
      optional bool bid_only = 3;
      Specified by:
      hasBidOnly in interface TargetRestrictionOrBuilder
      Returns:
      Whether the bidOnly field is set.
    • getBidOnly

      public boolean getBidOnly()
       Indicates whether to restrict your ads to show only for the criteria you
       have selected for this targeting_dimension, or to target all values for
       this targeting_dimension and show ads based on your targeting in other
       TargetingDimensions. A value of `true` means that these criteria will only
       apply bid modifiers, and not affect targeting. A value of `false` means
       that these criteria will restrict targeting as well as applying bid
       modifiers.
       
      optional bool bid_only = 3;
      Specified by:
      getBidOnly in interface TargetRestrictionOrBuilder
      Returns:
      The bidOnly.
    • setBidOnly

      public TargetRestriction.Builder setBidOnly(boolean value)
       Indicates whether to restrict your ads to show only for the criteria you
       have selected for this targeting_dimension, or to target all values for
       this targeting_dimension and show ads based on your targeting in other
       TargetingDimensions. A value of `true` means that these criteria will only
       apply bid modifiers, and not affect targeting. A value of `false` means
       that these criteria will restrict targeting as well as applying bid
       modifiers.
       
      optional bool bid_only = 3;
      Parameters:
      value - The bidOnly to set.
      Returns:
      This builder for chaining.
    • clearBidOnly

      public TargetRestriction.Builder clearBidOnly()
       Indicates whether to restrict your ads to show only for the criteria you
       have selected for this targeting_dimension, or to target all values for
       this targeting_dimension and show ads based on your targeting in other
       TargetingDimensions. A value of `true` means that these criteria will only
       apply bid modifiers, and not affect targeting. A value of `false` means
       that these criteria will restrict targeting as well as applying bid
       modifiers.
       
      optional bool bid_only = 3;
      Returns:
      This builder for chaining.