google-apis-cloudidentity_v1beta1 0.1.0

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