pub struct ScheduleDowntimeBuilder { /* private fields */ }Expand description
Builder for ScheduleDowntime.
Implementations§
Source§impl ScheduleDowntimeBuilder
impl ScheduleDowntimeBuilder
the author of the downtime
Sourcepub fn start_time(&mut self, value: OffsetDateTime) -> &mut Self
pub fn start_time(&mut self, value: OffsetDateTime) -> &mut Self
beginning of the downtime
Sourcepub fn end_time(&mut self, value: OffsetDateTime) -> &mut Self
pub fn end_time(&mut self, value: OffsetDateTime) -> &mut Self
end of the downtime
Sourcepub fn fixed(&mut self, value: Option<bool>) -> &mut Self
pub fn fixed(&mut self, value: Option<bool>) -> &mut Self
Defaults to true. If true, the downtime is fixed otherwise flexible.
Sourcepub fn all_services(&mut self, value: Option<bool>) -> &mut Self
pub fn all_services(&mut self, value: Option<bool>) -> &mut Self
Sets downtime for all services for the matched host objects. If child_options are set, all child hosts and their services will schedule a downtime too. Defaults to false.
Sourcepub fn trigger_name(&mut self, value: Option<IcingaDowntimeName>) -> &mut Self
pub fn trigger_name(&mut self, value: Option<IcingaDowntimeName>) -> &mut Self
Sets the trigger for a triggered downtime.
Sourcepub fn child_options(
&mut self,
value: Option<IcingaDowntimeChildOptions>,
) -> &mut Self
pub fn child_options( &mut self, value: Option<IcingaDowntimeChildOptions>, ) -> &mut Self
Schedule child downtimes.
Sourcepub fn filter<VALUE: Into<IcingaFilter>>(&mut self, value: VALUE) -> &mut Self
pub fn filter<VALUE: Into<IcingaFilter>>(&mut self, value: VALUE) -> &mut Self
filter to target which host and/or service to schedule a downtime for
Source§impl ScheduleDowntimeBuilder
impl ScheduleDowntimeBuilder
Sourcepub fn validate(&self) -> Result<(), Error>
pub fn validate(&self) -> Result<(), Error>
makes sure the filter object type is valid for this call (either Host or Service)
validates all_services is only used on host downtimes
validates duration is specified if fixed is set to false
§Errors
this returns an error if the filter field object type is not Host or Service
Trait Implementations§
Source§impl Clone for ScheduleDowntimeBuilder
impl Clone for ScheduleDowntimeBuilder
Source§fn clone(&self) -> ScheduleDowntimeBuilder
fn clone(&self) -> ScheduleDowntimeBuilder
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 ScheduleDowntimeBuilder
impl Debug for ScheduleDowntimeBuilder
Auto Trait Implementations§
impl Freeze for ScheduleDowntimeBuilder
impl RefUnwindSafe for ScheduleDowntimeBuilder
impl Send for ScheduleDowntimeBuilder
impl Sync for ScheduleDowntimeBuilder
impl Unpin for ScheduleDowntimeBuilder
impl UnsafeUnpin for ScheduleDowntimeBuilder
impl UnwindSafe for ScheduleDowntimeBuilder
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