Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Automated regeneration of Retail client #12748

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clients/retail/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding

```elixir
def deps do
[{:google_api_retail, "~> 0.19"}]
[{:google_api_retail, "~> 0.20"}]
end
```

Expand Down
16 changes: 4 additions & 12 deletions clients/retail/lib/google_api/retail/v2/api/projects.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4304,7 +4304,7 @@ defmodule GoogleApi.Retail.V2.Api.Projects do
end

@doc """
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.
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.

## Parameters

Expand All @@ -4322,11 +4322,7 @@ defmodule GoogleApi.Retail.V2.Api.Projects do
* `: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.
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
* `: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.
* `: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.
* `: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.
* `: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.
* `:userEvent` (*type:* `String.t`) - Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.
* `:body` (*type:* `GoogleApi.Retail.V2.Model.GoogleCloudRetailV2CollectUserEventRequest.t`) -
* `opts` (*type:* `keyword()`) - Call options

## Returns
Expand Down Expand Up @@ -4362,16 +4358,12 @@ defmodule GoogleApi.Retail.V2.Api.Projects do
:quotaUser => :query,
:uploadType => :query,
:upload_protocol => :query,
:ets => :query,
:prebuiltRule => :query,
:rawJson => :query,
:uri => :query,
:userEvent => :query
:body => :body
}

request =
Request.new()
|> Request.method(:get)
|> Request.method(:post)
|> Request.url("/v2/{+parent}/userEvents:collect", %{
"parent" => URI.encode(parent, &URI.char_unreserved?/1)
})
Expand Down
2 changes: 1 addition & 1 deletion clients/retail/lib/google_api/retail/v2/metadata.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.Retail.V2 do
API client metadata for GoogleApi.Retail.V2.
"""

@discovery_revision "20241205"
@discovery_revision "20241220"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Copyright 2019 Google LLC
#
# 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.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Retail.V2.Model.GoogleCloudRetailV2CollectUserEventRequest do
@moduledoc """
Request message for CollectUserEvent method.

## Attributes

* `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.
* `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.
* `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.
* `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.
* `userEvent` (*type:* `String.t`, *default:* `nil`) - Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:ets => String.t() | nil,
:prebuiltRule => String.t() | nil,
:rawJson => String.t() | nil,
:uri => String.t() | nil,
:userEvent => String.t() | nil
}

field(:ets)
field(:prebuiltRule)
field(:rawJson)
field(:uri)
field(:userEvent)
end

defimpl Poison.Decoder, for: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2CollectUserEventRequest do
def decode(value, options) do
GoogleApi.Retail.V2.Model.GoogleCloudRetailV2CollectUserEventRequest.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.Retail.V2.Model.GoogleCloudRetailV2CollectUserEventRequest do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
2 changes: 1 addition & 1 deletion clients/retail/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
defmodule GoogleApi.Retail.Mixfile do
use Mix.Project

@version "0.19.1"
@version "0.20.0"

def project() do
[
Expand Down
Loading