You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
f"Invalid operation: An 'email_address' must be provided when 'grantee_type' is not set to 'EVERYONE'. Currently, 'grantee_type' is set to '{grantee_type}' and 'email_address' is '{email_addressifemail_addresselse'not provided'}'."
280
300
)
281
301
302
+
ifemail_addressandgrantee_typeisNone:
303
+
ifemail_address.endswith("googlegroups.com"):
304
+
grantee_type=GranteeType.GROUP
305
+
else:
306
+
grantee_type=GranteeType.USER
307
+
282
308
permission=protos.Permission(
283
309
role=role,
284
310
grantee_type=grantee_type,
@@ -367,6 +393,10 @@ def list(
367
393
permission=type(permission).to_dict(permission)
368
394
yieldPermission(**permission)
369
395
396
+
def__iter__(self):
397
+
returnself.list()
398
+
399
+
370
400
asyncdeflist_async(
371
401
self,
372
402
page_size: Optional[int] =None,
@@ -385,6 +415,42 @@ async def list_async(
385
415
permission=type(permission).to_dict(permission)
386
416
yieldPermission(**permission)
387
417
418
+
asyncdef__aiter__(self):
419
+
returnawaitself.async_list()
420
+
421
+
@classmethod
422
+
defget(
423
+
cls,
424
+
name: str,
425
+
client: glm.PermissionServiceClient|None=None,
426
+
) ->Permission:
427
+
"""
428
+
Get information about a specific permission.
429
+
430
+
Args:
431
+
name: The name of the permission to get.
432
+
433
+
Returns:
434
+
Requested permission as an instance of `Permission`.
435
+
"""
436
+
returnPermission.get(name)
437
+
438
+
@classmethod
439
+
asyncdefget_async(
440
+
cls,
441
+
name: str
442
+
):
443
+
"""
444
+
Get information about a specific permission.
445
+
446
+
Args:
447
+
name: The name of the permission to get.
448
+
449
+
Returns:
450
+
Requested permission as an instance of `Permission`.
0 commit comments