Skip to content

Commit

Permalink
Regenerate retail client (#6042)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-code-bot authored Dec 21, 2024
1 parent 4e4efc1 commit 4cb50e7
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 44 deletions.
22 changes: 1 addition & 21 deletions src/CloudRetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -936,33 +936,13 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
'methods' => [
'collect' => [
'path' => 'v2/{+parent}/userEvents:collect',
'httpMethod' => 'GET',
'httpMethod' => 'POST',
'parameters' => [
'parent' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
'ets' => [
'location' => 'query',
'type' => 'string',
],
'prebuiltRule' => [
'location' => 'query',
'type' => 'string',
],
'rawJson' => [
'location' => 'query',
'type' => 'string',
],
'uri' => [
'location' => 'query',
'type' => 'string',
],
'userEvent' => [
'location' => 'query',
'type' => 'string',
],
],
],'import' => [
'path' => 'v2/{+parent}/userEvents:import',
Expand Down
116 changes: 116 additions & 0 deletions src/CloudRetail/GoogleCloudRetailV2CollectUserEventRequest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/

namespace Google\Service\CloudRetail;

class GoogleCloudRetailV2CollectUserEventRequest extends \Google\Model
{
/**
* @var string
*/
public $ets;
/**
* @var string
*/
public $prebuiltRule;
/**
* @var string
*/
public $rawJson;
/**
* @var string
*/
public $uri;
/**
* @var string
*/
public $userEvent;

/**
* @param string
*/
public function setEts($ets)
{
$this->ets = $ets;
}
/**
* @return string
*/
public function getEts()
{
return $this->ets;
}
/**
* @param string
*/
public function setPrebuiltRule($prebuiltRule)
{
$this->prebuiltRule = $prebuiltRule;
}
/**
* @return string
*/
public function getPrebuiltRule()
{
return $this->prebuiltRule;
}
/**
* @param string
*/
public function setRawJson($rawJson)
{
$this->rawJson = $rawJson;
}
/**
* @return string
*/
public function getRawJson()
{
return $this->rawJson;
}
/**
* @param string
*/
public function setUri($uri)
{
$this->uri = $uri;
}
/**
* @return string
*/
public function getUri()
{
return $this->uri;
}
/**
* @param string
*/
public function setUserEvent($userEvent)
{
$this->userEvent = $userEvent;
}
/**
* @return string
*/
public function getUserEvent()
{
return $this->userEvent;
}
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GoogleCloudRetailV2CollectUserEventRequest::class, 'Google_Service_CloudRetail_GoogleCloudRetailV2CollectUserEventRequest');
32 changes: 9 additions & 23 deletions src/CloudRetail/Resource/ProjectsLocationsCatalogsUserEvents.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
namespace Google\Service\CloudRetail\Resource;

use Google\Service\CloudRetail\GoogleApiHttpBody;
use Google\Service\CloudRetail\GoogleCloudRetailV2CollectUserEventRequest;
use Google\Service\CloudRetail\GoogleCloudRetailV2ImportUserEventsRequest;
use Google\Service\CloudRetail\GoogleCloudRetailV2PurgeUserEventsRequest;
use Google\Service\CloudRetail\GoogleCloudRetailV2RejoinUserEventsRequest;
Expand All @@ -35,37 +36,22 @@
class ProjectsLocationsCatalogsUserEvents extends \Google\Service\Resource
{
/**
* 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 Retail API JavaScript pixel and Google Tag Manager. Users should
* not call this method directly. (userEvents.collect)
* Writes a single user event from the browser. For larger user event payload
* over 16 KB, the POST method should be used instead, otherwise a 400 Bad
* Request error is returned. This method is used only by the Retail API
* JavaScript pixel and Google Tag Manager. Users should not call this method
* directly. (userEvents.collect)
*
* @param string $parent Required. The parent catalog name, such as
* `projects/1234/locations/global/catalogs/default_catalog`.
* @param GoogleCloudRetailV2CollectUserEventRequest $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string ets The event timestamp in milliseconds. This prevents
* browser caching of otherwise identical get requests. The name is abbreviated
* to reduce the payload bytes.
* @opt_param string prebuiltRule The prebuilt rule name that can convert a
* specific type of raw_json. For example: "ga4_bq" rule for the GA4 user event
* schema.
* @opt_param string rawJson An arbitrary serialized JSON string that contains
* necessary information that can comprise a user event. When this field is
* specified, the user_event field will be ignored. Note: line-delimited JSON is
* not supported, a single JSON only.
* @opt_param string uri The URL including cgi-parameters but excluding the hash
* fragment with a length limit of 5,000 characters. This is often more useful
* than the referer URL, because many browsers only send the domain for 3rd
* party requests.
* @opt_param string userEvent Required. URL encoded UserEvent proto with a
* length limit of 2,000,000 characters.
* @return GoogleApiHttpBody
* @throws \Google\Service\Exception
*/
public function collect($parent, $optParams = [])
public function collect($parent, GoogleCloudRetailV2CollectUserEventRequest $postBody, $optParams = [])
{
$params = ['parent' => $parent];
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('collect', [$params], GoogleApiHttpBody::class);
}
Expand Down

0 comments on commit 4cb50e7

Please sign in to comment.