#[non_exhaustive]pub struct FunctionResponsePart {
pub data: Option<Data>,
/* private fields */
}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
A datatype containing media that is part of a FunctionResponse message.
A FunctionResponsePart consists of data which has an associated datatype. A
FunctionResponsePart can only contain one of the accepted types in
FunctionResponsePart.data.
A FunctionResponsePart must have a fixed IANA MIME type identifying the
type and subtype of the media if the inline_data field is filled with raw
bytes.
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.data: Option<Data>The data of the function response part.
Implementations§
Source§impl FunctionResponsePart
impl FunctionResponsePart
pub fn new() -> Self
Sourcepub fn set_data<T: Into<Option<Data>>>(self, v: T) -> Self
pub fn set_data<T: Into<Option<Data>>>(self, v: T) -> Self
Sets the value of data.
Note that all the setters affecting data are mutually
exclusive.
§Example
use google_cloud_aiplatform_v1::model::FunctionResponseBlob;
let x = FunctionResponsePart::new().set_data(Some(
google_cloud_aiplatform_v1::model::function_response_part::Data::InlineData(FunctionResponseBlob::default().into())));Sourcepub fn inline_data(&self) -> Option<&Box<FunctionResponseBlob>>
pub fn inline_data(&self) -> Option<&Box<FunctionResponseBlob>>
The value of data
if it holds a InlineData, None if the field is not set or
holds a different branch.
Sourcepub fn set_inline_data<T: Into<Box<FunctionResponseBlob>>>(self, v: T) -> Self
pub fn set_inline_data<T: Into<Box<FunctionResponseBlob>>>(self, v: T) -> Self
Sets the value of data
to hold a InlineData.
Note that all the setters affecting data are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::FunctionResponseBlob;
let x = FunctionResponsePart::new().set_inline_data(FunctionResponseBlob::default()/* use setters */);
assert!(x.inline_data().is_some());
assert!(x.file_data().is_none());Sourcepub fn file_data(&self) -> Option<&Box<FunctionResponseFileData>>
pub fn file_data(&self) -> Option<&Box<FunctionResponseFileData>>
The value of data
if it holds a FileData, None if the field is not set or
holds a different branch.
Sourcepub fn set_file_data<T: Into<Box<FunctionResponseFileData>>>(self, v: T) -> Self
pub fn set_file_data<T: Into<Box<FunctionResponseFileData>>>(self, v: T) -> Self
Sets the value of data
to hold a FileData.
Note that all the setters affecting data are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::FunctionResponseFileData;
let x = FunctionResponsePart::new().set_file_data(FunctionResponseFileData::default()/* use setters */);
assert!(x.file_data().is_some());
assert!(x.inline_data().is_none());Trait Implementations§
Source§impl Clone for FunctionResponsePart
impl Clone for FunctionResponsePart
Source§fn clone(&self) -> FunctionResponsePart
fn clone(&self) -> FunctionResponsePart
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more