#[non_exhaustive]pub struct Attachment {
pub name: String,
pub create_time: Option<Timestamp>,
pub creator: Option<Actor>,
pub filename: String,
pub mime_type: String,
pub size_bytes: i64,
/* private fields */
}Expand description
An Attachment contains metadata about a file that was uploaded to a
case - it is NOT a file itself. That being said, the name of an Attachment
object can be used to download its accompanying file through the
media.download endpoint.
While attachments can be uploaded in the console at the same time as a comment, they’re associated on a “case” level, not a “comment” level.
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: StringOutput only. Identifier. The resource name of the attachment.
create_time: Option<Timestamp>Output only. The time at which the attachment was created.
creator: Option<Actor>Output only. The user who uploaded the attachment. Note, the name and email will be obfuscated if the attachment was uploaded by Google support.
filename: StringThe filename of the attachment (e.g. "graph.jpg").
mime_type: StringOutput only. The MIME type of the attachment (e.g. text/plain).
size_bytes: i64Output only. The size of the attachment in bytes.
Implementations§
Source§impl Attachment
impl Attachment
pub fn new() -> Self
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 = Attachment::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 = Attachment::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Attachment::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_creator<T>(self, v: T) -> Self
pub fn set_creator<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_creator<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_creator<T>(self, v: Option<T>) -> Self
Sourcepub fn set_filename<T: Into<String>>(self, v: T) -> Self
pub fn set_filename<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_mime_type<T: Into<String>>(self, v: T) -> Self
pub fn set_mime_type<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_size_bytes<T: Into<i64>>(self, v: T) -> Self
pub fn set_size_bytes<T: Into<i64>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for Attachment
impl Clone for Attachment
Source§fn clone(&self) -> Attachment
fn clone(&self) -> Attachment
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more