#[non_exhaustive]pub struct Route {Show 27 fields
pub as_paths: Vec<RouteAsPath>,
pub creation_timestamp: Option<String>,
pub description: Option<String>,
pub dest_range: Option<String>,
pub id: Option<u64>,
pub kind: Option<String>,
pub name: Option<String>,
pub network: Option<String>,
pub next_hop_gateway: Option<String>,
pub next_hop_hub: Option<String>,
pub next_hop_ilb: Option<String>,
pub next_hop_instance: Option<String>,
pub next_hop_inter_region_cost: Option<u32>,
pub next_hop_interconnect_attachment: Option<String>,
pub next_hop_ip: Option<String>,
pub next_hop_med: Option<u32>,
pub next_hop_network: Option<String>,
pub next_hop_origin: Option<NextHopOrigin>,
pub next_hop_peering: Option<String>,
pub next_hop_vpn_tunnel: Option<String>,
pub params: Option<RouteParams>,
pub priority: Option<u32>,
pub route_status: Option<RouteStatus>,
pub route_type: Option<RouteType>,
pub self_link: Option<String>,
pub tags: Vec<String>,
pub warnings: Vec<Warnings>,
/* private fields */
}routers or routes only.Expand description
Represents a Route resource.
A route defines a path from VM instances in the VPC network to a specific destination. This destination can be inside or outside the VPC network. For more information, read theRoutes overview.
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.as_paths: Vec<RouteAsPath>Output only. [Output Only] AS path.
creation_timestamp: Option<String>Output only. [Output Only] Creation timestamp inRFC3339 text format.
description: Option<String>An optional description of this resource. Provide this field when you create the resource.
dest_range: Option<String>The destination range of outgoing packets that this route applies to. Both IPv4 and IPv6 are supported. Must specify an IPv4 range (e.g. 192.0.2.0/24) or an IPv6 range in RFC 4291 format (e.g. 2001:db8::/32). IPv6 range will be displayed using RFC 5952 compressed format.
id: Option<u64>Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.
kind: Option<String>Output only. [Output Only] Type of this resource. Always compute#routes for Route resources.
name: Option<String>Name of the resource. Provided by the client when the resource is created.
The name must be 1-63 characters long, and comply withRFC1035.
Specifically, the name must be 1-63 characters long and match the regular
expression [a-z]([-a-z0-9]*[a-z0-9])?. The first character must be a
lowercase letter, and all following characters (except for the last
character) must be a dash, lowercase letter, or digit. The last character
must be a lowercase letter or digit.
network: Option<String>Fully-qualified URL of the network that this route applies to.
next_hop_gateway: Option<String>The URL to a gateway that should handle matching packets. You can only specify the internet gateway using a full or partial valid URL: projects/project/global/gateways/default-internet-gateway
next_hop_hub: Option<String>Output only. [Output Only] The full resource name of the Network Connectivity Center hub that will handle matching packets.
next_hop_ilb: Option<String>The URL to a forwarding rule of typeloadBalancingScheme=INTERNAL that should handle matching packets or the IP address of the forwarding Rule. For example, the following are all valid URLs:
- https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule- regions/region/forwardingRules/forwardingRule
If an IP address is provided, must specify an IPv4 address in dot-decimal notation or an IPv6 address in RFC 4291 format. For example, the following are all valid IP addresses:
- 10.128.0.56
- 2001:db8::2d9:51:0:0
- 2001:db8:0:0:2d9:51:0:0IPv6 addresses will be displayed using RFC 5952 compressed format (e.g. 2001:db8::2d9:51:0:0). Should never be an IPv4-mapped IPv6 address.
next_hop_instance: Option<String>The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example: https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/
next_hop_inter_region_cost: Option<u32>Output only. [Output only] Internal fixed region-to-region cost that Google Cloud calculates based on factors such as network performance, distance, and available bandwidth between regions.
next_hop_interconnect_attachment: Option<String>Output only. [Output Only] The URL to an InterconnectAttachment which is the next hop for the route. This field will only be populated for dynamic routes generated by Cloud Router with a linked interconnectAttachment or the static route generated by each L2 Interconnect Attachment.
next_hop_ip: Option<String>The network IP address of an instance that should handle matching packets. Both IPv6 address and IPv4 addresses are supported. Must specify an IPv4 address in dot-decimal notation (e.g. 192.0.2.99) or an IPv6 address in RFC 4291 format (e.g. 2001:db8::2d9:51:0:0 or 2001:db8:0:0:2d9:51:0:0). IPv6 addresses will be displayed using RFC 5952 compressed format (e.g. 2001:db8::2d9:51:0:0). Should never be an IPv4-mapped IPv6 address.
next_hop_med: Option<u32>Output only. [Output Only] Multi-Exit Discriminator, a BGP route metric that indicates the desirability of a particular route in a network.
next_hop_network: Option<String>The URL of the local network if it should handle matching packets.
next_hop_origin: Option<NextHopOrigin>Output only. [Output Only] Indicates the origin of the route. Can be IGP (Interior Gateway Protocol), EGP (Exterior Gateway Protocol), or INCOMPLETE.
next_hop_peering: Option<String>Output only. [Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.
next_hop_vpn_tunnel: Option<String>The URL to a VpnTunnel that should handle matching packets.
params: Option<RouteParams>Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload.
priority: Option<u32>The priority of this route. Priority is used to break ties in cases
where there is more than one matching route of equal prefix length. In
cases where multiple routes have equal prefix length, the one with the
lowest-numbered priority value wins. The default value is 1000. The
priority value must be from 0 to 65535, inclusive.
route_status: Option<RouteStatus>[Output only] The status of the route. This status applies to dynamic routes learned by Cloud Routers. It is also applicable to routes undergoing migration.
route_type: Option<RouteType>Output only. [Output Only] The type of this route, which can be one of the following values:
- ‘TRANSIT’ for a transit route that this router learned from another Cloud Router and will readvertise to one of its BGP peers
- ‘SUBNET’ for a route from a subnet of the VPC
- ‘BGP’ for a route learned from a BGP peer of this router
- ‘STATIC’ for a static route
self_link: Option<String>[Output Only] Server-defined fully-qualified URL for this resource.
A list of instance tags to which this route applies.
warnings: Vec<Warnings>Output only. [Output Only] If potential misconfigurations are detected for this route, this field will be populated with warning messages.
Implementations§
Source§impl Route
impl Route
pub fn new() -> Self
Sourcepub fn set_as_paths<T, V>(self, v: T) -> Self
pub fn set_as_paths<T, V>(self, v: T) -> Self
Sourcepub fn set_creation_timestamp<T>(self, v: T) -> Self
pub fn set_creation_timestamp<T>(self, v: T) -> Self
Sets the value of creation_timestamp.
§Example
let x = Route::new().set_creation_timestamp("example");Sourcepub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
Sets or clears the value of creation_timestamp.
§Example
let x = Route::new().set_or_clear_creation_timestamp(Some("example"));
let x = Route::new().set_or_clear_creation_timestamp(None::<String>);Sourcepub fn set_description<T>(self, v: T) -> Self
pub fn set_description<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
Sets or clears the value of description.
§Example
let x = Route::new().set_or_clear_description(Some("example"));
let x = Route::new().set_or_clear_description(None::<String>);Sourcepub fn set_dest_range<T>(self, v: T) -> Self
pub fn set_dest_range<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_dest_range<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_dest_range<T>(self, v: Option<T>) -> Self
Sets or clears the value of dest_range.
§Example
let x = Route::new().set_or_clear_dest_range(Some("example"));
let x = Route::new().set_or_clear_dest_range(None::<String>);Sourcepub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
Sourcepub fn set_network<T>(self, v: T) -> Self
pub fn set_network<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_network<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_network<T>(self, v: Option<T>) -> Self
Sourcepub fn set_next_hop_gateway<T>(self, v: T) -> Self
pub fn set_next_hop_gateway<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_next_hop_gateway<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_next_hop_gateway<T>(self, v: Option<T>) -> Self
Sets or clears the value of next_hop_gateway.
§Example
let x = Route::new().set_or_clear_next_hop_gateway(Some("example"));
let x = Route::new().set_or_clear_next_hop_gateway(None::<String>);Sourcepub fn set_next_hop_hub<T>(self, v: T) -> Self
pub fn set_next_hop_hub<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_next_hop_hub<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_next_hop_hub<T>(self, v: Option<T>) -> Self
Sets or clears the value of next_hop_hub.
§Example
let x = Route::new().set_or_clear_next_hop_hub(Some("example"));
let x = Route::new().set_or_clear_next_hop_hub(None::<String>);Sourcepub fn set_next_hop_ilb<T>(self, v: T) -> Self
pub fn set_next_hop_ilb<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_next_hop_ilb<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_next_hop_ilb<T>(self, v: Option<T>) -> Self
Sets or clears the value of next_hop_ilb.
§Example
let x = Route::new().set_or_clear_next_hop_ilb(Some("example"));
let x = Route::new().set_or_clear_next_hop_ilb(None::<String>);Sourcepub fn set_next_hop_instance<T>(self, v: T) -> Self
pub fn set_next_hop_instance<T>(self, v: T) -> Self
Sets the value of next_hop_instance.
§Example
let x = Route::new().set_next_hop_instance("example");Sourcepub fn set_or_clear_next_hop_instance<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_next_hop_instance<T>(self, v: Option<T>) -> Self
Sets or clears the value of next_hop_instance.
§Example
let x = Route::new().set_or_clear_next_hop_instance(Some("example"));
let x = Route::new().set_or_clear_next_hop_instance(None::<String>);Sourcepub fn set_next_hop_inter_region_cost<T>(self, v: T) -> Self
pub fn set_next_hop_inter_region_cost<T>(self, v: T) -> Self
Sets the value of next_hop_inter_region_cost.
§Example
let x = Route::new().set_next_hop_inter_region_cost(42_u32);Sourcepub fn set_or_clear_next_hop_inter_region_cost<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_next_hop_inter_region_cost<T>(self, v: Option<T>) -> Self
Sets or clears the value of next_hop_inter_region_cost.
§Example
let x = Route::new().set_or_clear_next_hop_inter_region_cost(Some(42_u32));
let x = Route::new().set_or_clear_next_hop_inter_region_cost(None::<u32>);Sourcepub fn set_next_hop_interconnect_attachment<T>(self, v: T) -> Self
pub fn set_next_hop_interconnect_attachment<T>(self, v: T) -> Self
Sets the value of next_hop_interconnect_attachment.
§Example
let x = Route::new().set_next_hop_interconnect_attachment("example");Sourcepub fn set_or_clear_next_hop_interconnect_attachment<T>(
self,
v: Option<T>,
) -> Self
pub fn set_or_clear_next_hop_interconnect_attachment<T>( self, v: Option<T>, ) -> Self
Sets or clears the value of next_hop_interconnect_attachment.
§Example
let x = Route::new().set_or_clear_next_hop_interconnect_attachment(Some("example"));
let x = Route::new().set_or_clear_next_hop_interconnect_attachment(None::<String>);Sourcepub fn set_next_hop_ip<T>(self, v: T) -> Self
pub fn set_next_hop_ip<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_next_hop_ip<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_next_hop_ip<T>(self, v: Option<T>) -> Self
Sets or clears the value of next_hop_ip.
§Example
let x = Route::new().set_or_clear_next_hop_ip(Some("example"));
let x = Route::new().set_or_clear_next_hop_ip(None::<String>);Sourcepub fn set_next_hop_med<T>(self, v: T) -> Self
pub fn set_next_hop_med<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_next_hop_med<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_next_hop_med<T>(self, v: Option<T>) -> Self
Sets or clears the value of next_hop_med.
§Example
let x = Route::new().set_or_clear_next_hop_med(Some(42_u32));
let x = Route::new().set_or_clear_next_hop_med(None::<u32>);Sourcepub fn set_next_hop_network<T>(self, v: T) -> Self
pub fn set_next_hop_network<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_next_hop_network<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_next_hop_network<T>(self, v: Option<T>) -> Self
Sets or clears the value of next_hop_network.
§Example
let x = Route::new().set_or_clear_next_hop_network(Some("example"));
let x = Route::new().set_or_clear_next_hop_network(None::<String>);Sourcepub fn set_next_hop_origin<T>(self, v: T) -> Selfwhere
T: Into<NextHopOrigin>,
pub fn set_next_hop_origin<T>(self, v: T) -> Selfwhere
T: Into<NextHopOrigin>,
Sets the value of next_hop_origin.
§Example
use google_cloud_compute_v1::model::route::NextHopOrigin;
let x0 = Route::new().set_next_hop_origin(NextHopOrigin::Igp);
let x1 = Route::new().set_next_hop_origin(NextHopOrigin::Incomplete);Sourcepub fn set_or_clear_next_hop_origin<T>(self, v: Option<T>) -> Selfwhere
T: Into<NextHopOrigin>,
pub fn set_or_clear_next_hop_origin<T>(self, v: Option<T>) -> Selfwhere
T: Into<NextHopOrigin>,
Sets or clears the value of next_hop_origin.
§Example
use google_cloud_compute_v1::model::route::NextHopOrigin;
let x0 = Route::new().set_or_clear_next_hop_origin(Some(NextHopOrigin::Igp));
let x1 = Route::new().set_or_clear_next_hop_origin(Some(NextHopOrigin::Incomplete));
let x_none = Route::new().set_or_clear_next_hop_origin(None::<NextHopOrigin>);Sourcepub fn set_next_hop_peering<T>(self, v: T) -> Self
pub fn set_next_hop_peering<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_next_hop_peering<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_next_hop_peering<T>(self, v: Option<T>) -> Self
Sets or clears the value of next_hop_peering.
§Example
let x = Route::new().set_or_clear_next_hop_peering(Some("example"));
let x = Route::new().set_or_clear_next_hop_peering(None::<String>);Sourcepub fn set_next_hop_vpn_tunnel<T>(self, v: T) -> Self
pub fn set_next_hop_vpn_tunnel<T>(self, v: T) -> Self
Sets the value of next_hop_vpn_tunnel.
§Example
let x = Route::new().set_next_hop_vpn_tunnel("example");Sourcepub fn set_or_clear_next_hop_vpn_tunnel<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_next_hop_vpn_tunnel<T>(self, v: Option<T>) -> Self
Sets or clears the value of next_hop_vpn_tunnel.
§Example
let x = Route::new().set_or_clear_next_hop_vpn_tunnel(Some("example"));
let x = Route::new().set_or_clear_next_hop_vpn_tunnel(None::<String>);Sourcepub fn set_params<T>(self, v: T) -> Selfwhere
T: Into<RouteParams>,
pub fn set_params<T>(self, v: T) -> Selfwhere
T: Into<RouteParams>,
Sourcepub fn set_or_clear_params<T>(self, v: Option<T>) -> Selfwhere
T: Into<RouteParams>,
pub fn set_or_clear_params<T>(self, v: Option<T>) -> Selfwhere
T: Into<RouteParams>,
Sourcepub fn set_priority<T>(self, v: T) -> Self
pub fn set_priority<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_priority<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_priority<T>(self, v: Option<T>) -> Self
Sourcepub fn set_route_status<T>(self, v: T) -> Selfwhere
T: Into<RouteStatus>,
pub fn set_route_status<T>(self, v: T) -> Selfwhere
T: Into<RouteStatus>,
Sets the value of route_status.
§Example
use google_cloud_compute_v1::model::route::RouteStatus;
let x0 = Route::new().set_route_status(RouteStatus::Dropped);
let x1 = Route::new().set_route_status(RouteStatus::Inactive);
let x2 = Route::new().set_route_status(RouteStatus::Pending);Sourcepub fn set_or_clear_route_status<T>(self, v: Option<T>) -> Selfwhere
T: Into<RouteStatus>,
pub fn set_or_clear_route_status<T>(self, v: Option<T>) -> Selfwhere
T: Into<RouteStatus>,
Sets or clears the value of route_status.
§Example
use google_cloud_compute_v1::model::route::RouteStatus;
let x0 = Route::new().set_or_clear_route_status(Some(RouteStatus::Dropped));
let x1 = Route::new().set_or_clear_route_status(Some(RouteStatus::Inactive));
let x2 = Route::new().set_or_clear_route_status(Some(RouteStatus::Pending));
let x_none = Route::new().set_or_clear_route_status(None::<RouteStatus>);Sourcepub fn set_route_type<T>(self, v: T) -> Self
pub fn set_route_type<T>(self, v: T) -> Self
Sets the value of route_type.
§Example
use google_cloud_compute_v1::model::route::RouteType;
let x0 = Route::new().set_route_type(RouteType::Static);
let x1 = Route::new().set_route_type(RouteType::Subnet);
let x2 = Route::new().set_route_type(RouteType::Transit);Sourcepub fn set_or_clear_route_type<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_route_type<T>(self, v: Option<T>) -> Self
Sets or clears the value of route_type.
§Example
use google_cloud_compute_v1::model::route::RouteType;
let x0 = Route::new().set_or_clear_route_type(Some(RouteType::Static));
let x1 = Route::new().set_or_clear_route_type(Some(RouteType::Subnet));
let x2 = Route::new().set_or_clear_route_type(Some(RouteType::Transit));
let x_none = Route::new().set_or_clear_route_type(None::<RouteType>);