com.google.shopping.merchant.lfp.v1beta.LfpSale Maven / Gradle / Ivy
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/shopping/merchant/lfp/v1beta/lfpsale.proto
// Protobuf Java Version: 3.25.3
package com.google.shopping.merchant.lfp.v1beta;
/**
*
*
*
* A sale for the merchant.
*
*
* Protobuf type {@code google.shopping.merchant.lfp.v1beta.LfpSale}
*/
public final class LfpSale extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.shopping.merchant.lfp.v1beta.LfpSale)
LfpSaleOrBuilder {
private static final long serialVersionUID = 0L;
// Use LfpSale.newBuilder() to construct.
private LfpSale(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LfpSale() {
name_ = "";
storeCode_ = "";
offerId_ = "";
regionCode_ = "";
contentLanguage_ = "";
gtin_ = "";
uid_ = "";
feedLabel_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new LfpSale();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.shopping.merchant.lfp.v1beta.LfpSaleProto
.internal_static_google_shopping_merchant_lfp_v1beta_LfpSale_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.shopping.merchant.lfp.v1beta.LfpSaleProto
.internal_static_google_shopping_merchant_lfp_v1beta_LfpSale_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.shopping.merchant.lfp.v1beta.LfpSale.class,
com.google.shopping.merchant.lfp.v1beta.LfpSale.Builder.class);
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* Output only. Identifier. The name of the `LfpSale` resource.
* Format:
* `accounts/{account}/lfpSales/{sale}`
*
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
*
*
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
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();
name_ = s;
return s;
}
}
/**
*
*
*
* Output only. Identifier. The name of the `LfpSale` resource.
* Format:
* `accounts/{account}/lfpSales/{sale}`
*
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
*
*
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TARGET_ACCOUNT_FIELD_NUMBER = 2;
private long targetAccount_ = 0L;
/**
*
*
*
* Required. The Merchant Center ID of the merchant to submit the sale for.
*
*
* int64 target_account = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The targetAccount.
*/
@java.lang.Override
public long getTargetAccount() {
return targetAccount_;
}
public static final int STORE_CODE_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object storeCode_ = "";
/**
*
*
*
* Required. The identifier of the merchant's store. Either a `storeCode`
* inserted through the API or the code of the store in the Business Profile.
*
*
* string store_code = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The storeCode.
*/
@java.lang.Override
public java.lang.String getStoreCode() {
java.lang.Object ref = storeCode_;
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();
storeCode_ = s;
return s;
}
}
/**
*
*
*
* Required. The identifier of the merchant's store. Either a `storeCode`
* inserted through the API or the code of the store in the Business Profile.
*
*
* string store_code = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for storeCode.
*/
@java.lang.Override
public com.google.protobuf.ByteString getStoreCodeBytes() {
java.lang.Object ref = storeCode_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
storeCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int OFFER_ID_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object offerId_ = "";
/**
*
*
*
* Required. A unique identifier for the product. If both inventories and
* sales are submitted for a merchant, this id should match for the same
* product.
*
* **Note**: if the merchant sells the same product new and used, they should
* have different IDs.
*
*
* string offer_id = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The offerId.
*/
@java.lang.Override
public java.lang.String getOfferId() {
java.lang.Object ref = offerId_;
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();
offerId_ = s;
return s;
}
}
/**
*
*
*
* Required. A unique identifier for the product. If both inventories and
* sales are submitted for a merchant, this id should match for the same
* product.
*
* **Note**: if the merchant sells the same product new and used, they should
* have different IDs.
*
*
* string offer_id = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for offerId.
*/
@java.lang.Override
public com.google.protobuf.ByteString getOfferIdBytes() {
java.lang.Object ref = offerId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
offerId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int REGION_CODE_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object regionCode_ = "";
/**
*
*
*
* Required. The [CLDR territory
* code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml)
* for the country where the product is sold.
*
*
* string region_code = 5 [(.google.api.field_behavior) = REQUIRED];
*
* @return The regionCode.
*/
@java.lang.Override
public java.lang.String getRegionCode() {
java.lang.Object ref = regionCode_;
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();
regionCode_ = s;
return s;
}
}
/**
*
*
*
* Required. The [CLDR territory
* code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml)
* for the country where the product is sold.
*
*
* string region_code = 5 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for regionCode.
*/
@java.lang.Override
public com.google.protobuf.ByteString getRegionCodeBytes() {
java.lang.Object ref = regionCode_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
regionCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CONTENT_LANGUAGE_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private volatile java.lang.Object contentLanguage_ = "";
/**
*
*
*
* Required. The two-letter ISO 639-1 language code for the item.
*
*
* string content_language = 6 [(.google.api.field_behavior) = REQUIRED];
*
* @return The contentLanguage.
*/
@java.lang.Override
public java.lang.String getContentLanguage() {
java.lang.Object ref = contentLanguage_;
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();
contentLanguage_ = s;
return s;
}
}
/**
*
*
*
* Required. The two-letter ISO 639-1 language code for the item.
*
*
* string content_language = 6 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for contentLanguage.
*/
@java.lang.Override
public com.google.protobuf.ByteString getContentLanguageBytes() {
java.lang.Object ref = contentLanguage_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
contentLanguage_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int GTIN_FIELD_NUMBER = 7;
@SuppressWarnings("serial")
private volatile java.lang.Object gtin_ = "";
/**
*
*
*
* Required. The Global Trade Item Number of the sold product.
*
*
* string gtin = 7 [(.google.api.field_behavior) = REQUIRED];
*
* @return The gtin.
*/
@java.lang.Override
public java.lang.String getGtin() {
java.lang.Object ref = gtin_;
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();
gtin_ = s;
return s;
}
}
/**
*
*
*
* Required. The Global Trade Item Number of the sold product.
*
*
* string gtin = 7 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for gtin.
*/
@java.lang.Override
public com.google.protobuf.ByteString getGtinBytes() {
java.lang.Object ref = gtin_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
gtin_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PRICE_FIELD_NUMBER = 8;
private com.google.shopping.type.Price price_;
/**
*
*
*
* Required. The unit price of the product.
*
*
* .google.shopping.type.Price price = 8 [(.google.api.field_behavior) = REQUIRED];
*
* @return Whether the price field is set.
*/
@java.lang.Override
public boolean hasPrice() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Required. The unit price of the product.
*
*
* .google.shopping.type.Price price = 8 [(.google.api.field_behavior) = REQUIRED];
*
* @return The price.
*/
@java.lang.Override
public com.google.shopping.type.Price getPrice() {
return price_ == null ? com.google.shopping.type.Price.getDefaultInstance() : price_;
}
/**
*
*
*
* Required. The unit price of the product.
*
*
* .google.shopping.type.Price price = 8 [(.google.api.field_behavior) = REQUIRED];
*/
@java.lang.Override
public com.google.shopping.type.PriceOrBuilder getPriceOrBuilder() {
return price_ == null ? com.google.shopping.type.Price.getDefaultInstance() : price_;
}
public static final int QUANTITY_FIELD_NUMBER = 9;
private long quantity_ = 0L;
/**
*
*
*
* Required. The relative change of the available quantity. Negative for items
* returned.
*
*
* int64 quantity = 9 [(.google.api.field_behavior) = REQUIRED];
*
* @return The quantity.
*/
@java.lang.Override
public long getQuantity() {
return quantity_;
}
public static final int SALE_TIME_FIELD_NUMBER = 10;
private com.google.protobuf.Timestamp saleTime_;
/**
*
*
*
* Required. The timestamp for the sale.
*
*
* .google.protobuf.Timestamp sale_time = 10 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the saleTime field is set.
*/
@java.lang.Override
public boolean hasSaleTime() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Required. The timestamp for the sale.
*
*
* .google.protobuf.Timestamp sale_time = 10 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The saleTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getSaleTime() {
return saleTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : saleTime_;
}
/**
*
*
*
* Required. The timestamp for the sale.
*
*
* .google.protobuf.Timestamp sale_time = 10 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getSaleTimeOrBuilder() {
return saleTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : saleTime_;
}
public static final int UID_FIELD_NUMBER = 11;
@SuppressWarnings("serial")
private volatile java.lang.Object uid_ = "";
/**
*
*
*
* Output only. System generated globally unique ID for the `LfpSale`.
*
*
*
* optional string uid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
*
*
* @return Whether the uid field is set.
*/
@java.lang.Override
public boolean hasUid() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Output only. System generated globally unique ID for the `LfpSale`.
*
*
*
* optional string uid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
*
*
* @return The uid.
*/
@java.lang.Override
public java.lang.String getUid() {
java.lang.Object ref = uid_;
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();
uid_ = s;
return s;
}
}
/**
*
*
*
* Output only. System generated globally unique ID for the `LfpSale`.
*
*
*
* optional string uid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
*
*
* @return The bytes for uid.
*/
@java.lang.Override
public com.google.protobuf.ByteString getUidBytes() {
java.lang.Object ref = uid_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
uid_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FEED_LABEL_FIELD_NUMBER = 12;
@SuppressWarnings("serial")
private volatile java.lang.Object feedLabel_ = "";
/**
*
*
*
* Optional. The [feed
* label](https://developers.google.com/shopping-content/guides/products/feed-labels)
* for the product. If this is not set, it will default to `regionCode`.
*
*
* optional string feed_label = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @return Whether the feedLabel field is set.
*/
@java.lang.Override
public boolean hasFeedLabel() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Optional. The [feed
* label](https://developers.google.com/shopping-content/guides/products/feed-labels)
* for the product. If this is not set, it will default to `regionCode`.
*
*
* optional string feed_label = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The feedLabel.
*/
@java.lang.Override
public java.lang.String getFeedLabel() {
java.lang.Object ref = feedLabel_;
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();
feedLabel_ = s;
return s;
}
}
/**
*
*
*
* Optional. The [feed
* label](https://developers.google.com/shopping-content/guides/products/feed-labels)
* for the product. If this is not set, it will default to `regionCode`.
*
*
* optional string feed_label = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for feedLabel.
*/
@java.lang.Override
public com.google.protobuf.ByteString getFeedLabelBytes() {
java.lang.Object ref = feedLabel_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
feedLabel_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (targetAccount_ != 0L) {
output.writeInt64(2, targetAccount_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(storeCode_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, storeCode_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(offerId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, offerId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, regionCode_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentLanguage_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, contentLanguage_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gtin_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, gtin_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(8, getPrice());
}
if (quantity_ != 0L) {
output.writeInt64(9, quantity_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(10, getSaleTime());
}
if (((bitField0_ & 0x00000004) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 11, uid_);
}
if (((bitField0_ & 0x00000008) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 12, feedLabel_);
}
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(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (targetAccount_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, targetAccount_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(storeCode_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, storeCode_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(offerId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, offerId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, regionCode_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentLanguage_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, contentLanguage_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gtin_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, gtin_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getPrice());
}
if (quantity_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(9, quantity_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getSaleTime());
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, uid_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, feedLabel_);
}
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.shopping.merchant.lfp.v1beta.LfpSale)) {
return super.equals(obj);
}
com.google.shopping.merchant.lfp.v1beta.LfpSale other =
(com.google.shopping.merchant.lfp.v1beta.LfpSale) obj;
if (!getName().equals(other.getName())) return false;
if (getTargetAccount() != other.getTargetAccount()) return false;
if (!getStoreCode().equals(other.getStoreCode())) return false;
if (!getOfferId().equals(other.getOfferId())) return false;
if (!getRegionCode().equals(other.getRegionCode())) return false;
if (!getContentLanguage().equals(other.getContentLanguage())) return false;
if (!getGtin().equals(other.getGtin())) return false;
if (hasPrice() != other.hasPrice()) return false;
if (hasPrice()) {
if (!getPrice().equals(other.getPrice())) return false;
}
if (getQuantity() != other.getQuantity()) return false;
if (hasSaleTime() != other.hasSaleTime()) return false;
if (hasSaleTime()) {
if (!getSaleTime().equals(other.getSaleTime())) return false;
}
if (hasUid() != other.hasUid()) return false;
if (hasUid()) {
if (!getUid().equals(other.getUid())) return false;
}
if (hasFeedLabel() != other.hasFeedLabel()) return false;
if (hasFeedLabel()) {
if (!getFeedLabel().equals(other.getFeedLabel())) 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) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + TARGET_ACCOUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTargetAccount());
hash = (37 * hash) + STORE_CODE_FIELD_NUMBER;
hash = (53 * hash) + getStoreCode().hashCode();
hash = (37 * hash) + OFFER_ID_FIELD_NUMBER;
hash = (53 * hash) + getOfferId().hashCode();
hash = (37 * hash) + REGION_CODE_FIELD_NUMBER;
hash = (53 * hash) + getRegionCode().hashCode();
hash = (37 * hash) + CONTENT_LANGUAGE_FIELD_NUMBER;
hash = (53 * hash) + getContentLanguage().hashCode();
hash = (37 * hash) + GTIN_FIELD_NUMBER;
hash = (53 * hash) + getGtin().hashCode();
if (hasPrice()) {
hash = (37 * hash) + PRICE_FIELD_NUMBER;
hash = (53 * hash) + getPrice().hashCode();
}
hash = (37 * hash) + QUANTITY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getQuantity());
if (hasSaleTime()) {
hash = (37 * hash) + SALE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getSaleTime().hashCode();
}
if (hasUid()) {
hash = (37 * hash) + UID_FIELD_NUMBER;
hash = (53 * hash) + getUid().hashCode();
}
if (hasFeedLabel()) {
hash = (37 * hash) + FEED_LABEL_FIELD_NUMBER;
hash = (53 * hash) + getFeedLabel().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.shopping.merchant.lfp.v1beta.LfpSale parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.shopping.merchant.lfp.v1beta.LfpSale parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.shopping.merchant.lfp.v1beta.LfpSale parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.shopping.merchant.lfp.v1beta.LfpSale 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.shopping.merchant.lfp.v1beta.LfpSale parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.shopping.merchant.lfp.v1beta.LfpSale parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.shopping.merchant.lfp.v1beta.LfpSale parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.shopping.merchant.lfp.v1beta.LfpSale 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.shopping.merchant.lfp.v1beta.LfpSale parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.shopping.merchant.lfp.v1beta.LfpSale 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.shopping.merchant.lfp.v1beta.LfpSale parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.shopping.merchant.lfp.v1beta.LfpSale 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.shopping.merchant.lfp.v1beta.LfpSale 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;
}
/**
*
*
*
* A sale for the merchant.
*
*
* Protobuf type {@code google.shopping.merchant.lfp.v1beta.LfpSale}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.shopping.merchant.lfp.v1beta.LfpSale)
com.google.shopping.merchant.lfp.v1beta.LfpSaleOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.shopping.merchant.lfp.v1beta.LfpSaleProto
.internal_static_google_shopping_merchant_lfp_v1beta_LfpSale_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.shopping.merchant.lfp.v1beta.LfpSaleProto
.internal_static_google_shopping_merchant_lfp_v1beta_LfpSale_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.shopping.merchant.lfp.v1beta.LfpSale.class,
com.google.shopping.merchant.lfp.v1beta.LfpSale.Builder.class);
}
// Construct using com.google.shopping.merchant.lfp.v1beta.LfpSale.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();
getSaleTimeFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
targetAccount_ = 0L;
storeCode_ = "";
offerId_ = "";
regionCode_ = "";
contentLanguage_ = "";
gtin_ = "";
price_ = null;
if (priceBuilder_ != null) {
priceBuilder_.dispose();
priceBuilder_ = null;
}
quantity_ = 0L;
saleTime_ = null;
if (saleTimeBuilder_ != null) {
saleTimeBuilder_.dispose();
saleTimeBuilder_ = null;
}
uid_ = "";
feedLabel_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.shopping.merchant.lfp.v1beta.LfpSaleProto
.internal_static_google_shopping_merchant_lfp_v1beta_LfpSale_descriptor;
}
@java.lang.Override
public com.google.shopping.merchant.lfp.v1beta.LfpSale getDefaultInstanceForType() {
return com.google.shopping.merchant.lfp.v1beta.LfpSale.getDefaultInstance();
}
@java.lang.Override
public com.google.shopping.merchant.lfp.v1beta.LfpSale build() {
com.google.shopping.merchant.lfp.v1beta.LfpSale result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.shopping.merchant.lfp.v1beta.LfpSale buildPartial() {
com.google.shopping.merchant.lfp.v1beta.LfpSale result =
new com.google.shopping.merchant.lfp.v1beta.LfpSale(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.shopping.merchant.lfp.v1beta.LfpSale result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.targetAccount_ = targetAccount_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.storeCode_ = storeCode_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.offerId_ = offerId_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.regionCode_ = regionCode_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.contentLanguage_ = contentLanguage_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.gtin_ = gtin_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000080) != 0)) {
result.price_ = priceBuilder_ == null ? price_ : priceBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.quantity_ = quantity_;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.saleTime_ = saleTimeBuilder_ == null ? saleTime_ : saleTimeBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.uid_ = uid_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000800) != 0)) {
result.feedLabel_ = feedLabel_;
to_bitField0_ |= 0x00000008;
}
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.shopping.merchant.lfp.v1beta.LfpSale) {
return mergeFrom((com.google.shopping.merchant.lfp.v1beta.LfpSale) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.shopping.merchant.lfp.v1beta.LfpSale other) {
if (other == com.google.shopping.merchant.lfp.v1beta.LfpSale.getDefaultInstance())
return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.getTargetAccount() != 0L) {
setTargetAccount(other.getTargetAccount());
}
if (!other.getStoreCode().isEmpty()) {
storeCode_ = other.storeCode_;
bitField0_ |= 0x00000004;
onChanged();
}
if (!other.getOfferId().isEmpty()) {
offerId_ = other.offerId_;
bitField0_ |= 0x00000008;
onChanged();
}
if (!other.getRegionCode().isEmpty()) {
regionCode_ = other.regionCode_;
bitField0_ |= 0x00000010;
onChanged();
}
if (!other.getContentLanguage().isEmpty()) {
contentLanguage_ = other.contentLanguage_;
bitField0_ |= 0x00000020;
onChanged();
}
if (!other.getGtin().isEmpty()) {
gtin_ = other.gtin_;
bitField0_ |= 0x00000040;
onChanged();
}
if (other.hasPrice()) {
mergePrice(other.getPrice());
}
if (other.getQuantity() != 0L) {
setQuantity(other.getQuantity());
}
if (other.hasSaleTime()) {
mergeSaleTime(other.getSaleTime());
}
if (other.hasUid()) {
uid_ = other.uid_;
bitField0_ |= 0x00000400;
onChanged();
}
if (other.hasFeedLabel()) {
feedLabel_ = other.feedLabel_;
bitField0_ |= 0x00000800;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 16:
{
targetAccount_ = input.readInt64();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26:
{
storeCode_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
offerId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 34
case 42:
{
regionCode_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 42
case 50:
{
contentLanguage_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000020;
break;
} // case 50
case 58:
{
gtin_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000040;
break;
} // case 58
case 66:
{
input.readMessage(getPriceFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000080;
break;
} // case 66
case 72:
{
quantity_ = input.readInt64();
bitField0_ |= 0x00000100;
break;
} // case 72
case 82:
{
input.readMessage(getSaleTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000200;
break;
} // case 82
case 90:
{
uid_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000400;
break;
} // case 90
case 98:
{
feedLabel_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000800;
break;
} // case 98
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 name_ = "";
/**
*
*
*
* Output only. Identifier. The name of the `LfpSale` resource.
* Format:
* `accounts/{account}/lfpSales/{sale}`
*
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
*
*
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Output only. Identifier. The name of the `LfpSale` resource.
* Format:
* `accounts/{account}/lfpSales/{sale}`
*
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
*
*
* @return The bytes for name.
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Output only. Identifier. The name of the `LfpSale` resource.
* Format:
* `accounts/{account}/lfpSales/{sale}`
*
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
*
*
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Output only. Identifier. The name of the `LfpSale` resource.
* Format:
* `accounts/{account}/lfpSales/{sale}`
*
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
*
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Output only. Identifier. The name of the `LfpSale` resource.
* Format:
* `accounts/{account}/lfpSales/{sale}`
*
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
*
*
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private long targetAccount_;
/**
*
*
*
* Required. The Merchant Center ID of the merchant to submit the sale for.
*
*
* int64 target_account = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The targetAccount.
*/
@java.lang.Override
public long getTargetAccount() {
return targetAccount_;
}
/**
*
*
*
* Required. The Merchant Center ID of the merchant to submit the sale for.
*
*
* int64 target_account = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The targetAccount to set.
* @return This builder for chaining.
*/
public Builder setTargetAccount(long value) {
targetAccount_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required. The Merchant Center ID of the merchant to submit the sale for.
*
*
* int64 target_account = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearTargetAccount() {
bitField0_ = (bitField0_ & ~0x00000002);
targetAccount_ = 0L;
onChanged();
return this;
}
private java.lang.Object storeCode_ = "";
/**
*
*
*
* Required. The identifier of the merchant's store. Either a `storeCode`
* inserted through the API or the code of the store in the Business Profile.
*
*
* string store_code = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The storeCode.
*/
public java.lang.String getStoreCode() {
java.lang.Object ref = storeCode_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
storeCode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. The identifier of the merchant's store. Either a `storeCode`
* inserted through the API or the code of the store in the Business Profile.
*
*
* string store_code = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for storeCode.
*/
public com.google.protobuf.ByteString getStoreCodeBytes() {
java.lang.Object ref = storeCode_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
storeCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. The identifier of the merchant's store. Either a `storeCode`
* inserted through the API or the code of the store in the Business Profile.
*
*
* string store_code = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The storeCode to set.
* @return This builder for chaining.
*/
public Builder setStoreCode(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
storeCode_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Required. The identifier of the merchant's store. Either a `storeCode`
* inserted through the API or the code of the store in the Business Profile.
*
*
* string store_code = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearStoreCode() {
storeCode_ = getDefaultInstance().getStoreCode();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Required. The identifier of the merchant's store. Either a `storeCode`
* inserted through the API or the code of the store in the Business Profile.
*
*
* string store_code = 3 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for storeCode to set.
* @return This builder for chaining.
*/
public Builder setStoreCodeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
storeCode_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.lang.Object offerId_ = "";
/**
*
*
*
* Required. A unique identifier for the product. If both inventories and
* sales are submitted for a merchant, this id should match for the same
* product.
*
* **Note**: if the merchant sells the same product new and used, they should
* have different IDs.
*
*
* string offer_id = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The offerId.
*/
public java.lang.String getOfferId() {
java.lang.Object ref = offerId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
offerId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. A unique identifier for the product. If both inventories and
* sales are submitted for a merchant, this id should match for the same
* product.
*
* **Note**: if the merchant sells the same product new and used, they should
* have different IDs.
*
*
* string offer_id = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for offerId.
*/
public com.google.protobuf.ByteString getOfferIdBytes() {
java.lang.Object ref = offerId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
offerId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. A unique identifier for the product. If both inventories and
* sales are submitted for a merchant, this id should match for the same
* product.
*
* **Note**: if the merchant sells the same product new and used, they should
* have different IDs.
*
*
* string offer_id = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The offerId to set.
* @return This builder for chaining.
*/
public Builder setOfferId(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
offerId_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Required. A unique identifier for the product. If both inventories and
* sales are submitted for a merchant, this id should match for the same
* product.
*
* **Note**: if the merchant sells the same product new and used, they should
* have different IDs.
*
*
* string offer_id = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearOfferId() {
offerId_ = getDefaultInstance().getOfferId();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
*
*
* Required. A unique identifier for the product. If both inventories and
* sales are submitted for a merchant, this id should match for the same
* product.
*
* **Note**: if the merchant sells the same product new and used, they should
* have different IDs.
*
*
* string offer_id = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for offerId to set.
* @return This builder for chaining.
*/
public Builder setOfferIdBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
offerId_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private java.lang.Object regionCode_ = "";
/**
*
*
*
* Required. The [CLDR territory
* code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml)
* for the country where the product is sold.
*
*
* string region_code = 5 [(.google.api.field_behavior) = REQUIRED];
*
* @return The regionCode.
*/
public java.lang.String getRegionCode() {
java.lang.Object ref = regionCode_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
regionCode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. The [CLDR territory
* code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml)
* for the country where the product is sold.
*
*
* string region_code = 5 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for regionCode.
*/
public com.google.protobuf.ByteString getRegionCodeBytes() {
java.lang.Object ref = regionCode_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
regionCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. The [CLDR territory
* code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml)
* for the country where the product is sold.
*
*
* string region_code = 5 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The regionCode to set.
* @return This builder for chaining.
*/
public Builder setRegionCode(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
regionCode_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Required. The [CLDR territory
* code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml)
* for the country where the product is sold.
*
*
* string region_code = 5 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearRegionCode() {
regionCode_ = getDefaultInstance().getRegionCode();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
*
*
* Required. The [CLDR territory
* code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml)
* for the country where the product is sold.
*
*
* string region_code = 5 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for regionCode to set.
* @return This builder for chaining.
*/
public Builder setRegionCodeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
regionCode_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private java.lang.Object contentLanguage_ = "";
/**
*
*
*
* Required. The two-letter ISO 639-1 language code for the item.
*
*
* string content_language = 6 [(.google.api.field_behavior) = REQUIRED];
*
* @return The contentLanguage.
*/
public java.lang.String getContentLanguage() {
java.lang.Object ref = contentLanguage_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
contentLanguage_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. The two-letter ISO 639-1 language code for the item.
*
*
* string content_language = 6 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for contentLanguage.
*/
public com.google.protobuf.ByteString getContentLanguageBytes() {
java.lang.Object ref = contentLanguage_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
contentLanguage_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. The two-letter ISO 639-1 language code for the item.
*
*
* string content_language = 6 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The contentLanguage to set.
* @return This builder for chaining.
*/
public Builder setContentLanguage(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
contentLanguage_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Required. The two-letter ISO 639-1 language code for the item.
*
*
* string content_language = 6 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearContentLanguage() {
contentLanguage_ = getDefaultInstance().getContentLanguage();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
return this;
}
/**
*
*
*
* Required. The two-letter ISO 639-1 language code for the item.
*
*
* string content_language = 6 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for contentLanguage to set.
* @return This builder for chaining.
*/
public Builder setContentLanguageBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
contentLanguage_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
private java.lang.Object gtin_ = "";
/**
*
*
*
* Required. The Global Trade Item Number of the sold product.
*
*
* string gtin = 7 [(.google.api.field_behavior) = REQUIRED];
*
* @return The gtin.
*/
public java.lang.String getGtin() {
java.lang.Object ref = gtin_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
gtin_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. The Global Trade Item Number of the sold product.
*
*
* string gtin = 7 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for gtin.
*/
public com.google.protobuf.ByteString getGtinBytes() {
java.lang.Object ref = gtin_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
gtin_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. The Global Trade Item Number of the sold product.
*
*
* string gtin = 7 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The gtin to set.
* @return This builder for chaining.
*/
public Builder setGtin(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
gtin_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Required. The Global Trade Item Number of the sold product.
*
*
* string gtin = 7 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearGtin() {
gtin_ = getDefaultInstance().getGtin();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
return this;
}
/**
*
*
*
* Required. The Global Trade Item Number of the sold product.
*
*
* string gtin = 7 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for gtin to set.
* @return This builder for chaining.
*/
public Builder setGtinBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
gtin_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
private com.google.shopping.type.Price price_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.shopping.type.Price,
com.google.shopping.type.Price.Builder,
com.google.shopping.type.PriceOrBuilder>
priceBuilder_;
/**
*
*
*
* Required. The unit price of the product.
*
*
* .google.shopping.type.Price price = 8 [(.google.api.field_behavior) = REQUIRED];
*
* @return Whether the price field is set.
*/
public boolean hasPrice() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
*
*
* Required. The unit price of the product.
*
*
* .google.shopping.type.Price price = 8 [(.google.api.field_behavior) = REQUIRED];
*
* @return The price.
*/
public com.google.shopping.type.Price getPrice() {
if (priceBuilder_ == null) {
return price_ == null ? com.google.shopping.type.Price.getDefaultInstance() : price_;
} else {
return priceBuilder_.getMessage();
}
}
/**
*
*
*
* Required. The unit price of the product.
*
*
* .google.shopping.type.Price price = 8 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder setPrice(com.google.shopping.type.Price value) {
if (priceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
price_ = value;
} else {
priceBuilder_.setMessage(value);
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* Required. The unit price of the product.
*
*
* .google.shopping.type.Price price = 8 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder setPrice(com.google.shopping.type.Price.Builder builderForValue) {
if (priceBuilder_ == null) {
price_ = builderForValue.build();
} else {
priceBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* Required. The unit price of the product.
*
*
* .google.shopping.type.Price price = 8 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder mergePrice(com.google.shopping.type.Price value) {
if (priceBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 0)
&& price_ != null
&& price_ != com.google.shopping.type.Price.getDefaultInstance()) {
getPriceBuilder().mergeFrom(value);
} else {
price_ = value;
}
} else {
priceBuilder_.mergeFrom(value);
}
if (price_ != null) {
bitField0_ |= 0x00000080;
onChanged();
}
return this;
}
/**
*
*
*
* Required. The unit price of the product.
*
*
* .google.shopping.type.Price price = 8 [(.google.api.field_behavior) = REQUIRED];
*/
public Builder clearPrice() {
bitField0_ = (bitField0_ & ~0x00000080);
price_ = null;
if (priceBuilder_ != null) {
priceBuilder_.dispose();
priceBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Required. The unit price of the product.
*
*
* .google.shopping.type.Price price = 8 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.shopping.type.Price.Builder getPriceBuilder() {
bitField0_ |= 0x00000080;
onChanged();
return getPriceFieldBuilder().getBuilder();
}
/**
*
*
*
* Required. The unit price of the product.
*
*
* .google.shopping.type.Price price = 8 [(.google.api.field_behavior) = REQUIRED];
*/
public com.google.shopping.type.PriceOrBuilder getPriceOrBuilder() {
if (priceBuilder_ != null) {
return priceBuilder_.getMessageOrBuilder();
} else {
return price_ == null ? com.google.shopping.type.Price.getDefaultInstance() : price_;
}
}
/**
*
*
*
* Required. The unit price of the product.
*
*
* .google.shopping.type.Price price = 8 [(.google.api.field_behavior) = REQUIRED];
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.shopping.type.Price,
com.google.shopping.type.Price.Builder,
com.google.shopping.type.PriceOrBuilder>
getPriceFieldBuilder() {
if (priceBuilder_ == null) {
priceBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.shopping.type.Price,
com.google.shopping.type.Price.Builder,
com.google.shopping.type.PriceOrBuilder>(
getPrice(), getParentForChildren(), isClean());
price_ = null;
}
return priceBuilder_;
}
private long quantity_;
/**
*
*
*
* Required. The relative change of the available quantity. Negative for items
* returned.
*
*
* int64 quantity = 9 [(.google.api.field_behavior) = REQUIRED];
*
* @return The quantity.
*/
@java.lang.Override
public long getQuantity() {
return quantity_;
}
/**
*
*
*
* Required. The relative change of the available quantity. Negative for items
* returned.
*
*
* int64 quantity = 9 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The quantity to set.
* @return This builder for chaining.
*/
public Builder setQuantity(long value) {
quantity_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* Required. The relative change of the available quantity. Negative for items
* returned.
*
*
* int64 quantity = 9 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearQuantity() {
bitField0_ = (bitField0_ & ~0x00000100);
quantity_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.Timestamp saleTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
saleTimeBuilder_;
/**
*
*
*
* Required. The timestamp for the sale.
*
*
* .google.protobuf.Timestamp sale_time = 10 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the saleTime field is set.
*/
public boolean hasSaleTime() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
*
*
* Required. The timestamp for the sale.
*
*
* .google.protobuf.Timestamp sale_time = 10 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The saleTime.
*/
public com.google.protobuf.Timestamp getSaleTime() {
if (saleTimeBuilder_ == null) {
return saleTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : saleTime_;
} else {
return saleTimeBuilder_.getMessage();
}
}
/**
*
*
*
* Required. The timestamp for the sale.
*
*
* .google.protobuf.Timestamp sale_time = 10 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder setSaleTime(com.google.protobuf.Timestamp value) {
if (saleTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
saleTime_ = value;
} else {
saleTimeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*
*
* Required. The timestamp for the sale.
*
*
* .google.protobuf.Timestamp sale_time = 10 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder setSaleTime(com.google.protobuf.Timestamp.Builder builderForValue) {
if (saleTimeBuilder_ == null) {
saleTime_ = builderForValue.build();
} else {
saleTimeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*
*
* Required. The timestamp for the sale.
*
*
* .google.protobuf.Timestamp sale_time = 10 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder mergeSaleTime(com.google.protobuf.Timestamp value) {
if (saleTimeBuilder_ == null) {
if (((bitField0_ & 0x00000200) != 0)
&& saleTime_ != null
&& saleTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getSaleTimeBuilder().mergeFrom(value);
} else {
saleTime_ = value;
}
} else {
saleTimeBuilder_.mergeFrom(value);
}
if (saleTime_ != null) {
bitField0_ |= 0x00000200;
onChanged();
}
return this;
}
/**
*
*
*
* Required. The timestamp for the sale.
*
*
* .google.protobuf.Timestamp sale_time = 10 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder clearSaleTime() {
bitField0_ = (bitField0_ & ~0x00000200);
saleTime_ = null;
if (saleTimeBuilder_ != null) {
saleTimeBuilder_.dispose();
saleTimeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Required. The timestamp for the sale.
*
*
* .google.protobuf.Timestamp sale_time = 10 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.protobuf.Timestamp.Builder getSaleTimeBuilder() {
bitField0_ |= 0x00000200;
onChanged();
return getSaleTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* Required. The timestamp for the sale.
*
*
* .google.protobuf.Timestamp sale_time = 10 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.protobuf.TimestampOrBuilder getSaleTimeOrBuilder() {
if (saleTimeBuilder_ != null) {
return saleTimeBuilder_.getMessageOrBuilder();
} else {
return saleTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : saleTime_;
}
}
/**
*
*
*
* Required. The timestamp for the sale.
*
*
* .google.protobuf.Timestamp sale_time = 10 [(.google.api.field_behavior) = REQUIRED];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getSaleTimeFieldBuilder() {
if (saleTimeBuilder_ == null) {
saleTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
getSaleTime(), getParentForChildren(), isClean());
saleTime_ = null;
}
return saleTimeBuilder_;
}
private java.lang.Object uid_ = "";
/**
*
*
*
* Output only. System generated globally unique ID for the `LfpSale`.
*
*
*
* optional string uid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
*
*
* @return Whether the uid field is set.
*/
public boolean hasUid() {
return ((bitField0_ & 0x00000400) != 0);
}
/**
*
*
*
* Output only. System generated globally unique ID for the `LfpSale`.
*
*
*
* optional string uid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
*
*
* @return The uid.
*/
public java.lang.String getUid() {
java.lang.Object ref = uid_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
uid_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Output only. System generated globally unique ID for the `LfpSale`.
*
*
*
* optional string uid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
*
*
* @return The bytes for uid.
*/
public com.google.protobuf.ByteString getUidBytes() {
java.lang.Object ref = uid_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
uid_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Output only. System generated globally unique ID for the `LfpSale`.
*
*
*
* optional string uid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
*
*
* @param value The uid to set.
* @return This builder for chaining.
*/
public Builder setUid(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
uid_ = value;
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
*
*
* Output only. System generated globally unique ID for the `LfpSale`.
*
*
*
* optional string uid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
*
*
* @return This builder for chaining.
*/
public Builder clearUid() {
uid_ = getDefaultInstance().getUid();
bitField0_ = (bitField0_ & ~0x00000400);
onChanged();
return this;
}
/**
*
*
*
* Output only. System generated globally unique ID for the `LfpSale`.
*
*
*
* optional string uid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
*
*
* @param value The bytes for uid to set.
* @return This builder for chaining.
*/
public Builder setUidBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
uid_ = value;
bitField0_ |= 0x00000400;
onChanged();
return this;
}
private java.lang.Object feedLabel_ = "";
/**
*
*
*
* Optional. The [feed
* label](https://developers.google.com/shopping-content/guides/products/feed-labels)
* for the product. If this is not set, it will default to `regionCode`.
*
*
* optional string feed_label = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @return Whether the feedLabel field is set.
*/
public boolean hasFeedLabel() {
return ((bitField0_ & 0x00000800) != 0);
}
/**
*
*
*
* Optional. The [feed
* label](https://developers.google.com/shopping-content/guides/products/feed-labels)
* for the product. If this is not set, it will default to `regionCode`.
*
*
* optional string feed_label = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The feedLabel.
*/
public java.lang.String getFeedLabel() {
java.lang.Object ref = feedLabel_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
feedLabel_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Optional. The [feed
* label](https://developers.google.com/shopping-content/guides/products/feed-labels)
* for the product. If this is not set, it will default to `regionCode`.
*
*
* optional string feed_label = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for feedLabel.
*/
public com.google.protobuf.ByteString getFeedLabelBytes() {
java.lang.Object ref = feedLabel_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
feedLabel_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Optional. The [feed
* label](https://developers.google.com/shopping-content/guides/products/feed-labels)
* for the product. If this is not set, it will default to `regionCode`.
*
*
* optional string feed_label = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The feedLabel to set.
* @return This builder for chaining.
*/
public Builder setFeedLabel(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
feedLabel_ = value;
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
*
*
* Optional. The [feed
* label](https://developers.google.com/shopping-content/guides/products/feed-labels)
* for the product. If this is not set, it will default to `regionCode`.
*
*
* optional string feed_label = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearFeedLabel() {
feedLabel_ = getDefaultInstance().getFeedLabel();
bitField0_ = (bitField0_ & ~0x00000800);
onChanged();
return this;
}
/**
*
*
*
* Optional. The [feed
* label](https://developers.google.com/shopping-content/guides/products/feed-labels)
* for the product. If this is not set, it will default to `regionCode`.
*
*
* optional string feed_label = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for feedLabel to set.
* @return This builder for chaining.
*/
public Builder setFeedLabelBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
feedLabel_ = value;
bitField0_ |= 0x00000800;
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.shopping.merchant.lfp.v1beta.LfpSale)
}
// @@protoc_insertion_point(class_scope:google.shopping.merchant.lfp.v1beta.LfpSale)
private static final com.google.shopping.merchant.lfp.v1beta.LfpSale DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.shopping.merchant.lfp.v1beta.LfpSale();
}
public static com.google.shopping.merchant.lfp.v1beta.LfpSale getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LfpSale 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.shopping.merchant.lfp.v1beta.LfpSale getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy