#[non_exhaustive]pub struct SourceConfig {
pub source_connection_profile: String,
pub source_stream_config: Option<SourceStreamConfig>,
/* private fields */
}Expand description
The configuration of the stream source.
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.source_connection_profile: StringRequired. Source connection profile resource.
Format: projects/{project}/locations/{location}/connectionProfiles/{name}
source_stream_config: Option<SourceStreamConfig>Stream configuration that is specific to the data source type.
Implementations§
Source§impl SourceConfig
impl SourceConfig
pub fn new() -> Self
Sourcepub fn set_source_connection_profile<T: Into<String>>(self, v: T) -> Self
pub fn set_source_connection_profile<T: Into<String>>(self, v: T) -> Self
Sets the value of source_connection_profile.
§Example
let x = SourceConfig::new().set_source_connection_profile("example");Sourcepub fn set_source_stream_config<T: Into<Option<SourceStreamConfig>>>(
self,
v: T,
) -> Self
pub fn set_source_stream_config<T: Into<Option<SourceStreamConfig>>>( self, v: T, ) -> Self
Sets the value of source_stream_config.
Note that all the setters affecting source_stream_config are mutually
exclusive.
§Example
use google_cloud_datastream_v1::model::OracleSourceConfig;
let x = SourceConfig::new().set_source_stream_config(Some(
google_cloud_datastream_v1::model::source_config::SourceStreamConfig::OracleSourceConfig(OracleSourceConfig::default().into())));Sourcepub fn oracle_source_config(&self) -> Option<&Box<OracleSourceConfig>>
pub fn oracle_source_config(&self) -> Option<&Box<OracleSourceConfig>>
The value of source_stream_config
if it holds a OracleSourceConfig, None if the field is not set or
holds a different branch.
Sourcepub fn set_oracle_source_config<T: Into<Box<OracleSourceConfig>>>(
self,
v: T,
) -> Self
pub fn set_oracle_source_config<T: Into<Box<OracleSourceConfig>>>( self, v: T, ) -> Self
Sets the value of source_stream_config
to hold a OracleSourceConfig.
Note that all the setters affecting source_stream_config are
mutually exclusive.
§Example
use google_cloud_datastream_v1::model::OracleSourceConfig;
let x = SourceConfig::new().set_oracle_source_config(OracleSourceConfig::default()/* use setters */);
assert!(x.oracle_source_config().is_some());
assert!(x.mysql_source_config().is_none());
assert!(x.postgresql_source_config().is_none());
assert!(x.sql_server_source_config().is_none());
assert!(x.salesforce_source_config().is_none());
assert!(x.mongodb_source_config().is_none());Sourcepub fn mysql_source_config(&self) -> Option<&Box<MysqlSourceConfig>>
pub fn mysql_source_config(&self) -> Option<&Box<MysqlSourceConfig>>
The value of source_stream_config
if it holds a MysqlSourceConfig, None if the field is not set or
holds a different branch.
Sourcepub fn set_mysql_source_config<T: Into<Box<MysqlSourceConfig>>>(
self,
v: T,
) -> Self
pub fn set_mysql_source_config<T: Into<Box<MysqlSourceConfig>>>( self, v: T, ) -> Self
Sets the value of source_stream_config
to hold a MysqlSourceConfig.
Note that all the setters affecting source_stream_config are
mutually exclusive.
§Example
use google_cloud_datastream_v1::model::MysqlSourceConfig;
let x = SourceConfig::new().set_mysql_source_config(MysqlSourceConfig::default()/* use setters */);
assert!(x.mysql_source_config().is_some());
assert!(x.oracle_source_config().is_none());
assert!(x.postgresql_source_config().is_none());
assert!(x.sql_server_source_config().is_none());
assert!(x.salesforce_source_config().is_none());
assert!(x.mongodb_source_config().is_none());Sourcepub fn postgresql_source_config(&self) -> Option<&Box<PostgresqlSourceConfig>>
pub fn postgresql_source_config(&self) -> Option<&Box<PostgresqlSourceConfig>>
The value of source_stream_config
if it holds a PostgresqlSourceConfig, None if the field is not set or
holds a different branch.
Sourcepub fn set_postgresql_source_config<T: Into<Box<PostgresqlSourceConfig>>>(
self,
v: T,
) -> Self
pub fn set_postgresql_source_config<T: Into<Box<PostgresqlSourceConfig>>>( self, v: T, ) -> Self
Sets the value of source_stream_config
to hold a PostgresqlSourceConfig.
Note that all the setters affecting source_stream_config are
mutually exclusive.
§Example
use google_cloud_datastream_v1::model::PostgresqlSourceConfig;
let x = SourceConfig::new().set_postgresql_source_config(PostgresqlSourceConfig::default()/* use setters */);
assert!(x.postgresql_source_config().is_some());
assert!(x.oracle_source_config().is_none());
assert!(x.mysql_source_config().is_none());
assert!(x.sql_server_source_config().is_none());
assert!(x.salesforce_source_config().is_none());
assert!(x.mongodb_source_config().is_none());Sourcepub fn sql_server_source_config(&self) -> Option<&Box<SqlServerSourceConfig>>
pub fn sql_server_source_config(&self) -> Option<&Box<SqlServerSourceConfig>>
The value of source_stream_config
if it holds a SqlServerSourceConfig, None if the field is not set or
holds a different branch.
Sourcepub fn set_sql_server_source_config<T: Into<Box<SqlServerSourceConfig>>>(
self,
v: T,
) -> Self
pub fn set_sql_server_source_config<T: Into<Box<SqlServerSourceConfig>>>( self, v: T, ) -> Self
Sets the value of source_stream_config
to hold a SqlServerSourceConfig.
Note that all the setters affecting source_stream_config are
mutually exclusive.
§Example
use google_cloud_datastream_v1::model::SqlServerSourceConfig;
let x = SourceConfig::new().set_sql_server_source_config(SqlServerSourceConfig::default()/* use setters */);
assert!(x.sql_server_source_config().is_some());
assert!(x.oracle_source_config().is_none());
assert!(x.mysql_source_config().is_none());
assert!(x.postgresql_source_config().is_none());
assert!(x.salesforce_source_config().is_none());
assert!(x.mongodb_source_config().is_none());Sourcepub fn salesforce_source_config(&self) -> Option<&Box<SalesforceSourceConfig>>
pub fn salesforce_source_config(&self) -> Option<&Box<SalesforceSourceConfig>>
The value of source_stream_config
if it holds a SalesforceSourceConfig, None if the field is not set or
holds a different branch.
Sourcepub fn set_salesforce_source_config<T: Into<Box<SalesforceSourceConfig>>>(
self,
v: T,
) -> Self
pub fn set_salesforce_source_config<T: Into<Box<SalesforceSourceConfig>>>( self, v: T, ) -> Self
Sets the value of source_stream_config
to hold a SalesforceSourceConfig.
Note that all the setters affecting source_stream_config are
mutually exclusive.
§Example
use google_cloud_datastream_v1::model::SalesforceSourceConfig;
let x = SourceConfig::new().set_salesforce_source_config(SalesforceSourceConfig::default()/* use setters */);
assert!(x.salesforce_source_config().is_some());
assert!(x.oracle_source_config().is_none());
assert!(x.mysql_source_config().is_none());
assert!(x.postgresql_source_config().is_none());
assert!(x.sql_server_source_config().is_none());
assert!(x.mongodb_source_config().is_none());Sourcepub fn mongodb_source_config(&self) -> Option<&Box<MongodbSourceConfig>>
pub fn mongodb_source_config(&self) -> Option<&Box<MongodbSourceConfig>>
The value of source_stream_config
if it holds a MongodbSourceConfig, None if the field is not set or
holds a different branch.
Sourcepub fn set_mongodb_source_config<T: Into<Box<MongodbSourceConfig>>>(
self,
v: T,
) -> Self
pub fn set_mongodb_source_config<T: Into<Box<MongodbSourceConfig>>>( self, v: T, ) -> Self
Sets the value of source_stream_config
to hold a MongodbSourceConfig.
Note that all the setters affecting source_stream_config are
mutually exclusive.
§Example
use google_cloud_datastream_v1::model::MongodbSourceConfig;
let x = SourceConfig::new().set_mongodb_source_config(MongodbSourceConfig::default()/* use setters */);
assert!(x.mongodb_source_config().is_some());
assert!(x.oracle_source_config().is_none());
assert!(x.mysql_source_config().is_none());
assert!(x.postgresql_source_config().is_none());
assert!(x.sql_server_source_config().is_none());
assert!(x.salesforce_source_config().is_none());Trait Implementations§
Source§impl Clone for SourceConfig
impl Clone for SourceConfig
Source§fn clone(&self) -> SourceConfig
fn clone(&self) -> SourceConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more