#![allow(rustdoc::redundant_explicit_links)]
#![allow(rustdoc::broken_intra_doc_links)]
#![no_implicit_prelude]
extern crate async_trait;
extern crate bytes;
extern crate gaxi;
extern crate google_cloud_gax;
extern crate google_cloud_iam_v1;
extern crate serde;
extern crate serde_json;
extern crate serde_with;
extern crate std;
extern crate tracing;
extern crate wkt;
mod debug;
mod deserialize;
mod serialize;
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CreateConnectionRequest {
pub parent: std::string::String,
pub connection_id: std::string::String,
pub connection: std::option::Option<crate::model::Connection>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CreateConnectionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_connection_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.connection_id = v.into();
self
}
pub fn set_connection<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Connection>,
{
self.connection = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_connection<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Connection>,
{
self.connection = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for CreateConnectionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.bigquery.connection.v1.CreateConnectionRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct GetConnectionRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl GetConnectionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetConnectionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.bigquery.connection.v1.GetConnectionRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListConnectionsRequest {
pub parent: std::string::String,
pub page_size: i32,
pub page_token: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListConnectionsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
}
impl wkt::message::Message for ListConnectionsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.bigquery.connection.v1.ListConnectionsRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct ListConnectionsResponse {
pub next_page_token: std::string::String,
pub connections: std::vec::Vec<crate::model::Connection>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl ListConnectionsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
pub fn set_connections<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::Connection>,
{
use std::iter::Iterator;
self.connections = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ListConnectionsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.bigquery.connection.v1.ListConnectionsResponse"
}
}
#[doc(hidden)]
impl google_cloud_gax::paginator::internal::PageableResponse for ListConnectionsResponse {
type PageItem = crate::model::Connection;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.connections
}
fn next_page_token(&self) -> std::string::String {
use std::clone::Clone;
self.next_page_token.clone()
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct UpdateConnectionRequest {
pub name: std::string::String,
pub connection: std::option::Option<crate::model::Connection>,
pub update_mask: std::option::Option<wkt::FieldMask>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl UpdateConnectionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_connection<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::Connection>,
{
self.connection = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_connection<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::Connection>,
{
self.connection = v.map(|x| x.into());
self
}
pub fn set_update_mask<T>(mut self, v: T) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<wkt::FieldMask>,
{
self.update_mask = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for UpdateConnectionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.bigquery.connection.v1.UpdateConnectionRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct DeleteConnectionRequest {
pub name: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl DeleteConnectionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for DeleteConnectionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.bigquery.connection.v1.DeleteConnectionRequest"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct Connection {
pub name: std::string::String,
pub friendly_name: std::string::String,
pub description: std::string::String,
pub creation_time: i64,
pub last_modified_time: i64,
pub has_credential: bool,
pub properties: std::option::Option<crate::model::connection::Properties>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl Connection {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_friendly_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.friendly_name = v.into();
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_creation_time<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
self.creation_time = v.into();
self
}
pub fn set_last_modified_time<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
self.last_modified_time = v.into();
self
}
pub fn set_has_credential<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.has_credential = v.into();
self
}
pub fn set_properties<
T: std::convert::Into<std::option::Option<crate::model::connection::Properties>>,
>(
mut self,
v: T,
) -> Self {
self.properties = v.into();
self
}
pub fn cloud_sql(
&self,
) -> std::option::Option<&std::boxed::Box<crate::model::CloudSqlProperties>> {
#[allow(unreachable_patterns)]
self.properties.as_ref().and_then(|v| match v {
crate::model::connection::Properties::CloudSql(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_cloud_sql<
T: std::convert::Into<std::boxed::Box<crate::model::CloudSqlProperties>>,
>(
mut self,
v: T,
) -> Self {
self.properties =
std::option::Option::Some(crate::model::connection::Properties::CloudSql(v.into()));
self
}
pub fn aws(&self) -> std::option::Option<&std::boxed::Box<crate::model::AwsProperties>> {
#[allow(unreachable_patterns)]
self.properties.as_ref().and_then(|v| match v {
crate::model::connection::Properties::Aws(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_aws<T: std::convert::Into<std::boxed::Box<crate::model::AwsProperties>>>(
mut self,
v: T,
) -> Self {
self.properties =
std::option::Option::Some(crate::model::connection::Properties::Aws(v.into()));
self
}
pub fn azure(&self) -> std::option::Option<&std::boxed::Box<crate::model::AzureProperties>> {
#[allow(unreachable_patterns)]
self.properties.as_ref().and_then(|v| match v {
crate::model::connection::Properties::Azure(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_azure<T: std::convert::Into<std::boxed::Box<crate::model::AzureProperties>>>(
mut self,
v: T,
) -> Self {
self.properties =
std::option::Option::Some(crate::model::connection::Properties::Azure(v.into()));
self
}
pub fn cloud_spanner(
&self,
) -> std::option::Option<&std::boxed::Box<crate::model::CloudSpannerProperties>> {
#[allow(unreachable_patterns)]
self.properties.as_ref().and_then(|v| match v {
crate::model::connection::Properties::CloudSpanner(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_cloud_spanner<
T: std::convert::Into<std::boxed::Box<crate::model::CloudSpannerProperties>>,
>(
mut self,
v: T,
) -> Self {
self.properties =
std::option::Option::Some(crate::model::connection::Properties::CloudSpanner(v.into()));
self
}
pub fn cloud_resource(
&self,
) -> std::option::Option<&std::boxed::Box<crate::model::CloudResourceProperties>> {
#[allow(unreachable_patterns)]
self.properties.as_ref().and_then(|v| match v {
crate::model::connection::Properties::CloudResource(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_cloud_resource<
T: std::convert::Into<std::boxed::Box<crate::model::CloudResourceProperties>>,
>(
mut self,
v: T,
) -> Self {
self.properties = std::option::Option::Some(
crate::model::connection::Properties::CloudResource(v.into()),
);
self
}
pub fn spark(&self) -> std::option::Option<&std::boxed::Box<crate::model::SparkProperties>> {
#[allow(unreachable_patterns)]
self.properties.as_ref().and_then(|v| match v {
crate::model::connection::Properties::Spark(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_spark<T: std::convert::Into<std::boxed::Box<crate::model::SparkProperties>>>(
mut self,
v: T,
) -> Self {
self.properties =
std::option::Option::Some(crate::model::connection::Properties::Spark(v.into()));
self
}
pub fn salesforce_data_cloud(
&self,
) -> std::option::Option<&std::boxed::Box<crate::model::SalesforceDataCloudProperties>> {
#[allow(unreachable_patterns)]
self.properties.as_ref().and_then(|v| match v {
crate::model::connection::Properties::SalesforceDataCloud(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_salesforce_data_cloud<
T: std::convert::Into<std::boxed::Box<crate::model::SalesforceDataCloudProperties>>,
>(
mut self,
v: T,
) -> Self {
self.properties = std::option::Option::Some(
crate::model::connection::Properties::SalesforceDataCloud(v.into()),
);
self
}
}
impl wkt::message::Message for Connection {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.bigquery.connection.v1.Connection"
}
}
pub mod connection {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum Properties {
CloudSql(std::boxed::Box<crate::model::CloudSqlProperties>),
Aws(std::boxed::Box<crate::model::AwsProperties>),
Azure(std::boxed::Box<crate::model::AzureProperties>),
CloudSpanner(std::boxed::Box<crate::model::CloudSpannerProperties>),
CloudResource(std::boxed::Box<crate::model::CloudResourceProperties>),
Spark(std::boxed::Box<crate::model::SparkProperties>),
SalesforceDataCloud(std::boxed::Box<crate::model::SalesforceDataCloudProperties>),
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CloudSqlProperties {
pub instance_id: std::string::String,
pub database: std::string::String,
pub r#type: crate::model::cloud_sql_properties::DatabaseType,
pub credential: std::option::Option<crate::model::CloudSqlCredential>,
pub service_account_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CloudSqlProperties {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_instance_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.instance_id = v.into();
self
}
pub fn set_database<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.database = v.into();
self
}
pub fn set_type<T: std::convert::Into<crate::model::cloud_sql_properties::DatabaseType>>(
mut self,
v: T,
) -> Self {
self.r#type = v.into();
self
}
pub fn set_credential<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::CloudSqlCredential>,
{
self.credential = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_credential<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::CloudSqlCredential>,
{
self.credential = v.map(|x| x.into());
self
}
pub fn set_service_account_id<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.service_account_id = v.into();
self
}
}
impl wkt::message::Message for CloudSqlProperties {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.bigquery.connection.v1.CloudSqlProperties"
}
}
pub mod cloud_sql_properties {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum DatabaseType {
Unspecified,
Postgres,
Mysql,
UnknownValue(database_type::UnknownValue),
}
#[doc(hidden)]
pub mod database_type {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
}
impl DatabaseType {
pub fn value(&self) -> std::option::Option<i32> {
match self {
Self::Unspecified => std::option::Option::Some(0),
Self::Postgres => std::option::Option::Some(1),
Self::Mysql => std::option::Option::Some(2),
Self::UnknownValue(u) => u.0.value(),
}
}
pub fn name(&self) -> std::option::Option<&str> {
match self {
Self::Unspecified => std::option::Option::Some("DATABASE_TYPE_UNSPECIFIED"),
Self::Postgres => std::option::Option::Some("POSTGRES"),
Self::Mysql => std::option::Option::Some("MYSQL"),
Self::UnknownValue(u) => u.0.name(),
}
}
}
impl std::default::Default for DatabaseType {
fn default() -> Self {
use std::convert::From;
Self::from(0)
}
}
impl std::fmt::Display for DatabaseType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
wkt::internal::display_enum(f, self.name(), self.value())
}
}
impl std::convert::From<i32> for DatabaseType {
fn from(value: i32) -> Self {
match value {
0 => Self::Unspecified,
1 => Self::Postgres,
2 => Self::Mysql,
_ => Self::UnknownValue(database_type::UnknownValue(
wkt::internal::UnknownEnumValue::Integer(value),
)),
}
}
}
impl std::convert::From<&str> for DatabaseType {
fn from(value: &str) -> Self {
use std::string::ToString;
match value {
"DATABASE_TYPE_UNSPECIFIED" => Self::Unspecified,
"POSTGRES" => Self::Postgres,
"MYSQL" => Self::Mysql,
_ => Self::UnknownValue(database_type::UnknownValue(
wkt::internal::UnknownEnumValue::String(value.to_string()),
)),
}
}
}
impl serde::ser::Serialize for DatabaseType {
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
match self {
Self::Unspecified => serializer.serialize_i32(0),
Self::Postgres => serializer.serialize_i32(1),
Self::Mysql => serializer.serialize_i32(2),
Self::UnknownValue(u) => u.0.serialize(serializer),
}
}
}
impl<'de> serde::de::Deserialize<'de> for DatabaseType {
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
where
D: serde::Deserializer<'de>,
{
deserializer.deserialize_any(wkt::internal::EnumVisitor::<DatabaseType>::new(
".google.cloud.bigquery.connection.v1.CloudSqlProperties.DatabaseType",
))
}
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CloudSqlCredential {
pub username: std::string::String,
pub password: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CloudSqlCredential {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.username = v.into();
self
}
pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.password = v.into();
self
}
}
impl wkt::message::Message for CloudSqlCredential {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.bigquery.connection.v1.CloudSqlCredential"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CloudSpannerProperties {
pub database: std::string::String,
pub use_parallelism: bool,
pub max_parallelism: i32,
pub use_serverless_analytics: bool,
pub use_data_boost: bool,
pub database_role: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CloudSpannerProperties {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_database<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.database = v.into();
self
}
pub fn set_use_parallelism<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.use_parallelism = v.into();
self
}
pub fn set_max_parallelism<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.max_parallelism = v.into();
self
}
pub fn set_use_serverless_analytics<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.use_serverless_analytics = v.into();
self
}
pub fn set_use_data_boost<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.use_data_boost = v.into();
self
}
pub fn set_database_role<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.database_role = v.into();
self
}
}
impl wkt::message::Message for CloudSpannerProperties {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.bigquery.connection.v1.CloudSpannerProperties"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct AwsProperties {
pub authentication_method:
std::option::Option<crate::model::aws_properties::AuthenticationMethod>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl AwsProperties {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_authentication_method<
T: std::convert::Into<std::option::Option<crate::model::aws_properties::AuthenticationMethod>>,
>(
mut self,
v: T,
) -> Self {
self.authentication_method = v.into();
self
}
#[deprecated]
pub fn cross_account_role(
&self,
) -> std::option::Option<&std::boxed::Box<crate::model::AwsCrossAccountRole>> {
#[allow(unreachable_patterns)]
self.authentication_method.as_ref().and_then(|v| match v {
crate::model::aws_properties::AuthenticationMethod::CrossAccountRole(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
#[deprecated]
pub fn set_cross_account_role<
T: std::convert::Into<std::boxed::Box<crate::model::AwsCrossAccountRole>>,
>(
mut self,
v: T,
) -> Self {
self.authentication_method = std::option::Option::Some(
crate::model::aws_properties::AuthenticationMethod::CrossAccountRole(v.into()),
);
self
}
pub fn access_role(
&self,
) -> std::option::Option<&std::boxed::Box<crate::model::AwsAccessRole>> {
#[allow(unreachable_patterns)]
self.authentication_method.as_ref().and_then(|v| match v {
crate::model::aws_properties::AuthenticationMethod::AccessRole(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_access_role<T: std::convert::Into<std::boxed::Box<crate::model::AwsAccessRole>>>(
mut self,
v: T,
) -> Self {
self.authentication_method = std::option::Option::Some(
crate::model::aws_properties::AuthenticationMethod::AccessRole(v.into()),
);
self
}
}
impl wkt::message::Message for AwsProperties {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.bigquery.connection.v1.AwsProperties"
}
}
pub mod aws_properties {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq)]
#[non_exhaustive]
pub enum AuthenticationMethod {
#[deprecated]
CrossAccountRole(std::boxed::Box<crate::model::AwsCrossAccountRole>),
AccessRole(std::boxed::Box<crate::model::AwsAccessRole>),
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct AwsCrossAccountRole {
pub iam_role_id: std::string::String,
pub iam_user_id: std::string::String,
pub external_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl AwsCrossAccountRole {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_iam_role_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.iam_role_id = v.into();
self
}
pub fn set_iam_user_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.iam_user_id = v.into();
self
}
pub fn set_external_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.external_id = v.into();
self
}
}
impl wkt::message::Message for AwsCrossAccountRole {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.bigquery.connection.v1.AwsCrossAccountRole"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct AwsAccessRole {
pub iam_role_id: std::string::String,
pub identity: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl AwsAccessRole {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_iam_role_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.iam_role_id = v.into();
self
}
pub fn set_identity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.identity = v.into();
self
}
}
impl wkt::message::Message for AwsAccessRole {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.bigquery.connection.v1.AwsAccessRole"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct AzureProperties {
pub application: std::string::String,
pub client_id: std::string::String,
pub object_id: std::string::String,
pub customer_tenant_id: std::string::String,
pub redirect_uri: std::string::String,
pub federated_application_client_id: std::string::String,
pub identity: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl AzureProperties {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_application<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.application = v.into();
self
}
pub fn set_client_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.client_id = v.into();
self
}
pub fn set_object_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.object_id = v.into();
self
}
pub fn set_customer_tenant_id<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.customer_tenant_id = v.into();
self
}
pub fn set_redirect_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.redirect_uri = v.into();
self
}
pub fn set_federated_application_client_id<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.federated_application_client_id = v.into();
self
}
pub fn set_identity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.identity = v.into();
self
}
}
impl wkt::message::Message for AzureProperties {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.bigquery.connection.v1.AzureProperties"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct CloudResourceProperties {
pub service_account_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl CloudResourceProperties {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_service_account_id<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.service_account_id = v.into();
self
}
}
impl wkt::message::Message for CloudResourceProperties {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.bigquery.connection.v1.CloudResourceProperties"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct MetastoreServiceConfig {
pub metastore_service: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl MetastoreServiceConfig {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_metastore_service<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.metastore_service = v.into();
self
}
}
impl wkt::message::Message for MetastoreServiceConfig {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.bigquery.connection.v1.MetastoreServiceConfig"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct SparkHistoryServerConfig {
pub dataproc_cluster: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl SparkHistoryServerConfig {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_dataproc_cluster<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.dataproc_cluster = v.into();
self
}
}
impl wkt::message::Message for SparkHistoryServerConfig {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.bigquery.connection.v1.SparkHistoryServerConfig"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct SparkProperties {
pub service_account_id: std::string::String,
pub metastore_service_config: std::option::Option<crate::model::MetastoreServiceConfig>,
pub spark_history_server_config: std::option::Option<crate::model::SparkHistoryServerConfig>,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl SparkProperties {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_service_account_id<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.service_account_id = v.into();
self
}
pub fn set_metastore_service_config<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::MetastoreServiceConfig>,
{
self.metastore_service_config = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_metastore_service_config<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::MetastoreServiceConfig>,
{
self.metastore_service_config = v.map(|x| x.into());
self
}
pub fn set_spark_history_server_config<T>(mut self, v: T) -> Self
where
T: std::convert::Into<crate::model::SparkHistoryServerConfig>,
{
self.spark_history_server_config = std::option::Option::Some(v.into());
self
}
pub fn set_or_clear_spark_history_server_config<T>(mut self, v: std::option::Option<T>) -> Self
where
T: std::convert::Into<crate::model::SparkHistoryServerConfig>,
{
self.spark_history_server_config = v.map(|x| x.into());
self
}
}
impl wkt::message::Message for SparkProperties {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.bigquery.connection.v1.SparkProperties"
}
}
#[derive(Clone, Default, PartialEq)]
#[non_exhaustive]
pub struct SalesforceDataCloudProperties {
pub instance_uri: std::string::String,
pub identity: std::string::String,
pub tenant_id: std::string::String,
pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
}
impl SalesforceDataCloudProperties {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_instance_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.instance_uri = v.into();
self
}
pub fn set_identity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.identity = v.into();
self
}
pub fn set_tenant_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.tenant_id = v.into();
self
}
}
impl wkt::message::Message for SalesforceDataCloudProperties {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.bigquery.connection.v1.SalesforceDataCloudProperties"
}
}