Skip to content

Commit ca41a99

Browse files
feat: Automated regeneration of AdSensePlatform client (googleapis#12825)
Auto-created at 2025-01-15 13:15:41 +0000 using the toys pull request generator.
1 parent f9b5b1e commit ca41a99

File tree

5 files changed

+224
-1
lines changed

5 files changed

+224
-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
@@ -241,4 +241,80 @@ defmodule GoogleApi.AdSensePlatform.V1alpha.Api.Accounts do
241241
opts ++ [struct: %GoogleApi.AdSensePlatform.V1alpha.Model.ListPlatformChildSitesResponse{}]
242242
)
243243
end
244+
245+
@doc """
246+
Lists Platform Groups for a specified Platform.
247+
248+
## Parameters
249+
250+
* `connection` (*type:* `GoogleApi.AdSensePlatform.V1alpha.Connection.t`) - Connection to server
251+
* `parent` (*type:* `String.t`) - Required. The name of the platform to retrieve. Format: accounts/{account}/platforms/{platform}
252+
* `optional_params` (*type:* `keyword()`) - Optional parameters
253+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
254+
* `:access_token` (*type:* `String.t`) - OAuth access token.
255+
* `:alt` (*type:* `String.t`) - Data format for response.
256+
* `:callback` (*type:* `String.t`) - JSONP
257+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
258+
* `: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.
259+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
260+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
261+
* `: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.
262+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
263+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
264+
* `:pageSize` (*type:* `integer()`) - Optional. The maximum number of groups to include in the response, used for paging. If unspecified, at most 10000 groups will be returned. The maximum value is 10000; values above 10000 will be coerced to 10000.
265+
* `:pageToken` (*type:* `String.t`) - Optional. A page token, received from a previous `ListPlatformGroups` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPlatformGroups` must match the call that provided the page token.
266+
* `opts` (*type:* `keyword()`) - Call options
267+
268+
## Returns
269+
270+
* `{:ok, %GoogleApi.AdSensePlatform.V1alpha.Model.ListPlatformGroupsResponse{}}` on success
271+
* `{:error, info}` on failure
272+
"""
273+
@spec adsenseplatform_accounts_platforms_groups_list(
274+
Tesla.Env.client(),
275+
String.t(),
276+
keyword(),
277+
keyword()
278+
) ::
279+
{:ok, GoogleApi.AdSensePlatform.V1alpha.Model.ListPlatformGroupsResponse.t()}
280+
| {:ok, Tesla.Env.t()}
281+
| {:ok, list()}
282+
| {:error, any()}
283+
def adsenseplatform_accounts_platforms_groups_list(
284+
connection,
285+
parent,
286+
optional_params \\ [],
287+
opts \\ []
288+
) do
289+
optional_params_config = %{
290+
:"$.xgafv" => :query,
291+
:access_token => :query,
292+
:alt => :query,
293+
:callback => :query,
294+
:fields => :query,
295+
:key => :query,
296+
:oauth_token => :query,
297+
:prettyPrint => :query,
298+
:quotaUser => :query,
299+
:uploadType => :query,
300+
:upload_protocol => :query,
301+
:pageSize => :query,
302+
:pageToken => :query
303+
}
304+
305+
request =
306+
Request.new()
307+
|> Request.method(:get)
308+
|> Request.url("/v1alpha/{+parent}/groups", %{
309+
"parent" => URI.encode(parent, &URI.char_unreserved?/1)
310+
})
311+
|> Request.add_optional_params(optional_params_config, optional_params)
312+
|> Request.library_version(@library_version)
313+
314+
connection
315+
|> Connection.execute(request)
316+
|> Response.decode(
317+
opts ++ [struct: %GoogleApi.AdSensePlatform.V1alpha.Model.ListPlatformGroupsResponse{}]
318+
)
319+
end
244320
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 "20250114"
23+
@discovery_revision "20250115"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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.Decimal do
19+
@moduledoc """
20+
A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's [BigDecimal](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html) or Python's [decimal.Decimal](https://docs.python.org/3/library/decimal.html).
21+
22+
## Attributes
23+
24+
* `value` (*type:* `String.t`, *default:* `nil`) - The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits ("the integer"), optionally followed by a fraction, optionally followed by an exponent. An empty string **should** be interpreted as `0`. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services **should** normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). - Coercing the exponent character to upper-case, with explicit sign (`2.5e8` -> `2.5E+8`). - Removing an explicitly-provided zero exponent (`2.5E0` -> `2.5`). Services **may** perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5E-1` <-> `0.25`). Additionally, services **may** preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` **should not** be supported regardless of locale. Additionally, thousand separators **should not** be supported. If a service does support them, values **must** be normalized. The ENBF grammar is: DecimalString = '' | [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits '.' | [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services **should** clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services **may** choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and **should** round the value to fit the supported scale. Alternatively, the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if precision would be lost. Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service receives a value outside of the supported range.
25+
"""
26+
27+
use GoogleApi.Gax.ModelBase
28+
29+
@type t :: %__MODULE__{
30+
:value => String.t() | nil
31+
}
32+
33+
field(:value)
34+
end
35+
36+
defimpl Poison.Decoder, for: GoogleApi.AdSensePlatform.V1alpha.Model.Decimal do
37+
def decode(value, options) do
38+
GoogleApi.AdSensePlatform.V1alpha.Model.Decimal.decode(value, options)
39+
end
40+
end
41+
42+
defimpl Poison.Encoder, for: GoogleApi.AdSensePlatform.V1alpha.Model.Decimal do
43+
def encode(value, options) do
44+
GoogleApi.Gax.ModelBase.encode(value, options)
45+
end
46+
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.ListPlatformGroupsResponse do
19+
@moduledoc """
20+
Response definition for the platform groups 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+
* `platformGroups` (*type:* `list(GoogleApi.AdSensePlatform.V1alpha.Model.PlatformGroup.t)`, *default:* `nil`) - The platform groups returned in this list response.
26+
"""
27+
28+
use GoogleApi.Gax.ModelBase
29+
30+
@type t :: %__MODULE__{
31+
:nextPageToken => String.t() | nil,
32+
:platformGroups => list(GoogleApi.AdSensePlatform.V1alpha.Model.PlatformGroup.t()) | nil
33+
}
34+
35+
field(:nextPageToken)
36+
field(:platformGroups, as: GoogleApi.AdSensePlatform.V1alpha.Model.PlatformGroup, type: :list)
37+
end
38+
39+
defimpl Poison.Decoder, for: GoogleApi.AdSensePlatform.V1alpha.Model.ListPlatformGroupsResponse do
40+
def decode(value, options) do
41+
GoogleApi.AdSensePlatform.V1alpha.Model.ListPlatformGroupsResponse.decode(value, options)
42+
end
43+
end
44+
45+
defimpl Poison.Encoder, for: GoogleApi.AdSensePlatform.V1alpha.Model.ListPlatformGroupsResponse do
46+
def encode(value, options) do
47+
GoogleApi.Gax.ModelBase.encode(value, options)
48+
end
49+
end
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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.PlatformGroup do
19+
@moduledoc """
20+
Representation of a Transparent Platform Group.
21+
22+
## Attributes
23+
24+
* `description` (*type:* `String.t`, *default:* `nil`) - Output only. Description of the PlatformGroup.
25+
* `name` (*type:* `String.t`, *default:* `nil`) - Identifier. Format: accounts/{account}/platforms/{platform}/groups/{platform_group}
26+
* `revshareMillipercent` (*type:* `GoogleApi.AdSensePlatform.V1alpha.Model.Decimal.t`, *default:* `nil`) - The revenue share of the PlatformGroup, in millipercent (e.g. 15000 = 15%).
27+
"""
28+
29+
use GoogleApi.Gax.ModelBase
30+
31+
@type t :: %__MODULE__{
32+
:description => String.t() | nil,
33+
:name => String.t() | nil,
34+
:revshareMillipercent => GoogleApi.AdSensePlatform.V1alpha.Model.Decimal.t() | nil
35+
}
36+
37+
field(:description)
38+
field(:name)
39+
field(:revshareMillipercent, as: GoogleApi.AdSensePlatform.V1alpha.Model.Decimal)
40+
end
41+
42+
defimpl Poison.Decoder, for: GoogleApi.AdSensePlatform.V1alpha.Model.PlatformGroup do
43+
def decode(value, options) do
44+
GoogleApi.AdSensePlatform.V1alpha.Model.PlatformGroup.decode(value, options)
45+
end
46+
end
47+
48+
defimpl Poison.Encoder, for: GoogleApi.AdSensePlatform.V1alpha.Model.PlatformGroup do
49+
def encode(value, options) do
50+
GoogleApi.Gax.ModelBase.encode(value, options)
51+
end
52+
end

0 commit comments

Comments
 (0)