Skip to content

Commit 35e38e9

Browse files
feat: Automated regeneration of AdSensePlatform client (googleapis#12787)
Auto-created at 2025-01-08 13:16:56 +0000 using the toys pull request generator.
1 parent 9bc01b3 commit 35e38e9

File tree

3 files changed

+126
-1
lines changed

3 files changed

+126
-1
lines changed

clients/ad_sense_platform/lib/google_api/ad_sense_platform/v1alpha/api/accounts.ex

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,80 @@ defmodule GoogleApi.AdSensePlatform.V1alpha.Api.Accounts do
8989
|> Connection.execute(request)
9090
|> Response.decode(opts ++ [struct: %GoogleApi.AdSensePlatform.V1alpha.Model.Platform{}])
9191
end
92+
93+
@doc """
94+
Lists platforms for a specified account.
95+
96+
## Parameters
97+
98+
* `connection` (*type:* `GoogleApi.AdSensePlatform.V1alpha.Connection.t`) - Connection to server
99+
* `parent` (*type:* `String.t`) - Required. The account which owns the platforms. Format: accounts/{account}
100+
* `optional_params` (*type:* `keyword()`) - Optional parameters
101+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
102+
* `:access_token` (*type:* `String.t`) - OAuth access token.
103+
* `:alt` (*type:* `String.t`) - Data format for response.
104+
* `:callback` (*type:* `String.t`) - JSONP
105+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
106+
* `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
107+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
108+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
109+
* `: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.
110+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
111+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
112+
* `:pageSize` (*type:* `integer()`) - Optional. The maximum number of platforms to include in the response, used for paging. If unspecified, at most 10000 platforms will be returned. The maximum value is 10000; values above 10000 will be coerced to 10000.
113+
* `:pageToken` (*type:* `String.t`) - Optional. A page token, received from a previous `ListPlatforms` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPlatforms` must match the call that provided the page token.
114+
* `opts` (*type:* `keyword()`) - Call options
115+
116+
## Returns
117+
118+
* `{:ok, %GoogleApi.AdSensePlatform.V1alpha.Model.ListPlatformsResponse{}}` on success
119+
* `{:error, info}` on failure
120+
"""
121+
@spec adsenseplatform_accounts_platforms_list(
122+
Tesla.Env.client(),
123+
String.t(),
124+
keyword(),
125+
keyword()
126+
) ::
127+
{:ok, GoogleApi.AdSensePlatform.V1alpha.Model.ListPlatformsResponse.t()}
128+
| {:ok, Tesla.Env.t()}
129+
| {:ok, list()}
130+
| {:error, any()}
131+
def adsenseplatform_accounts_platforms_list(
132+
connection,
133+
parent,
134+
optional_params \\ [],
135+
opts \\ []
136+
) do
137+
optional_params_config = %{
138+
:"$.xgafv" => :query,
139+
:access_token => :query,
140+
:alt => :query,
141+
:callback => :query,
142+
:fields => :query,
143+
:key => :query,
144+
:oauth_token => :query,
145+
:prettyPrint => :query,
146+
:quotaUser => :query,
147+
:uploadType => :query,
148+
:upload_protocol => :query,
149+
:pageSize => :query,
150+
:pageToken => :query
151+
}
152+
153+
request =
154+
Request.new()
155+
|> Request.method(:get)
156+
|> Request.url("/v1alpha/{+parent}/platforms", %{
157+
"parent" => URI.encode(parent, &URI.char_unreserved?/1)
158+
})
159+
|> Request.add_optional_params(optional_params_config, optional_params)
160+
|> Request.library_version(@library_version)
161+
162+
connection
163+
|> Connection.execute(request)
164+
|> Response.decode(
165+
opts ++ [struct: %GoogleApi.AdSensePlatform.V1alpha.Model.ListPlatformsResponse{}]
166+
)
167+
end
92168
end

clients/ad_sense_platform/lib/google_api/ad_sense_platform/v1alpha/metadata.ex

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

23-
@discovery_revision "20250106"
23+
@discovery_revision "20250108"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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.AdSensePlatform.V1alpha.Model.ListPlatformsResponse do
19+
@moduledoc """
20+
Response definition for the platform list rpc.
21+
22+
## Attributes
23+
24+
* `nextPageToken` (*type:* `String.t`, *default:* `nil`) - Continuation token used to page through platforms. To retrieve the next page of the results, set the next request's "page_token" value to this.
25+
* `platforms` (*type:* `list(GoogleApi.AdSensePlatform.V1alpha.Model.Platform.t)`, *default:* `nil`) - The platforms returned in this list response.
26+
"""
27+
28+
use GoogleApi.Gax.ModelBase
29+
30+
@type t :: %__MODULE__{
31+
:nextPageToken => String.t() | nil,
32+
:platforms => list(GoogleApi.AdSensePlatform.V1alpha.Model.Platform.t()) | nil
33+
}
34+
35+
field(:nextPageToken)
36+
field(:platforms, as: GoogleApi.AdSensePlatform.V1alpha.Model.Platform, type: :list)
37+
end
38+
39+
defimpl Poison.Decoder, for: GoogleApi.AdSensePlatform.V1alpha.Model.ListPlatformsResponse do
40+
def decode(value, options) do
41+
GoogleApi.AdSensePlatform.V1alpha.Model.ListPlatformsResponse.decode(value, options)
42+
end
43+
end
44+
45+
defimpl Poison.Encoder, for: GoogleApi.AdSensePlatform.V1alpha.Model.ListPlatformsResponse do
46+
def encode(value, options) do
47+
GoogleApi.Gax.ModelBase.encode(value, options)
48+
end
49+
end

0 commit comments

Comments
 (0)