Skip to content

Commit 7951615

Browse files
feat: Automated regeneration of AndroidEnterprise client (googleapis#12829)
Auto-created at 2025-01-16 13:11:46 +0000 using the toys pull request generator.
1 parent 381becc commit 7951615

File tree

3 files changed

+100
-73
lines changed

3 files changed

+100
-73
lines changed
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
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.Api.EnrollmentTokens do
19+
@moduledoc """
20+
API calls for all endpoints tagged `EnrollmentTokens`.
21+
"""
22+
23+
alias GoogleApi.AndroidEnterprise.V1.Connection
24+
alias GoogleApi.Gax.{Request, Response}
25+
26+
@library_version Mix.Project.config() |> Keyword.get(:version, "")
27+
28+
@doc """
29+
Returns a token for device enrollment. The DPC can encode this token within the QR/NFC/zero-touch enrollment payload or fetch it before calling the on-device API to authenticate the user. The token can be generated for each device or reused across multiple devices.
30+
31+
## Parameters
32+
33+
* `connection` (*type:* `GoogleApi.AndroidEnterprise.V1.Connection.t`) - Connection to server
34+
* `enterprise_id` (*type:* `String.t`) - Required. The ID of the enterprise.
35+
* `optional_params` (*type:* `keyword()`) - Optional parameters
36+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
37+
* `:access_token` (*type:* `String.t`) - OAuth access token.
38+
* `:alt` (*type:* `String.t`) - Data format for response.
39+
* `:callback` (*type:* `String.t`) - JSONP
40+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
41+
* `: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.
42+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
43+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
44+
* `: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.
45+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
46+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
47+
* `:body` (*type:* `GoogleApi.AndroidEnterprise.V1.Model.EnrollmentToken.t`) -
48+
* `opts` (*type:* `keyword()`) - Call options
49+
50+
## Returns
51+
52+
* `{:ok, %GoogleApi.AndroidEnterprise.V1.Model.EnrollmentToken{}}` on success
53+
* `{:error, info}` on failure
54+
"""
55+
@spec androidenterprise_enrollment_tokens_create(
56+
Tesla.Env.client(),
57+
String.t(),
58+
keyword(),
59+
keyword()
60+
) ::
61+
{:ok, GoogleApi.AndroidEnterprise.V1.Model.EnrollmentToken.t()}
62+
| {:ok, Tesla.Env.t()}
63+
| {:ok, list()}
64+
| {:error, any()}
65+
def androidenterprise_enrollment_tokens_create(
66+
connection,
67+
enterprise_id,
68+
optional_params \\ [],
69+
opts \\ []
70+
) do
71+
optional_params_config = %{
72+
:"$.xgafv" => :query,
73+
:access_token => :query,
74+
:alt => :query,
75+
:callback => :query,
76+
:fields => :query,
77+
:key => :query,
78+
:oauth_token => :query,
79+
:prettyPrint => :query,
80+
:quotaUser => :query,
81+
:uploadType => :query,
82+
:upload_protocol => :query,
83+
:body => :body
84+
}
85+
86+
request =
87+
Request.new()
88+
|> Request.method(:post)
89+
|> Request.url("/androidenterprise/v1/enterprises/{enterpriseId}/enrollmentTokens", %{
90+
"enterpriseId" => URI.encode(enterprise_id, &URI.char_unreserved?/1)
91+
})
92+
|> Request.add_optional_params(optional_params_config, optional_params)
93+
|> Request.library_version(@library_version)
94+
95+
connection
96+
|> Connection.execute(request)
97+
|> Response.decode(opts ++ [struct: %GoogleApi.AndroidEnterprise.V1.Model.EnrollmentToken{}])
98+
end
99+
end

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

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -149,78 +149,6 @@ defmodule GoogleApi.AndroidEnterprise.V1.Api.Enterprises do
149149
|> Response.decode(opts ++ [struct: %GoogleApi.AndroidEnterprise.V1.Model.Enterprise{}])
150150
end
151151

152-
@doc """
153-
Returns a token for device enrollment. The DPC can encode this token within the QR/NFC/zero-touch enrollment payload or fetch it before calling the on-device API to authenticate the user. The token can be generated for each device or reused across multiple devices.
154-
155-
## Parameters
156-
157-
* `connection` (*type:* `GoogleApi.AndroidEnterprise.V1.Connection.t`) - Connection to server
158-
* `enterprise_id` (*type:* `String.t`) - Required. The ID of the enterprise.
159-
* `optional_params` (*type:* `keyword()`) - Optional parameters
160-
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
161-
* `:access_token` (*type:* `String.t`) - OAuth access token.
162-
* `:alt` (*type:* `String.t`) - Data format for response.
163-
* `:callback` (*type:* `String.t`) - JSONP
164-
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
165-
* `: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.
166-
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
167-
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
168-
* `: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.
169-
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
170-
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
171-
* `:body` (*type:* `GoogleApi.AndroidEnterprise.V1.Model.EnrollmentToken.t`) -
172-
* `opts` (*type:* `keyword()`) - Call options
173-
174-
## Returns
175-
176-
* `{:ok, %GoogleApi.AndroidEnterprise.V1.Model.EnrollmentToken{}}` on success
177-
* `{:error, info}` on failure
178-
"""
179-
@spec androidenterprise_enterprises_create_enrollment_token(
180-
Tesla.Env.client(),
181-
String.t(),
182-
keyword(),
183-
keyword()
184-
) ::
185-
{:ok, GoogleApi.AndroidEnterprise.V1.Model.EnrollmentToken.t()}
186-
| {:ok, Tesla.Env.t()}
187-
| {:ok, list()}
188-
| {:error, any()}
189-
def androidenterprise_enterprises_create_enrollment_token(
190-
connection,
191-
enterprise_id,
192-
optional_params \\ [],
193-
opts \\ []
194-
) do
195-
optional_params_config = %{
196-
:"$.xgafv" => :query,
197-
:access_token => :query,
198-
:alt => :query,
199-
:callback => :query,
200-
:fields => :query,
201-
:key => :query,
202-
:oauth_token => :query,
203-
:prettyPrint => :query,
204-
:quotaUser => :query,
205-
:uploadType => :query,
206-
:upload_protocol => :query,
207-
:body => :body
208-
}
209-
210-
request =
211-
Request.new()
212-
|> Request.method(:post)
213-
|> Request.url("/androidenterprise/v1/enterprises/{enterpriseId}/createEnrollmentToken", %{
214-
"enterpriseId" => URI.encode(enterprise_id, &URI.char_unreserved?/1)
215-
})
216-
|> Request.add_optional_params(optional_params_config, optional_params)
217-
|> Request.library_version(@library_version)
218-
219-
connection
220-
|> Connection.execute(request)
221-
|> Response.decode(opts ++ [struct: %GoogleApi.AndroidEnterprise.V1.Model.EnrollmentToken{}])
222-
end
223-
224152
@doc """
225153
Returns a unique token to access an embeddable UI. To generate a web UI, pass the generated token into the managed Google Play javascript API. Each token may only be used to start one UI session. See the JavaScript API documentation for further information.
226154

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 "20250109"
23+
@discovery_revision "20250115"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end

0 commit comments

Comments
 (0)