Documentation

Google_Service_RecommendationsAI_Resource_ProjectsLocationsCatalogsEventStoresUserEvents extends Google_Service_Resource
in package

The "userEvents" collection of methods.

Typical usage is: $recommendationengineService = new Google_Service_RecommendationsAI(...); $userEvents = $recommendationengineService->userEvents;

Table of Contents

$client  : Google_Client
$methods  : array<string|int, mixed>
$resourceName  : string
$rootUrl  : string
$serviceName  : string
$servicePath  : string
$stackParameters  : mixed
__construct()  : mixed
call()  : Google_Http_Request|expectedClass
TODO: This function needs simplifying.
collect()  : Google_Service_RecommendationsAI_GoogleApiHttpBody
Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. This method is used only by the Recommendations AI JavaScript pixel. Users should not call this method directly. (userEvents.collect)
createRequestUri()  : string
Parse/expand request parameters and create a fully qualified request uri.
import()  : Google_Service_RecommendationsAI_GoogleLongrunningOperation
Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted.
listProjectsLocationsCatalogsEventStoresUserEvents()  : Google_Service_RecommendationsAI_GoogleCloudRecommendationengineV1beta1ListUserEventsResponse
Gets a list of user events within a time range, with potential filtering. The method does not list unjoined user events. Unjoined user event definition: when a user event is ingested from Recommendations AI User Event APIs, the catalog item included in the user event is connected with the current catalog. If a catalog item of the ingested event is not in the current catalog, it could lead to degraded model quality. This is called an unjoined event. (userEvents.listProjectsLocationsCatalogsEventStoresUserEvents)
purge()  : Google_Service_RecommendationsAI_GoogleLongrunningOperation
Deletes permanently all user events specified by the filter provided.
rejoin()  : Google_Service_RecommendationsAI_GoogleLongrunningOperation
Triggers a user event rejoin operation with latest catalog data. Events will not be annotated with detailed catalog information if catalog item is missing at the time the user event is ingested, and these events are stored as unjoined events with a limited usage on training and serving. This API can be used to trigger a 'join' operation on specified events with latest version of catalog items. It can also be used to correct events joined with wrong catalog items. (userEvents.rejoin)
write()  : Google_Service_RecommendationsAI_GoogleCloudRecommendationengineV1beta1UserEvent
Writes a single user event. (userEvents.write)
convertToArrayAndStripNulls()  : mixed

Properties

$methods

private array<string|int, mixed> $methods

$resourceName

private string $resourceName

$serviceName

private string $serviceName

$servicePath

private string $servicePath

$stackParameters

private mixed $stackParameters = array('alt' => array('type' => 'string', 'location' => 'query'), 'fields' => array('type' => 'string', 'location' => 'query'), 'trace' => array('type' => 'string', 'location' => 'query'), 'userIp' => array('type' => 'string', 'location' => 'query'), 'quotaUser' => array('type' => 'string', 'location' => 'query'), 'data' => array('type' => 'string', 'location' => 'body'), 'mimeType' => array('type' => 'string', 'location' => 'header'), 'uploadType' => array('type' => 'string', 'location' => 'query'), 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), 'prettyPrint' => array('type' => 'string', 'location' => 'query'))

Methods

__construct()

public __construct(mixed $service, mixed $serviceName, mixed $resourceName, mixed $resource) : mixed
Parameters
$service : mixed
$serviceName : mixed
$resourceName : mixed
$resource : mixed
Return values
mixed

call()

TODO: This function needs simplifying.

public call( $name,  $arguments[,  $expectedClass = null ]) : Google_Http_Request|expectedClass
Parameters
$name :
$arguments :
$expectedClass : = null
  • optional, the expected class name
Tags
throws
Google_Exception
Return values
Google_Http_Request|expectedClass

collect()

Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. This method is used only by the Recommendations AI JavaScript pixel. Users should not call this method directly. (userEvents.collect)

public collect(string $parent[, array<string|int, mixed> $optParams = array() ]) : Google_Service_RecommendationsAI_GoogleApiHttpBody
Parameters
$parent : string

Required. The parent eventStore name, such as "projects /1234/locations/global/catalogs/default_catalog/eventStores/default_event_sto re".

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string userEvent Required. URL encoded UserEvent proto.

opt_param

string uri Optional. The url including cgi-parameters but excluding the hash fragment. The URL must be truncated to 1.5K bytes to conservatively be under the 2K bytes. This is often more useful than the referer url, because many browsers only send the domain for 3rd party requests.

opt_param

string ets Optional. The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.

Return values
Google_Service_RecommendationsAI_GoogleApiHttpBody

createRequestUri()

Parse/expand request parameters and create a fully qualified request uri.

public createRequestUri(string $restPath, array<string|int, mixed> $params) : string
Parameters
$restPath : string
$params : array<string|int, mixed>
Tags
static
Return values
string

$requestUrl

import()

Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted.

public import(string $parent, Google_Service_RecommendationsAI_GoogleCloudRecommendationengineV1beta1ImportUserEventsRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_RecommendationsAI_GoogleLongrunningOperation

Operation.metadata is of type ImportMetadata. (userEvents.import)

Parameters
$parent : string

Required. "projects/1234/locations/global/catalogs/defa ult_catalog/eventStores/default_event_store"

$postBody : Google_Service_RecommendationsAI_GoogleCloudRecommendationengineV1beta1ImportUserEventsRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_RecommendationsAI_GoogleLongrunningOperation

listProjectsLocationsCatalogsEventStoresUserEvents()

Gets a list of user events within a time range, with potential filtering. The method does not list unjoined user events. Unjoined user event definition: when a user event is ingested from Recommendations AI User Event APIs, the catalog item included in the user event is connected with the current catalog. If a catalog item of the ingested event is not in the current catalog, it could lead to degraded model quality. This is called an unjoined event. (userEvents.listProjectsLocationsCatalogsEventStoresUserEvents)

public listProjectsLocationsCatalogsEventStoresUserEvents(string $parent[, array<string|int, mixed> $optParams = array() ]) : Google_Service_RecommendationsAI_GoogleCloudRecommendationengineV1beta1ListUserEventsResponse
Parameters
$parent : string

Required. The parent eventStore resource name, such as "projects/locations/catalogs/default_catalog/eventStores/default_event_store" .

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string pageToken Optional. The previous ListUserEventsResponse.next_page_token.

opt_param

string filter Optional. Filtering expression to specify restrictions over returned events. This is a sequence of terms, where each term applies some kind of a restriction to the returned user events. Use this expression to restrict results to a specific time range, or filter events by eventType. eg: eventTime > "2012-04-23T18:25:43.511Z" eventsMissingCatalogItems eventTime<"2012-04-23T18:25:43.511Z" eventType=search We expect only 3 types of fields: * eventTime: this can be specified a maximum of 2 times, once with a less than operator and once with a greater than operator. The eventTime restrict should result in one contiguous valid eventTime range. * eventType: only 1 eventType restriction can be specified. * eventsMissingCatalogItems: specififying this will restrict results to events for which catalog items were not found in the catalog. The default behavior is to return only those events for which catalog items were found. Some examples of valid filters expressions: * Example 1: eventTime > "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z" * Example 2: eventTime > "2012-04-23T18:25:43.511Z" eventType = detail-page-view * Example 3: eventsMissingCatalogItems eventType = search eventTime < "2018-04-23T18:30:43.511Z" * Example 4: eventTime > "2012-04-23T18:25:43.511Z" * Example 5: eventType = search * Example 6: eventsMissingCatalogItems

opt_param

int pageSize Optional. Maximum number of results to return per page. If zero, the service will choose a reasonable default.

Return values
Google_Service_RecommendationsAI_GoogleCloudRecommendationengineV1beta1ListUserEventsResponse

purge()

Deletes permanently all user events specified by the filter provided.

public purge(string $parent, Google_Service_RecommendationsAI_GoogleCloudRecommendationengineV1beta1PurgeUserEventsRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_RecommendationsAI_GoogleLongrunningOperation

Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first. (userEvents.purge)

Parameters
$parent : string

Required. The resource name of the event_store under which the events are created. The format is "projects/${projectId}/locations/ global/catalogs/${catalogId}/eventStores/${eventStoreId}"

$postBody : Google_Service_RecommendationsAI_GoogleCloudRecommendationengineV1beta1PurgeUserEventsRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_RecommendationsAI_GoogleLongrunningOperation

rejoin()

Triggers a user event rejoin operation with latest catalog data. Events will not be annotated with detailed catalog information if catalog item is missing at the time the user event is ingested, and these events are stored as unjoined events with a limited usage on training and serving. This API can be used to trigger a 'join' operation on specified events with latest version of catalog items. It can also be used to correct events joined with wrong catalog items. (userEvents.rejoin)

public rejoin(string $parent, Google_Service_RecommendationsAI_GoogleCloudRecommendationengineV1beta1RejoinUserEventsRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_RecommendationsAI_GoogleLongrunningOperation
Parameters
$parent : string

Required. Full resource name of user event, such as "pr ojects/locations/catalogs/default_catalog/eventStores/default_event_store".

$postBody : Google_Service_RecommendationsAI_GoogleCloudRecommendationengineV1beta1RejoinUserEventsRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_RecommendationsAI_GoogleLongrunningOperation

write()

Writes a single user event. (userEvents.write)

public write(string $parent, Google_Service_RecommendationsAI_GoogleCloudRecommendationengineV1beta1UserEvent $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_RecommendationsAI_GoogleCloudRecommendationengineV1beta1UserEvent
Parameters
$parent : string

Required. The parent eventStore resource name, such as "projects/1234/locations/global/catalogs/default_catalog/eventStores/default_ event_store".

$postBody : Google_Service_RecommendationsAI_GoogleCloudRecommendationengineV1beta1UserEvent
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_RecommendationsAI_GoogleCloudRecommendationengineV1beta1UserEvent

convertToArrayAndStripNulls()

protected convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
$o : mixed
Return values
mixed

Search results