#[non_exhaustive]pub struct Grant {
pub name: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub requester: String,
pub requested_duration: Option<Duration>,
pub justification: Option<Justification>,
pub state: State,
pub timeline: Option<Timeline>,
pub privileged_access: Option<PrivilegedAccess>,
pub audit_trail: Option<AuditTrail>,
pub additional_email_recipients: Vec<String>,
pub externally_modified: bool,
/* private fields */
}Expand description
A grant represents a request from a user for obtaining the access specified in an entitlement they are eligible for.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringIdentifier. Name of this grant. Possible formats:
organizations/{organization-number}/locations/{region}/entitlements/{entitlement-id}/grants/{grant-id}folders/{folder-number}/locations/{region}/entitlements/{entitlement-id}/grants/{grant-id}projects/{project-id|project-number}/locations/{region}/entitlements/{entitlement-id}/grants/{grant-id}
The last segment of this name ({grant-id}) is autogenerated.
create_time: Option<Timestamp>Output only. Create time stamp.
update_time: Option<Timestamp>Output only. Update time stamp.
requester: StringOutput only. Username of the user who created this grant.
requested_duration: Option<Duration>Required. The amount of time access is needed for. This value should be
less than the max_request_duration value of the entitlement.
justification: Option<Justification>Optional. Justification of why this access is needed.
state: StateOutput only. Current state of this grant.
timeline: Option<Timeline>Output only. Timeline of this grant.
privileged_access: Option<PrivilegedAccess>Output only. The access that would be granted by this grant.
audit_trail: Option<AuditTrail>Output only. Audit trail of access provided by this grant. If unspecified then access was never granted.
additional_email_recipients: Vec<String>Optional. Additional email addresses to notify for all the actions performed on the grant.
externally_modified: boolOutput only. Flag set by the PAM system to indicate that policy bindings made by this grant have been modified from outside PAM.
After it is set, this flag remains set forever irrespective of the grant
state. A true value here indicates that PAM no longer has any certainty
on the access a user has because of this grant.
Implementations§
Source§impl Grant
impl Grant
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = Grant::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = Grant::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Grant::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = Grant::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = Grant::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Grant::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_requester<T: Into<String>>(self, v: T) -> Self
pub fn set_requester<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_requested_duration<T>(self, v: T) -> Self
pub fn set_requested_duration<T>(self, v: T) -> Self
Sets the value of requested_duration.
§Example
use wkt::Duration;
let x = Grant::new().set_requested_duration(Duration::default()/* use setters */);Sourcepub fn set_or_clear_requested_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_requested_duration<T>(self, v: Option<T>) -> Self
Sets or clears the value of requested_duration.
§Example
use wkt::Duration;
let x = Grant::new().set_or_clear_requested_duration(Some(Duration::default()/* use setters */));
let x = Grant::new().set_or_clear_requested_duration(None::<Duration>);Sourcepub fn set_justification<T>(self, v: T) -> Selfwhere
T: Into<Justification>,
pub fn set_justification<T>(self, v: T) -> Selfwhere
T: Into<Justification>,
Sets the value of justification.
§Example
use google_cloud_privilegedaccessmanager_v1::model::Justification;
let x = Grant::new().set_justification(Justification::default()/* use setters */);Sourcepub fn set_or_clear_justification<T>(self, v: Option<T>) -> Selfwhere
T: Into<Justification>,
pub fn set_or_clear_justification<T>(self, v: Option<T>) -> Selfwhere
T: Into<Justification>,
Sets or clears the value of justification.
§Example
use google_cloud_privilegedaccessmanager_v1::model::Justification;
let x = Grant::new().set_or_clear_justification(Some(Justification::default()/* use setters */));
let x = Grant::new().set_or_clear_justification(None::<Justification>);Sourcepub fn set_timeline<T>(self, v: T) -> Self
pub fn set_timeline<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_timeline<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_timeline<T>(self, v: Option<T>) -> Self
Sourcepub fn set_privileged_access<T>(self, v: T) -> Selfwhere
T: Into<PrivilegedAccess>,
pub fn set_privileged_access<T>(self, v: T) -> Selfwhere
T: Into<PrivilegedAccess>,
Sets the value of privileged_access.
§Example
use google_cloud_privilegedaccessmanager_v1::model::PrivilegedAccess;
let x = Grant::new().set_privileged_access(PrivilegedAccess::default()/* use setters */);Sourcepub fn set_or_clear_privileged_access<T>(self, v: Option<T>) -> Selfwhere
T: Into<PrivilegedAccess>,
pub fn set_or_clear_privileged_access<T>(self, v: Option<T>) -> Selfwhere
T: Into<PrivilegedAccess>,
Sets or clears the value of privileged_access.
§Example
use google_cloud_privilegedaccessmanager_v1::model::PrivilegedAccess;
let x = Grant::new().set_or_clear_privileged_access(Some(PrivilegedAccess::default()/* use setters */));
let x = Grant::new().set_or_clear_privileged_access(None::<PrivilegedAccess>);Sourcepub fn set_audit_trail<T>(self, v: T) -> Selfwhere
T: Into<AuditTrail>,
pub fn set_audit_trail<T>(self, v: T) -> Selfwhere
T: Into<AuditTrail>,
Sets the value of audit_trail.
§Example
use google_cloud_privilegedaccessmanager_v1::model::grant::AuditTrail;
let x = Grant::new().set_audit_trail(AuditTrail::default()/* use setters */);Sourcepub fn set_or_clear_audit_trail<T>(self, v: Option<T>) -> Selfwhere
T: Into<AuditTrail>,
pub fn set_or_clear_audit_trail<T>(self, v: Option<T>) -> Selfwhere
T: Into<AuditTrail>,
Sets or clears the value of audit_trail.
§Example
use google_cloud_privilegedaccessmanager_v1::model::grant::AuditTrail;
let x = Grant::new().set_or_clear_audit_trail(Some(AuditTrail::default()/* use setters */));
let x = Grant::new().set_or_clear_audit_trail(None::<AuditTrail>);Sourcepub fn set_additional_email_recipients<T, V>(self, v: T) -> Self
pub fn set_additional_email_recipients<T, V>(self, v: T) -> Self
Sets the value of additional_email_recipients.
§Example
let x = Grant::new().set_additional_email_recipients(["a", "b", "c"]);Sourcepub fn set_externally_modified<T: Into<bool>>(self, v: T) -> Self
pub fn set_externally_modified<T: Into<bool>>(self, v: T) -> Self
Sets the value of externally_modified.
§Example
let x = Grant::new().set_externally_modified(true);