#[non_exhaustive]pub struct InstanceWithNamedPorts {
pub instance: Option<String>,
pub named_ports: Vec<NamedPort>,
pub status: Option<Status>,
/* private fields */
}Available on crate features
instance-groups or region-instance-groups only.Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.instance: Option<String>Output only. [Output Only] The URL of the instance.
named_ports: Vec<NamedPort>Output only. [Output Only] The named ports that belong to this instance group.
status: Option<Status>Output only. [Output Only] The status of the instance.
Implementations§
Source§impl InstanceWithNamedPorts
impl InstanceWithNamedPorts
pub fn new() -> Self
Sourcepub fn set_instance<T>(self, v: T) -> Self
pub fn set_instance<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_instance<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_instance<T>(self, v: Option<T>) -> Self
Sourcepub fn set_named_ports<T, V>(self, v: T) -> Self
pub fn set_named_ports<T, V>(self, v: T) -> Self
Sets the value of named_ports.
§Example
ⓘ
use google_cloud_compute_v1::model::NamedPort;
let x = InstanceWithNamedPorts::new()
.set_named_ports([
NamedPort::default()/* use setters */,
NamedPort::default()/* use (different) setters */,
]);Sourcepub fn set_status<T>(self, v: T) -> Self
pub fn set_status<T>(self, v: T) -> Self
Sets the value of status.
§Example
ⓘ
use google_cloud_compute_v1::model::instance_with_named_ports::Status;
let x0 = InstanceWithNamedPorts::new().set_status(Status::Pending);
let x1 = InstanceWithNamedPorts::new().set_status(Status::Provisioning);
let x2 = InstanceWithNamedPorts::new().set_status(Status::Repairing);Sourcepub fn set_or_clear_status<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_status<T>(self, v: Option<T>) -> Self
Sets or clears the value of status.
§Example
ⓘ
use google_cloud_compute_v1::model::instance_with_named_ports::Status;
let x0 = InstanceWithNamedPorts::new().set_or_clear_status(Some(Status::Pending));
let x1 = InstanceWithNamedPorts::new().set_or_clear_status(Some(Status::Provisioning));
let x2 = InstanceWithNamedPorts::new().set_or_clear_status(Some(Status::Repairing));
let x_none = InstanceWithNamedPorts::new().set_or_clear_status(None::<Status>);Trait Implementations§
Source§impl Clone for InstanceWithNamedPorts
impl Clone for InstanceWithNamedPorts
Source§fn clone(&self) -> InstanceWithNamedPorts
fn clone(&self) -> InstanceWithNamedPorts
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InstanceWithNamedPorts
impl Debug for InstanceWithNamedPorts
Source§impl Default for InstanceWithNamedPorts
impl Default for InstanceWithNamedPorts
Source§fn default() -> InstanceWithNamedPorts
fn default() -> InstanceWithNamedPorts
Returns the “default value” for a type. Read more
Source§impl Message for InstanceWithNamedPorts
impl Message for InstanceWithNamedPorts
Source§impl PartialEq for InstanceWithNamedPorts
impl PartialEq for InstanceWithNamedPorts
impl StructuralPartialEq for InstanceWithNamedPorts
Auto Trait Implementations§
impl Freeze for InstanceWithNamedPorts
impl RefUnwindSafe for InstanceWithNamedPorts
impl Send for InstanceWithNamedPorts
impl Sync for InstanceWithNamedPorts
impl Unpin for InstanceWithNamedPorts
impl UnwindSafe for InstanceWithNamedPorts
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
Mutably borrows from an owned value. Read more