#[non_exhaustive]pub struct OnPremisesConfiguration {
pub host_port: String,
pub kind: String,
pub username: String,
pub password: String,
pub ca_certificate: String,
pub client_certificate: String,
pub client_key: String,
pub dump_file_path: String,
pub source_instance: Option<InstanceReference>,
pub selected_objects: Vec<SelectedObjects>,
pub ssl_option: SslOption,
/* private fields */
}Expand description
On-premises instance configuration.
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.host_port: StringThe host and port of the on-premises instance in host:port format
kind: StringThis is always sql#onPremisesConfiguration.
username: StringThe username for connecting to on-premises instance.
password: StringThe password for connecting to on-premises instance.
ca_certificate: StringPEM representation of the trusted CA’s x509 certificate.
client_certificate: StringPEM representation of the replica’s x509 certificate.
client_key: StringPEM representation of the replica’s private key. The corresponding public key is encoded in the client’s certificate.
dump_file_path: StringThe dump file to create the Cloud SQL replica.
source_instance: Option<InstanceReference>The reference to Cloud SQL instance if the source is Cloud SQL.
selected_objects: Vec<SelectedObjects>Optional. A list of objects that the user selects for replication from an external source instance.
ssl_option: SslOptionOptional. SSL option for replica connection to the on-premises source.
Implementations§
Source§impl OnPremisesConfiguration
impl OnPremisesConfiguration
pub fn new() -> Self
Sourcepub fn set_host_port<T: Into<String>>(self, v: T) -> Self
pub fn set_host_port<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_username<T: Into<String>>(self, v: T) -> Self
pub fn set_username<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_password<T: Into<String>>(self, v: T) -> Self
pub fn set_password<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_ca_certificate<T: Into<String>>(self, v: T) -> Self
pub fn set_ca_certificate<T: Into<String>>(self, v: T) -> Self
Sets the value of ca_certificate.
§Example
let x = OnPremisesConfiguration::new().set_ca_certificate("example");Sourcepub fn set_client_certificate<T: Into<String>>(self, v: T) -> Self
pub fn set_client_certificate<T: Into<String>>(self, v: T) -> Self
Sets the value of client_certificate.
§Example
let x = OnPremisesConfiguration::new().set_client_certificate("example");Sourcepub fn set_client_key<T: Into<String>>(self, v: T) -> Self
pub fn set_client_key<T: Into<String>>(self, v: T) -> Self
Sets the value of client_key.
§Example
let x = OnPremisesConfiguration::new().set_client_key("example");Sourcepub fn set_dump_file_path<T: Into<String>>(self, v: T) -> Self
pub fn set_dump_file_path<T: Into<String>>(self, v: T) -> Self
Sets the value of dump_file_path.
§Example
let x = OnPremisesConfiguration::new().set_dump_file_path("example");Sourcepub fn set_source_instance<T>(self, v: T) -> Selfwhere
T: Into<InstanceReference>,
pub fn set_source_instance<T>(self, v: T) -> Selfwhere
T: Into<InstanceReference>,
Sets the value of source_instance.
§Example
use google_cloud_sql_v1::model::InstanceReference;
let x = OnPremisesConfiguration::new().set_source_instance(InstanceReference::default()/* use setters */);Sourcepub fn set_or_clear_source_instance<T>(self, v: Option<T>) -> Selfwhere
T: Into<InstanceReference>,
pub fn set_or_clear_source_instance<T>(self, v: Option<T>) -> Selfwhere
T: Into<InstanceReference>,
Sets or clears the value of source_instance.
§Example
use google_cloud_sql_v1::model::InstanceReference;
let x = OnPremisesConfiguration::new().set_or_clear_source_instance(Some(InstanceReference::default()/* use setters */));
let x = OnPremisesConfiguration::new().set_or_clear_source_instance(None::<InstanceReference>);Sourcepub fn set_selected_objects<T, V>(self, v: T) -> Self
pub fn set_selected_objects<T, V>(self, v: T) -> Self
Sets the value of selected_objects.
§Example
use google_cloud_sql_v1::model::SelectedObjects;
let x = OnPremisesConfiguration::new()
.set_selected_objects([
SelectedObjects::default()/* use setters */,
SelectedObjects::default()/* use (different) setters */,
]);Sourcepub fn set_ssl_option<T: Into<SslOption>>(self, v: T) -> Self
pub fn set_ssl_option<T: Into<SslOption>>(self, v: T) -> Self
Sets the value of ssl_option.
§Example
use google_cloud_sql_v1::model::on_premises_configuration::SslOption;
let x0 = OnPremisesConfiguration::new().set_ssl_option(SslOption::Disable);
let x1 = OnPremisesConfiguration::new().set_ssl_option(SslOption::Require);
let x2 = OnPremisesConfiguration::new().set_ssl_option(SslOption::VerifyCa);Trait Implementations§
Source§impl Clone for OnPremisesConfiguration
impl Clone for OnPremisesConfiguration
Source§fn clone(&self) -> OnPremisesConfiguration
fn clone(&self) -> OnPremisesConfiguration
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more