ServiceCheckBuilder

Struct ServiceCheckBuilder 

Source
pub struct ServiceCheckBuilder { /* private fields */ }
Expand description

Builder for creating instances of ServiceCheck.

Provides a fluent interface for constructing a ServiceCheck object with optional fields.

Implementations§

Source§

impl ServiceCheckBuilder

Source

pub fn alert_from_failure(self, alert_from_failure: u64) -> Self

Sets the alert_from_failure field.

§Arguments
  • alert_from_failure - The failure at which alerts should start for this ServiceCheck.
Source

pub fn args(self, args: &str) -> Self

Sets the args field.

§Arguments
  • args - The arguments for the ServiceCheck.
Source

pub fn attribute(self, attribute: Variable) -> Self

Sets the attribute field.

§Arguments
  • attribute - A variable for the ServiceCheck.
Source

pub fn calculate_rate(self, calculate_rate: &str) -> Self

Sets the calculate_rate field.

§Arguments
  • calculate_rate - A boolean indicating if rate should be calculated or not.
Source

pub fn cascaded_from(self, cascaded_from: ServiceCheck) -> Self

Sets the cascaded_from field.

§Arguments
  • cascaded_from - The ServiceCheck from which this ServiceCheck is cascaded.
Source

pub fn check_attempts(self, check_attempts: u64) -> Self

Sets the check_attempts field.

§Arguments
  • check_attempts - The number of check attempts for the ServiceCheck.
Source

pub fn check_freshness(self, check_freshness: bool) -> Self

Sets the check_freshness field.

§Arguments
  • check_freshness - Boolean indicating whether to check freshness.
Source

pub fn check_interval(self, check_interval: u64) -> Self

Sets the check_interval field.

§Arguments
  • check_interval - The check interval for the ServiceCheck.
Source

pub fn check_period(self, check_period: TimePeriod) -> Self

Sets the check_period field.

§Arguments
  • check_period - The TimePeriod for the ServiceCheck.
Source

pub fn checktype(self, checktype: CheckType) -> Self

Sets the checktype field.

§Arguments
  • checktype - The CheckType for the ServiceCheck.
Source

pub fn clear_alert_from_failure(self) -> Self

Sets the critical_comparison field.

§Arguments
  • critical_comparison - The critical comparison for the ServiceCheck.
Source

pub fn clear_args(self) -> Self

Clears the args field.

Source

pub fn clear_attribute(self) -> Self

Clears the attribute field.

Source

pub fn clear_calculate_rate(self) -> Self

Clears the calculate_rate field.

Source

pub fn clear_cascaded_from(self) -> Self

Clears the cascaded_from field.

Source

pub fn clear_check_attempts(self) -> Self

Clears the check_attempts field.

Source

pub fn clear_check_freshness(self) -> Self

Clears the check_freshness field.

Source

pub fn clear_check_interval(self) -> Self

Clears the check_interval field.

Source

pub fn clear_check_period(self) -> Self

Clears the check_period field.

Source

pub fn clear_checktype(self) -> Self

Clears the checktype field.

Source

pub fn clear_critical_comparison(self) -> Self

Clears the critical_comparison field.

Source

pub fn clear_critical_value(self) -> Self

Clears the critical_value field.

Source

pub fn clear_dependencies(self) -> Self

Clears the dependencies field.

Source

pub fn clear_description(self) -> Self

Clears the description field.

Source

pub fn clear_event_handler(self) -> Self

Clears the event_handler field.

Source

pub fn clear_event_handler_always_exec(self) -> Self

Clears the event_handler_always_exec field.

Source

pub fn clear_flap_detection_enabled(self) -> Self

Clears the flap_detection_enabled field.

Source

pub fn clear_freshness_type(self) -> Self

Clears the freshness_type field.

Source

pub fn clear_hosts(self) -> Self

Clears the hosts field.

Source

pub fn clear_hosttemplates(self) -> Self

Clears the hosttemplates field.

Source

pub fn clear_invertresults(self) -> Self

Clears the invertresults field.

Source

pub fn clear_keywords(self) -> Self

Clears the keywords field.

Source

pub fn clear_label(self) -> Self

Clears the label field.

Source

pub fn clear_markdown_filter(self) -> Self

Clears the markdown_filter field.

Source

pub fn clear_name(self) -> Self

Clears the name field.

Source

pub fn clear_notification_interval(self) -> Self

Clears the notification_interval field.

Source

pub fn clear_notification_options(self) -> Self

Clears the notification_options field.

Source

pub fn clear_notification_period(self) -> Self

Clears the notification_period field.

Source

pub fn clear_oid(self) -> Self

Clears the oid field.

Source

pub fn clear_plugin(self) -> Self

Clears the plugin field.

Source

pub fn clear_retry_check_interval(self) -> Self

Clears the retry_check_interval field.

Source

pub fn clear_sensitive_arguments(self) -> Self

Clears the sensitive_arguments field.

Source

pub fn clear_servicegroup(self) -> Self

Clears the servicegroup field.

Source

pub fn clear_snmptraprules(self) -> Self

Clears the snmptraprules field.

Source

pub fn clear_stale_state(self) -> Self

Clears the stale_state field.

Source

pub fn clear_stale_text(self) -> Self

Clears the stale_text field.

Source

pub fn clear_stale_threshold_seconds(self) -> Self

Clears the stale_threshold_seconds field.

Source

pub fn clear_stalking(self) -> Self

Clears the stalking field.

Source

pub fn clear_volatile(self) -> Self

Clears the volatile field.

Source

pub fn clear_warning_comparison(self) -> Self

Clears the warning_comparison field.

Source

pub fn clear_warning_value(self) -> Self

Clears the warning_value field.

Source

pub fn critical_comparison(self, critical_comparison: &str) -> Self

Sets the critical_comparison field.

§Arguments
  • critical_comparison - The critical comparison for the ServiceCheck.
Source

pub fn critical_value(self, critical_value: &str) -> Self

Sets the critical_value field.

§Arguments
  • critical_value - The critical value for the ServiceCheck.
Source

pub fn dependencies(self, dependencies: &ConfigObjectMap<ServiceCheck>) -> Self

Sets the dependencies field.

§Arguments
  • dependencies - A reference to a ConfigObjectMap of ServiceCheck objects on which this ServiceCheck
Source

pub fn description(self, description: &str) -> Self

Sets the description field.

§Arguments
  • description - The description of the ServiceCheck.
Source

pub fn event_handler(self, event_handler: &str) -> Self

Sets the event_handler field.

§Arguments
Source

pub fn event_handler_always_exec(self, event_handler_always_exec: bool) -> Self

Sets the event_handler_always_exec field.

§Arguments
  • event_handler_always_exec - Boolean indicating whether to always execute the event handler.
Source

pub fn flap_detection_enabled(self, flap_detection_enabled: bool) -> Self

Sets the flap_detection_enabled field.

§Arguments
  • flap_detection_enabled - Boolean indicating whether to enable flap detection.
Source

pub fn freshness_type(self, freshness_type: &str) -> Self

Sets the freshness_type field:

§Arguments
  • freshness_type - The freshness type for the ServiceCheck.
Source

pub fn hosts(self, hosts: &ConfigObjectMap<Host>) -> Self

Sets the hosts field.

§Arguments
Source

pub fn hosttemplates( self, hosttemplates: &ConfigObjectMap<HostTemplate>, ) -> Self

Sets the hosttemplates field.

§Arguments
Source

pub fn invertresults(self, invertresults: bool) -> Self

Sets the invertresults field.

§Arguments
  • invertresults - Boolean indicating whether to invert the results of the ServiceCheck.
Source

pub fn keywords(self, keywords: &ConfigObjectMap<Hashtag>) -> Self

Sets the keywords field.

§Arguments
Source

pub fn label(self, label: &str) -> Self

Sets the label field.

§Arguments
  • label - The label for the ServiceCheck.
Source

pub fn markdown_filter(self, markdown_filter: bool) -> Self

Sets the markdown_filter field.

§Arguments
  • markdown_filter - A boolean indicating if the markdown filter should be used.
Source

pub fn notification_interval(self, notification_interval: u64) -> Self

Sets the notification_interval field.

§Arguments
  • notification_interval - The interval for the ServiceCheck notifications, in seconds.
Source

pub fn notification_options(self, notification_options: &str) -> Self

Sets the notification_options field.

§Arguments
  • notification_options - The notification options for the ServiceCheck.
§Available options:
  • w - Send notifications on warning state.
  • c - Send notifications on critical state.
  • r - Send notifications on recovery.
  • u - Send notifications on unknown state.
  • f - Send notifications on flap detection.
Source

pub fn notification_period(self, notification_period: TimePeriod) -> Self

Sets the notification_period field.

§Arguments
  • notification_period - The TimePeriod for notifications for the ServiceCheck.
Source

pub fn oid(self, oid: &str) -> Self

Sets the oid field.

§Arguments
  • oid - The OID for the ServiceCheck.
Source

pub fn plugin(self, plugin: Plugin) -> Self

Sets the plugin field.

§Arguments
  • plugin - The Plugin for the ServiceCheck.
Source

pub fn retry_check_interval(self, retry_check_interval: u64) -> Self

Sets the retry_check_interval field.

§Arguments
  • retry_check_interval - The retry check interval for the ServiceCheck.
Source

pub fn sensitive_arguments(self, sensitive_arguments: bool) -> Self

Sets the sensitive_arguments field.

§Arguments
  • sensitive_arguments - A boolean indicating whether the arguments to the ServiceCheck are sensitive.
Source

pub fn servicegroup(self, servicegroup: ServiceGroup) -> Self

Sets the servicegroup field.

§Arguments
Source

pub fn snmptraprules(self, snmptraprules: ConfigObjectMap<SNMPTrapRule>) -> Self

Sets the snmptraprules field.

§Arguments
Source

pub fn stale_state(self, stale_state: ServiceCheckState) -> Self

Sets the stale_state field.

§Arguments
Source

pub fn stale_text(self, stale_text: &str) -> Self

Sets the stale_text field.

§Arguments
  • stale_text - The stale text for the ServiceCheck.
Source

pub fn stale_threshold_seconds(self, stale_threshold_seconds: u64) -> Self

Sets the stale_threshold_seconds field.

§Arguments
  • stale_threshold_seconds - The stale threshold seconds for the ServiceCheck.
Source

pub fn stalking(self, stalking: &str) -> Self

Sets the stalking field.

§Arguments
  • stalking - A string containing the ServiceCheck stalking options.
§Available options:
  • o - Stalk on OK state.
  • w - Stalk on warning state.
  • c - Stalk on critical state.
  • u - Stalk on unknown state.
Source

pub fn volatile(self, volatile: bool) -> Self

Sets the volatile field.

§Arguments
  • volatile - Boolean indicating whether the ServiceCheck is volatile.
Source

pub fn warning_comparison(self, warning_comparison: &str) -> Self

Sets the warning_comparison field.

§Arguments
  • warning_comparison - The warning comparison for the ServiceCheck.
Source

pub fn warning_value(self, warning_value: &str) -> Self

Sets the warning_value field.

§Arguments
  • warning_value - The warning value for the ServiceCheck.

Trait Implementations§

Source§

impl Builder for ServiceCheckBuilder

Source§

fn new() -> Self

Creates a new instance of ServiceCheckBuilder with default values.

Initializes a new builder for creating a ServiceCheck object with all fields in their default state.

Source§

fn name(self, name: &str) -> Self

Sets the name field.

§Arguments
  • name - The name of the ServiceCheck.
Source§

fn build(self) -> Result<Self::ConfigObject, OpsviewConfigError>

Builds a new ServiceCheck object using the values specified in the ServiceCheckBuilder.

§Returns

A Result containing the new ServiceCheck object, or an Error if the name field is not set.

Source§

type ConfigObject = ServiceCheck

Source§

impl Clone for ServiceCheckBuilder

Source§

fn clone(&self) -> ServiceCheckBuilder

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ServiceCheckBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ServiceCheckBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,