Class protos.google.cloud.retail.v2beta.UserEvent

Represents a UserEvent.

Package

@google-cloud/retail!

Constructors

(constructor)(properties)

constructor(properties?: google.cloud.retail.v2beta.IUserEvent);

Constructs a new UserEvent.

Parameter
TypeNameDescription
IUserEventproperties

Properties to set

Properties

attributes

public attributes: { [k: string]: google.cloud.retail.v2beta.ICustomAttribute };

UserEvent attributes.

Property Value
TypeDescription
{ [k: string]: google.cloud.retail.v2beta.ICustomAttribute }

attributionToken

public attributionToken: string;

UserEvent attributionToken.

Property Value
TypeDescription
string

cartId

public cartId: string;

UserEvent cartId.

Property Value
TypeDescription
string

completionDetail

public completionDetail?: (google.cloud.retail.v2beta.ICompletionDetail|null);

UserEvent completionDetail.

Property Value
TypeDescription
(google.cloud.retail.v2beta.ICompletionDetail|null)

eventTime

public eventTime?: (google.protobuf.ITimestamp|null);

UserEvent eventTime.

Property Value
TypeDescription
(google.protobuf.ITimestamp|null)

eventType

public eventType: string;

UserEvent eventType.

Property Value
TypeDescription
string

experimentIds

public experimentIds: string[];

UserEvent experimentIds.

Property Value
TypeDescription
string[]

filter

public filter: string;

UserEvent filter.

Property Value
TypeDescription
string

offset

public offset: number;

UserEvent offset.

Property Value
TypeDescription
number

orderBy

public orderBy: string;

UserEvent orderBy.

Property Value
TypeDescription
string

pageCategories

public pageCategories: string[];

UserEvent pageCategories.

Property Value
TypeDescription
string[]

pageViewId

public pageViewId: string;

UserEvent pageViewId.

Property Value
TypeDescription
string

productDetails

public productDetails: google.cloud.retail.v2beta.IProductDetail[];

UserEvent productDetails.

Property Value
TypeDescription
google.cloud.retail.v2beta.IProductDetail[]

purchaseTransaction

public purchaseTransaction?: (google.cloud.retail.v2beta.IPurchaseTransaction|null);

UserEvent purchaseTransaction.

Property Value
TypeDescription
(google.cloud.retail.v2beta.IPurchaseTransaction|null)

referrerUri

public referrerUri: string;

UserEvent referrerUri.

Property Value
TypeDescription
string

searchQuery

public searchQuery: string;

UserEvent searchQuery.

Property Value
TypeDescription
string

sessionId

public sessionId: string;

UserEvent sessionId.

Property Value
TypeDescription
string

uri

public uri: string;

UserEvent uri.

Property Value
TypeDescription
string

userInfo

public userInfo?: (google.cloud.retail.v2beta.IUserInfo|null);

UserEvent userInfo.

Property Value
TypeDescription
(google.cloud.retail.v2beta.IUserInfo|null)

visitorId

public visitorId: string;

UserEvent visitorId.

Property Value
TypeDescription
string

Methods

create(properties)

public static create(properties?: google.cloud.retail.v2beta.IUserEvent): google.cloud.retail.v2beta.UserEvent;

Creates a new UserEvent instance using the specified properties.

Parameter
TypeNameDescription
IUserEventproperties

Properties to set

Returns
TypeDescription
google.cloud.retail.v2beta.UserEvent

UserEvent instance

decode(reader, length)

public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.retail.v2beta.UserEvent;

Decodes a UserEvent message from the specified reader or buffer.

Parameters
TypeNameDescription
($protobuf.Reader|Uint8Array)reader

Reader or buffer to decode from

numberlength

Message length if known beforehand

Returns
TypeDescription
google.cloud.retail.v2beta.UserEvent

UserEvent

decodeDelimited(reader)

public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.retail.v2beta.UserEvent;

Decodes a UserEvent message from the specified reader or buffer, length delimited.

Parameter
TypeNameDescription
($protobuf.Reader|Uint8Array)reader

Reader or buffer to decode from

Returns
TypeDescription
google.cloud.retail.v2beta.UserEvent

UserEvent

encode(message, writer)

public static encode(message: google.cloud.retail.v2beta.IUserEvent, writer?: $protobuf.Writer): $protobuf.Writer;

Encodes the specified UserEvent message. Does not implicitly messages.

Parameters
TypeNameDescription
IUserEventmessage

UserEvent message or plain object to encode

$protobuf.Writerwriter

Writer to encode to

Returns
TypeDescription
$protobuf.Writer

Writer

encodeDelimited(message, writer)

public static encodeDelimited(message: google.cloud.retail.v2beta.IUserEvent, writer?: $protobuf.Writer): $protobuf.Writer;

Encodes the specified UserEvent message, length delimited. Does not implicitly messages.

Parameters
TypeNameDescription
IUserEventmessage

UserEvent message or plain object to encode

$protobuf.Writerwriter

Writer to encode to

Returns
TypeDescription
$protobuf.Writer

Writer

fromObject(object)

public static fromObject(object: { [k: string]: any }): google.cloud.retail.v2beta.UserEvent;

Creates a UserEvent message from a plain object. Also converts values to their respective internal types.

Parameter
TypeNameDescription
{ [k: string]: any }object

Plain object

Returns
TypeDescription
google.cloud.retail.v2beta.UserEvent

UserEvent

toJSON()

public toJSON(): { [k: string]: any };

Converts this UserEvent to JSON.

Returns
TypeDescription
{ [k: string]: any }

JSON object

toObject(message, options)

public static toObject(message: google.cloud.retail.v2beta.UserEvent, options?: $protobuf.IConversionOptions): { [k: string]: any };

Creates a plain object from a UserEvent message. Also converts values to other types if specified.

Parameters
TypeNameDescription
google.cloud.retail.v2beta.UserEventmessage

UserEvent

$protobuf.IConversionOptionsoptions

Conversion options

Returns
TypeDescription
{ [k: string]: any }

Plain object

verify(message)

public static verify(message: { [k: string]: any }): (string|null);

Verifies a UserEvent message.

Parameter
TypeNameDescription
{ [k: string]: any }message

Plain object to verify

Returns
TypeDescription
(string|null)

null if valid, otherwise the reason why it is not