#[non_exhaustive]pub struct PscAutoConnectionConfig {
pub consumer_project: String,
pub consumer_network: String,
pub ip_address: Option<String>,
pub status: Option<String>,
pub consumer_network_status: Option<String>,
pub service_connection_policy: Option<String>,
pub service_connection_policy_creation_result: Option<String>,
pub instance_auto_dns_status: Option<AutoDnsStatus>,
pub write_endpoint_auto_dns_status: Option<AutoDnsStatus>,
/* private fields */
}Expand description
Settings for an automatically-setup Private Service Connect consumer endpoint that is used to connect to a Cloud SQL instance.
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.consumer_project: StringOptional. This is the project ID of consumer service project of this consumer endpoint.
This is only applicable if consumer_network is a shared VPC
network.
consumer_network: StringOptional. The consumer network of this consumer endpoint. This must be a resource path that includes both the host project and the network name.
For example, projects/project1/global/networks/network1.
The consumer host project of this network might be different from the consumer service project.
ip_address: Option<String>The IP address of the consumer endpoint.
status: Option<String>The connection status of the consumer endpoint.
consumer_network_status: Option<String>The connection policy status of the consumer network.
service_connection_policy: Option<String>Output only. The service connection policy created automatically for the
consumer network when psc_auto_connection_policy_enabled is true. It is
in the format of:
projects/{project}/regions/{region}/serviceConnectionPolicies/{policy_id}
The policy_id is in format of $NETWORK-$RANDOM.
service_connection_policy_creation_result: Option<String>Output only. The status of service connection policy creation.
instance_auto_dns_status: Option<AutoDnsStatus>Output only. The status of automated DNS provisioning.
write_endpoint_auto_dns_status: Option<AutoDnsStatus>Output only. The status of automated DNS provisioning for the write endpoint.
Implementations§
Source§impl PscAutoConnectionConfig
impl PscAutoConnectionConfig
Sourcepub fn set_consumer_project<T: Into<String>>(self, v: T) -> Self
pub fn set_consumer_project<T: Into<String>>(self, v: T) -> Self
Sets the value of consumer_project.
§Example
let x = PscAutoConnectionConfig::new().set_consumer_project("example");Sourcepub fn set_consumer_network<T: Into<String>>(self, v: T) -> Self
pub fn set_consumer_network<T: Into<String>>(self, v: T) -> Self
Sets the value of consumer_network.
§Example
let x = PscAutoConnectionConfig::new().set_consumer_network("example");Sourcepub fn set_ip_address<T>(self, v: T) -> Self
pub fn set_ip_address<T>(self, v: T) -> Self
Sets the value of ip_address.
§Example
let x = PscAutoConnectionConfig::new().set_ip_address("example");Sourcepub fn set_or_clear_ip_address<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_ip_address<T>(self, v: Option<T>) -> Self
Sets or clears the value of ip_address.
§Example
let x = PscAutoConnectionConfig::new().set_or_clear_ip_address(Some("example"));
let x = PscAutoConnectionConfig::new().set_or_clear_ip_address(None::<String>);Sourcepub fn set_status<T>(self, v: T) -> Self
pub fn set_status<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_status<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_status<T>(self, v: Option<T>) -> Self
Sourcepub fn set_consumer_network_status<T>(self, v: T) -> Self
pub fn set_consumer_network_status<T>(self, v: T) -> Self
Sets the value of consumer_network_status.
§Example
let x = PscAutoConnectionConfig::new().set_consumer_network_status("example");Sourcepub fn set_or_clear_consumer_network_status<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_consumer_network_status<T>(self, v: Option<T>) -> Self
Sets or clears the value of consumer_network_status.
§Example
let x = PscAutoConnectionConfig::new().set_or_clear_consumer_network_status(Some("example"));
let x = PscAutoConnectionConfig::new().set_or_clear_consumer_network_status(None::<String>);Sourcepub fn set_service_connection_policy<T>(self, v: T) -> Self
pub fn set_service_connection_policy<T>(self, v: T) -> Self
Sets the value of service_connection_policy.
§Example
let x = PscAutoConnectionConfig::new().set_service_connection_policy("example");Sourcepub fn set_or_clear_service_connection_policy<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_service_connection_policy<T>(self, v: Option<T>) -> Self
Sets or clears the value of service_connection_policy.
§Example
let x = PscAutoConnectionConfig::new().set_or_clear_service_connection_policy(Some("example"));
let x = PscAutoConnectionConfig::new().set_or_clear_service_connection_policy(None::<String>);Sourcepub fn set_service_connection_policy_creation_result<T>(self, v: T) -> Self
pub fn set_service_connection_policy_creation_result<T>(self, v: T) -> Self
Sets the value of service_connection_policy_creation_result.
§Example
let x = PscAutoConnectionConfig::new().set_service_connection_policy_creation_result("example");Sourcepub fn set_or_clear_service_connection_policy_creation_result<T>(
self,
v: Option<T>,
) -> Self
pub fn set_or_clear_service_connection_policy_creation_result<T>( self, v: Option<T>, ) -> Self
Sets or clears the value of service_connection_policy_creation_result.
§Example
let x = PscAutoConnectionConfig::new().set_or_clear_service_connection_policy_creation_result(Some("example"));
let x = PscAutoConnectionConfig::new().set_or_clear_service_connection_policy_creation_result(None::<String>);Sourcepub fn set_instance_auto_dns_status<T>(self, v: T) -> Selfwhere
T: Into<AutoDnsStatus>,
pub fn set_instance_auto_dns_status<T>(self, v: T) -> Selfwhere
T: Into<AutoDnsStatus>,
Sets the value of instance_auto_dns_status.
§Example
use google_cloud_sql_v1::model::AutoDnsStatus;
let x0 = PscAutoConnectionConfig::new().set_instance_auto_dns_status(AutoDnsStatus::AutoDnsOk);
let x1 = PscAutoConnectionConfig::new().set_instance_auto_dns_status(AutoDnsStatus::AutoDnsFailed);
let x2 = PscAutoConnectionConfig::new().set_instance_auto_dns_status(AutoDnsStatus::AutoDnsUnknown);Sourcepub fn set_or_clear_instance_auto_dns_status<T>(self, v: Option<T>) -> Selfwhere
T: Into<AutoDnsStatus>,
pub fn set_or_clear_instance_auto_dns_status<T>(self, v: Option<T>) -> Selfwhere
T: Into<AutoDnsStatus>,
Sets or clears the value of instance_auto_dns_status.
§Example
use google_cloud_sql_v1::model::AutoDnsStatus;
let x0 = PscAutoConnectionConfig::new().set_or_clear_instance_auto_dns_status(Some(AutoDnsStatus::AutoDnsOk));
let x1 = PscAutoConnectionConfig::new().set_or_clear_instance_auto_dns_status(Some(AutoDnsStatus::AutoDnsFailed));
let x2 = PscAutoConnectionConfig::new().set_or_clear_instance_auto_dns_status(Some(AutoDnsStatus::AutoDnsUnknown));
let x_none = PscAutoConnectionConfig::new().set_or_clear_instance_auto_dns_status(None::<AutoDnsStatus>);Sourcepub fn set_write_endpoint_auto_dns_status<T>(self, v: T) -> Selfwhere
T: Into<AutoDnsStatus>,
pub fn set_write_endpoint_auto_dns_status<T>(self, v: T) -> Selfwhere
T: Into<AutoDnsStatus>,
Sets the value of write_endpoint_auto_dns_status.
§Example
use google_cloud_sql_v1::model::AutoDnsStatus;
let x0 = PscAutoConnectionConfig::new().set_write_endpoint_auto_dns_status(AutoDnsStatus::AutoDnsOk);
let x1 = PscAutoConnectionConfig::new().set_write_endpoint_auto_dns_status(AutoDnsStatus::AutoDnsFailed);
let x2 = PscAutoConnectionConfig::new().set_write_endpoint_auto_dns_status(AutoDnsStatus::AutoDnsUnknown);Sourcepub fn set_or_clear_write_endpoint_auto_dns_status<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<AutoDnsStatus>,
pub fn set_or_clear_write_endpoint_auto_dns_status<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<AutoDnsStatus>,
Sets or clears the value of write_endpoint_auto_dns_status.
§Example
use google_cloud_sql_v1::model::AutoDnsStatus;
let x0 = PscAutoConnectionConfig::new().set_or_clear_write_endpoint_auto_dns_status(Some(AutoDnsStatus::AutoDnsOk));
let x1 = PscAutoConnectionConfig::new().set_or_clear_write_endpoint_auto_dns_status(Some(AutoDnsStatus::AutoDnsFailed));
let x2 = PscAutoConnectionConfig::new().set_or_clear_write_endpoint_auto_dns_status(Some(AutoDnsStatus::AutoDnsUnknown));
let x_none = PscAutoConnectionConfig::new().set_or_clear_write_endpoint_auto_dns_status(None::<AutoDnsStatus>);Trait Implementations§
Source§impl Clone for PscAutoConnectionConfig
impl Clone for PscAutoConnectionConfig
Source§fn clone(&self) -> PscAutoConnectionConfig
fn clone(&self) -> PscAutoConnectionConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more