Google Cloud Network Connectivity V1 Client - Class Hub (1.2.0)

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

A Network Connectivity Center hub is a collection of spokes. A single hub can contain spokes from multiple regions. However, if any of a hub's spokes use the data transfer feature, the resources associated with those spokes must all reside in the same VPC network. Spokes that do not use data transfer can be associated with any VPC network in your project.

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

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 hub. Hub names must be unique. They use the following form: projects/{project_number}/locations/global/hubs/{hub_id}

↳ create_time Google\Protobuf\Timestamp

Output only. The time the hub was created.

↳ update_time Google\Protobuf\Timestamp

Output only. The time the hub was last updated.

↳ labels array|Google\Protobuf\Internal\MapField

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

↳ description string

An optional description of the hub.

↳ unique_id string

Output only. The Google-generated UUID for the hub. This value is unique across all hub resources. If a hub is deleted and another with the same name is created, the new hub is assigned a different unique_id.

↳ state int

Output only. The current lifecycle state of this hub.

↳ routing_vpcs array<Google\Cloud\NetworkConnectivity\V1\RoutingVPC>

The VPC networks associated with this hub's spokes. This field is read-only. Network Connectivity Center automatically populates it based on the set of spokes attached to the hub.

getName

Immutable. The name of the hub. Hub names must be unique. They use the following form: projects/{project_number}/locations/global/hubs/{hub_id}

Returns
TypeDescription
string

setName

Immutable. The name of the hub. Hub names must be unique. They use the following form: projects/{project_number}/locations/global/hubs/{hub_id}

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCreateTime

Output only. The time the hub was created.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. The time the hub was created.

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

getUpdateTime

Output only. The time the hub was last updated.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. The time the hub was last updated.

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

getLabels

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

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setLabels

Optional labels in key:value 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 hub.

Returns
TypeDescription
string

setDescription

An optional description of the hub.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getUniqueId

Output only. The Google-generated UUID for the hub. This value is unique across all hub resources. If a hub is deleted and another with the same name is created, the new hub is assigned a different unique_id.

Returns
TypeDescription
string

setUniqueId

Output only. The Google-generated UUID for the hub. This value is unique across all hub resources. If a hub is deleted and another with the same name is created, the new hub is assigned a different unique_id.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getState

Output only. The current lifecycle state of this hub.

Returns
TypeDescription
int

setState

Output only. The current lifecycle state of this hub.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getRoutingVpcs

The VPC networks associated with this hub's spokes.

This field is read-only. Network Connectivity Center automatically populates it based on the set of spokes attached to the hub.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setRoutingVpcs

The VPC networks associated with this hub's spokes.

This field is read-only. Network Connectivity Center automatically populates it based on the set of spokes attached to the hub.

Parameter
NameDescription
var array<Google\Cloud\NetworkConnectivity\V1\RoutingVPC>
Returns
TypeDescription
$this