com.google.ads.googleads.v17.services.Targeting Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of google-ads-stubs-v17 Show documentation
Show all versions of google-ads-stubs-v17 Show documentation
Stubs for GAAPI version google-ads-stubs-v17
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/ads/googleads/v17/services/reach_plan_service.proto
// Protobuf Java Version: 3.25.3
package com.google.ads.googleads.v17.services;
/**
*
* The targeting for which traffic metrics will be reported.
*
*
* Protobuf type {@code google.ads.googleads.v17.services.Targeting}
*/
public final class Targeting extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.ads.googleads.v17.services.Targeting)
TargetingOrBuilder {
private static final long serialVersionUID = 0L;
// Use Targeting.newBuilder() to construct.
private Targeting(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Targeting() {
plannableLocationId_ = "";
plannableLocationIds_ =
com.google.protobuf.LazyStringArrayList.emptyList();
ageRange_ = 0;
genders_ = java.util.Collections.emptyList();
devices_ = java.util.Collections.emptyList();
network_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Targeting();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.services.ReachPlanServiceProto.internal_static_google_ads_googleads_v17_services_Targeting_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v17.services.ReachPlanServiceProto.internal_static_google_ads_googleads_v17_services_Targeting_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.services.Targeting.class, com.google.ads.googleads.v17.services.Targeting.Builder.class);
}
private int bitField0_;
public static final int PLANNABLE_LOCATION_ID_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private volatile java.lang.Object plannableLocationId_ = "";
/**
*
* The ID of the selected location. Plannable location IDs can be
* obtained from
* [ReachPlanService.ListPlannableLocations][google.ads.googleads.v17.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;
* @return Whether the plannableLocationId field is set.
*/
@java.lang.Override
public boolean hasPlannableLocationId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The ID of the selected location. Plannable location IDs can be
* obtained from
* [ReachPlanService.ListPlannableLocations][google.ads.googleads.v17.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;
* @return The plannableLocationId.
*/
@java.lang.Override
public java.lang.String getPlannableLocationId() {
java.lang.Object ref = plannableLocationId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
plannableLocationId_ = s;
return s;
}
}
/**
*
* The ID of the selected location. Plannable location IDs can be
* obtained from
* [ReachPlanService.ListPlannableLocations][google.ads.googleads.v17.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;
* @return The bytes for plannableLocationId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPlannableLocationIdBytes() {
java.lang.Object ref = plannableLocationId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
plannableLocationId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PLANNABLE_LOCATION_IDS_FIELD_NUMBER = 8;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList plannableLocationIds_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* 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.v17.services.ReachPlanService.ListPlannableLocations].
*
* Requests must set either this field or `plannable_location_id`.
*
*
* repeated string plannable_location_ids = 8;
* @return A list containing the plannableLocationIds.
*/
public com.google.protobuf.ProtocolStringList
getPlannableLocationIdsList() {
return plannableLocationIds_;
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableLocations].
*
* Requests must set either this field or `plannable_location_id`.
*
*
* repeated string plannable_location_ids = 8;
* @return The count of plannableLocationIds.
*/
public int getPlannableLocationIdsCount() {
return plannableLocationIds_.size();
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableLocations].
*
* Requests must set either this field or `plannable_location_id`.
*
*
* repeated string plannable_location_ids = 8;
* @param index The index of the element to return.
* @return The plannableLocationIds at the given index.
*/
public java.lang.String getPlannableLocationIds(int index) {
return plannableLocationIds_.get(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.v17.services.ReachPlanService.ListPlannableLocations].
*
* Requests must set either this field or `plannable_location_id`.
*
*
* repeated string plannable_location_ids = 8;
* @param index The index of the value to return.
* @return The bytes of the plannableLocationIds at the given index.
*/
public com.google.protobuf.ByteString
getPlannableLocationIdsBytes(int index) {
return plannableLocationIds_.getByteString(index);
}
public static final int AGE_RANGE_FIELD_NUMBER = 2;
private int ageRange_ = 0;
/**
*
* Targeted age range.
* An unset value is equivalent to targeting all ages.
*
*
* .google.ads.googleads.v17.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_range = 2;
* @return The enum numeric value on the wire for ageRange.
*/
@java.lang.Override public int getAgeRangeValue() {
return ageRange_;
}
/**
*
* Targeted age range.
* An unset value is equivalent to targeting all ages.
*
*
* .google.ads.googleads.v17.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_range = 2;
* @return The ageRange.
*/
@java.lang.Override public com.google.ads.googleads.v17.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange getAgeRange() {
com.google.ads.googleads.v17.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange result = com.google.ads.googleads.v17.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange.forNumber(ageRange_);
return result == null ? com.google.ads.googleads.v17.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange.UNRECOGNIZED : result;
}
public static final int GENDERS_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private java.util.List genders_;
/**
*
* Targeted genders.
* An unset value is equivalent to targeting MALE and FEMALE.
*
*
* repeated .google.ads.googleads.v17.common.GenderInfo genders = 3;
*/
@java.lang.Override
public java.util.List getGendersList() {
return genders_;
}
/**
*
* Targeted genders.
* An unset value is equivalent to targeting MALE and FEMALE.
*
*
* repeated .google.ads.googleads.v17.common.GenderInfo genders = 3;
*/
@java.lang.Override
public java.util.List extends com.google.ads.googleads.v17.common.GenderInfoOrBuilder>
getGendersOrBuilderList() {
return genders_;
}
/**
*
* Targeted genders.
* An unset value is equivalent to targeting MALE and FEMALE.
*
*
* repeated .google.ads.googleads.v17.common.GenderInfo genders = 3;
*/
@java.lang.Override
public int getGendersCount() {
return genders_.size();
}
/**
*
* Targeted genders.
* An unset value is equivalent to targeting MALE and FEMALE.
*
*
* repeated .google.ads.googleads.v17.common.GenderInfo genders = 3;
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.GenderInfo getGenders(int index) {
return genders_.get(index);
}
/**
*
* Targeted genders.
* An unset value is equivalent to targeting MALE and FEMALE.
*
*
* repeated .google.ads.googleads.v17.common.GenderInfo genders = 3;
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.GenderInfoOrBuilder getGendersOrBuilder(
int index) {
return genders_.get(index);
}
public static final int DEVICES_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private java.util.List devices_;
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* repeated .google.ads.googleads.v17.common.DeviceInfo devices = 4;
*/
@java.lang.Override
public java.util.List getDevicesList() {
return devices_;
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* repeated .google.ads.googleads.v17.common.DeviceInfo devices = 4;
*/
@java.lang.Override
public java.util.List extends com.google.ads.googleads.v17.common.DeviceInfoOrBuilder>
getDevicesOrBuilderList() {
return devices_;
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* repeated .google.ads.googleads.v17.common.DeviceInfo devices = 4;
*/
@java.lang.Override
public int getDevicesCount() {
return devices_.size();
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* repeated .google.ads.googleads.v17.common.DeviceInfo devices = 4;
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.DeviceInfo getDevices(int index) {
return devices_.get(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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* repeated .google.ads.googleads.v17.common.DeviceInfo devices = 4;
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.DeviceInfoOrBuilder getDevicesOrBuilder(
int index) {
return devices_.get(index);
}
public static final int NETWORK_FIELD_NUMBER = 5;
private int network_ = 0;
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* .google.ads.googleads.v17.enums.ReachPlanNetworkEnum.ReachPlanNetwork network = 5;
* @return The enum numeric value on the wire for network.
*/
@java.lang.Override public int getNetworkValue() {
return network_;
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* .google.ads.googleads.v17.enums.ReachPlanNetworkEnum.ReachPlanNetwork network = 5;
* @return The network.
*/
@java.lang.Override public com.google.ads.googleads.v17.enums.ReachPlanNetworkEnum.ReachPlanNetwork getNetwork() {
com.google.ads.googleads.v17.enums.ReachPlanNetworkEnum.ReachPlanNetwork result = com.google.ads.googleads.v17.enums.ReachPlanNetworkEnum.ReachPlanNetwork.forNumber(network_);
return result == null ? com.google.ads.googleads.v17.enums.ReachPlanNetworkEnum.ReachPlanNetwork.UNRECOGNIZED : result;
}
public static final int AUDIENCE_TARGETING_FIELD_NUMBER = 7;
private com.google.ads.googleads.v17.services.AudienceTargeting audienceTargeting_;
/**
*
* Targeted audiences.
* If not specified, does not target any specific audience.
*
*
* .google.ads.googleads.v17.services.AudienceTargeting audience_targeting = 7;
* @return Whether the audienceTargeting field is set.
*/
@java.lang.Override
public boolean hasAudienceTargeting() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Targeted audiences.
* If not specified, does not target any specific audience.
*
*
* .google.ads.googleads.v17.services.AudienceTargeting audience_targeting = 7;
* @return The audienceTargeting.
*/
@java.lang.Override
public com.google.ads.googleads.v17.services.AudienceTargeting getAudienceTargeting() {
return audienceTargeting_ == null ? com.google.ads.googleads.v17.services.AudienceTargeting.getDefaultInstance() : audienceTargeting_;
}
/**
*
* Targeted audiences.
* If not specified, does not target any specific audience.
*
*
* .google.ads.googleads.v17.services.AudienceTargeting audience_targeting = 7;
*/
@java.lang.Override
public com.google.ads.googleads.v17.services.AudienceTargetingOrBuilder getAudienceTargetingOrBuilder() {
return audienceTargeting_ == null ? com.google.ads.googleads.v17.services.AudienceTargeting.getDefaultInstance() : audienceTargeting_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (ageRange_ != com.google.ads.googleads.v17.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange.UNSPECIFIED.getNumber()) {
output.writeEnum(2, ageRange_);
}
for (int i = 0; i < genders_.size(); i++) {
output.writeMessage(3, genders_.get(i));
}
for (int i = 0; i < devices_.size(); i++) {
output.writeMessage(4, devices_.get(i));
}
if (network_ != com.google.ads.googleads.v17.enums.ReachPlanNetworkEnum.ReachPlanNetwork.UNSPECIFIED.getNumber()) {
output.writeEnum(5, network_);
}
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, plannableLocationId_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(7, getAudienceTargeting());
}
for (int i = 0; i < plannableLocationIds_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, plannableLocationIds_.getRaw(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (ageRange_ != com.google.ads.googleads.v17.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange.UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, ageRange_);
}
for (int i = 0; i < genders_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, genders_.get(i));
}
for (int i = 0; i < devices_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, devices_.get(i));
}
if (network_ != com.google.ads.googleads.v17.enums.ReachPlanNetworkEnum.ReachPlanNetwork.UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(5, network_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, plannableLocationId_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getAudienceTargeting());
}
{
int dataSize = 0;
for (int i = 0; i < plannableLocationIds_.size(); i++) {
dataSize += computeStringSizeNoTag(plannableLocationIds_.getRaw(i));
}
size += dataSize;
size += 1 * getPlannableLocationIdsList().size();
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.ads.googleads.v17.services.Targeting)) {
return super.equals(obj);
}
com.google.ads.googleads.v17.services.Targeting other = (com.google.ads.googleads.v17.services.Targeting) obj;
if (hasPlannableLocationId() != other.hasPlannableLocationId()) return false;
if (hasPlannableLocationId()) {
if (!getPlannableLocationId()
.equals(other.getPlannableLocationId())) return false;
}
if (!getPlannableLocationIdsList()
.equals(other.getPlannableLocationIdsList())) return false;
if (ageRange_ != other.ageRange_) return false;
if (!getGendersList()
.equals(other.getGendersList())) return false;
if (!getDevicesList()
.equals(other.getDevicesList())) return false;
if (network_ != other.network_) return false;
if (hasAudienceTargeting() != other.hasAudienceTargeting()) return false;
if (hasAudienceTargeting()) {
if (!getAudienceTargeting()
.equals(other.getAudienceTargeting())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasPlannableLocationId()) {
hash = (37 * hash) + PLANNABLE_LOCATION_ID_FIELD_NUMBER;
hash = (53 * hash) + getPlannableLocationId().hashCode();
}
if (getPlannableLocationIdsCount() > 0) {
hash = (37 * hash) + PLANNABLE_LOCATION_IDS_FIELD_NUMBER;
hash = (53 * hash) + getPlannableLocationIdsList().hashCode();
}
hash = (37 * hash) + AGE_RANGE_FIELD_NUMBER;
hash = (53 * hash) + ageRange_;
if (getGendersCount() > 0) {
hash = (37 * hash) + GENDERS_FIELD_NUMBER;
hash = (53 * hash) + getGendersList().hashCode();
}
if (getDevicesCount() > 0) {
hash = (37 * hash) + DEVICES_FIELD_NUMBER;
hash = (53 * hash) + getDevicesList().hashCode();
}
hash = (37 * hash) + NETWORK_FIELD_NUMBER;
hash = (53 * hash) + network_;
if (hasAudienceTargeting()) {
hash = (37 * hash) + AUDIENCE_TARGETING_FIELD_NUMBER;
hash = (53 * hash) + getAudienceTargeting().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.ads.googleads.v17.services.Targeting parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.services.Targeting parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.ads.googleads.v17.services.Targeting parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.services.Targeting parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.ads.googleads.v17.services.Targeting parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.services.Targeting parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.ads.googleads.v17.services.Targeting parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v17.services.Targeting parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.ads.googleads.v17.services.Targeting parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v17.services.Targeting parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.ads.googleads.v17.services.Targeting parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v17.services.Targeting parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.ads.googleads.v17.services.Targeting prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* The targeting for which traffic metrics will be reported.
*
*
* Protobuf type {@code google.ads.googleads.v17.services.Targeting}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.ads.googleads.v17.services.Targeting)
com.google.ads.googleads.v17.services.TargetingOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.services.ReachPlanServiceProto.internal_static_google_ads_googleads_v17_services_Targeting_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v17.services.ReachPlanServiceProto.internal_static_google_ads_googleads_v17_services_Targeting_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.services.Targeting.class, com.google.ads.googleads.v17.services.Targeting.Builder.class);
}
// Construct using com.google.ads.googleads.v17.services.Targeting.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getGendersFieldBuilder();
getDevicesFieldBuilder();
getAudienceTargetingFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
plannableLocationId_ = "";
plannableLocationIds_ =
com.google.protobuf.LazyStringArrayList.emptyList();
ageRange_ = 0;
if (gendersBuilder_ == null) {
genders_ = java.util.Collections.emptyList();
} else {
genders_ = null;
gendersBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
if (devicesBuilder_ == null) {
devices_ = java.util.Collections.emptyList();
} else {
devices_ = null;
devicesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
network_ = 0;
audienceTargeting_ = null;
if (audienceTargetingBuilder_ != null) {
audienceTargetingBuilder_.dispose();
audienceTargetingBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.ads.googleads.v17.services.ReachPlanServiceProto.internal_static_google_ads_googleads_v17_services_Targeting_descriptor;
}
@java.lang.Override
public com.google.ads.googleads.v17.services.Targeting getDefaultInstanceForType() {
return com.google.ads.googleads.v17.services.Targeting.getDefaultInstance();
}
@java.lang.Override
public com.google.ads.googleads.v17.services.Targeting build() {
com.google.ads.googleads.v17.services.Targeting result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.ads.googleads.v17.services.Targeting buildPartial() {
com.google.ads.googleads.v17.services.Targeting result = new com.google.ads.googleads.v17.services.Targeting(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.ads.googleads.v17.services.Targeting result) {
if (gendersBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)) {
genders_ = java.util.Collections.unmodifiableList(genders_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.genders_ = genders_;
} else {
result.genders_ = gendersBuilder_.build();
}
if (devicesBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0)) {
devices_ = java.util.Collections.unmodifiableList(devices_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.devices_ = devices_;
} else {
result.devices_ = devicesBuilder_.build();
}
}
private void buildPartial0(com.google.ads.googleads.v17.services.Targeting result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.plannableLocationId_ = plannableLocationId_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
plannableLocationIds_.makeImmutable();
result.plannableLocationIds_ = plannableLocationIds_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.ageRange_ = ageRange_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.network_ = network_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.audienceTargeting_ = audienceTargetingBuilder_ == null
? audienceTargeting_
: audienceTargetingBuilder_.build();
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.ads.googleads.v17.services.Targeting) {
return mergeFrom((com.google.ads.googleads.v17.services.Targeting)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.ads.googleads.v17.services.Targeting other) {
if (other == com.google.ads.googleads.v17.services.Targeting.getDefaultInstance()) return this;
if (other.hasPlannableLocationId()) {
plannableLocationId_ = other.plannableLocationId_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.plannableLocationIds_.isEmpty()) {
if (plannableLocationIds_.isEmpty()) {
plannableLocationIds_ = other.plannableLocationIds_;
bitField0_ |= 0x00000002;
} else {
ensurePlannableLocationIdsIsMutable();
plannableLocationIds_.addAll(other.plannableLocationIds_);
}
onChanged();
}
if (other.ageRange_ != 0) {
setAgeRangeValue(other.getAgeRangeValue());
}
if (gendersBuilder_ == null) {
if (!other.genders_.isEmpty()) {
if (genders_.isEmpty()) {
genders_ = other.genders_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureGendersIsMutable();
genders_.addAll(other.genders_);
}
onChanged();
}
} else {
if (!other.genders_.isEmpty()) {
if (gendersBuilder_.isEmpty()) {
gendersBuilder_.dispose();
gendersBuilder_ = null;
genders_ = other.genders_;
bitField0_ = (bitField0_ & ~0x00000008);
gendersBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getGendersFieldBuilder() : null;
} else {
gendersBuilder_.addAllMessages(other.genders_);
}
}
}
if (devicesBuilder_ == null) {
if (!other.devices_.isEmpty()) {
if (devices_.isEmpty()) {
devices_ = other.devices_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureDevicesIsMutable();
devices_.addAll(other.devices_);
}
onChanged();
}
} else {
if (!other.devices_.isEmpty()) {
if (devicesBuilder_.isEmpty()) {
devicesBuilder_.dispose();
devicesBuilder_ = null;
devices_ = other.devices_;
bitField0_ = (bitField0_ & ~0x00000010);
devicesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getDevicesFieldBuilder() : null;
} else {
devicesBuilder_.addAllMessages(other.devices_);
}
}
}
if (other.network_ != 0) {
setNetworkValue(other.getNetworkValue());
}
if (other.hasAudienceTargeting()) {
mergeAudienceTargeting(other.getAudienceTargeting());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 16: {
ageRange_ = input.readEnum();
bitField0_ |= 0x00000004;
break;
} // case 16
case 26: {
com.google.ads.googleads.v17.common.GenderInfo m =
input.readMessage(
com.google.ads.googleads.v17.common.GenderInfo.parser(),
extensionRegistry);
if (gendersBuilder_ == null) {
ensureGendersIsMutable();
genders_.add(m);
} else {
gendersBuilder_.addMessage(m);
}
break;
} // case 26
case 34: {
com.google.ads.googleads.v17.common.DeviceInfo m =
input.readMessage(
com.google.ads.googleads.v17.common.DeviceInfo.parser(),
extensionRegistry);
if (devicesBuilder_ == null) {
ensureDevicesIsMutable();
devices_.add(m);
} else {
devicesBuilder_.addMessage(m);
}
break;
} // case 34
case 40: {
network_ = input.readEnum();
bitField0_ |= 0x00000020;
break;
} // case 40
case 50: {
plannableLocationId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 50
case 58: {
input.readMessage(
getAudienceTargetingFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000040;
break;
} // case 58
case 66: {
java.lang.String s = input.readStringRequireUtf8();
ensurePlannableLocationIdsIsMutable();
plannableLocationIds_.add(s);
break;
} // case 66
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object plannableLocationId_ = "";
/**
*
* The ID of the selected location. Plannable location IDs can be
* obtained from
* [ReachPlanService.ListPlannableLocations][google.ads.googleads.v17.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;
* @return Whether the plannableLocationId field is set.
*/
public boolean hasPlannableLocationId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The ID of the selected location. Plannable location IDs can be
* obtained from
* [ReachPlanService.ListPlannableLocations][google.ads.googleads.v17.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;
* @return The plannableLocationId.
*/
public java.lang.String getPlannableLocationId() {
java.lang.Object ref = plannableLocationId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
plannableLocationId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The ID of the selected location. Plannable location IDs can be
* obtained from
* [ReachPlanService.ListPlannableLocations][google.ads.googleads.v17.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;
* @return The bytes for plannableLocationId.
*/
public com.google.protobuf.ByteString
getPlannableLocationIdBytes() {
java.lang.Object ref = plannableLocationId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
plannableLocationId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The ID of the selected location. Plannable location IDs can be
* obtained from
* [ReachPlanService.ListPlannableLocations][google.ads.googleads.v17.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;
* @param value The plannableLocationId to set.
* @return This builder for chaining.
*/
public Builder setPlannableLocationId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
plannableLocationId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The ID of the selected location. Plannable location IDs can be
* obtained from
* [ReachPlanService.ListPlannableLocations][google.ads.googleads.v17.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;
* @return This builder for chaining.
*/
public Builder clearPlannableLocationId() {
plannableLocationId_ = getDefaultInstance().getPlannableLocationId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* The ID of the selected location. Plannable location IDs can be
* obtained from
* [ReachPlanService.ListPlannableLocations][google.ads.googleads.v17.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;
* @param value The bytes for plannableLocationId to set.
* @return This builder for chaining.
*/
public Builder setPlannableLocationIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
plannableLocationId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList plannableLocationIds_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensurePlannableLocationIdsIsMutable() {
if (!plannableLocationIds_.isModifiable()) {
plannableLocationIds_ = new com.google.protobuf.LazyStringArrayList(plannableLocationIds_);
}
bitField0_ |= 0x00000002;
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableLocations].
*
* Requests must set either this field or `plannable_location_id`.
*
*
* repeated string plannable_location_ids = 8;
* @return A list containing the plannableLocationIds.
*/
public com.google.protobuf.ProtocolStringList
getPlannableLocationIdsList() {
plannableLocationIds_.makeImmutable();
return plannableLocationIds_;
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableLocations].
*
* Requests must set either this field or `plannable_location_id`.
*
*
* repeated string plannable_location_ids = 8;
* @return The count of plannableLocationIds.
*/
public int getPlannableLocationIdsCount() {
return plannableLocationIds_.size();
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableLocations].
*
* Requests must set either this field or `plannable_location_id`.
*
*
* repeated string plannable_location_ids = 8;
* @param index The index of the element to return.
* @return The plannableLocationIds at the given index.
*/
public java.lang.String getPlannableLocationIds(int index) {
return plannableLocationIds_.get(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.v17.services.ReachPlanService.ListPlannableLocations].
*
* Requests must set either this field or `plannable_location_id`.
*
*
* repeated string plannable_location_ids = 8;
* @param index The index of the value to return.
* @return The bytes of the plannableLocationIds at the given index.
*/
public com.google.protobuf.ByteString
getPlannableLocationIdsBytes(int index) {
return plannableLocationIds_.getByteString(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.v17.services.ReachPlanService.ListPlannableLocations].
*
* Requests must set either this field or `plannable_location_id`.
*
*
* repeated string plannable_location_ids = 8;
* @param index The index to set the value at.
* @param value The plannableLocationIds to set.
* @return This builder for chaining.
*/
public Builder setPlannableLocationIds(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensurePlannableLocationIdsIsMutable();
plannableLocationIds_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableLocations].
*
* Requests must set either this field or `plannable_location_id`.
*
*
* repeated string plannable_location_ids = 8;
* @param value The plannableLocationIds to add.
* @return This builder for chaining.
*/
public Builder addPlannableLocationIds(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensurePlannableLocationIdsIsMutable();
plannableLocationIds_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableLocations].
*
* Requests must set either this field or `plannable_location_id`.
*
*
* repeated string plannable_location_ids = 8;
* @param values The plannableLocationIds to add.
* @return This builder for chaining.
*/
public Builder addAllPlannableLocationIds(
java.lang.Iterable values) {
ensurePlannableLocationIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, plannableLocationIds_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableLocations].
*
* Requests must set either this field or `plannable_location_id`.
*
*
* repeated string plannable_location_ids = 8;
* @return This builder for chaining.
*/
public Builder clearPlannableLocationIds() {
plannableLocationIds_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);;
onChanged();
return this;
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableLocations].
*
* Requests must set either this field or `plannable_location_id`.
*
*
* repeated string plannable_location_ids = 8;
* @param value The bytes of the plannableLocationIds to add.
* @return This builder for chaining.
*/
public Builder addPlannableLocationIdsBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensurePlannableLocationIdsIsMutable();
plannableLocationIds_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private int ageRange_ = 0;
/**
*
* Targeted age range.
* An unset value is equivalent to targeting all ages.
*
*
* .google.ads.googleads.v17.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_range = 2;
* @return The enum numeric value on the wire for ageRange.
*/
@java.lang.Override public int getAgeRangeValue() {
return ageRange_;
}
/**
*
* Targeted age range.
* An unset value is equivalent to targeting all ages.
*
*
* .google.ads.googleads.v17.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_range = 2;
* @param value The enum numeric value on the wire for ageRange to set.
* @return This builder for chaining.
*/
public Builder setAgeRangeValue(int value) {
ageRange_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Targeted age range.
* An unset value is equivalent to targeting all ages.
*
*
* .google.ads.googleads.v17.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_range = 2;
* @return The ageRange.
*/
@java.lang.Override
public com.google.ads.googleads.v17.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange getAgeRange() {
com.google.ads.googleads.v17.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange result = com.google.ads.googleads.v17.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange.forNumber(ageRange_);
return result == null ? com.google.ads.googleads.v17.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange.UNRECOGNIZED : result;
}
/**
*
* Targeted age range.
* An unset value is equivalent to targeting all ages.
*
*
* .google.ads.googleads.v17.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_range = 2;
* @param value The ageRange to set.
* @return This builder for chaining.
*/
public Builder setAgeRange(com.google.ads.googleads.v17.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
ageRange_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Targeted age range.
* An unset value is equivalent to targeting all ages.
*
*
* .google.ads.googleads.v17.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_range = 2;
* @return This builder for chaining.
*/
public Builder clearAgeRange() {
bitField0_ = (bitField0_ & ~0x00000004);
ageRange_ = 0;
onChanged();
return this;
}
private java.util.List genders_ =
java.util.Collections.emptyList();
private void ensureGendersIsMutable() {
if (!((bitField0_ & 0x00000008) != 0)) {
genders_ = new java.util.ArrayList(genders_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.common.GenderInfo, com.google.ads.googleads.v17.common.GenderInfo.Builder, com.google.ads.googleads.v17.common.GenderInfoOrBuilder> gendersBuilder_;
/**
*
* Targeted genders.
* An unset value is equivalent to targeting MALE and FEMALE.
*
*
* repeated .google.ads.googleads.v17.common.GenderInfo genders = 3;
*/
public java.util.List getGendersList() {
if (gendersBuilder_ == null) {
return java.util.Collections.unmodifiableList(genders_);
} else {
return gendersBuilder_.getMessageList();
}
}
/**
*
* Targeted genders.
* An unset value is equivalent to targeting MALE and FEMALE.
*
*
* repeated .google.ads.googleads.v17.common.GenderInfo genders = 3;
*/
public int getGendersCount() {
if (gendersBuilder_ == null) {
return genders_.size();
} else {
return gendersBuilder_.getCount();
}
}
/**
*
* Targeted genders.
* An unset value is equivalent to targeting MALE and FEMALE.
*
*
* repeated .google.ads.googleads.v17.common.GenderInfo genders = 3;
*/
public com.google.ads.googleads.v17.common.GenderInfo getGenders(int index) {
if (gendersBuilder_ == null) {
return genders_.get(index);
} else {
return gendersBuilder_.getMessage(index);
}
}
/**
*
* Targeted genders.
* An unset value is equivalent to targeting MALE and FEMALE.
*
*
* repeated .google.ads.googleads.v17.common.GenderInfo genders = 3;
*/
public Builder setGenders(
int index, com.google.ads.googleads.v17.common.GenderInfo value) {
if (gendersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureGendersIsMutable();
genders_.set(index, value);
onChanged();
} else {
gendersBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Targeted genders.
* An unset value is equivalent to targeting MALE and FEMALE.
*
*
* repeated .google.ads.googleads.v17.common.GenderInfo genders = 3;
*/
public Builder setGenders(
int index, com.google.ads.googleads.v17.common.GenderInfo.Builder builderForValue) {
if (gendersBuilder_ == null) {
ensureGendersIsMutable();
genders_.set(index, builderForValue.build());
onChanged();
} else {
gendersBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Targeted genders.
* An unset value is equivalent to targeting MALE and FEMALE.
*
*
* repeated .google.ads.googleads.v17.common.GenderInfo genders = 3;
*/
public Builder addGenders(com.google.ads.googleads.v17.common.GenderInfo value) {
if (gendersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureGendersIsMutable();
genders_.add(value);
onChanged();
} else {
gendersBuilder_.addMessage(value);
}
return this;
}
/**
*
* Targeted genders.
* An unset value is equivalent to targeting MALE and FEMALE.
*
*
* repeated .google.ads.googleads.v17.common.GenderInfo genders = 3;
*/
public Builder addGenders(
int index, com.google.ads.googleads.v17.common.GenderInfo value) {
if (gendersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureGendersIsMutable();
genders_.add(index, value);
onChanged();
} else {
gendersBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Targeted genders.
* An unset value is equivalent to targeting MALE and FEMALE.
*
*
* repeated .google.ads.googleads.v17.common.GenderInfo genders = 3;
*/
public Builder addGenders(
com.google.ads.googleads.v17.common.GenderInfo.Builder builderForValue) {
if (gendersBuilder_ == null) {
ensureGendersIsMutable();
genders_.add(builderForValue.build());
onChanged();
} else {
gendersBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Targeted genders.
* An unset value is equivalent to targeting MALE and FEMALE.
*
*
* repeated .google.ads.googleads.v17.common.GenderInfo genders = 3;
*/
public Builder addGenders(
int index, com.google.ads.googleads.v17.common.GenderInfo.Builder builderForValue) {
if (gendersBuilder_ == null) {
ensureGendersIsMutable();
genders_.add(index, builderForValue.build());
onChanged();
} else {
gendersBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Targeted genders.
* An unset value is equivalent to targeting MALE and FEMALE.
*
*
* repeated .google.ads.googleads.v17.common.GenderInfo genders = 3;
*/
public Builder addAllGenders(
java.lang.Iterable extends com.google.ads.googleads.v17.common.GenderInfo> values) {
if (gendersBuilder_ == null) {
ensureGendersIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, genders_);
onChanged();
} else {
gendersBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Targeted genders.
* An unset value is equivalent to targeting MALE and FEMALE.
*
*
* repeated .google.ads.googleads.v17.common.GenderInfo genders = 3;
*/
public Builder clearGenders() {
if (gendersBuilder_ == null) {
genders_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
gendersBuilder_.clear();
}
return this;
}
/**
*
* Targeted genders.
* An unset value is equivalent to targeting MALE and FEMALE.
*
*
* repeated .google.ads.googleads.v17.common.GenderInfo genders = 3;
*/
public Builder removeGenders(int index) {
if (gendersBuilder_ == null) {
ensureGendersIsMutable();
genders_.remove(index);
onChanged();
} else {
gendersBuilder_.remove(index);
}
return this;
}
/**
*
* Targeted genders.
* An unset value is equivalent to targeting MALE and FEMALE.
*
*
* repeated .google.ads.googleads.v17.common.GenderInfo genders = 3;
*/
public com.google.ads.googleads.v17.common.GenderInfo.Builder getGendersBuilder(
int index) {
return getGendersFieldBuilder().getBuilder(index);
}
/**
*
* Targeted genders.
* An unset value is equivalent to targeting MALE and FEMALE.
*
*
* repeated .google.ads.googleads.v17.common.GenderInfo genders = 3;
*/
public com.google.ads.googleads.v17.common.GenderInfoOrBuilder getGendersOrBuilder(
int index) {
if (gendersBuilder_ == null) {
return genders_.get(index); } else {
return gendersBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Targeted genders.
* An unset value is equivalent to targeting MALE and FEMALE.
*
*
* repeated .google.ads.googleads.v17.common.GenderInfo genders = 3;
*/
public java.util.List extends com.google.ads.googleads.v17.common.GenderInfoOrBuilder>
getGendersOrBuilderList() {
if (gendersBuilder_ != null) {
return gendersBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(genders_);
}
}
/**
*
* Targeted genders.
* An unset value is equivalent to targeting MALE and FEMALE.
*
*
* repeated .google.ads.googleads.v17.common.GenderInfo genders = 3;
*/
public com.google.ads.googleads.v17.common.GenderInfo.Builder addGendersBuilder() {
return getGendersFieldBuilder().addBuilder(
com.google.ads.googleads.v17.common.GenderInfo.getDefaultInstance());
}
/**
*
* Targeted genders.
* An unset value is equivalent to targeting MALE and FEMALE.
*
*
* repeated .google.ads.googleads.v17.common.GenderInfo genders = 3;
*/
public com.google.ads.googleads.v17.common.GenderInfo.Builder addGendersBuilder(
int index) {
return getGendersFieldBuilder().addBuilder(
index, com.google.ads.googleads.v17.common.GenderInfo.getDefaultInstance());
}
/**
*
* Targeted genders.
* An unset value is equivalent to targeting MALE and FEMALE.
*
*
* repeated .google.ads.googleads.v17.common.GenderInfo genders = 3;
*/
public java.util.List
getGendersBuilderList() {
return getGendersFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.common.GenderInfo, com.google.ads.googleads.v17.common.GenderInfo.Builder, com.google.ads.googleads.v17.common.GenderInfoOrBuilder>
getGendersFieldBuilder() {
if (gendersBuilder_ == null) {
gendersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.common.GenderInfo, com.google.ads.googleads.v17.common.GenderInfo.Builder, com.google.ads.googleads.v17.common.GenderInfoOrBuilder>(
genders_,
((bitField0_ & 0x00000008) != 0),
getParentForChildren(),
isClean());
genders_ = null;
}
return gendersBuilder_;
}
private java.util.List devices_ =
java.util.Collections.emptyList();
private void ensureDevicesIsMutable() {
if (!((bitField0_ & 0x00000010) != 0)) {
devices_ = new java.util.ArrayList(devices_);
bitField0_ |= 0x00000010;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.common.DeviceInfo, com.google.ads.googleads.v17.common.DeviceInfo.Builder, com.google.ads.googleads.v17.common.DeviceInfoOrBuilder> devicesBuilder_;
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* repeated .google.ads.googleads.v17.common.DeviceInfo devices = 4;
*/
public java.util.List getDevicesList() {
if (devicesBuilder_ == null) {
return java.util.Collections.unmodifiableList(devices_);
} else {
return devicesBuilder_.getMessageList();
}
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* repeated .google.ads.googleads.v17.common.DeviceInfo devices = 4;
*/
public int getDevicesCount() {
if (devicesBuilder_ == null) {
return devices_.size();
} else {
return devicesBuilder_.getCount();
}
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* repeated .google.ads.googleads.v17.common.DeviceInfo devices = 4;
*/
public com.google.ads.googleads.v17.common.DeviceInfo getDevices(int index) {
if (devicesBuilder_ == null) {
return devices_.get(index);
} else {
return devicesBuilder_.getMessage(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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* repeated .google.ads.googleads.v17.common.DeviceInfo devices = 4;
*/
public Builder setDevices(
int index, com.google.ads.googleads.v17.common.DeviceInfo value) {
if (devicesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDevicesIsMutable();
devices_.set(index, value);
onChanged();
} else {
devicesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* repeated .google.ads.googleads.v17.common.DeviceInfo devices = 4;
*/
public Builder setDevices(
int index, com.google.ads.googleads.v17.common.DeviceInfo.Builder builderForValue) {
if (devicesBuilder_ == null) {
ensureDevicesIsMutable();
devices_.set(index, builderForValue.build());
onChanged();
} else {
devicesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* repeated .google.ads.googleads.v17.common.DeviceInfo devices = 4;
*/
public Builder addDevices(com.google.ads.googleads.v17.common.DeviceInfo value) {
if (devicesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDevicesIsMutable();
devices_.add(value);
onChanged();
} else {
devicesBuilder_.addMessage(value);
}
return this;
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* repeated .google.ads.googleads.v17.common.DeviceInfo devices = 4;
*/
public Builder addDevices(
int index, com.google.ads.googleads.v17.common.DeviceInfo value) {
if (devicesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDevicesIsMutable();
devices_.add(index, value);
onChanged();
} else {
devicesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* repeated .google.ads.googleads.v17.common.DeviceInfo devices = 4;
*/
public Builder addDevices(
com.google.ads.googleads.v17.common.DeviceInfo.Builder builderForValue) {
if (devicesBuilder_ == null) {
ensureDevicesIsMutable();
devices_.add(builderForValue.build());
onChanged();
} else {
devicesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* repeated .google.ads.googleads.v17.common.DeviceInfo devices = 4;
*/
public Builder addDevices(
int index, com.google.ads.googleads.v17.common.DeviceInfo.Builder builderForValue) {
if (devicesBuilder_ == null) {
ensureDevicesIsMutable();
devices_.add(index, builderForValue.build());
onChanged();
} else {
devicesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* repeated .google.ads.googleads.v17.common.DeviceInfo devices = 4;
*/
public Builder addAllDevices(
java.lang.Iterable extends com.google.ads.googleads.v17.common.DeviceInfo> values) {
if (devicesBuilder_ == null) {
ensureDevicesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, devices_);
onChanged();
} else {
devicesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* repeated .google.ads.googleads.v17.common.DeviceInfo devices = 4;
*/
public Builder clearDevices() {
if (devicesBuilder_ == null) {
devices_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
} else {
devicesBuilder_.clear();
}
return this;
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* repeated .google.ads.googleads.v17.common.DeviceInfo devices = 4;
*/
public Builder removeDevices(int index) {
if (devicesBuilder_ == null) {
ensureDevicesIsMutable();
devices_.remove(index);
onChanged();
} else {
devicesBuilder_.remove(index);
}
return this;
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* repeated .google.ads.googleads.v17.common.DeviceInfo devices = 4;
*/
public com.google.ads.googleads.v17.common.DeviceInfo.Builder getDevicesBuilder(
int index) {
return getDevicesFieldBuilder().getBuilder(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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* repeated .google.ads.googleads.v17.common.DeviceInfo devices = 4;
*/
public com.google.ads.googleads.v17.common.DeviceInfoOrBuilder getDevicesOrBuilder(
int index) {
if (devicesBuilder_ == null) {
return devices_.get(index); } else {
return devicesBuilder_.getMessageOrBuilder(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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* repeated .google.ads.googleads.v17.common.DeviceInfo devices = 4;
*/
public java.util.List extends com.google.ads.googleads.v17.common.DeviceInfoOrBuilder>
getDevicesOrBuilderList() {
if (devicesBuilder_ != null) {
return devicesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(devices_);
}
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* repeated .google.ads.googleads.v17.common.DeviceInfo devices = 4;
*/
public com.google.ads.googleads.v17.common.DeviceInfo.Builder addDevicesBuilder() {
return getDevicesFieldBuilder().addBuilder(
com.google.ads.googleads.v17.common.DeviceInfo.getDefaultInstance());
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* repeated .google.ads.googleads.v17.common.DeviceInfo devices = 4;
*/
public com.google.ads.googleads.v17.common.DeviceInfo.Builder addDevicesBuilder(
int index) {
return getDevicesFieldBuilder().addBuilder(
index, com.google.ads.googleads.v17.common.DeviceInfo.getDefaultInstance());
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* repeated .google.ads.googleads.v17.common.DeviceInfo devices = 4;
*/
public java.util.List
getDevicesBuilderList() {
return getDevicesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.common.DeviceInfo, com.google.ads.googleads.v17.common.DeviceInfo.Builder, com.google.ads.googleads.v17.common.DeviceInfoOrBuilder>
getDevicesFieldBuilder() {
if (devicesBuilder_ == null) {
devicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.common.DeviceInfo, com.google.ads.googleads.v17.common.DeviceInfo.Builder, com.google.ads.googleads.v17.common.DeviceInfoOrBuilder>(
devices_,
((bitField0_ & 0x00000010) != 0),
getParentForChildren(),
isClean());
devices_ = null;
}
return devicesBuilder_;
}
private int network_ = 0;
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* .google.ads.googleads.v17.enums.ReachPlanNetworkEnum.ReachPlanNetwork network = 5;
* @return The enum numeric value on the wire for network.
*/
@java.lang.Override public int getNetworkValue() {
return network_;
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* .google.ads.googleads.v17.enums.ReachPlanNetworkEnum.ReachPlanNetwork network = 5;
* @param value The enum numeric value on the wire for network to set.
* @return This builder for chaining.
*/
public Builder setNetworkValue(int value) {
network_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* .google.ads.googleads.v17.enums.ReachPlanNetworkEnum.ReachPlanNetwork network = 5;
* @return The network.
*/
@java.lang.Override
public com.google.ads.googleads.v17.enums.ReachPlanNetworkEnum.ReachPlanNetwork getNetwork() {
com.google.ads.googleads.v17.enums.ReachPlanNetworkEnum.ReachPlanNetwork result = com.google.ads.googleads.v17.enums.ReachPlanNetworkEnum.ReachPlanNetwork.forNumber(network_);
return result == null ? com.google.ads.googleads.v17.enums.ReachPlanNetworkEnum.ReachPlanNetwork.UNRECOGNIZED : result;
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* .google.ads.googleads.v17.enums.ReachPlanNetworkEnum.ReachPlanNetwork network = 5;
* @param value The network to set.
* @return This builder for chaining.
*/
public Builder setNetwork(com.google.ads.googleads.v17.enums.ReachPlanNetworkEnum.ReachPlanNetwork value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000020;
network_ = value.getNumber();
onChanged();
return this;
}
/**
*
* 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.v17.services.ReachPlanService.ListPlannableProducts].
*
*
* .google.ads.googleads.v17.enums.ReachPlanNetworkEnum.ReachPlanNetwork network = 5;
* @return This builder for chaining.
*/
public Builder clearNetwork() {
bitField0_ = (bitField0_ & ~0x00000020);
network_ = 0;
onChanged();
return this;
}
private com.google.ads.googleads.v17.services.AudienceTargeting audienceTargeting_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.services.AudienceTargeting, com.google.ads.googleads.v17.services.AudienceTargeting.Builder, com.google.ads.googleads.v17.services.AudienceTargetingOrBuilder> audienceTargetingBuilder_;
/**
*
* Targeted audiences.
* If not specified, does not target any specific audience.
*
*
* .google.ads.googleads.v17.services.AudienceTargeting audience_targeting = 7;
* @return Whether the audienceTargeting field is set.
*/
public boolean hasAudienceTargeting() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* Targeted audiences.
* If not specified, does not target any specific audience.
*
*
* .google.ads.googleads.v17.services.AudienceTargeting audience_targeting = 7;
* @return The audienceTargeting.
*/
public com.google.ads.googleads.v17.services.AudienceTargeting getAudienceTargeting() {
if (audienceTargetingBuilder_ == null) {
return audienceTargeting_ == null ? com.google.ads.googleads.v17.services.AudienceTargeting.getDefaultInstance() : audienceTargeting_;
} else {
return audienceTargetingBuilder_.getMessage();
}
}
/**
*
* Targeted audiences.
* If not specified, does not target any specific audience.
*
*
* .google.ads.googleads.v17.services.AudienceTargeting audience_targeting = 7;
*/
public Builder setAudienceTargeting(com.google.ads.googleads.v17.services.AudienceTargeting value) {
if (audienceTargetingBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
audienceTargeting_ = value;
} else {
audienceTargetingBuilder_.setMessage(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* Targeted audiences.
* If not specified, does not target any specific audience.
*
*
* .google.ads.googleads.v17.services.AudienceTargeting audience_targeting = 7;
*/
public Builder setAudienceTargeting(
com.google.ads.googleads.v17.services.AudienceTargeting.Builder builderForValue) {
if (audienceTargetingBuilder_ == null) {
audienceTargeting_ = builderForValue.build();
} else {
audienceTargetingBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* Targeted audiences.
* If not specified, does not target any specific audience.
*
*
* .google.ads.googleads.v17.services.AudienceTargeting audience_targeting = 7;
*/
public Builder mergeAudienceTargeting(com.google.ads.googleads.v17.services.AudienceTargeting value) {
if (audienceTargetingBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0) &&
audienceTargeting_ != null &&
audienceTargeting_ != com.google.ads.googleads.v17.services.AudienceTargeting.getDefaultInstance()) {
getAudienceTargetingBuilder().mergeFrom(value);
} else {
audienceTargeting_ = value;
}
} else {
audienceTargetingBuilder_.mergeFrom(value);
}
if (audienceTargeting_ != null) {
bitField0_ |= 0x00000040;
onChanged();
}
return this;
}
/**
*
* Targeted audiences.
* If not specified, does not target any specific audience.
*
*
* .google.ads.googleads.v17.services.AudienceTargeting audience_targeting = 7;
*/
public Builder clearAudienceTargeting() {
bitField0_ = (bitField0_ & ~0x00000040);
audienceTargeting_ = null;
if (audienceTargetingBuilder_ != null) {
audienceTargetingBuilder_.dispose();
audienceTargetingBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Targeted audiences.
* If not specified, does not target any specific audience.
*
*
* .google.ads.googleads.v17.services.AudienceTargeting audience_targeting = 7;
*/
public com.google.ads.googleads.v17.services.AudienceTargeting.Builder getAudienceTargetingBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getAudienceTargetingFieldBuilder().getBuilder();
}
/**
*
* Targeted audiences.
* If not specified, does not target any specific audience.
*
*
* .google.ads.googleads.v17.services.AudienceTargeting audience_targeting = 7;
*/
public com.google.ads.googleads.v17.services.AudienceTargetingOrBuilder getAudienceTargetingOrBuilder() {
if (audienceTargetingBuilder_ != null) {
return audienceTargetingBuilder_.getMessageOrBuilder();
} else {
return audienceTargeting_ == null ?
com.google.ads.googleads.v17.services.AudienceTargeting.getDefaultInstance() : audienceTargeting_;
}
}
/**
*
* Targeted audiences.
* If not specified, does not target any specific audience.
*
*
* .google.ads.googleads.v17.services.AudienceTargeting audience_targeting = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.services.AudienceTargeting, com.google.ads.googleads.v17.services.AudienceTargeting.Builder, com.google.ads.googleads.v17.services.AudienceTargetingOrBuilder>
getAudienceTargetingFieldBuilder() {
if (audienceTargetingBuilder_ == null) {
audienceTargetingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.services.AudienceTargeting, com.google.ads.googleads.v17.services.AudienceTargeting.Builder, com.google.ads.googleads.v17.services.AudienceTargetingOrBuilder>(
getAudienceTargeting(),
getParentForChildren(),
isClean());
audienceTargeting_ = null;
}
return audienceTargetingBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.ads.googleads.v17.services.Targeting)
}
// @@protoc_insertion_point(class_scope:google.ads.googleads.v17.services.Targeting)
private static final com.google.ads.googleads.v17.services.Targeting DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.ads.googleads.v17.services.Targeting();
}
public static com.google.ads.googleads.v17.services.Targeting getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Targeting parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.ads.googleads.v17.services.Targeting getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy