#[non_exhaustive]pub struct ConsumerPscConnection {Show 15 fields
pub service_attachment_uri: String,
pub state: State,
pub project: String,
pub network: String,
pub psc_connection_id: String,
pub ip: String,
pub error_type: ConnectionErrorType,
pub error: Option<Status>,
pub gce_operation: String,
pub forwarding_rule: String,
pub error_info: Option<ErrorInfo>,
pub selected_subnetwork: String,
pub producer_instance_id: String,
pub producer_instance_metadata: HashMap<String, String>,
pub ip_version: Option<IPVersion>,
/* private fields */
}Expand description
PSC connection details on consumer side.
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.service_attachment_uri: StringThe URI of a service attachment which is the target of the PSC connection.
state: StateThe state of the PSC connection.
project: StringThe consumer project whose PSC forwarding rule is connected to the service attachments in this service connection map.
network: StringThe consumer network whose PSC forwarding rule is connected to the service attachments in this service connection map. Note that the network could be on a different project (shared VPC).
psc_connection_id: StringThe PSC connection id of the PSC forwarding rule connected to the service attachments in this service connection map.
ip: StringThe IP literal allocated on the consumer network for the PSC forwarding rule that is created to connect to the producer service attachment in this service connection map.
error_type: ConnectionErrorTypeThe error type indicates whether the error is consumer facing, producer facing or system internal.
error: Option<Status>The most recent error during operating this connection.
gce_operation: StringThe last Compute Engine operation to setup PSC connection.
forwarding_rule: StringThe URI of the consumer forwarding rule created. Example: projects/{projectNumOrId}/regions/us-east1/networks/{resourceId}.
error_info: Option<ErrorInfo>Output only. The error info for the latest error during operating this connection.
selected_subnetwork: StringOutput only. The URI of the selected subnetwork selected to allocate IP address for this connection.
producer_instance_id: StringImmutable. Deprecated. Use producer_instance_metadata instead. An immutable identifier for the producer instance.
producer_instance_metadata: HashMap<String, String>Immutable. An immutable map for the producer instance metadata.
ip_version: Option<IPVersion>The requested IP version for the PSC connection.
Implementations§
Source§impl ConsumerPscConnection
impl ConsumerPscConnection
pub fn new() -> Self
Sourcepub fn set_service_attachment_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_service_attachment_uri<T: Into<String>>(self, v: T) -> Self
Sets the value of service_attachment_uri.
§Example
let x = ConsumerPscConnection::new().set_service_attachment_uri("example");Sourcepub fn set_state<T: Into<State>>(self, v: T) -> Self
pub fn set_state<T: Into<State>>(self, v: T) -> Self
Sets the value of state.
§Example
use google_cloud_networkconnectivity_v1::model::service_connection_map::consumer_psc_connection::State;
let x0 = ConsumerPscConnection::new().set_state(State::Active);
let x1 = ConsumerPscConnection::new().set_state(State::Failed);
let x2 = ConsumerPscConnection::new().set_state(State::Creating);Sourcepub fn set_project<T: Into<String>>(self, v: T) -> Self
pub fn set_project<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_network<T: Into<String>>(self, v: T) -> Self
pub fn set_network<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_psc_connection_id<T: Into<String>>(self, v: T) -> Self
pub fn set_psc_connection_id<T: Into<String>>(self, v: T) -> Self
Sets the value of psc_connection_id.
§Example
let x = ConsumerPscConnection::new().set_psc_connection_id("example");Sourcepub fn set_error_type<T: Into<ConnectionErrorType>>(self, v: T) -> Self
👎Deprecated
pub fn set_error_type<T: Into<ConnectionErrorType>>(self, v: T) -> Self
Sets the value of error_type.
§Example
use google_cloud_networkconnectivity_v1::model::ConnectionErrorType;
let x0 = ConsumerPscConnection::new().set_error_type(ConnectionErrorType::ErrorInternal);
let x1 = ConsumerPscConnection::new().set_error_type(ConnectionErrorType::ErrorConsumerSide);
let x2 = ConsumerPscConnection::new().set_error_type(ConnectionErrorType::ErrorProducerSide);Sourcepub fn set_or_clear_error<T>(self, v: Option<T>) -> Self
👎Deprecated
pub fn set_or_clear_error<T>(self, v: Option<T>) -> Self
Sourcepub fn set_gce_operation<T: Into<String>>(self, v: T) -> Self
pub fn set_gce_operation<T: Into<String>>(self, v: T) -> Self
Sets the value of gce_operation.
§Example
let x = ConsumerPscConnection::new().set_gce_operation("example");Sourcepub fn set_forwarding_rule<T: Into<String>>(self, v: T) -> Self
pub fn set_forwarding_rule<T: Into<String>>(self, v: T) -> Self
Sets the value of forwarding_rule.
§Example
let x = ConsumerPscConnection::new().set_forwarding_rule("example");Sourcepub fn set_error_info<T>(self, v: T) -> Self
pub fn set_error_info<T>(self, v: T) -> Self
Sets the value of error_info.
§Example
use google_cloud_rpc::model::ErrorInfo;
let x = ConsumerPscConnection::new().set_error_info(ErrorInfo::default()/* use setters */);Sourcepub fn set_or_clear_error_info<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_error_info<T>(self, v: Option<T>) -> Self
Sets or clears the value of error_info.
§Example
use google_cloud_rpc::model::ErrorInfo;
let x = ConsumerPscConnection::new().set_or_clear_error_info(Some(ErrorInfo::default()/* use setters */));
let x = ConsumerPscConnection::new().set_or_clear_error_info(None::<ErrorInfo>);Sourcepub fn set_selected_subnetwork<T: Into<String>>(self, v: T) -> Self
pub fn set_selected_subnetwork<T: Into<String>>(self, v: T) -> Self
Sets the value of selected_subnetwork.
§Example
let x = ConsumerPscConnection::new().set_selected_subnetwork("example");Sourcepub fn set_producer_instance_id<T: Into<String>>(self, v: T) -> Self
👎Deprecated
pub fn set_producer_instance_id<T: Into<String>>(self, v: T) -> Self
Sets the value of producer_instance_id.
§Example
let x = ConsumerPscConnection::new().set_producer_instance_id("example");Sourcepub fn set_producer_instance_metadata<T, K, V>(self, v: T) -> Self
pub fn set_producer_instance_metadata<T, K, V>(self, v: T) -> Self
Sets the value of producer_instance_metadata.
§Example
let x = ConsumerPscConnection::new().set_producer_instance_metadata([
("key0", "abc"),
("key1", "xyz"),
]);Sourcepub fn set_ip_version<T>(self, v: T) -> Self
pub fn set_ip_version<T>(self, v: T) -> Self
Sets the value of ip_version.
§Example
use google_cloud_networkconnectivity_v1::model::IPVersion;
let x0 = ConsumerPscConnection::new().set_ip_version(IPVersion::Ipv4);
let x1 = ConsumerPscConnection::new().set_ip_version(IPVersion::Ipv6);Sourcepub fn set_or_clear_ip_version<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_ip_version<T>(self, v: Option<T>) -> Self
Sets or clears the value of ip_version.
§Example
use google_cloud_networkconnectivity_v1::model::IPVersion;
let x0 = ConsumerPscConnection::new().set_or_clear_ip_version(Some(IPVersion::Ipv4));
let x1 = ConsumerPscConnection::new().set_or_clear_ip_version(Some(IPVersion::Ipv6));
let x_none = ConsumerPscConnection::new().set_or_clear_ip_version(None::<IPVersion>);Trait Implementations§
Source§impl Clone for ConsumerPscConnection
impl Clone for ConsumerPscConnection
Source§fn clone(&self) -> ConsumerPscConnection
fn clone(&self) -> ConsumerPscConnection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more