#[non_exhaustive]pub struct Spoke {Show 18 fields
pub name: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub labels: HashMap<String, String>,
pub description: String,
pub hub: String,
pub group: String,
pub linked_vpn_tunnels: Option<LinkedVpnTunnels>,
pub linked_interconnect_attachments: Option<LinkedInterconnectAttachments>,
pub linked_router_appliance_instances: Option<LinkedRouterApplianceInstances>,
pub linked_vpc_network: Option<LinkedVpcNetwork>,
pub linked_producer_vpc_network: Option<LinkedProducerVpcNetwork>,
pub unique_id: String,
pub state: State,
pub reasons: Vec<StateReason>,
pub spoke_type: SpokeType,
pub etag: String,
pub field_paths_pending_update: Vec<String>,
/* private fields */
}Expand description
A Network Connectivity Center spoke represents one or more network connectivity resources.
When you create a spoke, you associate it with a hub. You must also identify a value for exactly one of the following fields:
- linked_vpn_tunnels
- linked_interconnect_attachments
- linked_router_appliance_instances
- linked_vpc_network
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.name: StringImmutable. The name of the spoke. Spoke names must be unique. They use the
following form:
projects/{project_number}/locations/{region}/spokes/{spoke_id}
create_time: Option<Timestamp>Output only. The time the spoke was created.
update_time: Option<Timestamp>Output only. The time the spoke was last updated.
labels: HashMap<String, String>Optional labels in key-value pair format. For more information about labels, see Requirements for labels.
description: StringOptional. An optional description of the spoke.
hub: StringImmutable. The name of the hub that this spoke is attached to.
group: StringOptional. The name of the group that this spoke is associated with.
linked_vpn_tunnels: Option<LinkedVpnTunnels>Optional. VPN tunnels that are associated with the spoke.
linked_interconnect_attachments: Option<LinkedInterconnectAttachments>Optional. VLAN attachments that are associated with the spoke.
linked_router_appliance_instances: Option<LinkedRouterApplianceInstances>Optional. Router appliance instances that are associated with the spoke.
linked_vpc_network: Option<LinkedVpcNetwork>Optional. VPC network that is associated with the spoke.
linked_producer_vpc_network: Option<LinkedProducerVpcNetwork>Optional. The linked producer VPC that is associated with the spoke.
unique_id: StringOutput only. The Google-generated UUID for the spoke. This value is unique
across all spoke resources. If a spoke is deleted and another with the same
name is created, the new spoke is assigned a different unique_id.
state: StateOutput only. The current lifecycle state of this spoke.
reasons: Vec<StateReason>Output only. The reasons for current state of the spoke.
spoke_type: SpokeTypeOutput only. The type of resource associated with the spoke.
etag: StringOptional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
field_paths_pending_update: Vec<String>Optional. The list of fields waiting for hub administration’s approval.
Implementations§
Source§impl Spoke
impl Spoke
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = Spoke::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = Spoke::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Spoke::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = Spoke::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = Spoke::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Spoke::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_linked_vpn_tunnels<T>(self, v: T) -> Selfwhere
T: Into<LinkedVpnTunnels>,
pub fn set_linked_vpn_tunnels<T>(self, v: T) -> Selfwhere
T: Into<LinkedVpnTunnels>,
Sets the value of linked_vpn_tunnels.
§Example
use google_cloud_networkconnectivity_v1::model::LinkedVpnTunnels;
let x = Spoke::new().set_linked_vpn_tunnels(LinkedVpnTunnels::default()/* use setters */);Sourcepub fn set_or_clear_linked_vpn_tunnels<T>(self, v: Option<T>) -> Selfwhere
T: Into<LinkedVpnTunnels>,
pub fn set_or_clear_linked_vpn_tunnels<T>(self, v: Option<T>) -> Selfwhere
T: Into<LinkedVpnTunnels>,
Sets or clears the value of linked_vpn_tunnels.
§Example
use google_cloud_networkconnectivity_v1::model::LinkedVpnTunnels;
let x = Spoke::new().set_or_clear_linked_vpn_tunnels(Some(LinkedVpnTunnels::default()/* use setters */));
let x = Spoke::new().set_or_clear_linked_vpn_tunnels(None::<LinkedVpnTunnels>);Sourcepub fn set_linked_interconnect_attachments<T>(self, v: T) -> Selfwhere
T: Into<LinkedInterconnectAttachments>,
pub fn set_linked_interconnect_attachments<T>(self, v: T) -> Selfwhere
T: Into<LinkedInterconnectAttachments>,
Sets the value of linked_interconnect_attachments.
§Example
use google_cloud_networkconnectivity_v1::model::LinkedInterconnectAttachments;
let x = Spoke::new().set_linked_interconnect_attachments(LinkedInterconnectAttachments::default()/* use setters */);Sourcepub fn set_or_clear_linked_interconnect_attachments<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<LinkedInterconnectAttachments>,
pub fn set_or_clear_linked_interconnect_attachments<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<LinkedInterconnectAttachments>,
Sets or clears the value of linked_interconnect_attachments.
§Example
use google_cloud_networkconnectivity_v1::model::LinkedInterconnectAttachments;
let x = Spoke::new().set_or_clear_linked_interconnect_attachments(Some(LinkedInterconnectAttachments::default()/* use setters */));
let x = Spoke::new().set_or_clear_linked_interconnect_attachments(None::<LinkedInterconnectAttachments>);Sourcepub fn set_linked_router_appliance_instances<T>(self, v: T) -> Selfwhere
T: Into<LinkedRouterApplianceInstances>,
pub fn set_linked_router_appliance_instances<T>(self, v: T) -> Selfwhere
T: Into<LinkedRouterApplianceInstances>,
Sets the value of linked_router_appliance_instances.
§Example
use google_cloud_networkconnectivity_v1::model::LinkedRouterApplianceInstances;
let x = Spoke::new().set_linked_router_appliance_instances(LinkedRouterApplianceInstances::default()/* use setters */);Sourcepub fn set_or_clear_linked_router_appliance_instances<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<LinkedRouterApplianceInstances>,
pub fn set_or_clear_linked_router_appliance_instances<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<LinkedRouterApplianceInstances>,
Sets or clears the value of linked_router_appliance_instances.
§Example
use google_cloud_networkconnectivity_v1::model::LinkedRouterApplianceInstances;
let x = Spoke::new().set_or_clear_linked_router_appliance_instances(Some(LinkedRouterApplianceInstances::default()/* use setters */));
let x = Spoke::new().set_or_clear_linked_router_appliance_instances(None::<LinkedRouterApplianceInstances>);Sourcepub fn set_linked_vpc_network<T>(self, v: T) -> Selfwhere
T: Into<LinkedVpcNetwork>,
pub fn set_linked_vpc_network<T>(self, v: T) -> Selfwhere
T: Into<LinkedVpcNetwork>,
Sets the value of linked_vpc_network.
§Example
use google_cloud_networkconnectivity_v1::model::LinkedVpcNetwork;
let x = Spoke::new().set_linked_vpc_network(LinkedVpcNetwork::default()/* use setters */);Sourcepub fn set_or_clear_linked_vpc_network<T>(self, v: Option<T>) -> Selfwhere
T: Into<LinkedVpcNetwork>,
pub fn set_or_clear_linked_vpc_network<T>(self, v: Option<T>) -> Selfwhere
T: Into<LinkedVpcNetwork>,
Sets or clears the value of linked_vpc_network.
§Example
use google_cloud_networkconnectivity_v1::model::LinkedVpcNetwork;
let x = Spoke::new().set_or_clear_linked_vpc_network(Some(LinkedVpcNetwork::default()/* use setters */));
let x = Spoke::new().set_or_clear_linked_vpc_network(None::<LinkedVpcNetwork>);Sourcepub fn set_linked_producer_vpc_network<T>(self, v: T) -> Selfwhere
T: Into<LinkedProducerVpcNetwork>,
pub fn set_linked_producer_vpc_network<T>(self, v: T) -> Selfwhere
T: Into<LinkedProducerVpcNetwork>,
Sets the value of linked_producer_vpc_network.
§Example
use google_cloud_networkconnectivity_v1::model::LinkedProducerVpcNetwork;
let x = Spoke::new().set_linked_producer_vpc_network(LinkedProducerVpcNetwork::default()/* use setters */);Sourcepub fn set_or_clear_linked_producer_vpc_network<T>(self, v: Option<T>) -> Selfwhere
T: Into<LinkedProducerVpcNetwork>,
pub fn set_or_clear_linked_producer_vpc_network<T>(self, v: Option<T>) -> Selfwhere
T: Into<LinkedProducerVpcNetwork>,
Sets or clears the value of linked_producer_vpc_network.
§Example
use google_cloud_networkconnectivity_v1::model::LinkedProducerVpcNetwork;
let x = Spoke::new().set_or_clear_linked_producer_vpc_network(Some(LinkedProducerVpcNetwork::default()/* use setters */));
let x = Spoke::new().set_or_clear_linked_producer_vpc_network(None::<LinkedProducerVpcNetwork>);Sourcepub fn set_unique_id<T: Into<String>>(self, v: T) -> Self
pub fn set_unique_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_reasons<T, V>(self, v: T) -> Self
pub fn set_reasons<T, V>(self, v: T) -> Self
Sourcepub fn set_spoke_type<T: Into<SpokeType>>(self, v: T) -> Self
pub fn set_spoke_type<T: Into<SpokeType>>(self, v: T) -> Self
Sets the value of spoke_type.
§Example
use google_cloud_networkconnectivity_v1::model::SpokeType;
let x0 = Spoke::new().set_spoke_type(SpokeType::VpnTunnel);
let x1 = Spoke::new().set_spoke_type(SpokeType::InterconnectAttachment);
let x2 = Spoke::new().set_spoke_type(SpokeType::RouterAppliance);Sourcepub fn set_field_paths_pending_update<T, V>(self, v: T) -> Self
pub fn set_field_paths_pending_update<T, V>(self, v: T) -> Self
Sets the value of field_paths_pending_update.
§Example
let x = Spoke::new().set_field_paths_pending_update(["a", "b", "c"]);