public final class ProductInput extends GeneratedMessageV3 implements ProductInputOrBuilder
This resource represents input data you submit for a product, not the
processed product that you see in Merchant Center, in Shopping ads, or across
Google surfaces. Product inputs, rules and supplemental data source data are
combined to create the processed
Product.
Required product input attributes to pass data validation checks are
primarily defined in the Products Data
Specification.
The following attributes are required:
feedLabel,
contentLanguage
and offerId.
After inserting, updating, or deleting a product input, it may take several
minutes before the processed product can be retrieved.
All fields in the product input and its sub-messages match the English name
of their corresponding attribute in the vertical spec with some
exceptions.
Protobuf type google.shopping.merchant.products.v1beta.ProductInput
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 ATTRIBUTES_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int CHANNEL_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 FEED_LABEL_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_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
public static final int VERSION_NUMBER_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
public static ProductInput getDefaultInstance()
public static final Descriptors.Descriptor getDescriptor()
public static ProductInput.Builder newBuilder()
public static ProductInput.Builder newBuilder(ProductInput prototype)
public static ProductInput parseDelimitedFrom(InputStream input)
public static ProductInput parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static ProductInput parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
public static ProductInput parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static ProductInput parseFrom(ByteString data)
public static ProductInput parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static ProductInput parseFrom(CodedInputStream input)
public static ProductInput parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static ProductInput parseFrom(InputStream input)
public static ProductInput parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static ProductInput parseFrom(ByteBuffer data)
public static ProductInput parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Parser<ProductInput> parser()
Methods
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
public Attributes getAttributes()
Optional. A list of product attributes.
.google.shopping.merchant.products.v1beta.Attributes attributes = 8 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
Attributes |
The attributes.
|
public AttributesOrBuilder getAttributesOrBuilder()
Optional. A list of product attributes.
.google.shopping.merchant.products.v1beta.Attributes attributes = 8 [(.google.api.field_behavior) = OPTIONAL];
public Channel.ChannelEnum getChannel()
Required. Immutable. The
channel of the
product.
.google.shopping.type.Channel.ChannelEnum channel = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
Returns |
Type |
Description |
com.google.shopping.type.Channel.ChannelEnum |
The channel.
|
public int getChannelValue()
Required. Immutable. The
channel of the
product.
.google.shopping.type.Channel.ChannelEnum channel = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
Returns |
Type |
Description |
int |
The enum numeric value on the wire for channel.
|
getContentLanguage()
public String getContentLanguage()
Required. Immutable. The two-letter ISO
639-1 language code for the
product.
string content_language = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
Returns |
Type |
Description |
String |
The contentLanguage.
|
getContentLanguageBytes()
public ByteString getContentLanguageBytes()
Required. Immutable. The two-letter ISO
639-1 language code for the
product.
string content_language = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
Returns |
Type |
Description |
ByteString |
The bytes for contentLanguage.
|
public CustomAttribute getCustomAttributes(int index)
Optional. A list of custom (merchant-provided) attributes. It can also be
used for submitting 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.
Maximum allowed number of characters for each
custom attribute is 10240 (represents sum of characters for name and
value). Maximum 2500 custom attributes can be set per product, with total
size of 102.4kB. Underscores in custom attribute names are replaced by
spaces upon insertion.
repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
Name |
Description |
index |
int
|
Returns |
Type |
Description |
com.google.shopping.type.CustomAttribute |
|
public int getCustomAttributesCount()
Optional. A list of custom (merchant-provided) attributes. It can also be
used for submitting 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.
Maximum allowed number of characters for each
custom attribute is 10240 (represents sum of characters for name and
value). Maximum 2500 custom attributes can be set per product, with total
size of 102.4kB. Underscores in custom attribute names are replaced by
spaces upon insertion.
repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
int |
|
public List<CustomAttribute> getCustomAttributesList()
Optional. A list of custom (merchant-provided) attributes. It can also be
used for submitting 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.
Maximum allowed number of characters for each
custom attribute is 10240 (represents sum of characters for name and
value). Maximum 2500 custom attributes can be set per product, with total
size of 102.4kB. Underscores in custom attribute names are replaced by
spaces upon insertion.
repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
List<com.google.shopping.type.CustomAttribute> |
|
public CustomAttributeOrBuilder getCustomAttributesOrBuilder(int index)
Optional. A list of custom (merchant-provided) attributes. It can also be
used for submitting 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.
Maximum allowed number of characters for each
custom attribute is 10240 (represents sum of characters for name and
value). Maximum 2500 custom attributes can be set per product, with total
size of 102.4kB. Underscores in custom attribute names are replaced by
spaces upon insertion.
repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OPTIONAL];
Parameter |
Name |
Description |
index |
int
|
Returns |
Type |
Description |
com.google.shopping.type.CustomAttributeOrBuilder |
|
public List<? extends CustomAttributeOrBuilder> getCustomAttributesOrBuilderList()
Optional. A list of custom (merchant-provided) attributes. It can also be
used for submitting 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.
Maximum allowed number of characters for each
custom attribute is 10240 (represents sum of characters for name and
value). Maximum 2500 custom attributes can be set per product, with total
size of 102.4kB. Underscores in custom attribute names are replaced by
spaces upon insertion.
repeated .google.shopping.type.CustomAttribute custom_attributes = 9 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
List<? extends com.google.shopping.type.CustomAttributeOrBuilder> |
|
public ProductInput getDefaultInstanceForType()
public String getFeedLabel()
Required. Immutable. The feed
label
for the product.
string feed_label = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
Returns |
Type |
Description |
String |
The feedLabel.
|
public ByteString getFeedLabelBytes()
Required. Immutable. The feed
label
for the product.
string feed_label = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
Returns |
Type |
Description |
ByteString |
The bytes for feedLabel.
|
Identifier. The name of the product input.
Format:
"{productinput.name=accounts/{account}/productInputs/{productinput}}"
where the last section productinput
consists of 4 parts:
channel~content_language~feed_label~offer_id
example for product input name is
"accounts/123/productInputs/online~en~US~sku123"
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
Returns |
Type |
Description |
String |
The name.
|
public ByteString getNameBytes()
Identifier. The name of the product input.
Format:
"{productinput.name=accounts/{account}/productInputs/{productinput}}"
where the last section productinput
consists of 4 parts:
channel~content_language~feed_label~offer_id
example for product input name is
"accounts/123/productInputs/online~en~US~sku123"
string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
Returns |
Type |
Description |
ByteString |
The bytes for name.
|
public String getOfferId()
Required. Immutable. 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 products data
specification for
details.
string offer_id = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
Returns |
Type |
Description |
String |
The offerId.
|
public ByteString getOfferIdBytes()
Required. Immutable. 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 products data
specification for
details.
string offer_id = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
Returns |
Type |
Description |
ByteString |
The bytes for offerId.
|
public Parser<ProductInput> getParserForType()
Overrides
public String getProduct()
Output only. The name of the processed product.
Format:
"{product.name=accounts/{account}/products/{product}}"
string product = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
String |
The product.
|
public ByteString getProductBytes()
Output only. The name of the processed product.
Format:
"{product.name=accounts/{account}/products/{product}}"
string product = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
ByteString |
The bytes for product.
|
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
public long getVersionNumber()
Optional. 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) = OPTIONAL];
Returns |
Type |
Description |
long |
The versionNumber.
|
public boolean hasAttributes()
Optional. A list of product attributes.
.google.shopping.merchant.products.v1beta.Attributes attributes = 8 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
boolean |
Whether the attributes field is set.
|
public boolean hasVersionNumber()
Optional. 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) = OPTIONAL];
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 ProductInput.Builder newBuilderForType()
protected ProductInput.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
public ProductInput.Builder toBuilder()
public void writeTo(CodedOutputStream output)
Overrides