Represents a Product.
Package
@google-cloud/retailConstructors
(constructor)(properties)
constructor(properties?: google.cloud.retail.v2alpha.IProduct);
Constructs a new Product.
Name | Description |
properties |
IProduct
Properties to set |
Properties
attributes
public attributes: { [k: string]: google.cloud.retail.v2alpha.ICustomAttribute };
Product attributes.
Type | Description |
{ [k: string]: google.cloud.retail.v2alpha.ICustomAttribute } |
audience
public audience?: (google.cloud.retail.v2alpha.IAudience|null);
Product audience.
Type | Description |
(google.cloud.retail.v2alpha.IAudience|null) |
availability
public availability: (google.cloud.retail.v2alpha.Product.Availability|keyof typeof google.cloud.retail.v2alpha.Product.Availability);
Product availability.
Type | Description |
(google.cloud.retail.v2alpha.Product.Availability|keyof typeof google.cloud.retail.v2alpha.Product.Availability) |
availableQuantity
public availableQuantity?: (google.protobuf.IInt32Value|null);
Product availableQuantity.
Type | Description |
(google.protobuf.IInt32Value|null) |
availableTime
public availableTime?: (google.protobuf.ITimestamp|null);
Product availableTime.
Type | Description |
(google.protobuf.ITimestamp|null) |
brands
public brands: string[];
Product brands.
Type | Description |
string[] |
categories
public categories: string[];
Product categories.
Type | Description |
string[] |
collectionMemberIds
public collectionMemberIds: string[];
Product collectionMemberIds.
Type | Description |
string[] |
colorInfo
public colorInfo?: (google.cloud.retail.v2alpha.IColorInfo|null);
Product colorInfo.
Type | Description |
(google.cloud.retail.v2alpha.IColorInfo|null) |
conditions
public conditions: string[];
Product conditions.
Type | Description |
string[] |
description
public description: string;
Product description.
Type | Description |
string |
expiration
public expiration?: ("expireTime"|"ttl");
Product expiration.
Type | Description |
("expireTime"|"ttl") |
expireTime
public expireTime?: (google.protobuf.ITimestamp|null);
Product expireTime.
Type | Description |
(google.protobuf.ITimestamp|null) |
fulfillmentInfo
public fulfillmentInfo: google.cloud.retail.v2alpha.IFulfillmentInfo[];
Product fulfillmentInfo.
Type | Description |
google.cloud.retail.v2alpha.IFulfillmentInfo[] |
gtin
public gtin: string;
Product gtin.
Type | Description |
string |
id
public id: string;
Product id.
Type | Description |
string |
images
public images: google.cloud.retail.v2alpha.IImage[];
Product images.
Type | Description |
google.cloud.retail.v2alpha.IImage[] |
languageCode
public languageCode: string;
Product languageCode.
Type | Description |
string |
materials
public materials: string[];
Product materials.
Type | Description |
string[] |
name
public name: string;
Product name.
Type | Description |
string |
patterns
public patterns: string[];
Product patterns.
Type | Description |
string[] |
priceInfo
public priceInfo?: (google.cloud.retail.v2alpha.IPriceInfo|null);
Product priceInfo.
Type | Description |
(google.cloud.retail.v2alpha.IPriceInfo|null) |
primaryProductId
public primaryProductId: string;
Product primaryProductId.
Type | Description |
string |
promotions
public promotions: google.cloud.retail.v2alpha.IPromotion[];
Product promotions.
Type | Description |
google.cloud.retail.v2alpha.IPromotion[] |
publishTime
public publishTime?: (google.protobuf.ITimestamp|null);
Product publishTime.
Type | Description |
(google.protobuf.ITimestamp|null) |
rating
public rating?: (google.cloud.retail.v2alpha.IRating|null);
Product rating.
Type | Description |
(google.cloud.retail.v2alpha.IRating|null) |
retrievableFields
public retrievableFields?: (google.protobuf.IFieldMask|null);
Product retrievableFields.
Type | Description |
(google.protobuf.IFieldMask|null) |
sizes
public sizes: string[];
Product sizes.
Type | Description |
string[] |
tags
public tags: string[];
Product tags.
Type | Description |
string[] |
title
public title: string;
Product title.
Type | Description |
string |
ttl
public ttl?: (google.protobuf.IDuration|null);
Product ttl.
Type | Description |
(google.protobuf.IDuration|null) |
type
public type: (google.cloud.retail.v2alpha.Product.Type|keyof typeof google.cloud.retail.v2alpha.Product.Type);
Product type.
Type | Description |
(google.cloud.retail.v2alpha.Product.Type|keyof typeof google.cloud.retail.v2alpha.Product.Type) |
uri
public uri: string;
Product uri.
Type | Description |
string |
variants
public variants: google.cloud.retail.v2alpha.IProduct[];
Product variants.
Type | Description |
google.cloud.retail.v2alpha.IProduct[] |
Methods
create(properties)
public static create(properties?: google.cloud.retail.v2alpha.IProduct): google.cloud.retail.v2alpha.Product;
Creates a new Product instance using the specified properties.
Name | Description |
properties |
IProduct
Properties to set |
Type | Description |
google.cloud.retail.v2alpha.Product | Product instance |
decode(reader, length)
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.retail.v2alpha.Product;
Decodes a Product message from the specified reader or buffer.
Name | Description |
reader |
($protobuf.Reader|Uint8Array)
Reader or buffer to decode from |
length |
number
Message length if known beforehand |
Type | Description |
google.cloud.retail.v2alpha.Product | Product |
decodeDelimited(reader)
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.retail.v2alpha.Product;
Decodes a Product message from the specified reader or buffer, length delimited.
Name | Description |
reader |
($protobuf.Reader|Uint8Array)
Reader or buffer to decode from |
Type | Description |
google.cloud.retail.v2alpha.Product | Product |
encode(message, writer)
public static encode(message: google.cloud.retail.v2alpha.IProduct, writer?: $protobuf.Writer): $protobuf.Writer;
Encodes the specified Product message. Does not implicitly messages.
Name | Description |
message |
IProduct
Product message or plain object to encode |
writer |
$protobuf.Writer
Writer to encode to |
Type | Description |
$protobuf.Writer | Writer |
encodeDelimited(message, writer)
public static encodeDelimited(message: google.cloud.retail.v2alpha.IProduct, writer?: $protobuf.Writer): $protobuf.Writer;
Encodes the specified Product message, length delimited. Does not implicitly messages.
Name | Description |
message |
IProduct
Product message or plain object to encode |
writer |
$protobuf.Writer
Writer to encode to |
Type | Description |
$protobuf.Writer | Writer |
fromObject(object)
public static fromObject(object: { [k: string]: any }): google.cloud.retail.v2alpha.Product;
Creates a Product message from a plain object. Also converts values to their respective internal types.
Name | Description |
object |
{ [k: string]: any }
Plain object |
Type | Description |
google.cloud.retail.v2alpha.Product | Product |
toJSON()
public toJSON(): { [k: string]: any };
Converts this Product to JSON.
Type | Description |
{ [k: string]: any } | JSON object |
toObject(message, options)
public static toObject(message: google.cloud.retail.v2alpha.Product, options?: $protobuf.IConversionOptions): { [k: string]: any };
Creates a plain object from a Product message. Also converts values to other types if specified.
Name | Description |
message |
google.cloud.retail.v2alpha.Product
Product |
options |
$protobuf.IConversionOptions
Conversion options |
Type | Description |
{ [k: string]: any } | Plain object |
verify(message)
public static verify(message: { [k: string]: any }): (string|null);
Verifies a Product message.
Name | Description |
message |
{ [k: string]: any }
Plain object to verify |
Type | Description |
(string|null) |
|