#[non_exhaustive]pub struct FunctionResponseFileData {
pub mime_type: String,
pub file_uri: String,
pub display_name: String,
/* private fields */
}Available on crate features
data-foundry-service or gen-ai-cache-service or gen-ai-tuning-service or llm-utility-service or prediction-service or vertex-rag-service only.Expand description
URI based data for function response.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.mime_type: StringRequired. The IANA standard MIME type of the source data.
file_uri: StringRequired. URI.
display_name: StringOptional. Display name of the file data.
Used to provide a label or filename to distinguish file datas.
This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled.
Implementations§
Source§impl FunctionResponseFileData
impl FunctionResponseFileData
pub fn new() -> 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_file_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_file_uri<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sets the value of display_name.
§Example
ⓘ
let x = FunctionResponseFileData::new().set_display_name("example");Trait Implementations§
Source§impl Clone for FunctionResponseFileData
impl Clone for FunctionResponseFileData
Source§fn clone(&self) -> FunctionResponseFileData
fn clone(&self) -> FunctionResponseFileData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FunctionResponseFileData
impl Debug for FunctionResponseFileData
Source§impl Default for FunctionResponseFileData
impl Default for FunctionResponseFileData
Source§fn default() -> FunctionResponseFileData
fn default() -> FunctionResponseFileData
Returns the “default value” for a type. Read more
Source§impl Message for FunctionResponseFileData
impl Message for FunctionResponseFileData
Source§impl PartialEq for FunctionResponseFileData
impl PartialEq for FunctionResponseFileData
impl StructuralPartialEq for FunctionResponseFileData
Auto Trait Implementations§
impl Freeze for FunctionResponseFileData
impl RefUnwindSafe for FunctionResponseFileData
impl Send for FunctionResponseFileData
impl Sync for FunctionResponseFileData
impl Unpin for FunctionResponseFileData
impl UnwindSafe for FunctionResponseFileData
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
Mutably borrows from an owned value. Read more