#[non_exhaustive]pub struct AutomationRule {
pub rule: Option<Rule>,
/* private fields */
}Expand description
AutomationRule defines the automation activities.
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.rule: Option<Rule>The configuration of the Automation rule.
Implementations§
Source§impl AutomationRule
impl AutomationRule
Sourcepub fn set_rule<T: Into<Option<Rule>>>(self, v: T) -> Self
pub fn set_rule<T: Into<Option<Rule>>>(self, v: T) -> Self
Sets the value of rule.
Note that all the setters affecting rule are mutually
exclusive.
§Example
use google_cloud_deploy_v1::model::PromoteReleaseRule;
let x = AutomationRule::new().set_rule(Some(
google_cloud_deploy_v1::model::automation_rule::Rule::PromoteReleaseRule(PromoteReleaseRule::default().into())));Sourcepub fn promote_release_rule(&self) -> Option<&Box<PromoteReleaseRule>>
pub fn promote_release_rule(&self) -> Option<&Box<PromoteReleaseRule>>
The value of rule
if it holds a PromoteReleaseRule, None if the field is not set or
holds a different branch.
Sourcepub fn set_promote_release_rule<T: Into<Box<PromoteReleaseRule>>>(
self,
v: T,
) -> Self
pub fn set_promote_release_rule<T: Into<Box<PromoteReleaseRule>>>( self, v: T, ) -> Self
Sets the value of rule
to hold a PromoteReleaseRule.
Note that all the setters affecting rule are
mutually exclusive.
§Example
use google_cloud_deploy_v1::model::PromoteReleaseRule;
let x = AutomationRule::new().set_promote_release_rule(PromoteReleaseRule::default()/* use setters */);
assert!(x.promote_release_rule().is_some());
assert!(x.advance_rollout_rule().is_none());
assert!(x.repair_rollout_rule().is_none());
assert!(x.timed_promote_release_rule().is_none());Sourcepub fn advance_rollout_rule(&self) -> Option<&Box<AdvanceRolloutRule>>
pub fn advance_rollout_rule(&self) -> Option<&Box<AdvanceRolloutRule>>
The value of rule
if it holds a AdvanceRolloutRule, None if the field is not set or
holds a different branch.
Sourcepub fn set_advance_rollout_rule<T: Into<Box<AdvanceRolloutRule>>>(
self,
v: T,
) -> Self
pub fn set_advance_rollout_rule<T: Into<Box<AdvanceRolloutRule>>>( self, v: T, ) -> Self
Sets the value of rule
to hold a AdvanceRolloutRule.
Note that all the setters affecting rule are
mutually exclusive.
§Example
use google_cloud_deploy_v1::model::AdvanceRolloutRule;
let x = AutomationRule::new().set_advance_rollout_rule(AdvanceRolloutRule::default()/* use setters */);
assert!(x.advance_rollout_rule().is_some());
assert!(x.promote_release_rule().is_none());
assert!(x.repair_rollout_rule().is_none());
assert!(x.timed_promote_release_rule().is_none());Sourcepub fn repair_rollout_rule(&self) -> Option<&Box<RepairRolloutRule>>
pub fn repair_rollout_rule(&self) -> Option<&Box<RepairRolloutRule>>
The value of rule
if it holds a RepairRolloutRule, None if the field is not set or
holds a different branch.
Sourcepub fn set_repair_rollout_rule<T: Into<Box<RepairRolloutRule>>>(
self,
v: T,
) -> Self
pub fn set_repair_rollout_rule<T: Into<Box<RepairRolloutRule>>>( self, v: T, ) -> Self
Sets the value of rule
to hold a RepairRolloutRule.
Note that all the setters affecting rule are
mutually exclusive.
§Example
use google_cloud_deploy_v1::model::RepairRolloutRule;
let x = AutomationRule::new().set_repair_rollout_rule(RepairRolloutRule::default()/* use setters */);
assert!(x.repair_rollout_rule().is_some());
assert!(x.promote_release_rule().is_none());
assert!(x.advance_rollout_rule().is_none());
assert!(x.timed_promote_release_rule().is_none());Sourcepub fn timed_promote_release_rule(
&self,
) -> Option<&Box<TimedPromoteReleaseRule>>
pub fn timed_promote_release_rule( &self, ) -> Option<&Box<TimedPromoteReleaseRule>>
The value of rule
if it holds a TimedPromoteReleaseRule, None if the field is not set or
holds a different branch.
Sourcepub fn set_timed_promote_release_rule<T: Into<Box<TimedPromoteReleaseRule>>>(
self,
v: T,
) -> Self
pub fn set_timed_promote_release_rule<T: Into<Box<TimedPromoteReleaseRule>>>( self, v: T, ) -> Self
Sets the value of rule
to hold a TimedPromoteReleaseRule.
Note that all the setters affecting rule are
mutually exclusive.
§Example
use google_cloud_deploy_v1::model::TimedPromoteReleaseRule;
let x = AutomationRule::new().set_timed_promote_release_rule(TimedPromoteReleaseRule::default()/* use setters */);
assert!(x.timed_promote_release_rule().is_some());
assert!(x.promote_release_rule().is_none());
assert!(x.advance_rollout_rule().is_none());
assert!(x.repair_rollout_rule().is_none());Trait Implementations§
Source§impl Clone for AutomationRule
impl Clone for AutomationRule
Source§fn clone(&self) -> AutomationRule
fn clone(&self) -> AutomationRule
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 AutomationRule
impl Debug for AutomationRule
Source§impl Default for AutomationRule
impl Default for AutomationRule
Source§fn default() -> AutomationRule
fn default() -> AutomationRule
Source§impl Message for AutomationRule
impl Message for AutomationRule
Source§impl PartialEq for AutomationRule
impl PartialEq for AutomationRule
impl StructuralPartialEq for AutomationRule
Auto Trait Implementations§
impl Freeze for AutomationRule
impl RefUnwindSafe for AutomationRule
impl Send for AutomationRule
impl Sync for AutomationRule
impl Unpin for AutomationRule
impl UnsafeUnpin for AutomationRule
impl UnwindSafe for AutomationRule
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request