com.google.ads.googleads.v17.common.TargetingSetting 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/common/targeting_setting.proto
// Protobuf Java Version: 3.25.3
package com.google.ads.googleads.v17.common;
/**
*
* Settings for the targeting-related features, at the campaign and ad group
* levels. For more details about the targeting setting, visit
* https://support.google.com/google-ads/answer/7365594
*
*
* Protobuf type {@code google.ads.googleads.v17.common.TargetingSetting}
*/
public final class TargetingSetting extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.ads.googleads.v17.common.TargetingSetting)
TargetingSettingOrBuilder {
private static final long serialVersionUID = 0L;
// Use TargetingSetting.newBuilder() to construct.
private TargetingSetting(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TargetingSetting() {
targetRestrictions_ = java.util.Collections.emptyList();
targetRestrictionOperations_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TargetingSetting();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.common.TargetingSettingProto.internal_static_google_ads_googleads_v17_common_TargetingSetting_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v17.common.TargetingSettingProto.internal_static_google_ads_googleads_v17_common_TargetingSetting_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.common.TargetingSetting.class, com.google.ads.googleads.v17.common.TargetingSetting.Builder.class);
}
public static final int TARGET_RESTRICTIONS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List targetRestrictions_;
/**
*
* The per-targeting-dimension setting to restrict the reach of your campaign
* or ad group.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestriction target_restrictions = 1;
*/
@java.lang.Override
public java.util.List getTargetRestrictionsList() {
return targetRestrictions_;
}
/**
*
* The per-targeting-dimension setting to restrict the reach of your campaign
* or ad group.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestriction target_restrictions = 1;
*/
@java.lang.Override
public java.util.List extends com.google.ads.googleads.v17.common.TargetRestrictionOrBuilder>
getTargetRestrictionsOrBuilderList() {
return targetRestrictions_;
}
/**
*
* The per-targeting-dimension setting to restrict the reach of your campaign
* or ad group.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestriction target_restrictions = 1;
*/
@java.lang.Override
public int getTargetRestrictionsCount() {
return targetRestrictions_.size();
}
/**
*
* The per-targeting-dimension setting to restrict the reach of your campaign
* or ad group.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestriction target_restrictions = 1;
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.TargetRestriction getTargetRestrictions(int index) {
return targetRestrictions_.get(index);
}
/**
*
* The per-targeting-dimension setting to restrict the reach of your campaign
* or ad group.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestriction target_restrictions = 1;
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.TargetRestrictionOrBuilder getTargetRestrictionsOrBuilder(
int index) {
return targetRestrictions_.get(index);
}
public static final int TARGET_RESTRICTION_OPERATIONS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List targetRestrictionOperations_;
/**
*
* The list of operations changing the target restrictions.
*
* Adding a target restriction with a targeting dimension that already exists
* causes the existing target restriction to be replaced with the new value.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestrictionOperation target_restriction_operations = 2;
*/
@java.lang.Override
public java.util.List getTargetRestrictionOperationsList() {
return targetRestrictionOperations_;
}
/**
*
* The list of operations changing the target restrictions.
*
* Adding a target restriction with a targeting dimension that already exists
* causes the existing target restriction to be replaced with the new value.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestrictionOperation target_restriction_operations = 2;
*/
@java.lang.Override
public java.util.List extends com.google.ads.googleads.v17.common.TargetRestrictionOperationOrBuilder>
getTargetRestrictionOperationsOrBuilderList() {
return targetRestrictionOperations_;
}
/**
*
* The list of operations changing the target restrictions.
*
* Adding a target restriction with a targeting dimension that already exists
* causes the existing target restriction to be replaced with the new value.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestrictionOperation target_restriction_operations = 2;
*/
@java.lang.Override
public int getTargetRestrictionOperationsCount() {
return targetRestrictionOperations_.size();
}
/**
*
* The list of operations changing the target restrictions.
*
* Adding a target restriction with a targeting dimension that already exists
* causes the existing target restriction to be replaced with the new value.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestrictionOperation target_restriction_operations = 2;
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.TargetRestrictionOperation getTargetRestrictionOperations(int index) {
return targetRestrictionOperations_.get(index);
}
/**
*
* The list of operations changing the target restrictions.
*
* Adding a target restriction with a targeting dimension that already exists
* causes the existing target restriction to be replaced with the new value.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestrictionOperation target_restriction_operations = 2;
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.TargetRestrictionOperationOrBuilder getTargetRestrictionOperationsOrBuilder(
int index) {
return targetRestrictionOperations_.get(index);
}
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 {
for (int i = 0; i < targetRestrictions_.size(); i++) {
output.writeMessage(1, targetRestrictions_.get(i));
}
for (int i = 0; i < targetRestrictionOperations_.size(); i++) {
output.writeMessage(2, targetRestrictionOperations_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < targetRestrictions_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, targetRestrictions_.get(i));
}
for (int i = 0; i < targetRestrictionOperations_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, targetRestrictionOperations_.get(i));
}
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.common.TargetingSetting)) {
return super.equals(obj);
}
com.google.ads.googleads.v17.common.TargetingSetting other = (com.google.ads.googleads.v17.common.TargetingSetting) obj;
if (!getTargetRestrictionsList()
.equals(other.getTargetRestrictionsList())) return false;
if (!getTargetRestrictionOperationsList()
.equals(other.getTargetRestrictionOperationsList())) 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 (getTargetRestrictionsCount() > 0) {
hash = (37 * hash) + TARGET_RESTRICTIONS_FIELD_NUMBER;
hash = (53 * hash) + getTargetRestrictionsList().hashCode();
}
if (getTargetRestrictionOperationsCount() > 0) {
hash = (37 * hash) + TARGET_RESTRICTION_OPERATIONS_FIELD_NUMBER;
hash = (53 * hash) + getTargetRestrictionOperationsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.ads.googleads.v17.common.TargetingSetting parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.common.TargetingSetting 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.common.TargetingSetting parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.common.TargetingSetting 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.common.TargetingSetting parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.common.TargetingSetting 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.common.TargetingSetting parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v17.common.TargetingSetting 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.common.TargetingSetting parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v17.common.TargetingSetting 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.common.TargetingSetting 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.common.TargetingSetting 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.common.TargetingSetting 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;
}
/**
*
* Settings for the targeting-related features, at the campaign and ad group
* levels. For more details about the targeting setting, visit
* https://support.google.com/google-ads/answer/7365594
*
*
* Protobuf type {@code google.ads.googleads.v17.common.TargetingSetting}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.ads.googleads.v17.common.TargetingSetting)
com.google.ads.googleads.v17.common.TargetingSettingOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.common.TargetingSettingProto.internal_static_google_ads_googleads_v17_common_TargetingSetting_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v17.common.TargetingSettingProto.internal_static_google_ads_googleads_v17_common_TargetingSetting_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.common.TargetingSetting.class, com.google.ads.googleads.v17.common.TargetingSetting.Builder.class);
}
// Construct using com.google.ads.googleads.v17.common.TargetingSetting.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (targetRestrictionsBuilder_ == null) {
targetRestrictions_ = java.util.Collections.emptyList();
} else {
targetRestrictions_ = null;
targetRestrictionsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
if (targetRestrictionOperationsBuilder_ == null) {
targetRestrictionOperations_ = java.util.Collections.emptyList();
} else {
targetRestrictionOperations_ = null;
targetRestrictionOperationsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.ads.googleads.v17.common.TargetingSettingProto.internal_static_google_ads_googleads_v17_common_TargetingSetting_descriptor;
}
@java.lang.Override
public com.google.ads.googleads.v17.common.TargetingSetting getDefaultInstanceForType() {
return com.google.ads.googleads.v17.common.TargetingSetting.getDefaultInstance();
}
@java.lang.Override
public com.google.ads.googleads.v17.common.TargetingSetting build() {
com.google.ads.googleads.v17.common.TargetingSetting result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.ads.googleads.v17.common.TargetingSetting buildPartial() {
com.google.ads.googleads.v17.common.TargetingSetting result = new com.google.ads.googleads.v17.common.TargetingSetting(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.ads.googleads.v17.common.TargetingSetting result) {
if (targetRestrictionsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
targetRestrictions_ = java.util.Collections.unmodifiableList(targetRestrictions_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.targetRestrictions_ = targetRestrictions_;
} else {
result.targetRestrictions_ = targetRestrictionsBuilder_.build();
}
if (targetRestrictionOperationsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
targetRestrictionOperations_ = java.util.Collections.unmodifiableList(targetRestrictionOperations_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.targetRestrictionOperations_ = targetRestrictionOperations_;
} else {
result.targetRestrictionOperations_ = targetRestrictionOperationsBuilder_.build();
}
}
private void buildPartial0(com.google.ads.googleads.v17.common.TargetingSetting result) {
int from_bitField0_ = 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.common.TargetingSetting) {
return mergeFrom((com.google.ads.googleads.v17.common.TargetingSetting)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.ads.googleads.v17.common.TargetingSetting other) {
if (other == com.google.ads.googleads.v17.common.TargetingSetting.getDefaultInstance()) return this;
if (targetRestrictionsBuilder_ == null) {
if (!other.targetRestrictions_.isEmpty()) {
if (targetRestrictions_.isEmpty()) {
targetRestrictions_ = other.targetRestrictions_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureTargetRestrictionsIsMutable();
targetRestrictions_.addAll(other.targetRestrictions_);
}
onChanged();
}
} else {
if (!other.targetRestrictions_.isEmpty()) {
if (targetRestrictionsBuilder_.isEmpty()) {
targetRestrictionsBuilder_.dispose();
targetRestrictionsBuilder_ = null;
targetRestrictions_ = other.targetRestrictions_;
bitField0_ = (bitField0_ & ~0x00000001);
targetRestrictionsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getTargetRestrictionsFieldBuilder() : null;
} else {
targetRestrictionsBuilder_.addAllMessages(other.targetRestrictions_);
}
}
}
if (targetRestrictionOperationsBuilder_ == null) {
if (!other.targetRestrictionOperations_.isEmpty()) {
if (targetRestrictionOperations_.isEmpty()) {
targetRestrictionOperations_ = other.targetRestrictionOperations_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureTargetRestrictionOperationsIsMutable();
targetRestrictionOperations_.addAll(other.targetRestrictionOperations_);
}
onChanged();
}
} else {
if (!other.targetRestrictionOperations_.isEmpty()) {
if (targetRestrictionOperationsBuilder_.isEmpty()) {
targetRestrictionOperationsBuilder_.dispose();
targetRestrictionOperationsBuilder_ = null;
targetRestrictionOperations_ = other.targetRestrictionOperations_;
bitField0_ = (bitField0_ & ~0x00000002);
targetRestrictionOperationsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getTargetRestrictionOperationsFieldBuilder() : null;
} else {
targetRestrictionOperationsBuilder_.addAllMessages(other.targetRestrictionOperations_);
}
}
}
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 10: {
com.google.ads.googleads.v17.common.TargetRestriction m =
input.readMessage(
com.google.ads.googleads.v17.common.TargetRestriction.parser(),
extensionRegistry);
if (targetRestrictionsBuilder_ == null) {
ensureTargetRestrictionsIsMutable();
targetRestrictions_.add(m);
} else {
targetRestrictionsBuilder_.addMessage(m);
}
break;
} // case 10
case 18: {
com.google.ads.googleads.v17.common.TargetRestrictionOperation m =
input.readMessage(
com.google.ads.googleads.v17.common.TargetRestrictionOperation.parser(),
extensionRegistry);
if (targetRestrictionOperationsBuilder_ == null) {
ensureTargetRestrictionOperationsIsMutable();
targetRestrictionOperations_.add(m);
} else {
targetRestrictionOperationsBuilder_.addMessage(m);
}
break;
} // case 18
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 targetRestrictions_ =
java.util.Collections.emptyList();
private void ensureTargetRestrictionsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
targetRestrictions_ = new java.util.ArrayList(targetRestrictions_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.common.TargetRestriction, com.google.ads.googleads.v17.common.TargetRestriction.Builder, com.google.ads.googleads.v17.common.TargetRestrictionOrBuilder> targetRestrictionsBuilder_;
/**
*
* The per-targeting-dimension setting to restrict the reach of your campaign
* or ad group.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestriction target_restrictions = 1;
*/
public java.util.List getTargetRestrictionsList() {
if (targetRestrictionsBuilder_ == null) {
return java.util.Collections.unmodifiableList(targetRestrictions_);
} else {
return targetRestrictionsBuilder_.getMessageList();
}
}
/**
*
* The per-targeting-dimension setting to restrict the reach of your campaign
* or ad group.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestriction target_restrictions = 1;
*/
public int getTargetRestrictionsCount() {
if (targetRestrictionsBuilder_ == null) {
return targetRestrictions_.size();
} else {
return targetRestrictionsBuilder_.getCount();
}
}
/**
*
* The per-targeting-dimension setting to restrict the reach of your campaign
* or ad group.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestriction target_restrictions = 1;
*/
public com.google.ads.googleads.v17.common.TargetRestriction getTargetRestrictions(int index) {
if (targetRestrictionsBuilder_ == null) {
return targetRestrictions_.get(index);
} else {
return targetRestrictionsBuilder_.getMessage(index);
}
}
/**
*
* The per-targeting-dimension setting to restrict the reach of your campaign
* or ad group.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestriction target_restrictions = 1;
*/
public Builder setTargetRestrictions(
int index, com.google.ads.googleads.v17.common.TargetRestriction value) {
if (targetRestrictionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTargetRestrictionsIsMutable();
targetRestrictions_.set(index, value);
onChanged();
} else {
targetRestrictionsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The per-targeting-dimension setting to restrict the reach of your campaign
* or ad group.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestriction target_restrictions = 1;
*/
public Builder setTargetRestrictions(
int index, com.google.ads.googleads.v17.common.TargetRestriction.Builder builderForValue) {
if (targetRestrictionsBuilder_ == null) {
ensureTargetRestrictionsIsMutable();
targetRestrictions_.set(index, builderForValue.build());
onChanged();
} else {
targetRestrictionsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The per-targeting-dimension setting to restrict the reach of your campaign
* or ad group.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestriction target_restrictions = 1;
*/
public Builder addTargetRestrictions(com.google.ads.googleads.v17.common.TargetRestriction value) {
if (targetRestrictionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTargetRestrictionsIsMutable();
targetRestrictions_.add(value);
onChanged();
} else {
targetRestrictionsBuilder_.addMessage(value);
}
return this;
}
/**
*
* The per-targeting-dimension setting to restrict the reach of your campaign
* or ad group.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestriction target_restrictions = 1;
*/
public Builder addTargetRestrictions(
int index, com.google.ads.googleads.v17.common.TargetRestriction value) {
if (targetRestrictionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTargetRestrictionsIsMutable();
targetRestrictions_.add(index, value);
onChanged();
} else {
targetRestrictionsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The per-targeting-dimension setting to restrict the reach of your campaign
* or ad group.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestriction target_restrictions = 1;
*/
public Builder addTargetRestrictions(
com.google.ads.googleads.v17.common.TargetRestriction.Builder builderForValue) {
if (targetRestrictionsBuilder_ == null) {
ensureTargetRestrictionsIsMutable();
targetRestrictions_.add(builderForValue.build());
onChanged();
} else {
targetRestrictionsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The per-targeting-dimension setting to restrict the reach of your campaign
* or ad group.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestriction target_restrictions = 1;
*/
public Builder addTargetRestrictions(
int index, com.google.ads.googleads.v17.common.TargetRestriction.Builder builderForValue) {
if (targetRestrictionsBuilder_ == null) {
ensureTargetRestrictionsIsMutable();
targetRestrictions_.add(index, builderForValue.build());
onChanged();
} else {
targetRestrictionsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The per-targeting-dimension setting to restrict the reach of your campaign
* or ad group.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestriction target_restrictions = 1;
*/
public Builder addAllTargetRestrictions(
java.lang.Iterable extends com.google.ads.googleads.v17.common.TargetRestriction> values) {
if (targetRestrictionsBuilder_ == null) {
ensureTargetRestrictionsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, targetRestrictions_);
onChanged();
} else {
targetRestrictionsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The per-targeting-dimension setting to restrict the reach of your campaign
* or ad group.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestriction target_restrictions = 1;
*/
public Builder clearTargetRestrictions() {
if (targetRestrictionsBuilder_ == null) {
targetRestrictions_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
targetRestrictionsBuilder_.clear();
}
return this;
}
/**
*
* The per-targeting-dimension setting to restrict the reach of your campaign
* or ad group.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestriction target_restrictions = 1;
*/
public Builder removeTargetRestrictions(int index) {
if (targetRestrictionsBuilder_ == null) {
ensureTargetRestrictionsIsMutable();
targetRestrictions_.remove(index);
onChanged();
} else {
targetRestrictionsBuilder_.remove(index);
}
return this;
}
/**
*
* The per-targeting-dimension setting to restrict the reach of your campaign
* or ad group.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestriction target_restrictions = 1;
*/
public com.google.ads.googleads.v17.common.TargetRestriction.Builder getTargetRestrictionsBuilder(
int index) {
return getTargetRestrictionsFieldBuilder().getBuilder(index);
}
/**
*
* The per-targeting-dimension setting to restrict the reach of your campaign
* or ad group.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestriction target_restrictions = 1;
*/
public com.google.ads.googleads.v17.common.TargetRestrictionOrBuilder getTargetRestrictionsOrBuilder(
int index) {
if (targetRestrictionsBuilder_ == null) {
return targetRestrictions_.get(index); } else {
return targetRestrictionsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The per-targeting-dimension setting to restrict the reach of your campaign
* or ad group.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestriction target_restrictions = 1;
*/
public java.util.List extends com.google.ads.googleads.v17.common.TargetRestrictionOrBuilder>
getTargetRestrictionsOrBuilderList() {
if (targetRestrictionsBuilder_ != null) {
return targetRestrictionsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(targetRestrictions_);
}
}
/**
*
* The per-targeting-dimension setting to restrict the reach of your campaign
* or ad group.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestriction target_restrictions = 1;
*/
public com.google.ads.googleads.v17.common.TargetRestriction.Builder addTargetRestrictionsBuilder() {
return getTargetRestrictionsFieldBuilder().addBuilder(
com.google.ads.googleads.v17.common.TargetRestriction.getDefaultInstance());
}
/**
*
* The per-targeting-dimension setting to restrict the reach of your campaign
* or ad group.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestriction target_restrictions = 1;
*/
public com.google.ads.googleads.v17.common.TargetRestriction.Builder addTargetRestrictionsBuilder(
int index) {
return getTargetRestrictionsFieldBuilder().addBuilder(
index, com.google.ads.googleads.v17.common.TargetRestriction.getDefaultInstance());
}
/**
*
* The per-targeting-dimension setting to restrict the reach of your campaign
* or ad group.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestriction target_restrictions = 1;
*/
public java.util.List
getTargetRestrictionsBuilderList() {
return getTargetRestrictionsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.common.TargetRestriction, com.google.ads.googleads.v17.common.TargetRestriction.Builder, com.google.ads.googleads.v17.common.TargetRestrictionOrBuilder>
getTargetRestrictionsFieldBuilder() {
if (targetRestrictionsBuilder_ == null) {
targetRestrictionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.common.TargetRestriction, com.google.ads.googleads.v17.common.TargetRestriction.Builder, com.google.ads.googleads.v17.common.TargetRestrictionOrBuilder>(
targetRestrictions_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
targetRestrictions_ = null;
}
return targetRestrictionsBuilder_;
}
private java.util.List targetRestrictionOperations_ =
java.util.Collections.emptyList();
private void ensureTargetRestrictionOperationsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
targetRestrictionOperations_ = new java.util.ArrayList(targetRestrictionOperations_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.common.TargetRestrictionOperation, com.google.ads.googleads.v17.common.TargetRestrictionOperation.Builder, com.google.ads.googleads.v17.common.TargetRestrictionOperationOrBuilder> targetRestrictionOperationsBuilder_;
/**
*
* The list of operations changing the target restrictions.
*
* Adding a target restriction with a targeting dimension that already exists
* causes the existing target restriction to be replaced with the new value.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestrictionOperation target_restriction_operations = 2;
*/
public java.util.List getTargetRestrictionOperationsList() {
if (targetRestrictionOperationsBuilder_ == null) {
return java.util.Collections.unmodifiableList(targetRestrictionOperations_);
} else {
return targetRestrictionOperationsBuilder_.getMessageList();
}
}
/**
*
* The list of operations changing the target restrictions.
*
* Adding a target restriction with a targeting dimension that already exists
* causes the existing target restriction to be replaced with the new value.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestrictionOperation target_restriction_operations = 2;
*/
public int getTargetRestrictionOperationsCount() {
if (targetRestrictionOperationsBuilder_ == null) {
return targetRestrictionOperations_.size();
} else {
return targetRestrictionOperationsBuilder_.getCount();
}
}
/**
*
* The list of operations changing the target restrictions.
*
* Adding a target restriction with a targeting dimension that already exists
* causes the existing target restriction to be replaced with the new value.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestrictionOperation target_restriction_operations = 2;
*/
public com.google.ads.googleads.v17.common.TargetRestrictionOperation getTargetRestrictionOperations(int index) {
if (targetRestrictionOperationsBuilder_ == null) {
return targetRestrictionOperations_.get(index);
} else {
return targetRestrictionOperationsBuilder_.getMessage(index);
}
}
/**
*
* The list of operations changing the target restrictions.
*
* Adding a target restriction with a targeting dimension that already exists
* causes the existing target restriction to be replaced with the new value.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestrictionOperation target_restriction_operations = 2;
*/
public Builder setTargetRestrictionOperations(
int index, com.google.ads.googleads.v17.common.TargetRestrictionOperation value) {
if (targetRestrictionOperationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTargetRestrictionOperationsIsMutable();
targetRestrictionOperations_.set(index, value);
onChanged();
} else {
targetRestrictionOperationsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The list of operations changing the target restrictions.
*
* Adding a target restriction with a targeting dimension that already exists
* causes the existing target restriction to be replaced with the new value.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestrictionOperation target_restriction_operations = 2;
*/
public Builder setTargetRestrictionOperations(
int index, com.google.ads.googleads.v17.common.TargetRestrictionOperation.Builder builderForValue) {
if (targetRestrictionOperationsBuilder_ == null) {
ensureTargetRestrictionOperationsIsMutable();
targetRestrictionOperations_.set(index, builderForValue.build());
onChanged();
} else {
targetRestrictionOperationsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The list of operations changing the target restrictions.
*
* Adding a target restriction with a targeting dimension that already exists
* causes the existing target restriction to be replaced with the new value.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestrictionOperation target_restriction_operations = 2;
*/
public Builder addTargetRestrictionOperations(com.google.ads.googleads.v17.common.TargetRestrictionOperation value) {
if (targetRestrictionOperationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTargetRestrictionOperationsIsMutable();
targetRestrictionOperations_.add(value);
onChanged();
} else {
targetRestrictionOperationsBuilder_.addMessage(value);
}
return this;
}
/**
*
* The list of operations changing the target restrictions.
*
* Adding a target restriction with a targeting dimension that already exists
* causes the existing target restriction to be replaced with the new value.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestrictionOperation target_restriction_operations = 2;
*/
public Builder addTargetRestrictionOperations(
int index, com.google.ads.googleads.v17.common.TargetRestrictionOperation value) {
if (targetRestrictionOperationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTargetRestrictionOperationsIsMutable();
targetRestrictionOperations_.add(index, value);
onChanged();
} else {
targetRestrictionOperationsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The list of operations changing the target restrictions.
*
* Adding a target restriction with a targeting dimension that already exists
* causes the existing target restriction to be replaced with the new value.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestrictionOperation target_restriction_operations = 2;
*/
public Builder addTargetRestrictionOperations(
com.google.ads.googleads.v17.common.TargetRestrictionOperation.Builder builderForValue) {
if (targetRestrictionOperationsBuilder_ == null) {
ensureTargetRestrictionOperationsIsMutable();
targetRestrictionOperations_.add(builderForValue.build());
onChanged();
} else {
targetRestrictionOperationsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The list of operations changing the target restrictions.
*
* Adding a target restriction with a targeting dimension that already exists
* causes the existing target restriction to be replaced with the new value.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestrictionOperation target_restriction_operations = 2;
*/
public Builder addTargetRestrictionOperations(
int index, com.google.ads.googleads.v17.common.TargetRestrictionOperation.Builder builderForValue) {
if (targetRestrictionOperationsBuilder_ == null) {
ensureTargetRestrictionOperationsIsMutable();
targetRestrictionOperations_.add(index, builderForValue.build());
onChanged();
} else {
targetRestrictionOperationsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The list of operations changing the target restrictions.
*
* Adding a target restriction with a targeting dimension that already exists
* causes the existing target restriction to be replaced with the new value.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestrictionOperation target_restriction_operations = 2;
*/
public Builder addAllTargetRestrictionOperations(
java.lang.Iterable extends com.google.ads.googleads.v17.common.TargetRestrictionOperation> values) {
if (targetRestrictionOperationsBuilder_ == null) {
ensureTargetRestrictionOperationsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, targetRestrictionOperations_);
onChanged();
} else {
targetRestrictionOperationsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The list of operations changing the target restrictions.
*
* Adding a target restriction with a targeting dimension that already exists
* causes the existing target restriction to be replaced with the new value.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestrictionOperation target_restriction_operations = 2;
*/
public Builder clearTargetRestrictionOperations() {
if (targetRestrictionOperationsBuilder_ == null) {
targetRestrictionOperations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
targetRestrictionOperationsBuilder_.clear();
}
return this;
}
/**
*
* The list of operations changing the target restrictions.
*
* Adding a target restriction with a targeting dimension that already exists
* causes the existing target restriction to be replaced with the new value.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestrictionOperation target_restriction_operations = 2;
*/
public Builder removeTargetRestrictionOperations(int index) {
if (targetRestrictionOperationsBuilder_ == null) {
ensureTargetRestrictionOperationsIsMutable();
targetRestrictionOperations_.remove(index);
onChanged();
} else {
targetRestrictionOperationsBuilder_.remove(index);
}
return this;
}
/**
*
* The list of operations changing the target restrictions.
*
* Adding a target restriction with a targeting dimension that already exists
* causes the existing target restriction to be replaced with the new value.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestrictionOperation target_restriction_operations = 2;
*/
public com.google.ads.googleads.v17.common.TargetRestrictionOperation.Builder getTargetRestrictionOperationsBuilder(
int index) {
return getTargetRestrictionOperationsFieldBuilder().getBuilder(index);
}
/**
*
* The list of operations changing the target restrictions.
*
* Adding a target restriction with a targeting dimension that already exists
* causes the existing target restriction to be replaced with the new value.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestrictionOperation target_restriction_operations = 2;
*/
public com.google.ads.googleads.v17.common.TargetRestrictionOperationOrBuilder getTargetRestrictionOperationsOrBuilder(
int index) {
if (targetRestrictionOperationsBuilder_ == null) {
return targetRestrictionOperations_.get(index); } else {
return targetRestrictionOperationsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The list of operations changing the target restrictions.
*
* Adding a target restriction with a targeting dimension that already exists
* causes the existing target restriction to be replaced with the new value.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestrictionOperation target_restriction_operations = 2;
*/
public java.util.List extends com.google.ads.googleads.v17.common.TargetRestrictionOperationOrBuilder>
getTargetRestrictionOperationsOrBuilderList() {
if (targetRestrictionOperationsBuilder_ != null) {
return targetRestrictionOperationsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(targetRestrictionOperations_);
}
}
/**
*
* The list of operations changing the target restrictions.
*
* Adding a target restriction with a targeting dimension that already exists
* causes the existing target restriction to be replaced with the new value.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestrictionOperation target_restriction_operations = 2;
*/
public com.google.ads.googleads.v17.common.TargetRestrictionOperation.Builder addTargetRestrictionOperationsBuilder() {
return getTargetRestrictionOperationsFieldBuilder().addBuilder(
com.google.ads.googleads.v17.common.TargetRestrictionOperation.getDefaultInstance());
}
/**
*
* The list of operations changing the target restrictions.
*
* Adding a target restriction with a targeting dimension that already exists
* causes the existing target restriction to be replaced with the new value.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestrictionOperation target_restriction_operations = 2;
*/
public com.google.ads.googleads.v17.common.TargetRestrictionOperation.Builder addTargetRestrictionOperationsBuilder(
int index) {
return getTargetRestrictionOperationsFieldBuilder().addBuilder(
index, com.google.ads.googleads.v17.common.TargetRestrictionOperation.getDefaultInstance());
}
/**
*
* The list of operations changing the target restrictions.
*
* Adding a target restriction with a targeting dimension that already exists
* causes the existing target restriction to be replaced with the new value.
*
*
* repeated .google.ads.googleads.v17.common.TargetRestrictionOperation target_restriction_operations = 2;
*/
public java.util.List
getTargetRestrictionOperationsBuilderList() {
return getTargetRestrictionOperationsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.common.TargetRestrictionOperation, com.google.ads.googleads.v17.common.TargetRestrictionOperation.Builder, com.google.ads.googleads.v17.common.TargetRestrictionOperationOrBuilder>
getTargetRestrictionOperationsFieldBuilder() {
if (targetRestrictionOperationsBuilder_ == null) {
targetRestrictionOperationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.common.TargetRestrictionOperation, com.google.ads.googleads.v17.common.TargetRestrictionOperation.Builder, com.google.ads.googleads.v17.common.TargetRestrictionOperationOrBuilder>(
targetRestrictionOperations_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
targetRestrictionOperations_ = null;
}
return targetRestrictionOperationsBuilder_;
}
@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.common.TargetingSetting)
}
// @@protoc_insertion_point(class_scope:google.ads.googleads.v17.common.TargetingSetting)
private static final com.google.ads.googleads.v17.common.TargetingSetting DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.ads.googleads.v17.common.TargetingSetting();
}
public static com.google.ads.googleads.v17.common.TargetingSetting getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TargetingSetting 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.common.TargetingSetting getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy