#[allow(rustdoc::bare_urls)]
#[allow(rustdoc::broken_intra_doc_links)]
#[allow(rustdoc::invalid_html_tags)]
#[allow(rustdoc::redundant_explicit_links)]
impl Query {
pub fn set_allow_large_results<T>(mut self, v: T) -> Self
where T: std::convert::Into<wkt::BoolValue>
{
self.request.allow_large_results = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_allow_large_results<T>(mut self, v: std::option::Option<T>) -> Self
where T: std::convert::Into<wkt::BoolValue>
{
self.request.allow_large_results = v.map(|x| x.into());
self
}
pub fn set_clustering<T>(mut self, v: T) -> Self
where T: std::convert::Into<google_cloud_bigquery_v2::model::Clustering>
{
self.request.clustering = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_clustering<T>(mut self, v: std::option::Option<T>) -> Self
where T: std::convert::Into<google_cloud_bigquery_v2::model::Clustering>
{
self.request.clustering = v.map(|x| x.into());
self
}
pub fn set_connection_properties<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<google_cloud_bigquery_v2::model::ConnectionProperty>
{
use std::iter::Iterator;
self.request.connection_properties = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_create_disposition<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request.create_disposition = v.into();
self
}
pub fn set_create_session<T>(mut self, v: T) -> Self
where T: std::convert::Into<wkt::BoolValue>
{
self.request.create_session = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_create_session<T>(mut self, v: std::option::Option<T>) -> Self
where T: std::convert::Into<wkt::BoolValue>
{
self.request.create_session = v.map(|x| x.into());
self
}
pub fn set_default_dataset<T>(mut self, v: T) -> Self
where T: std::convert::Into<google_cloud_bigquery_v2::model::DatasetReference>
{
self.request.default_dataset = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_default_dataset<T>(mut self, v: std::option::Option<T>) -> Self
where T: std::convert::Into<google_cloud_bigquery_v2::model::DatasetReference>
{
self.request.default_dataset = v.map(|x| x.into());
self
}
pub fn set_destination_encryption_configuration<T>(mut self, v: T) -> Self
where T: std::convert::Into<google_cloud_bigquery_v2::model::EncryptionConfiguration>
{
self.request.destination_encryption_configuration = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_destination_encryption_configuration<T>(mut self, v: std::option::Option<T>) -> Self
where T: std::convert::Into<google_cloud_bigquery_v2::model::EncryptionConfiguration>
{
self.request.destination_encryption_configuration = v.map(|x| x.into());
self
}
pub fn set_destination_table<T>(mut self, v: T) -> Self
where T: std::convert::Into<google_cloud_bigquery_v2::model::TableReference>
{
self.request.destination_table = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_destination_table<T>(mut self, v: std::option::Option<T>) -> Self
where T: std::convert::Into<google_cloud_bigquery_v2::model::TableReference>
{
self.request.destination_table = v.map(|x| x.into());
self
}
pub fn set_dry_run<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.request.dry_run = v.into();
self
}
pub fn set_external_table_definitions<T, K, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = (K, V)>,
K: std::convert::Into<std::string::String>,
V: std::convert::Into<google_cloud_bigquery_v2::model::ExternalDataConfiguration>,
{
use std::iter::Iterator;
self.request.external_table_definitions = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
self
}
pub fn set_flatten_results<T>(mut self, v: T) -> Self
where T: std::convert::Into<wkt::BoolValue>
{
self.request.flatten_results = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_flatten_results<T>(mut self, v: std::option::Option<T>) -> Self
where T: std::convert::Into<wkt::BoolValue>
{
self.request.flatten_results = v.map(|x| x.into());
self
}
pub fn set_job_creation_mode<T: std::convert::Into<google_cloud_bigquery_v2::model::query_request::JobCreationMode>>(mut self, v: T) -> Self {
self.request.job_creation_mode = v.into();
self
}
pub fn set_job_timeout_ms<T>(mut self, v: T) -> Self
where T: std::convert::Into<i64>
{
self.request.job_timeout_ms = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_job_timeout_ms<T>(mut self, v: std::option::Option<T>) -> Self
where T: std::convert::Into<i64>
{
self.request.job_timeout_ms = v.map(|x| x.into());
self
}
pub fn set_labels<T, K, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = (K, V)>,
K: std::convert::Into<std::string::String>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.request.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
self
}
pub fn set_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request.location = v.into();
self
}
pub fn set_max_results<T>(mut self, v: T) -> Self
where T: std::convert::Into<wkt::UInt32Value>
{
self.request.max_results = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_max_results<T>(mut self, v: std::option::Option<T>) -> Self
where T: std::convert::Into<wkt::UInt32Value>
{
self.request.max_results = v.map(|x| x.into());
self
}
pub fn set_max_slots<T>(mut self, v: T) -> Self
where T: std::convert::Into<i32>
{
self.request.max_slots = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_max_slots<T>(mut self, v: std::option::Option<T>) -> Self
where T: std::convert::Into<i32>
{
self.request.max_slots = v.map(|x| x.into());
self
}
pub fn set_maximum_bytes_billed<T>(mut self, v: T) -> Self
where T: std::convert::Into<wkt::Int64Value>
{
self.request.maximum_bytes_billed = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_maximum_bytes_billed<T>(mut self, v: std::option::Option<T>) -> Self
where T: std::convert::Into<wkt::Int64Value>
{
self.request.maximum_bytes_billed = v.map(|x| x.into());
self
}
pub fn set_parameter_mode<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request.parameter_mode = v.into();
self
}
pub fn set_priority<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request.priority = v.into();
self
}
pub fn set_query<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request.query = v.into();
self
}
pub fn set_query_parameters<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<google_cloud_bigquery_v2::model::QueryParameter>
{
use std::iter::Iterator;
self.request.query_parameters = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_range_partitioning<T>(mut self, v: T) -> Self
where T: std::convert::Into<google_cloud_bigquery_v2::model::RangePartitioning>
{
self.request.range_partitioning = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_range_partitioning<T>(mut self, v: std::option::Option<T>) -> Self
where T: std::convert::Into<google_cloud_bigquery_v2::model::RangePartitioning>
{
self.request.range_partitioning = v.map(|x| x.into());
self
}
pub fn set_reservation<T>(mut self, v: T) -> Self
where T: std::convert::Into<std::string::String>
{
self.request.reservation = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_reservation<T>(mut self, v: std::option::Option<T>) -> Self
where T: std::convert::Into<std::string::String>
{
self.request.reservation = v.map(|x| x.into());
self
}
pub fn set_schema_update_options<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>
{
use std::iter::Iterator;
self.request.schema_update_options = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_script_options<T>(mut self, v: T) -> Self
where T: std::convert::Into<google_cloud_bigquery_v2::model::ScriptOptions>
{
self.request.script_options = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_script_options<T>(mut self, v: std::option::Option<T>) -> Self
where T: std::convert::Into<google_cloud_bigquery_v2::model::ScriptOptions>
{
self.request.script_options = v.map(|x| x.into());
self
}
pub fn set_time_partitioning<T>(mut self, v: T) -> Self
where T: std::convert::Into<google_cloud_bigquery_v2::model::TimePartitioning>
{
self.request.time_partitioning = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_time_partitioning<T>(mut self, v: std::option::Option<T>) -> Self
where T: std::convert::Into<google_cloud_bigquery_v2::model::TimePartitioning>
{
self.request.time_partitioning = v.map(|x| x.into());
self
}
pub fn set_timeout_ms<T>(mut self, v: T) -> Self
where T: std::convert::Into<wkt::UInt32Value>
{
self.request.timeout_ms = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_timeout_ms<T>(mut self, v: std::option::Option<T>) -> Self
where T: std::convert::Into<wkt::UInt32Value>
{
self.request.timeout_ms = v.map(|x| x.into());
self
}
pub fn set_use_legacy_sql<T>(mut self, v: T) -> Self
where T: std::convert::Into<wkt::BoolValue>
{
self.request.use_legacy_sql = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_use_legacy_sql<T>(mut self, v: std::option::Option<T>) -> Self
where T: std::convert::Into<wkt::BoolValue>
{
self.request.use_legacy_sql = v.map(|x| x.into());
self
}
pub fn set_use_query_cache<T>(mut self, v: T) -> Self
where T: std::convert::Into<wkt::BoolValue>
{
self.request.use_query_cache = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_use_query_cache<T>(mut self, v: std::option::Option<T>) -> Self
where T: std::convert::Into<wkt::BoolValue>
{
self.request.use_query_cache = v.map(|x| x.into());
self
}
pub fn set_user_defined_function_resources<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<google_cloud_bigquery_v2::model::UserDefinedFunctionResource>
{
use std::iter::Iterator;
self.request.user_defined_function_resources = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_write_disposition<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.request.write_disposition = v.into();
self
}
}