![]() |
A permission to access a resource.
google.generativeai.types.Permission(
name: str,
role: RoleOptions,
grantee_type: Optional[GranteeTypeOptions] = None,
email_address: Optional[str] = None
)
Attributes | |
---|---|
`name` | Dataclass field |
`role` | Dataclass field |
`grantee_type` | Dataclass field |
`email_address` | Dataclass field |
delete
delete(
client: (glm.PermissionServiceClient | None) = None
) -> None
Delete permission (self).
delete_async
delete_async(
client=None
)
This is the async version of Permission.delete
.
get
@classmethod
get( name: str, client: (glm.PermissionServiceClient | None) = None ) -> Permission
Get information about a specific permission.
Args | |
---|---|
`name` | The name of the permission to get. |
Returns | |
---|---|
Requested permission as an instance of `Permission`. |
get_async
get_async(
name, client=None
)
This is the async version of Permission.get
.
to_dict
to_dict() -> dict[str, Any]
update
update(
updates: dict[str, Any],
client: (glm.PermissionServiceClient | None) = None
) -> Permission
Update a list of fields for a specified permission.
Args | |
---|---|
`updates` | The list of fields to update. Currently only `role` is supported as an update path. |
Returns | |
---|---|
`Permission` object with specified updates. |
update_async
update_async(
updates, client=None
)
This is the async version of Permission.update
.
__eq__
__eq__(
other
)
Return self==value.
Class Variables | |
---|---|
email_address | `None` |