#[non_exhaustive]pub struct UpdateAlertPolicyRequest {
    pub update_mask: Option<FieldMask>,
    pub alert_policy: Option<AlertPolicy>,
}Expand description
The protocol for the UpdateAlertPolicy request.
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.update_mask: Option<FieldMask>Optional. A list of alerting policy field names. If this field is not
empty, each listed field in the existing alerting policy is set to the
value of the corresponding field in the supplied policy (alert_policy),
or to the field’s default value if the field is not in the supplied
alerting policy.  Fields not listed retain their previous value.
Examples of valid field masks include display_name, documentation,
documentation.content, documentation.mime_type, user_labels,
user_label.nameofkey, enabled, conditions, combiner, etc.
If this field is empty, then the supplied alerting policy replaces the existing policy. It is the same as deleting the existing policy and adding the supplied policy, except for the following:
- The new policy will have the same [ALERT_POLICY_ID]as the former policy. This gives you continuity with the former policy in your notifications and incidents.
- Conditions in the new policy will keep their former [CONDITION_ID]if the supplied condition includes thenamefield with that[CONDITION_ID]. If the supplied condition omits thenamefield, then a new[CONDITION_ID]is created.
alert_policy: Option<AlertPolicy>Required. The updated alerting policy or the updated values for the
fields listed in update_mask.
If update_mask is not empty, any fields in this policy that are
not in update_mask are ignored.
Implementations§
Source§impl UpdateAlertPolicyRequest
 
impl UpdateAlertPolicyRequest
Sourcepub fn set_update_mask<T: Into<Option<FieldMask>>>(self, v: T) -> Self
 
pub fn set_update_mask<T: Into<Option<FieldMask>>>(self, v: T) -> Self
Sets the value of update_mask.
Sourcepub fn set_alert_policy<T: Into<Option<AlertPolicy>>>(self, v: T) -> Self
 
pub fn set_alert_policy<T: Into<Option<AlertPolicy>>>(self, v: T) -> Self
Sets the value of alert_policy.
Trait Implementations§
Source§impl Clone for UpdateAlertPolicyRequest
 
impl Clone for UpdateAlertPolicyRequest
Source§fn clone(&self) -> UpdateAlertPolicyRequest
 
fn clone(&self) -> UpdateAlertPolicyRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read more