com.google.ads.googleads.v10.services.PlannableTargeting Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of google-ads-stubs-v10 Show documentation
Show all versions of google-ads-stubs-v10 Show documentation
Stubs for GAAPI version google-ads-stubs-v10
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/ads/googleads/v10/services/reach_plan_service.proto
package com.google.ads.googleads.v10.services;
/**
*
* The targeting for which traffic metrics will be reported.
*
*
* Protobuf type {@code google.ads.googleads.v10.services.PlannableTargeting}
*/
public final class PlannableTargeting extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.ads.googleads.v10.services.PlannableTargeting)
PlannableTargetingOrBuilder {
private static final long serialVersionUID = 0L;
// Use PlannableTargeting.newBuilder() to construct.
private PlannableTargeting(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PlannableTargeting() {
ageRanges_ = java.util.Collections.emptyList();
genders_ = java.util.Collections.emptyList();
devices_ = java.util.Collections.emptyList();
networks_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PlannableTargeting();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v10.services.ReachPlanServiceProto.internal_static_google_ads_googleads_v10_services_PlannableTargeting_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v10.services.ReachPlanServiceProto.internal_static_google_ads_googleads_v10_services_PlannableTargeting_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v10.services.PlannableTargeting.class, com.google.ads.googleads.v10.services.PlannableTargeting.Builder.class);
}
public static final int AGE_RANGES_FIELD_NUMBER = 1;
private java.util.List ageRanges_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, com.google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange> ageRanges_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, com.google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange>() {
public com.google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange convert(java.lang.Integer from) {
@SuppressWarnings("deprecation")
com.google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange result = com.google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange.valueOf(from);
return result == null ? com.google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange.UNRECOGNIZED : result;
}
};
/**
*
* Allowed plannable age ranges for the product for which metrics will be
* reported. Actual targeting is computed by mapping this age range onto
* standard Google common.AgeRangeInfo values.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_ranges = 1;
* @return A list containing the ageRanges.
*/
@java.lang.Override
public java.util.List getAgeRangesList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, com.google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange>(ageRanges_, ageRanges_converter_);
}
/**
*
* Allowed plannable age ranges for the product for which metrics will be
* reported. Actual targeting is computed by mapping this age range onto
* standard Google common.AgeRangeInfo values.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_ranges = 1;
* @return The count of ageRanges.
*/
@java.lang.Override
public int getAgeRangesCount() {
return ageRanges_.size();
}
/**
*
* Allowed plannable age ranges for the product for which metrics will be
* reported. Actual targeting is computed by mapping this age range onto
* standard Google common.AgeRangeInfo values.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_ranges = 1;
* @param index The index of the element to return.
* @return The ageRanges at the given index.
*/
@java.lang.Override
public com.google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange getAgeRanges(int index) {
return ageRanges_converter_.convert(ageRanges_.get(index));
}
/**
*
* Allowed plannable age ranges for the product for which metrics will be
* reported. Actual targeting is computed by mapping this age range onto
* standard Google common.AgeRangeInfo values.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_ranges = 1;
* @return A list containing the enum numeric values on the wire for ageRanges.
*/
@java.lang.Override
public java.util.List
getAgeRangesValueList() {
return ageRanges_;
}
/**
*
* Allowed plannable age ranges for the product for which metrics will be
* reported. Actual targeting is computed by mapping this age range onto
* standard Google common.AgeRangeInfo values.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_ranges = 1;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of ageRanges at the given index.
*/
@java.lang.Override
public int getAgeRangesValue(int index) {
return ageRanges_.get(index);
}
private int ageRangesMemoizedSerializedSize;
public static final int GENDERS_FIELD_NUMBER = 2;
private java.util.List genders_;
/**
*
* Targetable genders for the ad product.
*
*
* repeated .google.ads.googleads.v10.common.GenderInfo genders = 2;
*/
@java.lang.Override
public java.util.List getGendersList() {
return genders_;
}
/**
*
* Targetable genders for the ad product.
*
*
* repeated .google.ads.googleads.v10.common.GenderInfo genders = 2;
*/
@java.lang.Override
public java.util.List extends com.google.ads.googleads.v10.common.GenderInfoOrBuilder>
getGendersOrBuilderList() {
return genders_;
}
/**
*
* Targetable genders for the ad product.
*
*
* repeated .google.ads.googleads.v10.common.GenderInfo genders = 2;
*/
@java.lang.Override
public int getGendersCount() {
return genders_.size();
}
/**
*
* Targetable genders for the ad product.
*
*
* repeated .google.ads.googleads.v10.common.GenderInfo genders = 2;
*/
@java.lang.Override
public com.google.ads.googleads.v10.common.GenderInfo getGenders(int index) {
return genders_.get(index);
}
/**
*
* Targetable genders for the ad product.
*
*
* repeated .google.ads.googleads.v10.common.GenderInfo genders = 2;
*/
@java.lang.Override
public com.google.ads.googleads.v10.common.GenderInfoOrBuilder getGendersOrBuilder(
int index) {
return genders_.get(index);
}
public static final int DEVICES_FIELD_NUMBER = 3;
private java.util.List devices_;
/**
*
* Targetable devices for the ad product.
* TABLET device targeting is automatically applied to reported metrics
* when MOBILE targeting is selected for CPM_MASTHEAD,
* GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
*
*
* repeated .google.ads.googleads.v10.common.DeviceInfo devices = 3;
*/
@java.lang.Override
public java.util.List getDevicesList() {
return devices_;
}
/**
*
* Targetable devices for the ad product.
* TABLET device targeting is automatically applied to reported metrics
* when MOBILE targeting is selected for CPM_MASTHEAD,
* GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
*
*
* repeated .google.ads.googleads.v10.common.DeviceInfo devices = 3;
*/
@java.lang.Override
public java.util.List extends com.google.ads.googleads.v10.common.DeviceInfoOrBuilder>
getDevicesOrBuilderList() {
return devices_;
}
/**
*
* Targetable devices for the ad product.
* TABLET device targeting is automatically applied to reported metrics
* when MOBILE targeting is selected for CPM_MASTHEAD,
* GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
*
*
* repeated .google.ads.googleads.v10.common.DeviceInfo devices = 3;
*/
@java.lang.Override
public int getDevicesCount() {
return devices_.size();
}
/**
*
* Targetable devices for the ad product.
* TABLET device targeting is automatically applied to reported metrics
* when MOBILE targeting is selected for CPM_MASTHEAD,
* GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
*
*
* repeated .google.ads.googleads.v10.common.DeviceInfo devices = 3;
*/
@java.lang.Override
public com.google.ads.googleads.v10.common.DeviceInfo getDevices(int index) {
return devices_.get(index);
}
/**
*
* Targetable devices for the ad product.
* TABLET device targeting is automatically applied to reported metrics
* when MOBILE targeting is selected for CPM_MASTHEAD,
* GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
*
*
* repeated .google.ads.googleads.v10.common.DeviceInfo devices = 3;
*/
@java.lang.Override
public com.google.ads.googleads.v10.common.DeviceInfoOrBuilder getDevicesOrBuilder(
int index) {
return devices_.get(index);
}
public static final int NETWORKS_FIELD_NUMBER = 4;
private java.util.List networks_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, com.google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork> networks_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, com.google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork>() {
public com.google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork convert(java.lang.Integer from) {
@SuppressWarnings("deprecation")
com.google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork result = com.google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork.valueOf(from);
return result == null ? com.google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork.UNRECOGNIZED : result;
}
};
/**
*
* Targetable networks for the ad product.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork networks = 4;
* @return A list containing the networks.
*/
@java.lang.Override
public java.util.List getNetworksList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, com.google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork>(networks_, networks_converter_);
}
/**
*
* Targetable networks for the ad product.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork networks = 4;
* @return The count of networks.
*/
@java.lang.Override
public int getNetworksCount() {
return networks_.size();
}
/**
*
* Targetable networks for the ad product.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork networks = 4;
* @param index The index of the element to return.
* @return The networks at the given index.
*/
@java.lang.Override
public com.google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork getNetworks(int index) {
return networks_converter_.convert(networks_.get(index));
}
/**
*
* Targetable networks for the ad product.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork networks = 4;
* @return A list containing the enum numeric values on the wire for networks.
*/
@java.lang.Override
public java.util.List
getNetworksValueList() {
return networks_;
}
/**
*
* Targetable networks for the ad product.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork networks = 4;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of networks at the given index.
*/
@java.lang.Override
public int getNetworksValue(int index) {
return networks_.get(index);
}
private int networksMemoizedSerializedSize;
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 {
getSerializedSize();
if (getAgeRangesList().size() > 0) {
output.writeUInt32NoTag(10);
output.writeUInt32NoTag(ageRangesMemoizedSerializedSize);
}
for (int i = 0; i < ageRanges_.size(); i++) {
output.writeEnumNoTag(ageRanges_.get(i));
}
for (int i = 0; i < genders_.size(); i++) {
output.writeMessage(2, genders_.get(i));
}
for (int i = 0; i < devices_.size(); i++) {
output.writeMessage(3, devices_.get(i));
}
if (getNetworksList().size() > 0) {
output.writeUInt32NoTag(34);
output.writeUInt32NoTag(networksMemoizedSerializedSize);
}
for (int i = 0; i < networks_.size(); i++) {
output.writeEnumNoTag(networks_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < ageRanges_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(ageRanges_.get(i));
}
size += dataSize;
if (!getAgeRangesList().isEmpty()) { size += 1;
size += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(dataSize);
}ageRangesMemoizedSerializedSize = dataSize;
}
for (int i = 0; i < genders_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, genders_.get(i));
}
for (int i = 0; i < devices_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, devices_.get(i));
}
{
int dataSize = 0;
for (int i = 0; i < networks_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(networks_.get(i));
}
size += dataSize;
if (!getNetworksList().isEmpty()) { size += 1;
size += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(dataSize);
}networksMemoizedSerializedSize = dataSize;
}
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.v10.services.PlannableTargeting)) {
return super.equals(obj);
}
com.google.ads.googleads.v10.services.PlannableTargeting other = (com.google.ads.googleads.v10.services.PlannableTargeting) obj;
if (!ageRanges_.equals(other.ageRanges_)) return false;
if (!getGendersList()
.equals(other.getGendersList())) return false;
if (!getDevicesList()
.equals(other.getDevicesList())) return false;
if (!networks_.equals(other.networks_)) 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 (getAgeRangesCount() > 0) {
hash = (37 * hash) + AGE_RANGES_FIELD_NUMBER;
hash = (53 * hash) + ageRanges_.hashCode();
}
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();
}
if (getNetworksCount() > 0) {
hash = (37 * hash) + NETWORKS_FIELD_NUMBER;
hash = (53 * hash) + networks_.hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.ads.googleads.v10.services.PlannableTargeting parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v10.services.PlannableTargeting 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.v10.services.PlannableTargeting parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v10.services.PlannableTargeting 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.v10.services.PlannableTargeting parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v10.services.PlannableTargeting parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.ads.googleads.v10.services.PlannableTargeting parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v10.services.PlannableTargeting 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.v10.services.PlannableTargeting parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v10.services.PlannableTargeting 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.v10.services.PlannableTargeting parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v10.services.PlannableTargeting 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.v10.services.PlannableTargeting 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.v10.services.PlannableTargeting}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.ads.googleads.v10.services.PlannableTargeting)
com.google.ads.googleads.v10.services.PlannableTargetingOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v10.services.ReachPlanServiceProto.internal_static_google_ads_googleads_v10_services_PlannableTargeting_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v10.services.ReachPlanServiceProto.internal_static_google_ads_googleads_v10_services_PlannableTargeting_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v10.services.PlannableTargeting.class, com.google.ads.googleads.v10.services.PlannableTargeting.Builder.class);
}
// Construct using com.google.ads.googleads.v10.services.PlannableTargeting.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
ageRanges_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
if (gendersBuilder_ == null) {
genders_ = java.util.Collections.emptyList();
} else {
genders_ = null;
gendersBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
if (devicesBuilder_ == null) {
devices_ = java.util.Collections.emptyList();
} else {
devices_ = null;
devicesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
networks_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.ads.googleads.v10.services.ReachPlanServiceProto.internal_static_google_ads_googleads_v10_services_PlannableTargeting_descriptor;
}
@java.lang.Override
public com.google.ads.googleads.v10.services.PlannableTargeting getDefaultInstanceForType() {
return com.google.ads.googleads.v10.services.PlannableTargeting.getDefaultInstance();
}
@java.lang.Override
public com.google.ads.googleads.v10.services.PlannableTargeting build() {
com.google.ads.googleads.v10.services.PlannableTargeting result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.ads.googleads.v10.services.PlannableTargeting buildPartial() {
com.google.ads.googleads.v10.services.PlannableTargeting result = new com.google.ads.googleads.v10.services.PlannableTargeting(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) != 0)) {
ageRanges_ = java.util.Collections.unmodifiableList(ageRanges_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.ageRanges_ = ageRanges_;
if (gendersBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
genders_ = java.util.Collections.unmodifiableList(genders_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.genders_ = genders_;
} else {
result.genders_ = gendersBuilder_.build();
}
if (devicesBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
devices_ = java.util.Collections.unmodifiableList(devices_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.devices_ = devices_;
} else {
result.devices_ = devicesBuilder_.build();
}
if (((bitField0_ & 0x00000008) != 0)) {
networks_ = java.util.Collections.unmodifiableList(networks_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.networks_ = networks_;
onBuilt();
return result;
}
@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.v10.services.PlannableTargeting) {
return mergeFrom((com.google.ads.googleads.v10.services.PlannableTargeting)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.ads.googleads.v10.services.PlannableTargeting other) {
if (other == com.google.ads.googleads.v10.services.PlannableTargeting.getDefaultInstance()) return this;
if (!other.ageRanges_.isEmpty()) {
if (ageRanges_.isEmpty()) {
ageRanges_ = other.ageRanges_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureAgeRangesIsMutable();
ageRanges_.addAll(other.ageRanges_);
}
onChanged();
}
if (gendersBuilder_ == null) {
if (!other.genders_.isEmpty()) {
if (genders_.isEmpty()) {
genders_ = other.genders_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureGendersIsMutable();
genders_.addAll(other.genders_);
}
onChanged();
}
} else {
if (!other.genders_.isEmpty()) {
if (gendersBuilder_.isEmpty()) {
gendersBuilder_.dispose();
gendersBuilder_ = null;
genders_ = other.genders_;
bitField0_ = (bitField0_ & ~0x00000002);
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_ & ~0x00000004);
} else {
ensureDevicesIsMutable();
devices_.addAll(other.devices_);
}
onChanged();
}
} else {
if (!other.devices_.isEmpty()) {
if (devicesBuilder_.isEmpty()) {
devicesBuilder_.dispose();
devicesBuilder_ = null;
devices_ = other.devices_;
bitField0_ = (bitField0_ & ~0x00000004);
devicesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getDevicesFieldBuilder() : null;
} else {
devicesBuilder_.addAllMessages(other.devices_);
}
}
}
if (!other.networks_.isEmpty()) {
if (networks_.isEmpty()) {
networks_ = other.networks_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureNetworksIsMutable();
networks_.addAll(other.networks_);
}
onChanged();
}
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 8: {
int tmpRaw = input.readEnum();
ensureAgeRangesIsMutable();
ageRanges_.add(tmpRaw);
break;
} // case 8
case 10: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int tmpRaw = input.readEnum();
ensureAgeRangesIsMutable();
ageRanges_.add(tmpRaw);
}
input.popLimit(oldLimit);
break;
} // case 10
case 18: {
com.google.ads.googleads.v10.common.GenderInfo m =
input.readMessage(
com.google.ads.googleads.v10.common.GenderInfo.parser(),
extensionRegistry);
if (gendersBuilder_ == null) {
ensureGendersIsMutable();
genders_.add(m);
} else {
gendersBuilder_.addMessage(m);
}
break;
} // case 18
case 26: {
com.google.ads.googleads.v10.common.DeviceInfo m =
input.readMessage(
com.google.ads.googleads.v10.common.DeviceInfo.parser(),
extensionRegistry);
if (devicesBuilder_ == null) {
ensureDevicesIsMutable();
devices_.add(m);
} else {
devicesBuilder_.addMessage(m);
}
break;
} // case 26
case 32: {
int tmpRaw = input.readEnum();
ensureNetworksIsMutable();
networks_.add(tmpRaw);
break;
} // case 32
case 34: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int tmpRaw = input.readEnum();
ensureNetworksIsMutable();
networks_.add(tmpRaw);
}
input.popLimit(oldLimit);
break;
} // case 34
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.util.List ageRanges_ =
java.util.Collections.emptyList();
private void ensureAgeRangesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
ageRanges_ = new java.util.ArrayList(ageRanges_);
bitField0_ |= 0x00000001;
}
}
/**
*
* Allowed plannable age ranges for the product for which metrics will be
* reported. Actual targeting is computed by mapping this age range onto
* standard Google common.AgeRangeInfo values.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_ranges = 1;
* @return A list containing the ageRanges.
*/
public java.util.List getAgeRangesList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, com.google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange>(ageRanges_, ageRanges_converter_);
}
/**
*
* Allowed plannable age ranges for the product for which metrics will be
* reported. Actual targeting is computed by mapping this age range onto
* standard Google common.AgeRangeInfo values.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_ranges = 1;
* @return The count of ageRanges.
*/
public int getAgeRangesCount() {
return ageRanges_.size();
}
/**
*
* Allowed plannable age ranges for the product for which metrics will be
* reported. Actual targeting is computed by mapping this age range onto
* standard Google common.AgeRangeInfo values.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_ranges = 1;
* @param index The index of the element to return.
* @return The ageRanges at the given index.
*/
public com.google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange getAgeRanges(int index) {
return ageRanges_converter_.convert(ageRanges_.get(index));
}
/**
*
* Allowed plannable age ranges for the product for which metrics will be
* reported. Actual targeting is computed by mapping this age range onto
* standard Google common.AgeRangeInfo values.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_ranges = 1;
* @param index The index to set the value at.
* @param value The ageRanges to set.
* @return This builder for chaining.
*/
public Builder setAgeRanges(
int index, com.google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange value) {
if (value == null) {
throw new NullPointerException();
}
ensureAgeRangesIsMutable();
ageRanges_.set(index, value.getNumber());
onChanged();
return this;
}
/**
*
* Allowed plannable age ranges for the product for which metrics will be
* reported. Actual targeting is computed by mapping this age range onto
* standard Google common.AgeRangeInfo values.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_ranges = 1;
* @param value The ageRanges to add.
* @return This builder for chaining.
*/
public Builder addAgeRanges(com.google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange value) {
if (value == null) {
throw new NullPointerException();
}
ensureAgeRangesIsMutable();
ageRanges_.add(value.getNumber());
onChanged();
return this;
}
/**
*
* Allowed plannable age ranges for the product for which metrics will be
* reported. Actual targeting is computed by mapping this age range onto
* standard Google common.AgeRangeInfo values.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_ranges = 1;
* @param values The ageRanges to add.
* @return This builder for chaining.
*/
public Builder addAllAgeRanges(
java.lang.Iterable extends com.google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange> values) {
ensureAgeRangesIsMutable();
for (com.google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange value : values) {
ageRanges_.add(value.getNumber());
}
onChanged();
return this;
}
/**
*
* Allowed plannable age ranges for the product for which metrics will be
* reported. Actual targeting is computed by mapping this age range onto
* standard Google common.AgeRangeInfo values.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_ranges = 1;
* @return This builder for chaining.
*/
public Builder clearAgeRanges() {
ageRanges_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Allowed plannable age ranges for the product for which metrics will be
* reported. Actual targeting is computed by mapping this age range onto
* standard Google common.AgeRangeInfo values.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_ranges = 1;
* @return A list containing the enum numeric values on the wire for ageRanges.
*/
public java.util.List
getAgeRangesValueList() {
return java.util.Collections.unmodifiableList(ageRanges_);
}
/**
*
* Allowed plannable age ranges for the product for which metrics will be
* reported. Actual targeting is computed by mapping this age range onto
* standard Google common.AgeRangeInfo values.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_ranges = 1;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of ageRanges at the given index.
*/
public int getAgeRangesValue(int index) {
return ageRanges_.get(index);
}
/**
*
* Allowed plannable age ranges for the product for which metrics will be
* reported. Actual targeting is computed by mapping this age range onto
* standard Google common.AgeRangeInfo values.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_ranges = 1;
* @param index The index to set the value at.
* @param value The enum numeric value on the wire for ageRanges to set.
* @return This builder for chaining.
*/
public Builder setAgeRangesValue(
int index, int value) {
ensureAgeRangesIsMutable();
ageRanges_.set(index, value);
onChanged();
return this;
}
/**
*
* Allowed plannable age ranges for the product for which metrics will be
* reported. Actual targeting is computed by mapping this age range onto
* standard Google common.AgeRangeInfo values.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_ranges = 1;
* @param value The enum numeric value on the wire for ageRanges to add.
* @return This builder for chaining.
*/
public Builder addAgeRangesValue(int value) {
ensureAgeRangesIsMutable();
ageRanges_.add(value);
onChanged();
return this;
}
/**
*
* Allowed plannable age ranges for the product for which metrics will be
* reported. Actual targeting is computed by mapping this age range onto
* standard Google common.AgeRangeInfo values.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange age_ranges = 1;
* @param values The enum numeric values on the wire for ageRanges to add.
* @return This builder for chaining.
*/
public Builder addAllAgeRangesValue(
java.lang.Iterable values) {
ensureAgeRangesIsMutable();
for (int value : values) {
ageRanges_.add(value);
}
onChanged();
return this;
}
private java.util.List genders_ =
java.util.Collections.emptyList();
private void ensureGendersIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
genders_ = new java.util.ArrayList(genders_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v10.common.GenderInfo, com.google.ads.googleads.v10.common.GenderInfo.Builder, com.google.ads.googleads.v10.common.GenderInfoOrBuilder> gendersBuilder_;
/**
*
* Targetable genders for the ad product.
*
*
* repeated .google.ads.googleads.v10.common.GenderInfo genders = 2;
*/
public java.util.List getGendersList() {
if (gendersBuilder_ == null) {
return java.util.Collections.unmodifiableList(genders_);
} else {
return gendersBuilder_.getMessageList();
}
}
/**
*
* Targetable genders for the ad product.
*
*
* repeated .google.ads.googleads.v10.common.GenderInfo genders = 2;
*/
public int getGendersCount() {
if (gendersBuilder_ == null) {
return genders_.size();
} else {
return gendersBuilder_.getCount();
}
}
/**
*
* Targetable genders for the ad product.
*
*
* repeated .google.ads.googleads.v10.common.GenderInfo genders = 2;
*/
public com.google.ads.googleads.v10.common.GenderInfo getGenders(int index) {
if (gendersBuilder_ == null) {
return genders_.get(index);
} else {
return gendersBuilder_.getMessage(index);
}
}
/**
*
* Targetable genders for the ad product.
*
*
* repeated .google.ads.googleads.v10.common.GenderInfo genders = 2;
*/
public Builder setGenders(
int index, com.google.ads.googleads.v10.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;
}
/**
*
* Targetable genders for the ad product.
*
*
* repeated .google.ads.googleads.v10.common.GenderInfo genders = 2;
*/
public Builder setGenders(
int index, com.google.ads.googleads.v10.common.GenderInfo.Builder builderForValue) {
if (gendersBuilder_ == null) {
ensureGendersIsMutable();
genders_.set(index, builderForValue.build());
onChanged();
} else {
gendersBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Targetable genders for the ad product.
*
*
* repeated .google.ads.googleads.v10.common.GenderInfo genders = 2;
*/
public Builder addGenders(com.google.ads.googleads.v10.common.GenderInfo value) {
if (gendersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureGendersIsMutable();
genders_.add(value);
onChanged();
} else {
gendersBuilder_.addMessage(value);
}
return this;
}
/**
*
* Targetable genders for the ad product.
*
*
* repeated .google.ads.googleads.v10.common.GenderInfo genders = 2;
*/
public Builder addGenders(
int index, com.google.ads.googleads.v10.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;
}
/**
*
* Targetable genders for the ad product.
*
*
* repeated .google.ads.googleads.v10.common.GenderInfo genders = 2;
*/
public Builder addGenders(
com.google.ads.googleads.v10.common.GenderInfo.Builder builderForValue) {
if (gendersBuilder_ == null) {
ensureGendersIsMutable();
genders_.add(builderForValue.build());
onChanged();
} else {
gendersBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Targetable genders for the ad product.
*
*
* repeated .google.ads.googleads.v10.common.GenderInfo genders = 2;
*/
public Builder addGenders(
int index, com.google.ads.googleads.v10.common.GenderInfo.Builder builderForValue) {
if (gendersBuilder_ == null) {
ensureGendersIsMutable();
genders_.add(index, builderForValue.build());
onChanged();
} else {
gendersBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Targetable genders for the ad product.
*
*
* repeated .google.ads.googleads.v10.common.GenderInfo genders = 2;
*/
public Builder addAllGenders(
java.lang.Iterable extends com.google.ads.googleads.v10.common.GenderInfo> values) {
if (gendersBuilder_ == null) {
ensureGendersIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, genders_);
onChanged();
} else {
gendersBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Targetable genders for the ad product.
*
*
* repeated .google.ads.googleads.v10.common.GenderInfo genders = 2;
*/
public Builder clearGenders() {
if (gendersBuilder_ == null) {
genders_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
gendersBuilder_.clear();
}
return this;
}
/**
*
* Targetable genders for the ad product.
*
*
* repeated .google.ads.googleads.v10.common.GenderInfo genders = 2;
*/
public Builder removeGenders(int index) {
if (gendersBuilder_ == null) {
ensureGendersIsMutable();
genders_.remove(index);
onChanged();
} else {
gendersBuilder_.remove(index);
}
return this;
}
/**
*
* Targetable genders for the ad product.
*
*
* repeated .google.ads.googleads.v10.common.GenderInfo genders = 2;
*/
public com.google.ads.googleads.v10.common.GenderInfo.Builder getGendersBuilder(
int index) {
return getGendersFieldBuilder().getBuilder(index);
}
/**
*
* Targetable genders for the ad product.
*
*
* repeated .google.ads.googleads.v10.common.GenderInfo genders = 2;
*/
public com.google.ads.googleads.v10.common.GenderInfoOrBuilder getGendersOrBuilder(
int index) {
if (gendersBuilder_ == null) {
return genders_.get(index); } else {
return gendersBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Targetable genders for the ad product.
*
*
* repeated .google.ads.googleads.v10.common.GenderInfo genders = 2;
*/
public java.util.List extends com.google.ads.googleads.v10.common.GenderInfoOrBuilder>
getGendersOrBuilderList() {
if (gendersBuilder_ != null) {
return gendersBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(genders_);
}
}
/**
*
* Targetable genders for the ad product.
*
*
* repeated .google.ads.googleads.v10.common.GenderInfo genders = 2;
*/
public com.google.ads.googleads.v10.common.GenderInfo.Builder addGendersBuilder() {
return getGendersFieldBuilder().addBuilder(
com.google.ads.googleads.v10.common.GenderInfo.getDefaultInstance());
}
/**
*
* Targetable genders for the ad product.
*
*
* repeated .google.ads.googleads.v10.common.GenderInfo genders = 2;
*/
public com.google.ads.googleads.v10.common.GenderInfo.Builder addGendersBuilder(
int index) {
return getGendersFieldBuilder().addBuilder(
index, com.google.ads.googleads.v10.common.GenderInfo.getDefaultInstance());
}
/**
*
* Targetable genders for the ad product.
*
*
* repeated .google.ads.googleads.v10.common.GenderInfo genders = 2;
*/
public java.util.List
getGendersBuilderList() {
return getGendersFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v10.common.GenderInfo, com.google.ads.googleads.v10.common.GenderInfo.Builder, com.google.ads.googleads.v10.common.GenderInfoOrBuilder>
getGendersFieldBuilder() {
if (gendersBuilder_ == null) {
gendersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v10.common.GenderInfo, com.google.ads.googleads.v10.common.GenderInfo.Builder, com.google.ads.googleads.v10.common.GenderInfoOrBuilder>(
genders_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
genders_ = null;
}
return gendersBuilder_;
}
private java.util.List devices_ =
java.util.Collections.emptyList();
private void ensureDevicesIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
devices_ = new java.util.ArrayList(devices_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v10.common.DeviceInfo, com.google.ads.googleads.v10.common.DeviceInfo.Builder, com.google.ads.googleads.v10.common.DeviceInfoOrBuilder> devicesBuilder_;
/**
*
* Targetable devices for the ad product.
* TABLET device targeting is automatically applied to reported metrics
* when MOBILE targeting is selected for CPM_MASTHEAD,
* GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
*
*
* repeated .google.ads.googleads.v10.common.DeviceInfo devices = 3;
*/
public java.util.List getDevicesList() {
if (devicesBuilder_ == null) {
return java.util.Collections.unmodifiableList(devices_);
} else {
return devicesBuilder_.getMessageList();
}
}
/**
*
* Targetable devices for the ad product.
* TABLET device targeting is automatically applied to reported metrics
* when MOBILE targeting is selected for CPM_MASTHEAD,
* GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
*
*
* repeated .google.ads.googleads.v10.common.DeviceInfo devices = 3;
*/
public int getDevicesCount() {
if (devicesBuilder_ == null) {
return devices_.size();
} else {
return devicesBuilder_.getCount();
}
}
/**
*
* Targetable devices for the ad product.
* TABLET device targeting is automatically applied to reported metrics
* when MOBILE targeting is selected for CPM_MASTHEAD,
* GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
*
*
* repeated .google.ads.googleads.v10.common.DeviceInfo devices = 3;
*/
public com.google.ads.googleads.v10.common.DeviceInfo getDevices(int index) {
if (devicesBuilder_ == null) {
return devices_.get(index);
} else {
return devicesBuilder_.getMessage(index);
}
}
/**
*
* Targetable devices for the ad product.
* TABLET device targeting is automatically applied to reported metrics
* when MOBILE targeting is selected for CPM_MASTHEAD,
* GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
*
*
* repeated .google.ads.googleads.v10.common.DeviceInfo devices = 3;
*/
public Builder setDevices(
int index, com.google.ads.googleads.v10.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;
}
/**
*
* Targetable devices for the ad product.
* TABLET device targeting is automatically applied to reported metrics
* when MOBILE targeting is selected for CPM_MASTHEAD,
* GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
*
*
* repeated .google.ads.googleads.v10.common.DeviceInfo devices = 3;
*/
public Builder setDevices(
int index, com.google.ads.googleads.v10.common.DeviceInfo.Builder builderForValue) {
if (devicesBuilder_ == null) {
ensureDevicesIsMutable();
devices_.set(index, builderForValue.build());
onChanged();
} else {
devicesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Targetable devices for the ad product.
* TABLET device targeting is automatically applied to reported metrics
* when MOBILE targeting is selected for CPM_MASTHEAD,
* GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
*
*
* repeated .google.ads.googleads.v10.common.DeviceInfo devices = 3;
*/
public Builder addDevices(com.google.ads.googleads.v10.common.DeviceInfo value) {
if (devicesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDevicesIsMutable();
devices_.add(value);
onChanged();
} else {
devicesBuilder_.addMessage(value);
}
return this;
}
/**
*
* Targetable devices for the ad product.
* TABLET device targeting is automatically applied to reported metrics
* when MOBILE targeting is selected for CPM_MASTHEAD,
* GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
*
*
* repeated .google.ads.googleads.v10.common.DeviceInfo devices = 3;
*/
public Builder addDevices(
int index, com.google.ads.googleads.v10.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;
}
/**
*
* Targetable devices for the ad product.
* TABLET device targeting is automatically applied to reported metrics
* when MOBILE targeting is selected for CPM_MASTHEAD,
* GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
*
*
* repeated .google.ads.googleads.v10.common.DeviceInfo devices = 3;
*/
public Builder addDevices(
com.google.ads.googleads.v10.common.DeviceInfo.Builder builderForValue) {
if (devicesBuilder_ == null) {
ensureDevicesIsMutable();
devices_.add(builderForValue.build());
onChanged();
} else {
devicesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Targetable devices for the ad product.
* TABLET device targeting is automatically applied to reported metrics
* when MOBILE targeting is selected for CPM_MASTHEAD,
* GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
*
*
* repeated .google.ads.googleads.v10.common.DeviceInfo devices = 3;
*/
public Builder addDevices(
int index, com.google.ads.googleads.v10.common.DeviceInfo.Builder builderForValue) {
if (devicesBuilder_ == null) {
ensureDevicesIsMutable();
devices_.add(index, builderForValue.build());
onChanged();
} else {
devicesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Targetable devices for the ad product.
* TABLET device targeting is automatically applied to reported metrics
* when MOBILE targeting is selected for CPM_MASTHEAD,
* GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
*
*
* repeated .google.ads.googleads.v10.common.DeviceInfo devices = 3;
*/
public Builder addAllDevices(
java.lang.Iterable extends com.google.ads.googleads.v10.common.DeviceInfo> values) {
if (devicesBuilder_ == null) {
ensureDevicesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, devices_);
onChanged();
} else {
devicesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Targetable devices for the ad product.
* TABLET device targeting is automatically applied to reported metrics
* when MOBILE targeting is selected for CPM_MASTHEAD,
* GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
*
*
* repeated .google.ads.googleads.v10.common.DeviceInfo devices = 3;
*/
public Builder clearDevices() {
if (devicesBuilder_ == null) {
devices_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
devicesBuilder_.clear();
}
return this;
}
/**
*
* Targetable devices for the ad product.
* TABLET device targeting is automatically applied to reported metrics
* when MOBILE targeting is selected for CPM_MASTHEAD,
* GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
*
*
* repeated .google.ads.googleads.v10.common.DeviceInfo devices = 3;
*/
public Builder removeDevices(int index) {
if (devicesBuilder_ == null) {
ensureDevicesIsMutable();
devices_.remove(index);
onChanged();
} else {
devicesBuilder_.remove(index);
}
return this;
}
/**
*
* Targetable devices for the ad product.
* TABLET device targeting is automatically applied to reported metrics
* when MOBILE targeting is selected for CPM_MASTHEAD,
* GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
*
*
* repeated .google.ads.googleads.v10.common.DeviceInfo devices = 3;
*/
public com.google.ads.googleads.v10.common.DeviceInfo.Builder getDevicesBuilder(
int index) {
return getDevicesFieldBuilder().getBuilder(index);
}
/**
*
* Targetable devices for the ad product.
* TABLET device targeting is automatically applied to reported metrics
* when MOBILE targeting is selected for CPM_MASTHEAD,
* GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
*
*
* repeated .google.ads.googleads.v10.common.DeviceInfo devices = 3;
*/
public com.google.ads.googleads.v10.common.DeviceInfoOrBuilder getDevicesOrBuilder(
int index) {
if (devicesBuilder_ == null) {
return devices_.get(index); } else {
return devicesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Targetable devices for the ad product.
* TABLET device targeting is automatically applied to reported metrics
* when MOBILE targeting is selected for CPM_MASTHEAD,
* GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
*
*
* repeated .google.ads.googleads.v10.common.DeviceInfo devices = 3;
*/
public java.util.List extends com.google.ads.googleads.v10.common.DeviceInfoOrBuilder>
getDevicesOrBuilderList() {
if (devicesBuilder_ != null) {
return devicesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(devices_);
}
}
/**
*
* Targetable devices for the ad product.
* TABLET device targeting is automatically applied to reported metrics
* when MOBILE targeting is selected for CPM_MASTHEAD,
* GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
*
*
* repeated .google.ads.googleads.v10.common.DeviceInfo devices = 3;
*/
public com.google.ads.googleads.v10.common.DeviceInfo.Builder addDevicesBuilder() {
return getDevicesFieldBuilder().addBuilder(
com.google.ads.googleads.v10.common.DeviceInfo.getDefaultInstance());
}
/**
*
* Targetable devices for the ad product.
* TABLET device targeting is automatically applied to reported metrics
* when MOBILE targeting is selected for CPM_MASTHEAD,
* GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
*
*
* repeated .google.ads.googleads.v10.common.DeviceInfo devices = 3;
*/
public com.google.ads.googleads.v10.common.DeviceInfo.Builder addDevicesBuilder(
int index) {
return getDevicesFieldBuilder().addBuilder(
index, com.google.ads.googleads.v10.common.DeviceInfo.getDefaultInstance());
}
/**
*
* Targetable devices for the ad product.
* TABLET device targeting is automatically applied to reported metrics
* when MOBILE targeting is selected for CPM_MASTHEAD,
* GOOGLE_PREFERRED_BUMPER, and GOOGLE_PREFERRED_SHORT products.
*
*
* repeated .google.ads.googleads.v10.common.DeviceInfo devices = 3;
*/
public java.util.List
getDevicesBuilderList() {
return getDevicesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v10.common.DeviceInfo, com.google.ads.googleads.v10.common.DeviceInfo.Builder, com.google.ads.googleads.v10.common.DeviceInfoOrBuilder>
getDevicesFieldBuilder() {
if (devicesBuilder_ == null) {
devicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v10.common.DeviceInfo, com.google.ads.googleads.v10.common.DeviceInfo.Builder, com.google.ads.googleads.v10.common.DeviceInfoOrBuilder>(
devices_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
devices_ = null;
}
return devicesBuilder_;
}
private java.util.List networks_ =
java.util.Collections.emptyList();
private void ensureNetworksIsMutable() {
if (!((bitField0_ & 0x00000008) != 0)) {
networks_ = new java.util.ArrayList(networks_);
bitField0_ |= 0x00000008;
}
}
/**
*
* Targetable networks for the ad product.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork networks = 4;
* @return A list containing the networks.
*/
public java.util.List getNetworksList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, com.google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork>(networks_, networks_converter_);
}
/**
*
* Targetable networks for the ad product.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork networks = 4;
* @return The count of networks.
*/
public int getNetworksCount() {
return networks_.size();
}
/**
*
* Targetable networks for the ad product.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork networks = 4;
* @param index The index of the element to return.
* @return The networks at the given index.
*/
public com.google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork getNetworks(int index) {
return networks_converter_.convert(networks_.get(index));
}
/**
*
* Targetable networks for the ad product.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork networks = 4;
* @param index The index to set the value at.
* @param value The networks to set.
* @return This builder for chaining.
*/
public Builder setNetworks(
int index, com.google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork value) {
if (value == null) {
throw new NullPointerException();
}
ensureNetworksIsMutable();
networks_.set(index, value.getNumber());
onChanged();
return this;
}
/**
*
* Targetable networks for the ad product.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork networks = 4;
* @param value The networks to add.
* @return This builder for chaining.
*/
public Builder addNetworks(com.google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork value) {
if (value == null) {
throw new NullPointerException();
}
ensureNetworksIsMutable();
networks_.add(value.getNumber());
onChanged();
return this;
}
/**
*
* Targetable networks for the ad product.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork networks = 4;
* @param values The networks to add.
* @return This builder for chaining.
*/
public Builder addAllNetworks(
java.lang.Iterable extends com.google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork> values) {
ensureNetworksIsMutable();
for (com.google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork value : values) {
networks_.add(value.getNumber());
}
onChanged();
return this;
}
/**
*
* Targetable networks for the ad product.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork networks = 4;
* @return This builder for chaining.
*/
public Builder clearNetworks() {
networks_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
* Targetable networks for the ad product.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork networks = 4;
* @return A list containing the enum numeric values on the wire for networks.
*/
public java.util.List
getNetworksValueList() {
return java.util.Collections.unmodifiableList(networks_);
}
/**
*
* Targetable networks for the ad product.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork networks = 4;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of networks at the given index.
*/
public int getNetworksValue(int index) {
return networks_.get(index);
}
/**
*
* Targetable networks for the ad product.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork networks = 4;
* @param index The index to set the value at.
* @param value The enum numeric value on the wire for networks to set.
* @return This builder for chaining.
*/
public Builder setNetworksValue(
int index, int value) {
ensureNetworksIsMutable();
networks_.set(index, value);
onChanged();
return this;
}
/**
*
* Targetable networks for the ad product.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork networks = 4;
* @param value The enum numeric value on the wire for networks to add.
* @return This builder for chaining.
*/
public Builder addNetworksValue(int value) {
ensureNetworksIsMutable();
networks_.add(value);
onChanged();
return this;
}
/**
*
* Targetable networks for the ad product.
*
*
* repeated .google.ads.googleads.v10.enums.ReachPlanNetworkEnum.ReachPlanNetwork networks = 4;
* @param values The enum numeric values on the wire for networks to add.
* @return This builder for chaining.
*/
public Builder addAllNetworksValue(
java.lang.Iterable values) {
ensureNetworksIsMutable();
for (int value : values) {
networks_.add(value);
}
onChanged();
return this;
}
@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.v10.services.PlannableTargeting)
}
// @@protoc_insertion_point(class_scope:google.ads.googleads.v10.services.PlannableTargeting)
private static final com.google.ads.googleads.v10.services.PlannableTargeting DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.ads.googleads.v10.services.PlannableTargeting();
}
public static com.google.ads.googleads.v10.services.PlannableTargeting getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PlannableTargeting 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.v10.services.PlannableTargeting getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy