#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NetworkConfig
impl Debug for NetworkConfig
Source§impl Default for NetworkConfig
impl Default for NetworkConfig
Source§fn default() -> NetworkConfig
fn default() -> NetworkConfig
Source§impl Message for NetworkConfig
impl Message for NetworkConfig
Source§impl PartialEq for NetworkConfig
impl PartialEq for NetworkConfig
impl StructuralPartialEq for NetworkConfig
Auto Trait Implementations§
impl Freeze for NetworkConfig
impl RefUnwindSafe for NetworkConfig
impl Send for NetworkConfig
impl Sync for NetworkConfig
impl Unpin for NetworkConfig
impl UnsafeUnpin for NetworkConfig
impl UnwindSafe for NetworkConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request