com.google.ads.googleads.v17.resources.AdParameter 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/resources/ad_parameter.proto
// Protobuf Java Version: 3.25.3
package com.google.ads.googleads.v17.resources;
/**
*
* An ad parameter that is used to update numeric values (such as prices or
* inventory levels) in any text line of an ad (including URLs). There can
* be a maximum of two AdParameters per ad group criterion. (One with
* parameter_index = 1 and one with parameter_index = 2.)
* In the ad the parameters are referenced by a placeholder of the form
* "{param#:value}". For example, "{param1:$17}"
*
*
* Protobuf type {@code google.ads.googleads.v17.resources.AdParameter}
*/
public final class AdParameter extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.ads.googleads.v17.resources.AdParameter)
AdParameterOrBuilder {
private static final long serialVersionUID = 0L;
// Use AdParameter.newBuilder() to construct.
private AdParameter(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AdParameter() {
resourceName_ = "";
adGroupCriterion_ = "";
insertionText_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AdParameter();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.resources.AdParameterProto.internal_static_google_ads_googleads_v17_resources_AdParameter_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v17.resources.AdParameterProto.internal_static_google_ads_googleads_v17_resources_AdParameter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.resources.AdParameter.class, com.google.ads.googleads.v17.resources.AdParameter.Builder.class);
}
private int bitField0_;
public static final int RESOURCE_NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object resourceName_ = "";
/**
*
* Immutable. The resource name of the ad parameter.
* Ad parameter resource names have the form:
*
* `customers/{customer_id}/adParameters/{ad_group_id}~{criterion_id}~{parameter_index}`
*
*
* string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The resourceName.
*/
@java.lang.Override
public java.lang.String getResourceName() {
java.lang.Object ref = resourceName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
resourceName_ = s;
return s;
}
}
/**
*
* Immutable. The resource name of the ad parameter.
* Ad parameter resource names have the form:
*
* `customers/{customer_id}/adParameters/{ad_group_id}~{criterion_id}~{parameter_index}`
*
*
* string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The bytes for resourceName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getResourceNameBytes() {
java.lang.Object ref = resourceName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
resourceName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int AD_GROUP_CRITERION_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object adGroupCriterion_ = "";
/**
*
* Immutable. The ad group criterion that this ad parameter belongs to.
*
*
* optional string ad_group_criterion = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return Whether the adGroupCriterion field is set.
*/
@java.lang.Override
public boolean hasAdGroupCriterion() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Immutable. The ad group criterion that this ad parameter belongs to.
*
*
* optional string ad_group_criterion = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The adGroupCriterion.
*/
@java.lang.Override
public java.lang.String getAdGroupCriterion() {
java.lang.Object ref = adGroupCriterion_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
adGroupCriterion_ = s;
return s;
}
}
/**
*
* Immutable. The ad group criterion that this ad parameter belongs to.
*
*
* optional string ad_group_criterion = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The bytes for adGroupCriterion.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAdGroupCriterionBytes() {
java.lang.Object ref = adGroupCriterion_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
adGroupCriterion_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PARAMETER_INDEX_FIELD_NUMBER = 6;
private long parameterIndex_ = 0L;
/**
*
* Immutable. The unique index of this ad parameter. Must be either 1 or 2.
*
*
* optional int64 parameter_index = 6 [(.google.api.field_behavior) = IMMUTABLE];
* @return Whether the parameterIndex field is set.
*/
@java.lang.Override
public boolean hasParameterIndex() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Immutable. The unique index of this ad parameter. Must be either 1 or 2.
*
*
* optional int64 parameter_index = 6 [(.google.api.field_behavior) = IMMUTABLE];
* @return The parameterIndex.
*/
@java.lang.Override
public long getParameterIndex() {
return parameterIndex_;
}
public static final int INSERTION_TEXT_FIELD_NUMBER = 7;
@SuppressWarnings("serial")
private volatile java.lang.Object insertionText_ = "";
/**
*
* Numeric value to insert into the ad text. The following restrictions
* apply:
* - Can use comma or period as a separator, with an optional period or
* comma (respectively) for fractional values. For example, 1,000,000.00
* and 2.000.000,10 are valid.
* - Can be prepended or appended with a currency symbol. For example,
* $99.99 is valid.
* - Can be prepended or appended with a currency code. For example, 99.99USD
* and EUR200 are valid.
* - Can use '%'. For example, 1.0% and 1,0% are valid.
* - Can use plus or minus. For example, -10.99 and 25+ are valid.
* - Can use '/' between two numbers. For example 4/1 and 0.95/0.45 are
* valid.
*
*
* optional string insertion_text = 7;
* @return Whether the insertionText field is set.
*/
@java.lang.Override
public boolean hasInsertionText() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Numeric value to insert into the ad text. The following restrictions
* apply:
* - Can use comma or period as a separator, with an optional period or
* comma (respectively) for fractional values. For example, 1,000,000.00
* and 2.000.000,10 are valid.
* - Can be prepended or appended with a currency symbol. For example,
* $99.99 is valid.
* - Can be prepended or appended with a currency code. For example, 99.99USD
* and EUR200 are valid.
* - Can use '%'. For example, 1.0% and 1,0% are valid.
* - Can use plus or minus. For example, -10.99 and 25+ are valid.
* - Can use '/' between two numbers. For example 4/1 and 0.95/0.45 are
* valid.
*
*
* optional string insertion_text = 7;
* @return The insertionText.
*/
@java.lang.Override
public java.lang.String getInsertionText() {
java.lang.Object ref = insertionText_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
insertionText_ = s;
return s;
}
}
/**
*
* Numeric value to insert into the ad text. The following restrictions
* apply:
* - Can use comma or period as a separator, with an optional period or
* comma (respectively) for fractional values. For example, 1,000,000.00
* and 2.000.000,10 are valid.
* - Can be prepended or appended with a currency symbol. For example,
* $99.99 is valid.
* - Can be prepended or appended with a currency code. For example, 99.99USD
* and EUR200 are valid.
* - Can use '%'. For example, 1.0% and 1,0% are valid.
* - Can use plus or minus. For example, -10.99 and 25+ are valid.
* - Can use '/' between two numbers. For example 4/1 and 0.95/0.45 are
* valid.
*
*
* optional string insertion_text = 7;
* @return The bytes for insertionText.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getInsertionTextBytes() {
java.lang.Object ref = insertionText_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
insertionText_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceName_);
}
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, adGroupCriterion_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeInt64(6, parameterIndex_);
}
if (((bitField0_ & 0x00000004) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, insertionText_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceName_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, adGroupCriterion_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(6, parameterIndex_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, insertionText_);
}
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.resources.AdParameter)) {
return super.equals(obj);
}
com.google.ads.googleads.v17.resources.AdParameter other = (com.google.ads.googleads.v17.resources.AdParameter) obj;
if (!getResourceName()
.equals(other.getResourceName())) return false;
if (hasAdGroupCriterion() != other.hasAdGroupCriterion()) return false;
if (hasAdGroupCriterion()) {
if (!getAdGroupCriterion()
.equals(other.getAdGroupCriterion())) return false;
}
if (hasParameterIndex() != other.hasParameterIndex()) return false;
if (hasParameterIndex()) {
if (getParameterIndex()
!= other.getParameterIndex()) return false;
}
if (hasInsertionText() != other.hasInsertionText()) return false;
if (hasInsertionText()) {
if (!getInsertionText()
.equals(other.getInsertionText())) 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();
hash = (37 * hash) + RESOURCE_NAME_FIELD_NUMBER;
hash = (53 * hash) + getResourceName().hashCode();
if (hasAdGroupCriterion()) {
hash = (37 * hash) + AD_GROUP_CRITERION_FIELD_NUMBER;
hash = (53 * hash) + getAdGroupCriterion().hashCode();
}
if (hasParameterIndex()) {
hash = (37 * hash) + PARAMETER_INDEX_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getParameterIndex());
}
if (hasInsertionText()) {
hash = (37 * hash) + INSERTION_TEXT_FIELD_NUMBER;
hash = (53 * hash) + getInsertionText().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.ads.googleads.v17.resources.AdParameter parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.resources.AdParameter 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.resources.AdParameter parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.resources.AdParameter 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.resources.AdParameter parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.resources.AdParameter 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.resources.AdParameter parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v17.resources.AdParameter 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.resources.AdParameter parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v17.resources.AdParameter 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.resources.AdParameter 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.resources.AdParameter 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.resources.AdParameter 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;
}
/**
*
* An ad parameter that is used to update numeric values (such as prices or
* inventory levels) in any text line of an ad (including URLs). There can
* be a maximum of two AdParameters per ad group criterion. (One with
* parameter_index = 1 and one with parameter_index = 2.)
* In the ad the parameters are referenced by a placeholder of the form
* "{param#:value}". For example, "{param1:$17}"
*
*
* Protobuf type {@code google.ads.googleads.v17.resources.AdParameter}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.ads.googleads.v17.resources.AdParameter)
com.google.ads.googleads.v17.resources.AdParameterOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.resources.AdParameterProto.internal_static_google_ads_googleads_v17_resources_AdParameter_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v17.resources.AdParameterProto.internal_static_google_ads_googleads_v17_resources_AdParameter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.resources.AdParameter.class, com.google.ads.googleads.v17.resources.AdParameter.Builder.class);
}
// Construct using com.google.ads.googleads.v17.resources.AdParameter.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
resourceName_ = "";
adGroupCriterion_ = "";
parameterIndex_ = 0L;
insertionText_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.ads.googleads.v17.resources.AdParameterProto.internal_static_google_ads_googleads_v17_resources_AdParameter_descriptor;
}
@java.lang.Override
public com.google.ads.googleads.v17.resources.AdParameter getDefaultInstanceForType() {
return com.google.ads.googleads.v17.resources.AdParameter.getDefaultInstance();
}
@java.lang.Override
public com.google.ads.googleads.v17.resources.AdParameter build() {
com.google.ads.googleads.v17.resources.AdParameter result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.ads.googleads.v17.resources.AdParameter buildPartial() {
com.google.ads.googleads.v17.resources.AdParameter result = new com.google.ads.googleads.v17.resources.AdParameter(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.ads.googleads.v17.resources.AdParameter result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.resourceName_ = resourceName_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.adGroupCriterion_ = adGroupCriterion_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.parameterIndex_ = parameterIndex_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.insertionText_ = insertionText_;
to_bitField0_ |= 0x00000004;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.ads.googleads.v17.resources.AdParameter) {
return mergeFrom((com.google.ads.googleads.v17.resources.AdParameter)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.ads.googleads.v17.resources.AdParameter other) {
if (other == com.google.ads.googleads.v17.resources.AdParameter.getDefaultInstance()) return this;
if (!other.getResourceName().isEmpty()) {
resourceName_ = other.resourceName_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasAdGroupCriterion()) {
adGroupCriterion_ = other.adGroupCriterion_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasParameterIndex()) {
setParameterIndex(other.getParameterIndex());
}
if (other.hasInsertionText()) {
insertionText_ = other.insertionText_;
bitField0_ |= 0x00000008;
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 10: {
resourceName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 42: {
adGroupCriterion_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 42
case 48: {
parameterIndex_ = input.readInt64();
bitField0_ |= 0x00000004;
break;
} // case 48
case 58: {
insertionText_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 58
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object resourceName_ = "";
/**
*
* Immutable. The resource name of the ad parameter.
* Ad parameter resource names have the form:
*
* `customers/{customer_id}/adParameters/{ad_group_id}~{criterion_id}~{parameter_index}`
*
*
* string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The resourceName.
*/
public java.lang.String getResourceName() {
java.lang.Object ref = resourceName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
resourceName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Immutable. The resource name of the ad parameter.
* Ad parameter resource names have the form:
*
* `customers/{customer_id}/adParameters/{ad_group_id}~{criterion_id}~{parameter_index}`
*
*
* string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The bytes for resourceName.
*/
public com.google.protobuf.ByteString
getResourceNameBytes() {
java.lang.Object ref = resourceName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
resourceName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Immutable. The resource name of the ad parameter.
* Ad parameter resource names have the form:
*
* `customers/{customer_id}/adParameters/{ad_group_id}~{criterion_id}~{parameter_index}`
*
*
* string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @param value The resourceName to set.
* @return This builder for chaining.
*/
public Builder setResourceName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
resourceName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Immutable. The resource name of the ad parameter.
* Ad parameter resource names have the form:
*
* `customers/{customer_id}/adParameters/{ad_group_id}~{criterion_id}~{parameter_index}`
*
*
* string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return This builder for chaining.
*/
public Builder clearResourceName() {
resourceName_ = getDefaultInstance().getResourceName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Immutable. The resource name of the ad parameter.
* Ad parameter resource names have the form:
*
* `customers/{customer_id}/adParameters/{ad_group_id}~{criterion_id}~{parameter_index}`
*
*
* string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @param value The bytes for resourceName to set.
* @return This builder for chaining.
*/
public Builder setResourceNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
resourceName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object adGroupCriterion_ = "";
/**
*
* Immutable. The ad group criterion that this ad parameter belongs to.
*
*
* optional string ad_group_criterion = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return Whether the adGroupCriterion field is set.
*/
public boolean hasAdGroupCriterion() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Immutable. The ad group criterion that this ad parameter belongs to.
*
*
* optional string ad_group_criterion = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The adGroupCriterion.
*/
public java.lang.String getAdGroupCriterion() {
java.lang.Object ref = adGroupCriterion_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
adGroupCriterion_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Immutable. The ad group criterion that this ad parameter belongs to.
*
*
* optional string ad_group_criterion = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return The bytes for adGroupCriterion.
*/
public com.google.protobuf.ByteString
getAdGroupCriterionBytes() {
java.lang.Object ref = adGroupCriterion_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
adGroupCriterion_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Immutable. The ad group criterion that this ad parameter belongs to.
*
*
* optional string ad_group_criterion = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @param value The adGroupCriterion to set.
* @return This builder for chaining.
*/
public Builder setAdGroupCriterion(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
adGroupCriterion_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Immutable. The ad group criterion that this ad parameter belongs to.
*
*
* optional string ad_group_criterion = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @return This builder for chaining.
*/
public Builder clearAdGroupCriterion() {
adGroupCriterion_ = getDefaultInstance().getAdGroupCriterion();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* Immutable. The ad group criterion that this ad parameter belongs to.
*
*
* optional string ad_group_criterion = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
* @param value The bytes for adGroupCriterion to set.
* @return This builder for chaining.
*/
public Builder setAdGroupCriterionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
adGroupCriterion_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private long parameterIndex_ ;
/**
*
* Immutable. The unique index of this ad parameter. Must be either 1 or 2.
*
*
* optional int64 parameter_index = 6 [(.google.api.field_behavior) = IMMUTABLE];
* @return Whether the parameterIndex field is set.
*/
@java.lang.Override
public boolean hasParameterIndex() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Immutable. The unique index of this ad parameter. Must be either 1 or 2.
*
*
* optional int64 parameter_index = 6 [(.google.api.field_behavior) = IMMUTABLE];
* @return The parameterIndex.
*/
@java.lang.Override
public long getParameterIndex() {
return parameterIndex_;
}
/**
*
* Immutable. The unique index of this ad parameter. Must be either 1 or 2.
*
*
* optional int64 parameter_index = 6 [(.google.api.field_behavior) = IMMUTABLE];
* @param value The parameterIndex to set.
* @return This builder for chaining.
*/
public Builder setParameterIndex(long value) {
parameterIndex_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Immutable. The unique index of this ad parameter. Must be either 1 or 2.
*
*
* optional int64 parameter_index = 6 [(.google.api.field_behavior) = IMMUTABLE];
* @return This builder for chaining.
*/
public Builder clearParameterIndex() {
bitField0_ = (bitField0_ & ~0x00000004);
parameterIndex_ = 0L;
onChanged();
return this;
}
private java.lang.Object insertionText_ = "";
/**
*
* Numeric value to insert into the ad text. The following restrictions
* apply:
* - Can use comma or period as a separator, with an optional period or
* comma (respectively) for fractional values. For example, 1,000,000.00
* and 2.000.000,10 are valid.
* - Can be prepended or appended with a currency symbol. For example,
* $99.99 is valid.
* - Can be prepended or appended with a currency code. For example, 99.99USD
* and EUR200 are valid.
* - Can use '%'. For example, 1.0% and 1,0% are valid.
* - Can use plus or minus. For example, -10.99 and 25+ are valid.
* - Can use '/' between two numbers. For example 4/1 and 0.95/0.45 are
* valid.
*
*
* optional string insertion_text = 7;
* @return Whether the insertionText field is set.
*/
public boolean hasInsertionText() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Numeric value to insert into the ad text. The following restrictions
* apply:
* - Can use comma or period as a separator, with an optional period or
* comma (respectively) for fractional values. For example, 1,000,000.00
* and 2.000.000,10 are valid.
* - Can be prepended or appended with a currency symbol. For example,
* $99.99 is valid.
* - Can be prepended or appended with a currency code. For example, 99.99USD
* and EUR200 are valid.
* - Can use '%'. For example, 1.0% and 1,0% are valid.
* - Can use plus or minus. For example, -10.99 and 25+ are valid.
* - Can use '/' between two numbers. For example 4/1 and 0.95/0.45 are
* valid.
*
*
* optional string insertion_text = 7;
* @return The insertionText.
*/
public java.lang.String getInsertionText() {
java.lang.Object ref = insertionText_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
insertionText_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Numeric value to insert into the ad text. The following restrictions
* apply:
* - Can use comma or period as a separator, with an optional period or
* comma (respectively) for fractional values. For example, 1,000,000.00
* and 2.000.000,10 are valid.
* - Can be prepended or appended with a currency symbol. For example,
* $99.99 is valid.
* - Can be prepended or appended with a currency code. For example, 99.99USD
* and EUR200 are valid.
* - Can use '%'. For example, 1.0% and 1,0% are valid.
* - Can use plus or minus. For example, -10.99 and 25+ are valid.
* - Can use '/' between two numbers. For example 4/1 and 0.95/0.45 are
* valid.
*
*
* optional string insertion_text = 7;
* @return The bytes for insertionText.
*/
public com.google.protobuf.ByteString
getInsertionTextBytes() {
java.lang.Object ref = insertionText_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
insertionText_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Numeric value to insert into the ad text. The following restrictions
* apply:
* - Can use comma or period as a separator, with an optional period or
* comma (respectively) for fractional values. For example, 1,000,000.00
* and 2.000.000,10 are valid.
* - Can be prepended or appended with a currency symbol. For example,
* $99.99 is valid.
* - Can be prepended or appended with a currency code. For example, 99.99USD
* and EUR200 are valid.
* - Can use '%'. For example, 1.0% and 1,0% are valid.
* - Can use plus or minus. For example, -10.99 and 25+ are valid.
* - Can use '/' between two numbers. For example 4/1 and 0.95/0.45 are
* valid.
*
*
* optional string insertion_text = 7;
* @param value The insertionText to set.
* @return This builder for chaining.
*/
public Builder setInsertionText(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
insertionText_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Numeric value to insert into the ad text. The following restrictions
* apply:
* - Can use comma or period as a separator, with an optional period or
* comma (respectively) for fractional values. For example, 1,000,000.00
* and 2.000.000,10 are valid.
* - Can be prepended or appended with a currency symbol. For example,
* $99.99 is valid.
* - Can be prepended or appended with a currency code. For example, 99.99USD
* and EUR200 are valid.
* - Can use '%'. For example, 1.0% and 1,0% are valid.
* - Can use plus or minus. For example, -10.99 and 25+ are valid.
* - Can use '/' between two numbers. For example 4/1 and 0.95/0.45 are
* valid.
*
*
* optional string insertion_text = 7;
* @return This builder for chaining.
*/
public Builder clearInsertionText() {
insertionText_ = getDefaultInstance().getInsertionText();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
* Numeric value to insert into the ad text. The following restrictions
* apply:
* - Can use comma or period as a separator, with an optional period or
* comma (respectively) for fractional values. For example, 1,000,000.00
* and 2.000.000,10 are valid.
* - Can be prepended or appended with a currency symbol. For example,
* $99.99 is valid.
* - Can be prepended or appended with a currency code. For example, 99.99USD
* and EUR200 are valid.
* - Can use '%'. For example, 1.0% and 1,0% are valid.
* - Can use plus or minus. For example, -10.99 and 25+ are valid.
* - Can use '/' between two numbers. For example 4/1 and 0.95/0.45 are
* valid.
*
*
* optional string insertion_text = 7;
* @param value The bytes for insertionText to set.
* @return This builder for chaining.
*/
public Builder setInsertionTextBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
insertionText_ = value;
bitField0_ |= 0x00000008;
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.v17.resources.AdParameter)
}
// @@protoc_insertion_point(class_scope:google.ads.googleads.v17.resources.AdParameter)
private static final com.google.ads.googleads.v17.resources.AdParameter DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.ads.googleads.v17.resources.AdParameter();
}
public static com.google.ads.googleads.v17.resources.AdParameter getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AdParameter 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.resources.AdParameter getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy