#[non_exhaustive]pub struct GenerateContentResponseBody {Show 38 fields
pub access_programs: Option<Option<ResponseAccessPrograms>>,
pub prompt_cache_diagnostics: Option<PromptCacheDiagnostics>,
pub id: String,
pub created_at: i64,
pub error: Option<ResponseError>,
pub incomplete_details: Option<ResponseIncompleteDetails>,
pub instructions: Option<ResponseInstructions>,
pub metadata: Option<BTreeMap<String, String>>,
pub model: String,
pub object: ResponseObject,
pub output: Vec<ResponseOutputItem>,
pub parallel_tool_calls: bool,
pub temperature: Option<Number>,
pub tool_choice: ToolChoice,
pub tools: Vec<Tool>,
pub top_p: Option<Number>,
pub background: Option<Option<bool>>,
pub completed_at: Option<Option<i64>>,
pub conversation: Option<Option<ResponseConversationParam>>,
pub max_output_tokens: Option<Option<i64>>,
pub max_tool_calls: Option<Option<i64>>,
pub moderation: Option<Option<ResponseModerationReport>>,
pub output_text: Option<Option<String>>,
pub previous_response_id: Option<Option<String>>,
pub prompt: Option<Option<ResponsePrompt>>,
pub prompt_cache_key: Option<Option<String>>,
pub prompt_cache_options: Option<ResponsePromptCacheOptions>,
pub prompt_cache_retention: Option<Option<PromptCacheRetention>>,
pub reasoning: Option<Option<ReasoningConfig>>,
pub safety_identifier: Option<Option<String>>,
pub service_tier: Option<Option<ServiceTier>>,
pub status: Option<ResponseStatus>,
pub text: Option<TextConfig>,
pub top_logprobs: Option<Option<i64>>,
pub truncation: Option<Option<GenerateTruncation>>,
pub usage: Option<Option<ResponseUsage>>,
pub user: Option<Option<String>>,
pub rest: Rest,
}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.access_programs: Option<Option<ResponseAccessPrograms>>Newer API responses report this even when null; older responses omit it.
prompt_cache_diagnostics: Option<PromptCacheDiagnostics>§id: String§created_at: i64§error: Option<ResponseError>§incomplete_details: Option<ResponseIncompleteDetails>§instructions: Option<ResponseInstructions>§metadata: Option<BTreeMap<String, String>>§model: String§object: ResponseObject§output: Vec<ResponseOutputItem>§parallel_tool_calls: bool§temperature: Option<Number>§tool_choice: ToolChoice§tools: Vec<Tool>§top_p: Option<Number>§background: Option<Option<bool>>§completed_at: Option<Option<i64>>§conversation: Option<Option<ResponseConversationParam>>§max_output_tokens: Option<Option<i64>>§max_tool_calls: Option<Option<i64>>§moderation: Option<Option<ResponseModerationReport>>§output_text: Option<Option<String>>§previous_response_id: Option<Option<String>>§prompt: Option<Option<ResponsePrompt>>§prompt_cache_key: Option<Option<String>>§prompt_cache_options: Option<ResponsePromptCacheOptions>§prompt_cache_retention: Option<Option<PromptCacheRetention>>§reasoning: Option<Option<ReasoningConfig>>§safety_identifier: Option<Option<String>>§service_tier: Option<Option<ServiceTier>>§status: Option<ResponseStatus>§text: Option<TextConfig>§top_logprobs: Option<Option<i64>>§truncation: Option<Option<GenerateTruncation>>§usage: Option<Option<ResponseUsage>>§user: Option<Option<String>>§rest: RestImplementations§
Source§impl GenerateContentResponseBody
impl GenerateContentResponseBody
Sourcepub fn builder(
id: String,
created_at: i64,
error: Option<ResponseError>,
incomplete_details: Option<ResponseIncompleteDetails>,
instructions: Option<ResponseInstructions>,
metadata: Option<BTreeMap<String, String>>,
model: String,
object: ResponseObject,
output: Vec<ResponseOutputItem>,
parallel_tool_calls: bool,
temperature: Option<Number>,
tool_choice: ToolChoice,
tools: Vec<Tool>,
top_p: Option<Number>,
) -> GenerateContentResponseBodyBuilder
pub fn builder( id: String, created_at: i64, error: Option<ResponseError>, incomplete_details: Option<ResponseIncompleteDetails>, instructions: Option<ResponseInstructions>, metadata: Option<BTreeMap<String, String>>, model: String, object: ResponseObject, output: Vec<ResponseOutputItem>, parallel_tool_calls: bool, temperature: Option<Number>, tool_choice: ToolChoice, tools: Vec<Tool>, top_p: Option<Number>, ) -> GenerateContentResponseBodyBuilder
Start a builder by supplying the required fields in declaration order.
Trait Implementations§
Source§impl Clone for GenerateContentResponseBody
impl Clone for GenerateContentResponseBody
Source§impl CompleteResponse for GenerateContentResponseBody
impl CompleteResponse for GenerateContentResponseBody
type Event = StreamEvent
fn events( self, namespace: IdNamespace, limits: EventLimits, ) -> Result<Converted<Vec<Self::Event>>, TransformError>
Source§impl Debug for GenerateContentResponseBody
impl Debug for GenerateContentResponseBody
Source§impl DeclaredFields for GenerateContentResponseBody
impl DeclaredFields for GenerateContentResponseBody
fn into_declared(self) -> Self
Source§impl<'de> Deserialize<'de> for GenerateContentResponseBody
impl<'de> Deserialize<'de> for GenerateContentResponseBody
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for GenerateContentResponseBody
impl StructuralPartialEq for GenerateContentResponseBody
Auto Trait Implementations§
impl Freeze for GenerateContentResponseBody
impl RefUnwindSafe for GenerateContentResponseBody
impl Send for GenerateContentResponseBody
impl Sync for GenerateContentResponseBody
impl Unpin for GenerateContentResponseBody
impl UnsafeUnpin for GenerateContentResponseBody
impl UnwindSafe for GenerateContentResponseBody
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