google-apis-androidmanagement_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,977 @@
1
+ # Copyright 2020 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
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module AndroidmanagementV1
23
+ # Android Management API
24
+ #
25
+ # The Android Management API provides remote enterprise management of Android
26
+ # devices and apps.
27
+ #
28
+ # @example
29
+ # require 'google/apis/androidmanagement_v1'
30
+ #
31
+ # Androidmanagement = Google::Apis::AndroidmanagementV1 # Alias the module
32
+ # service = Androidmanagement::AndroidManagementService.new
33
+ #
34
+ # @see https://developers.google.com/android/management
35
+ class AndroidManagementService < Google::Apis::Core::BaseService
36
+ # @return [String]
37
+ # API key. Your API key identifies your project and provides you with API access,
38
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
39
+ attr_accessor :key
40
+
41
+ # @return [String]
42
+ # Available to use for quota purposes for server-side applications. Can be any
43
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
44
+ attr_accessor :quota_user
45
+
46
+ def initialize
47
+ super('https://androidmanagement.googleapis.com/', '',
48
+ client_name: 'google-apis-androidmanagement_v1',
49
+ client_version: Google::Apis::AndroidmanagementV1::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Creates an enterprise. This is the last step in the enterprise signup flow.
54
+ # @param [Google::Apis::AndroidmanagementV1::Enterprise] enterprise_object
55
+ # @param [String] enterprise_token
56
+ # The enterprise token appended to the callback URL.
57
+ # @param [String] project_id
58
+ # The ID of the Google Cloud Platform project which will own the enterprise.
59
+ # @param [String] signup_url_name
60
+ # The name of the SignupUrl used to sign up for the enterprise.
61
+ # @param [String] fields
62
+ # Selector specifying which fields to include in a partial response.
63
+ # @param [String] quota_user
64
+ # Available to use for quota purposes for server-side applications. Can be any
65
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
66
+ # @param [Google::Apis::RequestOptions] options
67
+ # Request-specific options
68
+ #
69
+ # @yield [result, err] Result & error if block supplied
70
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::Enterprise] parsed result object
71
+ # @yieldparam err [StandardError] error object if request failed
72
+ #
73
+ # @return [Google::Apis::AndroidmanagementV1::Enterprise]
74
+ #
75
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
76
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
77
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
78
+ def create_enterprise(enterprise_object = nil, enterprise_token: nil, project_id: nil, signup_url_name: nil, fields: nil, quota_user: nil, options: nil, &block)
79
+ command = make_simple_command(:post, 'v1/enterprises', options)
80
+ command.request_representation = Google::Apis::AndroidmanagementV1::Enterprise::Representation
81
+ command.request_object = enterprise_object
82
+ command.response_representation = Google::Apis::AndroidmanagementV1::Enterprise::Representation
83
+ command.response_class = Google::Apis::AndroidmanagementV1::Enterprise
84
+ command.query['enterpriseToken'] = enterprise_token unless enterprise_token.nil?
85
+ command.query['projectId'] = project_id unless project_id.nil?
86
+ command.query['signupUrlName'] = signup_url_name unless signup_url_name.nil?
87
+ command.query['fields'] = fields unless fields.nil?
88
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
89
+ execute_or_queue_command(command, &block)
90
+ end
91
+
92
+ # Gets an enterprise.
93
+ # @param [String] name
94
+ # The name of the enterprise in the form enterprises/`enterpriseId`.
95
+ # @param [String] fields
96
+ # Selector specifying which fields to include in a partial response.
97
+ # @param [String] quota_user
98
+ # Available to use for quota purposes for server-side applications. Can be any
99
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
100
+ # @param [Google::Apis::RequestOptions] options
101
+ # Request-specific options
102
+ #
103
+ # @yield [result, err] Result & error if block supplied
104
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::Enterprise] parsed result object
105
+ # @yieldparam err [StandardError] error object if request failed
106
+ #
107
+ # @return [Google::Apis::AndroidmanagementV1::Enterprise]
108
+ #
109
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
110
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
111
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
112
+ def get_enterprise(name, fields: nil, quota_user: nil, options: nil, &block)
113
+ command = make_simple_command(:get, 'v1/{+name}', options)
114
+ command.response_representation = Google::Apis::AndroidmanagementV1::Enterprise::Representation
115
+ command.response_class = Google::Apis::AndroidmanagementV1::Enterprise
116
+ command.params['name'] = name unless name.nil?
117
+ command.query['fields'] = fields unless fields.nil?
118
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
119
+ execute_or_queue_command(command, &block)
120
+ end
121
+
122
+ # Updates an enterprise.
123
+ # @param [String] name
124
+ # The name of the enterprise in the form enterprises/`enterpriseId`.
125
+ # @param [Google::Apis::AndroidmanagementV1::Enterprise] enterprise_object
126
+ # @param [String] update_mask
127
+ # The field mask indicating the fields to update. If not set, all modifiable
128
+ # fields will be modified.
129
+ # @param [String] fields
130
+ # Selector specifying which fields to include in a partial response.
131
+ # @param [String] quota_user
132
+ # Available to use for quota purposes for server-side applications. Can be any
133
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
134
+ # @param [Google::Apis::RequestOptions] options
135
+ # Request-specific options
136
+ #
137
+ # @yield [result, err] Result & error if block supplied
138
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::Enterprise] parsed result object
139
+ # @yieldparam err [StandardError] error object if request failed
140
+ #
141
+ # @return [Google::Apis::AndroidmanagementV1::Enterprise]
142
+ #
143
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
144
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
145
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
146
+ def patch_enterprise(name, enterprise_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
147
+ command = make_simple_command(:patch, 'v1/{+name}', options)
148
+ command.request_representation = Google::Apis::AndroidmanagementV1::Enterprise::Representation
149
+ command.request_object = enterprise_object
150
+ command.response_representation = Google::Apis::AndroidmanagementV1::Enterprise::Representation
151
+ command.response_class = Google::Apis::AndroidmanagementV1::Enterprise
152
+ command.params['name'] = name unless name.nil?
153
+ command.query['updateMask'] = update_mask unless update_mask.nil?
154
+ command.query['fields'] = fields unless fields.nil?
155
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
156
+ execute_or_queue_command(command, &block)
157
+ end
158
+
159
+ # Gets info about an application.
160
+ # @param [String] name
161
+ # The name of the application in the form enterprises/`enterpriseId`/
162
+ # applications/`package_name`.
163
+ # @param [String] language_code
164
+ # The preferred language for localized application info, as a BCP47 tag (e.g. "
165
+ # en-US", "de"). If not specified the default language of the application will
166
+ # be used.
167
+ # @param [String] fields
168
+ # Selector specifying which fields to include in a partial response.
169
+ # @param [String] quota_user
170
+ # Available to use for quota purposes for server-side applications. Can be any
171
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
172
+ # @param [Google::Apis::RequestOptions] options
173
+ # Request-specific options
174
+ #
175
+ # @yield [result, err] Result & error if block supplied
176
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::Application] parsed result object
177
+ # @yieldparam err [StandardError] error object if request failed
178
+ #
179
+ # @return [Google::Apis::AndroidmanagementV1::Application]
180
+ #
181
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
182
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
183
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
184
+ def get_enterprise_application(name, language_code: nil, fields: nil, quota_user: nil, options: nil, &block)
185
+ command = make_simple_command(:get, 'v1/{+name}', options)
186
+ command.response_representation = Google::Apis::AndroidmanagementV1::Application::Representation
187
+ command.response_class = Google::Apis::AndroidmanagementV1::Application
188
+ command.params['name'] = name unless name.nil?
189
+ command.query['languageCode'] = language_code unless language_code.nil?
190
+ command.query['fields'] = fields unless fields.nil?
191
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
192
+ execute_or_queue_command(command, &block)
193
+ end
194
+
195
+ # Deletes a device. This operation wipes the device.
196
+ # @param [String] name
197
+ # The name of the device in the form enterprises/`enterpriseId`/devices/`
198
+ # deviceId`.
199
+ # @param [Array<String>, String] wipe_data_flags
200
+ # Optional flags that control the device wiping behavior.
201
+ # @param [String] wipe_reason_message
202
+ # Optional. A short message displayed to the user before wiping the work profile
203
+ # on personal devices. This has no effect on company owned devices. The maximum
204
+ # message length is 200 characters.
205
+ # @param [String] fields
206
+ # Selector specifying which fields to include in a partial response.
207
+ # @param [String] quota_user
208
+ # Available to use for quota purposes for server-side applications. Can be any
209
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
210
+ # @param [Google::Apis::RequestOptions] options
211
+ # Request-specific options
212
+ #
213
+ # @yield [result, err] Result & error if block supplied
214
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::Empty] parsed result object
215
+ # @yieldparam err [StandardError] error object if request failed
216
+ #
217
+ # @return [Google::Apis::AndroidmanagementV1::Empty]
218
+ #
219
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
220
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
221
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
222
+ def delete_enterprise_device(name, wipe_data_flags: nil, wipe_reason_message: nil, fields: nil, quota_user: nil, options: nil, &block)
223
+ command = make_simple_command(:delete, 'v1/{+name}', options)
224
+ command.response_representation = Google::Apis::AndroidmanagementV1::Empty::Representation
225
+ command.response_class = Google::Apis::AndroidmanagementV1::Empty
226
+ command.params['name'] = name unless name.nil?
227
+ command.query['wipeDataFlags'] = wipe_data_flags unless wipe_data_flags.nil?
228
+ command.query['wipeReasonMessage'] = wipe_reason_message unless wipe_reason_message.nil?
229
+ command.query['fields'] = fields unless fields.nil?
230
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
231
+ execute_or_queue_command(command, &block)
232
+ end
233
+
234
+ # Gets a device.
235
+ # @param [String] name
236
+ # The name of the device in the form enterprises/`enterpriseId`/devices/`
237
+ # deviceId`.
238
+ # @param [String] fields
239
+ # Selector specifying which fields to include in a partial response.
240
+ # @param [String] quota_user
241
+ # Available to use for quota purposes for server-side applications. Can be any
242
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
243
+ # @param [Google::Apis::RequestOptions] options
244
+ # Request-specific options
245
+ #
246
+ # @yield [result, err] Result & error if block supplied
247
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::Device] parsed result object
248
+ # @yieldparam err [StandardError] error object if request failed
249
+ #
250
+ # @return [Google::Apis::AndroidmanagementV1::Device]
251
+ #
252
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
253
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
254
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
255
+ def get_enterprise_device(name, fields: nil, quota_user: nil, options: nil, &block)
256
+ command = make_simple_command(:get, 'v1/{+name}', options)
257
+ command.response_representation = Google::Apis::AndroidmanagementV1::Device::Representation
258
+ command.response_class = Google::Apis::AndroidmanagementV1::Device
259
+ command.params['name'] = name unless name.nil?
260
+ command.query['fields'] = fields unless fields.nil?
261
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
262
+ execute_or_queue_command(command, &block)
263
+ end
264
+
265
+ # Issues a command to a device. The Operation resource returned contains a
266
+ # Command in its metadata field. Use the get operation method to get the status
267
+ # of the command.
268
+ # @param [String] name
269
+ # The name of the device in the form enterprises/`enterpriseId`/devices/`
270
+ # deviceId`.
271
+ # @param [Google::Apis::AndroidmanagementV1::Command] command_object
272
+ # @param [String] fields
273
+ # Selector specifying which fields to include in a partial response.
274
+ # @param [String] quota_user
275
+ # Available to use for quota purposes for server-side applications. Can be any
276
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
277
+ # @param [Google::Apis::RequestOptions] options
278
+ # Request-specific options
279
+ #
280
+ # @yield [result, err] Result & error if block supplied
281
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::Operation] parsed result object
282
+ # @yieldparam err [StandardError] error object if request failed
283
+ #
284
+ # @return [Google::Apis::AndroidmanagementV1::Operation]
285
+ #
286
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
287
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
288
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
289
+ def issue_enterprise_device_command(name, command_object = nil, fields: nil, quota_user: nil, options: nil, &block)
290
+ command = make_simple_command(:post, 'v1/{+name}:issueCommand', options)
291
+ command.request_representation = Google::Apis::AndroidmanagementV1::Command::Representation
292
+ command.request_object = command_object
293
+ command.response_representation = Google::Apis::AndroidmanagementV1::Operation::Representation
294
+ command.response_class = Google::Apis::AndroidmanagementV1::Operation
295
+ command.params['name'] = name unless name.nil?
296
+ command.query['fields'] = fields unless fields.nil?
297
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
298
+ execute_or_queue_command(command, &block)
299
+ end
300
+
301
+ # Lists devices for a given enterprise.
302
+ # @param [String] parent
303
+ # The name of the enterprise in the form enterprises/`enterpriseId`.
304
+ # @param [Fixnum] page_size
305
+ # The requested page size. The actual page size may be fixed to a min or max
306
+ # value.
307
+ # @param [String] page_token
308
+ # A token identifying a page of results returned by the server.
309
+ # @param [String] fields
310
+ # Selector specifying which fields to include in a partial response.
311
+ # @param [String] quota_user
312
+ # Available to use for quota purposes for server-side applications. Can be any
313
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
314
+ # @param [Google::Apis::RequestOptions] options
315
+ # Request-specific options
316
+ #
317
+ # @yield [result, err] Result & error if block supplied
318
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::ListDevicesResponse] parsed result object
319
+ # @yieldparam err [StandardError] error object if request failed
320
+ #
321
+ # @return [Google::Apis::AndroidmanagementV1::ListDevicesResponse]
322
+ #
323
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
324
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
325
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
326
+ def list_enterprise_devices(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
327
+ command = make_simple_command(:get, 'v1/{+parent}/devices', options)
328
+ command.response_representation = Google::Apis::AndroidmanagementV1::ListDevicesResponse::Representation
329
+ command.response_class = Google::Apis::AndroidmanagementV1::ListDevicesResponse
330
+ command.params['parent'] = parent unless parent.nil?
331
+ command.query['pageSize'] = page_size unless page_size.nil?
332
+ command.query['pageToken'] = page_token unless page_token.nil?
333
+ command.query['fields'] = fields unless fields.nil?
334
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
335
+ execute_or_queue_command(command, &block)
336
+ end
337
+
338
+ # Updates a device.
339
+ # @param [String] name
340
+ # The name of the device in the form enterprises/`enterpriseId`/devices/`
341
+ # deviceId`.
342
+ # @param [Google::Apis::AndroidmanagementV1::Device] device_object
343
+ # @param [String] update_mask
344
+ # The field mask indicating the fields to update. If not set, all modifiable
345
+ # fields will be modified.
346
+ # @param [String] fields
347
+ # Selector specifying which fields to include in a partial response.
348
+ # @param [String] quota_user
349
+ # Available to use for quota purposes for server-side applications. Can be any
350
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
351
+ # @param [Google::Apis::RequestOptions] options
352
+ # Request-specific options
353
+ #
354
+ # @yield [result, err] Result & error if block supplied
355
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::Device] parsed result object
356
+ # @yieldparam err [StandardError] error object if request failed
357
+ #
358
+ # @return [Google::Apis::AndroidmanagementV1::Device]
359
+ #
360
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
361
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
362
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
363
+ def patch_enterprise_device(name, device_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
364
+ command = make_simple_command(:patch, 'v1/{+name}', options)
365
+ command.request_representation = Google::Apis::AndroidmanagementV1::Device::Representation
366
+ command.request_object = device_object
367
+ command.response_representation = Google::Apis::AndroidmanagementV1::Device::Representation
368
+ command.response_class = Google::Apis::AndroidmanagementV1::Device
369
+ command.params['name'] = name unless name.nil?
370
+ command.query['updateMask'] = update_mask unless update_mask.nil?
371
+ command.query['fields'] = fields unless fields.nil?
372
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
373
+ execute_or_queue_command(command, &block)
374
+ end
375
+
376
+ # Starts asynchronous cancellation on a long-running operation. The server makes
377
+ # a best effort to cancel the operation, but success is not guaranteed. If the
378
+ # server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.
379
+ # Clients can use Operations.GetOperation or other methods to check whether the
380
+ # cancellation succeeded or whether the operation completed despite cancellation.
381
+ # On successful cancellation, the operation is not deleted; instead, it becomes
382
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
383
+ # corresponding to Code.CANCELLED.
384
+ # @param [String] name
385
+ # The name of the operation resource to be cancelled.
386
+ # @param [String] fields
387
+ # Selector specifying which fields to include in a partial response.
388
+ # @param [String] quota_user
389
+ # Available to use for quota purposes for server-side applications. Can be any
390
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
391
+ # @param [Google::Apis::RequestOptions] options
392
+ # Request-specific options
393
+ #
394
+ # @yield [result, err] Result & error if block supplied
395
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::Empty] parsed result object
396
+ # @yieldparam err [StandardError] error object if request failed
397
+ #
398
+ # @return [Google::Apis::AndroidmanagementV1::Empty]
399
+ #
400
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
401
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
402
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
403
+ def cancel_enterprise_device_operation(name, fields: nil, quota_user: nil, options: nil, &block)
404
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
405
+ command.response_representation = Google::Apis::AndroidmanagementV1::Empty::Representation
406
+ command.response_class = Google::Apis::AndroidmanagementV1::Empty
407
+ command.params['name'] = name unless name.nil?
408
+ command.query['fields'] = fields unless fields.nil?
409
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
410
+ execute_or_queue_command(command, &block)
411
+ end
412
+
413
+ # Deletes a long-running operation. This method indicates that the client is no
414
+ # longer interested in the operation result. It does not cancel the operation.
415
+ # If the server doesn't support this method, it returns google.rpc.Code.
416
+ # UNIMPLEMENTED.
417
+ # @param [String] name
418
+ # The name of the operation resource to be deleted.
419
+ # @param [String] fields
420
+ # Selector specifying which fields to include in a partial response.
421
+ # @param [String] quota_user
422
+ # Available to use for quota purposes for server-side applications. Can be any
423
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
424
+ # @param [Google::Apis::RequestOptions] options
425
+ # Request-specific options
426
+ #
427
+ # @yield [result, err] Result & error if block supplied
428
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::Empty] parsed result object
429
+ # @yieldparam err [StandardError] error object if request failed
430
+ #
431
+ # @return [Google::Apis::AndroidmanagementV1::Empty]
432
+ #
433
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
434
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
435
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
436
+ def delete_enterprise_device_operation(name, fields: nil, quota_user: nil, options: nil, &block)
437
+ command = make_simple_command(:delete, 'v1/{+name}', options)
438
+ command.response_representation = Google::Apis::AndroidmanagementV1::Empty::Representation
439
+ command.response_class = Google::Apis::AndroidmanagementV1::Empty
440
+ command.params['name'] = name unless name.nil?
441
+ command.query['fields'] = fields unless fields.nil?
442
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
443
+ execute_or_queue_command(command, &block)
444
+ end
445
+
446
+ # Gets the latest state of a long-running operation. Clients can use this method
447
+ # to poll the operation result at intervals as recommended by the API service.
448
+ # @param [String] name
449
+ # The name of the operation resource.
450
+ # @param [String] fields
451
+ # Selector specifying which fields to include in a partial response.
452
+ # @param [String] quota_user
453
+ # Available to use for quota purposes for server-side applications. Can be any
454
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
455
+ # @param [Google::Apis::RequestOptions] options
456
+ # Request-specific options
457
+ #
458
+ # @yield [result, err] Result & error if block supplied
459
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::Operation] parsed result object
460
+ # @yieldparam err [StandardError] error object if request failed
461
+ #
462
+ # @return [Google::Apis::AndroidmanagementV1::Operation]
463
+ #
464
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
465
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
466
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
467
+ def get_enterprise_device_operation(name, fields: nil, quota_user: nil, options: nil, &block)
468
+ command = make_simple_command(:get, 'v1/{+name}', options)
469
+ command.response_representation = Google::Apis::AndroidmanagementV1::Operation::Representation
470
+ command.response_class = Google::Apis::AndroidmanagementV1::Operation
471
+ command.params['name'] = name unless name.nil?
472
+ command.query['fields'] = fields unless fields.nil?
473
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
474
+ execute_or_queue_command(command, &block)
475
+ end
476
+
477
+ # Lists operations that match the specified filter in the request. If the server
478
+ # doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding
479
+ # allows API services to override the binding to use different resource name
480
+ # schemes, such as users/*/operations. To override the binding, API services can
481
+ # add a binding such as "/v1/`name=users/*`/operations" to their service
482
+ # configuration. For backwards compatibility, the default name includes the
483
+ # operations collection id, however overriding users must ensure the name
484
+ # binding is the parent resource, without the operations collection id.
485
+ # @param [String] name
486
+ # The name of the operation's parent resource.
487
+ # @param [String] filter
488
+ # The standard list filter.
489
+ # @param [Fixnum] page_size
490
+ # The standard list page size.
491
+ # @param [String] page_token
492
+ # The standard list page token.
493
+ # @param [String] fields
494
+ # Selector specifying which fields to include in a partial response.
495
+ # @param [String] quota_user
496
+ # Available to use for quota purposes for server-side applications. Can be any
497
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
498
+ # @param [Google::Apis::RequestOptions] options
499
+ # Request-specific options
500
+ #
501
+ # @yield [result, err] Result & error if block supplied
502
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::ListOperationsResponse] parsed result object
503
+ # @yieldparam err [StandardError] error object if request failed
504
+ #
505
+ # @return [Google::Apis::AndroidmanagementV1::ListOperationsResponse]
506
+ #
507
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
508
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
509
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
510
+ def list_enterprise_device_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
511
+ command = make_simple_command(:get, 'v1/{+name}', options)
512
+ command.response_representation = Google::Apis::AndroidmanagementV1::ListOperationsResponse::Representation
513
+ command.response_class = Google::Apis::AndroidmanagementV1::ListOperationsResponse
514
+ command.params['name'] = name unless name.nil?
515
+ command.query['filter'] = filter unless filter.nil?
516
+ command.query['pageSize'] = page_size unless page_size.nil?
517
+ command.query['pageToken'] = page_token unless page_token.nil?
518
+ command.query['fields'] = fields unless fields.nil?
519
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
520
+ execute_or_queue_command(command, &block)
521
+ end
522
+
523
+ # Creates an enrollment token for a given enterprise.
524
+ # @param [String] parent
525
+ # The name of the enterprise in the form enterprises/`enterpriseId`.
526
+ # @param [Google::Apis::AndroidmanagementV1::EnrollmentToken] enrollment_token_object
527
+ # @param [String] fields
528
+ # Selector specifying which fields to include in a partial response.
529
+ # @param [String] quota_user
530
+ # Available to use for quota purposes for server-side applications. Can be any
531
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
532
+ # @param [Google::Apis::RequestOptions] options
533
+ # Request-specific options
534
+ #
535
+ # @yield [result, err] Result & error if block supplied
536
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::EnrollmentToken] parsed result object
537
+ # @yieldparam err [StandardError] error object if request failed
538
+ #
539
+ # @return [Google::Apis::AndroidmanagementV1::EnrollmentToken]
540
+ #
541
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
542
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
543
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
544
+ def create_enterprise_enrollment_token(parent, enrollment_token_object = nil, fields: nil, quota_user: nil, options: nil, &block)
545
+ command = make_simple_command(:post, 'v1/{+parent}/enrollmentTokens', options)
546
+ command.request_representation = Google::Apis::AndroidmanagementV1::EnrollmentToken::Representation
547
+ command.request_object = enrollment_token_object
548
+ command.response_representation = Google::Apis::AndroidmanagementV1::EnrollmentToken::Representation
549
+ command.response_class = Google::Apis::AndroidmanagementV1::EnrollmentToken
550
+ command.params['parent'] = parent unless parent.nil?
551
+ command.query['fields'] = fields unless fields.nil?
552
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
553
+ execute_or_queue_command(command, &block)
554
+ end
555
+
556
+ # Deletes an enrollment token. This operation invalidates the token, preventing
557
+ # its future use.
558
+ # @param [String] name
559
+ # The name of the enrollment token in the form enterprises/`enterpriseId`/
560
+ # enrollmentTokens/`enrollmentTokenId`.
561
+ # @param [String] fields
562
+ # Selector specifying which fields to include in a partial response.
563
+ # @param [String] quota_user
564
+ # Available to use for quota purposes for server-side applications. Can be any
565
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
566
+ # @param [Google::Apis::RequestOptions] options
567
+ # Request-specific options
568
+ #
569
+ # @yield [result, err] Result & error if block supplied
570
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::Empty] parsed result object
571
+ # @yieldparam err [StandardError] error object if request failed
572
+ #
573
+ # @return [Google::Apis::AndroidmanagementV1::Empty]
574
+ #
575
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
576
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
577
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
578
+ def delete_enterprise_enrollment_token(name, fields: nil, quota_user: nil, options: nil, &block)
579
+ command = make_simple_command(:delete, 'v1/{+name}', options)
580
+ command.response_representation = Google::Apis::AndroidmanagementV1::Empty::Representation
581
+ command.response_class = Google::Apis::AndroidmanagementV1::Empty
582
+ command.params['name'] = name unless name.nil?
583
+ command.query['fields'] = fields unless fields.nil?
584
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
585
+ execute_or_queue_command(command, &block)
586
+ end
587
+
588
+ # Deletes a policy. This operation is only permitted if no devices are currently
589
+ # referencing the policy.
590
+ # @param [String] name
591
+ # The name of the policy in the form enterprises/`enterpriseId`/policies/`
592
+ # policyId`.
593
+ # @param [String] fields
594
+ # Selector specifying which fields to include in a partial response.
595
+ # @param [String] quota_user
596
+ # Available to use for quota purposes for server-side applications. Can be any
597
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
598
+ # @param [Google::Apis::RequestOptions] options
599
+ # Request-specific options
600
+ #
601
+ # @yield [result, err] Result & error if block supplied
602
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::Empty] parsed result object
603
+ # @yieldparam err [StandardError] error object if request failed
604
+ #
605
+ # @return [Google::Apis::AndroidmanagementV1::Empty]
606
+ #
607
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
608
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
609
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
610
+ def delete_enterprise_policy(name, fields: nil, quota_user: nil, options: nil, &block)
611
+ command = make_simple_command(:delete, 'v1/{+name}', options)
612
+ command.response_representation = Google::Apis::AndroidmanagementV1::Empty::Representation
613
+ command.response_class = Google::Apis::AndroidmanagementV1::Empty
614
+ command.params['name'] = name unless name.nil?
615
+ command.query['fields'] = fields unless fields.nil?
616
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
617
+ execute_or_queue_command(command, &block)
618
+ end
619
+
620
+ # Gets a policy.
621
+ # @param [String] name
622
+ # The name of the policy in the form enterprises/`enterpriseId`/policies/`
623
+ # policyId`.
624
+ # @param [String] fields
625
+ # Selector specifying which fields to include in a partial response.
626
+ # @param [String] quota_user
627
+ # Available to use for quota purposes for server-side applications. Can be any
628
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
629
+ # @param [Google::Apis::RequestOptions] options
630
+ # Request-specific options
631
+ #
632
+ # @yield [result, err] Result & error if block supplied
633
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::Policy] parsed result object
634
+ # @yieldparam err [StandardError] error object if request failed
635
+ #
636
+ # @return [Google::Apis::AndroidmanagementV1::Policy]
637
+ #
638
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
639
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
640
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
641
+ def get_enterprise_policy(name, fields: nil, quota_user: nil, options: nil, &block)
642
+ command = make_simple_command(:get, 'v1/{+name}', options)
643
+ command.response_representation = Google::Apis::AndroidmanagementV1::Policy::Representation
644
+ command.response_class = Google::Apis::AndroidmanagementV1::Policy
645
+ command.params['name'] = name unless name.nil?
646
+ command.query['fields'] = fields unless fields.nil?
647
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
648
+ execute_or_queue_command(command, &block)
649
+ end
650
+
651
+ # Lists policies for a given enterprise.
652
+ # @param [String] parent
653
+ # The name of the enterprise in the form enterprises/`enterpriseId`.
654
+ # @param [Fixnum] page_size
655
+ # The requested page size. The actual page size may be fixed to a min or max
656
+ # value.
657
+ # @param [String] page_token
658
+ # A token identifying a page of results returned by the server.
659
+ # @param [String] fields
660
+ # Selector specifying which fields to include in a partial response.
661
+ # @param [String] quota_user
662
+ # Available to use for quota purposes for server-side applications. Can be any
663
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
664
+ # @param [Google::Apis::RequestOptions] options
665
+ # Request-specific options
666
+ #
667
+ # @yield [result, err] Result & error if block supplied
668
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::ListPoliciesResponse] parsed result object
669
+ # @yieldparam err [StandardError] error object if request failed
670
+ #
671
+ # @return [Google::Apis::AndroidmanagementV1::ListPoliciesResponse]
672
+ #
673
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
674
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
675
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
676
+ def list_enterprise_policies(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
677
+ command = make_simple_command(:get, 'v1/{+parent}/policies', options)
678
+ command.response_representation = Google::Apis::AndroidmanagementV1::ListPoliciesResponse::Representation
679
+ command.response_class = Google::Apis::AndroidmanagementV1::ListPoliciesResponse
680
+ command.params['parent'] = parent unless parent.nil?
681
+ command.query['pageSize'] = page_size unless page_size.nil?
682
+ command.query['pageToken'] = page_token unless page_token.nil?
683
+ command.query['fields'] = fields unless fields.nil?
684
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
685
+ execute_or_queue_command(command, &block)
686
+ end
687
+
688
+ # Updates or creates a policy.
689
+ # @param [String] name
690
+ # The name of the policy in the form enterprises/`enterpriseId`/policies/`
691
+ # policyId`.
692
+ # @param [Google::Apis::AndroidmanagementV1::Policy] policy_object
693
+ # @param [String] update_mask
694
+ # The field mask indicating the fields to update. If not set, all modifiable
695
+ # fields will be modified.
696
+ # @param [String] fields
697
+ # Selector specifying which fields to include in a partial response.
698
+ # @param [String] quota_user
699
+ # Available to use for quota purposes for server-side applications. Can be any
700
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
701
+ # @param [Google::Apis::RequestOptions] options
702
+ # Request-specific options
703
+ #
704
+ # @yield [result, err] Result & error if block supplied
705
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::Policy] parsed result object
706
+ # @yieldparam err [StandardError] error object if request failed
707
+ #
708
+ # @return [Google::Apis::AndroidmanagementV1::Policy]
709
+ #
710
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
711
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
712
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
713
+ def patch_enterprise_policy(name, policy_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
714
+ command = make_simple_command(:patch, 'v1/{+name}', options)
715
+ command.request_representation = Google::Apis::AndroidmanagementV1::Policy::Representation
716
+ command.request_object = policy_object
717
+ command.response_representation = Google::Apis::AndroidmanagementV1::Policy::Representation
718
+ command.response_class = Google::Apis::AndroidmanagementV1::Policy
719
+ command.params['name'] = name unless name.nil?
720
+ command.query['updateMask'] = update_mask unless update_mask.nil?
721
+ command.query['fields'] = fields unless fields.nil?
722
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
723
+ execute_or_queue_command(command, &block)
724
+ end
725
+
726
+ # Creates a web app.
727
+ # @param [String] parent
728
+ # The name of the enterprise in the form enterprises/`enterpriseId`.
729
+ # @param [Google::Apis::AndroidmanagementV1::WebApp] web_app_object
730
+ # @param [String] fields
731
+ # Selector specifying which fields to include in a partial response.
732
+ # @param [String] quota_user
733
+ # Available to use for quota purposes for server-side applications. Can be any
734
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
735
+ # @param [Google::Apis::RequestOptions] options
736
+ # Request-specific options
737
+ #
738
+ # @yield [result, err] Result & error if block supplied
739
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::WebApp] parsed result object
740
+ # @yieldparam err [StandardError] error object if request failed
741
+ #
742
+ # @return [Google::Apis::AndroidmanagementV1::WebApp]
743
+ #
744
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
745
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
746
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
747
+ def create_enterprise_web_app(parent, web_app_object = nil, fields: nil, quota_user: nil, options: nil, &block)
748
+ command = make_simple_command(:post, 'v1/{+parent}/webApps', options)
749
+ command.request_representation = Google::Apis::AndroidmanagementV1::WebApp::Representation
750
+ command.request_object = web_app_object
751
+ command.response_representation = Google::Apis::AndroidmanagementV1::WebApp::Representation
752
+ command.response_class = Google::Apis::AndroidmanagementV1::WebApp
753
+ command.params['parent'] = parent unless parent.nil?
754
+ command.query['fields'] = fields unless fields.nil?
755
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
756
+ execute_or_queue_command(command, &block)
757
+ end
758
+
759
+ # Deletes a web app.
760
+ # @param [String] name
761
+ # The name of the web app in the form enterprises/`enterpriseId`/webApps/`
762
+ # packageName`.
763
+ # @param [String] fields
764
+ # Selector specifying which fields to include in a partial response.
765
+ # @param [String] quota_user
766
+ # Available to use for quota purposes for server-side applications. Can be any
767
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
768
+ # @param [Google::Apis::RequestOptions] options
769
+ # Request-specific options
770
+ #
771
+ # @yield [result, err] Result & error if block supplied
772
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::Empty] parsed result object
773
+ # @yieldparam err [StandardError] error object if request failed
774
+ #
775
+ # @return [Google::Apis::AndroidmanagementV1::Empty]
776
+ #
777
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
778
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
779
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
780
+ def delete_enterprise_web_app(name, fields: nil, quota_user: nil, options: nil, &block)
781
+ command = make_simple_command(:delete, 'v1/{+name}', options)
782
+ command.response_representation = Google::Apis::AndroidmanagementV1::Empty::Representation
783
+ command.response_class = Google::Apis::AndroidmanagementV1::Empty
784
+ command.params['name'] = name unless name.nil?
785
+ command.query['fields'] = fields unless fields.nil?
786
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
787
+ execute_or_queue_command(command, &block)
788
+ end
789
+
790
+ # Gets a web app.
791
+ # @param [String] name
792
+ # The name of the web app in the form enterprises/`enterpriseId`/webApp/`
793
+ # packageName`.
794
+ # @param [String] fields
795
+ # Selector specifying which fields to include in a partial response.
796
+ # @param [String] quota_user
797
+ # Available to use for quota purposes for server-side applications. Can be any
798
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
799
+ # @param [Google::Apis::RequestOptions] options
800
+ # Request-specific options
801
+ #
802
+ # @yield [result, err] Result & error if block supplied
803
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::WebApp] parsed result object
804
+ # @yieldparam err [StandardError] error object if request failed
805
+ #
806
+ # @return [Google::Apis::AndroidmanagementV1::WebApp]
807
+ #
808
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
809
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
810
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
811
+ def get_enterprise_web_app(name, fields: nil, quota_user: nil, options: nil, &block)
812
+ command = make_simple_command(:get, 'v1/{+name}', options)
813
+ command.response_representation = Google::Apis::AndroidmanagementV1::WebApp::Representation
814
+ command.response_class = Google::Apis::AndroidmanagementV1::WebApp
815
+ command.params['name'] = name unless name.nil?
816
+ command.query['fields'] = fields unless fields.nil?
817
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
818
+ execute_or_queue_command(command, &block)
819
+ end
820
+
821
+ # Lists web apps for a given enterprise.
822
+ # @param [String] parent
823
+ # The name of the enterprise in the form enterprises/`enterpriseId`.
824
+ # @param [Fixnum] page_size
825
+ # The requested page size. The actual page size may be fixed to a min or max
826
+ # value.
827
+ # @param [String] page_token
828
+ # A token identifying a page of results returned by the server.
829
+ # @param [String] fields
830
+ # Selector specifying which fields to include in a partial response.
831
+ # @param [String] quota_user
832
+ # Available to use for quota purposes for server-side applications. Can be any
833
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
834
+ # @param [Google::Apis::RequestOptions] options
835
+ # Request-specific options
836
+ #
837
+ # @yield [result, err] Result & error if block supplied
838
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::ListWebAppsResponse] parsed result object
839
+ # @yieldparam err [StandardError] error object if request failed
840
+ #
841
+ # @return [Google::Apis::AndroidmanagementV1::ListWebAppsResponse]
842
+ #
843
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
844
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
845
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
846
+ def list_enterprise_web_apps(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
847
+ command = make_simple_command(:get, 'v1/{+parent}/webApps', options)
848
+ command.response_representation = Google::Apis::AndroidmanagementV1::ListWebAppsResponse::Representation
849
+ command.response_class = Google::Apis::AndroidmanagementV1::ListWebAppsResponse
850
+ command.params['parent'] = parent unless parent.nil?
851
+ command.query['pageSize'] = page_size unless page_size.nil?
852
+ command.query['pageToken'] = page_token unless page_token.nil?
853
+ command.query['fields'] = fields unless fields.nil?
854
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
855
+ execute_or_queue_command(command, &block)
856
+ end
857
+
858
+ # Updates a web app.
859
+ # @param [String] name
860
+ # The name of the web app in the form enterprises/`enterpriseId`/webApps/`
861
+ # packageName`.
862
+ # @param [Google::Apis::AndroidmanagementV1::WebApp] web_app_object
863
+ # @param [String] update_mask
864
+ # The field mask indicating the fields to update. If not set, all modifiable
865
+ # fields will be modified.
866
+ # @param [String] fields
867
+ # Selector specifying which fields to include in a partial response.
868
+ # @param [String] quota_user
869
+ # Available to use for quota purposes for server-side applications. Can be any
870
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
871
+ # @param [Google::Apis::RequestOptions] options
872
+ # Request-specific options
873
+ #
874
+ # @yield [result, err] Result & error if block supplied
875
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::WebApp] parsed result object
876
+ # @yieldparam err [StandardError] error object if request failed
877
+ #
878
+ # @return [Google::Apis::AndroidmanagementV1::WebApp]
879
+ #
880
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
881
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
882
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
883
+ def patch_enterprise_web_app(name, web_app_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
884
+ command = make_simple_command(:patch, 'v1/{+name}', options)
885
+ command.request_representation = Google::Apis::AndroidmanagementV1::WebApp::Representation
886
+ command.request_object = web_app_object
887
+ command.response_representation = Google::Apis::AndroidmanagementV1::WebApp::Representation
888
+ command.response_class = Google::Apis::AndroidmanagementV1::WebApp
889
+ command.params['name'] = name unless name.nil?
890
+ command.query['updateMask'] = update_mask unless update_mask.nil?
891
+ command.query['fields'] = fields unless fields.nil?
892
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
893
+ execute_or_queue_command(command, &block)
894
+ end
895
+
896
+ # Creates a web token to access an embeddable managed Google Play web UI for a
897
+ # given enterprise.
898
+ # @param [String] parent
899
+ # The name of the enterprise in the form enterprises/`enterpriseId`.
900
+ # @param [Google::Apis::AndroidmanagementV1::WebToken] web_token_object
901
+ # @param [String] fields
902
+ # Selector specifying which fields to include in a partial response.
903
+ # @param [String] quota_user
904
+ # Available to use for quota purposes for server-side applications. Can be any
905
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
906
+ # @param [Google::Apis::RequestOptions] options
907
+ # Request-specific options
908
+ #
909
+ # @yield [result, err] Result & error if block supplied
910
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::WebToken] parsed result object
911
+ # @yieldparam err [StandardError] error object if request failed
912
+ #
913
+ # @return [Google::Apis::AndroidmanagementV1::WebToken]
914
+ #
915
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
916
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
917
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
918
+ def create_enterprise_web_token(parent, web_token_object = nil, fields: nil, quota_user: nil, options: nil, &block)
919
+ command = make_simple_command(:post, 'v1/{+parent}/webTokens', options)
920
+ command.request_representation = Google::Apis::AndroidmanagementV1::WebToken::Representation
921
+ command.request_object = web_token_object
922
+ command.response_representation = Google::Apis::AndroidmanagementV1::WebToken::Representation
923
+ command.response_class = Google::Apis::AndroidmanagementV1::WebToken
924
+ command.params['parent'] = parent unless parent.nil?
925
+ command.query['fields'] = fields unless fields.nil?
926
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
927
+ execute_or_queue_command(command, &block)
928
+ end
929
+
930
+ # Creates an enterprise signup URL.
931
+ # @param [String] callback_url
932
+ # The callback URL that the admin will be redirected to after successfully
933
+ # creating an enterprise. Before redirecting there the system will add a query
934
+ # parameter to this URL named enterpriseToken which will contain an opaque token
935
+ # to be used for the create enterprise request. The URL will be parsed then
936
+ # reformatted in order to add the enterpriseToken parameter, so there may be
937
+ # some minor formatting changes.
938
+ # @param [String] project_id
939
+ # The ID of the Google Cloud Platform project which will own the enterprise.
940
+ # @param [String] fields
941
+ # Selector specifying which fields to include in a partial response.
942
+ # @param [String] quota_user
943
+ # Available to use for quota purposes for server-side applications. Can be any
944
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
945
+ # @param [Google::Apis::RequestOptions] options
946
+ # Request-specific options
947
+ #
948
+ # @yield [result, err] Result & error if block supplied
949
+ # @yieldparam result [Google::Apis::AndroidmanagementV1::SignupUrl] parsed result object
950
+ # @yieldparam err [StandardError] error object if request failed
951
+ #
952
+ # @return [Google::Apis::AndroidmanagementV1::SignupUrl]
953
+ #
954
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
955
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
956
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
957
+ def create_signup_url(callback_url: nil, project_id: nil, fields: nil, quota_user: nil, options: nil, &block)
958
+ command = make_simple_command(:post, 'v1/signupUrls', options)
959
+ command.response_representation = Google::Apis::AndroidmanagementV1::SignupUrl::Representation
960
+ command.response_class = Google::Apis::AndroidmanagementV1::SignupUrl
961
+ command.query['callbackUrl'] = callback_url unless callback_url.nil?
962
+ command.query['projectId'] = project_id unless project_id.nil?
963
+ command.query['fields'] = fields unless fields.nil?
964
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
965
+ execute_or_queue_command(command, &block)
966
+ end
967
+
968
+ protected
969
+
970
+ def apply_command_defaults(command)
971
+ command.query['key'] = key unless key.nil?
972
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
973
+ end
974
+ end
975
+ end
976
+ end
977
+ end