Class Targeting

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
com.google.ads.googleads.v18.services.Targeting
All Implemented Interfaces:
TargetingOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

public final class Targeting extends com.google.protobuf.GeneratedMessageV3 implements TargetingOrBuilder
 The targeting for which traffic metrics will be reported.
 
Protobuf type google.ads.googleads.v18.services.Targeting
See Also:
  • Field Details

    • PLANNABLE_LOCATION_ID_FIELD_NUMBER

      public static final int PLANNABLE_LOCATION_ID_FIELD_NUMBER
      See Also:
    • PLANNABLE_LOCATION_IDS_FIELD_NUMBER

      public static final int PLANNABLE_LOCATION_IDS_FIELD_NUMBER
      See Also:
    • AGE_RANGE_FIELD_NUMBER

      public static final int AGE_RANGE_FIELD_NUMBER
      See Also:
    • GENDERS_FIELD_NUMBER

      public static final int GENDERS_FIELD_NUMBER
      See Also:
    • DEVICES_FIELD_NUMBER

      public static final int DEVICES_FIELD_NUMBER
      See Also:
    • NETWORK_FIELD_NUMBER

      public static final int NETWORK_FIELD_NUMBER
      See Also:
    • AUDIENCE_TARGETING_FIELD_NUMBER

      public static final int AUDIENCE_TARGETING_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • 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
    • hasPlannableLocationId

      public boolean hasPlannableLocationId()
       The ID of the selected location. Plannable location IDs can be
       obtained from
       [ReachPlanService.ListPlannableLocations][google.ads.googleads.v18.services.ReachPlanService.ListPlannableLocations].
      
       Requests must set either this field or `plannable_location_ids`.
      
       This field is deprecated as of V12 and will be removed in a future release.
       Use `plannable_location_ids` instead.
       
      optional string plannable_location_id = 6;
      Specified by:
      hasPlannableLocationId in interface TargetingOrBuilder
      Returns:
      Whether the plannableLocationId field is set.
    • getPlannableLocationId

      public String getPlannableLocationId()
       The ID of the selected location. Plannable location IDs can be
       obtained from
       [ReachPlanService.ListPlannableLocations][google.ads.googleads.v18.services.ReachPlanService.ListPlannableLocations].
      
       Requests must set either this field or `plannable_location_ids`.
      
       This field is deprecated as of V12 and will be removed in a future release.
       Use `plannable_location_ids` instead.
       
      optional string plannable_location_id = 6;
      Specified by:
      getPlannableLocationId in interface TargetingOrBuilder
      Returns:
      The plannableLocationId.
    • getPlannableLocationIdBytes

      public com.google.protobuf.ByteString getPlannableLocationIdBytes()
       The ID of the selected location. Plannable location IDs can be
       obtained from
       [ReachPlanService.ListPlannableLocations][google.ads.googleads.v18.services.ReachPlanService.ListPlannableLocations].
      
       Requests must set either this field or `plannable_location_ids`.
      
       This field is deprecated as of V12 and will be removed in a future release.
       Use `plannable_location_ids` instead.
       
      optional string plannable_location_id = 6;
      Specified by:
      getPlannableLocationIdBytes in interface TargetingOrBuilder
      Returns:
      The bytes for plannableLocationId.
    • getPlannableLocationIdsList

      public com.google.protobuf.ProtocolStringList getPlannableLocationIdsList()
       The list of plannable location IDs to target with this forecast.
      
       If more than one ID is provided, all IDs must have the same
       `parent_country_id`. Planning for more than `parent_county` is not
       supported. Plannable location IDs and their `parent_country_id` can be
       obtained from
       [ReachPlanService.ListPlannableLocations][google.ads.googleads.v18.services.ReachPlanService.ListPlannableLocations].
      
       Requests must set either this field or `plannable_location_id`.
       
      repeated string plannable_location_ids = 8;
      Specified by:
      getPlannableLocationIdsList in interface TargetingOrBuilder
      Returns:
      A list containing the plannableLocationIds.
    • getPlannableLocationIdsCount

      public int getPlannableLocationIdsCount()
       The list of plannable location IDs to target with this forecast.
      
       If more than one ID is provided, all IDs must have the same
       `parent_country_id`. Planning for more than `parent_county` is not
       supported. Plannable location IDs and their `parent_country_id` can be
       obtained from
       [ReachPlanService.ListPlannableLocations][google.ads.googleads.v18.services.ReachPlanService.ListPlannableLocations].
      
       Requests must set either this field or `plannable_location_id`.
       
      repeated string plannable_location_ids = 8;
      Specified by:
      getPlannableLocationIdsCount in interface TargetingOrBuilder
      Returns:
      The count of plannableLocationIds.
    • getPlannableLocationIds

      public String getPlannableLocationIds(int index)
       The list of plannable location IDs to target with this forecast.
      
       If more than one ID is provided, all IDs must have the same
       `parent_country_id`. Planning for more than `parent_county` is not
       supported. Plannable location IDs and their `parent_country_id` can be
       obtained from
       [ReachPlanService.ListPlannableLocations][google.ads.googleads.v18.services.ReachPlanService.ListPlannableLocations].
      
       Requests must set either this field or `plannable_location_id`.
       
      repeated string plannable_location_ids = 8;
      Specified by:
      getPlannableLocationIds in interface TargetingOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The plannableLocationIds at the given index.
    • getPlannableLocationIdsBytes

      public com.google.protobuf.ByteString getPlannableLocationIdsBytes(int index)
       The list of plannable location IDs to target with this forecast.
      
       If more than one ID is provided, all IDs must have the same
       `parent_country_id`. Planning for more than `parent_county` is not
       supported. Plannable location IDs and their `parent_country_id` can be
       obtained from
       [ReachPlanService.ListPlannableLocations][google.ads.googleads.v18.services.ReachPlanService.ListPlannableLocations].
      
       Requests must set either this field or `plannable_location_id`.
       
      repeated string plannable_location_ids = 8;
      Specified by:
      getPlannableLocationIdsBytes in interface TargetingOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the plannableLocationIds at the given index.
    • getAgeRangeValue

      public int getAgeRangeValue()
       Targeted age range.
       An unset value is equivalent to targeting all ages.
       
      .google.ads.googleads.v18.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_range = 2;
      Specified by:
      getAgeRangeValue in interface TargetingOrBuilder
      Returns:
      The enum numeric value on the wire for ageRange.
    • getAgeRange

       Targeted age range.
       An unset value is equivalent to targeting all ages.
       
      .google.ads.googleads.v18.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_range = 2;
      Specified by:
      getAgeRange in interface TargetingOrBuilder
      Returns:
      The ageRange.
    • getGendersList

      public List<GenderInfo> getGendersList()
       Targeted genders.
       An unset value is equivalent to targeting MALE and FEMALE.
       
      repeated .google.ads.googleads.v18.common.GenderInfo genders = 3;
      Specified by:
      getGendersList in interface TargetingOrBuilder
    • getGendersOrBuilderList

      public List<? extends GenderInfoOrBuilder> getGendersOrBuilderList()
       Targeted genders.
       An unset value is equivalent to targeting MALE and FEMALE.
       
      repeated .google.ads.googleads.v18.common.GenderInfo genders = 3;
      Specified by:
      getGendersOrBuilderList in interface TargetingOrBuilder
    • getGendersCount

      public int getGendersCount()
       Targeted genders.
       An unset value is equivalent to targeting MALE and FEMALE.
       
      repeated .google.ads.googleads.v18.common.GenderInfo genders = 3;
      Specified by:
      getGendersCount in interface TargetingOrBuilder
    • getGenders

      public GenderInfo getGenders(int index)
       Targeted genders.
       An unset value is equivalent to targeting MALE and FEMALE.
       
      repeated .google.ads.googleads.v18.common.GenderInfo genders = 3;
      Specified by:
      getGenders in interface TargetingOrBuilder
    • getGendersOrBuilder

      public GenderInfoOrBuilder getGendersOrBuilder(int index)
       Targeted genders.
       An unset value is equivalent to targeting MALE and FEMALE.
       
      repeated .google.ads.googleads.v18.common.GenderInfo genders = 3;
      Specified by:
      getGendersOrBuilder in interface TargetingOrBuilder
    • getDevicesList

      public List<DeviceInfo> getDevicesList()
       Targeted devices.
       If not specified, targets all applicable devices. Applicable devices vary
       by product and region and can be obtained from
       [ReachPlanService.ListPlannableProducts][google.ads.googleads.v18.services.ReachPlanService.ListPlannableProducts].
       
      repeated .google.ads.googleads.v18.common.DeviceInfo devices = 4;
      Specified by:
      getDevicesList in interface TargetingOrBuilder
    • getDevicesOrBuilderList

      public List<? extends DeviceInfoOrBuilder> getDevicesOrBuilderList()
       Targeted devices.
       If not specified, targets all applicable devices. Applicable devices vary
       by product and region and can be obtained from
       [ReachPlanService.ListPlannableProducts][google.ads.googleads.v18.services.ReachPlanService.ListPlannableProducts].
       
      repeated .google.ads.googleads.v18.common.DeviceInfo devices = 4;
      Specified by:
      getDevicesOrBuilderList in interface TargetingOrBuilder
    • getDevicesCount

      public int getDevicesCount()
       Targeted devices.
       If not specified, targets all applicable devices. Applicable devices vary
       by product and region and can be obtained from
       [ReachPlanService.ListPlannableProducts][google.ads.googleads.v18.services.ReachPlanService.ListPlannableProducts].
       
      repeated .google.ads.googleads.v18.common.DeviceInfo devices = 4;
      Specified by:
      getDevicesCount in interface TargetingOrBuilder
    • getDevices

      public DeviceInfo getDevices(int index)
       Targeted devices.
       If not specified, targets all applicable devices. Applicable devices vary
       by product and region and can be obtained from
       [ReachPlanService.ListPlannableProducts][google.ads.googleads.v18.services.ReachPlanService.ListPlannableProducts].
       
      repeated .google.ads.googleads.v18.common.DeviceInfo devices = 4;
      Specified by:
      getDevices in interface TargetingOrBuilder
    • getDevicesOrBuilder

      public DeviceInfoOrBuilder getDevicesOrBuilder(int index)
       Targeted devices.
       If not specified, targets all applicable devices. Applicable devices vary
       by product and region and can be obtained from
       [ReachPlanService.ListPlannableProducts][google.ads.googleads.v18.services.ReachPlanService.ListPlannableProducts].
       
      repeated .google.ads.googleads.v18.common.DeviceInfo devices = 4;
      Specified by:
      getDevicesOrBuilder in interface TargetingOrBuilder
    • getNetworkValue

      public int getNetworkValue()
       Targetable network for the ad product.
       If not specified, targets all applicable networks. Applicable networks vary
       by product and region and can be obtained from
       [ReachPlanService.ListPlannableProducts][google.ads.googleads.v18.services.ReachPlanService.ListPlannableProducts].
       
      .google.ads.googleads.v18.enums.ReachPlanNetworkEnum.ReachPlanNetwork network = 5;
      Specified by:
      getNetworkValue in interface TargetingOrBuilder
      Returns:
      The enum numeric value on the wire for network.
    • getNetwork

       Targetable network for the ad product.
       If not specified, targets all applicable networks. Applicable networks vary
       by product and region and can be obtained from
       [ReachPlanService.ListPlannableProducts][google.ads.googleads.v18.services.ReachPlanService.ListPlannableProducts].
       
      .google.ads.googleads.v18.enums.ReachPlanNetworkEnum.ReachPlanNetwork network = 5;
      Specified by:
      getNetwork in interface TargetingOrBuilder
      Returns:
      The network.
    • hasAudienceTargeting

      public boolean hasAudienceTargeting()
       Targeted audiences.
       If not specified, does not target any specific audience.
       
      .google.ads.googleads.v18.services.AudienceTargeting audience_targeting = 7;
      Specified by:
      hasAudienceTargeting in interface TargetingOrBuilder
      Returns:
      Whether the audienceTargeting field is set.
    • getAudienceTargeting

      public AudienceTargeting getAudienceTargeting()
       Targeted audiences.
       If not specified, does not target any specific audience.
       
      .google.ads.googleads.v18.services.AudienceTargeting audience_targeting = 7;
      Specified by:
      getAudienceTargeting in interface TargetingOrBuilder
      Returns:
      The audienceTargeting.
    • getAudienceTargetingOrBuilder

      public AudienceTargetingOrBuilder getAudienceTargetingOrBuilder()
       Targeted audiences.
       If not specified, does not target any specific audience.
       
      .google.ads.googleads.v18.services.AudienceTargeting audience_targeting = 7;
      Specified by:
      getAudienceTargetingOrBuilder in interface TargetingOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static Targeting parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Targeting parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Targeting parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Targeting parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Targeting parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Targeting parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Targeting parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Targeting parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Targeting parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Targeting parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Targeting parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Targeting parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Targeting.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Targeting.Builder newBuilder()
    • newBuilder

      public static Targeting.Builder newBuilder(Targeting prototype)
    • toBuilder

      public Targeting.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Targeting.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static Targeting getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Targeting> parser()
    • getParserForType

      public com.google.protobuf.Parser<Targeting> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public Targeting getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder