Represents a FacetConfig.
Package
@google-cloud/retailConstructors
(constructor)(properties)
constructor(properties?: google.cloud.retail.v2beta.CatalogAttribute.IFacetConfig);
Constructs a new FacetConfig.
Parameter | |
---|---|
Name | Description |
properties |
IFacetConfig
Properties to set |
Properties
facetIntervals
public facetIntervals: google.cloud.retail.v2beta.IInterval[];
FacetConfig facetIntervals.
ignoredFacetValues
public ignoredFacetValues: google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IIgnoredFacetValues[];
FacetConfig ignoredFacetValues.
mergedFacet
public mergedFacet?: (google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IMergedFacet|null);
FacetConfig mergedFacet.
mergedFacetValues
public mergedFacetValues: google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IMergedFacetValue[];
FacetConfig mergedFacetValues.
rerankConfig
public rerankConfig?: (google.cloud.retail.v2beta.CatalogAttribute.FacetConfig.IRerankConfig|null);
FacetConfig rerankConfig.
Methods
create(properties)
public static create(properties?: google.cloud.retail.v2beta.CatalogAttribute.IFacetConfig): google.cloud.retail.v2beta.CatalogAttribute.FacetConfig;
Creates a new FacetConfig instance using the specified properties.
Parameter | |
---|---|
Name | Description |
properties |
IFacetConfig
Properties to set |
Returns | |
---|---|
Type | Description |
FacetConfig |
FacetConfig instance |
decode(reader, length)
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.retail.v2beta.CatalogAttribute.FacetConfig;
Decodes a FacetConfig message from the specified reader or buffer.
Parameters | |
---|---|
Name | Description |
reader |
(Reader|Uint8Array)
Reader or buffer to decode from |
length |
number
Message length if known beforehand |
Returns | |
---|---|
Type | Description |
FacetConfig |
FacetConfig |
decodeDelimited(reader)
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.retail.v2beta.CatalogAttribute.FacetConfig;
Decodes a FacetConfig message from the specified reader or buffer, length delimited.
Parameter | |
---|---|
Name | Description |
reader |
(Reader|Uint8Array)
Reader or buffer to decode from |
Returns | |
---|---|
Type | Description |
FacetConfig |
FacetConfig |
encode(message, writer)
public static encode(message: google.cloud.retail.v2beta.CatalogAttribute.IFacetConfig, writer?: $protobuf.Writer): $protobuf.Writer;
Encodes the specified FacetConfig message. Does not implicitly messages.
Parameters | |
---|---|
Name | Description |
message |
IFacetConfig
FacetConfig message or plain object to encode |
writer |
$protobuf.Writer
Writer to encode to |
Returns | |
---|---|
Type | Description |
$protobuf.Writer |
Writer |
encodeDelimited(message, writer)
public static encodeDelimited(message: google.cloud.retail.v2beta.CatalogAttribute.IFacetConfig, writer?: $protobuf.Writer): $protobuf.Writer;
Encodes the specified FacetConfig message, length delimited. Does not implicitly messages.
Parameters | |
---|---|
Name | Description |
message |
IFacetConfig
FacetConfig message or plain object to encode |
writer |
$protobuf.Writer
Writer to encode to |
Returns | |
---|---|
Type | Description |
$protobuf.Writer |
Writer |
fromObject(object)
public static fromObject(object: { [k: string]: any }): google.cloud.retail.v2beta.CatalogAttribute.FacetConfig;
Creates a FacetConfig message from a plain object. Also converts values to their respective internal types.
Parameter | |
---|---|
Name | Description |
object |
{ [k: string]: any }
Plain object |
Returns | |
---|---|
Type | Description |
FacetConfig |
FacetConfig |
getTypeUrl(typeUrlPrefix)
public static getTypeUrl(typeUrlPrefix?: string): string;
Gets the default type url for FacetConfig
Parameter | |
---|---|
Name | Description |
typeUrlPrefix |
string
your custom typeUrlPrefix(default "type.googleapis.com") |
Returns | |
---|---|
Type | Description |
string |
The default type url |
toJSON()
public toJSON(): { [k: string]: any };
Converts this FacetConfig to JSON.
Returns | |
---|---|
Type | Description |
{ [k: string]: any } |
JSON object |
toObject(message, options)
public static toObject(message: google.cloud.retail.v2beta.CatalogAttribute.FacetConfig, options?: $protobuf.IConversionOptions): { [k: string]: any };
Creates a plain object from a FacetConfig message. Also converts values to other types if specified.
Parameters | |
---|---|
Name | Description |
message |
FacetConfig
FacetConfig |
options |
$protobuf.IConversionOptions
Conversion options |
Returns | |
---|---|
Type | Description |
{ [k: string]: any } |
Plain object |
verify(message)
public static verify(message: { [k: string]: any }): (string|null);
Verifies a FacetConfig message.
Parameter | |
---|---|
Name | Description |
message |
{ [k: string]: any }
Plain object to verify |
Returns | |
---|---|
Type | Description |
(string|null) |
|