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
299
)
281
300
301
+
ifemail_addressandgrantee_typeisNone:
302
+
ifemail_address.endswith("googlegroups.com"):
303
+
grantee_type=GranteeType.GROUP
304
+
else:
305
+
grantee_type=GranteeType.USER
306
+
282
307
permission=protos.Permission(
283
308
role=role,
284
309
grantee_type=grantee_type,
@@ -367,6 +392,9 @@ def list(
367
392
permission=type(permission).to_dict(permission)
368
393
yieldPermission(**permission)
369
394
395
+
def__iter__(self):
396
+
returnself.list()
397
+
370
398
asyncdeflist_async(
371
399
self,
372
400
page_size: Optional[int] =None,
@@ -385,6 +413,35 @@ async def list_async(
385
413
permission=type(permission).to_dict(permission)
386
414
yieldPermission(**permission)
387
415
416
+
asyncdef__aiter__(self):
417
+
returnself.list_async()
418
+
419
+
@classmethod
420
+
defget(cls, name: str) ->Permission:
421
+
"""
422
+
Get information about a specific permission.
423
+
424
+
Args:
425
+
name: The name of the permission to get.
426
+
427
+
Returns:
428
+
Requested permission as an instance of `Permission`.
429
+
"""
430
+
returnPermission.get(name)
431
+
432
+
@classmethod
433
+
asyncdefget_async(cls, name: str) ->Permission:
434
+
"""
435
+
Get information about a specific permission.
436
+
437
+
Args:
438
+
name: The name of the permission to get.
439
+
440
+
Returns:
441
+
Requested permission as an instance of `Permission`.
0 commit comments