#[non_exhaustive]pub struct NetworkResource {
pub config: Option<NetworkResourceConfig>,
pub reference: Option<Reference>,
/* private fields */
}Expand description
A resource representing a network that connects the various components of a cluster together.
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<NetworkResourceConfig>Immutable. Configuration for this network resource, which describes how it should be created or imported. This field only controls how the network resource is initially created or imported. Subsequent changes to the network resource should be made via the resource’s API and will not be reflected in the configuration.
reference: Option<Reference>Reference to the network resource in Google Cloud. Exactly one of these fields will be populated based on the configured type of network resource.
Implementations§
Source§impl NetworkResource
impl NetworkResource
Sourcepub fn set_config<T>(self, v: T) -> Selfwhere
T: Into<NetworkResourceConfig>,
pub fn set_config<T>(self, v: T) -> Selfwhere
T: Into<NetworkResourceConfig>,
Sourcepub fn set_or_clear_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkResourceConfig>,
pub fn set_or_clear_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkResourceConfig>,
Sets or clears the value of config.
§Example
use google_cloud_hypercomputecluster_v1::model::NetworkResourceConfig;
let x = NetworkResource::new().set_or_clear_config(Some(NetworkResourceConfig::default()/* use setters */));
let x = NetworkResource::new().set_or_clear_config(None::<NetworkResourceConfig>);Sourcepub fn set_reference<T: Into<Option<Reference>>>(self, v: T) -> Self
pub fn set_reference<T: Into<Option<Reference>>>(self, v: T) -> Self
Sets the value of reference.
Note that all the setters affecting reference are mutually
exclusive.
§Example
use google_cloud_hypercomputecluster_v1::model::NetworkReference;
let x = NetworkResource::new().set_reference(Some(
google_cloud_hypercomputecluster_v1::model::network_resource::Reference::Network(NetworkReference::default().into())));Sourcepub fn network(&self) -> Option<&Box<NetworkReference>>
pub fn network(&self) -> Option<&Box<NetworkReference>>
The value of reference
if it holds a Network, None if the field is not set or
holds a different branch.
Sourcepub fn set_network<T: Into<Box<NetworkReference>>>(self, v: T) -> Self
pub fn set_network<T: Into<Box<NetworkReference>>>(self, v: T) -> Self
Sets the value of reference
to hold a Network.
Note that all the setters affecting reference are
mutually exclusive.
§Example
use google_cloud_hypercomputecluster_v1::model::NetworkReference;
let x = NetworkResource::new().set_network(NetworkReference::default()/* use setters */);
assert!(x.network().is_some());Trait Implementations§
Source§impl Clone for NetworkResource
impl Clone for NetworkResource
Source§impl Debug for NetworkResource
impl Debug for NetworkResource
Source§impl Default for NetworkResource
impl Default for NetworkResource
Source§impl Message for NetworkResource
impl Message for NetworkResource
Source§impl PartialEq for NetworkResource
impl PartialEq for NetworkResource
impl StructuralPartialEq for NetworkResource
Auto Trait Implementations§
impl Freeze for NetworkResource
impl RefUnwindSafe for NetworkResource
impl Send for NetworkResource
impl Sync for NetworkResource
impl Unpin for NetworkResource
impl UnsafeUnpin for NetworkResource
impl UnwindSafe for NetworkResource
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