pub struct MediaFile {
pub resource_name: String,
pub id: i64,
pub type: i32,
pub mime_type: i32,
pub source_url: String,
pub name: String,
pub file_size: i64,
pub mediatype: Option<Mediatype>,
}
Expand description
A media file.
Fields§
§resource_name: String
Immutable. The resource name of the media file. Media file resource names have the form:
customers/{customer_id}/mediaFiles/{media_file_id}
id: i64
Output only. The ID of the media file.
type: i32
Immutable. Type of the media file.
mime_type: i32
Output only. The mime type of the media file.
source_url: String
Immutable. The URL of where the original media file was downloaded from (or a file name). Only used for media of type AUDIO and IMAGE.
name: String
Immutable. The name of the media file. The name can be used by clients to help identify previously uploaded media.
file_size: i64
Output only. The size of the media file in bytes.
mediatype: Option<Mediatype>
The specific type of the media file.
Implementations§
Source§impl MediaFile
impl MediaFile
Sourcepub fn type(&self) -> MediaType
pub fn type(&self) -> MediaType
Returns the enum value of type
, or the default if the field is set to an invalid enum value.
Sourcepub fn mime_type(&self) -> MimeType
pub fn mime_type(&self) -> MimeType
Returns the enum value of mime_type
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_mime_type(&mut self, value: MimeType)
pub fn set_mime_type(&mut self, value: MimeType)
Sets mime_type
to the provided enum value.
Trait Implementations§
Source§impl Message for MediaFile
impl Message for MediaFile
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.impl StructuralPartialEq for MediaFile
Auto Trait Implementations§
impl Freeze for MediaFile
impl RefUnwindSafe for MediaFile
impl Send for MediaFile
impl Sync for MediaFile
impl Unpin for MediaFile
impl UnwindSafe for MediaFile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request