# Network Connectivity V1 API - Class Google::Cloud::NetworkConnectivity::V1::Hub (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::Hub.

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

## 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 hub was created.

### #description

    def description() -> ::String

**Returns**

- (::String) --- Optional. An optional description of the hub.

### #description=

    def description=(value) -> ::String

**Parameter**

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

- (::String) --- Optional. An optional description of the hub.

### #export_psc

    def export_psc() -> ::Boolean

**Returns**

- (::Boolean) --- Optional. Whether Private Service Connect connection propagation is enabled for the hub. If true, Private Service Connect endpoints in VPC spokes attached to the hub are made accessible to other VPC spokes attached to the hub. The default value is false.

### #export_psc=

    def export_psc=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- Optional. Whether Private Service Connect connection propagation is enabled for the hub. If true, Private Service Connect endpoints in VPC spokes attached to the hub are made accessible to other VPC spokes attached to the hub. The default value is false.
**Returns**

- (::Boolean) --- Optional. Whether Private Service Connect connection propagation is enabled for the hub. If true, Private Service Connect endpoints in VPC spokes attached to the hub are made accessible to other VPC spokes attached to the hub. The default value is false.

### #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).

### #name

    def name() -> ::String

**Returns**

- (::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}`

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::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}`
**Returns**

- (::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}`

### #policy_mode

    def policy_mode() -> ::Google::Cloud::NetworkConnectivity::V1::PolicyMode

**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::PolicyMode](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-PolicyMode)) --- Optional. The policy mode of this hub. This field can be either PRESET or CUSTOM. If unspecified, the policy_mode defaults to PRESET.

### #policy_mode=

    def policy_mode=(value) -> ::Google::Cloud::NetworkConnectivity::V1::PolicyMode

**Parameter**

- **value** ([::Google::Cloud::NetworkConnectivity::V1::PolicyMode](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-PolicyMode)) --- Optional. The policy mode of this hub. This field can be either PRESET or CUSTOM. If unspecified, the policy_mode defaults to PRESET.
**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::PolicyMode](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-PolicyMode)) --- Optional. The policy mode of this hub. This field can be either PRESET or CUSTOM. If unspecified, the policy_mode defaults to PRESET.

### #preset_topology

    def preset_topology() -> ::Google::Cloud::NetworkConnectivity::V1::PresetTopology

**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::PresetTopology](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-PresetTopology)) --- Optional. The topology implemented in this hub. Currently, this field is only used when policy_mode = PRESET. The available preset topologies are MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET, the preset_topology defaults to MESH. When policy_mode = CUSTOM, the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED.

### #preset_topology=

    def preset_topology=(value) -> ::Google::Cloud::NetworkConnectivity::V1::PresetTopology

**Parameter**

- **value** ([::Google::Cloud::NetworkConnectivity::V1::PresetTopology](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-PresetTopology)) --- Optional. The topology implemented in this hub. Currently, this field is only used when policy_mode = PRESET. The available preset topologies are MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET, the preset_topology defaults to MESH. When policy_mode = CUSTOM, the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED.
**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::PresetTopology](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-PresetTopology)) --- Optional. The topology implemented in this hub. Currently, this field is only used when policy_mode = PRESET. The available preset topologies are MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET, the preset_topology defaults to MESH. When policy_mode = CUSTOM, the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED.

### #route_tables

    def route_tables() -> ::Array<::String>

**Returns**

- (::Array\<::String\>) --- Output only. The route tables that belong to this hub. They use the following form: `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}`


  This field is read-only. Network Connectivity Center automatically
  populates it based on the route tables nested under the hub.

### #routing_vpcs

    def routing_vpcs() -> ::Array<::Google::Cloud::NetworkConnectivity::V1::RoutingVPC>

**Returns**

- (::Array\<[::Google::Cloud::NetworkConnectivity::V1::RoutingVPC](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/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.

### #routing_vpcs=

    def routing_vpcs=(value) -> ::Array<::Google::Cloud::NetworkConnectivity::V1::RoutingVPC>

**Parameter**

- **value** (::Array\<[::Google::Cloud::NetworkConnectivity::V1::RoutingVPC](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/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.
**Returns**

- (::Array\<[::Google::Cloud::NetworkConnectivity::V1::RoutingVPC](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/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.

### #spoke_summary

    def spoke_summary() -> ::Google::Cloud::NetworkConnectivity::V1::SpokeSummary

**Returns**

- ([::Google::Cloud::NetworkConnectivity::V1::SpokeSummary](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1/latest/Google-Cloud-NetworkConnectivity-V1-SpokeSummary)) --- Output only. A summary of the spokes associated with a hub. The summary includes a count of spokes according to type and according to state. If any spokes are inactive, the summary also lists the reasons they are inactive, including a count for each reason.

### #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 this hub.

### #unique_id

    def unique_id() -> ::String

**Returns**

- (::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.

### #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 hub was last updated.