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.
audience
public audience?: (google.cloud.retail.v2alpha.IAudience|null);
Product audience.
availability
public availability: (google.cloud.retail.v2alpha.Product.Availability|keyof typeof google.cloud.retail.v2alpha.Product.Availability);
Product availability.
availableQuantity
public availableQuantity?: (google.protobuf.IInt32Value|null);
Product availableQuantity.
availableTime
public availableTime?: (google.protobuf.ITimestamp|null);
Product availableTime.
brands
public brands: string[];
Product brands.
categories
public categories: string[];
Product categories.
collectionMemberIds
public collectionMemberIds: string[];
Product collectionMemberIds.
colorInfo
public colorInfo?: (google.cloud.retail.v2alpha.IColorInfo|null);
Product colorInfo.
conditions
public conditions: string[];
Product conditions.
description
public description: string;
Product description.
expiration
public expiration?: ("expireTime"|"ttl");
Product expiration.
expireTime
public expireTime?: (google.protobuf.ITimestamp|null);
Product expireTime.
fulfillmentInfo
public fulfillmentInfo: google.cloud.retail.v2alpha.IFulfillmentInfo[];
Product fulfillmentInfo.
gtin
public gtin: string;
Product gtin.
id
public id: string;
Product id.
images
public images: google.cloud.retail.v2alpha.IImage[];
Product images.
languageCode
public languageCode: string;
Product languageCode.
materials
public materials: string[];
Product materials.
name
public name: string;
Product name.
patterns
public patterns: string[];
Product patterns.
priceInfo
public priceInfo?: (google.cloud.retail.v2alpha.IPriceInfo|null);
Product priceInfo.
primaryProductId
public primaryProductId: string;
Product primaryProductId.
promotions
public promotions: google.cloud.retail.v2alpha.IPromotion[];
Product promotions.
publishTime
public publishTime?: (google.protobuf.ITimestamp|null);
Product publishTime.
rating
public rating?: (google.cloud.retail.v2alpha.IRating|null);
Product rating.
retrievableFields
public retrievableFields?: (google.protobuf.IFieldMask|null);
Product retrievableFields.
sizes
public sizes: string[];
Product sizes.
tags
public tags: string[];
Product tags.
title
public title: string;
Product title.
ttl
public ttl?: (google.protobuf.IDuration|null);
Product ttl.
type
public type: (google.cloud.retail.v2alpha.Product.Type|keyof typeof google.cloud.retail.v2alpha.Product.Type);
Product type.
uri
public uri: string;
Product uri.
variants
public variants: google.cloud.retail.v2alpha.IProduct[];
Product variants.
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) |
|