#[non_exhaustive]pub struct ConnectSettings {Show 14 fields
pub kind: String,
pub server_ca_cert: Option<SslCert>,
pub ip_addresses: Vec<IpMapping>,
pub region: String,
pub database_version: SqlDatabaseVersion,
pub backend_type: SqlBackendType,
pub psc_enabled: bool,
pub dns_name: String,
pub server_ca_mode: CaMode,
pub custom_subject_alternative_names: Vec<String>,
pub dns_names: Vec<DnsNameMapping>,
pub node_count: Option<i32>,
pub nodes: Vec<ConnectPoolNodeConfig>,
pub mdx_protocol_support: Vec<MdxProtocolSupport>,
/* private fields */
}Expand description
Connect settings retrieval response.
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.kind: StringThis is always sql#connectSettings.
server_ca_cert: Option<SslCert>SSL configuration.
ip_addresses: Vec<IpMapping>The assigned IP addresses for the instance.
region: StringThe cloud region for the instance. For example, us-central1,
europe-west1. The region cannot be changed after instance creation.
database_version: SqlDatabaseVersionThe database engine type and version. The databaseVersion
field cannot be changed after instance creation.
MySQL instances: MYSQL_8_0, MYSQL_5_7 (default),
or MYSQL_5_6.
PostgreSQL instances: POSTGRES_9_6, POSTGRES_10,
POSTGRES_11, POSTGRES_12 (default), POSTGRES_13, or POSTGRES_14.
SQL Server instances: SQLSERVER_2017_STANDARD (default),
SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS,
SQLSERVER_2017_WEB, SQLSERVER_2019_STANDARD,
SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, or
SQLSERVER_2019_WEB.
backend_type: SqlBackendTypeSECOND_GEN: Cloud SQL database instance.
EXTERNAL: A database server that is not managed by Google.
This property is read-only; use the tier property in the settings
object to determine the database type.
psc_enabled: boolWhether PSC connectivity is enabled for this instance.
dns_name: StringThe dns name of the instance.
server_ca_mode: CaModeSpecify what type of CA is used for the server certificate.
custom_subject_alternative_names: Vec<String>Custom subject alternative names for the server certificate.
dns_names: Vec<DnsNameMapping>Output only. The list of DNS names used by this instance.
node_count: Option<i32>The number of read pool nodes in a read pool.
nodes: Vec<ConnectPoolNodeConfig>Output only. Entries containing information about each read pool node of the read pool.
mdx_protocol_support: Vec<MdxProtocolSupport>Optional. Output only. mdx_protocol_support controls how the client uses metadata exchange when connecting to the instance. The values in the list representing parts of the MDX protocol that are supported by this instance. When the list is empty, the instance does not support MDX, so the client must not send an MDX request. The default is empty.
Implementations§
Source§impl ConnectSettings
impl ConnectSettings
pub fn new() -> Self
Sourcepub fn set_server_ca_cert<T>(self, v: T) -> Self
pub fn set_server_ca_cert<T>(self, v: T) -> Self
Sets the value of server_ca_cert.
§Example
use google_cloud_sql_v1::model::SslCert;
let x = ConnectSettings::new().set_server_ca_cert(SslCert::default()/* use setters */);Sourcepub fn set_or_clear_server_ca_cert<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_server_ca_cert<T>(self, v: Option<T>) -> Self
Sets or clears the value of server_ca_cert.
§Example
use google_cloud_sql_v1::model::SslCert;
let x = ConnectSettings::new().set_or_clear_server_ca_cert(Some(SslCert::default()/* use setters */));
let x = ConnectSettings::new().set_or_clear_server_ca_cert(None::<SslCert>);Sourcepub fn set_ip_addresses<T, V>(self, v: T) -> Self
pub fn set_ip_addresses<T, V>(self, v: T) -> Self
Sets the value of ip_addresses.
§Example
use google_cloud_sql_v1::model::IpMapping;
let x = ConnectSettings::new()
.set_ip_addresses([
IpMapping::default()/* use setters */,
IpMapping::default()/* use (different) setters */,
]);Sourcepub fn set_region<T: Into<String>>(self, v: T) -> Self
pub fn set_region<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_database_version<T: Into<SqlDatabaseVersion>>(self, v: T) -> Self
pub fn set_database_version<T: Into<SqlDatabaseVersion>>(self, v: T) -> Self
Sets the value of database_version.
§Example
use google_cloud_sql_v1::model::SqlDatabaseVersion;
let x0 = ConnectSettings::new().set_database_version(SqlDatabaseVersion::Mysql56);
let x1 = ConnectSettings::new().set_database_version(SqlDatabaseVersion::Mysql57);
let x2 = ConnectSettings::new().set_database_version(SqlDatabaseVersion::Mysql80);Sourcepub fn set_backend_type<T: Into<SqlBackendType>>(self, v: T) -> Self
pub fn set_backend_type<T: Into<SqlBackendType>>(self, v: T) -> Self
Sets the value of backend_type.
§Example
use google_cloud_sql_v1::model::SqlBackendType;
let x0 = ConnectSettings::new().set_backend_type(SqlBackendType::SecondGen);
let x1 = ConnectSettings::new().set_backend_type(SqlBackendType::External);Sourcepub fn set_psc_enabled<T: Into<bool>>(self, v: T) -> Self
pub fn set_psc_enabled<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_dns_name<T: Into<String>>(self, v: T) -> Self
pub fn set_dns_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_server_ca_mode<T: Into<CaMode>>(self, v: T) -> Self
pub fn set_server_ca_mode<T: Into<CaMode>>(self, v: T) -> Self
Sets the value of server_ca_mode.
§Example
use google_cloud_sql_v1::model::connect_settings::CaMode;
let x0 = ConnectSettings::new().set_server_ca_mode(CaMode::GoogleManagedInternalCa);
let x1 = ConnectSettings::new().set_server_ca_mode(CaMode::GoogleManagedCasCa);
let x2 = ConnectSettings::new().set_server_ca_mode(CaMode::CustomerManagedCasCa);Sourcepub fn set_custom_subject_alternative_names<T, V>(self, v: T) -> Self
pub fn set_custom_subject_alternative_names<T, V>(self, v: T) -> Self
Sets the value of custom_subject_alternative_names.
§Example
let x = ConnectSettings::new().set_custom_subject_alternative_names(["a", "b", "c"]);Sourcepub fn set_dns_names<T, V>(self, v: T) -> Self
pub fn set_dns_names<T, V>(self, v: T) -> Self
Sourcepub fn set_node_count<T>(self, v: T) -> Self
pub fn set_node_count<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_node_count<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_node_count<T>(self, v: Option<T>) -> Self
Sets or clears the value of node_count.
§Example
let x = ConnectSettings::new().set_or_clear_node_count(Some(42));
let x = ConnectSettings::new().set_or_clear_node_count(None::<i32>);Sourcepub fn set_mdx_protocol_support<T, V>(self, v: T) -> Self
pub fn set_mdx_protocol_support<T, V>(self, v: T) -> Self
Sets the value of mdx_protocol_support.
§Example
use google_cloud_sql_v1::model::connect_settings::MdxProtocolSupport;
let x = ConnectSettings::new().set_mdx_protocol_support([
MdxProtocolSupport::ClientProtocolType,
]);Trait Implementations§
Source§impl Clone for ConnectSettings
impl Clone for ConnectSettings
Source§fn clone(&self) -> ConnectSettings
fn clone(&self) -> ConnectSettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more