google-apis-androidenterprise_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2766 @@
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 AndroidenterpriseV1
23
+ # Google Play EMM API
24
+ #
25
+ # Manages the deployment of apps to Android Enterprise devices.
26
+ #
27
+ # @example
28
+ # require 'google/apis/androidenterprise_v1'
29
+ #
30
+ # Androidenterprise = Google::Apis::AndroidenterpriseV1 # Alias the module
31
+ # service = Androidenterprise::AndroidEnterpriseService.new
32
+ #
33
+ # @see https://developers.google.com/android/work/play/emm-api
34
+ class AndroidEnterpriseService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://androidenterprise.googleapis.com/', '',
47
+ client_name: 'google-apis-androidenterprise_v1',
48
+ client_version: Google::Apis::AndroidenterpriseV1::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Uploads a report containing any changes in app states on the device since the
53
+ # last report was generated. You can call this method up to 3 times every 24
54
+ # hours for a given device. If you exceed the quota, then the Google Play EMM
55
+ # API returns HTTP 429 Too Many Requests.
56
+ # @param [String] enterprise_id
57
+ # The ID of the enterprise.
58
+ # @param [String] user_id
59
+ # The ID of the user.
60
+ # @param [String] device_id
61
+ # The ID of the device.
62
+ # @param [String] fields
63
+ # Selector specifying which fields to include in a partial response.
64
+ # @param [String] quota_user
65
+ # Available to use for quota purposes for server-side applications. Can be any
66
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
67
+ # @param [Google::Apis::RequestOptions] options
68
+ # Request-specific options
69
+ #
70
+ # @yield [result, err] Result & error if block supplied
71
+ # @yieldparam result [NilClass] No result returned for this method
72
+ # @yieldparam err [StandardError] error object if request failed
73
+ #
74
+ # @return [void]
75
+ #
76
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
77
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
78
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
79
+ def force_device_report_upload(enterprise_id, user_id, device_id, fields: nil, quota_user: nil, options: nil, &block)
80
+ command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/forceReportUpload', options)
81
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
82
+ command.params['userId'] = user_id unless user_id.nil?
83
+ command.params['deviceId'] = device_id unless device_id.nil?
84
+ command.query['fields'] = fields unless fields.nil?
85
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
86
+ execute_or_queue_command(command, &block)
87
+ end
88
+
89
+ # Retrieves the details of a device.
90
+ # @param [String] enterprise_id
91
+ # The ID of the enterprise.
92
+ # @param [String] user_id
93
+ # The ID of the user.
94
+ # @param [String] device_id
95
+ # The ID of the device.
96
+ # @param [String] fields
97
+ # Selector specifying which fields to include in a partial response.
98
+ # @param [String] quota_user
99
+ # Available to use for quota purposes for server-side applications. Can be any
100
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
101
+ # @param [Google::Apis::RequestOptions] options
102
+ # Request-specific options
103
+ #
104
+ # @yield [result, err] Result & error if block supplied
105
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Device] parsed result object
106
+ # @yieldparam err [StandardError] error object if request failed
107
+ #
108
+ # @return [Google::Apis::AndroidenterpriseV1::Device]
109
+ #
110
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
111
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
112
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
113
+ def get_device(enterprise_id, user_id, device_id, fields: nil, quota_user: nil, options: nil, &block)
114
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}', options)
115
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Device::Representation
116
+ command.response_class = Google::Apis::AndroidenterpriseV1::Device
117
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
118
+ command.params['userId'] = user_id unless user_id.nil?
119
+ command.params['deviceId'] = device_id unless device_id.nil?
120
+ command.query['fields'] = fields unless fields.nil?
121
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
122
+ execute_or_queue_command(command, &block)
123
+ end
124
+
125
+ # Retrieves whether a device's access to Google services is enabled or disabled.
126
+ # The device state takes effect only if enforcing EMM policies on Android
127
+ # devices is enabled in the Google Admin Console. Otherwise, the device state is
128
+ # ignored and all devices are allowed access to Google services. This is only
129
+ # supported for Google-managed users.
130
+ # @param [String] enterprise_id
131
+ # The ID of the enterprise.
132
+ # @param [String] user_id
133
+ # The ID of the user.
134
+ # @param [String] device_id
135
+ # The ID of the device.
136
+ # @param [String] fields
137
+ # Selector specifying which fields to include in a partial response.
138
+ # @param [String] quota_user
139
+ # Available to use for quota purposes for server-side applications. Can be any
140
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
141
+ # @param [Google::Apis::RequestOptions] options
142
+ # Request-specific options
143
+ #
144
+ # @yield [result, err] Result & error if block supplied
145
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::DeviceState] parsed result object
146
+ # @yieldparam err [StandardError] error object if request failed
147
+ #
148
+ # @return [Google::Apis::AndroidenterpriseV1::DeviceState]
149
+ #
150
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
151
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
152
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
153
+ def get_device_state(enterprise_id, user_id, device_id, fields: nil, quota_user: nil, options: nil, &block)
154
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/state', options)
155
+ command.response_representation = Google::Apis::AndroidenterpriseV1::DeviceState::Representation
156
+ command.response_class = Google::Apis::AndroidenterpriseV1::DeviceState
157
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
158
+ command.params['userId'] = user_id unless user_id.nil?
159
+ command.params['deviceId'] = device_id unless device_id.nil?
160
+ command.query['fields'] = fields unless fields.nil?
161
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
162
+ execute_or_queue_command(command, &block)
163
+ end
164
+
165
+ # Retrieves the IDs of all of a user's devices.
166
+ # @param [String] enterprise_id
167
+ # The ID of the enterprise.
168
+ # @param [String] user_id
169
+ # The ID of the user.
170
+ # @param [String] fields
171
+ # Selector specifying which fields to include in a partial response.
172
+ # @param [String] quota_user
173
+ # Available to use for quota purposes for server-side applications. Can be any
174
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
175
+ # @param [Google::Apis::RequestOptions] options
176
+ # Request-specific options
177
+ #
178
+ # @yield [result, err] Result & error if block supplied
179
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ListDevicesResponse] parsed result object
180
+ # @yieldparam err [StandardError] error object if request failed
181
+ #
182
+ # @return [Google::Apis::AndroidenterpriseV1::ListDevicesResponse]
183
+ #
184
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
185
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
186
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
187
+ def list_devices(enterprise_id, user_id, fields: nil, quota_user: nil, options: nil, &block)
188
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices', options)
189
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ListDevicesResponse::Representation
190
+ command.response_class = Google::Apis::AndroidenterpriseV1::ListDevicesResponse
191
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
192
+ command.params['userId'] = user_id unless user_id.nil?
193
+ command.query['fields'] = fields unless fields.nil?
194
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
195
+ execute_or_queue_command(command, &block)
196
+ end
197
+
198
+ # Sets whether a device's access to Google services is enabled or disabled. The
199
+ # device state takes effect only if enforcing EMM policies on Android devices is
200
+ # enabled in the Google Admin Console. Otherwise, the device state is ignored
201
+ # and all devices are allowed access to Google services. This is only supported
202
+ # for Google-managed users.
203
+ # @param [String] enterprise_id
204
+ # The ID of the enterprise.
205
+ # @param [String] user_id
206
+ # The ID of the user.
207
+ # @param [String] device_id
208
+ # The ID of the device.
209
+ # @param [Google::Apis::AndroidenterpriseV1::DeviceState] device_state_object
210
+ # @param [String] fields
211
+ # Selector specifying which fields to include in a partial response.
212
+ # @param [String] quota_user
213
+ # Available to use for quota purposes for server-side applications. Can be any
214
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
215
+ # @param [Google::Apis::RequestOptions] options
216
+ # Request-specific options
217
+ #
218
+ # @yield [result, err] Result & error if block supplied
219
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::DeviceState] parsed result object
220
+ # @yieldparam err [StandardError] error object if request failed
221
+ #
222
+ # @return [Google::Apis::AndroidenterpriseV1::DeviceState]
223
+ #
224
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
225
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
226
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
227
+ def set_device_state(enterprise_id, user_id, device_id, device_state_object = nil, fields: nil, quota_user: nil, options: nil, &block)
228
+ command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/state', options)
229
+ command.request_representation = Google::Apis::AndroidenterpriseV1::DeviceState::Representation
230
+ command.request_object = device_state_object
231
+ command.response_representation = Google::Apis::AndroidenterpriseV1::DeviceState::Representation
232
+ command.response_class = Google::Apis::AndroidenterpriseV1::DeviceState
233
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
234
+ command.params['userId'] = user_id unless user_id.nil?
235
+ command.params['deviceId'] = device_id unless device_id.nil?
236
+ command.query['fields'] = fields unless fields.nil?
237
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
238
+ execute_or_queue_command(command, &block)
239
+ end
240
+
241
+ # Updates the device policy. To ensure the policy is properly enforced, you need
242
+ # to prevent unmanaged accounts from accessing Google Play by setting the
243
+ # allowed_accounts in the managed configuration for the Google Play package. See
244
+ # restrict accounts in Google Play.
245
+ # @param [String] enterprise_id
246
+ # The ID of the enterprise.
247
+ # @param [String] user_id
248
+ # The ID of the user.
249
+ # @param [String] device_id
250
+ # The ID of the device.
251
+ # @param [Google::Apis::AndroidenterpriseV1::Device] device_object
252
+ # @param [String] update_mask
253
+ # Mask that identifies which fields to update. If not set, all modifiable fields
254
+ # will be modified. When set in a query parameter, this field should be
255
+ # specified as updateMask=<field1>,<field2>,...
256
+ # @param [String] fields
257
+ # Selector specifying which fields to include in a partial response.
258
+ # @param [String] quota_user
259
+ # Available to use for quota purposes for server-side applications. Can be any
260
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
261
+ # @param [Google::Apis::RequestOptions] options
262
+ # Request-specific options
263
+ #
264
+ # @yield [result, err] Result & error if block supplied
265
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Device] parsed result object
266
+ # @yieldparam err [StandardError] error object if request failed
267
+ #
268
+ # @return [Google::Apis::AndroidenterpriseV1::Device]
269
+ #
270
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
271
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
272
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
273
+ def update_device(enterprise_id, user_id, device_id, device_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
274
+ command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}', options)
275
+ command.request_representation = Google::Apis::AndroidenterpriseV1::Device::Representation
276
+ command.request_object = device_object
277
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Device::Representation
278
+ command.response_class = Google::Apis::AndroidenterpriseV1::Device
279
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
280
+ command.params['userId'] = user_id unless user_id.nil?
281
+ command.params['deviceId'] = device_id unless device_id.nil?
282
+ command.query['updateMask'] = update_mask unless update_mask.nil?
283
+ command.query['fields'] = fields unless fields.nil?
284
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
285
+ execute_or_queue_command(command, &block)
286
+ end
287
+
288
+ # Acknowledges notifications that were received from Enterprises.
289
+ # PullNotificationSet to prevent subsequent calls from returning the same
290
+ # notifications.
291
+ # @param [String] notification_set_id
292
+ # The notification set ID as returned by Enterprises.PullNotificationSet. This
293
+ # must be provided.
294
+ # @param [String] fields
295
+ # Selector specifying which fields to include in a partial response.
296
+ # @param [String] quota_user
297
+ # Available to use for quota purposes for server-side applications. Can be any
298
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
299
+ # @param [Google::Apis::RequestOptions] options
300
+ # Request-specific options
301
+ #
302
+ # @yield [result, err] Result & error if block supplied
303
+ # @yieldparam result [NilClass] No result returned for this method
304
+ # @yieldparam err [StandardError] error object if request failed
305
+ #
306
+ # @return [void]
307
+ #
308
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
309
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
310
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
311
+ def acknowledge_enterprise_notification_set(notification_set_id: nil, fields: nil, quota_user: nil, options: nil, &block)
312
+ command = make_simple_command(:post, 'androidenterprise/v1/enterprises/acknowledgeNotificationSet', options)
313
+ command.query['notificationSetId'] = notification_set_id unless notification_set_id.nil?
314
+ command.query['fields'] = fields unless fields.nil?
315
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
316
+ execute_or_queue_command(command, &block)
317
+ end
318
+
319
+ # Completes the signup flow, by specifying the Completion token and Enterprise
320
+ # token. This request must not be called multiple times for a given Enterprise
321
+ # Token.
322
+ # @param [String] completion_token
323
+ # The Completion token initially returned by GenerateSignupUrl.
324
+ # @param [String] enterprise_token
325
+ # The Enterprise token appended to the Callback URL.
326
+ # @param [String] fields
327
+ # Selector specifying which fields to include in a partial response.
328
+ # @param [String] quota_user
329
+ # Available to use for quota purposes for server-side applications. Can be any
330
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
331
+ # @param [Google::Apis::RequestOptions] options
332
+ # Request-specific options
333
+ #
334
+ # @yield [result, err] Result & error if block supplied
335
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Enterprise] parsed result object
336
+ # @yieldparam err [StandardError] error object if request failed
337
+ #
338
+ # @return [Google::Apis::AndroidenterpriseV1::Enterprise]
339
+ #
340
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
341
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
342
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
343
+ def complete_enterprise_signup(completion_token: nil, enterprise_token: nil, fields: nil, quota_user: nil, options: nil, &block)
344
+ command = make_simple_command(:post, 'androidenterprise/v1/enterprises/completeSignup', options)
345
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Enterprise::Representation
346
+ command.response_class = Google::Apis::AndroidenterpriseV1::Enterprise
347
+ command.query['completionToken'] = completion_token unless completion_token.nil?
348
+ command.query['enterpriseToken'] = enterprise_token unless enterprise_token.nil?
349
+ command.query['fields'] = fields unless fields.nil?
350
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
351
+ execute_or_queue_command(command, &block)
352
+ end
353
+
354
+ # Returns a unique token to access an embeddable UI. To generate a web UI, pass
355
+ # the generated token into the managed Google Play javascript API. Each token
356
+ # may only be used to start one UI session. See the javascript API documentation
357
+ # for further information.
358
+ # @param [String] enterprise_id
359
+ # The ID of the enterprise.
360
+ # @param [Google::Apis::AndroidenterpriseV1::AdministratorWebTokenSpec] administrator_web_token_spec_object
361
+ # @param [String] fields
362
+ # Selector specifying which fields to include in a partial response.
363
+ # @param [String] quota_user
364
+ # Available to use for quota purposes for server-side applications. Can be any
365
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
366
+ # @param [Google::Apis::RequestOptions] options
367
+ # Request-specific options
368
+ #
369
+ # @yield [result, err] Result & error if block supplied
370
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::AdministratorWebToken] parsed result object
371
+ # @yieldparam err [StandardError] error object if request failed
372
+ #
373
+ # @return [Google::Apis::AndroidenterpriseV1::AdministratorWebToken]
374
+ #
375
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
376
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
377
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
378
+ def create_enterprise_web_token(enterprise_id, administrator_web_token_spec_object = nil, fields: nil, quota_user: nil, options: nil, &block)
379
+ command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/createWebToken', options)
380
+ command.request_representation = Google::Apis::AndroidenterpriseV1::AdministratorWebTokenSpec::Representation
381
+ command.request_object = administrator_web_token_spec_object
382
+ command.response_representation = Google::Apis::AndroidenterpriseV1::AdministratorWebToken::Representation
383
+ command.response_class = Google::Apis::AndroidenterpriseV1::AdministratorWebToken
384
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
385
+ command.query['fields'] = fields unless fields.nil?
386
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
387
+ execute_or_queue_command(command, &block)
388
+ end
389
+
390
+ # Enrolls an enterprise with the calling EMM.
391
+ # @param [String] token
392
+ # Required. The token provided by the enterprise to register the EMM.
393
+ # @param [Google::Apis::AndroidenterpriseV1::Enterprise] enterprise_object
394
+ # @param [String] fields
395
+ # Selector specifying which fields to include in a partial response.
396
+ # @param [String] quota_user
397
+ # Available to use for quota purposes for server-side applications. Can be any
398
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
399
+ # @param [Google::Apis::RequestOptions] options
400
+ # Request-specific options
401
+ #
402
+ # @yield [result, err] Result & error if block supplied
403
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Enterprise] parsed result object
404
+ # @yieldparam err [StandardError] error object if request failed
405
+ #
406
+ # @return [Google::Apis::AndroidenterpriseV1::Enterprise]
407
+ #
408
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
409
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
410
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
411
+ def enroll_enterprise(token, enterprise_object = nil, fields: nil, quota_user: nil, options: nil, &block)
412
+ command = make_simple_command(:post, 'androidenterprise/v1/enterprises/enroll', options)
413
+ command.request_representation = Google::Apis::AndroidenterpriseV1::Enterprise::Representation
414
+ command.request_object = enterprise_object
415
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Enterprise::Representation
416
+ command.response_class = Google::Apis::AndroidenterpriseV1::Enterprise
417
+ command.query['token'] = token unless token.nil?
418
+ command.query['fields'] = fields unless fields.nil?
419
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
420
+ execute_or_queue_command(command, &block)
421
+ end
422
+
423
+ # Generates a sign-up URL.
424
+ # @param [String] callback_url
425
+ # The callback URL to which the Admin will be redirected after successfully
426
+ # creating an enterprise. Before redirecting there the system will add a single
427
+ # query parameter to this URL named "enterpriseToken" which will contain an
428
+ # opaque token to be used for the CompleteSignup request. Beware that this means
429
+ # that the URL will be parsed, the parameter added and then a new URL formatted,
430
+ # i.e. there may be some minor formatting changes and, more importantly, the URL
431
+ # must be well-formed so that it can be parsed.
432
+ # @param [String] fields
433
+ # Selector specifying which fields to include in a partial response.
434
+ # @param [String] quota_user
435
+ # Available to use for quota purposes for server-side applications. Can be any
436
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
437
+ # @param [Google::Apis::RequestOptions] options
438
+ # Request-specific options
439
+ #
440
+ # @yield [result, err] Result & error if block supplied
441
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::SignupInfo] parsed result object
442
+ # @yieldparam err [StandardError] error object if request failed
443
+ #
444
+ # @return [Google::Apis::AndroidenterpriseV1::SignupInfo]
445
+ #
446
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
447
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
448
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
449
+ def generate_enterprise_signup_url(callback_url: nil, fields: nil, quota_user: nil, options: nil, &block)
450
+ command = make_simple_command(:post, 'androidenterprise/v1/enterprises/signupUrl', options)
451
+ command.response_representation = Google::Apis::AndroidenterpriseV1::SignupInfo::Representation
452
+ command.response_class = Google::Apis::AndroidenterpriseV1::SignupInfo
453
+ command.query['callbackUrl'] = callback_url unless callback_url.nil?
454
+ command.query['fields'] = fields unless fields.nil?
455
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
456
+ execute_or_queue_command(command, &block)
457
+ end
458
+
459
+ # Retrieves the name and domain of an enterprise.
460
+ # @param [String] enterprise_id
461
+ # The ID of the enterprise.
462
+ # @param [String] fields
463
+ # Selector specifying which fields to include in a partial response.
464
+ # @param [String] quota_user
465
+ # Available to use for quota purposes for server-side applications. Can be any
466
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
467
+ # @param [Google::Apis::RequestOptions] options
468
+ # Request-specific options
469
+ #
470
+ # @yield [result, err] Result & error if block supplied
471
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Enterprise] parsed result object
472
+ # @yieldparam err [StandardError] error object if request failed
473
+ #
474
+ # @return [Google::Apis::AndroidenterpriseV1::Enterprise]
475
+ #
476
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
477
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
478
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
479
+ def get_enterprise(enterprise_id, fields: nil, quota_user: nil, options: nil, &block)
480
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}', options)
481
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Enterprise::Representation
482
+ command.response_class = Google::Apis::AndroidenterpriseV1::Enterprise
483
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
484
+ command.query['fields'] = fields unless fields.nil?
485
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
486
+ execute_or_queue_command(command, &block)
487
+ end
488
+
489
+ # Returns a service account and credentials. The service account can be bound to
490
+ # the enterprise by calling setAccount. The service account is unique to this
491
+ # enterprise and EMM, and will be deleted if the enterprise is unbound. The
492
+ # credentials contain private key data and are not stored server-side. This
493
+ # method can only be called after calling Enterprises.Enroll or Enterprises.
494
+ # CompleteSignup, and before Enterprises.SetAccount; at other times it will
495
+ # return an error. Subsequent calls after the first will generate a new, unique
496
+ # set of credentials, and invalidate the previously generated credentials. Once
497
+ # the service account is bound to the enterprise, it can be managed using the
498
+ # serviceAccountKeys resource.
499
+ # @param [String] enterprise_id
500
+ # The ID of the enterprise.
501
+ # @param [String] key_type
502
+ # The type of credential to return with the service account. Required.
503
+ # @param [String] fields
504
+ # Selector specifying which fields to include in a partial response.
505
+ # @param [String] quota_user
506
+ # Available to use for quota purposes for server-side applications. Can be any
507
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
508
+ # @param [Google::Apis::RequestOptions] options
509
+ # Request-specific options
510
+ #
511
+ # @yield [result, err] Result & error if block supplied
512
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ServiceAccount] parsed result object
513
+ # @yieldparam err [StandardError] error object if request failed
514
+ #
515
+ # @return [Google::Apis::AndroidenterpriseV1::ServiceAccount]
516
+ #
517
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
518
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
519
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
520
+ def get_enterprise_service_account(enterprise_id, key_type: nil, fields: nil, quota_user: nil, options: nil, &block)
521
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/serviceAccount', options)
522
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ServiceAccount::Representation
523
+ command.response_class = Google::Apis::AndroidenterpriseV1::ServiceAccount
524
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
525
+ command.query['keyType'] = key_type unless key_type.nil?
526
+ command.query['fields'] = fields unless fields.nil?
527
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
528
+ execute_or_queue_command(command, &block)
529
+ end
530
+
531
+ # Returns the store layout for the enterprise. If the store layout has not been
532
+ # set, returns "basic" as the store layout type and no homepage.
533
+ # @param [String] enterprise_id
534
+ # The ID of the enterprise.
535
+ # @param [String] fields
536
+ # Selector specifying which fields to include in a partial response.
537
+ # @param [String] quota_user
538
+ # Available to use for quota purposes for server-side applications. Can be any
539
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
540
+ # @param [Google::Apis::RequestOptions] options
541
+ # Request-specific options
542
+ #
543
+ # @yield [result, err] Result & error if block supplied
544
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::StoreLayout] parsed result object
545
+ # @yieldparam err [StandardError] error object if request failed
546
+ #
547
+ # @return [Google::Apis::AndroidenterpriseV1::StoreLayout]
548
+ #
549
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
550
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
551
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
552
+ def get_enterprise_store_layout(enterprise_id, fields: nil, quota_user: nil, options: nil, &block)
553
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/storeLayout', options)
554
+ command.response_representation = Google::Apis::AndroidenterpriseV1::StoreLayout::Representation
555
+ command.response_class = Google::Apis::AndroidenterpriseV1::StoreLayout
556
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
557
+ command.query['fields'] = fields unless fields.nil?
558
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
559
+ execute_or_queue_command(command, &block)
560
+ end
561
+
562
+ # Looks up an enterprise by domain name. This is only supported for enterprises
563
+ # created via the Google-initiated creation flow. Lookup of the id is not needed
564
+ # for enterprises created via the EMM-initiated flow since the EMM learns the
565
+ # enterprise ID in the callback specified in the Enterprises.generateSignupUrl
566
+ # call.
567
+ # @param [String] domain
568
+ # Required. The exact primary domain name of the enterprise to look up.
569
+ # @param [String] fields
570
+ # Selector specifying which fields to include in a partial response.
571
+ # @param [String] quota_user
572
+ # Available to use for quota purposes for server-side applications. Can be any
573
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
574
+ # @param [Google::Apis::RequestOptions] options
575
+ # Request-specific options
576
+ #
577
+ # @yield [result, err] Result & error if block supplied
578
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ListEnterprisesResponse] parsed result object
579
+ # @yieldparam err [StandardError] error object if request failed
580
+ #
581
+ # @return [Google::Apis::AndroidenterpriseV1::ListEnterprisesResponse]
582
+ #
583
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
584
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
585
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
586
+ def list_enterprises(domain, fields: nil, quota_user: nil, options: nil, &block)
587
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises', options)
588
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ListEnterprisesResponse::Representation
589
+ command.response_class = Google::Apis::AndroidenterpriseV1::ListEnterprisesResponse
590
+ command.query['domain'] = domain unless domain.nil?
591
+ command.query['fields'] = fields unless fields.nil?
592
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
593
+ execute_or_queue_command(command, &block)
594
+ end
595
+
596
+ # Pulls and returns a notification set for the enterprises associated with the
597
+ # service account authenticated for the request. The notification set may be
598
+ # empty if no notification are pending. A notification set returned needs to be
599
+ # acknowledged within 20 seconds by calling Enterprises.
600
+ # AcknowledgeNotificationSet, unless the notification set is empty.
601
+ # Notifications that are not acknowledged within the 20 seconds will eventually
602
+ # be included again in the response to another PullNotificationSet request, and
603
+ # those that are never acknowledged will ultimately be deleted according to the
604
+ # Google Cloud Platform Pub/Sub system policy. Multiple requests might be
605
+ # performed concurrently to retrieve notifications, in which case the pending
606
+ # notifications (if any) will be split among each caller, if any are pending. If
607
+ # no notifications are present, an empty notification list is returned.
608
+ # Subsequent requests may return more notifications once they become available.
609
+ # @param [String] request_mode
610
+ # The request mode for pulling notifications. Specifying waitForNotifications
611
+ # will cause the request to block and wait until one or more notifications are
612
+ # present, or return an empty notification list if no notifications are present
613
+ # after some time. Speciying returnImmediately will cause the request to
614
+ # immediately return the pending notifications, or an empty list if no
615
+ # notifications are present. If omitted, defaults to waitForNotifications.
616
+ # @param [String] fields
617
+ # Selector specifying which fields to include in a partial response.
618
+ # @param [String] quota_user
619
+ # Available to use for quota purposes for server-side applications. Can be any
620
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
621
+ # @param [Google::Apis::RequestOptions] options
622
+ # Request-specific options
623
+ #
624
+ # @yield [result, err] Result & error if block supplied
625
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::NotificationSet] parsed result object
626
+ # @yieldparam err [StandardError] error object if request failed
627
+ #
628
+ # @return [Google::Apis::AndroidenterpriseV1::NotificationSet]
629
+ #
630
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
631
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
632
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
633
+ def pull_enterprise_notification_set(request_mode: nil, fields: nil, quota_user: nil, options: nil, &block)
634
+ command = make_simple_command(:post, 'androidenterprise/v1/enterprises/pullNotificationSet', options)
635
+ command.response_representation = Google::Apis::AndroidenterpriseV1::NotificationSet::Representation
636
+ command.response_class = Google::Apis::AndroidenterpriseV1::NotificationSet
637
+ command.query['requestMode'] = request_mode unless request_mode.nil?
638
+ command.query['fields'] = fields unless fields.nil?
639
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
640
+ execute_or_queue_command(command, &block)
641
+ end
642
+
643
+ # Sends a test notification to validate the EMM integration with the Google
644
+ # Cloud Pub/Sub service for this enterprise.
645
+ # @param [String] enterprise_id
646
+ # The ID of the enterprise.
647
+ # @param [String] fields
648
+ # Selector specifying which fields to include in a partial response.
649
+ # @param [String] quota_user
650
+ # Available to use for quota purposes for server-side applications. Can be any
651
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
652
+ # @param [Google::Apis::RequestOptions] options
653
+ # Request-specific options
654
+ #
655
+ # @yield [result, err] Result & error if block supplied
656
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::SendTestPushNotificationResponse] parsed result object
657
+ # @yieldparam err [StandardError] error object if request failed
658
+ #
659
+ # @return [Google::Apis::AndroidenterpriseV1::SendTestPushNotificationResponse]
660
+ #
661
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
662
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
663
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
664
+ def send_enterprise_test_push_notification(enterprise_id, fields: nil, quota_user: nil, options: nil, &block)
665
+ command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/sendTestPushNotification', options)
666
+ command.response_representation = Google::Apis::AndroidenterpriseV1::SendTestPushNotificationResponse::Representation
667
+ command.response_class = Google::Apis::AndroidenterpriseV1::SendTestPushNotificationResponse
668
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
669
+ command.query['fields'] = fields unless fields.nil?
670
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
671
+ execute_or_queue_command(command, &block)
672
+ end
673
+
674
+ # Sets the account that will be used to authenticate to the API as the
675
+ # enterprise.
676
+ # @param [String] enterprise_id
677
+ # The ID of the enterprise.
678
+ # @param [Google::Apis::AndroidenterpriseV1::EnterpriseAccount] enterprise_account_object
679
+ # @param [String] fields
680
+ # Selector specifying which fields to include in a partial response.
681
+ # @param [String] quota_user
682
+ # Available to use for quota purposes for server-side applications. Can be any
683
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
684
+ # @param [Google::Apis::RequestOptions] options
685
+ # Request-specific options
686
+ #
687
+ # @yield [result, err] Result & error if block supplied
688
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::EnterpriseAccount] parsed result object
689
+ # @yieldparam err [StandardError] error object if request failed
690
+ #
691
+ # @return [Google::Apis::AndroidenterpriseV1::EnterpriseAccount]
692
+ #
693
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
694
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
695
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
696
+ def set_enterprise_account(enterprise_id, enterprise_account_object = nil, fields: nil, quota_user: nil, options: nil, &block)
697
+ command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/account', options)
698
+ command.request_representation = Google::Apis::AndroidenterpriseV1::EnterpriseAccount::Representation
699
+ command.request_object = enterprise_account_object
700
+ command.response_representation = Google::Apis::AndroidenterpriseV1::EnterpriseAccount::Representation
701
+ command.response_class = Google::Apis::AndroidenterpriseV1::EnterpriseAccount
702
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
703
+ command.query['fields'] = fields unless fields.nil?
704
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
705
+ execute_or_queue_command(command, &block)
706
+ end
707
+
708
+ # Sets the store layout for the enterprise. By default, storeLayoutType is set
709
+ # to "basic" and the basic store layout is enabled. The basic layout only
710
+ # contains apps approved by the admin, and that have been added to the available
711
+ # product set for a user (using the setAvailableProductSet call). Apps on the
712
+ # page are sorted in order of their product ID value. If you create a custom
713
+ # store layout (by setting storeLayoutType = "custom" and setting a homepage),
714
+ # the basic store layout is disabled.
715
+ # @param [String] enterprise_id
716
+ # The ID of the enterprise.
717
+ # @param [Google::Apis::AndroidenterpriseV1::StoreLayout] store_layout_object
718
+ # @param [String] fields
719
+ # Selector specifying which fields to include in a partial response.
720
+ # @param [String] quota_user
721
+ # Available to use for quota purposes for server-side applications. Can be any
722
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
723
+ # @param [Google::Apis::RequestOptions] options
724
+ # Request-specific options
725
+ #
726
+ # @yield [result, err] Result & error if block supplied
727
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::StoreLayout] parsed result object
728
+ # @yieldparam err [StandardError] error object if request failed
729
+ #
730
+ # @return [Google::Apis::AndroidenterpriseV1::StoreLayout]
731
+ #
732
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
733
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
734
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
735
+ def set_enterprise_store_layout(enterprise_id, store_layout_object = nil, fields: nil, quota_user: nil, options: nil, &block)
736
+ command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/storeLayout', options)
737
+ command.request_representation = Google::Apis::AndroidenterpriseV1::StoreLayout::Representation
738
+ command.request_object = store_layout_object
739
+ command.response_representation = Google::Apis::AndroidenterpriseV1::StoreLayout::Representation
740
+ command.response_class = Google::Apis::AndroidenterpriseV1::StoreLayout
741
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
742
+ command.query['fields'] = fields unless fields.nil?
743
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
744
+ execute_or_queue_command(command, &block)
745
+ end
746
+
747
+ # Unenrolls an enterprise from the calling EMM.
748
+ # @param [String] enterprise_id
749
+ # The ID of the enterprise.
750
+ # @param [String] fields
751
+ # Selector specifying which fields to include in a partial response.
752
+ # @param [String] quota_user
753
+ # Available to use for quota purposes for server-side applications. Can be any
754
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
755
+ # @param [Google::Apis::RequestOptions] options
756
+ # Request-specific options
757
+ #
758
+ # @yield [result, err] Result & error if block supplied
759
+ # @yieldparam result [NilClass] No result returned for this method
760
+ # @yieldparam err [StandardError] error object if request failed
761
+ #
762
+ # @return [void]
763
+ #
764
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
765
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
766
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
767
+ def unenroll_enterprise(enterprise_id, fields: nil, quota_user: nil, options: nil, &block)
768
+ command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/unenroll', options)
769
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
770
+ command.query['fields'] = fields unless fields.nil?
771
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
772
+ execute_or_queue_command(command, &block)
773
+ end
774
+
775
+ # Removes an entitlement to an app for a user.
776
+ # @param [String] enterprise_id
777
+ # The ID of the enterprise.
778
+ # @param [String] user_id
779
+ # The ID of the user.
780
+ # @param [String] entitlement_id
781
+ # The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm".
782
+ # @param [String] fields
783
+ # Selector specifying which fields to include in a partial response.
784
+ # @param [String] quota_user
785
+ # Available to use for quota purposes for server-side applications. Can be any
786
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
787
+ # @param [Google::Apis::RequestOptions] options
788
+ # Request-specific options
789
+ #
790
+ # @yield [result, err] Result & error if block supplied
791
+ # @yieldparam result [NilClass] No result returned for this method
792
+ # @yieldparam err [StandardError] error object if request failed
793
+ #
794
+ # @return [void]
795
+ #
796
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
797
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
798
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
799
+ def delete_entitlement(enterprise_id, user_id, entitlement_id, fields: nil, quota_user: nil, options: nil, &block)
800
+ command = make_simple_command(:delete, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}', options)
801
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
802
+ command.params['userId'] = user_id unless user_id.nil?
803
+ command.params['entitlementId'] = entitlement_id unless entitlement_id.nil?
804
+ command.query['fields'] = fields unless fields.nil?
805
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
806
+ execute_or_queue_command(command, &block)
807
+ end
808
+
809
+ # Retrieves details of an entitlement.
810
+ # @param [String] enterprise_id
811
+ # The ID of the enterprise.
812
+ # @param [String] user_id
813
+ # The ID of the user.
814
+ # @param [String] entitlement_id
815
+ # The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm".
816
+ # @param [String] fields
817
+ # Selector specifying which fields to include in a partial response.
818
+ # @param [String] quota_user
819
+ # Available to use for quota purposes for server-side applications. Can be any
820
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
821
+ # @param [Google::Apis::RequestOptions] options
822
+ # Request-specific options
823
+ #
824
+ # @yield [result, err] Result & error if block supplied
825
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Entitlement] parsed result object
826
+ # @yieldparam err [StandardError] error object if request failed
827
+ #
828
+ # @return [Google::Apis::AndroidenterpriseV1::Entitlement]
829
+ #
830
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
831
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
832
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
833
+ def get_entitlement(enterprise_id, user_id, entitlement_id, fields: nil, quota_user: nil, options: nil, &block)
834
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}', options)
835
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Entitlement::Representation
836
+ command.response_class = Google::Apis::AndroidenterpriseV1::Entitlement
837
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
838
+ command.params['userId'] = user_id unless user_id.nil?
839
+ command.params['entitlementId'] = entitlement_id unless entitlement_id.nil?
840
+ command.query['fields'] = fields unless fields.nil?
841
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
842
+ execute_or_queue_command(command, &block)
843
+ end
844
+
845
+ # Lists all entitlements for the specified user. Only the ID is set.
846
+ # @param [String] enterprise_id
847
+ # The ID of the enterprise.
848
+ # @param [String] user_id
849
+ # The ID of the user.
850
+ # @param [String] fields
851
+ # Selector specifying which fields to include in a partial response.
852
+ # @param [String] quota_user
853
+ # Available to use for quota purposes for server-side applications. Can be any
854
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
855
+ # @param [Google::Apis::RequestOptions] options
856
+ # Request-specific options
857
+ #
858
+ # @yield [result, err] Result & error if block supplied
859
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ListEntitlementsResponse] parsed result object
860
+ # @yieldparam err [StandardError] error object if request failed
861
+ #
862
+ # @return [Google::Apis::AndroidenterpriseV1::ListEntitlementsResponse]
863
+ #
864
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
865
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
866
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
867
+ def list_entitlements(enterprise_id, user_id, fields: nil, quota_user: nil, options: nil, &block)
868
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements', options)
869
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ListEntitlementsResponse::Representation
870
+ command.response_class = Google::Apis::AndroidenterpriseV1::ListEntitlementsResponse
871
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
872
+ command.params['userId'] = user_id unless user_id.nil?
873
+ command.query['fields'] = fields unless fields.nil?
874
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
875
+ execute_or_queue_command(command, &block)
876
+ end
877
+
878
+ # Adds or updates an entitlement to an app for a user.
879
+ # @param [String] enterprise_id
880
+ # The ID of the enterprise.
881
+ # @param [String] user_id
882
+ # The ID of the user.
883
+ # @param [String] entitlement_id
884
+ # The ID of the entitlement (a product ID), e.g. "app:com.google.android.gm".
885
+ # @param [Google::Apis::AndroidenterpriseV1::Entitlement] entitlement_object
886
+ # @param [Boolean] install
887
+ # Set to true to also install the product on all the user's devices where
888
+ # possible. Failure to install on one or more devices will not prevent this
889
+ # operation from returning successfully, as long as the entitlement was
890
+ # successfully assigned to the user.
891
+ # @param [String] fields
892
+ # Selector specifying which fields to include in a partial response.
893
+ # @param [String] quota_user
894
+ # Available to use for quota purposes for server-side applications. Can be any
895
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
896
+ # @param [Google::Apis::RequestOptions] options
897
+ # Request-specific options
898
+ #
899
+ # @yield [result, err] Result & error if block supplied
900
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Entitlement] parsed result object
901
+ # @yieldparam err [StandardError] error object if request failed
902
+ #
903
+ # @return [Google::Apis::AndroidenterpriseV1::Entitlement]
904
+ #
905
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
906
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
907
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
908
+ def update_entitlement(enterprise_id, user_id, entitlement_id, entitlement_object = nil, install: nil, fields: nil, quota_user: nil, options: nil, &block)
909
+ command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/entitlements/{entitlementId}', options)
910
+ command.request_representation = Google::Apis::AndroidenterpriseV1::Entitlement::Representation
911
+ command.request_object = entitlement_object
912
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Entitlement::Representation
913
+ command.response_class = Google::Apis::AndroidenterpriseV1::Entitlement
914
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
915
+ command.params['userId'] = user_id unless user_id.nil?
916
+ command.params['entitlementId'] = entitlement_id unless entitlement_id.nil?
917
+ command.query['install'] = install unless install.nil?
918
+ command.query['fields'] = fields unless fields.nil?
919
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
920
+ execute_or_queue_command(command, &block)
921
+ end
922
+
923
+ # Retrieves details of an enterprise's group license for a product.
924
+ # @param [String] enterprise_id
925
+ # The ID of the enterprise.
926
+ # @param [String] group_license_id
927
+ # The ID of the product the group license is for, e.g. "app:com.google.android.
928
+ # gm".
929
+ # @param [String] fields
930
+ # Selector specifying which fields to include in a partial response.
931
+ # @param [String] quota_user
932
+ # Available to use for quota purposes for server-side applications. Can be any
933
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
934
+ # @param [Google::Apis::RequestOptions] options
935
+ # Request-specific options
936
+ #
937
+ # @yield [result, err] Result & error if block supplied
938
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::GroupLicense] parsed result object
939
+ # @yieldparam err [StandardError] error object if request failed
940
+ #
941
+ # @return [Google::Apis::AndroidenterpriseV1::GroupLicense]
942
+ #
943
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
944
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
945
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
946
+ def get_group_license(enterprise_id, group_license_id, fields: nil, quota_user: nil, options: nil, &block)
947
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/groupLicenses/{groupLicenseId}', options)
948
+ command.response_representation = Google::Apis::AndroidenterpriseV1::GroupLicense::Representation
949
+ command.response_class = Google::Apis::AndroidenterpriseV1::GroupLicense
950
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
951
+ command.params['groupLicenseId'] = group_license_id unless group_license_id.nil?
952
+ command.query['fields'] = fields unless fields.nil?
953
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
954
+ execute_or_queue_command(command, &block)
955
+ end
956
+
957
+ # Retrieves IDs of all products for which the enterprise has a group license.
958
+ # @param [String] enterprise_id
959
+ # The ID of the enterprise.
960
+ # @param [String] fields
961
+ # Selector specifying which fields to include in a partial response.
962
+ # @param [String] quota_user
963
+ # Available to use for quota purposes for server-side applications. Can be any
964
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
965
+ # @param [Google::Apis::RequestOptions] options
966
+ # Request-specific options
967
+ #
968
+ # @yield [result, err] Result & error if block supplied
969
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ListGroupLicensesResponse] parsed result object
970
+ # @yieldparam err [StandardError] error object if request failed
971
+ #
972
+ # @return [Google::Apis::AndroidenterpriseV1::ListGroupLicensesResponse]
973
+ #
974
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
975
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
976
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
977
+ def list_group_licenses(enterprise_id, fields: nil, quota_user: nil, options: nil, &block)
978
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/groupLicenses', options)
979
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ListGroupLicensesResponse::Representation
980
+ command.response_class = Google::Apis::AndroidenterpriseV1::ListGroupLicensesResponse
981
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
982
+ command.query['fields'] = fields unless fields.nil?
983
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
984
+ execute_or_queue_command(command, &block)
985
+ end
986
+
987
+ # Retrieves the IDs of the users who have been granted entitlements under the
988
+ # license.
989
+ # @param [String] enterprise_id
990
+ # The ID of the enterprise.
991
+ # @param [String] group_license_id
992
+ # The ID of the product the group license is for, e.g. "app:com.google.android.
993
+ # gm".
994
+ # @param [String] fields
995
+ # Selector specifying which fields to include in a partial response.
996
+ # @param [String] quota_user
997
+ # Available to use for quota purposes for server-side applications. Can be any
998
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
999
+ # @param [Google::Apis::RequestOptions] options
1000
+ # Request-specific options
1001
+ #
1002
+ # @yield [result, err] Result & error if block supplied
1003
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ListGroupLicenseUsersResponse] parsed result object
1004
+ # @yieldparam err [StandardError] error object if request failed
1005
+ #
1006
+ # @return [Google::Apis::AndroidenterpriseV1::ListGroupLicenseUsersResponse]
1007
+ #
1008
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1009
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1010
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1011
+ def list_group_license_users(enterprise_id, group_license_id, fields: nil, quota_user: nil, options: nil, &block)
1012
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/groupLicenses/{groupLicenseId}/users', options)
1013
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ListGroupLicenseUsersResponse::Representation
1014
+ command.response_class = Google::Apis::AndroidenterpriseV1::ListGroupLicenseUsersResponse
1015
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1016
+ command.params['groupLicenseId'] = group_license_id unless group_license_id.nil?
1017
+ command.query['fields'] = fields unless fields.nil?
1018
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1019
+ execute_or_queue_command(command, &block)
1020
+ end
1021
+
1022
+ # Requests to remove an app from a device. A call to get or list will still show
1023
+ # the app as installed on the device until it is actually removed.
1024
+ # @param [String] enterprise_id
1025
+ # The ID of the enterprise.
1026
+ # @param [String] user_id
1027
+ # The ID of the user.
1028
+ # @param [String] device_id
1029
+ # The Android ID of the device.
1030
+ # @param [String] install_id
1031
+ # The ID of the product represented by the install, e.g. "app:com.google.android.
1032
+ # gm".
1033
+ # @param [String] fields
1034
+ # Selector specifying which fields to include in a partial response.
1035
+ # @param [String] quota_user
1036
+ # Available to use for quota purposes for server-side applications. Can be any
1037
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1038
+ # @param [Google::Apis::RequestOptions] options
1039
+ # Request-specific options
1040
+ #
1041
+ # @yield [result, err] Result & error if block supplied
1042
+ # @yieldparam result [NilClass] No result returned for this method
1043
+ # @yieldparam err [StandardError] error object if request failed
1044
+ #
1045
+ # @return [void]
1046
+ #
1047
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1048
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1049
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1050
+ def delete_install(enterprise_id, user_id, device_id, install_id, fields: nil, quota_user: nil, options: nil, &block)
1051
+ command = make_simple_command(:delete, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}', options)
1052
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1053
+ command.params['userId'] = user_id unless user_id.nil?
1054
+ command.params['deviceId'] = device_id unless device_id.nil?
1055
+ command.params['installId'] = install_id unless install_id.nil?
1056
+ command.query['fields'] = fields unless fields.nil?
1057
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1058
+ execute_or_queue_command(command, &block)
1059
+ end
1060
+
1061
+ # Retrieves details of an installation of an app on a device.
1062
+ # @param [String] enterprise_id
1063
+ # The ID of the enterprise.
1064
+ # @param [String] user_id
1065
+ # The ID of the user.
1066
+ # @param [String] device_id
1067
+ # The Android ID of the device.
1068
+ # @param [String] install_id
1069
+ # The ID of the product represented by the install, e.g. "app:com.google.android.
1070
+ # gm".
1071
+ # @param [String] fields
1072
+ # Selector specifying which fields to include in a partial response.
1073
+ # @param [String] quota_user
1074
+ # Available to use for quota purposes for server-side applications. Can be any
1075
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1076
+ # @param [Google::Apis::RequestOptions] options
1077
+ # Request-specific options
1078
+ #
1079
+ # @yield [result, err] Result & error if block supplied
1080
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Install] parsed result object
1081
+ # @yieldparam err [StandardError] error object if request failed
1082
+ #
1083
+ # @return [Google::Apis::AndroidenterpriseV1::Install]
1084
+ #
1085
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1086
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1087
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1088
+ def get_install(enterprise_id, user_id, device_id, install_id, fields: nil, quota_user: nil, options: nil, &block)
1089
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}', options)
1090
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Install::Representation
1091
+ command.response_class = Google::Apis::AndroidenterpriseV1::Install
1092
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1093
+ command.params['userId'] = user_id unless user_id.nil?
1094
+ command.params['deviceId'] = device_id unless device_id.nil?
1095
+ command.params['installId'] = install_id unless install_id.nil?
1096
+ command.query['fields'] = fields unless fields.nil?
1097
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1098
+ execute_or_queue_command(command, &block)
1099
+ end
1100
+
1101
+ # Retrieves the details of all apps installed on the specified device.
1102
+ # @param [String] enterprise_id
1103
+ # The ID of the enterprise.
1104
+ # @param [String] user_id
1105
+ # The ID of the user.
1106
+ # @param [String] device_id
1107
+ # The Android ID of the device.
1108
+ # @param [String] fields
1109
+ # Selector specifying which fields to include in a partial response.
1110
+ # @param [String] quota_user
1111
+ # Available to use for quota purposes for server-side applications. Can be any
1112
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1113
+ # @param [Google::Apis::RequestOptions] options
1114
+ # Request-specific options
1115
+ #
1116
+ # @yield [result, err] Result & error if block supplied
1117
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ListInstallsResponse] parsed result object
1118
+ # @yieldparam err [StandardError] error object if request failed
1119
+ #
1120
+ # @return [Google::Apis::AndroidenterpriseV1::ListInstallsResponse]
1121
+ #
1122
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1123
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1124
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1125
+ def list_installs(enterprise_id, user_id, device_id, fields: nil, quota_user: nil, options: nil, &block)
1126
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs', options)
1127
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ListInstallsResponse::Representation
1128
+ command.response_class = Google::Apis::AndroidenterpriseV1::ListInstallsResponse
1129
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1130
+ command.params['userId'] = user_id unless user_id.nil?
1131
+ command.params['deviceId'] = device_id unless device_id.nil?
1132
+ command.query['fields'] = fields unless fields.nil?
1133
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1134
+ execute_or_queue_command(command, &block)
1135
+ end
1136
+
1137
+ # Requests to install the latest version of an app to a device. If the app is
1138
+ # already installed, then it is updated to the latest version if necessary.
1139
+ # @param [String] enterprise_id
1140
+ # The ID of the enterprise.
1141
+ # @param [String] user_id
1142
+ # The ID of the user.
1143
+ # @param [String] device_id
1144
+ # The Android ID of the device.
1145
+ # @param [String] install_id
1146
+ # The ID of the product represented by the install, e.g. "app:com.google.android.
1147
+ # gm".
1148
+ # @param [Google::Apis::AndroidenterpriseV1::Install] install_object
1149
+ # @param [String] fields
1150
+ # Selector specifying which fields to include in a partial response.
1151
+ # @param [String] quota_user
1152
+ # Available to use for quota purposes for server-side applications. Can be any
1153
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1154
+ # @param [Google::Apis::RequestOptions] options
1155
+ # Request-specific options
1156
+ #
1157
+ # @yield [result, err] Result & error if block supplied
1158
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Install] parsed result object
1159
+ # @yieldparam err [StandardError] error object if request failed
1160
+ #
1161
+ # @return [Google::Apis::AndroidenterpriseV1::Install]
1162
+ #
1163
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1164
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1165
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1166
+ def update_install(enterprise_id, user_id, device_id, install_id, install_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1167
+ command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/installs/{installId}', options)
1168
+ command.request_representation = Google::Apis::AndroidenterpriseV1::Install::Representation
1169
+ command.request_object = install_object
1170
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Install::Representation
1171
+ command.response_class = Google::Apis::AndroidenterpriseV1::Install
1172
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1173
+ command.params['userId'] = user_id unless user_id.nil?
1174
+ command.params['deviceId'] = device_id unless device_id.nil?
1175
+ command.params['installId'] = install_id unless install_id.nil?
1176
+ command.query['fields'] = fields unless fields.nil?
1177
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1178
+ execute_or_queue_command(command, &block)
1179
+ end
1180
+
1181
+ # Removes a per-device managed configuration for an app for the specified device.
1182
+ # @param [String] enterprise_id
1183
+ # The ID of the enterprise.
1184
+ # @param [String] user_id
1185
+ # The ID of the user.
1186
+ # @param [String] device_id
1187
+ # The Android ID of the device.
1188
+ # @param [String] managed_configuration_for_device_id
1189
+ # The ID of the managed configuration (a product ID), e.g. "app:com.google.
1190
+ # android.gm".
1191
+ # @param [String] fields
1192
+ # Selector specifying which fields to include in a partial response.
1193
+ # @param [String] quota_user
1194
+ # Available to use for quota purposes for server-side applications. Can be any
1195
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1196
+ # @param [Google::Apis::RequestOptions] options
1197
+ # Request-specific options
1198
+ #
1199
+ # @yield [result, err] Result & error if block supplied
1200
+ # @yieldparam result [NilClass] No result returned for this method
1201
+ # @yieldparam err [StandardError] error object if request failed
1202
+ #
1203
+ # @return [void]
1204
+ #
1205
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1206
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1207
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1208
+ def delete_managedconfigurationsfordevice(enterprise_id, user_id, device_id, managed_configuration_for_device_id, fields: nil, quota_user: nil, options: nil, &block)
1209
+ command = make_simple_command(:delete, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}', options)
1210
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1211
+ command.params['userId'] = user_id unless user_id.nil?
1212
+ command.params['deviceId'] = device_id unless device_id.nil?
1213
+ command.params['managedConfigurationForDeviceId'] = managed_configuration_for_device_id unless managed_configuration_for_device_id.nil?
1214
+ command.query['fields'] = fields unless fields.nil?
1215
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1216
+ execute_or_queue_command(command, &block)
1217
+ end
1218
+
1219
+ # Retrieves details of a per-device managed configuration.
1220
+ # @param [String] enterprise_id
1221
+ # The ID of the enterprise.
1222
+ # @param [String] user_id
1223
+ # The ID of the user.
1224
+ # @param [String] device_id
1225
+ # The Android ID of the device.
1226
+ # @param [String] managed_configuration_for_device_id
1227
+ # The ID of the managed configuration (a product ID), e.g. "app:com.google.
1228
+ # android.gm".
1229
+ # @param [String] fields
1230
+ # Selector specifying which fields to include in a partial response.
1231
+ # @param [String] quota_user
1232
+ # Available to use for quota purposes for server-side applications. Can be any
1233
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1234
+ # @param [Google::Apis::RequestOptions] options
1235
+ # Request-specific options
1236
+ #
1237
+ # @yield [result, err] Result & error if block supplied
1238
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ManagedConfiguration] parsed result object
1239
+ # @yieldparam err [StandardError] error object if request failed
1240
+ #
1241
+ # @return [Google::Apis::AndroidenterpriseV1::ManagedConfiguration]
1242
+ #
1243
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1244
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1245
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1246
+ def get_managedconfigurationsfordevice(enterprise_id, user_id, device_id, managed_configuration_for_device_id, fields: nil, quota_user: nil, options: nil, &block)
1247
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}', options)
1248
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ManagedConfiguration::Representation
1249
+ command.response_class = Google::Apis::AndroidenterpriseV1::ManagedConfiguration
1250
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1251
+ command.params['userId'] = user_id unless user_id.nil?
1252
+ command.params['deviceId'] = device_id unless device_id.nil?
1253
+ command.params['managedConfigurationForDeviceId'] = managed_configuration_for_device_id unless managed_configuration_for_device_id.nil?
1254
+ command.query['fields'] = fields unless fields.nil?
1255
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1256
+ execute_or_queue_command(command, &block)
1257
+ end
1258
+
1259
+ # Lists all the per-device managed configurations for the specified device. Only
1260
+ # the ID is set.
1261
+ # @param [String] enterprise_id
1262
+ # The ID of the enterprise.
1263
+ # @param [String] user_id
1264
+ # The ID of the user.
1265
+ # @param [String] device_id
1266
+ # The Android ID of the device.
1267
+ # @param [String] fields
1268
+ # Selector specifying which fields to include in a partial response.
1269
+ # @param [String] quota_user
1270
+ # Available to use for quota purposes for server-side applications. Can be any
1271
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1272
+ # @param [Google::Apis::RequestOptions] options
1273
+ # Request-specific options
1274
+ #
1275
+ # @yield [result, err] Result & error if block supplied
1276
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ManagedConfigurationsForDeviceListResponse] parsed result object
1277
+ # @yieldparam err [StandardError] error object if request failed
1278
+ #
1279
+ # @return [Google::Apis::AndroidenterpriseV1::ManagedConfigurationsForDeviceListResponse]
1280
+ #
1281
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1282
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1283
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1284
+ def list_managedconfigurationsfordevices(enterprise_id, user_id, device_id, fields: nil, quota_user: nil, options: nil, &block)
1285
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice', options)
1286
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ManagedConfigurationsForDeviceListResponse::Representation
1287
+ command.response_class = Google::Apis::AndroidenterpriseV1::ManagedConfigurationsForDeviceListResponse
1288
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1289
+ command.params['userId'] = user_id unless user_id.nil?
1290
+ command.params['deviceId'] = device_id unless device_id.nil?
1291
+ command.query['fields'] = fields unless fields.nil?
1292
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1293
+ execute_or_queue_command(command, &block)
1294
+ end
1295
+
1296
+ # Adds or updates a per-device managed configuration for an app for the
1297
+ # specified device.
1298
+ # @param [String] enterprise_id
1299
+ # The ID of the enterprise.
1300
+ # @param [String] user_id
1301
+ # The ID of the user.
1302
+ # @param [String] device_id
1303
+ # The Android ID of the device.
1304
+ # @param [String] managed_configuration_for_device_id
1305
+ # The ID of the managed configuration (a product ID), e.g. "app:com.google.
1306
+ # android.gm".
1307
+ # @param [Google::Apis::AndroidenterpriseV1::ManagedConfiguration] managed_configuration_object
1308
+ # @param [String] fields
1309
+ # Selector specifying which fields to include in a partial response.
1310
+ # @param [String] quota_user
1311
+ # Available to use for quota purposes for server-side applications. Can be any
1312
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1313
+ # @param [Google::Apis::RequestOptions] options
1314
+ # Request-specific options
1315
+ #
1316
+ # @yield [result, err] Result & error if block supplied
1317
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ManagedConfiguration] parsed result object
1318
+ # @yieldparam err [StandardError] error object if request failed
1319
+ #
1320
+ # @return [Google::Apis::AndroidenterpriseV1::ManagedConfiguration]
1321
+ #
1322
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1323
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1324
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1325
+ def update_managedconfigurationsfordevice(enterprise_id, user_id, device_id, managed_configuration_for_device_id, managed_configuration_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1326
+ command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/devices/{deviceId}/managedConfigurationsForDevice/{managedConfigurationForDeviceId}', options)
1327
+ command.request_representation = Google::Apis::AndroidenterpriseV1::ManagedConfiguration::Representation
1328
+ command.request_object = managed_configuration_object
1329
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ManagedConfiguration::Representation
1330
+ command.response_class = Google::Apis::AndroidenterpriseV1::ManagedConfiguration
1331
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1332
+ command.params['userId'] = user_id unless user_id.nil?
1333
+ command.params['deviceId'] = device_id unless device_id.nil?
1334
+ command.params['managedConfigurationForDeviceId'] = managed_configuration_for_device_id unless managed_configuration_for_device_id.nil?
1335
+ command.query['fields'] = fields unless fields.nil?
1336
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1337
+ execute_or_queue_command(command, &block)
1338
+ end
1339
+
1340
+ # Removes a per-user managed configuration for an app for the specified user.
1341
+ # @param [String] enterprise_id
1342
+ # The ID of the enterprise.
1343
+ # @param [String] user_id
1344
+ # The ID of the user.
1345
+ # @param [String] managed_configuration_for_user_id
1346
+ # The ID of the managed configuration (a product ID), e.g. "app:com.google.
1347
+ # android.gm".
1348
+ # @param [String] fields
1349
+ # Selector specifying which fields to include in a partial response.
1350
+ # @param [String] quota_user
1351
+ # Available to use for quota purposes for server-side applications. Can be any
1352
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1353
+ # @param [Google::Apis::RequestOptions] options
1354
+ # Request-specific options
1355
+ #
1356
+ # @yield [result, err] Result & error if block supplied
1357
+ # @yieldparam result [NilClass] No result returned for this method
1358
+ # @yieldparam err [StandardError] error object if request failed
1359
+ #
1360
+ # @return [void]
1361
+ #
1362
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1363
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1364
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1365
+ def delete_managedconfigurationsforuser(enterprise_id, user_id, managed_configuration_for_user_id, fields: nil, quota_user: nil, options: nil, &block)
1366
+ command = make_simple_command(:delete, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}', options)
1367
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1368
+ command.params['userId'] = user_id unless user_id.nil?
1369
+ command.params['managedConfigurationForUserId'] = managed_configuration_for_user_id unless managed_configuration_for_user_id.nil?
1370
+ command.query['fields'] = fields unless fields.nil?
1371
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1372
+ execute_or_queue_command(command, &block)
1373
+ end
1374
+
1375
+ # Retrieves details of a per-user managed configuration for an app for the
1376
+ # specified user.
1377
+ # @param [String] enterprise_id
1378
+ # The ID of the enterprise.
1379
+ # @param [String] user_id
1380
+ # The ID of the user.
1381
+ # @param [String] managed_configuration_for_user_id
1382
+ # The ID of the managed configuration (a product ID), e.g. "app:com.google.
1383
+ # android.gm".
1384
+ # @param [String] fields
1385
+ # Selector specifying which fields to include in a partial response.
1386
+ # @param [String] quota_user
1387
+ # Available to use for quota purposes for server-side applications. Can be any
1388
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1389
+ # @param [Google::Apis::RequestOptions] options
1390
+ # Request-specific options
1391
+ #
1392
+ # @yield [result, err] Result & error if block supplied
1393
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ManagedConfiguration] parsed result object
1394
+ # @yieldparam err [StandardError] error object if request failed
1395
+ #
1396
+ # @return [Google::Apis::AndroidenterpriseV1::ManagedConfiguration]
1397
+ #
1398
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1399
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1400
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1401
+ def get_managedconfigurationsforuser(enterprise_id, user_id, managed_configuration_for_user_id, fields: nil, quota_user: nil, options: nil, &block)
1402
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}', options)
1403
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ManagedConfiguration::Representation
1404
+ command.response_class = Google::Apis::AndroidenterpriseV1::ManagedConfiguration
1405
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1406
+ command.params['userId'] = user_id unless user_id.nil?
1407
+ command.params['managedConfigurationForUserId'] = managed_configuration_for_user_id unless managed_configuration_for_user_id.nil?
1408
+ command.query['fields'] = fields unless fields.nil?
1409
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1410
+ execute_or_queue_command(command, &block)
1411
+ end
1412
+
1413
+ # Lists all the per-user managed configurations for the specified user. Only the
1414
+ # ID is set.
1415
+ # @param [String] enterprise_id
1416
+ # The ID of the enterprise.
1417
+ # @param [String] user_id
1418
+ # The ID of the user.
1419
+ # @param [String] fields
1420
+ # Selector specifying which fields to include in a partial response.
1421
+ # @param [String] quota_user
1422
+ # Available to use for quota purposes for server-side applications. Can be any
1423
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1424
+ # @param [Google::Apis::RequestOptions] options
1425
+ # Request-specific options
1426
+ #
1427
+ # @yield [result, err] Result & error if block supplied
1428
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ManagedConfigurationsForUserListResponse] parsed result object
1429
+ # @yieldparam err [StandardError] error object if request failed
1430
+ #
1431
+ # @return [Google::Apis::AndroidenterpriseV1::ManagedConfigurationsForUserListResponse]
1432
+ #
1433
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1434
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1435
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1436
+ def list_managedconfigurationsforusers(enterprise_id, user_id, fields: nil, quota_user: nil, options: nil, &block)
1437
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser', options)
1438
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ManagedConfigurationsForUserListResponse::Representation
1439
+ command.response_class = Google::Apis::AndroidenterpriseV1::ManagedConfigurationsForUserListResponse
1440
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1441
+ command.params['userId'] = user_id unless user_id.nil?
1442
+ command.query['fields'] = fields unless fields.nil?
1443
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1444
+ execute_or_queue_command(command, &block)
1445
+ end
1446
+
1447
+ # Adds or updates the managed configuration settings for an app for the
1448
+ # specified user. If you support the Managed configurations iframe, you can
1449
+ # apply managed configurations to a user by specifying an mcmId and its
1450
+ # associated configuration variables (if any) in the request. Alternatively, all
1451
+ # EMMs can apply managed configurations by passing a list of managed properties.
1452
+ # @param [String] enterprise_id
1453
+ # The ID of the enterprise.
1454
+ # @param [String] user_id
1455
+ # The ID of the user.
1456
+ # @param [String] managed_configuration_for_user_id
1457
+ # The ID of the managed configuration (a product ID), e.g. "app:com.google.
1458
+ # android.gm".
1459
+ # @param [Google::Apis::AndroidenterpriseV1::ManagedConfiguration] managed_configuration_object
1460
+ # @param [String] fields
1461
+ # Selector specifying which fields to include in a partial response.
1462
+ # @param [String] quota_user
1463
+ # Available to use for quota purposes for server-side applications. Can be any
1464
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1465
+ # @param [Google::Apis::RequestOptions] options
1466
+ # Request-specific options
1467
+ #
1468
+ # @yield [result, err] Result & error if block supplied
1469
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ManagedConfiguration] parsed result object
1470
+ # @yieldparam err [StandardError] error object if request failed
1471
+ #
1472
+ # @return [Google::Apis::AndroidenterpriseV1::ManagedConfiguration]
1473
+ #
1474
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1475
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1476
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1477
+ def update_managedconfigurationsforuser(enterprise_id, user_id, managed_configuration_for_user_id, managed_configuration_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1478
+ command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/managedConfigurationsForUser/{managedConfigurationForUserId}', options)
1479
+ command.request_representation = Google::Apis::AndroidenterpriseV1::ManagedConfiguration::Representation
1480
+ command.request_object = managed_configuration_object
1481
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ManagedConfiguration::Representation
1482
+ command.response_class = Google::Apis::AndroidenterpriseV1::ManagedConfiguration
1483
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1484
+ command.params['userId'] = user_id unless user_id.nil?
1485
+ command.params['managedConfigurationForUserId'] = managed_configuration_for_user_id unless managed_configuration_for_user_id.nil?
1486
+ command.query['fields'] = fields unless fields.nil?
1487
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1488
+ execute_or_queue_command(command, &block)
1489
+ end
1490
+
1491
+ # Lists all the managed configurations settings for the specified app.
1492
+ # @param [String] enterprise_id
1493
+ # The ID of the enterprise.
1494
+ # @param [String] product_id
1495
+ # The ID of the product for which the managed configurations settings applies to.
1496
+ # @param [String] fields
1497
+ # Selector specifying which fields to include in a partial response.
1498
+ # @param [String] quota_user
1499
+ # Available to use for quota purposes for server-side applications. Can be any
1500
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1501
+ # @param [Google::Apis::RequestOptions] options
1502
+ # Request-specific options
1503
+ #
1504
+ # @yield [result, err] Result & error if block supplied
1505
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ManagedConfigurationsSettingsListResponse] parsed result object
1506
+ # @yieldparam err [StandardError] error object if request failed
1507
+ #
1508
+ # @return [Google::Apis::AndroidenterpriseV1::ManagedConfigurationsSettingsListResponse]
1509
+ #
1510
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1511
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1512
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1513
+ def list_managedconfigurationssettings(enterprise_id, product_id, fields: nil, quota_user: nil, options: nil, &block)
1514
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/managedConfigurationsSettings', options)
1515
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ManagedConfigurationsSettingsListResponse::Representation
1516
+ command.response_class = Google::Apis::AndroidenterpriseV1::ManagedConfigurationsSettingsListResponse
1517
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1518
+ command.params['productId'] = product_id unless product_id.nil?
1519
+ command.query['fields'] = fields unless fields.nil?
1520
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1521
+ execute_or_queue_command(command, &block)
1522
+ end
1523
+
1524
+ # Retrieves details of an Android app permission for display to an enterprise
1525
+ # admin.
1526
+ # @param [String] permission_id
1527
+ # The ID of the permission.
1528
+ # @param [String] language
1529
+ # The BCP47 tag for the user's preferred language (e.g. "en-US", "de")
1530
+ # @param [String] fields
1531
+ # Selector specifying which fields to include in a partial response.
1532
+ # @param [String] quota_user
1533
+ # Available to use for quota purposes for server-side applications. Can be any
1534
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1535
+ # @param [Google::Apis::RequestOptions] options
1536
+ # Request-specific options
1537
+ #
1538
+ # @yield [result, err] Result & error if block supplied
1539
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Permission] parsed result object
1540
+ # @yieldparam err [StandardError] error object if request failed
1541
+ #
1542
+ # @return [Google::Apis::AndroidenterpriseV1::Permission]
1543
+ #
1544
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1545
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1546
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1547
+ def get_permission(permission_id, language: nil, fields: nil, quota_user: nil, options: nil, &block)
1548
+ command = make_simple_command(:get, 'androidenterprise/v1/permissions/{permissionId}', options)
1549
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Permission::Representation
1550
+ command.response_class = Google::Apis::AndroidenterpriseV1::Permission
1551
+ command.params['permissionId'] = permission_id unless permission_id.nil?
1552
+ command.query['language'] = language unless language.nil?
1553
+ command.query['fields'] = fields unless fields.nil?
1554
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1555
+ execute_or_queue_command(command, &block)
1556
+ end
1557
+
1558
+ # Approves the specified product and the relevant app permissions, if any. The
1559
+ # maximum number of products that you can approve per enterprise customer is 1,
1560
+ # 000. To learn how to use managed Google Play to design and create a store
1561
+ # layout to display approved products to your users, see Store Layout Design.
1562
+ # @param [String] enterprise_id
1563
+ # The ID of the enterprise.
1564
+ # @param [String] product_id
1565
+ # The ID of the product.
1566
+ # @param [Google::Apis::AndroidenterpriseV1::ApproveProductRequest] approve_product_request_object
1567
+ # @param [String] fields
1568
+ # Selector specifying which fields to include in a partial response.
1569
+ # @param [String] quota_user
1570
+ # Available to use for quota purposes for server-side applications. Can be any
1571
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1572
+ # @param [Google::Apis::RequestOptions] options
1573
+ # Request-specific options
1574
+ #
1575
+ # @yield [result, err] Result & error if block supplied
1576
+ # @yieldparam result [NilClass] No result returned for this method
1577
+ # @yieldparam err [StandardError] error object if request failed
1578
+ #
1579
+ # @return [void]
1580
+ #
1581
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1582
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1583
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1584
+ def approve_product(enterprise_id, product_id, approve_product_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1585
+ command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/approve', options)
1586
+ command.request_representation = Google::Apis::AndroidenterpriseV1::ApproveProductRequest::Representation
1587
+ command.request_object = approve_product_request_object
1588
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1589
+ command.params['productId'] = product_id unless product_id.nil?
1590
+ command.query['fields'] = fields unless fields.nil?
1591
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1592
+ execute_or_queue_command(command, &block)
1593
+ end
1594
+
1595
+ # Generates a URL that can be rendered in an iframe to display the permissions (
1596
+ # if any) of a product. An enterprise admin must view these permissions and
1597
+ # accept them on behalf of their organization in order to approve that product.
1598
+ # Admins should accept the displayed permissions by interacting with a separate
1599
+ # UI element in the EMM console, which in turn should trigger the use of this
1600
+ # URL as the approvalUrlInfo.approvalUrl property in a Products.approve call to
1601
+ # approve the product. This URL can only be used to display permissions for up
1602
+ # to 1 day.
1603
+ # @param [String] enterprise_id
1604
+ # The ID of the enterprise.
1605
+ # @param [String] product_id
1606
+ # The ID of the product.
1607
+ # @param [String] language_code
1608
+ # The BCP 47 language code used for permission names and descriptions in the
1609
+ # returned iframe, for instance "en-US".
1610
+ # @param [String] fields
1611
+ # Selector specifying which fields to include in a partial response.
1612
+ # @param [String] quota_user
1613
+ # Available to use for quota purposes for server-side applications. Can be any
1614
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1615
+ # @param [Google::Apis::RequestOptions] options
1616
+ # Request-specific options
1617
+ #
1618
+ # @yield [result, err] Result & error if block supplied
1619
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::GenerateProductApprovalUrlResponse] parsed result object
1620
+ # @yieldparam err [StandardError] error object if request failed
1621
+ #
1622
+ # @return [Google::Apis::AndroidenterpriseV1::GenerateProductApprovalUrlResponse]
1623
+ #
1624
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1625
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1626
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1627
+ def generate_product_approval_url(enterprise_id, product_id, language_code: nil, fields: nil, quota_user: nil, options: nil, &block)
1628
+ command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/generateApprovalUrl', options)
1629
+ command.response_representation = Google::Apis::AndroidenterpriseV1::GenerateProductApprovalUrlResponse::Representation
1630
+ command.response_class = Google::Apis::AndroidenterpriseV1::GenerateProductApprovalUrlResponse
1631
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1632
+ command.params['productId'] = product_id unless product_id.nil?
1633
+ command.query['languageCode'] = language_code unless language_code.nil?
1634
+ command.query['fields'] = fields unless fields.nil?
1635
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1636
+ execute_or_queue_command(command, &block)
1637
+ end
1638
+
1639
+ # Retrieves details of a product for display to an enterprise admin.
1640
+ # @param [String] enterprise_id
1641
+ # The ID of the enterprise.
1642
+ # @param [String] product_id
1643
+ # The ID of the product, e.g. "app:com.google.android.gm".
1644
+ # @param [String] language
1645
+ # The BCP47 tag for the user's preferred language (e.g. "en-US", "de").
1646
+ # @param [String] fields
1647
+ # Selector specifying which fields to include in a partial response.
1648
+ # @param [String] quota_user
1649
+ # Available to use for quota purposes for server-side applications. Can be any
1650
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1651
+ # @param [Google::Apis::RequestOptions] options
1652
+ # Request-specific options
1653
+ #
1654
+ # @yield [result, err] Result & error if block supplied
1655
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::Product] parsed result object
1656
+ # @yieldparam err [StandardError] error object if request failed
1657
+ #
1658
+ # @return [Google::Apis::AndroidenterpriseV1::Product]
1659
+ #
1660
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1661
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1662
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1663
+ def get_product(enterprise_id, product_id, language: nil, fields: nil, quota_user: nil, options: nil, &block)
1664
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}', options)
1665
+ command.response_representation = Google::Apis::AndroidenterpriseV1::Product::Representation
1666
+ command.response_class = Google::Apis::AndroidenterpriseV1::Product
1667
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1668
+ command.params['productId'] = product_id unless product_id.nil?
1669
+ command.query['language'] = language unless language.nil?
1670
+ command.query['fields'] = fields unless fields.nil?
1671
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1672
+ execute_or_queue_command(command, &block)
1673
+ end
1674
+
1675
+ # Retrieves the schema that defines the configurable properties for this product.
1676
+ # All products have a schema, but this schema may be empty if no managed
1677
+ # configurations have been defined. This schema can be used to populate a UI
1678
+ # that allows an admin to configure the product. To apply a managed
1679
+ # configuration based on the schema obtained using this API, see Managed
1680
+ # Configurations through Play.
1681
+ # @param [String] enterprise_id
1682
+ # The ID of the enterprise.
1683
+ # @param [String] product_id
1684
+ # The ID of the product.
1685
+ # @param [String] language
1686
+ # The BCP47 tag for the user's preferred language (e.g. "en-US", "de").
1687
+ # @param [String] fields
1688
+ # Selector specifying which fields to include in a partial response.
1689
+ # @param [String] quota_user
1690
+ # Available to use for quota purposes for server-side applications. Can be any
1691
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1692
+ # @param [Google::Apis::RequestOptions] options
1693
+ # Request-specific options
1694
+ #
1695
+ # @yield [result, err] Result & error if block supplied
1696
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::AppRestrictionsSchema] parsed result object
1697
+ # @yieldparam err [StandardError] error object if request failed
1698
+ #
1699
+ # @return [Google::Apis::AndroidenterpriseV1::AppRestrictionsSchema]
1700
+ #
1701
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1702
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1703
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1704
+ def get_product_app_restrictions_schema(enterprise_id, product_id, language: nil, fields: nil, quota_user: nil, options: nil, &block)
1705
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/appRestrictionsSchema', options)
1706
+ command.response_representation = Google::Apis::AndroidenterpriseV1::AppRestrictionsSchema::Representation
1707
+ command.response_class = Google::Apis::AndroidenterpriseV1::AppRestrictionsSchema
1708
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1709
+ command.params['productId'] = product_id unless product_id.nil?
1710
+ command.query['language'] = language unless language.nil?
1711
+ command.query['fields'] = fields unless fields.nil?
1712
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1713
+ execute_or_queue_command(command, &block)
1714
+ end
1715
+
1716
+ # Retrieves the Android app permissions required by this app.
1717
+ # @param [String] enterprise_id
1718
+ # The ID of the enterprise.
1719
+ # @param [String] product_id
1720
+ # The ID of the product.
1721
+ # @param [String] fields
1722
+ # Selector specifying which fields to include in a partial response.
1723
+ # @param [String] quota_user
1724
+ # Available to use for quota purposes for server-side applications. Can be any
1725
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1726
+ # @param [Google::Apis::RequestOptions] options
1727
+ # Request-specific options
1728
+ #
1729
+ # @yield [result, err] Result & error if block supplied
1730
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ProductPermissions] parsed result object
1731
+ # @yieldparam err [StandardError] error object if request failed
1732
+ #
1733
+ # @return [Google::Apis::AndroidenterpriseV1::ProductPermissions]
1734
+ #
1735
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1736
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1737
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1738
+ def get_product_permissions(enterprise_id, product_id, fields: nil, quota_user: nil, options: nil, &block)
1739
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/permissions', options)
1740
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ProductPermissions::Representation
1741
+ command.response_class = Google::Apis::AndroidenterpriseV1::ProductPermissions
1742
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1743
+ command.params['productId'] = product_id unless product_id.nil?
1744
+ command.query['fields'] = fields unless fields.nil?
1745
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1746
+ execute_or_queue_command(command, &block)
1747
+ end
1748
+
1749
+ # Finds approved products that match a query, or all approved products if there
1750
+ # is no query.
1751
+ # @param [String] enterprise_id
1752
+ # The ID of the enterprise.
1753
+ # @param [Boolean] approved
1754
+ # Specifies whether to search among all products (false) or among only products
1755
+ # that have been approved (true). Only "true" is supported, and should be
1756
+ # specified.
1757
+ # @param [String] language
1758
+ # The BCP47 tag for the user's preferred language (e.g. "en-US", "de"). Results
1759
+ # are returned in the language best matching the preferred language.
1760
+ # @param [Fixnum] max_results
1761
+ # Defines how many results the list operation should return. The default number
1762
+ # depends on the resource collection.
1763
+ # @param [String] query
1764
+ # The search query as typed in the Google Play store search box. If omitted, all
1765
+ # approved apps will be returned (using the pagination parameters), including
1766
+ # apps that are not available in the store (e.g. unpublished apps).
1767
+ # @param [String] token
1768
+ # Defines the token of the page to return, usually taken from TokenPagination.
1769
+ # This can only be used if token paging is enabled.
1770
+ # @param [String] fields
1771
+ # Selector specifying which fields to include in a partial response.
1772
+ # @param [String] quota_user
1773
+ # Available to use for quota purposes for server-side applications. Can be any
1774
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1775
+ # @param [Google::Apis::RequestOptions] options
1776
+ # Request-specific options
1777
+ #
1778
+ # @yield [result, err] Result & error if block supplied
1779
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ProductsListResponse] parsed result object
1780
+ # @yieldparam err [StandardError] error object if request failed
1781
+ #
1782
+ # @return [Google::Apis::AndroidenterpriseV1::ProductsListResponse]
1783
+ #
1784
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1785
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1786
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1787
+ def list_products(enterprise_id, approved: nil, language: nil, max_results: nil, query: nil, token: nil, fields: nil, quota_user: nil, options: nil, &block)
1788
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/products', options)
1789
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ProductsListResponse::Representation
1790
+ command.response_class = Google::Apis::AndroidenterpriseV1::ProductsListResponse
1791
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1792
+ command.query['approved'] = approved unless approved.nil?
1793
+ command.query['language'] = language unless language.nil?
1794
+ command.query['maxResults'] = max_results unless max_results.nil?
1795
+ command.query['query'] = query unless query.nil?
1796
+ command.query['token'] = token unless token.nil?
1797
+ command.query['fields'] = fields unless fields.nil?
1798
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1799
+ execute_or_queue_command(command, &block)
1800
+ end
1801
+
1802
+ # Unapproves the specified product (and the relevant app permissions, if any)
1803
+ # @param [String] enterprise_id
1804
+ # The ID of the enterprise.
1805
+ # @param [String] product_id
1806
+ # The ID of the product.
1807
+ # @param [String] fields
1808
+ # Selector specifying which fields to include in a partial response.
1809
+ # @param [String] quota_user
1810
+ # Available to use for quota purposes for server-side applications. Can be any
1811
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1812
+ # @param [Google::Apis::RequestOptions] options
1813
+ # Request-specific options
1814
+ #
1815
+ # @yield [result, err] Result & error if block supplied
1816
+ # @yieldparam result [NilClass] No result returned for this method
1817
+ # @yieldparam err [StandardError] error object if request failed
1818
+ #
1819
+ # @return [void]
1820
+ #
1821
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1822
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1823
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1824
+ def unapprove_product(enterprise_id, product_id, fields: nil, quota_user: nil, options: nil, &block)
1825
+ command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/products/{productId}/unapprove', options)
1826
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1827
+ command.params['productId'] = product_id unless product_id.nil?
1828
+ command.query['fields'] = fields unless fields.nil?
1829
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1830
+ execute_or_queue_command(command, &block)
1831
+ end
1832
+
1833
+ # Removes and invalidates the specified credentials for the service account
1834
+ # associated with this enterprise. The calling service account must have been
1835
+ # retrieved by calling Enterprises.GetServiceAccount and must have been set as
1836
+ # the enterprise service account by calling Enterprises.SetAccount.
1837
+ # @param [String] enterprise_id
1838
+ # The ID of the enterprise.
1839
+ # @param [String] key_id
1840
+ # The ID of the key.
1841
+ # @param [String] fields
1842
+ # Selector specifying which fields to include in a partial response.
1843
+ # @param [String] quota_user
1844
+ # Available to use for quota purposes for server-side applications. Can be any
1845
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1846
+ # @param [Google::Apis::RequestOptions] options
1847
+ # Request-specific options
1848
+ #
1849
+ # @yield [result, err] Result & error if block supplied
1850
+ # @yieldparam result [NilClass] No result returned for this method
1851
+ # @yieldparam err [StandardError] error object if request failed
1852
+ #
1853
+ # @return [void]
1854
+ #
1855
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1856
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1857
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1858
+ def delete_serviceaccountkey(enterprise_id, key_id, fields: nil, quota_user: nil, options: nil, &block)
1859
+ command = make_simple_command(:delete, 'androidenterprise/v1/enterprises/{enterpriseId}/serviceAccountKeys/{keyId}', options)
1860
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1861
+ command.params['keyId'] = key_id unless key_id.nil?
1862
+ command.query['fields'] = fields unless fields.nil?
1863
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1864
+ execute_or_queue_command(command, &block)
1865
+ end
1866
+
1867
+ # Generates new credentials for the service account associated with this
1868
+ # enterprise. The calling service account must have been retrieved by calling
1869
+ # Enterprises.GetServiceAccount and must have been set as the enterprise service
1870
+ # account by calling Enterprises.SetAccount. Only the type of the key should be
1871
+ # populated in the resource to be inserted.
1872
+ # @param [String] enterprise_id
1873
+ # The ID of the enterprise.
1874
+ # @param [Google::Apis::AndroidenterpriseV1::ServiceAccountKey] service_account_key_object
1875
+ # @param [String] fields
1876
+ # Selector specifying which fields to include in a partial response.
1877
+ # @param [String] quota_user
1878
+ # Available to use for quota purposes for server-side applications. Can be any
1879
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1880
+ # @param [Google::Apis::RequestOptions] options
1881
+ # Request-specific options
1882
+ #
1883
+ # @yield [result, err] Result & error if block supplied
1884
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ServiceAccountKey] parsed result object
1885
+ # @yieldparam err [StandardError] error object if request failed
1886
+ #
1887
+ # @return [Google::Apis::AndroidenterpriseV1::ServiceAccountKey]
1888
+ #
1889
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1890
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1891
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1892
+ def insert_serviceaccountkey(enterprise_id, service_account_key_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1893
+ command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/serviceAccountKeys', options)
1894
+ command.request_representation = Google::Apis::AndroidenterpriseV1::ServiceAccountKey::Representation
1895
+ command.request_object = service_account_key_object
1896
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ServiceAccountKey::Representation
1897
+ command.response_class = Google::Apis::AndroidenterpriseV1::ServiceAccountKey
1898
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1899
+ command.query['fields'] = fields unless fields.nil?
1900
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1901
+ execute_or_queue_command(command, &block)
1902
+ end
1903
+
1904
+ # Lists all active credentials for the service account associated with this
1905
+ # enterprise. Only the ID and key type are returned. The calling service account
1906
+ # must have been retrieved by calling Enterprises.GetServiceAccount and must
1907
+ # have been set as the enterprise service account by calling Enterprises.
1908
+ # SetAccount.
1909
+ # @param [String] enterprise_id
1910
+ # The ID of the enterprise.
1911
+ # @param [String] fields
1912
+ # Selector specifying which fields to include in a partial response.
1913
+ # @param [String] quota_user
1914
+ # Available to use for quota purposes for server-side applications. Can be any
1915
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1916
+ # @param [Google::Apis::RequestOptions] options
1917
+ # Request-specific options
1918
+ #
1919
+ # @yield [result, err] Result & error if block supplied
1920
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ServiceAccountKeysListResponse] parsed result object
1921
+ # @yieldparam err [StandardError] error object if request failed
1922
+ #
1923
+ # @return [Google::Apis::AndroidenterpriseV1::ServiceAccountKeysListResponse]
1924
+ #
1925
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1926
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1927
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1928
+ def list_serviceaccountkeys(enterprise_id, fields: nil, quota_user: nil, options: nil, &block)
1929
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/serviceAccountKeys', options)
1930
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ServiceAccountKeysListResponse::Representation
1931
+ command.response_class = Google::Apis::AndroidenterpriseV1::ServiceAccountKeysListResponse
1932
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1933
+ command.query['fields'] = fields unless fields.nil?
1934
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1935
+ execute_or_queue_command(command, &block)
1936
+ end
1937
+
1938
+ # Deletes a cluster.
1939
+ # @param [String] enterprise_id
1940
+ # The ID of the enterprise.
1941
+ # @param [String] page_id
1942
+ # The ID of the page.
1943
+ # @param [String] cluster_id
1944
+ # The ID of the cluster.
1945
+ # @param [String] fields
1946
+ # Selector specifying which fields to include in a partial response.
1947
+ # @param [String] quota_user
1948
+ # Available to use for quota purposes for server-side applications. Can be any
1949
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1950
+ # @param [Google::Apis::RequestOptions] options
1951
+ # Request-specific options
1952
+ #
1953
+ # @yield [result, err] Result & error if block supplied
1954
+ # @yieldparam result [NilClass] No result returned for this method
1955
+ # @yieldparam err [StandardError] error object if request failed
1956
+ #
1957
+ # @return [void]
1958
+ #
1959
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1960
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1961
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1962
+ def delete_storelayoutcluster(enterprise_id, page_id, cluster_id, fields: nil, quota_user: nil, options: nil, &block)
1963
+ command = make_simple_command(:delete, 'androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters/{clusterId}', options)
1964
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
1965
+ command.params['pageId'] = page_id unless page_id.nil?
1966
+ command.params['clusterId'] = cluster_id unless cluster_id.nil?
1967
+ command.query['fields'] = fields unless fields.nil?
1968
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1969
+ execute_or_queue_command(command, &block)
1970
+ end
1971
+
1972
+ # Retrieves details of a cluster.
1973
+ # @param [String] enterprise_id
1974
+ # The ID of the enterprise.
1975
+ # @param [String] page_id
1976
+ # The ID of the page.
1977
+ # @param [String] cluster_id
1978
+ # The ID of the cluster.
1979
+ # @param [String] fields
1980
+ # Selector specifying which fields to include in a partial response.
1981
+ # @param [String] quota_user
1982
+ # Available to use for quota purposes for server-side applications. Can be any
1983
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1984
+ # @param [Google::Apis::RequestOptions] options
1985
+ # Request-specific options
1986
+ #
1987
+ # @yield [result, err] Result & error if block supplied
1988
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::StoreCluster] parsed result object
1989
+ # @yieldparam err [StandardError] error object if request failed
1990
+ #
1991
+ # @return [Google::Apis::AndroidenterpriseV1::StoreCluster]
1992
+ #
1993
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1994
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1995
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1996
+ def get_storelayoutcluster(enterprise_id, page_id, cluster_id, fields: nil, quota_user: nil, options: nil, &block)
1997
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters/{clusterId}', options)
1998
+ command.response_representation = Google::Apis::AndroidenterpriseV1::StoreCluster::Representation
1999
+ command.response_class = Google::Apis::AndroidenterpriseV1::StoreCluster
2000
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2001
+ command.params['pageId'] = page_id unless page_id.nil?
2002
+ command.params['clusterId'] = cluster_id unless cluster_id.nil?
2003
+ command.query['fields'] = fields unless fields.nil?
2004
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2005
+ execute_or_queue_command(command, &block)
2006
+ end
2007
+
2008
+ # Inserts a new cluster in a page.
2009
+ # @param [String] enterprise_id
2010
+ # The ID of the enterprise.
2011
+ # @param [String] page_id
2012
+ # The ID of the page.
2013
+ # @param [Google::Apis::AndroidenterpriseV1::StoreCluster] store_cluster_object
2014
+ # @param [String] fields
2015
+ # Selector specifying which fields to include in a partial response.
2016
+ # @param [String] quota_user
2017
+ # Available to use for quota purposes for server-side applications. Can be any
2018
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2019
+ # @param [Google::Apis::RequestOptions] options
2020
+ # Request-specific options
2021
+ #
2022
+ # @yield [result, err] Result & error if block supplied
2023
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::StoreCluster] parsed result object
2024
+ # @yieldparam err [StandardError] error object if request failed
2025
+ #
2026
+ # @return [Google::Apis::AndroidenterpriseV1::StoreCluster]
2027
+ #
2028
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2029
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2030
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2031
+ def insert_storelayoutcluster(enterprise_id, page_id, store_cluster_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2032
+ command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters', options)
2033
+ command.request_representation = Google::Apis::AndroidenterpriseV1::StoreCluster::Representation
2034
+ command.request_object = store_cluster_object
2035
+ command.response_representation = Google::Apis::AndroidenterpriseV1::StoreCluster::Representation
2036
+ command.response_class = Google::Apis::AndroidenterpriseV1::StoreCluster
2037
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2038
+ command.params['pageId'] = page_id unless page_id.nil?
2039
+ command.query['fields'] = fields unless fields.nil?
2040
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2041
+ execute_or_queue_command(command, &block)
2042
+ end
2043
+
2044
+ # Retrieves the details of all clusters on the specified page.
2045
+ # @param [String] enterprise_id
2046
+ # The ID of the enterprise.
2047
+ # @param [String] page_id
2048
+ # The ID of the page.
2049
+ # @param [String] fields
2050
+ # Selector specifying which fields to include in a partial response.
2051
+ # @param [String] quota_user
2052
+ # Available to use for quota purposes for server-side applications. Can be any
2053
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2054
+ # @param [Google::Apis::RequestOptions] options
2055
+ # Request-specific options
2056
+ #
2057
+ # @yield [result, err] Result & error if block supplied
2058
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::StoreLayoutClustersListResponse] parsed result object
2059
+ # @yieldparam err [StandardError] error object if request failed
2060
+ #
2061
+ # @return [Google::Apis::AndroidenterpriseV1::StoreLayoutClustersListResponse]
2062
+ #
2063
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2064
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2065
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2066
+ def list_storelayoutclusters(enterprise_id, page_id, fields: nil, quota_user: nil, options: nil, &block)
2067
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters', options)
2068
+ command.response_representation = Google::Apis::AndroidenterpriseV1::StoreLayoutClustersListResponse::Representation
2069
+ command.response_class = Google::Apis::AndroidenterpriseV1::StoreLayoutClustersListResponse
2070
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2071
+ command.params['pageId'] = page_id unless page_id.nil?
2072
+ command.query['fields'] = fields unless fields.nil?
2073
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2074
+ execute_or_queue_command(command, &block)
2075
+ end
2076
+
2077
+ # Updates a cluster.
2078
+ # @param [String] enterprise_id
2079
+ # The ID of the enterprise.
2080
+ # @param [String] page_id
2081
+ # The ID of the page.
2082
+ # @param [String] cluster_id
2083
+ # The ID of the cluster.
2084
+ # @param [Google::Apis::AndroidenterpriseV1::StoreCluster] store_cluster_object
2085
+ # @param [String] fields
2086
+ # Selector specifying which fields to include in a partial response.
2087
+ # @param [String] quota_user
2088
+ # Available to use for quota purposes for server-side applications. Can be any
2089
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2090
+ # @param [Google::Apis::RequestOptions] options
2091
+ # Request-specific options
2092
+ #
2093
+ # @yield [result, err] Result & error if block supplied
2094
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::StoreCluster] parsed result object
2095
+ # @yieldparam err [StandardError] error object if request failed
2096
+ #
2097
+ # @return [Google::Apis::AndroidenterpriseV1::StoreCluster]
2098
+ #
2099
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2100
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2101
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2102
+ def update_storelayoutcluster(enterprise_id, page_id, cluster_id, store_cluster_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2103
+ command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}/clusters/{clusterId}', options)
2104
+ command.request_representation = Google::Apis::AndroidenterpriseV1::StoreCluster::Representation
2105
+ command.request_object = store_cluster_object
2106
+ command.response_representation = Google::Apis::AndroidenterpriseV1::StoreCluster::Representation
2107
+ command.response_class = Google::Apis::AndroidenterpriseV1::StoreCluster
2108
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2109
+ command.params['pageId'] = page_id unless page_id.nil?
2110
+ command.params['clusterId'] = cluster_id unless cluster_id.nil?
2111
+ command.query['fields'] = fields unless fields.nil?
2112
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2113
+ execute_or_queue_command(command, &block)
2114
+ end
2115
+
2116
+ # Deletes a store page.
2117
+ # @param [String] enterprise_id
2118
+ # The ID of the enterprise.
2119
+ # @param [String] page_id
2120
+ # The ID of the page.
2121
+ # @param [String] fields
2122
+ # Selector specifying which fields to include in a partial response.
2123
+ # @param [String] quota_user
2124
+ # Available to use for quota purposes for server-side applications. Can be any
2125
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2126
+ # @param [Google::Apis::RequestOptions] options
2127
+ # Request-specific options
2128
+ #
2129
+ # @yield [result, err] Result & error if block supplied
2130
+ # @yieldparam result [NilClass] No result returned for this method
2131
+ # @yieldparam err [StandardError] error object if request failed
2132
+ #
2133
+ # @return [void]
2134
+ #
2135
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2136
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2137
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2138
+ def delete_storelayoutpage(enterprise_id, page_id, fields: nil, quota_user: nil, options: nil, &block)
2139
+ command = make_simple_command(:delete, 'androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}', options)
2140
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2141
+ command.params['pageId'] = page_id unless page_id.nil?
2142
+ command.query['fields'] = fields unless fields.nil?
2143
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2144
+ execute_or_queue_command(command, &block)
2145
+ end
2146
+
2147
+ # Retrieves details of a store page.
2148
+ # @param [String] enterprise_id
2149
+ # The ID of the enterprise.
2150
+ # @param [String] page_id
2151
+ # The ID of the page.
2152
+ # @param [String] fields
2153
+ # Selector specifying which fields to include in a partial response.
2154
+ # @param [String] quota_user
2155
+ # Available to use for quota purposes for server-side applications. Can be any
2156
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2157
+ # @param [Google::Apis::RequestOptions] options
2158
+ # Request-specific options
2159
+ #
2160
+ # @yield [result, err] Result & error if block supplied
2161
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::StorePage] parsed result object
2162
+ # @yieldparam err [StandardError] error object if request failed
2163
+ #
2164
+ # @return [Google::Apis::AndroidenterpriseV1::StorePage]
2165
+ #
2166
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2167
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2168
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2169
+ def get_storelayoutpage(enterprise_id, page_id, fields: nil, quota_user: nil, options: nil, &block)
2170
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}', options)
2171
+ command.response_representation = Google::Apis::AndroidenterpriseV1::StorePage::Representation
2172
+ command.response_class = Google::Apis::AndroidenterpriseV1::StorePage
2173
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2174
+ command.params['pageId'] = page_id unless page_id.nil?
2175
+ command.query['fields'] = fields unless fields.nil?
2176
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2177
+ execute_or_queue_command(command, &block)
2178
+ end
2179
+
2180
+ # Inserts a new store page.
2181
+ # @param [String] enterprise_id
2182
+ # The ID of the enterprise.
2183
+ # @param [Google::Apis::AndroidenterpriseV1::StorePage] store_page_object
2184
+ # @param [String] fields
2185
+ # Selector specifying which fields to include in a partial response.
2186
+ # @param [String] quota_user
2187
+ # Available to use for quota purposes for server-side applications. Can be any
2188
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2189
+ # @param [Google::Apis::RequestOptions] options
2190
+ # Request-specific options
2191
+ #
2192
+ # @yield [result, err] Result & error if block supplied
2193
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::StorePage] parsed result object
2194
+ # @yieldparam err [StandardError] error object if request failed
2195
+ #
2196
+ # @return [Google::Apis::AndroidenterpriseV1::StorePage]
2197
+ #
2198
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2199
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2200
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2201
+ def insert_storelayoutpage(enterprise_id, store_page_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2202
+ command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages', options)
2203
+ command.request_representation = Google::Apis::AndroidenterpriseV1::StorePage::Representation
2204
+ command.request_object = store_page_object
2205
+ command.response_representation = Google::Apis::AndroidenterpriseV1::StorePage::Representation
2206
+ command.response_class = Google::Apis::AndroidenterpriseV1::StorePage
2207
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2208
+ command.query['fields'] = fields unless fields.nil?
2209
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2210
+ execute_or_queue_command(command, &block)
2211
+ end
2212
+
2213
+ # Retrieves the details of all pages in the store.
2214
+ # @param [String] enterprise_id
2215
+ # The ID of the enterprise.
2216
+ # @param [String] fields
2217
+ # Selector specifying which fields to include in a partial response.
2218
+ # @param [String] quota_user
2219
+ # Available to use for quota purposes for server-side applications. Can be any
2220
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2221
+ # @param [Google::Apis::RequestOptions] options
2222
+ # Request-specific options
2223
+ #
2224
+ # @yield [result, err] Result & error if block supplied
2225
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::StoreLayoutPagesListResponse] parsed result object
2226
+ # @yieldparam err [StandardError] error object if request failed
2227
+ #
2228
+ # @return [Google::Apis::AndroidenterpriseV1::StoreLayoutPagesListResponse]
2229
+ #
2230
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2231
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2232
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2233
+ def list_storelayoutpages(enterprise_id, fields: nil, quota_user: nil, options: nil, &block)
2234
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages', options)
2235
+ command.response_representation = Google::Apis::AndroidenterpriseV1::StoreLayoutPagesListResponse::Representation
2236
+ command.response_class = Google::Apis::AndroidenterpriseV1::StoreLayoutPagesListResponse
2237
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2238
+ command.query['fields'] = fields unless fields.nil?
2239
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2240
+ execute_or_queue_command(command, &block)
2241
+ end
2242
+
2243
+ # Updates the content of a store page.
2244
+ # @param [String] enterprise_id
2245
+ # The ID of the enterprise.
2246
+ # @param [String] page_id
2247
+ # The ID of the page.
2248
+ # @param [Google::Apis::AndroidenterpriseV1::StorePage] store_page_object
2249
+ # @param [String] fields
2250
+ # Selector specifying which fields to include in a partial response.
2251
+ # @param [String] quota_user
2252
+ # Available to use for quota purposes for server-side applications. Can be any
2253
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2254
+ # @param [Google::Apis::RequestOptions] options
2255
+ # Request-specific options
2256
+ #
2257
+ # @yield [result, err] Result & error if block supplied
2258
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::StorePage] parsed result object
2259
+ # @yieldparam err [StandardError] error object if request failed
2260
+ #
2261
+ # @return [Google::Apis::AndroidenterpriseV1::StorePage]
2262
+ #
2263
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2264
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2265
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2266
+ def update_storelayoutpage(enterprise_id, page_id, store_page_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2267
+ command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/storeLayout/pages/{pageId}', options)
2268
+ command.request_representation = Google::Apis::AndroidenterpriseV1::StorePage::Representation
2269
+ command.request_object = store_page_object
2270
+ command.response_representation = Google::Apis::AndroidenterpriseV1::StorePage::Representation
2271
+ command.response_class = Google::Apis::AndroidenterpriseV1::StorePage
2272
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2273
+ command.params['pageId'] = page_id unless page_id.nil?
2274
+ command.query['fields'] = fields unless fields.nil?
2275
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2276
+ execute_or_queue_command(command, &block)
2277
+ end
2278
+
2279
+ # Deleted an EMM-managed user.
2280
+ # @param [String] enterprise_id
2281
+ # The ID of the enterprise.
2282
+ # @param [String] user_id
2283
+ # The ID of the user.
2284
+ # @param [String] fields
2285
+ # Selector specifying which fields to include in a partial response.
2286
+ # @param [String] quota_user
2287
+ # Available to use for quota purposes for server-side applications. Can be any
2288
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2289
+ # @param [Google::Apis::RequestOptions] options
2290
+ # Request-specific options
2291
+ #
2292
+ # @yield [result, err] Result & error if block supplied
2293
+ # @yieldparam result [NilClass] No result returned for this method
2294
+ # @yieldparam err [StandardError] error object if request failed
2295
+ #
2296
+ # @return [void]
2297
+ #
2298
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2299
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2300
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2301
+ def delete_user(enterprise_id, user_id, fields: nil, quota_user: nil, options: nil, &block)
2302
+ command = make_simple_command(:delete, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}', options)
2303
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2304
+ command.params['userId'] = user_id unless user_id.nil?
2305
+ command.query['fields'] = fields unless fields.nil?
2306
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2307
+ execute_or_queue_command(command, &block)
2308
+ end
2309
+
2310
+ # Generates an authentication token which the device policy client can use to
2311
+ # provision the given EMM-managed user account on a device. The generated token
2312
+ # is single-use and expires after a few minutes. You can provision a maximum of
2313
+ # 10 devices per user. This call only works with EMM-managed accounts.
2314
+ # @param [String] enterprise_id
2315
+ # The ID of the enterprise.
2316
+ # @param [String] user_id
2317
+ # The ID of the user.
2318
+ # @param [String] fields
2319
+ # Selector specifying which fields to include in a partial response.
2320
+ # @param [String] quota_user
2321
+ # Available to use for quota purposes for server-side applications. Can be any
2322
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2323
+ # @param [Google::Apis::RequestOptions] options
2324
+ # Request-specific options
2325
+ #
2326
+ # @yield [result, err] Result & error if block supplied
2327
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::AuthenticationToken] parsed result object
2328
+ # @yieldparam err [StandardError] error object if request failed
2329
+ #
2330
+ # @return [Google::Apis::AndroidenterpriseV1::AuthenticationToken]
2331
+ #
2332
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2333
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2334
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2335
+ def generate_user_authentication_token(enterprise_id, user_id, fields: nil, quota_user: nil, options: nil, &block)
2336
+ command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/authenticationToken', options)
2337
+ command.response_representation = Google::Apis::AndroidenterpriseV1::AuthenticationToken::Representation
2338
+ command.response_class = Google::Apis::AndroidenterpriseV1::AuthenticationToken
2339
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2340
+ command.params['userId'] = user_id unless user_id.nil?
2341
+ command.query['fields'] = fields unless fields.nil?
2342
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2343
+ execute_or_queue_command(command, &block)
2344
+ end
2345
+
2346
+ # Retrieves a user's details.
2347
+ # @param [String] enterprise_id
2348
+ # The ID of the enterprise.
2349
+ # @param [String] user_id
2350
+ # The ID of the user.
2351
+ # @param [String] fields
2352
+ # Selector specifying which fields to include in a partial response.
2353
+ # @param [String] quota_user
2354
+ # Available to use for quota purposes for server-side applications. Can be any
2355
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2356
+ # @param [Google::Apis::RequestOptions] options
2357
+ # Request-specific options
2358
+ #
2359
+ # @yield [result, err] Result & error if block supplied
2360
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::User] parsed result object
2361
+ # @yieldparam err [StandardError] error object if request failed
2362
+ #
2363
+ # @return [Google::Apis::AndroidenterpriseV1::User]
2364
+ #
2365
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2366
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2367
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2368
+ def get_user(enterprise_id, user_id, fields: nil, quota_user: nil, options: nil, &block)
2369
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}', options)
2370
+ command.response_representation = Google::Apis::AndroidenterpriseV1::User::Representation
2371
+ command.response_class = Google::Apis::AndroidenterpriseV1::User
2372
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2373
+ command.params['userId'] = user_id unless user_id.nil?
2374
+ command.query['fields'] = fields unless fields.nil?
2375
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2376
+ execute_or_queue_command(command, &block)
2377
+ end
2378
+
2379
+ # Retrieves the set of products a user is entitled to access.
2380
+ # @param [String] enterprise_id
2381
+ # The ID of the enterprise.
2382
+ # @param [String] user_id
2383
+ # The ID of the user.
2384
+ # @param [String] fields
2385
+ # Selector specifying which fields to include in a partial response.
2386
+ # @param [String] quota_user
2387
+ # Available to use for quota purposes for server-side applications. Can be any
2388
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2389
+ # @param [Google::Apis::RequestOptions] options
2390
+ # Request-specific options
2391
+ #
2392
+ # @yield [result, err] Result & error if block supplied
2393
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ProductSet] parsed result object
2394
+ # @yieldparam err [StandardError] error object if request failed
2395
+ #
2396
+ # @return [Google::Apis::AndroidenterpriseV1::ProductSet]
2397
+ #
2398
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2399
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2400
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2401
+ def get_user_available_product_set(enterprise_id, user_id, fields: nil, quota_user: nil, options: nil, &block)
2402
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/availableProductSet', options)
2403
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ProductSet::Representation
2404
+ command.response_class = Google::Apis::AndroidenterpriseV1::ProductSet
2405
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2406
+ command.params['userId'] = user_id unless user_id.nil?
2407
+ command.query['fields'] = fields unless fields.nil?
2408
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2409
+ execute_or_queue_command(command, &block)
2410
+ end
2411
+
2412
+ # Creates a new EMM-managed user. The Users resource passed in the body of the
2413
+ # request should include an accountIdentifier and an accountType. If a
2414
+ # corresponding user already exists with the same account identifier, the user
2415
+ # will be updated with the resource. In this case only the displayName field can
2416
+ # be changed.
2417
+ # @param [String] enterprise_id
2418
+ # The ID of the enterprise.
2419
+ # @param [Google::Apis::AndroidenterpriseV1::User] user_object
2420
+ # @param [String] fields
2421
+ # Selector specifying which fields to include in a partial response.
2422
+ # @param [String] quota_user
2423
+ # Available to use for quota purposes for server-side applications. Can be any
2424
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2425
+ # @param [Google::Apis::RequestOptions] options
2426
+ # Request-specific options
2427
+ #
2428
+ # @yield [result, err] Result & error if block supplied
2429
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::User] parsed result object
2430
+ # @yieldparam err [StandardError] error object if request failed
2431
+ #
2432
+ # @return [Google::Apis::AndroidenterpriseV1::User]
2433
+ #
2434
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2435
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2436
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2437
+ def insert_user(enterprise_id, user_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2438
+ command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/users', options)
2439
+ command.request_representation = Google::Apis::AndroidenterpriseV1::User::Representation
2440
+ command.request_object = user_object
2441
+ command.response_representation = Google::Apis::AndroidenterpriseV1::User::Representation
2442
+ command.response_class = Google::Apis::AndroidenterpriseV1::User
2443
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2444
+ command.query['fields'] = fields unless fields.nil?
2445
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2446
+ execute_or_queue_command(command, &block)
2447
+ end
2448
+
2449
+ # Looks up a user by primary email address. This is only supported for Google-
2450
+ # managed users. Lookup of the id is not needed for EMM-managed users because
2451
+ # the id is already returned in the result of the Users.insert call.
2452
+ # @param [String] enterprise_id
2453
+ # The ID of the enterprise.
2454
+ # @param [String] email
2455
+ # Required. The exact primary email address of the user to look up.
2456
+ # @param [String] fields
2457
+ # Selector specifying which fields to include in a partial response.
2458
+ # @param [String] quota_user
2459
+ # Available to use for quota purposes for server-side applications. Can be any
2460
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2461
+ # @param [Google::Apis::RequestOptions] options
2462
+ # Request-specific options
2463
+ #
2464
+ # @yield [result, err] Result & error if block supplied
2465
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ListUsersResponse] parsed result object
2466
+ # @yieldparam err [StandardError] error object if request failed
2467
+ #
2468
+ # @return [Google::Apis::AndroidenterpriseV1::ListUsersResponse]
2469
+ #
2470
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2471
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2472
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2473
+ def list_users(enterprise_id, email, fields: nil, quota_user: nil, options: nil, &block)
2474
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/users', options)
2475
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ListUsersResponse::Representation
2476
+ command.response_class = Google::Apis::AndroidenterpriseV1::ListUsersResponse
2477
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2478
+ command.query['email'] = email unless email.nil?
2479
+ command.query['fields'] = fields unless fields.nil?
2480
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2481
+ execute_or_queue_command(command, &block)
2482
+ end
2483
+
2484
+ # Revokes access to all devices currently provisioned to the user. The user will
2485
+ # no longer be able to use the managed Play store on any of their managed
2486
+ # devices. This call only works with EMM-managed accounts.
2487
+ # @param [String] enterprise_id
2488
+ # The ID of the enterprise.
2489
+ # @param [String] user_id
2490
+ # The ID of the user.
2491
+ # @param [String] fields
2492
+ # Selector specifying which fields to include in a partial response.
2493
+ # @param [String] quota_user
2494
+ # Available to use for quota purposes for server-side applications. Can be any
2495
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2496
+ # @param [Google::Apis::RequestOptions] options
2497
+ # Request-specific options
2498
+ #
2499
+ # @yield [result, err] Result & error if block supplied
2500
+ # @yieldparam result [NilClass] No result returned for this method
2501
+ # @yieldparam err [StandardError] error object if request failed
2502
+ #
2503
+ # @return [void]
2504
+ #
2505
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2506
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2507
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2508
+ def revoke_user_device_access(enterprise_id, user_id, fields: nil, quota_user: nil, options: nil, &block)
2509
+ command = make_simple_command(:delete, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/deviceAccess', options)
2510
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2511
+ command.params['userId'] = user_id unless user_id.nil?
2512
+ command.query['fields'] = fields unless fields.nil?
2513
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2514
+ execute_or_queue_command(command, &block)
2515
+ end
2516
+
2517
+ # Modifies the set of products that a user is entitled to access (referred to as
2518
+ # *whitelisted* products). Only products that are approved or products that were
2519
+ # previously approved (products with revoked approval) can be whitelisted.
2520
+ # @param [String] enterprise_id
2521
+ # The ID of the enterprise.
2522
+ # @param [String] user_id
2523
+ # The ID of the user.
2524
+ # @param [Google::Apis::AndroidenterpriseV1::ProductSet] product_set_object
2525
+ # @param [String] fields
2526
+ # Selector specifying which fields to include in a partial response.
2527
+ # @param [String] quota_user
2528
+ # Available to use for quota purposes for server-side applications. Can be any
2529
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2530
+ # @param [Google::Apis::RequestOptions] options
2531
+ # Request-specific options
2532
+ #
2533
+ # @yield [result, err] Result & error if block supplied
2534
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::ProductSet] parsed result object
2535
+ # @yieldparam err [StandardError] error object if request failed
2536
+ #
2537
+ # @return [Google::Apis::AndroidenterpriseV1::ProductSet]
2538
+ #
2539
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2540
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2541
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2542
+ def set_user_available_product_set(enterprise_id, user_id, product_set_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2543
+ command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}/availableProductSet', options)
2544
+ command.request_representation = Google::Apis::AndroidenterpriseV1::ProductSet::Representation
2545
+ command.request_object = product_set_object
2546
+ command.response_representation = Google::Apis::AndroidenterpriseV1::ProductSet::Representation
2547
+ command.response_class = Google::Apis::AndroidenterpriseV1::ProductSet
2548
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2549
+ command.params['userId'] = user_id unless user_id.nil?
2550
+ command.query['fields'] = fields unless fields.nil?
2551
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2552
+ execute_or_queue_command(command, &block)
2553
+ end
2554
+
2555
+ # Updates the details of an EMM-managed user. Can be used with EMM-managed users
2556
+ # only (not Google managed users). Pass the new details in the Users resource in
2557
+ # the request body. Only the displayName field can be changed. Other fields must
2558
+ # either be unset or have the currently active value.
2559
+ # @param [String] enterprise_id
2560
+ # The ID of the enterprise.
2561
+ # @param [String] user_id
2562
+ # The ID of the user.
2563
+ # @param [Google::Apis::AndroidenterpriseV1::User] user_object
2564
+ # @param [String] fields
2565
+ # Selector specifying which fields to include in a partial response.
2566
+ # @param [String] quota_user
2567
+ # Available to use for quota purposes for server-side applications. Can be any
2568
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2569
+ # @param [Google::Apis::RequestOptions] options
2570
+ # Request-specific options
2571
+ #
2572
+ # @yield [result, err] Result & error if block supplied
2573
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::User] parsed result object
2574
+ # @yieldparam err [StandardError] error object if request failed
2575
+ #
2576
+ # @return [Google::Apis::AndroidenterpriseV1::User]
2577
+ #
2578
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2579
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2580
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2581
+ def update_user(enterprise_id, user_id, user_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2582
+ command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/users/{userId}', options)
2583
+ command.request_representation = Google::Apis::AndroidenterpriseV1::User::Representation
2584
+ command.request_object = user_object
2585
+ command.response_representation = Google::Apis::AndroidenterpriseV1::User::Representation
2586
+ command.response_class = Google::Apis::AndroidenterpriseV1::User
2587
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2588
+ command.params['userId'] = user_id unless user_id.nil?
2589
+ command.query['fields'] = fields unless fields.nil?
2590
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2591
+ execute_or_queue_command(command, &block)
2592
+ end
2593
+
2594
+ # Deletes an existing web app.
2595
+ # @param [String] enterprise_id
2596
+ # The ID of the enterprise.
2597
+ # @param [String] web_app_id
2598
+ # The ID of the web app.
2599
+ # @param [String] fields
2600
+ # Selector specifying which fields to include in a partial response.
2601
+ # @param [String] quota_user
2602
+ # Available to use for quota purposes for server-side applications. Can be any
2603
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2604
+ # @param [Google::Apis::RequestOptions] options
2605
+ # Request-specific options
2606
+ #
2607
+ # @yield [result, err] Result & error if block supplied
2608
+ # @yieldparam result [NilClass] No result returned for this method
2609
+ # @yieldparam err [StandardError] error object if request failed
2610
+ #
2611
+ # @return [void]
2612
+ #
2613
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2614
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2615
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2616
+ def delete_webapp(enterprise_id, web_app_id, fields: nil, quota_user: nil, options: nil, &block)
2617
+ command = make_simple_command(:delete, 'androidenterprise/v1/enterprises/{enterpriseId}/webApps/{webAppId}', options)
2618
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2619
+ command.params['webAppId'] = web_app_id unless web_app_id.nil?
2620
+ command.query['fields'] = fields unless fields.nil?
2621
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2622
+ execute_or_queue_command(command, &block)
2623
+ end
2624
+
2625
+ # Gets an existing web app.
2626
+ # @param [String] enterprise_id
2627
+ # The ID of the enterprise.
2628
+ # @param [String] web_app_id
2629
+ # The ID of the web app.
2630
+ # @param [String] fields
2631
+ # Selector specifying which fields to include in a partial response.
2632
+ # @param [String] quota_user
2633
+ # Available to use for quota purposes for server-side applications. Can be any
2634
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2635
+ # @param [Google::Apis::RequestOptions] options
2636
+ # Request-specific options
2637
+ #
2638
+ # @yield [result, err] Result & error if block supplied
2639
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::WebApp] parsed result object
2640
+ # @yieldparam err [StandardError] error object if request failed
2641
+ #
2642
+ # @return [Google::Apis::AndroidenterpriseV1::WebApp]
2643
+ #
2644
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2645
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2646
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2647
+ def get_webapp(enterprise_id, web_app_id, fields: nil, quota_user: nil, options: nil, &block)
2648
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/webApps/{webAppId}', options)
2649
+ command.response_representation = Google::Apis::AndroidenterpriseV1::WebApp::Representation
2650
+ command.response_class = Google::Apis::AndroidenterpriseV1::WebApp
2651
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2652
+ command.params['webAppId'] = web_app_id unless web_app_id.nil?
2653
+ command.query['fields'] = fields unless fields.nil?
2654
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2655
+ execute_or_queue_command(command, &block)
2656
+ end
2657
+
2658
+ # Creates a new web app for the enterprise.
2659
+ # @param [String] enterprise_id
2660
+ # The ID of the enterprise.
2661
+ # @param [Google::Apis::AndroidenterpriseV1::WebApp] web_app_object
2662
+ # @param [String] fields
2663
+ # Selector specifying which fields to include in a partial response.
2664
+ # @param [String] quota_user
2665
+ # Available to use for quota purposes for server-side applications. Can be any
2666
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2667
+ # @param [Google::Apis::RequestOptions] options
2668
+ # Request-specific options
2669
+ #
2670
+ # @yield [result, err] Result & error if block supplied
2671
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::WebApp] parsed result object
2672
+ # @yieldparam err [StandardError] error object if request failed
2673
+ #
2674
+ # @return [Google::Apis::AndroidenterpriseV1::WebApp]
2675
+ #
2676
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2677
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2678
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2679
+ def insert_webapp(enterprise_id, web_app_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2680
+ command = make_simple_command(:post, 'androidenterprise/v1/enterprises/{enterpriseId}/webApps', options)
2681
+ command.request_representation = Google::Apis::AndroidenterpriseV1::WebApp::Representation
2682
+ command.request_object = web_app_object
2683
+ command.response_representation = Google::Apis::AndroidenterpriseV1::WebApp::Representation
2684
+ command.response_class = Google::Apis::AndroidenterpriseV1::WebApp
2685
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2686
+ command.query['fields'] = fields unless fields.nil?
2687
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2688
+ execute_or_queue_command(command, &block)
2689
+ end
2690
+
2691
+ # Retrieves the details of all web apps for a given enterprise.
2692
+ # @param [String] enterprise_id
2693
+ # The ID of the enterprise.
2694
+ # @param [String] fields
2695
+ # Selector specifying which fields to include in a partial response.
2696
+ # @param [String] quota_user
2697
+ # Available to use for quota purposes for server-side applications. Can be any
2698
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2699
+ # @param [Google::Apis::RequestOptions] options
2700
+ # Request-specific options
2701
+ #
2702
+ # @yield [result, err] Result & error if block supplied
2703
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::WebAppsListResponse] parsed result object
2704
+ # @yieldparam err [StandardError] error object if request failed
2705
+ #
2706
+ # @return [Google::Apis::AndroidenterpriseV1::WebAppsListResponse]
2707
+ #
2708
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2709
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2710
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2711
+ def list_webapps(enterprise_id, fields: nil, quota_user: nil, options: nil, &block)
2712
+ command = make_simple_command(:get, 'androidenterprise/v1/enterprises/{enterpriseId}/webApps', options)
2713
+ command.response_representation = Google::Apis::AndroidenterpriseV1::WebAppsListResponse::Representation
2714
+ command.response_class = Google::Apis::AndroidenterpriseV1::WebAppsListResponse
2715
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2716
+ command.query['fields'] = fields unless fields.nil?
2717
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2718
+ execute_or_queue_command(command, &block)
2719
+ end
2720
+
2721
+ # Updates an existing web app.
2722
+ # @param [String] enterprise_id
2723
+ # The ID of the enterprise.
2724
+ # @param [String] web_app_id
2725
+ # The ID of the web app.
2726
+ # @param [Google::Apis::AndroidenterpriseV1::WebApp] web_app_object
2727
+ # @param [String] fields
2728
+ # Selector specifying which fields to include in a partial response.
2729
+ # @param [String] quota_user
2730
+ # Available to use for quota purposes for server-side applications. Can be any
2731
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2732
+ # @param [Google::Apis::RequestOptions] options
2733
+ # Request-specific options
2734
+ #
2735
+ # @yield [result, err] Result & error if block supplied
2736
+ # @yieldparam result [Google::Apis::AndroidenterpriseV1::WebApp] parsed result object
2737
+ # @yieldparam err [StandardError] error object if request failed
2738
+ #
2739
+ # @return [Google::Apis::AndroidenterpriseV1::WebApp]
2740
+ #
2741
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2742
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2743
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2744
+ def update_webapp(enterprise_id, web_app_id, web_app_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2745
+ command = make_simple_command(:put, 'androidenterprise/v1/enterprises/{enterpriseId}/webApps/{webAppId}', options)
2746
+ command.request_representation = Google::Apis::AndroidenterpriseV1::WebApp::Representation
2747
+ command.request_object = web_app_object
2748
+ command.response_representation = Google::Apis::AndroidenterpriseV1::WebApp::Representation
2749
+ command.response_class = Google::Apis::AndroidenterpriseV1::WebApp
2750
+ command.params['enterpriseId'] = enterprise_id unless enterprise_id.nil?
2751
+ command.params['webAppId'] = web_app_id unless web_app_id.nil?
2752
+ command.query['fields'] = fields unless fields.nil?
2753
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2754
+ execute_or_queue_command(command, &block)
2755
+ end
2756
+
2757
+ protected
2758
+
2759
+ def apply_command_defaults(command)
2760
+ command.query['key'] = key unless key.nil?
2761
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2762
+ end
2763
+ end
2764
+ end
2765
+ end
2766
+ end