Skip to content

Commit bbe63dc

Browse files
feat: Automated regeneration of Retail client (googleapis#12748)
Auto-created at 2024-12-20 13:12:44 +0000 using the toys pull request generator.
1 parent d0f4f2d commit bbe63dc

File tree

5 files changed

+65
-15
lines changed

5 files changed

+65
-15
lines changed

clients/retail/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding
1111

1212
```elixir
1313
def deps do
14-
[{:google_api_retail, "~> 0.19"}]
14+
[{:google_api_retail, "~> 0.20"}]
1515
end
1616
```
1717

clients/retail/lib/google_api/retail/v2/api/projects.ex

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4304,7 +4304,7 @@ defmodule GoogleApi.Retail.V2.Api.Projects do
43044304
end
43054305

43064306
@doc """
4307-
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.
4307+
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.
43084308
43094309
## Parameters
43104310
@@ -4322,11 +4322,7 @@ defmodule GoogleApi.Retail.V2.Api.Projects do
43224322
* `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
43234323
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
43244324
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
4325-
* `:ets` (*type:* `String.t`) - The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.
4326-
* `:prebuiltRule` (*type:* `String.t`) - The prebuilt rule name that can convert a specific type of raw_json. For example: "ga4_bq" rule for the GA4 user event schema.
4327-
* `:rawJson` (*type:* `String.t`) - 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.
4328-
* `:uri` (*type:* `String.t`) - 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.
4329-
* `:userEvent` (*type:* `String.t`) - Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.
4325+
* `:body` (*type:* `GoogleApi.Retail.V2.Model.GoogleCloudRetailV2CollectUserEventRequest.t`) -
43304326
* `opts` (*type:* `keyword()`) - Call options
43314327
43324328
## Returns
@@ -4362,16 +4358,12 @@ defmodule GoogleApi.Retail.V2.Api.Projects do
43624358
:quotaUser => :query,
43634359
:uploadType => :query,
43644360
:upload_protocol => :query,
4365-
:ets => :query,
4366-
:prebuiltRule => :query,
4367-
:rawJson => :query,
4368-
:uri => :query,
4369-
:userEvent => :query
4361+
:body => :body
43704362
}
43714363

43724364
request =
43734365
Request.new()
4374-
|> Request.method(:get)
4366+
|> Request.method(:post)
43754367
|> Request.url("/v2/{+parent}/userEvents:collect", %{
43764368
"parent" => URI.encode(parent, &URI.char_unreserved?/1)
43774369
})

clients/retail/lib/google_api/retail/v2/metadata.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defmodule GoogleApi.Retail.V2 do
2020
API client metadata for GoogleApi.Retail.V2.
2121
"""
2222

23-
@discovery_revision "20241205"
23+
@discovery_revision "20241220"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Copyright 2019 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# NOTE: This file is auto generated by the elixir code generator program.
16+
# Do not edit this file manually.
17+
18+
defmodule GoogleApi.Retail.V2.Model.GoogleCloudRetailV2CollectUserEventRequest do
19+
@moduledoc """
20+
Request message for CollectUserEvent method.
21+
22+
## Attributes
23+
24+
* `ets` (*type:* `String.t`, *default:* `nil`) - The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.
25+
* `prebuiltRule` (*type:* `String.t`, *default:* `nil`) - The prebuilt rule name that can convert a specific type of raw_json. For example: "ga4_bq" rule for the GA4 user event schema.
26+
* `rawJson` (*type:* `String.t`, *default:* `nil`) - 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.
27+
* `uri` (*type:* `String.t`, *default:* `nil`) - 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.
28+
* `userEvent` (*type:* `String.t`, *default:* `nil`) - Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.
29+
"""
30+
31+
use GoogleApi.Gax.ModelBase
32+
33+
@type t :: %__MODULE__{
34+
:ets => String.t() | nil,
35+
:prebuiltRule => String.t() | nil,
36+
:rawJson => String.t() | nil,
37+
:uri => String.t() | nil,
38+
:userEvent => String.t() | nil
39+
}
40+
41+
field(:ets)
42+
field(:prebuiltRule)
43+
field(:rawJson)
44+
field(:uri)
45+
field(:userEvent)
46+
end
47+
48+
defimpl Poison.Decoder, for: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2CollectUserEventRequest do
49+
def decode(value, options) do
50+
GoogleApi.Retail.V2.Model.GoogleCloudRetailV2CollectUserEventRequest.decode(value, options)
51+
end
52+
end
53+
54+
defimpl Poison.Encoder, for: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2CollectUserEventRequest do
55+
def encode(value, options) do
56+
GoogleApi.Gax.ModelBase.encode(value, options)
57+
end
58+
end

clients/retail/mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
defmodule GoogleApi.Retail.Mixfile do
1919
use Mix.Project
2020

21-
@version "0.19.1"
21+
@version "0.20.0"
2222

2323
def project() do
2424
[

0 commit comments

Comments
 (0)