#[non_exhaustive]pub struct Hub {Show 13 fields
pub name: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub labels: HashMap<String, String>,
pub description: String,
pub unique_id: String,
pub state: State,
pub routing_vpcs: Vec<RoutingVPC>,
pub route_tables: Vec<String>,
pub spoke_summary: Option<SpokeSummary>,
pub policy_mode: PolicyMode,
pub preset_topology: PresetTopology,
pub export_psc: Option<bool>,
/* private fields */
}Expand description
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.
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.name: StringImmutable. 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: Option<Timestamp>Output only. The time the hub was created.
update_time: Option<Timestamp>Output only. The time the hub was last updated.
labels: HashMap<String, String>Optional labels in key-value pair format. For more information about labels, see Requirements for labels.
description: StringOptional. An optional description of the hub.
unique_id: StringOutput 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: StateOutput only. The current lifecycle state of this hub.
routing_vpcs: Vec<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.
route_tables: Vec<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.
spoke_summary: Option<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.
policy_mode: PolicyModeOptional. The policy mode of this hub. This field can be either PRESET or CUSTOM. If unspecified, the policy_mode defaults to PRESET.
preset_topology: PresetTopologyOptional. 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.
export_psc: Option<bool>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.
Implementations§
Source§impl Hub
impl Hub
pub fn new() -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = Hub::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = Hub::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Hub::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = Hub::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = Hub::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Hub::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_unique_id<T: Into<String>>(self, v: T) -> Self
pub fn set_unique_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_routing_vpcs<T, V>(self, v: T) -> Self
pub fn set_routing_vpcs<T, V>(self, v: T) -> Self
Sets the value of routing_vpcs.
§Example
use google_cloud_networkconnectivity_v1::model::RoutingVPC;
let x = Hub::new()
.set_routing_vpcs([
RoutingVPC::default()/* use setters */,
RoutingVPC::default()/* use (different) setters */,
]);Sourcepub fn set_route_tables<T, V>(self, v: T) -> Self
pub fn set_route_tables<T, V>(self, v: T) -> Self
Sourcepub fn set_spoke_summary<T>(self, v: T) -> Selfwhere
T: Into<SpokeSummary>,
pub fn set_spoke_summary<T>(self, v: T) -> Selfwhere
T: Into<SpokeSummary>,
Sets the value of spoke_summary.
§Example
use google_cloud_networkconnectivity_v1::model::SpokeSummary;
let x = Hub::new().set_spoke_summary(SpokeSummary::default()/* use setters */);Sourcepub fn set_or_clear_spoke_summary<T>(self, v: Option<T>) -> Selfwhere
T: Into<SpokeSummary>,
pub fn set_or_clear_spoke_summary<T>(self, v: Option<T>) -> Selfwhere
T: Into<SpokeSummary>,
Sets or clears the value of spoke_summary.
§Example
use google_cloud_networkconnectivity_v1::model::SpokeSummary;
let x = Hub::new().set_or_clear_spoke_summary(Some(SpokeSummary::default()/* use setters */));
let x = Hub::new().set_or_clear_spoke_summary(None::<SpokeSummary>);Sourcepub fn set_policy_mode<T: Into<PolicyMode>>(self, v: T) -> Self
pub fn set_policy_mode<T: Into<PolicyMode>>(self, v: T) -> Self
Sets the value of policy_mode.
§Example
use google_cloud_networkconnectivity_v1::model::PolicyMode;
let x0 = Hub::new().set_policy_mode(PolicyMode::Preset);Sourcepub fn set_preset_topology<T: Into<PresetTopology>>(self, v: T) -> Self
pub fn set_preset_topology<T: Into<PresetTopology>>(self, v: T) -> Self
Sets the value of preset_topology.
§Example
use google_cloud_networkconnectivity_v1::model::PresetTopology;
let x0 = Hub::new().set_preset_topology(PresetTopology::Mesh);
let x1 = Hub::new().set_preset_topology(PresetTopology::Star);Sourcepub fn set_export_psc<T>(self, v: T) -> Self
pub fn set_export_psc<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_export_psc<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_export_psc<T>(self, v: Option<T>) -> Self
Sets or clears the value of export_psc.
§Example
let x = Hub::new().set_or_clear_export_psc(Some(false));
let x = Hub::new().set_or_clear_export_psc(None::<bool>);