#[non_exhaustive]pub struct MarkAsDoNotDisturbRequest {
pub name: String,
pub expiration: Option<Expiration>,
/* private fields */
}Expand description
Request message for the MarkAsDoNotDisturb method.
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: StringRequired. The resource name of the availability to mark as Do Not Disturb. Format: users/{user}/availability
{user} is the id for the Person in the People API or Admin SDK directory
API. For example, users/123456789.
The user’s email address or me can also be used as an alias to refer to
the caller. For example, users/user@example.com or users/me.
expiration: Option<Expiration>Required. The expiration for the DND availability state. The user will be marked as Away after expiration. This can be at most 1 year from the current time.
Implementations§
Source§impl MarkAsDoNotDisturbRequest
impl MarkAsDoNotDisturbRequest
Sourcepub fn set_expiration<T: Into<Option<Expiration>>>(self, v: T) -> Self
pub fn set_expiration<T: Into<Option<Expiration>>>(self, v: T) -> Self
Sets the value of expiration.
Note that all the setters affecting expiration are mutually
exclusive.
§Example
use wkt::Timestamp;
let x = MarkAsDoNotDisturbRequest::new().set_expiration(Some(
google_chat_v1::model::mark_as_do_not_disturb_request::Expiration::ExpireTime(Timestamp::default().into())));Sourcepub fn expire_time(&self) -> Option<&Box<Timestamp>>
pub fn expire_time(&self) -> Option<&Box<Timestamp>>
The value of expiration
if it holds a ExpireTime, None if the field is not set or
holds a different branch.
Sourcepub fn set_expire_time<T: Into<Box<Timestamp>>>(self, v: T) -> Self
pub fn set_expire_time<T: Into<Box<Timestamp>>>(self, v: T) -> Self
Sets the value of expiration
to hold a ExpireTime.
Note that all the setters affecting expiration are
mutually exclusive.
§Example
use wkt::Timestamp;
let x = MarkAsDoNotDisturbRequest::new().set_expire_time(Timestamp::default()/* use setters */);
assert!(x.expire_time().is_some());
assert!(x.ttl().is_none());Sourcepub fn ttl(&self) -> Option<&Box<Duration>>
pub fn ttl(&self) -> Option<&Box<Duration>>
The value of expiration
if it holds a Ttl, None if the field is not set or
holds a different branch.
Sourcepub fn set_ttl<T: Into<Box<Duration>>>(self, v: T) -> Self
pub fn set_ttl<T: Into<Box<Duration>>>(self, v: T) -> Self
Sets the value of expiration
to hold a Ttl.
Note that all the setters affecting expiration are
mutually exclusive.
§Example
use wkt::Duration;
let x = MarkAsDoNotDisturbRequest::new().set_ttl(Duration::default()/* use setters */);
assert!(x.ttl().is_some());
assert!(x.expire_time().is_none());Trait Implementations§
Source§impl Clone for MarkAsDoNotDisturbRequest
impl Clone for MarkAsDoNotDisturbRequest
Source§fn clone(&self) -> MarkAsDoNotDisturbRequest
fn clone(&self) -> MarkAsDoNotDisturbRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more