#[non_exhaustive]pub struct GlobalVmExtensionPolicy {Show 13 fields
pub creation_timestamp: Option<String>,
pub description: Option<String>,
pub extension_policies: HashMap<String, GlobalVmExtensionPolicyExtensionPolicy>,
pub id: Option<u64>,
pub instance_selectors: Vec<GlobalVmExtensionPolicyInstanceSelector>,
pub kind: Option<String>,
pub name: Option<String>,
pub priority: Option<i32>,
pub rollout_operation: Option<GlobalVmExtensionPolicyRolloutOperation>,
pub scoped_resource_status: Option<ScopedResourceStatus>,
pub self_link: Option<String>,
pub self_link_with_id: Option<String>,
pub update_timestamp: Option<String>,
/* private fields */
}global-vm-extension-policies only.Expand description
Message describing GlobalVmExtensionPolicy object.
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.creation_timestamp: Option<String>Output only. [Output Only] Creation timestamp inRFC3339 text format.
description: Option<String>An optional description of this resource. Provide this property when you create the resource.
extension_policies: HashMap<String, GlobalVmExtensionPolicyExtensionPolicy>Required. Map from extension (eg: “cloudops”) to its policy configuration. The key is the name of the extension.
id: Option<u64>Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.
instance_selectors: Vec<GlobalVmExtensionPolicyInstanceSelector>Optional. Selector to target VMs for a policy. There is a logical “AND” between instance_selectors.
kind: Option<String>Output only. [Output Only] Type of the resource. Alwayscompute#globalVmExtensionPolicy for globalVmExtensionPolicies.
name: Option<String>Name of the resource. Provided by the client when the resource is created.
The name must be 1-63 characters long, and comply withRFC1035.
Specifically, the name must be 1-63 characters long and match the regular
expression [a-z]([-a-z0-9]*[a-z0-9])?
which means the first character must be a lowercase letter, and all
following characters must be a dash, lowercase letter, or digit, except
the last character, which cannot be a dash.
priority: Option<i32>Optional. Used to resolve conflicts when multiple policies are active for the same extension. Defaults to 0.
Larger the number, higher the priority. When the priority is the same, the policy with the newer create time has higher priority.
rollout_operation: Option<GlobalVmExtensionPolicyRolloutOperation>Required. The rollout strategy and status.
scoped_resource_status: Option<ScopedResourceStatus>Output only. [Output Only] The scoped resource status. It’s only for tracking the purging status of the policy.
self_link: Option<String>Output only. [Output Only] Server-defined fully-qualified URL for this resource.
self_link_with_id: Option<String>Output only. [Output Only] Server-defined URL for this resource’s resource id.
update_timestamp: Option<String>Output only. [Output Only] Update timestamp inRFC3339 text format.
Implementations§
Source§impl GlobalVmExtensionPolicy
impl GlobalVmExtensionPolicy
Sourcepub fn set_creation_timestamp<T>(self, v: T) -> Self
pub fn set_creation_timestamp<T>(self, v: T) -> Self
Sets the value of creation_timestamp.
§Example
let x = GlobalVmExtensionPolicy::new().set_creation_timestamp("example");Sourcepub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
Sets or clears the value of creation_timestamp.
§Example
let x = GlobalVmExtensionPolicy::new().set_or_clear_creation_timestamp(Some("example"));
let x = GlobalVmExtensionPolicy::new().set_or_clear_creation_timestamp(None::<String>);Sourcepub fn set_description<T>(self, v: T) -> Self
pub fn set_description<T>(self, v: T) -> Self
Sets the value of description.
§Example
let x = GlobalVmExtensionPolicy::new().set_description("example");Sourcepub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
Sets or clears the value of description.
§Example
let x = GlobalVmExtensionPolicy::new().set_or_clear_description(Some("example"));
let x = GlobalVmExtensionPolicy::new().set_or_clear_description(None::<String>);Sourcepub fn set_extension_policies<T, K, V>(self, v: T) -> Selfwhere
T: IntoIterator<Item = (K, V)>,
K: Into<String>,
V: Into<GlobalVmExtensionPolicyExtensionPolicy>,
pub fn set_extension_policies<T, K, V>(self, v: T) -> Selfwhere
T: IntoIterator<Item = (K, V)>,
K: Into<String>,
V: Into<GlobalVmExtensionPolicyExtensionPolicy>,
Sets the value of extension_policies.
§Example
use google_cloud_compute_v1::model::GlobalVmExtensionPolicyExtensionPolicy;
let x = GlobalVmExtensionPolicy::new().set_extension_policies([
("key0", GlobalVmExtensionPolicyExtensionPolicy::default()/* use setters */),
("key1", GlobalVmExtensionPolicyExtensionPolicy::default()/* use (different) setters */),
]);Sourcepub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
Sourcepub fn set_instance_selectors<T, V>(self, v: T) -> Self
pub fn set_instance_selectors<T, V>(self, v: T) -> Self
Sets the value of instance_selectors.
§Example
use google_cloud_compute_v1::model::GlobalVmExtensionPolicyInstanceSelector;
let x = GlobalVmExtensionPolicy::new()
.set_instance_selectors([
GlobalVmExtensionPolicyInstanceSelector::default()/* use setters */,
GlobalVmExtensionPolicyInstanceSelector::default()/* use (different) setters */,
]);Sourcepub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
Sourcepub fn set_priority<T>(self, v: T) -> Self
pub fn set_priority<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_priority<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_priority<T>(self, v: Option<T>) -> Self
Sourcepub fn set_rollout_operation<T>(self, v: T) -> Selfwhere
T: Into<GlobalVmExtensionPolicyRolloutOperation>,
pub fn set_rollout_operation<T>(self, v: T) -> Selfwhere
T: Into<GlobalVmExtensionPolicyRolloutOperation>,
Sets the value of rollout_operation.
§Example
use google_cloud_compute_v1::model::GlobalVmExtensionPolicyRolloutOperation;
let x = GlobalVmExtensionPolicy::new().set_rollout_operation(GlobalVmExtensionPolicyRolloutOperation::default()/* use setters */);Sourcepub fn set_or_clear_rollout_operation<T>(self, v: Option<T>) -> Selfwhere
T: Into<GlobalVmExtensionPolicyRolloutOperation>,
pub fn set_or_clear_rollout_operation<T>(self, v: Option<T>) -> Selfwhere
T: Into<GlobalVmExtensionPolicyRolloutOperation>,
Sets or clears the value of rollout_operation.
§Example
use google_cloud_compute_v1::model::GlobalVmExtensionPolicyRolloutOperation;
let x = GlobalVmExtensionPolicy::new().set_or_clear_rollout_operation(Some(GlobalVmExtensionPolicyRolloutOperation::default()/* use setters */));
let x = GlobalVmExtensionPolicy::new().set_or_clear_rollout_operation(None::<GlobalVmExtensionPolicyRolloutOperation>);Sourcepub fn set_scoped_resource_status<T>(self, v: T) -> Selfwhere
T: Into<ScopedResourceStatus>,
pub fn set_scoped_resource_status<T>(self, v: T) -> Selfwhere
T: Into<ScopedResourceStatus>,
Sets the value of scoped_resource_status.
§Example
use google_cloud_compute_v1::model::global_vm_extension_policy::ScopedResourceStatus;
let x0 = GlobalVmExtensionPolicy::new().set_scoped_resource_status(ScopedResourceStatus::Unspecified);Sourcepub fn set_or_clear_scoped_resource_status<T>(self, v: Option<T>) -> Selfwhere
T: Into<ScopedResourceStatus>,
pub fn set_or_clear_scoped_resource_status<T>(self, v: Option<T>) -> Selfwhere
T: Into<ScopedResourceStatus>,
Sets or clears the value of scoped_resource_status.
§Example
use google_cloud_compute_v1::model::global_vm_extension_policy::ScopedResourceStatus;
let x0 = GlobalVmExtensionPolicy::new().set_or_clear_scoped_resource_status(Some(ScopedResourceStatus::Unspecified));
let x_none = GlobalVmExtensionPolicy::new().set_or_clear_scoped_resource_status(None::<ScopedResourceStatus>);Sourcepub fn set_self_link<T>(self, v: T) -> Self
pub fn set_self_link<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_self_link<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_self_link<T>(self, v: Option<T>) -> Self
Sourcepub fn set_self_link_with_id<T>(self, v: T) -> Self
pub fn set_self_link_with_id<T>(self, v: T) -> Self
Sets the value of self_link_with_id.
§Example
let x = GlobalVmExtensionPolicy::new().set_self_link_with_id("example");Sourcepub fn set_or_clear_self_link_with_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_self_link_with_id<T>(self, v: Option<T>) -> Self
Sets or clears the value of self_link_with_id.
§Example
let x = GlobalVmExtensionPolicy::new().set_or_clear_self_link_with_id(Some("example"));
let x = GlobalVmExtensionPolicy::new().set_or_clear_self_link_with_id(None::<String>);Sourcepub fn set_update_timestamp<T>(self, v: T) -> Self
pub fn set_update_timestamp<T>(self, v: T) -> Self
Sets the value of update_timestamp.
§Example
let x = GlobalVmExtensionPolicy::new().set_update_timestamp("example");Sourcepub fn set_or_clear_update_timestamp<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_timestamp<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_timestamp.
§Example
let x = GlobalVmExtensionPolicy::new().set_or_clear_update_timestamp(Some("example"));
let x = GlobalVmExtensionPolicy::new().set_or_clear_update_timestamp(None::<String>);Trait Implementations§
Source§impl Clone for GlobalVmExtensionPolicy
impl Clone for GlobalVmExtensionPolicy
Source§fn clone(&self) -> GlobalVmExtensionPolicy
fn clone(&self) -> GlobalVmExtensionPolicy
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 GlobalVmExtensionPolicy
impl Debug for GlobalVmExtensionPolicy
Source§impl Default for GlobalVmExtensionPolicy
impl Default for GlobalVmExtensionPolicy
Source§fn default() -> GlobalVmExtensionPolicy
fn default() -> GlobalVmExtensionPolicy
Source§impl Message for GlobalVmExtensionPolicy
impl Message for GlobalVmExtensionPolicy
Source§impl PartialEq for GlobalVmExtensionPolicy
impl PartialEq for GlobalVmExtensionPolicy
Source§fn eq(&self, other: &GlobalVmExtensionPolicy) -> bool
fn eq(&self, other: &GlobalVmExtensionPolicy) -> bool
self and other values to be equal, and is used by ==.