#[non_exhaustive]pub struct NetworkResourceConfig {
pub config: Option<Config>,
/* private fields */
}Expand description
Describes how a network resource should be initialized. Each network resource can either be imported from an existing Google Cloud resource or initialized when the cluster is created.
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.config: Option<Config>Particular type of configuration for this network resource.
Implementations§
Source§impl NetworkResourceConfig
impl NetworkResourceConfig
Sourcepub fn set_config<T: Into<Option<Config>>>(self, v: T) -> Self
pub fn set_config<T: Into<Option<Config>>>(self, v: T) -> Self
Sets the value of config.
Note that all the setters affecting config are mutually
exclusive.
§Example
use google_cloud_hypercomputecluster_v1::model::NewNetworkConfig;
let x = NetworkResourceConfig::new().set_config(Some(
google_cloud_hypercomputecluster_v1::model::network_resource_config::Config::NewNetwork(NewNetworkConfig::default().into())));Sourcepub fn new_network(&self) -> Option<&Box<NewNetworkConfig>>
pub fn new_network(&self) -> Option<&Box<NewNetworkConfig>>
The value of config
if it holds a NewNetwork, None if the field is not set or
holds a different branch.
Sourcepub fn set_new_network<T: Into<Box<NewNetworkConfig>>>(self, v: T) -> Self
pub fn set_new_network<T: Into<Box<NewNetworkConfig>>>(self, v: T) -> Self
Sets the value of config
to hold a NewNetwork.
Note that all the setters affecting config are
mutually exclusive.
§Example
use google_cloud_hypercomputecluster_v1::model::NewNetworkConfig;
let x = NetworkResourceConfig::new().set_new_network(NewNetworkConfig::default()/* use setters */);
assert!(x.new_network().is_some());
assert!(x.existing_network().is_none());Sourcepub fn existing_network(&self) -> Option<&Box<ExistingNetworkConfig>>
pub fn existing_network(&self) -> Option<&Box<ExistingNetworkConfig>>
The value of config
if it holds a ExistingNetwork, None if the field is not set or
holds a different branch.
Sourcepub fn set_existing_network<T: Into<Box<ExistingNetworkConfig>>>(
self,
v: T,
) -> Self
pub fn set_existing_network<T: Into<Box<ExistingNetworkConfig>>>( self, v: T, ) -> Self
Sets the value of config
to hold a ExistingNetwork.
Note that all the setters affecting config are
mutually exclusive.
§Example
use google_cloud_hypercomputecluster_v1::model::ExistingNetworkConfig;
let x = NetworkResourceConfig::new().set_existing_network(ExistingNetworkConfig::default()/* use setters */);
assert!(x.existing_network().is_some());
assert!(x.new_network().is_none());Trait Implementations§
Source§impl Clone for NetworkResourceConfig
impl Clone for NetworkResourceConfig
Source§fn clone(&self) -> NetworkResourceConfig
fn clone(&self) -> NetworkResourceConfig
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 NetworkResourceConfig
impl Debug for NetworkResourceConfig
Source§impl Default for NetworkResourceConfig
impl Default for NetworkResourceConfig
Source§fn default() -> NetworkResourceConfig
fn default() -> NetworkResourceConfig
Source§impl Message for NetworkResourceConfig
impl Message for NetworkResourceConfig
Source§impl PartialEq for NetworkResourceConfig
impl PartialEq for NetworkResourceConfig
impl StructuralPartialEq for NetworkResourceConfig
Auto Trait Implementations§
impl Freeze for NetworkResourceConfig
impl RefUnwindSafe for NetworkResourceConfig
impl Send for NetworkResourceConfig
impl Sync for NetworkResourceConfig
impl Unpin for NetworkResourceConfig
impl UnsafeUnpin for NetworkResourceConfig
impl UnwindSafe for NetworkResourceConfig
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