pub struct MediaFile {
pub resource_name: String,
pub id: Option<i64>,
pub type: i32,
pub mime_type: i32,
pub source_url: Option<String>,
pub name: Option<String>,
pub file_size: Option<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: Option<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: Option<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: Option<String>
Immutable. The name of the media file. The name can be used by clients to help identify previously uploaded media.
file_size: Option<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.
sourcepub fn source_url(&self) -> &str
pub fn source_url(&self) -> &str
Returns the value of source_url
, or the default value if source_url
is unset.
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(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
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(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
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(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for MediaFile
impl PartialEq for MediaFile
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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