#[non_exhaustive]pub struct GenAiFunctionStats {
pub function_name: Option<String>,
pub prompt: Option<String>,
pub num_processed_rows: Option<i64>,
pub error_stats: Option<GenAiFunctionErrorStats>,
pub cost_optimization_stats: Option<GenAiFunctionCostOptimizationStats>,
pub cache_stats: Option<GenAiFunctionCacheStats>,
/* private fields */
}Expand description
Provides statistics for each Ai function call within a query.
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.function_name: Option<String>Name of the function.
prompt: Option<String>User input prompt of the function (truncated to 20 chars).
num_processed_rows: Option<i64>Number of rows processed by this GenAi function. This includes all cost_optimized, llm_inferred and failed_rows.
error_stats: Option<GenAiFunctionErrorStats>Error stats for the function.
cost_optimization_stats: Option<GenAiFunctionCostOptimizationStats>Cost optimization stats if applied on the rows processed by the function.
cache_stats: Option<GenAiFunctionCacheStats>Cache stats for the function.
Implementations§
Source§impl GenAiFunctionStats
impl GenAiFunctionStats
Sourcepub fn set_function_name<T>(self, v: T) -> Self
pub fn set_function_name<T>(self, v: T) -> Self
Sets the value of function_name.
§Example
let x = GenAiFunctionStats::new().set_function_name("example");Sourcepub fn set_or_clear_function_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_function_name<T>(self, v: Option<T>) -> Self
Sets or clears the value of function_name.
§Example
let x = GenAiFunctionStats::new().set_or_clear_function_name(Some("example"));
let x = GenAiFunctionStats::new().set_or_clear_function_name(None::<String>);Sourcepub fn set_prompt<T>(self, v: T) -> Self
pub fn set_prompt<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_prompt<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_prompt<T>(self, v: Option<T>) -> Self
Sourcepub fn set_num_processed_rows<T>(self, v: T) -> Self
pub fn set_num_processed_rows<T>(self, v: T) -> Self
Sets the value of num_processed_rows.
§Example
let x = GenAiFunctionStats::new().set_num_processed_rows(42);Sourcepub fn set_or_clear_num_processed_rows<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_num_processed_rows<T>(self, v: Option<T>) -> Self
Sets or clears the value of num_processed_rows.
§Example
let x = GenAiFunctionStats::new().set_or_clear_num_processed_rows(Some(42));
let x = GenAiFunctionStats::new().set_or_clear_num_processed_rows(None::<i32>);Sourcepub fn set_error_stats<T>(self, v: T) -> Selfwhere
T: Into<GenAiFunctionErrorStats>,
pub fn set_error_stats<T>(self, v: T) -> Selfwhere
T: Into<GenAiFunctionErrorStats>,
Sets the value of error_stats.
§Example
use google_cloud_bigquery_v2::model::GenAiFunctionErrorStats;
let x = GenAiFunctionStats::new().set_error_stats(GenAiFunctionErrorStats::default()/* use setters */);Sourcepub fn set_or_clear_error_stats<T>(self, v: Option<T>) -> Selfwhere
T: Into<GenAiFunctionErrorStats>,
pub fn set_or_clear_error_stats<T>(self, v: Option<T>) -> Selfwhere
T: Into<GenAiFunctionErrorStats>,
Sets or clears the value of error_stats.
§Example
use google_cloud_bigquery_v2::model::GenAiFunctionErrorStats;
let x = GenAiFunctionStats::new().set_or_clear_error_stats(Some(GenAiFunctionErrorStats::default()/* use setters */));
let x = GenAiFunctionStats::new().set_or_clear_error_stats(None::<GenAiFunctionErrorStats>);Sourcepub fn set_cost_optimization_stats<T>(self, v: T) -> Selfwhere
T: Into<GenAiFunctionCostOptimizationStats>,
pub fn set_cost_optimization_stats<T>(self, v: T) -> Selfwhere
T: Into<GenAiFunctionCostOptimizationStats>,
Sets the value of cost_optimization_stats.
§Example
use google_cloud_bigquery_v2::model::GenAiFunctionCostOptimizationStats;
let x = GenAiFunctionStats::new().set_cost_optimization_stats(GenAiFunctionCostOptimizationStats::default()/* use setters */);Sourcepub fn set_or_clear_cost_optimization_stats<T>(self, v: Option<T>) -> Selfwhere
T: Into<GenAiFunctionCostOptimizationStats>,
pub fn set_or_clear_cost_optimization_stats<T>(self, v: Option<T>) -> Selfwhere
T: Into<GenAiFunctionCostOptimizationStats>,
Sets or clears the value of cost_optimization_stats.
§Example
use google_cloud_bigquery_v2::model::GenAiFunctionCostOptimizationStats;
let x = GenAiFunctionStats::new().set_or_clear_cost_optimization_stats(Some(GenAiFunctionCostOptimizationStats::default()/* use setters */));
let x = GenAiFunctionStats::new().set_or_clear_cost_optimization_stats(None::<GenAiFunctionCostOptimizationStats>);Sourcepub fn set_cache_stats<T>(self, v: T) -> Selfwhere
T: Into<GenAiFunctionCacheStats>,
pub fn set_cache_stats<T>(self, v: T) -> Selfwhere
T: Into<GenAiFunctionCacheStats>,
Sets the value of cache_stats.
§Example
use google_cloud_bigquery_v2::model::GenAiFunctionCacheStats;
let x = GenAiFunctionStats::new().set_cache_stats(GenAiFunctionCacheStats::default()/* use setters */);Sourcepub fn set_or_clear_cache_stats<T>(self, v: Option<T>) -> Selfwhere
T: Into<GenAiFunctionCacheStats>,
pub fn set_or_clear_cache_stats<T>(self, v: Option<T>) -> Selfwhere
T: Into<GenAiFunctionCacheStats>,
Sets or clears the value of cache_stats.
§Example
use google_cloud_bigquery_v2::model::GenAiFunctionCacheStats;
let x = GenAiFunctionStats::new().set_or_clear_cache_stats(Some(GenAiFunctionCacheStats::default()/* use setters */));
let x = GenAiFunctionStats::new().set_or_clear_cache_stats(None::<GenAiFunctionCacheStats>);Trait Implementations§
Source§impl Clone for GenAiFunctionStats
impl Clone for GenAiFunctionStats
Source§fn clone(&self) -> GenAiFunctionStats
fn clone(&self) -> GenAiFunctionStats
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GenAiFunctionStats
impl Debug for GenAiFunctionStats
Source§impl Default for GenAiFunctionStats
impl Default for GenAiFunctionStats
Source§fn default() -> GenAiFunctionStats
fn default() -> GenAiFunctionStats
Source§impl Message for GenAiFunctionStats
impl Message for GenAiFunctionStats
Source§impl PartialEq for GenAiFunctionStats
impl PartialEq for GenAiFunctionStats
impl StructuralPartialEq for GenAiFunctionStats
Auto Trait Implementations§
impl Freeze for GenAiFunctionStats
impl RefUnwindSafe for GenAiFunctionStats
impl Send for GenAiFunctionStats
impl Sync for GenAiFunctionStats
impl Unpin for GenAiFunctionStats
impl UnsafeUnpin for GenAiFunctionStats
impl UnwindSafe for GenAiFunctionStats
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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