#[non_exhaustive]pub struct RichLinkMetadata {
pub uri: String,
pub rich_link_type: RichLinkType,
pub data: Option<Data>,
/* private fields */
}Expand description
A rich link to a resource. Rich links can be associated with the plain-text
body of the message or represent chips that link to Google Workspace
resources like Google Docs or Sheets with start_index and length
of 0.
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.uri: StringThe URI of this link.
rich_link_type: RichLinkTypeThe rich link type.
data: Option<Data>Data for the linked resource.
Implementations§
Source§impl RichLinkMetadata
impl RichLinkMetadata
Sourcepub fn set_rich_link_type<T: Into<RichLinkType>>(self, v: T) -> Self
pub fn set_rich_link_type<T: Into<RichLinkType>>(self, v: T) -> Self
Sets the value of rich_link_type.
§Example
use google_chat_v1::model::rich_link_metadata::RichLinkType;
let x0 = RichLinkMetadata::new().set_rich_link_type(RichLinkType::DriveFile);
let x1 = RichLinkMetadata::new().set_rich_link_type(RichLinkType::ChatSpace);
let x2 = RichLinkMetadata::new().set_rich_link_type(RichLinkType::GmailMessage);Sourcepub fn drive_link_data(&self) -> Option<&Box<DriveLinkData>>
pub fn drive_link_data(&self) -> Option<&Box<DriveLinkData>>
The value of data
if it holds a DriveLinkData, None if the field is not set or
holds a different branch.
Sourcepub fn set_drive_link_data<T: Into<Box<DriveLinkData>>>(self, v: T) -> Self
pub fn set_drive_link_data<T: Into<Box<DriveLinkData>>>(self, v: T) -> Self
Sets the value of data
to hold a DriveLinkData.
Note that all the setters affecting data are
mutually exclusive.
§Example
use google_chat_v1::model::DriveLinkData;
let x = RichLinkMetadata::new().set_drive_link_data(DriveLinkData::default()/* use setters */);
assert!(x.drive_link_data().is_some());
assert!(x.chat_space_link_data().is_none());
assert!(x.meet_space_link_data().is_none());
assert!(x.calendar_event_link_data().is_none());Sourcepub fn chat_space_link_data(&self) -> Option<&Box<ChatSpaceLinkData>>
pub fn chat_space_link_data(&self) -> Option<&Box<ChatSpaceLinkData>>
The value of data
if it holds a ChatSpaceLinkData, None if the field is not set or
holds a different branch.
Sourcepub fn set_chat_space_link_data<T: Into<Box<ChatSpaceLinkData>>>(
self,
v: T,
) -> Self
pub fn set_chat_space_link_data<T: Into<Box<ChatSpaceLinkData>>>( self, v: T, ) -> Self
Sets the value of data
to hold a ChatSpaceLinkData.
Note that all the setters affecting data are
mutually exclusive.
§Example
use google_chat_v1::model::ChatSpaceLinkData;
let x = RichLinkMetadata::new().set_chat_space_link_data(ChatSpaceLinkData::default()/* use setters */);
assert!(x.chat_space_link_data().is_some());
assert!(x.drive_link_data().is_none());
assert!(x.meet_space_link_data().is_none());
assert!(x.calendar_event_link_data().is_none());Sourcepub fn meet_space_link_data(&self) -> Option<&Box<MeetSpaceLinkData>>
pub fn meet_space_link_data(&self) -> Option<&Box<MeetSpaceLinkData>>
The value of data
if it holds a MeetSpaceLinkData, None if the field is not set or
holds a different branch.
Sourcepub fn set_meet_space_link_data<T: Into<Box<MeetSpaceLinkData>>>(
self,
v: T,
) -> Self
pub fn set_meet_space_link_data<T: Into<Box<MeetSpaceLinkData>>>( self, v: T, ) -> Self
Sets the value of data
to hold a MeetSpaceLinkData.
Note that all the setters affecting data are
mutually exclusive.
§Example
use google_chat_v1::model::MeetSpaceLinkData;
let x = RichLinkMetadata::new().set_meet_space_link_data(MeetSpaceLinkData::default()/* use setters */);
assert!(x.meet_space_link_data().is_some());
assert!(x.drive_link_data().is_none());
assert!(x.chat_space_link_data().is_none());
assert!(x.calendar_event_link_data().is_none());Sourcepub fn calendar_event_link_data(&self) -> Option<&Box<CalendarEventLinkData>>
pub fn calendar_event_link_data(&self) -> Option<&Box<CalendarEventLinkData>>
The value of data
if it holds a CalendarEventLinkData, None if the field is not set or
holds a different branch.
Sourcepub fn set_calendar_event_link_data<T: Into<Box<CalendarEventLinkData>>>(
self,
v: T,
) -> Self
pub fn set_calendar_event_link_data<T: Into<Box<CalendarEventLinkData>>>( self, v: T, ) -> Self
Sets the value of data
to hold a CalendarEventLinkData.
Note that all the setters affecting data are
mutually exclusive.
§Example
use google_chat_v1::model::CalendarEventLinkData;
let x = RichLinkMetadata::new().set_calendar_event_link_data(CalendarEventLinkData::default()/* use setters */);
assert!(x.calendar_event_link_data().is_some());
assert!(x.drive_link_data().is_none());
assert!(x.chat_space_link_data().is_none());
assert!(x.meet_space_link_data().is_none());Trait Implementations§
Source§impl Clone for RichLinkMetadata
impl Clone for RichLinkMetadata
Source§fn clone(&self) -> RichLinkMetadata
fn clone(&self) -> RichLinkMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more