Struct google_api_proto::google::ai::generativelanguage::v1beta3::Permission
source · pub struct Permission {
pub name: String,
pub grantee_type: Option<i32>,
pub email_address: Option<String>,
pub role: Option<i32>,
}
Expand description
Permission resource grants user, group or the rest of the world access to the PaLM API resource (e.g. a tuned model, file).
A role is a collection of permitted operations that allows users to perform specific actions on PaLM API resources. To make them available to users, groups, or service accounts, you assign roles. When you assign a role, you grant permissions that the role contains.
There are three concentric roles. Each role is a superset of the previous role’s permitted operations:
- reader can use the resource (e.g. tuned model) for inference
- writer has reader’s permissions and additionally can edit and share
- owner has writer’s permissions and additionally can delete
Fields§
§name: String
Output only. The permission name. A unique name will be generated on create. Example: tunedModels/{tuned_model}permssions/{permission} Output only.
grantee_type: Option<i32>
Required. Immutable. The type of the grantee.
email_address: Option<String>
Optional. Immutable. The email address of the user of group which this permission refers. Field is not set when permission’s grantee type is EVERYONE.
role: Option<i32>
Required. The role granted by this permission.
Implementations§
source§impl Permission
impl Permission
sourcepub fn grantee_type(&self) -> GranteeType
pub fn grantee_type(&self) -> GranteeType
Returns the enum value of grantee_type
, or the default if the field is unset or set to an invalid enum value.
sourcepub fn set_grantee_type(&mut self, value: GranteeType)
pub fn set_grantee_type(&mut self, value: GranteeType)
Sets grantee_type
to the provided enum value.
sourcepub fn email_address(&self) -> &str
pub fn email_address(&self) -> &str
Returns the value of email_address
, or the default value if email_address
is unset.
Trait Implementations§
source§impl Clone for Permission
impl Clone for Permission
source§fn clone(&self) -> Permission
fn clone(&self) -> Permission
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for Permission
impl Debug for Permission
source§impl Default for Permission
impl Default for Permission
source§impl Message for Permission
impl Message for Permission
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for Permission
impl PartialEq for Permission
source§fn eq(&self, other: &Permission) -> bool
fn eq(&self, other: &Permission) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for Permission
Auto Trait Implementations§
impl Freeze for Permission
impl RefUnwindSafe for Permission
impl Send for Permission
impl Sync for Permission
impl Unpin for Permission
impl UnwindSafe for Permission
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request