Skip to content

Commit b723645

Browse files
feat: Automated regeneration of AndroidEnterprise client (googleapis#13072)
Auto-created at 2025-03-04 13:11:49 +0000 using the toys pull request generator.
1 parent bd87a2c commit b723645

File tree

5 files changed

+182
-1
lines changed

5 files changed

+182
-1
lines changed

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

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,86 @@ defmodule GoogleApi.AndroidEnterprise.V1.Api.Enterprises do
284284
|> Response.decode(opts ++ [struct: %GoogleApi.AndroidEnterprise.V1.Model.Enterprise{}])
285285
end
286286

287+
@doc """
288+
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.
289+
290+
## Parameters
291+
292+
* `connection` (*type:* `GoogleApi.AndroidEnterprise.V1.Connection.t`) - Connection to server
293+
* `enterprise_id` (*type:* `String.t`) - Required. The ID of the enterprise.
294+
* `optional_params` (*type:* `keyword()`) - Optional parameters
295+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
296+
* `:access_token` (*type:* `String.t`) - OAuth access token.
297+
* `:alt` (*type:* `String.t`) - Data format for response.
298+
* `:callback` (*type:* `String.t`) - JSONP
299+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
300+
* `: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.
301+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
302+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
303+
* `: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.
304+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
305+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
306+
* `:adminEmail` (*type:* `String.t`) - 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`.
307+
* `:allowedDomains` (*type:* `list(String.t)`) - 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.
308+
* `opts` (*type:* `keyword()`) - Call options
309+
310+
## Returns
311+
312+
* `{:ok, %GoogleApi.AndroidEnterprise.V1.Model.GenerateEnterpriseUpgradeUrlResponse{}}` on success
313+
* `{:error, info}` on failure
314+
"""
315+
@spec androidenterprise_enterprises_generate_enterprise_upgrade_url(
316+
Tesla.Env.client(),
317+
String.t(),
318+
keyword(),
319+
keyword()
320+
) ::
321+
{:ok, GoogleApi.AndroidEnterprise.V1.Model.GenerateEnterpriseUpgradeUrlResponse.t()}
322+
| {:ok, Tesla.Env.t()}
323+
| {:ok, list()}
324+
| {:error, any()}
325+
def androidenterprise_enterprises_generate_enterprise_upgrade_url(
326+
connection,
327+
enterprise_id,
328+
optional_params \\ [],
329+
opts \\ []
330+
) do
331+
optional_params_config = %{
332+
:"$.xgafv" => :query,
333+
:access_token => :query,
334+
:alt => :query,
335+
:callback => :query,
336+
:fields => :query,
337+
:key => :query,
338+
:oauth_token => :query,
339+
:prettyPrint => :query,
340+
:quotaUser => :query,
341+
:uploadType => :query,
342+
:upload_protocol => :query,
343+
:adminEmail => :query,
344+
:allowedDomains => :query
345+
}
346+
347+
request =
348+
Request.new()
349+
|> Request.method(:post)
350+
|> Request.url(
351+
"/androidenterprise/v1/enterprises/{enterpriseId}/generateEnterpriseUpgradeUrl",
352+
%{
353+
"enterpriseId" => URI.encode(enterprise_id, &URI.char_unreserved?/1)
354+
}
355+
)
356+
|> Request.add_optional_params(optional_params_config, optional_params)
357+
|> Request.library_version(@library_version)
358+
359+
connection
360+
|> Connection.execute(request)
361+
|> Response.decode(
362+
opts ++
363+
[struct: %GoogleApi.AndroidEnterprise.V1.Model.GenerateEnterpriseUpgradeUrlResponse{}]
364+
)
365+
end
366+
287367
@doc """
288368
Generates a sign-up URL.
289369

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

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

23-
@discovery_revision "20250213"
23+
@discovery_revision "20250302"
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.AndroidEnterprise.V1.Model.EnterpriseUpgradeEvent do
19+
@moduledoc """
20+
An event generated when an enterprise is upgraded. **Note:** This feature is not generally available.
21+
22+
## Attributes
23+
24+
* `upgradeState` (*type:* `String.t`, *default:* `nil`) - The upgrade state.
25+
"""
26+
27+
use GoogleApi.Gax.ModelBase
28+
29+
@type t :: %__MODULE__{
30+
:upgradeState => String.t() | nil
31+
}
32+
33+
field(:upgradeState)
34+
end
35+
36+
defimpl Poison.Decoder, for: GoogleApi.AndroidEnterprise.V1.Model.EnterpriseUpgradeEvent do
37+
def decode(value, options) do
38+
GoogleApi.AndroidEnterprise.V1.Model.EnterpriseUpgradeEvent.decode(value, options)
39+
end
40+
end
41+
42+
defimpl Poison.Encoder, for: GoogleApi.AndroidEnterprise.V1.Model.EnterpriseUpgradeEvent do
43+
def encode(value, options) do
44+
GoogleApi.Gax.ModelBase.encode(value, options)
45+
end
46+
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.AndroidEnterprise.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.AndroidEnterprise.V1.Model.GenerateEnterpriseUpgradeUrlResponse do
38+
def decode(value, options) do
39+
GoogleApi.AndroidEnterprise.V1.Model.GenerateEnterpriseUpgradeUrlResponse.decode(
40+
value,
41+
options
42+
)
43+
end
44+
end
45+
46+
defimpl Poison.Encoder,
47+
for: GoogleApi.AndroidEnterprise.V1.Model.GenerateEnterpriseUpgradeUrlResponse do
48+
def encode(value, options) do
49+
GoogleApi.Gax.ModelBase.encode(value, options)
50+
end
51+
end

clients/android_enterprise/lib/google_api/android_enterprise/v1/model/notification.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ defmodule GoogleApi.AndroidEnterprise.V1.Model.Notification do
2525
* `appUpdateEvent` (*type:* `GoogleApi.AndroidEnterprise.V1.Model.AppUpdateEvent.t`, *default:* `nil`) - Notifications about app updates.
2626
* `deviceReportUpdateEvent` (*type:* `GoogleApi.AndroidEnterprise.V1.Model.DeviceReportUpdateEvent.t`, *default:* `nil`) - Notifications about device report updates.
2727
* `enterpriseId` (*type:* `String.t`, *default:* `nil`) - The ID of the enterprise for which the notification is sent. This will always be present.
28+
* `enterpriseUpgradeEvent` (*type:* `GoogleApi.AndroidEnterprise.V1.Model.EnterpriseUpgradeEvent.t`, *default:* `nil`) - Notifications about enterprise upgrade. **Note:** This feature is not generally available.
2829
* `installFailureEvent` (*type:* `GoogleApi.AndroidEnterprise.V1.Model.InstallFailureEvent.t`, *default:* `nil`) - Notifications about an app installation failure.
2930
* `newDeviceEvent` (*type:* `GoogleApi.AndroidEnterprise.V1.Model.NewDeviceEvent.t`, *default:* `nil`) - Notifications about new devices.
3031
* `newPermissionsEvent` (*type:* `GoogleApi.AndroidEnterprise.V1.Model.NewPermissionsEvent.t`, *default:* `nil`) - Notifications about new app permissions.
@@ -43,6 +44,8 @@ defmodule GoogleApi.AndroidEnterprise.V1.Model.Notification do
4344
:deviceReportUpdateEvent =>
4445
GoogleApi.AndroidEnterprise.V1.Model.DeviceReportUpdateEvent.t() | nil,
4546
:enterpriseId => String.t() | nil,
47+
:enterpriseUpgradeEvent =>
48+
GoogleApi.AndroidEnterprise.V1.Model.EnterpriseUpgradeEvent.t() | nil,
4649
:installFailureEvent =>
4750
GoogleApi.AndroidEnterprise.V1.Model.InstallFailureEvent.t() | nil,
4851
:newDeviceEvent => GoogleApi.AndroidEnterprise.V1.Model.NewDeviceEvent.t() | nil,
@@ -65,6 +68,7 @@ defmodule GoogleApi.AndroidEnterprise.V1.Model.Notification do
6568
field(:deviceReportUpdateEvent, as: GoogleApi.AndroidEnterprise.V1.Model.DeviceReportUpdateEvent)
6669

6770
field(:enterpriseId)
71+
field(:enterpriseUpgradeEvent, as: GoogleApi.AndroidEnterprise.V1.Model.EnterpriseUpgradeEvent)
6872
field(:installFailureEvent, as: GoogleApi.AndroidEnterprise.V1.Model.InstallFailureEvent)
6973
field(:newDeviceEvent, as: GoogleApi.AndroidEnterprise.V1.Model.NewDeviceEvent)
7074
field(:newPermissionsEvent, as: GoogleApi.AndroidEnterprise.V1.Model.NewPermissionsEvent)

0 commit comments

Comments
 (0)