Class LfpSale.Builder (0.4.0)

public static final class LfpSale.Builder extends GeneratedMessageV3.Builder<LfpSale.Builder> implements LfpSaleOrBuilder

A sale for the merchant.

Protobuf type google.shopping.merchant.lfp.v1beta.LfpSale

Implements

LfpSaleOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public LfpSale.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
LfpSale.Builder
Overrides

build()

public LfpSale build()
Returns
Type Description
LfpSale

buildPartial()

public LfpSale buildPartial()
Returns
Type Description
LfpSale

clear()

public LfpSale.Builder clear()
Returns
Type Description
LfpSale.Builder
Overrides

clearContentLanguage()

public LfpSale.Builder clearContentLanguage()

Required. The two-letter ISO 639-1 language code for the item.

string content_language = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
LfpSale.Builder

This builder for chaining.

clearFeedLabel()

public LfpSale.Builder clearFeedLabel()

Optional. The feed label for the product. If this is not set, it will default to regionCode.

optional string feed_label = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
LfpSale.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public LfpSale.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
LfpSale.Builder
Overrides

clearGtin()

public LfpSale.Builder clearGtin()

Required. The Global Trade Item Number of the sold product.

string gtin = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
LfpSale.Builder

This builder for chaining.

clearName()

public LfpSale.Builder clearName()

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];

Returns
Type Description
LfpSale.Builder

This builder for chaining.

clearOfferId()

public LfpSale.Builder clearOfferId()

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];

Returns
Type Description
LfpSale.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public LfpSale.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
LfpSale.Builder
Overrides

clearPrice()

public LfpSale.Builder clearPrice()

Required. The unit price of the product.

.google.shopping.type.Price price = 8 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
LfpSale.Builder

clearQuantity()

public LfpSale.Builder clearQuantity()

Required. The relative change of the available quantity. Negative for items returned.

int64 quantity = 9 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
LfpSale.Builder

This builder for chaining.

clearRegionCode()

public LfpSale.Builder clearRegionCode()

Required. The CLDR territory code for the country where the product is sold.

string region_code = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
LfpSale.Builder

This builder for chaining.

clearSaleTime()

public LfpSale.Builder clearSaleTime()

Required. The timestamp for the sale.

.google.protobuf.Timestamp sale_time = 10 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
LfpSale.Builder

clearStoreCode()

public LfpSale.Builder clearStoreCode()

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];

Returns
Type Description
LfpSale.Builder

This builder for chaining.

clearTargetAccount()

public LfpSale.Builder clearTargetAccount()

Required. The Merchant Center ID of the merchant to submit the sale for.

int64 target_account = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
LfpSale.Builder

This builder for chaining.

clearUid()

public LfpSale.Builder clearUid()

Output only. System generated globally unique ID for the LfpSale.

optional string uid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }

Returns
Type Description
LfpSale.Builder

This builder for chaining.

clone()

public LfpSale.Builder clone()
Returns
Type Description
LfpSale.Builder
Overrides

getContentLanguage()

public String getContentLanguage()

Required. The two-letter ISO 639-1 language code for the item.

string content_language = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The contentLanguage.

getContentLanguageBytes()

public ByteString getContentLanguageBytes()

Required. The two-letter ISO 639-1 language code for the item.

string content_language = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for contentLanguage.

getDefaultInstanceForType()

public LfpSale getDefaultInstanceForType()
Returns
Type Description
LfpSale

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getFeedLabel()

public String getFeedLabel()

Optional. The feed label for the product. If this is not set, it will default to regionCode.

optional string feed_label = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The feedLabel.

getFeedLabelBytes()

public ByteString getFeedLabelBytes()

Optional. The feed label for the product. If this is not set, it will default to regionCode.

optional string feed_label = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for feedLabel.

getGtin()

public String getGtin()

Required. The Global Trade Item Number of the sold product.

string gtin = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The gtin.

getGtinBytes()

public ByteString getGtinBytes()

Required. The Global Trade Item Number of the sold product.

string gtin = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for gtin.

getName()

public String getName()

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];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

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];

Returns
Type Description
ByteString

The bytes for name.

getOfferId()

public String getOfferId()

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];

Returns
Type Description
String

The offerId.

getOfferIdBytes()

public ByteString getOfferIdBytes()

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];

Returns
Type Description
ByteString

The bytes for offerId.

getPrice()

public Price getPrice()

Required. The unit price of the product.

.google.shopping.type.Price price = 8 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
com.google.shopping.type.Price

The price.

getPriceBuilder()

public Price.Builder getPriceBuilder()

Required. The unit price of the product.

.google.shopping.type.Price price = 8 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
com.google.shopping.type.Price.Builder

getPriceOrBuilder()

public PriceOrBuilder getPriceOrBuilder()

Required. The unit price of the product.

.google.shopping.type.Price price = 8 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
com.google.shopping.type.PriceOrBuilder

getQuantity()

public long getQuantity()

Required. The relative change of the available quantity. Negative for items returned.

int64 quantity = 9 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
long

The quantity.

getRegionCode()

public String getRegionCode()

Required. The CLDR territory code for the country where the product is sold.

string region_code = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The regionCode.

getRegionCodeBytes()

public ByteString getRegionCodeBytes()

Required. The CLDR territory code for the country where the product is sold.

string region_code = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for regionCode.

getSaleTime()

public Timestamp getSaleTime()

Required. The timestamp for the sale.

.google.protobuf.Timestamp sale_time = 10 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Timestamp

The saleTime.

getSaleTimeBuilder()

public Timestamp.Builder getSaleTimeBuilder()

Required. The timestamp for the sale.

.google.protobuf.Timestamp sale_time = 10 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Builder

getSaleTimeOrBuilder()

public TimestampOrBuilder getSaleTimeOrBuilder()

Required. The timestamp for the sale.

.google.protobuf.Timestamp sale_time = 10 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
TimestampOrBuilder

getStoreCode()

public String getStoreCode()

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];

Returns
Type Description
String

The storeCode.

getStoreCodeBytes()

public ByteString getStoreCodeBytes()

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];

Returns
Type Description
ByteString

The bytes for storeCode.

getTargetAccount()

public long getTargetAccount()

Required. The Merchant Center ID of the merchant to submit the sale for.

int64 target_account = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
long

The targetAccount.

getUid()

public String getUid()

Output only. System generated globally unique ID for the LfpSale.

optional string uid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }

Returns
Type Description
String

The uid.

getUidBytes()

public ByteString getUidBytes()

Output only. System generated globally unique ID for the LfpSale.

optional string uid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }

Returns
Type Description
ByteString

The bytes for uid.

hasFeedLabel()

public boolean hasFeedLabel()

Optional. The feed label for the product. If this is not set, it will default to regionCode.

optional string feed_label = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the feedLabel field is set.

hasPrice()

public boolean hasPrice()

Required. The unit price of the product.

.google.shopping.type.Price price = 8 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the price field is set.

hasSaleTime()

public boolean hasSaleTime()

Required. The timestamp for the sale.

.google.protobuf.Timestamp sale_time = 10 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the saleTime field is set.

hasUid()

public boolean hasUid()

Output only. System generated globally unique ID for the LfpSale.

optional string uid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }

Returns
Type Description
boolean

Whether the uid field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public LfpSale.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
LfpSale.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public LfpSale.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
LfpSale.Builder
Overrides

mergeFrom(LfpSale other)

public LfpSale.Builder mergeFrom(LfpSale other)
Parameter
Name Description
other LfpSale
Returns
Type Description
LfpSale.Builder

mergePrice(Price value)

public LfpSale.Builder mergePrice(Price value)

Required. The unit price of the product.

.google.shopping.type.Price price = 8 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value com.google.shopping.type.Price
Returns
Type Description
LfpSale.Builder

mergeSaleTime(Timestamp value)

public LfpSale.Builder mergeSaleTime(Timestamp value)

Required. The timestamp for the sale.

.google.protobuf.Timestamp sale_time = 10 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Timestamp
Returns
Type Description
LfpSale.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final LfpSale.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
LfpSale.Builder
Overrides

setContentLanguage(String value)

public LfpSale.Builder setContentLanguage(String value)

Required. The two-letter ISO 639-1 language code for the item.

string content_language = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The contentLanguage to set.

Returns
Type Description
LfpSale.Builder

This builder for chaining.

setContentLanguageBytes(ByteString value)

public LfpSale.Builder setContentLanguageBytes(ByteString value)

Required. The two-letter ISO 639-1 language code for the item.

string content_language = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for contentLanguage to set.

Returns
Type Description
LfpSale.Builder

This builder for chaining.

setFeedLabel(String value)

public LfpSale.Builder setFeedLabel(String value)

Optional. The feed label for the product. If this is not set, it will default to regionCode.

optional string feed_label = 12 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The feedLabel to set.

Returns
Type Description
LfpSale.Builder

This builder for chaining.

setFeedLabelBytes(ByteString value)

public LfpSale.Builder setFeedLabelBytes(ByteString value)

Optional. The feed label for the product. If this is not set, it will default to regionCode.

optional string feed_label = 12 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for feedLabel to set.

Returns
Type Description
LfpSale.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public LfpSale.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
LfpSale.Builder
Overrides

setGtin(String value)

public LfpSale.Builder setGtin(String value)

Required. The Global Trade Item Number of the sold product.

string gtin = 7 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The gtin to set.

Returns
Type Description
LfpSale.Builder

This builder for chaining.

setGtinBytes(ByteString value)

public LfpSale.Builder setGtinBytes(ByteString value)

Required. The Global Trade Item Number of the sold product.

string gtin = 7 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for gtin to set.

Returns
Type Description
LfpSale.Builder

This builder for chaining.

setName(String value)

public LfpSale.Builder setName(String value)

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];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
LfpSale.Builder

This builder for chaining.

setNameBytes(ByteString value)

public LfpSale.Builder setNameBytes(ByteString value)

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];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
LfpSale.Builder

This builder for chaining.

setOfferId(String value)

public LfpSale.Builder setOfferId(String value)

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];

Parameter
Name Description
value String

The offerId to set.

Returns
Type Description
LfpSale.Builder

This builder for chaining.

setOfferIdBytes(ByteString value)

public LfpSale.Builder setOfferIdBytes(ByteString value)

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];

Parameter
Name Description
value ByteString

The bytes for offerId to set.

Returns
Type Description
LfpSale.Builder

This builder for chaining.

setPrice(Price value)

public LfpSale.Builder setPrice(Price value)

Required. The unit price of the product.

.google.shopping.type.Price price = 8 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value com.google.shopping.type.Price
Returns
Type Description
LfpSale.Builder

setPrice(Price.Builder builderForValue)

public LfpSale.Builder setPrice(Price.Builder builderForValue)

Required. The unit price of the product.

.google.shopping.type.Price price = 8 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue com.google.shopping.type.Price.Builder
Returns
Type Description
LfpSale.Builder

setQuantity(long value)

public LfpSale.Builder setQuantity(long value)

Required. The relative change of the available quantity. Negative for items returned.

int64 quantity = 9 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value long

The quantity to set.

Returns
Type Description
LfpSale.Builder

This builder for chaining.

setRegionCode(String value)

public LfpSale.Builder setRegionCode(String value)

Required. The CLDR territory code for the country where the product is sold.

string region_code = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The regionCode to set.

Returns
Type Description
LfpSale.Builder

This builder for chaining.

setRegionCodeBytes(ByteString value)

public LfpSale.Builder setRegionCodeBytes(ByteString value)

Required. The CLDR territory code for the country where the product is sold.

string region_code = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for regionCode to set.

Returns
Type Description
LfpSale.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public LfpSale.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
LfpSale.Builder
Overrides

setSaleTime(Timestamp value)

public LfpSale.Builder setSaleTime(Timestamp value)

Required. The timestamp for the sale.

.google.protobuf.Timestamp sale_time = 10 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Timestamp
Returns
Type Description
LfpSale.Builder

setSaleTime(Timestamp.Builder builderForValue)

public LfpSale.Builder setSaleTime(Timestamp.Builder builderForValue)

Required. The timestamp for the sale.

.google.protobuf.Timestamp sale_time = 10 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
LfpSale.Builder

setStoreCode(String value)

public LfpSale.Builder setStoreCode(String value)

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];

Parameter
Name Description
value String

The storeCode to set.

Returns
Type Description
LfpSale.Builder

This builder for chaining.

setStoreCodeBytes(ByteString value)

public LfpSale.Builder setStoreCodeBytes(ByteString value)

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];

Parameter
Name Description
value ByteString

The bytes for storeCode to set.

Returns
Type Description
LfpSale.Builder

This builder for chaining.

setTargetAccount(long value)

public LfpSale.Builder setTargetAccount(long value)

Required. The Merchant Center ID of the merchant to submit the sale for.

int64 target_account = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value long

The targetAccount to set.

Returns
Type Description
LfpSale.Builder

This builder for chaining.

setUid(String value)

public LfpSale.Builder setUid(String value)

Output only. System generated globally unique ID for the LfpSale.

optional string uid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }

Parameter
Name Description
value String

The uid to set.

Returns
Type Description
LfpSale.Builder

This builder for chaining.

setUidBytes(ByteString value)

public LfpSale.Builder setUidBytes(ByteString value)

Output only. System generated globally unique ID for the LfpSale.

optional string uid = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }

Parameter
Name Description
value ByteString

The bytes for uid to set.

Returns
Type Description
LfpSale.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final LfpSale.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
LfpSale.Builder
Overrides