#[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
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(format!("projects/{project_id}/locations/{location_id}/connectionProfiles/{connection_profile_id}"));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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SourceConfig
impl Debug for SourceConfig
Source§impl Default for SourceConfig
impl Default for SourceConfig
Source§fn default() -> SourceConfig
fn default() -> SourceConfig
Source§impl Message for SourceConfig
impl Message for SourceConfig
Source§impl PartialEq for SourceConfig
impl PartialEq for SourceConfig
impl StructuralPartialEq for SourceConfig
Auto Trait Implementations§
impl Freeze for SourceConfig
impl RefUnwindSafe for SourceConfig
impl Send for SourceConfig
impl Sync for SourceConfig
impl Unpin for SourceConfig
impl UnsafeUnpin for SourceConfig
impl UnwindSafe for SourceConfig
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