com.google.ads.googleads.v17.services.CartData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of google-ads-stubs-v17 Show documentation
Show all versions of google-ads-stubs-v17 Show documentation
Stubs for GAAPI version google-ads-stubs-v17
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/ads/googleads/v17/services/conversion_upload_service.proto
// Protobuf Java Version: 3.25.3
package com.google.ads.googleads.v17.services;
/**
*
* Contains additional information about cart data.
*
*
* Protobuf type {@code google.ads.googleads.v17.services.CartData}
*/
public final class CartData extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.ads.googleads.v17.services.CartData)
CartDataOrBuilder {
private static final long serialVersionUID = 0L;
// Use CartData.newBuilder() to construct.
private CartData(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CartData() {
feedCountryCode_ = "";
feedLanguageCode_ = "";
items_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CartData();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.services.ConversionUploadServiceProto.internal_static_google_ads_googleads_v17_services_CartData_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v17.services.ConversionUploadServiceProto.internal_static_google_ads_googleads_v17_services_CartData_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.services.CartData.class, com.google.ads.googleads.v17.services.CartData.Builder.class);
}
public interface ItemOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.ads.googleads.v17.services.CartData.Item)
com.google.protobuf.MessageOrBuilder {
/**
*
* The shopping id of the item. Must be equal to the Merchant Center product
* identifier.
*
*
* string product_id = 1;
* @return The productId.
*/
java.lang.String getProductId();
/**
*
* The shopping id of the item. Must be equal to the Merchant Center product
* identifier.
*
*
* string product_id = 1;
* @return The bytes for productId.
*/
com.google.protobuf.ByteString
getProductIdBytes();
/**
*
* Number of items sold.
*
*
* int32 quantity = 2;
* @return The quantity.
*/
int getQuantity();
/**
*
* Unit price excluding tax, shipping, and any transaction
* level discounts. The currency code is the same as that in the
* ClickConversion message.
*
*
* double unit_price = 3;
* @return The unitPrice.
*/
double getUnitPrice();
}
/**
*
* Contains data of the items purchased.
*
*
* Protobuf type {@code google.ads.googleads.v17.services.CartData.Item}
*/
public static final class Item extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.ads.googleads.v17.services.CartData.Item)
ItemOrBuilder {
private static final long serialVersionUID = 0L;
// Use Item.newBuilder() to construct.
private Item(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Item() {
productId_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Item();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.services.ConversionUploadServiceProto.internal_static_google_ads_googleads_v17_services_CartData_Item_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v17.services.ConversionUploadServiceProto.internal_static_google_ads_googleads_v17_services_CartData_Item_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.services.CartData.Item.class, com.google.ads.googleads.v17.services.CartData.Item.Builder.class);
}
public static final int PRODUCT_ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object productId_ = "";
/**
*
* The shopping id of the item. Must be equal to the Merchant Center product
* identifier.
*
*
* string product_id = 1;
* @return The productId.
*/
@java.lang.Override
public java.lang.String getProductId() {
java.lang.Object ref = productId_;
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();
productId_ = s;
return s;
}
}
/**
*
* The shopping id of the item. Must be equal to the Merchant Center product
* identifier.
*
*
* string product_id = 1;
* @return The bytes for productId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getProductIdBytes() {
java.lang.Object ref = productId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
productId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int QUANTITY_FIELD_NUMBER = 2;
private int quantity_ = 0;
/**
*
* Number of items sold.
*
*
* int32 quantity = 2;
* @return The quantity.
*/
@java.lang.Override
public int getQuantity() {
return quantity_;
}
public static final int UNIT_PRICE_FIELD_NUMBER = 3;
private double unitPrice_ = 0D;
/**
*
* Unit price excluding tax, shipping, and any transaction
* level discounts. The currency code is the same as that in the
* ClickConversion message.
*
*
* double unit_price = 3;
* @return The unitPrice.
*/
@java.lang.Override
public double getUnitPrice() {
return unitPrice_;
}
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(productId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, productId_);
}
if (quantity_ != 0) {
output.writeInt32(2, quantity_);
}
if (java.lang.Double.doubleToRawLongBits(unitPrice_) != 0) {
output.writeDouble(3, unitPrice_);
}
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(productId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, productId_);
}
if (quantity_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, quantity_);
}
if (java.lang.Double.doubleToRawLongBits(unitPrice_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(3, unitPrice_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.ads.googleads.v17.services.CartData.Item)) {
return super.equals(obj);
}
com.google.ads.googleads.v17.services.CartData.Item other = (com.google.ads.googleads.v17.services.CartData.Item) obj;
if (!getProductId()
.equals(other.getProductId())) return false;
if (getQuantity()
!= other.getQuantity()) return false;
if (java.lang.Double.doubleToLongBits(getUnitPrice())
!= java.lang.Double.doubleToLongBits(
other.getUnitPrice())) 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) + PRODUCT_ID_FIELD_NUMBER;
hash = (53 * hash) + getProductId().hashCode();
hash = (37 * hash) + QUANTITY_FIELD_NUMBER;
hash = (53 * hash) + getQuantity();
hash = (37 * hash) + UNIT_PRICE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getUnitPrice()));
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.ads.googleads.v17.services.CartData.Item parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.services.CartData.Item parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.ads.googleads.v17.services.CartData.Item parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.services.CartData.Item parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.ads.googleads.v17.services.CartData.Item parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.services.CartData.Item parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.ads.googleads.v17.services.CartData.Item parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v17.services.CartData.Item parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.ads.googleads.v17.services.CartData.Item parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v17.services.CartData.Item parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.ads.googleads.v17.services.CartData.Item parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v17.services.CartData.Item parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.ads.googleads.v17.services.CartData.Item 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;
}
/**
*
* Contains data of the items purchased.
*
*
* Protobuf type {@code google.ads.googleads.v17.services.CartData.Item}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.ads.googleads.v17.services.CartData.Item)
com.google.ads.googleads.v17.services.CartData.ItemOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.services.ConversionUploadServiceProto.internal_static_google_ads_googleads_v17_services_CartData_Item_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v17.services.ConversionUploadServiceProto.internal_static_google_ads_googleads_v17_services_CartData_Item_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.services.CartData.Item.class, com.google.ads.googleads.v17.services.CartData.Item.Builder.class);
}
// Construct using com.google.ads.googleads.v17.services.CartData.Item.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
productId_ = "";
quantity_ = 0;
unitPrice_ = 0D;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.ads.googleads.v17.services.ConversionUploadServiceProto.internal_static_google_ads_googleads_v17_services_CartData_Item_descriptor;
}
@java.lang.Override
public com.google.ads.googleads.v17.services.CartData.Item getDefaultInstanceForType() {
return com.google.ads.googleads.v17.services.CartData.Item.getDefaultInstance();
}
@java.lang.Override
public com.google.ads.googleads.v17.services.CartData.Item build() {
com.google.ads.googleads.v17.services.CartData.Item result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.ads.googleads.v17.services.CartData.Item buildPartial() {
com.google.ads.googleads.v17.services.CartData.Item result = new com.google.ads.googleads.v17.services.CartData.Item(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.google.ads.googleads.v17.services.CartData.Item result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.productId_ = productId_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.quantity_ = quantity_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.unitPrice_ = unitPrice_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.ads.googleads.v17.services.CartData.Item) {
return mergeFrom((com.google.ads.googleads.v17.services.CartData.Item)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.ads.googleads.v17.services.CartData.Item other) {
if (other == com.google.ads.googleads.v17.services.CartData.Item.getDefaultInstance()) return this;
if (!other.getProductId().isEmpty()) {
productId_ = other.productId_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.getQuantity() != 0) {
setQuantity(other.getQuantity());
}
if (other.getUnitPrice() != 0D) {
setUnitPrice(other.getUnitPrice());
}
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: {
productId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
quantity_ = input.readInt32();
bitField0_ |= 0x00000002;
break;
} // case 16
case 25: {
unitPrice_ = input.readDouble();
bitField0_ |= 0x00000004;
break;
} // case 25
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 productId_ = "";
/**
*
* The shopping id of the item. Must be equal to the Merchant Center product
* identifier.
*
*
* string product_id = 1;
* @return The productId.
*/
public java.lang.String getProductId() {
java.lang.Object ref = productId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
productId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The shopping id of the item. Must be equal to the Merchant Center product
* identifier.
*
*
* string product_id = 1;
* @return The bytes for productId.
*/
public com.google.protobuf.ByteString
getProductIdBytes() {
java.lang.Object ref = productId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
productId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The shopping id of the item. Must be equal to the Merchant Center product
* identifier.
*
*
* string product_id = 1;
* @param value The productId to set.
* @return This builder for chaining.
*/
public Builder setProductId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
productId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The shopping id of the item. Must be equal to the Merchant Center product
* identifier.
*
*
* string product_id = 1;
* @return This builder for chaining.
*/
public Builder clearProductId() {
productId_ = getDefaultInstance().getProductId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* The shopping id of the item. Must be equal to the Merchant Center product
* identifier.
*
*
* string product_id = 1;
* @param value The bytes for productId to set.
* @return This builder for chaining.
*/
public Builder setProductIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
productId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private int quantity_ ;
/**
*
* Number of items sold.
*
*
* int32 quantity = 2;
* @return The quantity.
*/
@java.lang.Override
public int getQuantity() {
return quantity_;
}
/**
*
* Number of items sold.
*
*
* int32 quantity = 2;
* @param value The quantity to set.
* @return This builder for chaining.
*/
public Builder setQuantity(int value) {
quantity_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Number of items sold.
*
*
* int32 quantity = 2;
* @return This builder for chaining.
*/
public Builder clearQuantity() {
bitField0_ = (bitField0_ & ~0x00000002);
quantity_ = 0;
onChanged();
return this;
}
private double unitPrice_ ;
/**
*
* Unit price excluding tax, shipping, and any transaction
* level discounts. The currency code is the same as that in the
* ClickConversion message.
*
*
* double unit_price = 3;
* @return The unitPrice.
*/
@java.lang.Override
public double getUnitPrice() {
return unitPrice_;
}
/**
*
* Unit price excluding tax, shipping, and any transaction
* level discounts. The currency code is the same as that in the
* ClickConversion message.
*
*
* double unit_price = 3;
* @param value The unitPrice to set.
* @return This builder for chaining.
*/
public Builder setUnitPrice(double value) {
unitPrice_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Unit price excluding tax, shipping, and any transaction
* level discounts. The currency code is the same as that in the
* ClickConversion message.
*
*
* double unit_price = 3;
* @return This builder for chaining.
*/
public Builder clearUnitPrice() {
bitField0_ = (bitField0_ & ~0x00000004);
unitPrice_ = 0D;
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.services.CartData.Item)
}
// @@protoc_insertion_point(class_scope:google.ads.googleads.v17.services.CartData.Item)
private static final com.google.ads.googleads.v17.services.CartData.Item DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.ads.googleads.v17.services.CartData.Item();
}
public static com.google.ads.googleads.v17.services.CartData.Item getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser-
PARSER = new com.google.protobuf.AbstractParser
- () {
@java.lang.Override
public Item parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser
- parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser
- getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.ads.googleads.v17.services.CartData.Item getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int MERCHANT_ID_FIELD_NUMBER = 6;
private long merchantId_ = 0L;
/**
*
* The Merchant Center ID where the items are uploaded.
*
*
* int64 merchant_id = 6;
* @return The merchantId.
*/
@java.lang.Override
public long getMerchantId() {
return merchantId_;
}
public static final int FEED_COUNTRY_CODE_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object feedCountryCode_ = "";
/**
*
* The country code associated with the feed where the items are uploaded.
*
*
* string feed_country_code = 2;
* @return The feedCountryCode.
*/
@java.lang.Override
public java.lang.String getFeedCountryCode() {
java.lang.Object ref = feedCountryCode_;
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();
feedCountryCode_ = s;
return s;
}
}
/**
*
* The country code associated with the feed where the items are uploaded.
*
*
* string feed_country_code = 2;
* @return The bytes for feedCountryCode.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getFeedCountryCodeBytes() {
java.lang.Object ref = feedCountryCode_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
feedCountryCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FEED_LANGUAGE_CODE_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object feedLanguageCode_ = "";
/**
*
* The language code associated with the feed where the items are uploaded.
*
*
* string feed_language_code = 3;
* @return The feedLanguageCode.
*/
@java.lang.Override
public java.lang.String getFeedLanguageCode() {
java.lang.Object ref = feedLanguageCode_;
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();
feedLanguageCode_ = s;
return s;
}
}
/**
*
* The language code associated with the feed where the items are uploaded.
*
*
* string feed_language_code = 3;
* @return The bytes for feedLanguageCode.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getFeedLanguageCodeBytes() {
java.lang.Object ref = feedLanguageCode_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
feedLanguageCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LOCAL_TRANSACTION_COST_FIELD_NUMBER = 4;
private double localTransactionCost_ = 0D;
/**
*
* Sum of all transaction level discounts, such as free shipping and
* coupon discounts for the whole cart. The currency code is the same
* as that in the ClickConversion message.
*
*
* double local_transaction_cost = 4;
* @return The localTransactionCost.
*/
@java.lang.Override
public double getLocalTransactionCost() {
return localTransactionCost_;
}
public static final int ITEMS_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private java.util.List items_;
/**
*
* Data of the items purchased.
*
*
* repeated .google.ads.googleads.v17.services.CartData.Item items = 5;
*/
@java.lang.Override
public java.util.List getItemsList() {
return items_;
}
/**
*
* Data of the items purchased.
*
*
* repeated .google.ads.googleads.v17.services.CartData.Item items = 5;
*/
@java.lang.Override
public java.util.List extends com.google.ads.googleads.v17.services.CartData.ItemOrBuilder>
getItemsOrBuilderList() {
return items_;
}
/**
*
* Data of the items purchased.
*
*
* repeated .google.ads.googleads.v17.services.CartData.Item items = 5;
*/
@java.lang.Override
public int getItemsCount() {
return items_.size();
}
/**
*
* Data of the items purchased.
*
*
* repeated .google.ads.googleads.v17.services.CartData.Item items = 5;
*/
@java.lang.Override
public com.google.ads.googleads.v17.services.CartData.Item getItems(int index) {
return items_.get(index);
}
/**
*
* Data of the items purchased.
*
*
* repeated .google.ads.googleads.v17.services.CartData.Item items = 5;
*/
@java.lang.Override
public com.google.ads.googleads.v17.services.CartData.ItemOrBuilder getItemsOrBuilder(
int index) {
return items_.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 {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(feedCountryCode_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, feedCountryCode_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(feedLanguageCode_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, feedLanguageCode_);
}
if (java.lang.Double.doubleToRawLongBits(localTransactionCost_) != 0) {
output.writeDouble(4, localTransactionCost_);
}
for (int i = 0; i < items_.size(); i++) {
output.writeMessage(5, items_.get(i));
}
if (merchantId_ != 0L) {
output.writeInt64(6, merchantId_);
}
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(feedCountryCode_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, feedCountryCode_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(feedLanguageCode_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, feedLanguageCode_);
}
if (java.lang.Double.doubleToRawLongBits(localTransactionCost_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(4, localTransactionCost_);
}
for (int i = 0; i < items_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, items_.get(i));
}
if (merchantId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(6, merchantId_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.ads.googleads.v17.services.CartData)) {
return super.equals(obj);
}
com.google.ads.googleads.v17.services.CartData other = (com.google.ads.googleads.v17.services.CartData) obj;
if (getMerchantId()
!= other.getMerchantId()) return false;
if (!getFeedCountryCode()
.equals(other.getFeedCountryCode())) return false;
if (!getFeedLanguageCode()
.equals(other.getFeedLanguageCode())) return false;
if (java.lang.Double.doubleToLongBits(getLocalTransactionCost())
!= java.lang.Double.doubleToLongBits(
other.getLocalTransactionCost())) return false;
if (!getItemsList()
.equals(other.getItemsList())) 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) + MERCHANT_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMerchantId());
hash = (37 * hash) + FEED_COUNTRY_CODE_FIELD_NUMBER;
hash = (53 * hash) + getFeedCountryCode().hashCode();
hash = (37 * hash) + FEED_LANGUAGE_CODE_FIELD_NUMBER;
hash = (53 * hash) + getFeedLanguageCode().hashCode();
hash = (37 * hash) + LOCAL_TRANSACTION_COST_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getLocalTransactionCost()));
if (getItemsCount() > 0) {
hash = (37 * hash) + ITEMS_FIELD_NUMBER;
hash = (53 * hash) + getItemsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.ads.googleads.v17.services.CartData parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.services.CartData parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.ads.googleads.v17.services.CartData parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.services.CartData parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.ads.googleads.v17.services.CartData parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.ads.googleads.v17.services.CartData parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.ads.googleads.v17.services.CartData parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v17.services.CartData parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.ads.googleads.v17.services.CartData parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v17.services.CartData parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.ads.googleads.v17.services.CartData parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.ads.googleads.v17.services.CartData parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.ads.googleads.v17.services.CartData 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;
}
/**
*
* Contains additional information about cart data.
*
*
* Protobuf type {@code google.ads.googleads.v17.services.CartData}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.ads.googleads.v17.services.CartData)
com.google.ads.googleads.v17.services.CartDataOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.ads.googleads.v17.services.ConversionUploadServiceProto.internal_static_google_ads_googleads_v17_services_CartData_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.ads.googleads.v17.services.ConversionUploadServiceProto.internal_static_google_ads_googleads_v17_services_CartData_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.ads.googleads.v17.services.CartData.class, com.google.ads.googleads.v17.services.CartData.Builder.class);
}
// Construct using com.google.ads.googleads.v17.services.CartData.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
merchantId_ = 0L;
feedCountryCode_ = "";
feedLanguageCode_ = "";
localTransactionCost_ = 0D;
if (itemsBuilder_ == null) {
items_ = java.util.Collections.emptyList();
} else {
items_ = null;
itemsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.ads.googleads.v17.services.ConversionUploadServiceProto.internal_static_google_ads_googleads_v17_services_CartData_descriptor;
}
@java.lang.Override
public com.google.ads.googleads.v17.services.CartData getDefaultInstanceForType() {
return com.google.ads.googleads.v17.services.CartData.getDefaultInstance();
}
@java.lang.Override
public com.google.ads.googleads.v17.services.CartData build() {
com.google.ads.googleads.v17.services.CartData result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.ads.googleads.v17.services.CartData buildPartial() {
com.google.ads.googleads.v17.services.CartData result = new com.google.ads.googleads.v17.services.CartData(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.ads.googleads.v17.services.CartData result) {
if (itemsBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0)) {
items_ = java.util.Collections.unmodifiableList(items_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.items_ = items_;
} else {
result.items_ = itemsBuilder_.build();
}
}
private void buildPartial0(com.google.ads.googleads.v17.services.CartData result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.merchantId_ = merchantId_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.feedCountryCode_ = feedCountryCode_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.feedLanguageCode_ = feedLanguageCode_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.localTransactionCost_ = localTransactionCost_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.ads.googleads.v17.services.CartData) {
return mergeFrom((com.google.ads.googleads.v17.services.CartData)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.ads.googleads.v17.services.CartData other) {
if (other == com.google.ads.googleads.v17.services.CartData.getDefaultInstance()) return this;
if (other.getMerchantId() != 0L) {
setMerchantId(other.getMerchantId());
}
if (!other.getFeedCountryCode().isEmpty()) {
feedCountryCode_ = other.feedCountryCode_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getFeedLanguageCode().isEmpty()) {
feedLanguageCode_ = other.feedLanguageCode_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.getLocalTransactionCost() != 0D) {
setLocalTransactionCost(other.getLocalTransactionCost());
}
if (itemsBuilder_ == null) {
if (!other.items_.isEmpty()) {
if (items_.isEmpty()) {
items_ = other.items_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureItemsIsMutable();
items_.addAll(other.items_);
}
onChanged();
}
} else {
if (!other.items_.isEmpty()) {
if (itemsBuilder_.isEmpty()) {
itemsBuilder_.dispose();
itemsBuilder_ = null;
items_ = other.items_;
bitField0_ = (bitField0_ & ~0x00000010);
itemsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getItemsFieldBuilder() : null;
} else {
itemsBuilder_.addAllMessages(other.items_);
}
}
}
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 18: {
feedCountryCode_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
feedLanguageCode_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 33: {
localTransactionCost_ = input.readDouble();
bitField0_ |= 0x00000008;
break;
} // case 33
case 42: {
com.google.ads.googleads.v17.services.CartData.Item m =
input.readMessage(
com.google.ads.googleads.v17.services.CartData.Item.parser(),
extensionRegistry);
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
items_.add(m);
} else {
itemsBuilder_.addMessage(m);
}
break;
} // case 42
case 48: {
merchantId_ = input.readInt64();
bitField0_ |= 0x00000001;
break;
} // case 48
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 long merchantId_ ;
/**
*
* The Merchant Center ID where the items are uploaded.
*
*
* int64 merchant_id = 6;
* @return The merchantId.
*/
@java.lang.Override
public long getMerchantId() {
return merchantId_;
}
/**
*
* The Merchant Center ID where the items are uploaded.
*
*
* int64 merchant_id = 6;
* @param value The merchantId to set.
* @return This builder for chaining.
*/
public Builder setMerchantId(long value) {
merchantId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The Merchant Center ID where the items are uploaded.
*
*
* int64 merchant_id = 6;
* @return This builder for chaining.
*/
public Builder clearMerchantId() {
bitField0_ = (bitField0_ & ~0x00000001);
merchantId_ = 0L;
onChanged();
return this;
}
private java.lang.Object feedCountryCode_ = "";
/**
*
* The country code associated with the feed where the items are uploaded.
*
*
* string feed_country_code = 2;
* @return The feedCountryCode.
*/
public java.lang.String getFeedCountryCode() {
java.lang.Object ref = feedCountryCode_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
feedCountryCode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The country code associated with the feed where the items are uploaded.
*
*
* string feed_country_code = 2;
* @return The bytes for feedCountryCode.
*/
public com.google.protobuf.ByteString
getFeedCountryCodeBytes() {
java.lang.Object ref = feedCountryCode_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
feedCountryCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The country code associated with the feed where the items are uploaded.
*
*
* string feed_country_code = 2;
* @param value The feedCountryCode to set.
* @return This builder for chaining.
*/
public Builder setFeedCountryCode(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
feedCountryCode_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The country code associated with the feed where the items are uploaded.
*
*
* string feed_country_code = 2;
* @return This builder for chaining.
*/
public Builder clearFeedCountryCode() {
feedCountryCode_ = getDefaultInstance().getFeedCountryCode();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* The country code associated with the feed where the items are uploaded.
*
*
* string feed_country_code = 2;
* @param value The bytes for feedCountryCode to set.
* @return This builder for chaining.
*/
public Builder setFeedCountryCodeBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
feedCountryCode_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object feedLanguageCode_ = "";
/**
*
* The language code associated with the feed where the items are uploaded.
*
*
* string feed_language_code = 3;
* @return The feedLanguageCode.
*/
public java.lang.String getFeedLanguageCode() {
java.lang.Object ref = feedLanguageCode_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
feedLanguageCode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The language code associated with the feed where the items are uploaded.
*
*
* string feed_language_code = 3;
* @return The bytes for feedLanguageCode.
*/
public com.google.protobuf.ByteString
getFeedLanguageCodeBytes() {
java.lang.Object ref = feedLanguageCode_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
feedLanguageCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The language code associated with the feed where the items are uploaded.
*
*
* string feed_language_code = 3;
* @param value The feedLanguageCode to set.
* @return This builder for chaining.
*/
public Builder setFeedLanguageCode(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
feedLanguageCode_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* The language code associated with the feed where the items are uploaded.
*
*
* string feed_language_code = 3;
* @return This builder for chaining.
*/
public Builder clearFeedLanguageCode() {
feedLanguageCode_ = getDefaultInstance().getFeedLanguageCode();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* The language code associated with the feed where the items are uploaded.
*
*
* string feed_language_code = 3;
* @param value The bytes for feedLanguageCode to set.
* @return This builder for chaining.
*/
public Builder setFeedLanguageCodeBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
feedLanguageCode_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private double localTransactionCost_ ;
/**
*
* Sum of all transaction level discounts, such as free shipping and
* coupon discounts for the whole cart. The currency code is the same
* as that in the ClickConversion message.
*
*
* double local_transaction_cost = 4;
* @return The localTransactionCost.
*/
@java.lang.Override
public double getLocalTransactionCost() {
return localTransactionCost_;
}
/**
*
* Sum of all transaction level discounts, such as free shipping and
* coupon discounts for the whole cart. The currency code is the same
* as that in the ClickConversion message.
*
*
* double local_transaction_cost = 4;
* @param value The localTransactionCost to set.
* @return This builder for chaining.
*/
public Builder setLocalTransactionCost(double value) {
localTransactionCost_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Sum of all transaction level discounts, such as free shipping and
* coupon discounts for the whole cart. The currency code is the same
* as that in the ClickConversion message.
*
*
* double local_transaction_cost = 4;
* @return This builder for chaining.
*/
public Builder clearLocalTransactionCost() {
bitField0_ = (bitField0_ & ~0x00000008);
localTransactionCost_ = 0D;
onChanged();
return this;
}
private java.util.List items_ =
java.util.Collections.emptyList();
private void ensureItemsIsMutable() {
if (!((bitField0_ & 0x00000010) != 0)) {
items_ = new java.util.ArrayList(items_);
bitField0_ |= 0x00000010;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.services.CartData.Item, com.google.ads.googleads.v17.services.CartData.Item.Builder, com.google.ads.googleads.v17.services.CartData.ItemOrBuilder> itemsBuilder_;
/**
*
* Data of the items purchased.
*
*
* repeated .google.ads.googleads.v17.services.CartData.Item items = 5;
*/
public java.util.List getItemsList() {
if (itemsBuilder_ == null) {
return java.util.Collections.unmodifiableList(items_);
} else {
return itemsBuilder_.getMessageList();
}
}
/**
*
* Data of the items purchased.
*
*
* repeated .google.ads.googleads.v17.services.CartData.Item items = 5;
*/
public int getItemsCount() {
if (itemsBuilder_ == null) {
return items_.size();
} else {
return itemsBuilder_.getCount();
}
}
/**
*
* Data of the items purchased.
*
*
* repeated .google.ads.googleads.v17.services.CartData.Item items = 5;
*/
public com.google.ads.googleads.v17.services.CartData.Item getItems(int index) {
if (itemsBuilder_ == null) {
return items_.get(index);
} else {
return itemsBuilder_.getMessage(index);
}
}
/**
*
* Data of the items purchased.
*
*
* repeated .google.ads.googleads.v17.services.CartData.Item items = 5;
*/
public Builder setItems(
int index, com.google.ads.googleads.v17.services.CartData.Item value) {
if (itemsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureItemsIsMutable();
items_.set(index, value);
onChanged();
} else {
itemsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Data of the items purchased.
*
*
* repeated .google.ads.googleads.v17.services.CartData.Item items = 5;
*/
public Builder setItems(
int index, com.google.ads.googleads.v17.services.CartData.Item.Builder builderForValue) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
items_.set(index, builderForValue.build());
onChanged();
} else {
itemsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Data of the items purchased.
*
*
* repeated .google.ads.googleads.v17.services.CartData.Item items = 5;
*/
public Builder addItems(com.google.ads.googleads.v17.services.CartData.Item value) {
if (itemsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureItemsIsMutable();
items_.add(value);
onChanged();
} else {
itemsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Data of the items purchased.
*
*
* repeated .google.ads.googleads.v17.services.CartData.Item items = 5;
*/
public Builder addItems(
int index, com.google.ads.googleads.v17.services.CartData.Item value) {
if (itemsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureItemsIsMutable();
items_.add(index, value);
onChanged();
} else {
itemsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Data of the items purchased.
*
*
* repeated .google.ads.googleads.v17.services.CartData.Item items = 5;
*/
public Builder addItems(
com.google.ads.googleads.v17.services.CartData.Item.Builder builderForValue) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
items_.add(builderForValue.build());
onChanged();
} else {
itemsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Data of the items purchased.
*
*
* repeated .google.ads.googleads.v17.services.CartData.Item items = 5;
*/
public Builder addItems(
int index, com.google.ads.googleads.v17.services.CartData.Item.Builder builderForValue) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
items_.add(index, builderForValue.build());
onChanged();
} else {
itemsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Data of the items purchased.
*
*
* repeated .google.ads.googleads.v17.services.CartData.Item items = 5;
*/
public Builder addAllItems(
java.lang.Iterable extends com.google.ads.googleads.v17.services.CartData.Item> values) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, items_);
onChanged();
} else {
itemsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Data of the items purchased.
*
*
* repeated .google.ads.googleads.v17.services.CartData.Item items = 5;
*/
public Builder clearItems() {
if (itemsBuilder_ == null) {
items_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
} else {
itemsBuilder_.clear();
}
return this;
}
/**
*
* Data of the items purchased.
*
*
* repeated .google.ads.googleads.v17.services.CartData.Item items = 5;
*/
public Builder removeItems(int index) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
items_.remove(index);
onChanged();
} else {
itemsBuilder_.remove(index);
}
return this;
}
/**
*
* Data of the items purchased.
*
*
* repeated .google.ads.googleads.v17.services.CartData.Item items = 5;
*/
public com.google.ads.googleads.v17.services.CartData.Item.Builder getItemsBuilder(
int index) {
return getItemsFieldBuilder().getBuilder(index);
}
/**
*
* Data of the items purchased.
*
*
* repeated .google.ads.googleads.v17.services.CartData.Item items = 5;
*/
public com.google.ads.googleads.v17.services.CartData.ItemOrBuilder getItemsOrBuilder(
int index) {
if (itemsBuilder_ == null) {
return items_.get(index); } else {
return itemsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Data of the items purchased.
*
*
* repeated .google.ads.googleads.v17.services.CartData.Item items = 5;
*/
public java.util.List extends com.google.ads.googleads.v17.services.CartData.ItemOrBuilder>
getItemsOrBuilderList() {
if (itemsBuilder_ != null) {
return itemsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(items_);
}
}
/**
*
* Data of the items purchased.
*
*
* repeated .google.ads.googleads.v17.services.CartData.Item items = 5;
*/
public com.google.ads.googleads.v17.services.CartData.Item.Builder addItemsBuilder() {
return getItemsFieldBuilder().addBuilder(
com.google.ads.googleads.v17.services.CartData.Item.getDefaultInstance());
}
/**
*
* Data of the items purchased.
*
*
* repeated .google.ads.googleads.v17.services.CartData.Item items = 5;
*/
public com.google.ads.googleads.v17.services.CartData.Item.Builder addItemsBuilder(
int index) {
return getItemsFieldBuilder().addBuilder(
index, com.google.ads.googleads.v17.services.CartData.Item.getDefaultInstance());
}
/**
*
* Data of the items purchased.
*
*
* repeated .google.ads.googleads.v17.services.CartData.Item items = 5;
*/
public java.util.List
getItemsBuilderList() {
return getItemsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.services.CartData.Item, com.google.ads.googleads.v17.services.CartData.Item.Builder, com.google.ads.googleads.v17.services.CartData.ItemOrBuilder>
getItemsFieldBuilder() {
if (itemsBuilder_ == null) {
itemsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.ads.googleads.v17.services.CartData.Item, com.google.ads.googleads.v17.services.CartData.Item.Builder, com.google.ads.googleads.v17.services.CartData.ItemOrBuilder>(
items_,
((bitField0_ & 0x00000010) != 0),
getParentForChildren(),
isClean());
items_ = null;
}
return itemsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.ads.googleads.v17.services.CartData)
}
// @@protoc_insertion_point(class_scope:google.ads.googleads.v17.services.CartData)
private static final com.google.ads.googleads.v17.services.CartData DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.ads.googleads.v17.services.CartData();
}
public static com.google.ads.googleads.v17.services.CartData getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CartData parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.ads.googleads.v17.services.CartData getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy