#[non_exhaustive]pub struct ResourceReference {
pub reference: Option<Reference>,
/* private fields */
}model-garden-service only.Expand description
Reference to a resource.
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.reference: Option<Reference>Implementations§
Source§impl ResourceReference
impl ResourceReference
pub fn new() -> Self
Sourcepub fn set_reference<T: Into<Option<Reference>>>(self, v: T) -> Self
pub fn set_reference<T: Into<Option<Reference>>>(self, v: T) -> Self
Sourcepub fn uri(&self) -> Option<&String>
pub fn uri(&self) -> Option<&String>
The value of reference
if it holds a Uri, None if the field is not set or
holds a different branch.
Sourcepub fn set_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_uri<T: Into<String>>(self, v: T) -> Self
Sets the value of reference
to hold a Uri.
Note that all the setters affecting reference are
mutually exclusive.
§Example
let x = ResourceReference::new().set_uri("example");
assert!(x.uri().is_some());
assert!(x.resource_name().is_none());
assert!(x.use_case().is_none());
assert!(x.description().is_none());Sourcepub fn resource_name(&self) -> Option<&String>
pub fn resource_name(&self) -> Option<&String>
The value of reference
if it holds a ResourceName, None if the field is not set or
holds a different branch.
Sourcepub fn set_resource_name<T: Into<String>>(self, v: T) -> Self
pub fn set_resource_name<T: Into<String>>(self, v: T) -> Self
Sets the value of reference
to hold a ResourceName.
Note that all the setters affecting reference are
mutually exclusive.
§Example
let x = ResourceReference::new().set_resource_name("example");
assert!(x.resource_name().is_some());
assert!(x.uri().is_none());
assert!(x.use_case().is_none());
assert!(x.description().is_none());Sourcepub fn use_case(&self) -> Option<&String>
👎Deprecated
pub fn use_case(&self) -> Option<&String>
The value of reference
if it holds a UseCase, None if the field is not set or
holds a different branch.
Sourcepub fn set_use_case<T: Into<String>>(self, v: T) -> Self
👎Deprecated
pub fn set_use_case<T: Into<String>>(self, v: T) -> Self
Sets the value of reference
to hold a UseCase.
Note that all the setters affecting reference are
mutually exclusive.
§Example
let x = ResourceReference::new().set_use_case("example");
assert!(x.use_case().is_some());
assert!(x.uri().is_none());
assert!(x.resource_name().is_none());
assert!(x.description().is_none());Sourcepub fn description(&self) -> Option<&String>
👎Deprecated
pub fn description(&self) -> Option<&String>
The value of reference
if it holds a Description, None if the field is not set or
holds a different branch.
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
👎Deprecated
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sets the value of reference
to hold a Description.
Note that all the setters affecting reference are
mutually exclusive.
§Example
let x = ResourceReference::new().set_description("example");
assert!(x.description().is_some());
assert!(x.uri().is_none());
assert!(x.resource_name().is_none());
assert!(x.use_case().is_none());Trait Implementations§
Source§impl Clone for ResourceReference
impl Clone for ResourceReference
Source§fn clone(&self) -> ResourceReference
fn clone(&self) -> ResourceReference
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more