generative-ai-python

google.generativeai.types.Permissions

`parent`

Methods

create

View source

Create a new permission on a resource (self).

Args
`parent` The resource name of the parent resource in which the permission will be listed.
`role` role that will be granted by the permission.
`grantee_type` The type of the grantee for the permission.
`email_address` The email address of the grantee.
Returns
`Permission` object with specified parent, role, grantee type, and email address.
Raises
`ValueError` When email_address is specified and grantee_type is set to EVERYONE.
`ValueError` When email_address is not specified and grantee_type is not set to EVERYONE.

create_async

View source

This is the async version of PermissionAdapter.create_permission.

get

View source

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

View source

Get information about a specific permission.

Args
`name` The name of the permission to get.
Returns
Requested permission as an instance of `Permission`.

list

View source

List Permissions enforced on a resource (self).

Args
`parent` The resource name of the parent resource in which the permission will be listed.
`page_size` The maximum number of permissions to return (per page). The service may return fewer permissions.
Returns
Paginated list of `Permission` objects.

list_async

View source

This is the async version of PermissionAdapter.list_permissions.

transfer_ownership

View source

Transfer ownership of a resource (self) to a new owner.

Args
`name` Name of the resource to transfer ownership.
`email_address` Email address of the new owner.

transfer_ownership_async

View source

This is the async version of PermissionAdapter.transfer_ownership.

__iter__

View source