#[non_exhaustive]pub struct NetworkConfig {
pub name: String,
pub id: String,
pub type: Type,
pub bandwidth: Bandwidth,
pub vlan_attachments: Vec<IntakeVlanAttachment>,
pub cidr: String,
pub service_cidr: ServiceCidr,
pub user_note: String,
pub gcp_service: String,
pub vlan_same_project: bool,
pub jumbo_frames_enabled: bool,
/* private fields */
}Expand description
Configuration parameters for a new network.
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: StringOutput only. The name of the network config.
id: StringA transient unique identifier to identify a volume within an ProvisioningConfig request.
type: TypeThe type of this network, either Client or Private.
bandwidth: BandwidthInterconnect bandwidth. Set only when type is CLIENT.
vlan_attachments: Vec<IntakeVlanAttachment>List of VLAN attachments. As of now there are always 2 attachments, but it is going to change in the future (multi vlan).
cidr: StringCIDR range of the network.
service_cidr: ServiceCidrService CIDR, if any.
user_note: StringUser note field, it can be used by customers to add additional information for the BMS Ops team .
gcp_service: StringThe GCP service of the network. Available gcp_service are in https://cloud.google.com/bare-metal/docs/bms-planning.
vlan_same_project: boolWhether the VLAN attachment pair is located in the same project.
jumbo_frames_enabled: boolThe JumboFramesEnabled option for customer to set.
Implementations§
Source§impl NetworkConfig
impl NetworkConfig
pub fn new() -> Self
Sourcepub fn set_bandwidth<T: Into<Bandwidth>>(self, v: T) -> Self
pub fn set_bandwidth<T: Into<Bandwidth>>(self, v: T) -> Self
Sets the value of bandwidth.
§Example
use google_cloud_baremetalsolution_v2::model::network_config::Bandwidth;
let x0 = NetworkConfig::new().set_bandwidth(Bandwidth::Bw1Gbps);
let x1 = NetworkConfig::new().set_bandwidth(Bandwidth::Bw2Gbps);
let x2 = NetworkConfig::new().set_bandwidth(Bandwidth::Bw5Gbps);Sourcepub fn set_vlan_attachments<T, V>(self, v: T) -> Self
pub fn set_vlan_attachments<T, V>(self, v: T) -> Self
Sets the value of vlan_attachments.
§Example
use google_cloud_baremetalsolution_v2::model::network_config::IntakeVlanAttachment;
let x = NetworkConfig::new()
.set_vlan_attachments([
IntakeVlanAttachment::default()/* use setters */,
IntakeVlanAttachment::default()/* use (different) setters */,
]);Sourcepub fn set_service_cidr<T: Into<ServiceCidr>>(self, v: T) -> Self
pub fn set_service_cidr<T: Into<ServiceCidr>>(self, v: T) -> Self
Sets the value of service_cidr.
§Example
use google_cloud_baremetalsolution_v2::model::network_config::ServiceCidr;
let x0 = NetworkConfig::new().set_service_cidr(ServiceCidr::Disabled);
let x1 = NetworkConfig::new().set_service_cidr(ServiceCidr::High26);
let x2 = NetworkConfig::new().set_service_cidr(ServiceCidr::High27);Sourcepub fn set_user_note<T: Into<String>>(self, v: T) -> Self
pub fn set_user_note<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_gcp_service<T: Into<String>>(self, v: T) -> Self
pub fn set_gcp_service<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_vlan_same_project<T: Into<bool>>(self, v: T) -> Self
pub fn set_vlan_same_project<T: Into<bool>>(self, v: T) -> Self
Sets the value of vlan_same_project.
§Example
let x = NetworkConfig::new().set_vlan_same_project(true);Sourcepub fn set_jumbo_frames_enabled<T: Into<bool>>(self, v: T) -> Self
pub fn set_jumbo_frames_enabled<T: Into<bool>>(self, v: T) -> Self
Sets the value of jumbo_frames_enabled.
§Example
let x = NetworkConfig::new().set_jumbo_frames_enabled(true);Trait Implementations§
Source§impl Clone for NetworkConfig
impl Clone for NetworkConfig
Source§fn clone(&self) -> NetworkConfig
fn clone(&self) -> NetworkConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more