#[non_exhaustive]pub struct Attachment {
pub name: String,
pub content_name: String,
pub content_type: String,
pub thumbnail_uri: String,
pub download_uri: String,
pub source: Source,
pub data_ref: Option<DataRef>,
/* private fields */
}Expand description
An attachment in Google Chat.
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. Resource name of the attachment.
Format: spaces/{space}/messages/{message}/attachments/{attachment}.
content_name: StringOutput only. The original file name for the content, not the full path.
content_type: StringOutput only. The content type (MIME type) of the file.
thumbnail_uri: StringOutput only. The thumbnail URL which should be used to preview the attachment to a human user. Chat apps shouldn’t use this URL to download attachment content.
download_uri: StringOutput only. The download URL which should be used to allow a human user to download the attachment. Chat apps shouldn’t use this URL to download attachment content.
source: SourceOutput only. The source of the attachment.
data_ref: Option<DataRef>The data reference to the attachment.
Implementations§
Source§impl Attachment
impl Attachment
Sourcepub fn set_content_name<T: Into<String>>(self, v: T) -> Self
pub fn set_content_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_content_type<T: Into<String>>(self, v: T) -> Self
pub fn set_content_type<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_thumbnail_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_thumbnail_uri<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_download_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_download_uri<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_source<T: Into<Source>>(self, v: T) -> Self
pub fn set_source<T: Into<Source>>(self, v: T) -> Self
Sourcepub fn set_data_ref<T: Into<Option<DataRef>>>(self, v: T) -> Self
pub fn set_data_ref<T: Into<Option<DataRef>>>(self, v: T) -> Self
Sourcepub fn attachment_data_ref(&self) -> Option<&Box<AttachmentDataRef>>
pub fn attachment_data_ref(&self) -> Option<&Box<AttachmentDataRef>>
The value of data_ref
if it holds a AttachmentDataRef, None if the field is not set or
holds a different branch.
Sourcepub fn set_attachment_data_ref<T: Into<Box<AttachmentDataRef>>>(
self,
v: T,
) -> Self
pub fn set_attachment_data_ref<T: Into<Box<AttachmentDataRef>>>( self, v: T, ) -> Self
Sets the value of data_ref
to hold a AttachmentDataRef.
Note that all the setters affecting data_ref are
mutually exclusive.
§Example
use google_chat_v1::model::AttachmentDataRef;
let x = Attachment::new().set_attachment_data_ref(AttachmentDataRef::default()/* use setters */);
assert!(x.attachment_data_ref().is_some());
assert!(x.drive_data_ref().is_none());Sourcepub fn drive_data_ref(&self) -> Option<&Box<DriveDataRef>>
pub fn drive_data_ref(&self) -> Option<&Box<DriveDataRef>>
The value of data_ref
if it holds a DriveDataRef, None if the field is not set or
holds a different branch.
Sourcepub fn set_drive_data_ref<T: Into<Box<DriveDataRef>>>(self, v: T) -> Self
pub fn set_drive_data_ref<T: Into<Box<DriveDataRef>>>(self, v: T) -> Self
Sets the value of data_ref
to hold a DriveDataRef.
Note that all the setters affecting data_ref are
mutually exclusive.
§Example
use google_chat_v1::model::DriveDataRef;
let x = Attachment::new().set_drive_data_ref(DriveDataRef::default()/* use setters */);
assert!(x.drive_data_ref().is_some());
assert!(x.attachment_data_ref().is_none());Trait Implementations§
Source§impl Clone for Attachment
impl Clone for Attachment
Source§fn clone(&self) -> Attachment
fn clone(&self) -> Attachment
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more