public final class Product extends GeneratedMessageV3 implements ProductOrBuilder
The processed product, built from multiple product
inputs
after applying rules and supplemental data sources. This processed product
matches what is shown in your Merchant Center account. Each product is built
from exactly one primary data source product input, and multiple supplemental
data source inputs. After inserting, updating, or deleting a product input,
it may take several minutes before the updated processed product can be
retrieved.
All fields in the processed product and its sub-messages match the name of
their corresponding attribute in the Product data
specification with some
exceptions.
Protobuf type google.shopping.merchant.products.v1.Product
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
public static final int AUTOMATED_DISCOUNTS_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
CONTENT_LANGUAGE_FIELD_NUMBER
public static final int CONTENT_LANGUAGE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int CUSTOM_ATTRIBUTES_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int DATA_SOURCE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int FEED_LABEL_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int LEGACY_LOCAL_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int NAME_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int OFFER_ID_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int PRODUCT_ATTRIBUTES_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int PRODUCT_STATUS_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int VERSION_NUMBER_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
public static Product getDefaultInstance()
public static final Descriptors.Descriptor getDescriptor()
public static Product.Builder newBuilder()
public static Product.Builder newBuilder(Product prototype)
Parameter |
Name |
Description |
prototype |
Product
|
public static Product parseDelimitedFrom(InputStream input)
public static Product parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static Product parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
public static Product parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Product parseFrom(ByteString data)
public static Product parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Product parseFrom(CodedInputStream input)
public static Product parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static Product parseFrom(InputStream input)
public static Product parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static Product parseFrom(ByteBuffer data)
public static Product parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Parser<Product> parser()
Methods
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
public AutomatedDiscounts getAutomatedDiscounts()
Output only. The automated discounts information for the product.
.google.shopping.merchant.products.v1.AutomatedDiscounts automated_discounts = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
public AutomatedDiscountsOrBuilder getAutomatedDiscountsOrBuilder()
Output only. The automated discounts information for the product.
.google.shopping.merchant.products.v1.AutomatedDiscounts automated_discounts = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
getContentLanguage()
public String getContentLanguage()
Output only. The two-letter ISO
639-1 language code for the
product.
string content_language = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
String |
The contentLanguage.
|
getContentLanguageBytes()
public ByteString getContentLanguageBytes()
Output only. The two-letter ISO
639-1 language code for the
product.
string content_language = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
ByteString |
The bytes for contentLanguage.
|
public CustomAttribute getCustomAttributes(int index)
Output only. A list of custom (merchant-provided) attributes. It can also
be used to submit any attribute of the data specification in its generic
form (for example,
{ "name": "size type", "value": "regular" }
).
This is useful for submitting attributes not explicitly exposed by the
API, such as additional attributes used for Buy on Google.
repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter |
Name |
Description |
index |
int
|
Returns |
Type |
Description |
com.google.shopping.type.CustomAttribute |
|
public int getCustomAttributesCount()
Output only. A list of custom (merchant-provided) attributes. It can also
be used to submit any attribute of the data specification in its generic
form (for example,
{ "name": "size type", "value": "regular" }
).
This is useful for submitting attributes not explicitly exposed by the
API, such as additional attributes used for Buy on Google.
repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
int |
|
public List<CustomAttribute> getCustomAttributesList()
Output only. A list of custom (merchant-provided) attributes. It can also
be used to submit any attribute of the data specification in its generic
form (for example,
{ "name": "size type", "value": "regular" }
).
This is useful for submitting attributes not explicitly exposed by the
API, such as additional attributes used for Buy on Google.
repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
List<com.google.shopping.type.CustomAttribute> |
|
public CustomAttributeOrBuilder getCustomAttributesOrBuilder(int index)
Output only. A list of custom (merchant-provided) attributes. It can also
be used to submit any attribute of the data specification in its generic
form (for example,
{ "name": "size type", "value": "regular" }
).
This is useful for submitting attributes not explicitly exposed by the
API, such as additional attributes used for Buy on Google.
repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter |
Name |
Description |
index |
int
|
Returns |
Type |
Description |
com.google.shopping.type.CustomAttributeOrBuilder |
|
public List<? extends CustomAttributeOrBuilder> getCustomAttributesOrBuilderList()
Output only. A list of custom (merchant-provided) attributes. It can also
be used to submit any attribute of the data specification in its generic
form (for example,
{ "name": "size type", "value": "regular" }
).
This is useful for submitting attributes not explicitly exposed by the
API, such as additional attributes used for Buy on Google.
repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
List<? extends com.google.shopping.type.CustomAttributeOrBuilder> |
|
public String getDataSource()
Output only. The primary data source of the product.
string data_source = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
String |
The dataSource.
|
public ByteString getDataSourceBytes()
Output only. The primary data source of the product.
string data_source = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
ByteString |
The bytes for dataSource.
|
public Product getDefaultInstanceForType()
public String getFeedLabel()
Output only. The feed label lets you categorize and identify your products.
The maximum allowed characters is 20 and the supported characters areA-Z
,
0-9
, hyphen and underscore. The feed label must not include any spaces.
For more information, see Using feed
labels
string feed_label = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
String |
The feedLabel.
|
public ByteString getFeedLabelBytes()
Output only. The feed label lets you categorize and identify your products.
The maximum allowed characters is 20 and the supported characters areA-Z
,
0-9
, hyphen and underscore. The feed label must not include any spaces.
For more information, see Using feed
labels
string feed_label = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
ByteString |
The bytes for feedLabel.
|
public boolean getLegacyLocal()
Output only. Determines whether the product is only targeting
local destinations and whether the product name should be distinguished
with a local~
prefix. For example,
accounts/123/products/local~en~US~sku123
.
bool legacy_local = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
boolean |
The legacyLocal.
|
The name of the product.
Format:
accounts/{account}/products/{product}
where the last
section product
consists of:
content_language~feed_label~offer_id
example for product name is accounts/123/products/en~US~sku123
. A legacy
local product name would be accounts/123/products/local~en~US~sku123
.
Note: For calls to the v1beta version, the product
section consists
of: channel~content_language~feed_label~offer_id
, for example:
accounts/123/products/online~en~US~sku123
.
string name = 1;
Returns |
Type |
Description |
String |
The name.
|
public ByteString getNameBytes()
The name of the product.
Format:
accounts/{account}/products/{product}
where the last
section product
consists of:
content_language~feed_label~offer_id
example for product name is accounts/123/products/en~US~sku123
. A legacy
local product name would be accounts/123/products/local~en~US~sku123
.
Note: For calls to the v1beta version, the product
section consists
of: channel~content_language~feed_label~offer_id
, for example:
accounts/123/products/online~en~US~sku123
.
string name = 1;
Returns |
Type |
Description |
ByteString |
The bytes for name.
|
public String getOfferId()
Output only. Your unique identifier for the product. This is the same for
the product input and processed product. Leading and trailing whitespaces
are stripped and multiple whitespaces are replaced by a single whitespace
upon submission. See the product data
specification for
details.
string offer_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
String |
The offerId.
|
public ByteString getOfferIdBytes()
Output only. Your unique identifier for the product. This is the same for
the product input and processed product. Leading and trailing whitespaces
are stripped and multiple whitespaces are replaced by a single whitespace
upon submission. See the product data
specification for
details.
string offer_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
ByteString |
The bytes for offerId.
|
public Parser<Product> getParserForType()
Overrides
public ProductAttributes getProductAttributes()
Output only. A list of strongly-typed product attributes.
.google.shopping.merchant.products.v1.ProductAttributes product_attributes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
public ProductAttributesOrBuilder getProductAttributesOrBuilder()
Output only. A list of strongly-typed product attributes.
.google.shopping.merchant.products.v1.ProductAttributes product_attributes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
public ProductStatus getProductStatus()
Output only. The status of a product, data validation issues, that is,
information about a product computed asynchronously.
.google.shopping.merchant.products.v1.ProductStatus product_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
public ProductStatusOrBuilder getProductStatusOrBuilder()
Output only. The status of a product, data validation issues, that is,
information about a product computed asynchronously.
.google.shopping.merchant.products.v1.ProductStatus product_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
public long getVersionNumber()
Output only. Represents the existing version (freshness) of the product,
which can be used to preserve the right order when multiple updates are
done at the same time.
If set, the insertion is prevented when version number is lower than
the current version number of the existing product. Re-insertion (for
example, product refresh after 30 days) can be performed with the current
version_number
.
Only supported for insertions into primary data sources.
If the operation is prevented, the aborted exception will be
thrown.
optional int64 version_number = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
long |
The versionNumber.
|
public boolean hasAutomatedDiscounts()
Output only. The automated discounts information for the product.
.google.shopping.merchant.products.v1.AutomatedDiscounts automated_discounts = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
boolean |
Whether the automatedDiscounts field is set.
|
public boolean hasProductAttributes()
Output only. A list of strongly-typed product attributes.
.google.shopping.merchant.products.v1.ProductAttributes product_attributes = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
boolean |
Whether the productAttributes field is set.
|
public boolean hasProductStatus()
Output only. The status of a product, data validation issues, that is,
information about a product computed asynchronously.
.google.shopping.merchant.products.v1.ProductStatus product_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
boolean |
Whether the productStatus field is set.
|
public boolean hasVersionNumber()
Output only. Represents the existing version (freshness) of the product,
which can be used to preserve the right order when multiple updates are
done at the same time.
If set, the insertion is prevented when version number is lower than
the current version number of the existing product. Re-insertion (for
example, product refresh after 30 days) can be performed with the current
version_number
.
Only supported for insertions into primary data sources.
If the operation is prevented, the aborted exception will be
thrown.
optional int64 version_number = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
boolean |
Whether the versionNumber field is set.
|
Returns |
Type |
Description |
int |
|
Overrides
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
public final boolean isInitialized()
Overrides
public Product.Builder newBuilderForType()
protected Product.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
public Product.Builder toBuilder()
public void writeTo(CodedOutputStream output)
Overrides