Skip to content

Commit 5871ce9

Browse files
feat: Automated regeneration of AndroidManagement client (googleapis#13071)
Auto-created at 2025-03-04 13:11:27 +0000 using the toys pull request generator.
1 parent de9dded commit 5871ce9

File tree

4 files changed

+181
-1
lines changed

4 files changed

+181
-1
lines changed

clients/android_management/lib/google_api/android_management/v1/api/enterprises.ex

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,81 @@ defmodule GoogleApi.AndroidManagement.V1.Api.Enterprises do
152152
|> Response.decode(opts ++ [struct: %GoogleApi.AndroidManagement.V1.Model.Empty{}])
153153
end
154154

155+
@doc """
156+
Generates an enterprise upgrade URL to upgrade an existing managed Google Play Accounts enterprise to a managed Google domain.Note: This feature is not generally available.
157+
158+
## Parameters
159+
160+
* `connection` (*type:* `GoogleApi.AndroidManagement.V1.Connection.t`) - Connection to server
161+
* `name` (*type:* `String.t`) - Required. The name of the enterprise to be upgraded in the form enterprises/{enterpriseId}.
162+
* `optional_params` (*type:* `keyword()`) - Optional parameters
163+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
164+
* `:access_token` (*type:* `String.t`) - OAuth access token.
165+
* `:alt` (*type:* `String.t`) - Data format for response.
166+
* `:callback` (*type:* `String.t`) - JSONP
167+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
168+
* `: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.
169+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
170+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
171+
* `: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.
172+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
173+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
174+
* `:body` (*type:* `GoogleApi.AndroidManagement.V1.Model.GenerateEnterpriseUpgradeUrlRequest.t`) -
175+
* `opts` (*type:* `keyword()`) - Call options
176+
177+
## Returns
178+
179+
* `{:ok, %GoogleApi.AndroidManagement.V1.Model.GenerateEnterpriseUpgradeUrlResponse{}}` on success
180+
* `{:error, info}` on failure
181+
"""
182+
@spec androidmanagement_enterprises_generate_enterprise_upgrade_url(
183+
Tesla.Env.client(),
184+
String.t(),
185+
keyword(),
186+
keyword()
187+
) ::
188+
{:ok, GoogleApi.AndroidManagement.V1.Model.GenerateEnterpriseUpgradeUrlResponse.t()}
189+
| {:ok, Tesla.Env.t()}
190+
| {:ok, list()}
191+
| {:error, any()}
192+
def androidmanagement_enterprises_generate_enterprise_upgrade_url(
193+
connection,
194+
name,
195+
optional_params \\ [],
196+
opts \\ []
197+
) do
198+
optional_params_config = %{
199+
:"$.xgafv" => :query,
200+
:access_token => :query,
201+
:alt => :query,
202+
:callback => :query,
203+
:fields => :query,
204+
:key => :query,
205+
:oauth_token => :query,
206+
:prettyPrint => :query,
207+
:quotaUser => :query,
208+
:uploadType => :query,
209+
:upload_protocol => :query,
210+
:body => :body
211+
}
212+
213+
request =
214+
Request.new()
215+
|> Request.method(:post)
216+
|> Request.url("/v1/{+name}:generateEnterpriseUpgradeUrl", %{
217+
"name" => URI.encode(name, &URI.char_unreserved?/1)
218+
})
219+
|> Request.add_optional_params(optional_params_config, optional_params)
220+
|> Request.library_version(@library_version)
221+
222+
connection
223+
|> Connection.execute(request)
224+
|> Response.decode(
225+
opts ++
226+
[struct: %GoogleApi.AndroidManagement.V1.Model.GenerateEnterpriseUpgradeUrlResponse{}]
227+
)
228+
end
229+
155230
@doc """
156231
Gets an enterprise.
157232

clients/android_management/lib/google_api/android_management/v1/metadata.ex

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

23-
@discovery_revision "20250213"
23+
@discovery_revision "20250303"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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.AndroidManagement.V1.Model.GenerateEnterpriseUpgradeUrlRequest do
19+
@moduledoc """
20+
Request message for generating a URL to upgrade an existing managed Google Play Accounts enterprise to a managed Google domain.Note: This feature is not generally available.
21+
22+
## Attributes
23+
24+
* `adminEmail` (*type:* `String.t`, *default:* `nil`) - Optional. Email address used to prefill the admin field of the enterprise signup form as part of the upgrade process. This value is a hint only and can be altered by the user. Personal email addresses are not allowed. If allowedDomains is non-empty then this must belong to one of the allowedDomains.
25+
* `allowedDomains` (*type:* `list(String.t)`, *default:* `nil`) - Optional. A list of domains that are permitted for the admin email. The IT admin cannot enter an email address with a domain name that is not in this list. Subdomains of domains in this list are not allowed but can be allowed by adding a second entry which has *. prefixed to the domain name (e.g. *.example.com). If the field is not present or is an empty list then the IT admin is free to use any valid domain name. Personal email domains are not allowed.
26+
"""
27+
28+
use GoogleApi.Gax.ModelBase
29+
30+
@type t :: %__MODULE__{
31+
:adminEmail => String.t() | nil,
32+
:allowedDomains => list(String.t()) | nil
33+
}
34+
35+
field(:adminEmail)
36+
field(:allowedDomains, type: :list)
37+
end
38+
39+
defimpl Poison.Decoder,
40+
for: GoogleApi.AndroidManagement.V1.Model.GenerateEnterpriseUpgradeUrlRequest do
41+
def decode(value, options) do
42+
GoogleApi.AndroidManagement.V1.Model.GenerateEnterpriseUpgradeUrlRequest.decode(
43+
value,
44+
options
45+
)
46+
end
47+
end
48+
49+
defimpl Poison.Encoder,
50+
for: GoogleApi.AndroidManagement.V1.Model.GenerateEnterpriseUpgradeUrlRequest do
51+
def encode(value, options) do
52+
GoogleApi.Gax.ModelBase.encode(value, options)
53+
end
54+
end
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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.AndroidManagement.V1.Model.GenerateEnterpriseUpgradeUrlResponse do
19+
@moduledoc """
20+
Response message for generating a URL to upgrade an existing managed Google Play Accounts enterprise to a managed Google domain.Note: This feature is not generally available.
21+
22+
## Attributes
23+
24+
* `url` (*type:* `String.t`, *default:* `nil`) - A URL for an enterprise admin to upgrade their enterprise. The page can't be rendered in an iframe.
25+
"""
26+
27+
use GoogleApi.Gax.ModelBase
28+
29+
@type t :: %__MODULE__{
30+
:url => String.t() | nil
31+
}
32+
33+
field(:url)
34+
end
35+
36+
defimpl Poison.Decoder,
37+
for: GoogleApi.AndroidManagement.V1.Model.GenerateEnterpriseUpgradeUrlResponse do
38+
def decode(value, options) do
39+
GoogleApi.AndroidManagement.V1.Model.GenerateEnterpriseUpgradeUrlResponse.decode(
40+
value,
41+
options
42+
)
43+
end
44+
end
45+
46+
defimpl Poison.Encoder,
47+
for: GoogleApi.AndroidManagement.V1.Model.GenerateEnterpriseUpgradeUrlResponse do
48+
def encode(value, options) do
49+
GoogleApi.Gax.ModelBase.encode(value, options)
50+
end
51+
end

0 commit comments

Comments
 (0)