com.google.ads.googleads.v17.common.PriceOffer 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/extensions.proto
// Protobuf Java Version: 3.25.3
package com.google.ads.googleads.v17.common;
/**
*
* Represents one price offer in a price extension.
*
*
* Protobuf type {@code google.ads.googleads.v17.common.PriceOffer}
*/
public final class PriceOffer extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.ads.googleads.v17.common.PriceOffer)
PriceOfferOrBuilder {
private static final long serialVersionUID = 0L;
// Use PriceOffer.newBuilder() to construct.
private PriceOffer(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PriceOffer() {
header_ = "";
description_ = "";
unit_ = 0;
finalUrls_ =
com.google.protobuf.LazyStringArrayList.emptyList();
finalMobileUrls_ =
com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PriceOffer();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.common.ExtensionsProto.internal_static_google_ads_googleads_v17_common_PriceOffer_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v17.common.ExtensionsProto.internal_static_google_ads_googleads_v17_common_PriceOffer_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.common.PriceOffer.class, com.google.ads.googleads.v17.common.PriceOffer.Builder.class);
}
private int bitField0_;
public static final int HEADER_FIELD_NUMBER = 7;
@SuppressWarnings("serial")
private volatile java.lang.Object header_ = "";
/**
*
* Header text of this offer.
*
*
* optional string header = 7;
* @return Whether the header field is set.
*/
@java.lang.Override
public boolean hasHeader() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Header text of this offer.
*
*
* optional string header = 7;
* @return The header.
*/
@java.lang.Override
public java.lang.String getHeader() {
java.lang.Object ref = header_;
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();
header_ = s;
return s;
}
}
/**
*
* Header text of this offer.
*
*
* optional string header = 7;
* @return The bytes for header.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getHeaderBytes() {
java.lang.Object ref = header_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
header_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DESCRIPTION_FIELD_NUMBER = 8;
@SuppressWarnings("serial")
private volatile java.lang.Object description_ = "";
/**
*
* Description text of this offer.
*
*
* optional string description = 8;
* @return Whether the description field is set.
*/
@java.lang.Override
public boolean hasDescription() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Description text of this offer.
*
*
* optional string description = 8;
* @return The description.
*/
@java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
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();
description_ = s;
return s;
}
}
/**
*
* Description text of this offer.
*
*
* optional string description = 8;
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PRICE_FIELD_NUMBER = 3;
private com.google.ads.googleads.v17.common.Money price_;
/**
*
* Price value of this offer.
*
*
* .google.ads.googleads.v17.common.Money price = 3;
* @return Whether the price field is set.
*/
@java.lang.Override
public boolean hasPrice() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Price value of this offer.
*
*
* .google.ads.googleads.v17.common.Money price = 3;
* @return The price.
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.Money getPrice() {
return price_ == null ? com.google.ads.googleads.v17.common.Money.getDefaultInstance() : price_;
}
/**
*
* Price value of this offer.
*
*
* .google.ads.googleads.v17.common.Money price = 3;
*/
@java.lang.Override
public com.google.ads.googleads.v17.common.MoneyOrBuilder getPriceOrBuilder() {
return price_ == null ? com.google.ads.googleads.v17.common.Money.getDefaultInstance() : price_;
}
public static final int UNIT_FIELD_NUMBER = 4;
private int unit_ = 0;
/**
*
* Price unit for this offer.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;
* @return The enum numeric value on the wire for unit.
*/
@java.lang.Override public int getUnitValue() {
return unit_;
}
/**
*
* Price unit for this offer.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;
* @return The unit.
*/
@java.lang.Override public com.google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit getUnit() {
com.google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit result = com.google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit.forNumber(unit_);
return result == null ? com.google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit.UNRECOGNIZED : result;
}
public static final int FINAL_URLS_FIELD_NUMBER = 9;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList finalUrls_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* A list of possible final URLs after all cross domain redirects.
*
*
* repeated string final_urls = 9;
* @return A list containing the finalUrls.
*/
public com.google.protobuf.ProtocolStringList
getFinalUrlsList() {
return finalUrls_;
}
/**
*
* A list of possible final URLs after all cross domain redirects.
*
*
* repeated string final_urls = 9;
* @return The count of finalUrls.
*/
public int getFinalUrlsCount() {
return finalUrls_.size();
}
/**
*
* A list of possible final URLs after all cross domain redirects.
*
*
* repeated string final_urls = 9;
* @param index The index of the element to return.
* @return The finalUrls at the given index.
*/
public java.lang.String getFinalUrls(int index) {
return finalUrls_.get(index);
}
/**
*
* A list of possible final URLs after all cross domain redirects.
*
*
* repeated string final_urls = 9;
* @param index The index of the value to return.
* @return The bytes of the finalUrls at the given index.
*/
public com.google.protobuf.ByteString
getFinalUrlsBytes(int index) {
return finalUrls_.getByteString(index);
}
public static final int FINAL_MOBILE_URLS_FIELD_NUMBER = 10;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList finalMobileUrls_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* A list of possible final mobile URLs after all cross domain redirects.
*
*
* repeated string final_mobile_urls = 10;
* @return A list containing the finalMobileUrls.
*/
public com.google.protobuf.ProtocolStringList
getFinalMobileUrlsList() {
return finalMobileUrls_;
}
/**
*
* A list of possible final mobile URLs after all cross domain redirects.
*
*
* repeated string final_mobile_urls = 10;
* @return The count of finalMobileUrls.
*/
public int getFinalMobileUrlsCount() {
return finalMobileUrls_.size();
}
/**
*
* A list of possible final mobile URLs after all cross domain redirects.
*
*
* repeated string final_mobile_urls = 10;
* @param index The index of the element to return.
* @return The finalMobileUrls at the given index.
*/
public java.lang.String getFinalMobileUrls(int index) {
return finalMobileUrls_.get(index);
}
/**
*
* A list of possible final mobile URLs after all cross domain redirects.
*
*
* repeated string final_mobile_urls = 10;
* @param index The index of the value to return.
* @return The bytes of the finalMobileUrls at the given index.
*/
public com.google.protobuf.ByteString
getFinalMobileUrlsBytes(int index) {
return finalMobileUrls_.getByteString(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 {
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(3, getPrice());
}
if (unit_ != com.google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit.UNSPECIFIED.getNumber()) {
output.writeEnum(4, unit_);
}
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, header_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, description_);
}
for (int i = 0; i < finalUrls_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, finalUrls_.getRaw(i));
}
for (int i = 0; i < finalMobileUrls_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, finalMobileUrls_.getRaw(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getPrice());
}
if (unit_ != com.google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit.UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(4, unit_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, header_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, description_);
}
{
int dataSize = 0;
for (int i = 0; i < finalUrls_.size(); i++) {
dataSize += computeStringSizeNoTag(finalUrls_.getRaw(i));
}
size += dataSize;
size += 1 * getFinalUrlsList().size();
}
{
int dataSize = 0;
for (int i = 0; i < finalMobileUrls_.size(); i++) {
dataSize += computeStringSizeNoTag(finalMobileUrls_.getRaw(i));
}
size += dataSize;
size += 1 * getFinalMobileUrlsList().size();
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.ads.googleads.v17.common.PriceOffer)) {
return super.equals(obj);
}
com.google.ads.googleads.v17.common.PriceOffer other = (com.google.ads.googleads.v17.common.PriceOffer) obj;
if (hasHeader() != other.hasHeader()) return false;
if (hasHeader()) {
if (!getHeader()
.equals(other.getHeader())) return false;
}
if (hasDescription() != other.hasDescription()) return false;
if (hasDescription()) {
if (!getDescription()
.equals(other.getDescription())) return false;
}
if (hasPrice() != other.hasPrice()) return false;
if (hasPrice()) {
if (!getPrice()
.equals(other.getPrice())) return false;
}
if (unit_ != other.unit_) return false;
if (!getFinalUrlsList()
.equals(other.getFinalUrlsList())) return false;
if (!getFinalMobileUrlsList()
.equals(other.getFinalMobileUrlsList())) 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 (hasHeader()) {
hash = (37 * hash) + HEADER_FIELD_NUMBER;
hash = (53 * hash) + getHeader().hashCode();
}
if (hasDescription()) {
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
}
if (hasPrice()) {
hash = (37 * hash) + PRICE_FIELD_NUMBER;
hash = (53 * hash) + getPrice().hashCode();
}
hash = (37 * hash) + UNIT_FIELD_NUMBER;
hash = (53 * hash) + unit_;
if (getFinalUrlsCount() > 0) {
hash = (37 * hash) + FINAL_URLS_FIELD_NUMBER;
hash = (53 * hash) + getFinalUrlsList().hashCode();
}
if (getFinalMobileUrlsCount() > 0) {
hash = (37 * hash) + FINAL_MOBILE_URLS_FIELD_NUMBER;
hash = (53 * hash) + getFinalMobileUrlsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.ads.googleads.v17.common.PriceOffer parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.common.PriceOffer 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.PriceOffer parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.common.PriceOffer 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.PriceOffer parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.common.PriceOffer 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.PriceOffer 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.PriceOffer 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.PriceOffer 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.PriceOffer 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.PriceOffer 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.PriceOffer 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.PriceOffer 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;
}
/**
*
* Represents one price offer in a price extension.
*
*
* Protobuf type {@code google.ads.googleads.v17.common.PriceOffer}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.ads.googleads.v17.common.PriceOffer)
com.google.ads.googleads.v17.common.PriceOfferOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.common.ExtensionsProto.internal_static_google_ads_googleads_v17_common_PriceOffer_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v17.common.ExtensionsProto.internal_static_google_ads_googleads_v17_common_PriceOffer_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.common.PriceOffer.class, com.google.ads.googleads.v17.common.PriceOffer.Builder.class);
}
// Construct using com.google.ads.googleads.v17.common.PriceOffer.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getPriceFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
header_ = "";
description_ = "";
price_ = null;
if (priceBuilder_ != null) {
priceBuilder_.dispose();
priceBuilder_ = null;
}
unit_ = 0;
finalUrls_ =
com.google.protobuf.LazyStringArrayList.emptyList();
finalMobileUrls_ =
com.google.protobuf.LazyStringArrayList.emptyList();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.ads.googleads.v17.common.ExtensionsProto.internal_static_google_ads_googleads_v17_common_PriceOffer_descriptor;
}
@java.lang.Override
public com.google.ads.googleads.v17.common.PriceOffer getDefaultInstanceForType() {
return com.google.ads.googleads.v17.common.PriceOffer.getDefaultInstance();
}
@java.lang.Override
public com.google.ads.googleads.v17.common.PriceOffer build() {
com.google.ads.googleads.v17.common.PriceOffer result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.ads.googleads.v17.common.PriceOffer buildPartial() {
com.google.ads.googleads.v17.common.PriceOffer result = new com.google.ads.googleads.v17.common.PriceOffer(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.ads.googleads.v17.common.PriceOffer result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.header_ = header_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.description_ = description_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.price_ = priceBuilder_ == null
? price_
: priceBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.unit_ = unit_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
finalUrls_.makeImmutable();
result.finalUrls_ = finalUrls_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
finalMobileUrls_.makeImmutable();
result.finalMobileUrls_ = finalMobileUrls_;
}
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.common.PriceOffer) {
return mergeFrom((com.google.ads.googleads.v17.common.PriceOffer)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.ads.googleads.v17.common.PriceOffer other) {
if (other == com.google.ads.googleads.v17.common.PriceOffer.getDefaultInstance()) return this;
if (other.hasHeader()) {
header_ = other.header_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasDescription()) {
description_ = other.description_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasPrice()) {
mergePrice(other.getPrice());
}
if (other.unit_ != 0) {
setUnitValue(other.getUnitValue());
}
if (!other.finalUrls_.isEmpty()) {
if (finalUrls_.isEmpty()) {
finalUrls_ = other.finalUrls_;
bitField0_ |= 0x00000010;
} else {
ensureFinalUrlsIsMutable();
finalUrls_.addAll(other.finalUrls_);
}
onChanged();
}
if (!other.finalMobileUrls_.isEmpty()) {
if (finalMobileUrls_.isEmpty()) {
finalMobileUrls_ = other.finalMobileUrls_;
bitField0_ |= 0x00000020;
} else {
ensureFinalMobileUrlsIsMutable();
finalMobileUrls_.addAll(other.finalMobileUrls_);
}
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 26: {
input.readMessage(
getPriceFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 32: {
unit_ = input.readEnum();
bitField0_ |= 0x00000008;
break;
} // case 32
case 58: {
header_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 58
case 66: {
description_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 66
case 74: {
java.lang.String s = input.readStringRequireUtf8();
ensureFinalUrlsIsMutable();
finalUrls_.add(s);
break;
} // case 74
case 82: {
java.lang.String s = input.readStringRequireUtf8();
ensureFinalMobileUrlsIsMutable();
finalMobileUrls_.add(s);
break;
} // case 82
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 header_ = "";
/**
*
* Header text of this offer.
*
*
* optional string header = 7;
* @return Whether the header field is set.
*/
public boolean hasHeader() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Header text of this offer.
*
*
* optional string header = 7;
* @return The header.
*/
public java.lang.String getHeader() {
java.lang.Object ref = header_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
header_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Header text of this offer.
*
*
* optional string header = 7;
* @return The bytes for header.
*/
public com.google.protobuf.ByteString
getHeaderBytes() {
java.lang.Object ref = header_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
header_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Header text of this offer.
*
*
* optional string header = 7;
* @param value The header to set.
* @return This builder for chaining.
*/
public Builder setHeader(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
header_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Header text of this offer.
*
*
* optional string header = 7;
* @return This builder for chaining.
*/
public Builder clearHeader() {
header_ = getDefaultInstance().getHeader();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Header text of this offer.
*
*
* optional string header = 7;
* @param value The bytes for header to set.
* @return This builder for chaining.
*/
public Builder setHeaderBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
header_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
* Description text of this offer.
*
*
* optional string description = 8;
* @return Whether the description field is set.
*/
public boolean hasDescription() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Description text of this offer.
*
*
* optional string description = 8;
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Description text of this offer.
*
*
* optional string description = 8;
* @return The bytes for description.
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Description text of this offer.
*
*
* optional string description = 8;
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
description_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Description text of this offer.
*
*
* optional string description = 8;
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* Description text of this offer.
*
*
* optional string description = 8;
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
description_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.ads.googleads.v17.common.Money price_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.Money, com.google.ads.googleads.v17.common.Money.Builder, com.google.ads.googleads.v17.common.MoneyOrBuilder> priceBuilder_;
/**
*
* Price value of this offer.
*
*
* .google.ads.googleads.v17.common.Money price = 3;
* @return Whether the price field is set.
*/
public boolean hasPrice() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Price value of this offer.
*
*
* .google.ads.googleads.v17.common.Money price = 3;
* @return The price.
*/
public com.google.ads.googleads.v17.common.Money getPrice() {
if (priceBuilder_ == null) {
return price_ == null ? com.google.ads.googleads.v17.common.Money.getDefaultInstance() : price_;
} else {
return priceBuilder_.getMessage();
}
}
/**
*
* Price value of this offer.
*
*
* .google.ads.googleads.v17.common.Money price = 3;
*/
public Builder setPrice(com.google.ads.googleads.v17.common.Money value) {
if (priceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
price_ = value;
} else {
priceBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Price value of this offer.
*
*
* .google.ads.googleads.v17.common.Money price = 3;
*/
public Builder setPrice(
com.google.ads.googleads.v17.common.Money.Builder builderForValue) {
if (priceBuilder_ == null) {
price_ = builderForValue.build();
} else {
priceBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Price value of this offer.
*
*
* .google.ads.googleads.v17.common.Money price = 3;
*/
public Builder mergePrice(com.google.ads.googleads.v17.common.Money value) {
if (priceBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
price_ != null &&
price_ != com.google.ads.googleads.v17.common.Money.getDefaultInstance()) {
getPriceBuilder().mergeFrom(value);
} else {
price_ = value;
}
} else {
priceBuilder_.mergeFrom(value);
}
if (price_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
* Price value of this offer.
*
*
* .google.ads.googleads.v17.common.Money price = 3;
*/
public Builder clearPrice() {
bitField0_ = (bitField0_ & ~0x00000004);
price_ = null;
if (priceBuilder_ != null) {
priceBuilder_.dispose();
priceBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Price value of this offer.
*
*
* .google.ads.googleads.v17.common.Money price = 3;
*/
public com.google.ads.googleads.v17.common.Money.Builder getPriceBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getPriceFieldBuilder().getBuilder();
}
/**
*
* Price value of this offer.
*
*
* .google.ads.googleads.v17.common.Money price = 3;
*/
public com.google.ads.googleads.v17.common.MoneyOrBuilder getPriceOrBuilder() {
if (priceBuilder_ != null) {
return priceBuilder_.getMessageOrBuilder();
} else {
return price_ == null ?
com.google.ads.googleads.v17.common.Money.getDefaultInstance() : price_;
}
}
/**
*
* Price value of this offer.
*
*
* .google.ads.googleads.v17.common.Money price = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.Money, com.google.ads.googleads.v17.common.Money.Builder, com.google.ads.googleads.v17.common.MoneyOrBuilder>
getPriceFieldBuilder() {
if (priceBuilder_ == null) {
priceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.ads.googleads.v17.common.Money, com.google.ads.googleads.v17.common.Money.Builder, com.google.ads.googleads.v17.common.MoneyOrBuilder>(
getPrice(),
getParentForChildren(),
isClean());
price_ = null;
}
return priceBuilder_;
}
private int unit_ = 0;
/**
*
* Price unit for this offer.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;
* @return The enum numeric value on the wire for unit.
*/
@java.lang.Override public int getUnitValue() {
return unit_;
}
/**
*
* Price unit for this offer.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;
* @param value The enum numeric value on the wire for unit to set.
* @return This builder for chaining.
*/
public Builder setUnitValue(int value) {
unit_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Price unit for this offer.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;
* @return The unit.
*/
@java.lang.Override
public com.google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit getUnit() {
com.google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit result = com.google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit.forNumber(unit_);
return result == null ? com.google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit.UNRECOGNIZED : result;
}
/**
*
* Price unit for this offer.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;
* @param value The unit to set.
* @return This builder for chaining.
*/
public Builder setUnit(com.google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
unit_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Price unit for this offer.
*
*
* .google.ads.googleads.v17.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;
* @return This builder for chaining.
*/
public Builder clearUnit() {
bitField0_ = (bitField0_ & ~0x00000008);
unit_ = 0;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList finalUrls_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureFinalUrlsIsMutable() {
if (!finalUrls_.isModifiable()) {
finalUrls_ = new com.google.protobuf.LazyStringArrayList(finalUrls_);
}
bitField0_ |= 0x00000010;
}
/**
*
* A list of possible final URLs after all cross domain redirects.
*
*
* repeated string final_urls = 9;
* @return A list containing the finalUrls.
*/
public com.google.protobuf.ProtocolStringList
getFinalUrlsList() {
finalUrls_.makeImmutable();
return finalUrls_;
}
/**
*
* A list of possible final URLs after all cross domain redirects.
*
*
* repeated string final_urls = 9;
* @return The count of finalUrls.
*/
public int getFinalUrlsCount() {
return finalUrls_.size();
}
/**
*
* A list of possible final URLs after all cross domain redirects.
*
*
* repeated string final_urls = 9;
* @param index The index of the element to return.
* @return The finalUrls at the given index.
*/
public java.lang.String getFinalUrls(int index) {
return finalUrls_.get(index);
}
/**
*
* A list of possible final URLs after all cross domain redirects.
*
*
* repeated string final_urls = 9;
* @param index The index of the value to return.
* @return The bytes of the finalUrls at the given index.
*/
public com.google.protobuf.ByteString
getFinalUrlsBytes(int index) {
return finalUrls_.getByteString(index);
}
/**
*
* A list of possible final URLs after all cross domain redirects.
*
*
* repeated string final_urls = 9;
* @param index The index to set the value at.
* @param value The finalUrls to set.
* @return This builder for chaining.
*/
public Builder setFinalUrls(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureFinalUrlsIsMutable();
finalUrls_.set(index, value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* A list of possible final URLs after all cross domain redirects.
*
*
* repeated string final_urls = 9;
* @param value The finalUrls to add.
* @return This builder for chaining.
*/
public Builder addFinalUrls(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureFinalUrlsIsMutable();
finalUrls_.add(value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* A list of possible final URLs after all cross domain redirects.
*
*
* repeated string final_urls = 9;
* @param values The finalUrls to add.
* @return This builder for chaining.
*/
public Builder addAllFinalUrls(
java.lang.Iterable values) {
ensureFinalUrlsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, finalUrls_);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* A list of possible final URLs after all cross domain redirects.
*
*
* repeated string final_urls = 9;
* @return This builder for chaining.
*/
public Builder clearFinalUrls() {
finalUrls_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);;
onChanged();
return this;
}
/**
*
* A list of possible final URLs after all cross domain redirects.
*
*
* repeated string final_urls = 9;
* @param value The bytes of the finalUrls to add.
* @return This builder for chaining.
*/
public Builder addFinalUrlsBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensureFinalUrlsIsMutable();
finalUrls_.add(value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList finalMobileUrls_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureFinalMobileUrlsIsMutable() {
if (!finalMobileUrls_.isModifiable()) {
finalMobileUrls_ = new com.google.protobuf.LazyStringArrayList(finalMobileUrls_);
}
bitField0_ |= 0x00000020;
}
/**
*
* A list of possible final mobile URLs after all cross domain redirects.
*
*
* repeated string final_mobile_urls = 10;
* @return A list containing the finalMobileUrls.
*/
public com.google.protobuf.ProtocolStringList
getFinalMobileUrlsList() {
finalMobileUrls_.makeImmutable();
return finalMobileUrls_;
}
/**
*
* A list of possible final mobile URLs after all cross domain redirects.
*
*
* repeated string final_mobile_urls = 10;
* @return The count of finalMobileUrls.
*/
public int getFinalMobileUrlsCount() {
return finalMobileUrls_.size();
}
/**
*
* A list of possible final mobile URLs after all cross domain redirects.
*
*
* repeated string final_mobile_urls = 10;
* @param index The index of the element to return.
* @return The finalMobileUrls at the given index.
*/
public java.lang.String getFinalMobileUrls(int index) {
return finalMobileUrls_.get(index);
}
/**
*
* A list of possible final mobile URLs after all cross domain redirects.
*
*
* repeated string final_mobile_urls = 10;
* @param index The index of the value to return.
* @return The bytes of the finalMobileUrls at the given index.
*/
public com.google.protobuf.ByteString
getFinalMobileUrlsBytes(int index) {
return finalMobileUrls_.getByteString(index);
}
/**
*
* A list of possible final mobile URLs after all cross domain redirects.
*
*
* repeated string final_mobile_urls = 10;
* @param index The index to set the value at.
* @param value The finalMobileUrls to set.
* @return This builder for chaining.
*/
public Builder setFinalMobileUrls(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureFinalMobileUrlsIsMutable();
finalMobileUrls_.set(index, value);
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* A list of possible final mobile URLs after all cross domain redirects.
*
*
* repeated string final_mobile_urls = 10;
* @param value The finalMobileUrls to add.
* @return This builder for chaining.
*/
public Builder addFinalMobileUrls(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureFinalMobileUrlsIsMutable();
finalMobileUrls_.add(value);
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* A list of possible final mobile URLs after all cross domain redirects.
*
*
* repeated string final_mobile_urls = 10;
* @param values The finalMobileUrls to add.
* @return This builder for chaining.
*/
public Builder addAllFinalMobileUrls(
java.lang.Iterable values) {
ensureFinalMobileUrlsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, finalMobileUrls_);
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* A list of possible final mobile URLs after all cross domain redirects.
*
*
* repeated string final_mobile_urls = 10;
* @return This builder for chaining.
*/
public Builder clearFinalMobileUrls() {
finalMobileUrls_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);;
onChanged();
return this;
}
/**
*
* A list of possible final mobile URLs after all cross domain redirects.
*
*
* repeated string final_mobile_urls = 10;
* @param value The bytes of the finalMobileUrls to add.
* @return This builder for chaining.
*/
public Builder addFinalMobileUrlsBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensureFinalMobileUrlsIsMutable();
finalMobileUrls_.add(value);
bitField0_ |= 0x00000020;
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.common.PriceOffer)
}
// @@protoc_insertion_point(class_scope:google.ads.googleads.v17.common.PriceOffer)
private static final com.google.ads.googleads.v17.common.PriceOffer DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.ads.googleads.v17.common.PriceOffer();
}
public static com.google.ads.googleads.v17.common.PriceOffer getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PriceOffer 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.PriceOffer getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy