#[non_exhaustive]pub struct Route {Show 16 fields
pub name: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub ip_cidr_range: String,
pub type: RouteType,
pub next_hop_vpc_network: Option<NextHopVpcNetwork>,
pub labels: HashMap<String, String>,
pub description: String,
pub uid: String,
pub state: State,
pub spoke: String,
pub location: String,
pub priority: i64,
pub next_hop_vpn_tunnel: Option<NextHopVPNTunnel>,
pub next_hop_router_appliance_instance: Option<NextHopRouterApplianceInstance>,
pub next_hop_interconnect_attachment: Option<NextHopInterconnectAttachment>,
/* private fields */
}Expand description
A route defines a path from VM instances within a spoke to a specific destination resource. Only VPC spokes have routes.
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 route. Route names must be unique. Route names
use the following form:
projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}
create_time: Option<Timestamp>Output only. The time the route was created.
update_time: Option<Timestamp>Output only. The time the route was last updated.
ip_cidr_range: StringThe destination IP address range.
type: RouteTypeOutput only. The route’s type. Its type is determined by the properties of its IP address range.
next_hop_vpc_network: Option<NextHopVpcNetwork>Immutable. The destination VPC network for packets on this route.
labels: HashMap<String, String>Optional labels in key-value pair format. For more information about labels, see Requirements for labels.
description: StringAn optional description of the route.
uid: StringOutput only. The Google-generated UUID for the route. This value is unique
across all Network Connectivity Center route resources. If a
route is deleted and another with the same name is created,
the new route is assigned a different uid.
state: StateOutput only. The current lifecycle state of the route.
spoke: StringImmutable. The spoke that this route leads to. Example: projects/12345/locations/global/spokes/SPOKE
location: StringOutput only. The origin location of the route. Uses the following form: “projects/{project}/locations/{location}” Example: projects/1234/locations/us-central1
priority: i64Output only. The priority of this route. Priority is used to break ties in cases where a destination matches more than one route. In these cases the route with the lowest-numbered priority value wins.
next_hop_vpn_tunnel: Option<NextHopVPNTunnel>Immutable. The next-hop VPN tunnel for packets on this route.
next_hop_router_appliance_instance: Option<NextHopRouterApplianceInstance>Immutable. The next-hop Router appliance instance for packets on this route.
next_hop_interconnect_attachment: Option<NextHopInterconnectAttachment>Immutable. The next-hop VLAN attachment for packets on this route.
Implementations§
Source§impl Route
impl Route
pub fn new() -> Self
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.
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.
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.
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.
Sourcepub fn set_ip_cidr_range<T: Into<String>>(self, v: T) -> Self
pub fn set_ip_cidr_range<T: Into<String>>(self, v: T) -> Self
Sets the value of ip_cidr_range.
Sourcepub fn set_next_hop_vpc_network<T>(self, v: T) -> Selfwhere
T: Into<NextHopVpcNetwork>,
pub fn set_next_hop_vpc_network<T>(self, v: T) -> Selfwhere
T: Into<NextHopVpcNetwork>,
Sets the value of next_hop_vpc_network.
Sourcepub fn set_or_clear_next_hop_vpc_network<T>(self, v: Option<T>) -> Selfwhere
T: Into<NextHopVpcNetwork>,
pub fn set_or_clear_next_hop_vpc_network<T>(self, v: Option<T>) -> Selfwhere
T: Into<NextHopVpcNetwork>,
Sets or clears the value of next_hop_vpc_network.
Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sets the value of labels.
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sets the value of description.
Sourcepub fn set_location<T: Into<String>>(self, v: T) -> Self
pub fn set_location<T: Into<String>>(self, v: T) -> Self
Sets the value of location.
Sourcepub fn set_priority<T: Into<i64>>(self, v: T) -> Self
pub fn set_priority<T: Into<i64>>(self, v: T) -> Self
Sets the value of priority.
Sourcepub fn set_next_hop_vpn_tunnel<T>(self, v: T) -> Selfwhere
T: Into<NextHopVPNTunnel>,
pub fn set_next_hop_vpn_tunnel<T>(self, v: T) -> Selfwhere
T: Into<NextHopVPNTunnel>,
Sets the value of next_hop_vpn_tunnel.
Sourcepub fn set_or_clear_next_hop_vpn_tunnel<T>(self, v: Option<T>) -> Selfwhere
T: Into<NextHopVPNTunnel>,
pub fn set_or_clear_next_hop_vpn_tunnel<T>(self, v: Option<T>) -> Selfwhere
T: Into<NextHopVPNTunnel>,
Sets or clears the value of next_hop_vpn_tunnel.
Sourcepub fn set_next_hop_router_appliance_instance<T>(self, v: T) -> Selfwhere
T: Into<NextHopRouterApplianceInstance>,
pub fn set_next_hop_router_appliance_instance<T>(self, v: T) -> Selfwhere
T: Into<NextHopRouterApplianceInstance>,
Sets the value of next_hop_router_appliance_instance.
Sourcepub fn set_or_clear_next_hop_router_appliance_instance<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<NextHopRouterApplianceInstance>,
pub fn set_or_clear_next_hop_router_appliance_instance<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<NextHopRouterApplianceInstance>,
Sets or clears the value of next_hop_router_appliance_instance.
Sourcepub fn set_next_hop_interconnect_attachment<T>(self, v: T) -> Selfwhere
T: Into<NextHopInterconnectAttachment>,
pub fn set_next_hop_interconnect_attachment<T>(self, v: T) -> Selfwhere
T: Into<NextHopInterconnectAttachment>,
Sets the value of next_hop_interconnect_attachment.
Sourcepub fn set_or_clear_next_hop_interconnect_attachment<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<NextHopInterconnectAttachment>,
pub fn set_or_clear_next_hop_interconnect_attachment<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<NextHopInterconnectAttachment>,
Sets or clears the value of next_hop_interconnect_attachment.