#[non_exhaustive]pub struct InstanceParams {
pub request_valid_for_duration: Option<Duration>,
pub resource_manager_tags: HashMap<String, String>,
/* private fields */
}Available on crate feature
instances only.Expand description
Additional instance params.
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.request_valid_for_duration: Option<Duration>Relative deadline for waiting for capacity. Relevant only for Instances.Insert API.
Resource manager tags to be bound to the instance. Tag keys and values
have the same definition as resource
manager tags. Keys and values can be either in numeric format,
such as tagKeys/{tag_key_id} and tagValues/456 or in namespaced
format such as {org_id|project_id}/{tag_key_short_name} and
{tag_value_short_name}. The field is ignored (both PUT &
PATCH) when empty.
Implementations§
Source§impl InstanceParams
impl InstanceParams
pub fn new() -> Self
Sourcepub fn set_request_valid_for_duration<T>(self, v: T) -> Self
pub fn set_request_valid_for_duration<T>(self, v: T) -> Self
Sets the value of request_valid_for_duration.
§Example
ⓘ
use google_cloud_compute_v1::model::Duration;
let x = InstanceParams::new().set_request_valid_for_duration(Duration::default()/* use setters */);Sourcepub fn set_or_clear_request_valid_for_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_request_valid_for_duration<T>(self, v: Option<T>) -> Self
Sets or clears the value of request_valid_for_duration.
§Example
ⓘ
use google_cloud_compute_v1::model::Duration;
let x = InstanceParams::new().set_or_clear_request_valid_for_duration(Some(Duration::default()/* use setters */));
let x = InstanceParams::new().set_or_clear_request_valid_for_duration(None::<Duration>);Sets the value of resource_manager_tags.
§Example
ⓘ
let x = InstanceParams::new().set_resource_manager_tags([
("key0", "abc"),
("key1", "xyz"),
]);Trait Implementations§
Source§impl Clone for InstanceParams
impl Clone for InstanceParams
Source§fn clone(&self) -> InstanceParams
fn clone(&self) -> InstanceParams
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 InstanceParams
impl Debug for InstanceParams
Source§impl Default for InstanceParams
impl Default for InstanceParams
Source§fn default() -> InstanceParams
fn default() -> InstanceParams
Returns the “default value” for a type. Read more
Source§impl Message for InstanceParams
impl Message for InstanceParams
Source§impl PartialEq for InstanceParams
impl PartialEq for InstanceParams
impl StructuralPartialEq for InstanceParams
Auto Trait Implementations§
impl Freeze for InstanceParams
impl RefUnwindSafe for InstanceParams
impl Send for InstanceParams
impl Sync for InstanceParams
impl Unpin for InstanceParams
impl UnwindSafe for InstanceParams
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