pub struct Role {
pub name: String,
pub title: String,
pub description: String,
pub included_permissions: Vec<String>,
pub stage: i32,
pub etag: Bytes,
pub deleted: bool,
}
Expand description
A role in the Identity and Access Management API.
Fields§
§name: String
The name of the role.
When Role is used in CreateRole, the role name must not be set.
When Role is used in output and other input such as UpdateRole, the role name is the complete path, e.g., roles/logging.viewer for predefined roles and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
title: String
Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes.
description: String
Optional. A human-readable description for the role.
included_permissions: Vec<String>
The names of the permissions this role grants when bound in an IAM policy.
stage: i32
The current launch stage of the role. If the ALPHA
launch stage has been
selected for a role, the stage
field will not be included in the
returned definition for the role.
etag: Bytes
Used to perform a consistent read-modify-write.
deleted: bool
The current deleted state of the role. This field is read only. It will be ignored in calls to CreateRole and UpdateRole.
Implementations§
source§impl Role
impl Role
sourcepub fn stage(&self) -> RoleLaunchStage
pub fn stage(&self) -> RoleLaunchStage
Returns the enum value of stage
, or the default if the field is set to an invalid enum value.
sourcepub fn set_stage(&mut self, value: RoleLaunchStage)
pub fn set_stage(&mut self, value: RoleLaunchStage)
Sets stage
to the provided enum value.
Trait Implementations§
source§impl Message for Role
impl Message for Role
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 Role
impl PartialEq for Role
impl StructuralPartialEq for Role
Auto Trait Implementations§
impl !Freeze for Role
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnwindSafe for Role
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