Struct google_api_proto::google::ai::generativelanguage::v1beta::File
source · pub struct File {
pub name: String,
pub display_name: String,
pub mime_type: String,
pub size_bytes: i64,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub expiration_time: Option<Timestamp>,
pub sha256_hash: Bytes,
pub uri: String,
pub state: i32,
pub error: Option<Status>,
pub metadata: Option<Metadata>,
}
Expand description
A file uploaded to the API.
Fields§
§name: String
Immutable. Identifier. The File
resource name. The ID (name excluding the
“files/” prefix) can contain up to 40 characters that are lowercase
alphanumeric or dashes (-). The ID cannot start or end with a dash. If the
name is empty on create, a unique name will be generated. Example:
files/123-456
display_name: String
Optional. The human-readable display name for the File
. The display name
must be no more than 512 characters in length, including spaces. Example:
“Welcome Image”
mime_type: String
Output only. MIME type of the file.
size_bytes: i64
Output only. Size of the file in bytes.
create_time: Option<Timestamp>
Output only. The timestamp of when the File
was created.
update_time: Option<Timestamp>
Output only. The timestamp of when the File
was last updated.
expiration_time: Option<Timestamp>
Output only. The timestamp of when the File
will be deleted. Only set if
the File
is scheduled to expire.
sha256_hash: Bytes
Output only. SHA-256 hash of the uploaded bytes.
uri: String
Output only. The uri of the File
.
state: i32
Output only. Processing state of the File.
error: Option<Status>
Output only. Error status if File processing failed.
metadata: Option<Metadata>
Metadata for the File.
Implementations§
Trait Implementations§
source§impl Message for File
impl Message for File
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 File
impl PartialEq for File
impl StructuralPartialEq for File
Auto Trait Implementations§
impl !Freeze for File
impl RefUnwindSafe for File
impl Send for File
impl Sync for File
impl Unpin for File
impl UnwindSafe for File
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