Google Cloud Network Connectivity V1 Client - Class Route (1.5.0)

Reference documentation and code samples for the Google Cloud Network Connectivity V1 Client class Route.

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

Generated from protobuf message google.cloud.networkconnectivity.v1.Route

Namespace

Google \ Cloud \ NetworkConnectivity \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name 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}

↳ create_time Google\Protobuf\Timestamp

Output only. The time the route was created.

↳ update_time Google\Protobuf\Timestamp

Output only. The time the route was last updated.

↳ ip_cidr_range string

The destination IP address range.

↳ type int

Output only. The route's type. Its type is determined by the properties of its IP address range.

↳ next_hop_vpc_network Google\Cloud\NetworkConnectivity\V1\NextHopVpcNetwork

Immutable. The destination VPC network for packets on this route.

↳ labels array|Google\Protobuf\Internal\MapField

Optional labels in key-value pair format. For more information about labels, see Requirements for labels.

↳ description string

An optional description of the route.

↳ uid 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.

↳ state int

Output only. The current lifecycle state of the route.

↳ spoke string

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

↳ location string

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

getName

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
TypeDescription
string

setName

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}

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCreateTime

Output only. The time the route was created.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. The time the route was created.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getUpdateTime

Output only. The time the route was last updated.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. The time the route was last updated.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getIpCidrRange

The destination IP address range.

Returns
TypeDescription
string

setIpCidrRange

The destination IP address range.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getType

Output only. The route's type. Its type is determined by the properties of its IP address range.

Returns
TypeDescription
int

setType

Output only. The route's type. Its type is determined by the properties of its IP address range.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getNextHopVpcNetwork

Immutable. The destination VPC network for packets on this route.

Returns
TypeDescription
Google\Cloud\NetworkConnectivity\V1\NextHopVpcNetwork|null

hasNextHopVpcNetwork

clearNextHopVpcNetwork

setNextHopVpcNetwork

Immutable. The destination VPC network for packets on this route.

Parameter
NameDescription
var Google\Cloud\NetworkConnectivity\V1\NextHopVpcNetwork
Returns
TypeDescription
$this

getLabels

Optional labels in key-value pair format. For more information about labels, see Requirements for labels.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setLabels

Optional labels in key-value pair format. For more information about labels, see Requirements for labels.

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getDescription

An optional description of the route.

Returns
TypeDescription
string

setDescription

An optional description of the route.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getUid

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.

Returns
TypeDescription
string

setUid

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.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getState

Output only. The current lifecycle state of the route.

Returns
TypeDescription
int

setState

Output only. The current lifecycle state of the route.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getSpoke

Immutable. The spoke that this route leads to.

Example: projects/12345/locations/global/spokes/SPOKE

Returns
TypeDescription
string

setSpoke

Immutable. The spoke that this route leads to.

Example: projects/12345/locations/global/spokes/SPOKE

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getLocation

Output only. The location of the route.

Uses the following form: "projects/{project}/locations/{location}" Example: projects/1234/locations/us-central1

Returns
TypeDescription
string

setLocation

Output only. The location of the route.

Uses the following form: "projects/{project}/locations/{location}" Example: projects/1234/locations/us-central1

Parameter
NameDescription
var string
Returns
TypeDescription
$this