google-apis-cloudidentity_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1521 @@
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 CloudidentityV1
23
+ # Cloud Identity API
24
+ #
25
+ # API for provisioning and managing identity resources.
26
+ #
27
+ # @example
28
+ # require 'google/apis/cloudidentity_v1'
29
+ #
30
+ # Cloudidentity = Google::Apis::CloudidentityV1 # Alias the module
31
+ # service = Cloudidentity::CloudIdentityService.new
32
+ #
33
+ # @see https://cloud.google.com/identity/
34
+ class CloudIdentityService < 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://cloudidentity.googleapis.com/', '',
47
+ client_name: 'google-apis-cloudidentity_v1',
48
+ client_version: Google::Apis::CloudidentityV1::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Cancels an unfinished device wipe. This operation can be used to cancel device
53
+ # wipe in the gap between the wipe operation returning success and the device
54
+ # being wiped. This operation is possible when the device is in a "pending wipe"
55
+ # state. The device enters the "pending wipe" state when a wipe device command
56
+ # is issued, but has not yet been sent to the device. The cancel wipe will fail
57
+ # if the wipe command has already been issued to the device.
58
+ # @param [String] name
59
+ # Required. [Resource name](https://cloud.google.com/apis/design/resource_names)
60
+ # of the Device in format: `devices/`device_id``, where device_id is the unique
61
+ # ID assigned to the Device.
62
+ # @param [Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest] google_apps_cloudidentity_devices_v1_cancel_wipe_device_request_object
63
+ # @param [String] fields
64
+ # Selector specifying which fields to include in a partial response.
65
+ # @param [String] quota_user
66
+ # Available to use for quota purposes for server-side applications. Can be any
67
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
68
+ # @param [Google::Apis::RequestOptions] options
69
+ # Request-specific options
70
+ #
71
+ # @yield [result, err] Result & error if block supplied
72
+ # @yieldparam result [Google::Apis::CloudidentityV1::Operation] parsed result object
73
+ # @yieldparam err [StandardError] error object if request failed
74
+ #
75
+ # @return [Google::Apis::CloudidentityV1::Operation]
76
+ #
77
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
78
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
79
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
80
+ def cancel_device_wipe(name, google_apps_cloudidentity_devices_v1_cancel_wipe_device_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
81
+ command = make_simple_command(:post, 'v1/{+name}:cancelWipe', options)
82
+ command.request_representation = Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1CancelWipeDeviceRequest::Representation
83
+ command.request_object = google_apps_cloudidentity_devices_v1_cancel_wipe_device_request_object
84
+ command.response_representation = Google::Apis::CloudidentityV1::Operation::Representation
85
+ command.response_class = Google::Apis::CloudidentityV1::Operation
86
+ command.params['name'] = name unless name.nil?
87
+ command.query['fields'] = fields unless fields.nil?
88
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
89
+ execute_or_queue_command(command, &block)
90
+ end
91
+
92
+ # Creates a device. Only company-owned device may be created. **Note**: This
93
+ # method is available only to customers who have one of the following SKUs:
94
+ # Enterprise Standard, Enterprise Plus, Enterprise for Education, and Cloud
95
+ # Identity Premium
96
+ # @param [Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1Device] google_apps_cloudidentity_devices_v1_device_object
97
+ # @param [String] customer
98
+ # Required. [Resource name](https://cloud.google.com/apis/design/resource_names)
99
+ # of the customer. If you're using this API for your own organization, use `
100
+ # customers/my_customer` If you're using this API to manage another organization,
101
+ # use `customers/`customer_id``, where customer_id is the customer to whom the
102
+ # device belongs.
103
+ # @param [String] fields
104
+ # Selector specifying which fields to include in a partial response.
105
+ # @param [String] quota_user
106
+ # Available to use for quota purposes for server-side applications. Can be any
107
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
108
+ # @param [Google::Apis::RequestOptions] options
109
+ # Request-specific options
110
+ #
111
+ # @yield [result, err] Result & error if block supplied
112
+ # @yieldparam result [Google::Apis::CloudidentityV1::Operation] parsed result object
113
+ # @yieldparam err [StandardError] error object if request failed
114
+ #
115
+ # @return [Google::Apis::CloudidentityV1::Operation]
116
+ #
117
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
118
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
119
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
120
+ def create_device(google_apps_cloudidentity_devices_v1_device_object = nil, customer: nil, fields: nil, quota_user: nil, options: nil, &block)
121
+ command = make_simple_command(:post, 'v1/devices', options)
122
+ command.request_representation = Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1Device::Representation
123
+ command.request_object = google_apps_cloudidentity_devices_v1_device_object
124
+ command.response_representation = Google::Apis::CloudidentityV1::Operation::Representation
125
+ command.response_class = Google::Apis::CloudidentityV1::Operation
126
+ command.query['customer'] = customer unless customer.nil?
127
+ command.query['fields'] = fields unless fields.nil?
128
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
129
+ execute_or_queue_command(command, &block)
130
+ end
131
+
132
+ # Deletes the specified device.
133
+ # @param [String] name
134
+ # Required. [Resource name](https://cloud.google.com/apis/design/resource_names)
135
+ # of the Device in format: `devices/`device_id``, where device_id is the unique
136
+ # ID assigned to the Device.
137
+ # @param [String] customer
138
+ # Required. [Resource name](https://cloud.google.com/apis/design/resource_names)
139
+ # of the customer. If you're using this API for your own organization, use `
140
+ # customers/my_customer` If you're using this API to manage another organization,
141
+ # use `customers/`customer_id``, where customer_id is the customer to whom the
142
+ # device belongs.
143
+ # @param [String] fields
144
+ # Selector specifying which fields to include in a partial response.
145
+ # @param [String] quota_user
146
+ # Available to use for quota purposes for server-side applications. Can be any
147
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
148
+ # @param [Google::Apis::RequestOptions] options
149
+ # Request-specific options
150
+ #
151
+ # @yield [result, err] Result & error if block supplied
152
+ # @yieldparam result [Google::Apis::CloudidentityV1::Operation] parsed result object
153
+ # @yieldparam err [StandardError] error object if request failed
154
+ #
155
+ # @return [Google::Apis::CloudidentityV1::Operation]
156
+ #
157
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
158
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
159
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
160
+ def delete_device(name, customer: nil, fields: nil, quota_user: nil, options: nil, &block)
161
+ command = make_simple_command(:delete, 'v1/{+name}', options)
162
+ command.response_representation = Google::Apis::CloudidentityV1::Operation::Representation
163
+ command.response_class = Google::Apis::CloudidentityV1::Operation
164
+ command.params['name'] = name unless name.nil?
165
+ command.query['customer'] = customer unless customer.nil?
166
+ command.query['fields'] = fields unless fields.nil?
167
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
168
+ execute_or_queue_command(command, &block)
169
+ end
170
+
171
+ # Retrieves the specified device.
172
+ # @param [String] name
173
+ # Required. [Resource name](https://cloud.google.com/apis/design/resource_names)
174
+ # of the Device in the format: `devices/`device_id``, where device_id is the
175
+ # unique ID assigned to the Device.
176
+ # @param [String] customer
177
+ # Required. [Resource name](https://cloud.google.com/apis/design/resource_names)
178
+ # of the Customer in the format: `customers/`customer_id``, where customer_id is
179
+ # the customer to whom the device belongs. If you're using this API for your own
180
+ # organization, use `customers/my_customer`. If you're using this API to manage
181
+ # another organization, use `customers/`customer_id``, where customer_id is the
182
+ # customer to whom the device belongs.
183
+ # @param [String] fields
184
+ # Selector specifying which fields to include in a partial response.
185
+ # @param [String] quota_user
186
+ # Available to use for quota purposes for server-side applications. Can be any
187
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
188
+ # @param [Google::Apis::RequestOptions] options
189
+ # Request-specific options
190
+ #
191
+ # @yield [result, err] Result & error if block supplied
192
+ # @yieldparam result [Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1Device] parsed result object
193
+ # @yieldparam err [StandardError] error object if request failed
194
+ #
195
+ # @return [Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1Device]
196
+ #
197
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
198
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
199
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
200
+ def get_device(name, customer: nil, fields: nil, quota_user: nil, options: nil, &block)
201
+ command = make_simple_command(:get, 'v1/{+name}', options)
202
+ command.response_representation = Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1Device::Representation
203
+ command.response_class = Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1Device
204
+ command.params['name'] = name unless name.nil?
205
+ command.query['customer'] = customer unless customer.nil?
206
+ command.query['fields'] = fields unless fields.nil?
207
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
208
+ execute_or_queue_command(command, &block)
209
+ end
210
+
211
+ # Lists/Searches devices.
212
+ # @param [String] customer
213
+ # Required. [Resource name](https://cloud.google.com/apis/design/resource_names)
214
+ # of the customer in the format: `customers/`customer_id``, where customer_id is
215
+ # the customer to whom the device belongs. If you're using this API for your own
216
+ # organization, use `customers/my_customer`. If you're using this API to manage
217
+ # another organization, use `customers/`customer_id``, where customer_id is the
218
+ # customer to whom the device belongs.
219
+ # @param [String] filter
220
+ # Optional. Additional restrictions when fetching list of devices. For a list of
221
+ # search fields, refer to [Mobile device search fields](https://developers.
222
+ # google.com/admin-sdk/directory/v1/search-operators). Multiple search fields
223
+ # are separated by the space character.
224
+ # @param [String] order_by
225
+ # Optional. Order specification for devices in the response. Only one of the
226
+ # following field names may be used to specify the order: `create_time`, `
227
+ # last_sync_time`, `model`, `os_version`, `device_type` and `serial_number`. `
228
+ # desc` may be specified optionally at the end to specify results to be sorted
229
+ # in descending order. Default order is ascending.
230
+ # @param [Fixnum] page_size
231
+ # Optional. The maximum number of Devices to return. If unspecified, at most 20
232
+ # Devices will be returned. The maximum value is 100; values above 100 will be
233
+ # coerced to 100.
234
+ # @param [String] page_token
235
+ # Optional. A page token, received from a previous `ListDevices` call. Provide
236
+ # this to retrieve the subsequent page. When paginating, all other parameters
237
+ # provided to `ListDevices` must match the call that provided the page token.
238
+ # @param [String] view
239
+ # Optional. The view to use for the List request.
240
+ # @param [String] fields
241
+ # Selector specifying which fields to include in a partial response.
242
+ # @param [String] quota_user
243
+ # Available to use for quota purposes for server-side applications. Can be any
244
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
245
+ # @param [Google::Apis::RequestOptions] options
246
+ # Request-specific options
247
+ #
248
+ # @yield [result, err] Result & error if block supplied
249
+ # @yieldparam result [Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1ListDevicesResponse] parsed result object
250
+ # @yieldparam err [StandardError] error object if request failed
251
+ #
252
+ # @return [Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1ListDevicesResponse]
253
+ #
254
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
255
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
256
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
257
+ def list_devices(customer: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
258
+ command = make_simple_command(:get, 'v1/devices', options)
259
+ command.response_representation = Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1ListDevicesResponse::Representation
260
+ command.response_class = Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1ListDevicesResponse
261
+ command.query['customer'] = customer unless customer.nil?
262
+ command.query['filter'] = filter unless filter.nil?
263
+ command.query['orderBy'] = order_by unless order_by.nil?
264
+ command.query['pageSize'] = page_size unless page_size.nil?
265
+ command.query['pageToken'] = page_token unless page_token.nil?
266
+ command.query['view'] = view unless view.nil?
267
+ command.query['fields'] = fields unless fields.nil?
268
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
269
+ execute_or_queue_command(command, &block)
270
+ end
271
+
272
+ # Wipes all data on the specified device.
273
+ # @param [String] name
274
+ # Required. [Resource name](https://cloud.google.com/apis/design/resource_names)
275
+ # of the Device in format: `devices/`device_id`/deviceUsers/`device_user_id``,
276
+ # where device_id is the unique ID assigned to the Device, and device_user_id is
277
+ # the unique ID assigned to the User.
278
+ # @param [Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1WipeDeviceRequest] google_apps_cloudidentity_devices_v1_wipe_device_request_object
279
+ # @param [String] fields
280
+ # Selector specifying which fields to include in a partial response.
281
+ # @param [String] quota_user
282
+ # Available to use for quota purposes for server-side applications. Can be any
283
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
284
+ # @param [Google::Apis::RequestOptions] options
285
+ # Request-specific options
286
+ #
287
+ # @yield [result, err] Result & error if block supplied
288
+ # @yieldparam result [Google::Apis::CloudidentityV1::Operation] parsed result object
289
+ # @yieldparam err [StandardError] error object if request failed
290
+ #
291
+ # @return [Google::Apis::CloudidentityV1::Operation]
292
+ #
293
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
294
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
295
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
296
+ def wipe_device(name, google_apps_cloudidentity_devices_v1_wipe_device_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
297
+ command = make_simple_command(:post, 'v1/{+name}:wipe', options)
298
+ command.request_representation = Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1WipeDeviceRequest::Representation
299
+ command.request_object = google_apps_cloudidentity_devices_v1_wipe_device_request_object
300
+ command.response_representation = Google::Apis::CloudidentityV1::Operation::Representation
301
+ command.response_class = Google::Apis::CloudidentityV1::Operation
302
+ command.params['name'] = name unless name.nil?
303
+ command.query['fields'] = fields unless fields.nil?
304
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
305
+ execute_or_queue_command(command, &block)
306
+ end
307
+
308
+ # Approves device to access user data.
309
+ # @param [String] name
310
+ # Required. [Resource name](https://cloud.google.com/apis/design/resource_names)
311
+ # of the Device in format: `devices/`device_id`/deviceUsers/`device_user_id``,
312
+ # where device_id is the unique ID assigned to the Device, and device_user_id is
313
+ # the unique ID assigned to the User.
314
+ # @param [Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest] google_apps_cloudidentity_devices_v1_approve_device_user_request_object
315
+ # @param [String] fields
316
+ # Selector specifying which fields to include in a partial response.
317
+ # @param [String] quota_user
318
+ # Available to use for quota purposes for server-side applications. Can be any
319
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
320
+ # @param [Google::Apis::RequestOptions] options
321
+ # Request-specific options
322
+ #
323
+ # @yield [result, err] Result & error if block supplied
324
+ # @yieldparam result [Google::Apis::CloudidentityV1::Operation] parsed result object
325
+ # @yieldparam err [StandardError] error object if request failed
326
+ #
327
+ # @return [Google::Apis::CloudidentityV1::Operation]
328
+ #
329
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
330
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
331
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
332
+ def approve_device_device_user(name, google_apps_cloudidentity_devices_v1_approve_device_user_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
333
+ command = make_simple_command(:post, 'v1/{+name}:approve', options)
334
+ command.request_representation = Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1ApproveDeviceUserRequest::Representation
335
+ command.request_object = google_apps_cloudidentity_devices_v1_approve_device_user_request_object
336
+ command.response_representation = Google::Apis::CloudidentityV1::Operation::Representation
337
+ command.response_class = Google::Apis::CloudidentityV1::Operation
338
+ command.params['name'] = name unless name.nil?
339
+ command.query['fields'] = fields unless fields.nil?
340
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
341
+ execute_or_queue_command(command, &block)
342
+ end
343
+
344
+ # Blocks device from accessing user data
345
+ # @param [String] name
346
+ # Required. [Resource name](https://cloud.google.com/apis/design/resource_names)
347
+ # of the Device in format: `devices/`device_id`/deviceUsers/`device_user_id``,
348
+ # where device_id is the unique ID assigned to the Device, and device_user_id is
349
+ # the unique ID assigned to the User.
350
+ # @param [Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest] google_apps_cloudidentity_devices_v1_block_device_user_request_object
351
+ # @param [String] fields
352
+ # Selector specifying which fields to include in a partial response.
353
+ # @param [String] quota_user
354
+ # Available to use for quota purposes for server-side applications. Can be any
355
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
356
+ # @param [Google::Apis::RequestOptions] options
357
+ # Request-specific options
358
+ #
359
+ # @yield [result, err] Result & error if block supplied
360
+ # @yieldparam result [Google::Apis::CloudidentityV1::Operation] parsed result object
361
+ # @yieldparam err [StandardError] error object if request failed
362
+ #
363
+ # @return [Google::Apis::CloudidentityV1::Operation]
364
+ #
365
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
366
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
367
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
368
+ def block_device_device_user(name, google_apps_cloudidentity_devices_v1_block_device_user_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
369
+ command = make_simple_command(:post, 'v1/{+name}:block', options)
370
+ command.request_representation = Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1BlockDeviceUserRequest::Representation
371
+ command.request_object = google_apps_cloudidentity_devices_v1_block_device_user_request_object
372
+ command.response_representation = Google::Apis::CloudidentityV1::Operation::Representation
373
+ command.response_class = Google::Apis::CloudidentityV1::Operation
374
+ command.params['name'] = name unless name.nil?
375
+ command.query['fields'] = fields unless fields.nil?
376
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
377
+ execute_or_queue_command(command, &block)
378
+ end
379
+
380
+ # Cancels an unfinished user account wipe. This operation can be used to cancel
381
+ # device wipe in the gap between the wipe operation returning success and the
382
+ # device being wiped.
383
+ # @param [String] name
384
+ # Required. [Resource name](https://cloud.google.com/apis/design/resource_names)
385
+ # of the Device in format: `devices/`device_id`/deviceUsers/`device_user_id``,
386
+ # where device_id is the unique ID assigned to the Device, and device_user_id is
387
+ # the unique ID assigned to the User.
388
+ # @param [Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest] google_apps_cloudidentity_devices_v1_cancel_wipe_device_user_request_object
389
+ # @param [String] fields
390
+ # Selector specifying which fields to include in a partial response.
391
+ # @param [String] quota_user
392
+ # Available to use for quota purposes for server-side applications. Can be any
393
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
394
+ # @param [Google::Apis::RequestOptions] options
395
+ # Request-specific options
396
+ #
397
+ # @yield [result, err] Result & error if block supplied
398
+ # @yieldparam result [Google::Apis::CloudidentityV1::Operation] parsed result object
399
+ # @yieldparam err [StandardError] error object if request failed
400
+ #
401
+ # @return [Google::Apis::CloudidentityV1::Operation]
402
+ #
403
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
404
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
405
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
406
+ def cancel_device_device_user_wipe(name, google_apps_cloudidentity_devices_v1_cancel_wipe_device_user_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
407
+ command = make_simple_command(:post, 'v1/{+name}:cancelWipe', options)
408
+ command.request_representation = Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest::Representation
409
+ command.request_object = google_apps_cloudidentity_devices_v1_cancel_wipe_device_user_request_object
410
+ command.response_representation = Google::Apis::CloudidentityV1::Operation::Representation
411
+ command.response_class = Google::Apis::CloudidentityV1::Operation
412
+ command.params['name'] = name unless name.nil?
413
+ command.query['fields'] = fields unless fields.nil?
414
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
415
+ execute_or_queue_command(command, &block)
416
+ end
417
+
418
+ # Deletes the specified DeviceUser. This also revokes the user's access to
419
+ # device data.
420
+ # @param [String] name
421
+ # Required. [Resource name](https://cloud.google.com/apis/design/resource_names)
422
+ # of the Device in format: `devices/`device_id`/deviceUsers/`device_user_id``,
423
+ # where device_id is the unique ID assigned to the Device, and device_user_id is
424
+ # the unique ID assigned to the User.
425
+ # @param [String] customer
426
+ # Required. [Resource name](https://cloud.google.com/apis/design/resource_names)
427
+ # of the customer. If you're using this API for your own organization, use `
428
+ # customers/my_customer` If you're using this API to manage another organization,
429
+ # use `customers/`customer_id``, where customer_id is the customer to whom the
430
+ # device belongs.
431
+ # @param [String] fields
432
+ # Selector specifying which fields to include in a partial response.
433
+ # @param [String] quota_user
434
+ # Available to use for quota purposes for server-side applications. Can be any
435
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
436
+ # @param [Google::Apis::RequestOptions] options
437
+ # Request-specific options
438
+ #
439
+ # @yield [result, err] Result & error if block supplied
440
+ # @yieldparam result [Google::Apis::CloudidentityV1::Operation] parsed result object
441
+ # @yieldparam err [StandardError] error object if request failed
442
+ #
443
+ # @return [Google::Apis::CloudidentityV1::Operation]
444
+ #
445
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
446
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
447
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
448
+ def delete_device_device_user(name, customer: nil, fields: nil, quota_user: nil, options: nil, &block)
449
+ command = make_simple_command(:delete, 'v1/{+name}', options)
450
+ command.response_representation = Google::Apis::CloudidentityV1::Operation::Representation
451
+ command.response_class = Google::Apis::CloudidentityV1::Operation
452
+ command.params['name'] = name unless name.nil?
453
+ command.query['customer'] = customer unless customer.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 specified DeviceUser
460
+ # @param [String] name
461
+ # Required. [Resource name](https://cloud.google.com/apis/design/resource_names)
462
+ # of the Device in format: `devices/`device_id`/deviceUsers/`device_user_id``,
463
+ # where device_id is the unique ID assigned to the Device, and device_user_id is
464
+ # the unique ID assigned to the User.
465
+ # @param [String] customer
466
+ # Required. [Resource name](https://cloud.google.com/apis/design/resource_names)
467
+ # of the customer. If you're using this API for your own organization, use `
468
+ # customers/my_customer` If you're using this API to manage another organization,
469
+ # use `customers/`customer_id``, where customer_id is the customer to whom the
470
+ # device belongs.
471
+ # @param [String] fields
472
+ # Selector specifying which fields to include in a partial response.
473
+ # @param [String] quota_user
474
+ # Available to use for quota purposes for server-side applications. Can be any
475
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
476
+ # @param [Google::Apis::RequestOptions] options
477
+ # Request-specific options
478
+ #
479
+ # @yield [result, err] Result & error if block supplied
480
+ # @yieldparam result [Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1DeviceUser] parsed result object
481
+ # @yieldparam err [StandardError] error object if request failed
482
+ #
483
+ # @return [Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1DeviceUser]
484
+ #
485
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
486
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
487
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
488
+ def get_device_device_user(name, customer: nil, fields: nil, quota_user: nil, options: nil, &block)
489
+ command = make_simple_command(:get, 'v1/{+name}', options)
490
+ command.response_representation = Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1DeviceUser::Representation
491
+ command.response_class = Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1DeviceUser
492
+ command.params['name'] = name unless name.nil?
493
+ command.query['customer'] = customer unless customer.nil?
494
+ command.query['fields'] = fields unless fields.nil?
495
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
496
+ execute_or_queue_command(command, &block)
497
+ end
498
+
499
+ # Lists/Searches DeviceUsers.
500
+ # @param [String] parent
501
+ # Required. To list all DeviceUsers, set this to "devices/-". To list all
502
+ # DeviceUsers owned by a device, set this to the resource name of the device.
503
+ # Format: devices/`device`
504
+ # @param [String] customer
505
+ # Required. [Resource name](https://cloud.google.com/apis/design/resource_names)
506
+ # of the customer. If you're using this API for your own organization, use `
507
+ # customers/my_customer` If you're using this API to manage another organization,
508
+ # use `customers/`customer_id``, where customer_id is the customer to whom the
509
+ # device belongs.
510
+ # @param [String] filter
511
+ # Optional. Additional restrictions when fetching list of devices. For a list of
512
+ # search fields, refer to [Mobile device search fields](https://developers.
513
+ # google.com/admin-sdk/directory/v1/search-operators). Multiple search fields
514
+ # are separated by the space character.
515
+ # @param [String] order_by
516
+ # Optional. Order specification for devices in the response.
517
+ # @param [Fixnum] page_size
518
+ # Optional. The maximum number of DeviceUsers to return. If unspecified, at most
519
+ # 5 DeviceUsers will be returned. The maximum value is 20; values above 20 will
520
+ # be coerced to 20.
521
+ # @param [String] page_token
522
+ # Optional. A page token, received from a previous `ListDeviceUsers` call.
523
+ # Provide this to retrieve the subsequent page. When paginating, all other
524
+ # parameters provided to `ListBooks` must match the call that provided the page
525
+ # token.
526
+ # @param [String] fields
527
+ # Selector specifying which fields to include in a partial response.
528
+ # @param [String] quota_user
529
+ # Available to use for quota purposes for server-side applications. Can be any
530
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
531
+ # @param [Google::Apis::RequestOptions] options
532
+ # Request-specific options
533
+ #
534
+ # @yield [result, err] Result & error if block supplied
535
+ # @yieldparam result [Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse] parsed result object
536
+ # @yieldparam err [StandardError] error object if request failed
537
+ #
538
+ # @return [Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse]
539
+ #
540
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
541
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
542
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
543
+ def list_device_device_users(parent, customer: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
544
+ command = make_simple_command(:get, 'v1/{+parent}/deviceUsers', options)
545
+ command.response_representation = Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse::Representation
546
+ command.response_class = Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse
547
+ command.params['parent'] = parent unless parent.nil?
548
+ command.query['customer'] = customer unless customer.nil?
549
+ command.query['filter'] = filter unless filter.nil?
550
+ command.query['orderBy'] = order_by unless order_by.nil?
551
+ command.query['pageSize'] = page_size unless page_size.nil?
552
+ command.query['pageToken'] = page_token unless page_token.nil?
553
+ command.query['fields'] = fields unless fields.nil?
554
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
555
+ execute_or_queue_command(command, &block)
556
+ end
557
+
558
+ # Looks up resource names of the DeviceUsers associated with the caller's
559
+ # credentials, as well as the properties provided in the request. This method
560
+ # must be called with end-user credentials with the scope: https://www.
561
+ # googleapis.com/auth/cloud-identity.devices.lookup If multiple properties are
562
+ # provided, only DeviceUsers having all of these properties are considered as
563
+ # matches - i.e. the query behaves like an AND. Different platforms require
564
+ # different amounts of information from the caller to ensure that the DeviceUser
565
+ # is uniquely identified. - iOS: No properties need to be passed, the caller's
566
+ # credentials are sufficient to identify the corresponding DeviceUser. - Android:
567
+ # Specifying the 'android_id' field is required. - Desktop: Specifying the '
568
+ # raw_resource_id' field is required.
569
+ # @param [String] parent
570
+ # Must be set to "devices/-/deviceUsers" to search across all DeviceUser
571
+ # belonging to the user.
572
+ # @param [String] android_id
573
+ # Android Id returned by [Settings.Secure#ANDROID_ID](https://developer.android.
574
+ # com/reference/android/provider/Settings.Secure.html#ANDROID_ID).
575
+ # @param [Fixnum] page_size
576
+ # The maximum number of DeviceUsers to return. If unspecified, at most 20
577
+ # DeviceUsers will be returned. The maximum value is 20; values above 20 will be
578
+ # coerced to 20.
579
+ # @param [String] page_token
580
+ # A page token, received from a previous `LookupDeviceUsers` call. Provide this
581
+ # to retrieve the subsequent page. When paginating, all other parameters
582
+ # provided to `LookupDeviceUsers` must match the call that provided the page
583
+ # token.
584
+ # @param [String] raw_resource_id
585
+ # Raw Resource Id used by Google Endpoint Verification. If the user is enrolled
586
+ # into Google Endpoint Verification, this id will be saved as the '
587
+ # device_resource_id' field in the following platform dependent files. Mac: ~/.
588
+ # secureConnect/context_aware_config.json Windows: C:\Users\%USERPROFILE%\.
589
+ # secureConnect\context_aware_config.json Linux: ~/.secureConnect/
590
+ # context_aware_config.json
591
+ # @param [String] user_id
592
+ # The user whose DeviceUser's resource name will be fetched. Must be set to 'me'
593
+ # to fetch the DeviceUser's resource name for the calling user.
594
+ # @param [String] fields
595
+ # Selector specifying which fields to include in a partial response.
596
+ # @param [String] quota_user
597
+ # Available to use for quota purposes for server-side applications. Can be any
598
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
599
+ # @param [Google::Apis::RequestOptions] options
600
+ # Request-specific options
601
+ #
602
+ # @yield [result, err] Result & error if block supplied
603
+ # @yieldparam result [Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse] parsed result object
604
+ # @yieldparam err [StandardError] error object if request failed
605
+ #
606
+ # @return [Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse]
607
+ #
608
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
609
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
610
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
611
+ def lookup_device_device_user(parent, android_id: nil, page_size: nil, page_token: nil, raw_resource_id: nil, user_id: nil, fields: nil, quota_user: nil, options: nil, &block)
612
+ command = make_simple_command(:get, 'v1/{+parent}:lookup', options)
613
+ command.response_representation = Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse::Representation
614
+ command.response_class = Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse
615
+ command.params['parent'] = parent unless parent.nil?
616
+ command.query['androidId'] = android_id unless android_id.nil?
617
+ command.query['pageSize'] = page_size unless page_size.nil?
618
+ command.query['pageToken'] = page_token unless page_token.nil?
619
+ command.query['rawResourceId'] = raw_resource_id unless raw_resource_id.nil?
620
+ command.query['userId'] = user_id unless user_id.nil?
621
+ command.query['fields'] = fields unless fields.nil?
622
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
623
+ execute_or_queue_command(command, &block)
624
+ end
625
+
626
+ # Wipes the user's account on a device. Other data on the device that is not
627
+ # associated with the user's work account is not affected. For example, if a
628
+ # Gmail app is installed on a device that is used for personal and work purposes,
629
+ # and the user is logged in to the Gmail app with their personal account as
630
+ # well as their work account, wiping the "deviceUser" by their work
631
+ # administrator will not affect their personal account within Gmail or other
632
+ # apps such as Photos.
633
+ # @param [String] name
634
+ # Required. [Resource name](https://cloud.google.com/apis/design/resource_names)
635
+ # of the Device in format: `devices/`device_id`/deviceUsers/`device_user_id``,
636
+ # where device_id is the unique ID assigned to the Device, and device_user_id is
637
+ # the unique ID assigned to the User.
638
+ # @param [Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest] google_apps_cloudidentity_devices_v1_wipe_device_user_request_object
639
+ # @param [String] fields
640
+ # Selector specifying which fields to include in a partial response.
641
+ # @param [String] quota_user
642
+ # Available to use for quota purposes for server-side applications. Can be any
643
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
644
+ # @param [Google::Apis::RequestOptions] options
645
+ # Request-specific options
646
+ #
647
+ # @yield [result, err] Result & error if block supplied
648
+ # @yieldparam result [Google::Apis::CloudidentityV1::Operation] parsed result object
649
+ # @yieldparam err [StandardError] error object if request failed
650
+ #
651
+ # @return [Google::Apis::CloudidentityV1::Operation]
652
+ #
653
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
654
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
655
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
656
+ def wipe_device_device_user(name, google_apps_cloudidentity_devices_v1_wipe_device_user_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
657
+ command = make_simple_command(:post, 'v1/{+name}:wipe', options)
658
+ command.request_representation = Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1WipeDeviceUserRequest::Representation
659
+ command.request_object = google_apps_cloudidentity_devices_v1_wipe_device_user_request_object
660
+ command.response_representation = Google::Apis::CloudidentityV1::Operation::Representation
661
+ command.response_class = Google::Apis::CloudidentityV1::Operation
662
+ command.params['name'] = name unless name.nil?
663
+ command.query['fields'] = fields unless fields.nil?
664
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
665
+ execute_or_queue_command(command, &block)
666
+ end
667
+
668
+ # Gets the client state for the device user
669
+ # @param [String] name
670
+ # Required. [Resource name](https://cloud.google.com/apis/design/resource_names)
671
+ # of the ClientState in format: `devices/`device_id`/deviceUsers/`device_user_id`
672
+ # /clientStates/`partner_id``, where device_id is the unique ID assigned to the
673
+ # Device, device_user_id is the unique ID assigned to the User and partner_id
674
+ # identifies the partner storing the data. To get the client state for devices
675
+ # belonging to your own organization, the `partnerId` is in the format: `
676
+ # customerId-*anystring*`. Where the `customerId` is your organization's
677
+ # customer ID and `anystring` is any suffix. This suffix is used in setting up
678
+ # Custom Access Levels in Context-Aware Access. You may use `my_customer`
679
+ # instead of the customer ID for devices managed by your own organization.
680
+ # @param [String] customer
681
+ # Required. [Resource name](https://cloud.google.com/apis/design/resource_names)
682
+ # of the customer. If you're using this API for your own organization, use `
683
+ # customers/my_customer` If you're using this API to manage another organization,
684
+ # use `customers/`customer_id``, where customer_id is the customer to whom the
685
+ # device belongs.
686
+ # @param [String] fields
687
+ # Selector specifying which fields to include in a partial response.
688
+ # @param [String] quota_user
689
+ # Available to use for quota purposes for server-side applications. Can be any
690
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
691
+ # @param [Google::Apis::RequestOptions] options
692
+ # Request-specific options
693
+ #
694
+ # @yield [result, err] Result & error if block supplied
695
+ # @yieldparam result [Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1ClientState] parsed result object
696
+ # @yieldparam err [StandardError] error object if request failed
697
+ #
698
+ # @return [Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1ClientState]
699
+ #
700
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
701
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
702
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
703
+ def get_device_device_user_client_state(name, customer: nil, fields: nil, quota_user: nil, options: nil, &block)
704
+ command = make_simple_command(:get, 'v1/{+name}', options)
705
+ command.response_representation = Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1ClientState::Representation
706
+ command.response_class = Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1ClientState
707
+ command.params['name'] = name unless name.nil?
708
+ command.query['customer'] = customer unless customer.nil?
709
+ command.query['fields'] = fields unless fields.nil?
710
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
711
+ execute_or_queue_command(command, &block)
712
+ end
713
+
714
+ # Lists the client states for the given search query.
715
+ # @param [String] parent
716
+ # Required. To list all ClientStates, set this to "devices/-/deviceUsers/-". To
717
+ # list all ClientStates owned by a DeviceUser, set this to the resource name of
718
+ # the DeviceUser. Format: devices/`device`/deviceUsers/`deviceUser`
719
+ # @param [String] customer
720
+ # Required. [Resource name](https://cloud.google.com/apis/design/resource_names)
721
+ # of the customer. If you're using this API for your own organization, use `
722
+ # customers/my_customer` If you're using this API to manage another organization,
723
+ # use `customers/`customer_id``, where customer_id is the customer to whom the
724
+ # device belongs.
725
+ # @param [String] filter
726
+ # Optional. Additional restrictions when fetching list of client states.
727
+ # @param [String] order_by
728
+ # Optional. Order specification for client states in the response.
729
+ # @param [String] page_token
730
+ # Optional. A page token, received from a previous `ListClientStates` call.
731
+ # Provide this to retrieve the subsequent page. When paginating, all other
732
+ # parameters provided to `ListClientStates` must match the call that provided
733
+ # the page token.
734
+ # @param [String] fields
735
+ # Selector specifying which fields to include in a partial response.
736
+ # @param [String] quota_user
737
+ # Available to use for quota purposes for server-side applications. Can be any
738
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
739
+ # @param [Google::Apis::RequestOptions] options
740
+ # Request-specific options
741
+ #
742
+ # @yield [result, err] Result & error if block supplied
743
+ # @yieldparam result [Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1ListClientStatesResponse] parsed result object
744
+ # @yieldparam err [StandardError] error object if request failed
745
+ #
746
+ # @return [Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1ListClientStatesResponse]
747
+ #
748
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
749
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
750
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
751
+ def list_device_device_user_client_states(parent, customer: nil, filter: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
752
+ command = make_simple_command(:get, 'v1/{+parent}/clientStates', options)
753
+ command.response_representation = Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1ListClientStatesResponse::Representation
754
+ command.response_class = Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1ListClientStatesResponse
755
+ command.params['parent'] = parent unless parent.nil?
756
+ command.query['customer'] = customer unless customer.nil?
757
+ command.query['filter'] = filter unless filter.nil?
758
+ command.query['orderBy'] = order_by unless order_by.nil?
759
+ command.query['pageToken'] = page_token unless page_token.nil?
760
+ command.query['fields'] = fields unless fields.nil?
761
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
762
+ execute_or_queue_command(command, &block)
763
+ end
764
+
765
+ # Updates the client state for the device user **Note**: This method is
766
+ # available only to customers who have one of the following SKUs: Enterprise
767
+ # Standard, Enterprise Plus, Enterprise for Education, and Cloud Identity
768
+ # Premium
769
+ # @param [String] name
770
+ # Output only. [Resource name](https://cloud.google.com/apis/design/
771
+ # resource_names) of the ClientState in format: `devices/`device_id`/deviceUsers/
772
+ # `device_user_id`/clientState/`partner_id``, where partner_id corresponds to
773
+ # the partner storing the data. For partners belonging to the "BeyondCorp
774
+ # Alliance", this is the partner ID specified to you by Google. For all other
775
+ # callers, this is a string of the form: ``customer_id`-suffix`, where `
776
+ # customer_id` is your customer ID. The *suffix* is any string the caller
777
+ # specifies. This string will be displayed verbatim in the administration
778
+ # console. This suffix is used in setting up Custom Access Levels in Context-
779
+ # Aware Access. Your organization's customer ID can be obtained from the URL: `
780
+ # GET https://www.googleapis.com/admin/directory/v1/customers/my_customer` The `
781
+ # id` field in the response contains the customer ID starting with the letter 'C'
782
+ # . The customer ID to be used in this API is the string after the letter 'C' (
783
+ # not including 'C')
784
+ # @param [Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1ClientState] google_apps_cloudidentity_devices_v1_client_state_object
785
+ # @param [String] customer
786
+ # Required. [Resource name](https://cloud.google.com/apis/design/resource_names)
787
+ # of the customer. If you're using this API for your own organization, use `
788
+ # customers/my_customer` If you're using this API to manage another organization,
789
+ # use `customers/`customer_id``, where customer_id is the customer to whom the
790
+ # device belongs.
791
+ # @param [String] update_mask
792
+ # Optional. Comma-separated list of fully qualified names of fields to be
793
+ # updated. If not specified, all updatable fields in ClientState are updated.
794
+ # @param [String] fields
795
+ # Selector specifying which fields to include in a partial response.
796
+ # @param [String] quota_user
797
+ # Available to use for quota purposes for server-side applications. Can be any
798
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
799
+ # @param [Google::Apis::RequestOptions] options
800
+ # Request-specific options
801
+ #
802
+ # @yield [result, err] Result & error if block supplied
803
+ # @yieldparam result [Google::Apis::CloudidentityV1::Operation] parsed result object
804
+ # @yieldparam err [StandardError] error object if request failed
805
+ #
806
+ # @return [Google::Apis::CloudidentityV1::Operation]
807
+ #
808
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
809
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
810
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
811
+ def patch_device_device_user_client_state(name, google_apps_cloudidentity_devices_v1_client_state_object = nil, customer: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
812
+ command = make_simple_command(:patch, 'v1/{+name}', options)
813
+ command.request_representation = Google::Apis::CloudidentityV1::GoogleAppsCloudidentityDevicesV1ClientState::Representation
814
+ command.request_object = google_apps_cloudidentity_devices_v1_client_state_object
815
+ command.response_representation = Google::Apis::CloudidentityV1::Operation::Representation
816
+ command.response_class = Google::Apis::CloudidentityV1::Operation
817
+ command.params['name'] = name unless name.nil?
818
+ command.query['customer'] = customer unless customer.nil?
819
+ command.query['updateMask'] = update_mask unless update_mask.nil?
820
+ command.query['fields'] = fields unless fields.nil?
821
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
822
+ execute_or_queue_command(command, &block)
823
+ end
824
+
825
+ # Creates a Group.
826
+ # @param [Google::Apis::CloudidentityV1::Group] group_object
827
+ # @param [String] initial_group_config
828
+ # Optional. The initial configuration option for the `Group`.
829
+ # @param [String] fields
830
+ # Selector specifying which fields to include in a partial response.
831
+ # @param [String] quota_user
832
+ # Available to use for quota purposes for server-side applications. Can be any
833
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
834
+ # @param [Google::Apis::RequestOptions] options
835
+ # Request-specific options
836
+ #
837
+ # @yield [result, err] Result & error if block supplied
838
+ # @yieldparam result [Google::Apis::CloudidentityV1::Operation] parsed result object
839
+ # @yieldparam err [StandardError] error object if request failed
840
+ #
841
+ # @return [Google::Apis::CloudidentityV1::Operation]
842
+ #
843
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
844
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
845
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
846
+ def create_group(group_object = nil, initial_group_config: nil, fields: nil, quota_user: nil, options: nil, &block)
847
+ command = make_simple_command(:post, 'v1/groups', options)
848
+ command.request_representation = Google::Apis::CloudidentityV1::Group::Representation
849
+ command.request_object = group_object
850
+ command.response_representation = Google::Apis::CloudidentityV1::Operation::Representation
851
+ command.response_class = Google::Apis::CloudidentityV1::Operation
852
+ command.query['initialGroupConfig'] = initial_group_config unless initial_group_config.nil?
853
+ command.query['fields'] = fields unless fields.nil?
854
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
855
+ execute_or_queue_command(command, &block)
856
+ end
857
+
858
+ # Deletes a `Group`.
859
+ # @param [String] name
860
+ # Required. The [resource name](https://cloud.google.com/apis/design/
861
+ # resource_names) of the `Group` to retrieve. Must be of the form `groups/`
862
+ # group_id``.
863
+ # @param [String] fields
864
+ # Selector specifying which fields to include in a partial response.
865
+ # @param [String] quota_user
866
+ # Available to use for quota purposes for server-side applications. Can be any
867
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
868
+ # @param [Google::Apis::RequestOptions] options
869
+ # Request-specific options
870
+ #
871
+ # @yield [result, err] Result & error if block supplied
872
+ # @yieldparam result [Google::Apis::CloudidentityV1::Operation] parsed result object
873
+ # @yieldparam err [StandardError] error object if request failed
874
+ #
875
+ # @return [Google::Apis::CloudidentityV1::Operation]
876
+ #
877
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
878
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
879
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
880
+ def delete_group(name, fields: nil, quota_user: nil, options: nil, &block)
881
+ command = make_simple_command(:delete, 'v1/{+name}', options)
882
+ command.response_representation = Google::Apis::CloudidentityV1::Operation::Representation
883
+ command.response_class = Google::Apis::CloudidentityV1::Operation
884
+ command.params['name'] = name unless name.nil?
885
+ command.query['fields'] = fields unless fields.nil?
886
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
887
+ execute_or_queue_command(command, &block)
888
+ end
889
+
890
+ # Retrieves a `Group`.
891
+ # @param [String] name
892
+ # Required. The [resource name](https://cloud.google.com/apis/design/
893
+ # resource_names) of the `Group` to retrieve. Must be of the form `groups/`
894
+ # group_id``.
895
+ # @param [String] fields
896
+ # Selector specifying which fields to include in a partial response.
897
+ # @param [String] quota_user
898
+ # Available to use for quota purposes for server-side applications. Can be any
899
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
900
+ # @param [Google::Apis::RequestOptions] options
901
+ # Request-specific options
902
+ #
903
+ # @yield [result, err] Result & error if block supplied
904
+ # @yieldparam result [Google::Apis::CloudidentityV1::Group] parsed result object
905
+ # @yieldparam err [StandardError] error object if request failed
906
+ #
907
+ # @return [Google::Apis::CloudidentityV1::Group]
908
+ #
909
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
910
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
911
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
912
+ def get_group(name, fields: nil, quota_user: nil, options: nil, &block)
913
+ command = make_simple_command(:get, 'v1/{+name}', options)
914
+ command.response_representation = Google::Apis::CloudidentityV1::Group::Representation
915
+ command.response_class = Google::Apis::CloudidentityV1::Group
916
+ command.params['name'] = name unless name.nil?
917
+ command.query['fields'] = fields unless fields.nil?
918
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
919
+ execute_or_queue_command(command, &block)
920
+ end
921
+
922
+ # Lists the `Group`s under a customer or namespace.
923
+ # @param [Fixnum] page_size
924
+ # The maximum number of results to return. Note that the number of results
925
+ # returned may be less than this value even if there are more available results.
926
+ # To fetch all results, clients must continue calling this method repeatedly
927
+ # until the response no longer contains a `next_page_token`. If unspecified,
928
+ # defaults to 200 for `View.BASIC` and to 50 for `View.FULL`. Must not be
929
+ # greater than 1000 for `View.BASIC` or 500 for `View.FULL`.
930
+ # @param [String] page_token
931
+ # The `next_page_token` value returned from a previous list request, if any.
932
+ # @param [String] parent
933
+ # Required. The parent resource under which to list all `Group`s. Must be of the
934
+ # form `identitysources/`identity_source_id`` for external- identity-mapped
935
+ # groups or `customers/`customer_id`` for Google Groups.
936
+ # @param [String] view
937
+ # The level of detail to be returned. If unspecified, defaults to `View.BASIC`.
938
+ # @param [String] fields
939
+ # Selector specifying which fields to include in a partial response.
940
+ # @param [String] quota_user
941
+ # Available to use for quota purposes for server-side applications. Can be any
942
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
943
+ # @param [Google::Apis::RequestOptions] options
944
+ # Request-specific options
945
+ #
946
+ # @yield [result, err] Result & error if block supplied
947
+ # @yieldparam result [Google::Apis::CloudidentityV1::ListGroupsResponse] parsed result object
948
+ # @yieldparam err [StandardError] error object if request failed
949
+ #
950
+ # @return [Google::Apis::CloudidentityV1::ListGroupsResponse]
951
+ #
952
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
953
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
954
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
955
+ def list_groups(page_size: nil, page_token: nil, parent: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
956
+ command = make_simple_command(:get, 'v1/groups', options)
957
+ command.response_representation = Google::Apis::CloudidentityV1::ListGroupsResponse::Representation
958
+ command.response_class = Google::Apis::CloudidentityV1::ListGroupsResponse
959
+ command.query['pageSize'] = page_size unless page_size.nil?
960
+ command.query['pageToken'] = page_token unless page_token.nil?
961
+ command.query['parent'] = parent unless parent.nil?
962
+ command.query['view'] = view unless view.nil?
963
+ command.query['fields'] = fields unless fields.nil?
964
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
965
+ execute_or_queue_command(command, &block)
966
+ end
967
+
968
+ # Looks up the [resource name](https://cloud.google.com/apis/design/
969
+ # resource_names) of a `Group` by its `EntityKey`.
970
+ # @param [String] group_key_id
971
+ # The ID of the entity. For Google-managed entities, the `id` should be the
972
+ # email address of an existing group or user. For external-identity-mapped
973
+ # entities, the `id` must be a string conforming to the Identity Source's
974
+ # requirements. Must be unique within a `namespace`.
975
+ # @param [String] group_key_namespace
976
+ # The namespace in which the entity exists. If not specified, the `EntityKey`
977
+ # represents a Google-managed entity such as a Google user or a Google Group. If
978
+ # specified, the `EntityKey` represents an external-identity-mapped group. The
979
+ # namespace must correspond to an identity source created in Admin Console and
980
+ # must be in the form of `identitysources/`identity_source_id`.
981
+ # @param [String] fields
982
+ # Selector specifying which fields to include in a partial response.
983
+ # @param [String] quota_user
984
+ # Available to use for quota purposes for server-side applications. Can be any
985
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
986
+ # @param [Google::Apis::RequestOptions] options
987
+ # Request-specific options
988
+ #
989
+ # @yield [result, err] Result & error if block supplied
990
+ # @yieldparam result [Google::Apis::CloudidentityV1::LookupGroupNameResponse] parsed result object
991
+ # @yieldparam err [StandardError] error object if request failed
992
+ #
993
+ # @return [Google::Apis::CloudidentityV1::LookupGroupNameResponse]
994
+ #
995
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
996
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
997
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
998
+ def lookup_group(group_key_id: nil, group_key_namespace: nil, fields: nil, quota_user: nil, options: nil, &block)
999
+ command = make_simple_command(:get, 'v1/groups:lookup', options)
1000
+ command.response_representation = Google::Apis::CloudidentityV1::LookupGroupNameResponse::Representation
1001
+ command.response_class = Google::Apis::CloudidentityV1::LookupGroupNameResponse
1002
+ command.query['groupKey.id'] = group_key_id unless group_key_id.nil?
1003
+ command.query['groupKey.namespace'] = group_key_namespace unless group_key_namespace.nil?
1004
+ command.query['fields'] = fields unless fields.nil?
1005
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1006
+ execute_or_queue_command(command, &block)
1007
+ end
1008
+
1009
+ # Updates a `Group`.
1010
+ # @param [String] name
1011
+ # Output only. The [resource name](https://cloud.google.com/apis/design/
1012
+ # resource_names) of the `Group`. Shall be of the form `groups/`group_id``.
1013
+ # @param [Google::Apis::CloudidentityV1::Group] group_object
1014
+ # @param [String] update_mask
1015
+ # Required. The fully-qualified names of fields to update. May only contain the
1016
+ # following fields: `display_name`, `description`.
1017
+ # @param [String] fields
1018
+ # Selector specifying which fields to include in a partial response.
1019
+ # @param [String] quota_user
1020
+ # Available to use for quota purposes for server-side applications. Can be any
1021
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1022
+ # @param [Google::Apis::RequestOptions] options
1023
+ # Request-specific options
1024
+ #
1025
+ # @yield [result, err] Result & error if block supplied
1026
+ # @yieldparam result [Google::Apis::CloudidentityV1::Operation] parsed result object
1027
+ # @yieldparam err [StandardError] error object if request failed
1028
+ #
1029
+ # @return [Google::Apis::CloudidentityV1::Operation]
1030
+ #
1031
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1032
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1033
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1034
+ def patch_group(name, group_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1035
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1036
+ command.request_representation = Google::Apis::CloudidentityV1::Group::Representation
1037
+ command.request_object = group_object
1038
+ command.response_representation = Google::Apis::CloudidentityV1::Operation::Representation
1039
+ command.response_class = Google::Apis::CloudidentityV1::Operation
1040
+ command.params['name'] = name unless name.nil?
1041
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1042
+ command.query['fields'] = fields unless fields.nil?
1043
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1044
+ execute_or_queue_command(command, &block)
1045
+ end
1046
+
1047
+ # Searches for `Group`s matching a specified query.
1048
+ # @param [Fixnum] page_size
1049
+ # The maximum number of results to return. Note that the number of results
1050
+ # returned may be less than this value even if there are more available results.
1051
+ # To fetch all results, clients must continue calling this method repeatedly
1052
+ # until the response no longer contains a `next_page_token`. If unspecified,
1053
+ # defaults to 200 for `GroupView.BASIC` and 50 for `GroupView.FULL`. Must not be
1054
+ # greater than 1000 for `GroupView.BASIC` or 500 for `GroupView.FULL`.
1055
+ # @param [String] page_token
1056
+ # The `next_page_token` value returned from a previous search request, if any.
1057
+ # @param [String] query
1058
+ # Required. The search query. Must be specified in [Common Expression Language](
1059
+ # https://opensource.google/projects/cel). May only contain equality operators
1060
+ # on the parent and inclusion operators on labels (e.g., `parent == 'customers/`
1061
+ # customer_id`' && 'cloudidentity.googleapis.com/groups.discussion_forum' in
1062
+ # labels`).
1063
+ # @param [String] view
1064
+ # The level of detail to be returned. If unspecified, defaults to `View.BASIC`.
1065
+ # @param [String] fields
1066
+ # Selector specifying which fields to include in a partial response.
1067
+ # @param [String] quota_user
1068
+ # Available to use for quota purposes for server-side applications. Can be any
1069
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1070
+ # @param [Google::Apis::RequestOptions] options
1071
+ # Request-specific options
1072
+ #
1073
+ # @yield [result, err] Result & error if block supplied
1074
+ # @yieldparam result [Google::Apis::CloudidentityV1::SearchGroupsResponse] parsed result object
1075
+ # @yieldparam err [StandardError] error object if request failed
1076
+ #
1077
+ # @return [Google::Apis::CloudidentityV1::SearchGroupsResponse]
1078
+ #
1079
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1080
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1081
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1082
+ def search_groups(page_size: nil, page_token: nil, query: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
1083
+ command = make_simple_command(:get, 'v1/groups:search', options)
1084
+ command.response_representation = Google::Apis::CloudidentityV1::SearchGroupsResponse::Representation
1085
+ command.response_class = Google::Apis::CloudidentityV1::SearchGroupsResponse
1086
+ command.query['pageSize'] = page_size unless page_size.nil?
1087
+ command.query['pageToken'] = page_token unless page_token.nil?
1088
+ command.query['query'] = query unless query.nil?
1089
+ command.query['view'] = view unless view.nil?
1090
+ command.query['fields'] = fields unless fields.nil?
1091
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1092
+ execute_or_queue_command(command, &block)
1093
+ end
1094
+
1095
+ # Check a potential member for membership in a group. **Note:** This feature is
1096
+ # only available to Google Workspace Enterprise Standard, Enterprise Plus, and
1097
+ # Enterprise for Education; and Cloud Identity Premium accounts. If the account
1098
+ # of the member is not one of these, a 403 (PERMISSION_DENIED) HTTP status code
1099
+ # will be returned. A member has membership to a group as long as there is a
1100
+ # single viewable transitive membership between the group and the member. The
1101
+ # actor must have view permissions to at least one transitive membership between
1102
+ # the member and group.
1103
+ # @param [String] parent
1104
+ # [Resource name](https://cloud.google.com/apis/design/resource_names) of the
1105
+ # group to check the transitive membership in. Format: `groups/`group_id``,
1106
+ # where `group_id` is the unique id assigned to the Group to which the
1107
+ # Membership belongs to.
1108
+ # @param [String] query
1109
+ # Required. A CEL expression that MUST include member specification. This is a `
1110
+ # required` field. Certain groups are uniquely identified by both a '
1111
+ # member_key_id' and a 'member_key_namespace', which requires an additional
1112
+ # query input: 'member_key_namespace'. Example query: `member_key_id == '
1113
+ # member_key_id_value'`
1114
+ # @param [String] fields
1115
+ # Selector specifying which fields to include in a partial response.
1116
+ # @param [String] quota_user
1117
+ # Available to use for quota purposes for server-side applications. Can be any
1118
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1119
+ # @param [Google::Apis::RequestOptions] options
1120
+ # Request-specific options
1121
+ #
1122
+ # @yield [result, err] Result & error if block supplied
1123
+ # @yieldparam result [Google::Apis::CloudidentityV1::CheckTransitiveMembershipResponse] parsed result object
1124
+ # @yieldparam err [StandardError] error object if request failed
1125
+ #
1126
+ # @return [Google::Apis::CloudidentityV1::CheckTransitiveMembershipResponse]
1127
+ #
1128
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1129
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1130
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1131
+ def check_group_membership_transitive_membership(parent, query: nil, fields: nil, quota_user: nil, options: nil, &block)
1132
+ command = make_simple_command(:get, 'v1/{+parent}/memberships:checkTransitiveMembership', options)
1133
+ command.response_representation = Google::Apis::CloudidentityV1::CheckTransitiveMembershipResponse::Representation
1134
+ command.response_class = Google::Apis::CloudidentityV1::CheckTransitiveMembershipResponse
1135
+ command.params['parent'] = parent unless parent.nil?
1136
+ command.query['query'] = query unless query.nil?
1137
+ command.query['fields'] = fields unless fields.nil?
1138
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1139
+ execute_or_queue_command(command, &block)
1140
+ end
1141
+
1142
+ # Creates a `Membership`.
1143
+ # @param [String] parent
1144
+ # Required. The parent `Group` resource under which to create the `Membership`.
1145
+ # Must be of the form `groups/`group_id``.
1146
+ # @param [Google::Apis::CloudidentityV1::Membership] membership_object
1147
+ # @param [String] fields
1148
+ # Selector specifying which fields to include in a partial response.
1149
+ # @param [String] quota_user
1150
+ # Available to use for quota purposes for server-side applications. Can be any
1151
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1152
+ # @param [Google::Apis::RequestOptions] options
1153
+ # Request-specific options
1154
+ #
1155
+ # @yield [result, err] Result & error if block supplied
1156
+ # @yieldparam result [Google::Apis::CloudidentityV1::Operation] parsed result object
1157
+ # @yieldparam err [StandardError] error object if request failed
1158
+ #
1159
+ # @return [Google::Apis::CloudidentityV1::Operation]
1160
+ #
1161
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1162
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1163
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1164
+ def create_group_membership(parent, membership_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1165
+ command = make_simple_command(:post, 'v1/{+parent}/memberships', options)
1166
+ command.request_representation = Google::Apis::CloudidentityV1::Membership::Representation
1167
+ command.request_object = membership_object
1168
+ command.response_representation = Google::Apis::CloudidentityV1::Operation::Representation
1169
+ command.response_class = Google::Apis::CloudidentityV1::Operation
1170
+ command.params['parent'] = parent unless parent.nil?
1171
+ command.query['fields'] = fields unless fields.nil?
1172
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1173
+ execute_or_queue_command(command, &block)
1174
+ end
1175
+
1176
+ # Deletes a `Membership`.
1177
+ # @param [String] name
1178
+ # Required. The [resource name](https://cloud.google.com/apis/design/
1179
+ # resource_names) of the `Membership` to delete. Must be of the form `groups/`
1180
+ # group_id`/memberships/`membership_id``
1181
+ # @param [String] fields
1182
+ # Selector specifying which fields to include in a partial response.
1183
+ # @param [String] quota_user
1184
+ # Available to use for quota purposes for server-side applications. Can be any
1185
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1186
+ # @param [Google::Apis::RequestOptions] options
1187
+ # Request-specific options
1188
+ #
1189
+ # @yield [result, err] Result & error if block supplied
1190
+ # @yieldparam result [Google::Apis::CloudidentityV1::Operation] parsed result object
1191
+ # @yieldparam err [StandardError] error object if request failed
1192
+ #
1193
+ # @return [Google::Apis::CloudidentityV1::Operation]
1194
+ #
1195
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1196
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1197
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1198
+ def delete_group_membership(name, fields: nil, quota_user: nil, options: nil, &block)
1199
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1200
+ command.response_representation = Google::Apis::CloudidentityV1::Operation::Representation
1201
+ command.response_class = Google::Apis::CloudidentityV1::Operation
1202
+ command.params['name'] = name unless name.nil?
1203
+ command.query['fields'] = fields unless fields.nil?
1204
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1205
+ execute_or_queue_command(command, &block)
1206
+ end
1207
+
1208
+ # Retrieves a `Membership`.
1209
+ # @param [String] name
1210
+ # Required. The [resource name](https://cloud.google.com/apis/design/
1211
+ # resource_names) of the `Membership` to retrieve. Must be of the form `groups/`
1212
+ # group_id`/memberships/`membership_id``.
1213
+ # @param [String] fields
1214
+ # Selector specifying which fields to include in a partial response.
1215
+ # @param [String] quota_user
1216
+ # Available to use for quota purposes for server-side applications. Can be any
1217
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1218
+ # @param [Google::Apis::RequestOptions] options
1219
+ # Request-specific options
1220
+ #
1221
+ # @yield [result, err] Result & error if block supplied
1222
+ # @yieldparam result [Google::Apis::CloudidentityV1::Membership] parsed result object
1223
+ # @yieldparam err [StandardError] error object if request failed
1224
+ #
1225
+ # @return [Google::Apis::CloudidentityV1::Membership]
1226
+ #
1227
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1228
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1229
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1230
+ def get_group_membership(name, fields: nil, quota_user: nil, options: nil, &block)
1231
+ command = make_simple_command(:get, 'v1/{+name}', options)
1232
+ command.response_representation = Google::Apis::CloudidentityV1::Membership::Representation
1233
+ command.response_class = Google::Apis::CloudidentityV1::Membership
1234
+ command.params['name'] = name unless name.nil?
1235
+ command.query['fields'] = fields unless fields.nil?
1236
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1237
+ execute_or_queue_command(command, &block)
1238
+ end
1239
+
1240
+ # Get a membership graph of just a member or both a member and a group. **Note:**
1241
+ # This feature is only available to Google Workspace Enterprise Standard,
1242
+ # Enterprise Plus, and Enterprise for Education; and Cloud Identity Premium
1243
+ # accounts. If the account of the member is not one of these, a 403 (
1244
+ # PERMISSION_DENIED) HTTP status code will be returned. Given a member, the
1245
+ # response will contain all membership paths from the member. Given both a group
1246
+ # and a member, the response will contain all membership paths between the group
1247
+ # and the member.
1248
+ # @param [String] parent
1249
+ # Required. [Resource name](https://cloud.google.com/apis/design/resource_names)
1250
+ # of the group to search transitive memberships in. Format: `groups/`group_id``,
1251
+ # where `group_id` is the unique ID assigned to the Group to which the
1252
+ # Membership belongs to. group_id can be a wildcard collection id "-". When a
1253
+ # group_id is specified, the membership graph will be constrained to paths
1254
+ # between the member (defined in the query) and the parent. If a wildcard
1255
+ # collection is provided, all membership paths connected to the member will be
1256
+ # returned.
1257
+ # @param [String] query
1258
+ # Required. A CEL expression that MUST include member specification AND label(s).
1259
+ # Certain groups are uniquely identified by both a 'member_key_id' and a '
1260
+ # member_key_namespace', which requires an additional query input: '
1261
+ # member_key_namespace'. Example query: `member_key_id == 'member_key_id_value' &
1262
+ # & in labels`
1263
+ # @param [String] fields
1264
+ # Selector specifying which fields to include in a partial response.
1265
+ # @param [String] quota_user
1266
+ # Available to use for quota purposes for server-side applications. Can be any
1267
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1268
+ # @param [Google::Apis::RequestOptions] options
1269
+ # Request-specific options
1270
+ #
1271
+ # @yield [result, err] Result & error if block supplied
1272
+ # @yieldparam result [Google::Apis::CloudidentityV1::Operation] parsed result object
1273
+ # @yieldparam err [StandardError] error object if request failed
1274
+ #
1275
+ # @return [Google::Apis::CloudidentityV1::Operation]
1276
+ #
1277
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1278
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1279
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1280
+ def get_group_membership_membership_graph(parent, query: nil, fields: nil, quota_user: nil, options: nil, &block)
1281
+ command = make_simple_command(:get, 'v1/{+parent}/memberships:getMembershipGraph', options)
1282
+ command.response_representation = Google::Apis::CloudidentityV1::Operation::Representation
1283
+ command.response_class = Google::Apis::CloudidentityV1::Operation
1284
+ command.params['parent'] = parent unless parent.nil?
1285
+ command.query['query'] = query unless query.nil?
1286
+ command.query['fields'] = fields unless fields.nil?
1287
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1288
+ execute_or_queue_command(command, &block)
1289
+ end
1290
+
1291
+ # Lists the `Membership`s within a `Group`.
1292
+ # @param [String] parent
1293
+ # Required. The parent `Group` resource under which to lookup the `Membership`
1294
+ # name. Must be of the form `groups/`group_id``.
1295
+ # @param [Fixnum] page_size
1296
+ # The maximum number of results to return. Note that the number of results
1297
+ # returned may be less than this value even if there are more available results.
1298
+ # To fetch all results, clients must continue calling this method repeatedly
1299
+ # until the response no longer contains a `next_page_token`. If unspecified,
1300
+ # defaults to 200 for `GroupView.BASIC` and to 50 for `GroupView.FULL`. Must not
1301
+ # be greater than 1000 for `GroupView.BASIC` or 500 for `GroupView.FULL`.
1302
+ # @param [String] page_token
1303
+ # The `next_page_token` value returned from a previous search request, if any.
1304
+ # @param [String] view
1305
+ # The level of detail to be returned. If unspecified, defaults to `View.BASIC`.
1306
+ # @param [String] fields
1307
+ # Selector specifying which fields to include in a partial response.
1308
+ # @param [String] quota_user
1309
+ # Available to use for quota purposes for server-side applications. Can be any
1310
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1311
+ # @param [Google::Apis::RequestOptions] options
1312
+ # Request-specific options
1313
+ #
1314
+ # @yield [result, err] Result & error if block supplied
1315
+ # @yieldparam result [Google::Apis::CloudidentityV1::ListMembershipsResponse] parsed result object
1316
+ # @yieldparam err [StandardError] error object if request failed
1317
+ #
1318
+ # @return [Google::Apis::CloudidentityV1::ListMembershipsResponse]
1319
+ #
1320
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1321
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1322
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1323
+ def list_group_memberships(parent, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
1324
+ command = make_simple_command(:get, 'v1/{+parent}/memberships', options)
1325
+ command.response_representation = Google::Apis::CloudidentityV1::ListMembershipsResponse::Representation
1326
+ command.response_class = Google::Apis::CloudidentityV1::ListMembershipsResponse
1327
+ command.params['parent'] = parent unless parent.nil?
1328
+ command.query['pageSize'] = page_size unless page_size.nil?
1329
+ command.query['pageToken'] = page_token unless page_token.nil?
1330
+ command.query['view'] = view unless view.nil?
1331
+ command.query['fields'] = fields unless fields.nil?
1332
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1333
+ execute_or_queue_command(command, &block)
1334
+ end
1335
+
1336
+ # Looks up the [resource name](https://cloud.google.com/apis/design/
1337
+ # resource_names) of a `Membership` by its `EntityKey`.
1338
+ # @param [String] parent
1339
+ # Required. The parent `Group` resource under which to lookup the `Membership`
1340
+ # name. Must be of the form `groups/`group_id``.
1341
+ # @param [String] member_key_id
1342
+ # The ID of the entity. For Google-managed entities, the `id` should be the
1343
+ # email address of an existing group or user. For external-identity-mapped
1344
+ # entities, the `id` must be a string conforming to the Identity Source's
1345
+ # requirements. Must be unique within a `namespace`.
1346
+ # @param [String] member_key_namespace
1347
+ # The namespace in which the entity exists. If not specified, the `EntityKey`
1348
+ # represents a Google-managed entity such as a Google user or a Google Group. If
1349
+ # specified, the `EntityKey` represents an external-identity-mapped group. The
1350
+ # namespace must correspond to an identity source created in Admin Console and
1351
+ # must be in the form of `identitysources/`identity_source_id`.
1352
+ # @param [String] fields
1353
+ # Selector specifying which fields to include in a partial response.
1354
+ # @param [String] quota_user
1355
+ # Available to use for quota purposes for server-side applications. Can be any
1356
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1357
+ # @param [Google::Apis::RequestOptions] options
1358
+ # Request-specific options
1359
+ #
1360
+ # @yield [result, err] Result & error if block supplied
1361
+ # @yieldparam result [Google::Apis::CloudidentityV1::LookupMembershipNameResponse] parsed result object
1362
+ # @yieldparam err [StandardError] error object if request failed
1363
+ #
1364
+ # @return [Google::Apis::CloudidentityV1::LookupMembershipNameResponse]
1365
+ #
1366
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1367
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1368
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1369
+ def lookup_group_membership(parent, member_key_id: nil, member_key_namespace: nil, fields: nil, quota_user: nil, options: nil, &block)
1370
+ command = make_simple_command(:get, 'v1/{+parent}/memberships:lookup', options)
1371
+ command.response_representation = Google::Apis::CloudidentityV1::LookupMembershipNameResponse::Representation
1372
+ command.response_class = Google::Apis::CloudidentityV1::LookupMembershipNameResponse
1373
+ command.params['parent'] = parent unless parent.nil?
1374
+ command.query['memberKey.id'] = member_key_id unless member_key_id.nil?
1375
+ command.query['memberKey.namespace'] = member_key_namespace unless member_key_namespace.nil?
1376
+ command.query['fields'] = fields unless fields.nil?
1377
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1378
+ execute_or_queue_command(command, &block)
1379
+ end
1380
+
1381
+ # Modifies the `MembershipRole`s of a `Membership`.
1382
+ # @param [String] name
1383
+ # Required. The [resource name](https://cloud.google.com/apis/design/
1384
+ # resource_names) of the `Membership` whose roles are to be modified. Must be of
1385
+ # the form `groups/`group_id`/memberships/`membership_id``.
1386
+ # @param [Google::Apis::CloudidentityV1::ModifyMembershipRolesRequest] modify_membership_roles_request_object
1387
+ # @param [String] fields
1388
+ # Selector specifying which fields to include in a partial response.
1389
+ # @param [String] quota_user
1390
+ # Available to use for quota purposes for server-side applications. Can be any
1391
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1392
+ # @param [Google::Apis::RequestOptions] options
1393
+ # Request-specific options
1394
+ #
1395
+ # @yield [result, err] Result & error if block supplied
1396
+ # @yieldparam result [Google::Apis::CloudidentityV1::ModifyMembershipRolesResponse] parsed result object
1397
+ # @yieldparam err [StandardError] error object if request failed
1398
+ #
1399
+ # @return [Google::Apis::CloudidentityV1::ModifyMembershipRolesResponse]
1400
+ #
1401
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1402
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1403
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1404
+ def modify_membership_roles(name, modify_membership_roles_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1405
+ command = make_simple_command(:post, 'v1/{+name}:modifyMembershipRoles', options)
1406
+ command.request_representation = Google::Apis::CloudidentityV1::ModifyMembershipRolesRequest::Representation
1407
+ command.request_object = modify_membership_roles_request_object
1408
+ command.response_representation = Google::Apis::CloudidentityV1::ModifyMembershipRolesResponse::Representation
1409
+ command.response_class = Google::Apis::CloudidentityV1::ModifyMembershipRolesResponse
1410
+ command.params['name'] = name unless name.nil?
1411
+ command.query['fields'] = fields unless fields.nil?
1412
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1413
+ execute_or_queue_command(command, &block)
1414
+ end
1415
+
1416
+ # Search transitive groups of a member. **Note:** This feature is only available
1417
+ # to Google Workspace Enterprise Standard, Enterprise Plus, and Enterprise for
1418
+ # Education; and Cloud Identity Premium accounts. If the account of the member
1419
+ # is not one of these, a 403 (PERMISSION_DENIED) HTTP status code will be
1420
+ # returned. A transitive group is any group that has a direct or indirect
1421
+ # membership to the member. Actor must have view permissions all transitive
1422
+ # groups.
1423
+ # @param [String] parent
1424
+ # [Resource name](https://cloud.google.com/apis/design/resource_names) of the
1425
+ # group to search transitive memberships in. Format: `groups/`group_id``, where `
1426
+ # group_id` is always '-' as this API will search across all groups for a given
1427
+ # member.
1428
+ # @param [Fixnum] page_size
1429
+ # The default page size is 200 (max 1000).
1430
+ # @param [String] page_token
1431
+ # The next_page_token value returned from a previous list request, if any.
1432
+ # @param [String] query
1433
+ # Required. A CEL expression that MUST include member specification AND label(s).
1434
+ # This is a `required` field. Users can search on label attributes of groups.
1435
+ # CONTAINS match ('in') is supported on labels. Certain groups are uniquely
1436
+ # identified by both a 'member_key_id' and a 'member_key_namespace', which
1437
+ # requires an additional query input: 'member_key_namespace'. Example query: `
1438
+ # member_key_id == 'member_key_id_value' && in labels`
1439
+ # @param [String] fields
1440
+ # Selector specifying which fields to include in a partial response.
1441
+ # @param [String] quota_user
1442
+ # Available to use for quota purposes for server-side applications. Can be any
1443
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1444
+ # @param [Google::Apis::RequestOptions] options
1445
+ # Request-specific options
1446
+ #
1447
+ # @yield [result, err] Result & error if block supplied
1448
+ # @yieldparam result [Google::Apis::CloudidentityV1::SearchTransitiveGroupsResponse] parsed result object
1449
+ # @yieldparam err [StandardError] error object if request failed
1450
+ #
1451
+ # @return [Google::Apis::CloudidentityV1::SearchTransitiveGroupsResponse]
1452
+ #
1453
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1454
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1455
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1456
+ def search_group_membership_transitive_groups(parent, page_size: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block)
1457
+ command = make_simple_command(:get, 'v1/{+parent}/memberships:searchTransitiveGroups', options)
1458
+ command.response_representation = Google::Apis::CloudidentityV1::SearchTransitiveGroupsResponse::Representation
1459
+ command.response_class = Google::Apis::CloudidentityV1::SearchTransitiveGroupsResponse
1460
+ command.params['parent'] = parent unless parent.nil?
1461
+ command.query['pageSize'] = page_size unless page_size.nil?
1462
+ command.query['pageToken'] = page_token unless page_token.nil?
1463
+ command.query['query'] = query unless query.nil?
1464
+ command.query['fields'] = fields unless fields.nil?
1465
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1466
+ execute_or_queue_command(command, &block)
1467
+ end
1468
+
1469
+ # Search transitive memberships of a group. **Note:** This feature is only
1470
+ # available to Google Workspace Enterprise Standard, Enterprise Plus, and
1471
+ # Enterprise for Education; and Cloud Identity Premium accounts. If the account
1472
+ # of the group is not one of these, a 403 (PERMISSION_DENIED) HTTP status code
1473
+ # will be returned. A transitive membership is any direct or indirect membership
1474
+ # of a group. Actor must have view permissions to all transitive memberships.
1475
+ # @param [String] parent
1476
+ # [Resource name](https://cloud.google.com/apis/design/resource_names) of the
1477
+ # group to search transitive memberships in. Format: `groups/`group_id``, where `
1478
+ # group_id` is the unique ID assigned to the Group.
1479
+ # @param [Fixnum] page_size
1480
+ # The default page size is 200 (max 1000).
1481
+ # @param [String] page_token
1482
+ # The next_page_token value returned from a previous list request, if any.
1483
+ # @param [String] fields
1484
+ # Selector specifying which fields to include in a partial response.
1485
+ # @param [String] quota_user
1486
+ # Available to use for quota purposes for server-side applications. Can be any
1487
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1488
+ # @param [Google::Apis::RequestOptions] options
1489
+ # Request-specific options
1490
+ #
1491
+ # @yield [result, err] Result & error if block supplied
1492
+ # @yieldparam result [Google::Apis::CloudidentityV1::SearchTransitiveMembershipsResponse] parsed result object
1493
+ # @yieldparam err [StandardError] error object if request failed
1494
+ #
1495
+ # @return [Google::Apis::CloudidentityV1::SearchTransitiveMembershipsResponse]
1496
+ #
1497
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1498
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1499
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1500
+ def search_group_membership_transitive_memberships(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1501
+ command = make_simple_command(:get, 'v1/{+parent}/memberships:searchTransitiveMemberships', options)
1502
+ command.response_representation = Google::Apis::CloudidentityV1::SearchTransitiveMembershipsResponse::Representation
1503
+ command.response_class = Google::Apis::CloudidentityV1::SearchTransitiveMembershipsResponse
1504
+ command.params['parent'] = parent unless parent.nil?
1505
+ command.query['pageSize'] = page_size unless page_size.nil?
1506
+ command.query['pageToken'] = page_token unless page_token.nil?
1507
+ command.query['fields'] = fields unless fields.nil?
1508
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1509
+ execute_or_queue_command(command, &block)
1510
+ end
1511
+
1512
+ protected
1513
+
1514
+ def apply_command_defaults(command)
1515
+ command.query['key'] = key unless key.nil?
1516
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1517
+ end
1518
+ end
1519
+ end
1520
+ end
1521
+ end