#[non_exhaustive]pub struct PredictRequestResponseLoggingConfig {
pub enabled: bool,
pub sampling_rate: f64,
pub bigquery_destination: Option<BigQueryDestination>,
/* private fields */
}Available on crate feature
endpoint-service only.Expand description
Configuration for logging request-response to a BigQuery table.
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.enabled: boolIf logging is enabled or not.
sampling_rate: f64Percentage of requests to be logged, expressed as a fraction in range(0,1].
bigquery_destination: Option<BigQueryDestination>BigQuery table for logging.
If only given a project, a new dataset will be created with name
logging_<endpoint-display-name>_<endpoint-id> where
<endpoint-display-name> will be made BigQuery-dataset-name compatible (e.g.
most special characters will become underscores). If no table name is
given, a new table will be created with name request_response_logging
Implementations§
Source§impl PredictRequestResponseLoggingConfig
impl PredictRequestResponseLoggingConfig
pub fn new() -> Self
Sourcepub fn set_enabled<T: Into<bool>>(self, v: T) -> Self
pub fn set_enabled<T: Into<bool>>(self, v: T) -> Self
Sets the value of enabled.
Sourcepub fn set_sampling_rate<T: Into<f64>>(self, v: T) -> Self
pub fn set_sampling_rate<T: Into<f64>>(self, v: T) -> Self
Sets the value of sampling_rate.
Sourcepub fn set_bigquery_destination<T>(self, v: T) -> Selfwhere
T: Into<BigQueryDestination>,
pub fn set_bigquery_destination<T>(self, v: T) -> Selfwhere
T: Into<BigQueryDestination>,
Sets the value of bigquery_destination.
Sourcepub fn set_or_clear_bigquery_destination<T>(self, v: Option<T>) -> Selfwhere
T: Into<BigQueryDestination>,
pub fn set_or_clear_bigquery_destination<T>(self, v: Option<T>) -> Selfwhere
T: Into<BigQueryDestination>,
Sets or clears the value of bigquery_destination.
Trait Implementations§
Source§impl Clone for PredictRequestResponseLoggingConfig
impl Clone for PredictRequestResponseLoggingConfig
Source§fn clone(&self) -> PredictRequestResponseLoggingConfig
fn clone(&self) -> PredictRequestResponseLoggingConfig
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 Default for PredictRequestResponseLoggingConfig
impl Default for PredictRequestResponseLoggingConfig
Source§fn default() -> PredictRequestResponseLoggingConfig
fn default() -> PredictRequestResponseLoggingConfig
Returns the “default value” for a type. Read more
Source§impl PartialEq for PredictRequestResponseLoggingConfig
impl PartialEq for PredictRequestResponseLoggingConfig
Source§fn eq(&self, other: &PredictRequestResponseLoggingConfig) -> bool
fn eq(&self, other: &PredictRequestResponseLoggingConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PredictRequestResponseLoggingConfig
Auto Trait Implementations§
impl Freeze for PredictRequestResponseLoggingConfig
impl RefUnwindSafe for PredictRequestResponseLoggingConfig
impl Send for PredictRequestResponseLoggingConfig
impl Sync for PredictRequestResponseLoggingConfig
impl Unpin for PredictRequestResponseLoggingConfig
impl UnwindSafe for PredictRequestResponseLoggingConfig
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