# Network Connectivity V1 API - Class Google::Cloud::NetworkConnectivity::V1::Route (v1.14.0)

1.14.0 (latest) 1.13.0 1.12.0 1.11.0 1.10.1 1.9.0 1.8.0 1.7.0 1.6.0 1.5.1 1.4.0 1.3.0 1.2.0 1.1.0 1.0.1 0.10.0 0.9.2 0.8.0 0.7.0 0.6.1 0.5.0 0.4.1 0.3.0 0.2.0 0.1.4 Reference documentation and code samples for the Network Connectivity V1 API class Google::Cloud::NetworkConnectivity::V1::Route.

A route defines a path from VM instances within a spoke to a specific
destination resource. Only VPC spokes have routes.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #create_time

    def create_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The time the route was created.

### #description

    def description() -> ::String

**Returns**

- (::String) --- An optional description of the route.

### #description=

    def description=(value) -> ::String

**Parameter**

- **value** (::String) --- An optional description of the route.
**Returns**

- (::String) --- An optional description of the route.

### #ip_cidr_range

    def ip_cidr_range() -> ::String

**Returns**

- (::String) --- The destination IP address range.

### #ip_cidr_range=

    def ip_cidr_range=(value) -> ::String

**Parameter**

- **value** (::String) --- The destination IP address range.
**Returns**

- (::String) --- The destination IP address range.

### #labels

    def labels() -> ::Google::Protobuf::Map{::String => ::String}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- Optional labels in key-value pair format. For more information about labels, see [Requirements for
  labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).

### #labels=

    def labels=(value) -> ::Google::Protobuf::Map{::String => ::String}

**Parameter**

- **value** (::Google::Protobuf::Map{::String =\> ::String}) --- Optional labels in key-value pair format. For more information about labels, see [Requirements for
  labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- Optional labels in key-value pair format. For more information about labels, see [Requirements for
  labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).

### #location

    def location() -> ::String

**Returns**

- (::String) --- Output only. The origin location of the route. Uses the following form: "projects/{project}/locations/{location}" Example: projects/1234/locations/us-central1

### #name

    def name() -> ::String

**Returns**

- (::String) --- Immutable. 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}`

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- Immutable. 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}`
**Returns**

- (::String) --- Immutable. 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}`

### #next_hop_interconnect_attachment

    def next_hop_interconnect_attachment() -> ::Google::Cloud::NetworkConnectivity::V1::NextHopInterconnectAttachment

**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::NextHopInterconnectAttachment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-NextHopInterconnectAttachment)) --- Immutable. The next-hop VLAN attachment for packets on this route.

### #next_hop_interconnect_attachment=

    def next_hop_interconnect_attachment=(value) -> ::Google::Cloud::NetworkConnectivity::V1::NextHopInterconnectAttachment

**Parameter**

- **value** ([::Google::Cloud::NetworkConnectivity::V1::NextHopInterconnectAttachment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-NextHopInterconnectAttachment)) --- Immutable. The next-hop VLAN attachment for packets on this route.
**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::NextHopInterconnectAttachment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-NextHopInterconnectAttachment)) --- Immutable. The next-hop VLAN attachment for packets on this route.

### #next_hop_router_appliance_instance

    def next_hop_router_appliance_instance() -> ::Google::Cloud::NetworkConnectivity::V1::NextHopRouterApplianceInstance

**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::NextHopRouterApplianceInstance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-NextHopRouterApplianceInstance)) --- Immutable. The next-hop Router appliance instance for packets on this route.

### #next_hop_router_appliance_instance=

    def next_hop_router_appliance_instance=(value) -> ::Google::Cloud::NetworkConnectivity::V1::NextHopRouterApplianceInstance

**Parameter**

- **value** ([::Google::Cloud::NetworkConnectivity::V1::NextHopRouterApplianceInstance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-NextHopRouterApplianceInstance)) --- Immutable. The next-hop Router appliance instance for packets on this route.
**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::NextHopRouterApplianceInstance](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-NextHopRouterApplianceInstance)) --- Immutable. The next-hop Router appliance instance for packets on this route.

### #next_hop_vpc_network

    def next_hop_vpc_network() -> ::Google::Cloud::NetworkConnectivity::V1::NextHopVpcNetwork

**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::NextHopVpcNetwork](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-NextHopVpcNetwork)) --- Immutable. The destination VPC network for packets on this route.

### #next_hop_vpc_network=

    def next_hop_vpc_network=(value) -> ::Google::Cloud::NetworkConnectivity::V1::NextHopVpcNetwork

**Parameter**

- **value** ([::Google::Cloud::NetworkConnectivity::V1::NextHopVpcNetwork](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-NextHopVpcNetwork)) --- Immutable. The destination VPC network for packets on this route.
**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::NextHopVpcNetwork](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-NextHopVpcNetwork)) --- Immutable. The destination VPC network for packets on this route.

### #next_hop_vpn_tunnel

    def next_hop_vpn_tunnel() -> ::Google::Cloud::NetworkConnectivity::V1::NextHopVPNTunnel

**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::NextHopVPNTunnel](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-NextHopVPNTunnel)) --- Immutable. The next-hop VPN tunnel for packets on this route.

### #next_hop_vpn_tunnel=

    def next_hop_vpn_tunnel=(value) -> ::Google::Cloud::NetworkConnectivity::V1::NextHopVPNTunnel

**Parameter**

- **value** ([::Google::Cloud::NetworkConnectivity::V1::NextHopVPNTunnel](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-NextHopVPNTunnel)) --- Immutable. The next-hop VPN tunnel for packets on this route.
**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::NextHopVPNTunnel](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-NextHopVPNTunnel)) --- Immutable. The next-hop VPN tunnel for packets on this route.

### #priority

    def priority() -> ::Integer

**Returns**

- (::Integer) --- Output 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.

### #spoke

    def spoke() -> ::String

**Returns**

- (::String) --- Immutable. The spoke that this route leads to. Example: projects/12345/locations/global/spokes/SPOKE

### #spoke=

    def spoke=(value) -> ::String

**Parameter**

- **value** (::String) --- Immutable. The spoke that this route leads to. Example: projects/12345/locations/global/spokes/SPOKE
**Returns**

- (::String) --- Immutable. The spoke that this route leads to. Example: projects/12345/locations/global/spokes/SPOKE

### #state

    def state() -> ::Google::Cloud::NetworkConnectivity::V1::State

**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-State)) --- Output only. The current lifecycle state of the route.

### #type

    def type() -> ::Google::Cloud::NetworkConnectivity::V1::RouteType

**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::RouteType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-RouteType)) --- Output only. The route's type. Its type is determined by the properties of its IP address range.

### #uid

    def uid() -> ::String

**Returns**

- (::String) --- Output 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`.

### #update_time

    def update_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The time the route was last updated.