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
impl ServiceCheckBuilder
Sourcepub fn alert_from_failure(self, alert_from_failure: u64) -> Self
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 thisServiceCheck.
Sourcepub fn calculate_rate(self, calculate_rate: &str) -> Self
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.
Sourcepub fn cascaded_from(self, cascaded_from: ServiceCheck) -> Self
pub fn cascaded_from(self, cascaded_from: ServiceCheck) -> Self
Sets the cascaded_from field.
§Arguments
cascaded_from- TheServiceCheckfrom which thisServiceCheckis cascaded.
Sourcepub fn check_attempts(self, check_attempts: u64) -> Self
pub fn check_attempts(self, check_attempts: u64) -> Self
Sets the check_attempts field.
§Arguments
check_attempts- The number of check attempts for theServiceCheck.
Sourcepub fn check_freshness(self, check_freshness: bool) -> Self
pub fn check_freshness(self, check_freshness: bool) -> Self
Sets the check_freshness field.
§Arguments
check_freshness- Boolean indicating whether to check freshness.
Sourcepub fn check_interval(self, check_interval: u64) -> Self
pub fn check_interval(self, check_interval: u64) -> Self
Sourcepub fn check_period(self, check_period: TimePeriod) -> Self
pub fn check_period(self, check_period: TimePeriod) -> Self
Sourcepub fn clear_alert_from_failure(self) -> Self
pub fn clear_alert_from_failure(self) -> Self
Sets the critical_comparison field.
§Arguments
critical_comparison- The critical comparison for theServiceCheck.
Sourcepub fn clear_args(self) -> Self
pub fn clear_args(self) -> Self
Clears the args field.
Sourcepub fn clear_attribute(self) -> Self
pub fn clear_attribute(self) -> Self
Clears the attribute field.
Sourcepub fn clear_calculate_rate(self) -> Self
pub fn clear_calculate_rate(self) -> Self
Clears the calculate_rate field.
Sourcepub fn clear_cascaded_from(self) -> Self
pub fn clear_cascaded_from(self) -> Self
Clears the cascaded_from field.
Sourcepub fn clear_check_attempts(self) -> Self
pub fn clear_check_attempts(self) -> Self
Clears the check_attempts field.
Sourcepub fn clear_check_freshness(self) -> Self
pub fn clear_check_freshness(self) -> Self
Clears the check_freshness field.
Sourcepub fn clear_check_interval(self) -> Self
pub fn clear_check_interval(self) -> Self
Clears the check_interval field.
Sourcepub fn clear_check_period(self) -> Self
pub fn clear_check_period(self) -> Self
Clears the check_period field.
Sourcepub fn clear_checktype(self) -> Self
pub fn clear_checktype(self) -> Self
Clears the checktype field.
Sourcepub fn clear_critical_comparison(self) -> Self
pub fn clear_critical_comparison(self) -> Self
Clears the critical_comparison field.
Sourcepub fn clear_critical_value(self) -> Self
pub fn clear_critical_value(self) -> Self
Clears the critical_value field.
Sourcepub fn clear_dependencies(self) -> Self
pub fn clear_dependencies(self) -> Self
Clears the dependencies field.
Sourcepub fn clear_description(self) -> Self
pub fn clear_description(self) -> Self
Clears the description field.
Sourcepub fn clear_event_handler(self) -> Self
pub fn clear_event_handler(self) -> Self
Clears the event_handler field.
Sourcepub fn clear_event_handler_always_exec(self) -> Self
pub fn clear_event_handler_always_exec(self) -> Self
Clears the event_handler_always_exec field.
Sourcepub fn clear_flap_detection_enabled(self) -> Self
pub fn clear_flap_detection_enabled(self) -> Self
Clears the flap_detection_enabled field.
Sourcepub fn clear_freshness_type(self) -> Self
pub fn clear_freshness_type(self) -> Self
Clears the freshness_type field.
Sourcepub fn clear_hosts(self) -> Self
pub fn clear_hosts(self) -> Self
Clears the hosts field.
Sourcepub fn clear_hosttemplates(self) -> Self
pub fn clear_hosttemplates(self) -> Self
Clears the hosttemplates field.
Sourcepub fn clear_invertresults(self) -> Self
pub fn clear_invertresults(self) -> Self
Clears the invertresults field.
Sourcepub fn clear_keywords(self) -> Self
pub fn clear_keywords(self) -> Self
Clears the keywords field.
Sourcepub fn clear_label(self) -> Self
pub fn clear_label(self) -> Self
Clears the label field.
Sourcepub fn clear_markdown_filter(self) -> Self
pub fn clear_markdown_filter(self) -> Self
Clears the markdown_filter field.
Sourcepub fn clear_name(self) -> Self
pub fn clear_name(self) -> Self
Clears the name field.
Sourcepub fn clear_notification_interval(self) -> Self
pub fn clear_notification_interval(self) -> Self
Clears the notification_interval field.
Sourcepub fn clear_notification_options(self) -> Self
pub fn clear_notification_options(self) -> Self
Clears the notification_options field.
Sourcepub fn clear_notification_period(self) -> Self
pub fn clear_notification_period(self) -> Self
Clears the notification_period field.
Sourcepub fn clear_plugin(self) -> Self
pub fn clear_plugin(self) -> Self
Clears the plugin field.
Sourcepub fn clear_retry_check_interval(self) -> Self
pub fn clear_retry_check_interval(self) -> Self
Clears the retry_check_interval field.
Sourcepub fn clear_sensitive_arguments(self) -> Self
pub fn clear_sensitive_arguments(self) -> Self
Clears the sensitive_arguments field.
Sourcepub fn clear_servicegroup(self) -> Self
pub fn clear_servicegroup(self) -> Self
Clears the servicegroup field.
Sourcepub fn clear_snmptraprules(self) -> Self
pub fn clear_snmptraprules(self) -> Self
Clears the snmptraprules field.
Sourcepub fn clear_stale_state(self) -> Self
pub fn clear_stale_state(self) -> Self
Clears the stale_state field.
Sourcepub fn clear_stale_text(self) -> Self
pub fn clear_stale_text(self) -> Self
Clears the stale_text field.
Sourcepub fn clear_stale_threshold_seconds(self) -> Self
pub fn clear_stale_threshold_seconds(self) -> Self
Clears the stale_threshold_seconds field.
Sourcepub fn clear_stalking(self) -> Self
pub fn clear_stalking(self) -> Self
Clears the stalking field.
Sourcepub fn clear_volatile(self) -> Self
pub fn clear_volatile(self) -> Self
Clears the volatile field.
Sourcepub fn clear_warning_comparison(self) -> Self
pub fn clear_warning_comparison(self) -> Self
Clears the warning_comparison field.
Sourcepub fn clear_warning_value(self) -> Self
pub fn clear_warning_value(self) -> Self
Clears the warning_value field.
Sourcepub fn critical_comparison(self, critical_comparison: &str) -> Self
pub fn critical_comparison(self, critical_comparison: &str) -> Self
Sets the critical_comparison field.
§Arguments
critical_comparison- The critical comparison for theServiceCheck.
Sourcepub fn critical_value(self, critical_value: &str) -> Self
pub fn critical_value(self, critical_value: &str) -> Self
Sourcepub fn dependencies(self, dependencies: &ConfigObjectMap<ServiceCheck>) -> Self
pub fn dependencies(self, dependencies: &ConfigObjectMap<ServiceCheck>) -> Self
Sets the dependencies field.
§Arguments
dependencies- A reference to aConfigObjectMapofServiceCheckobjects on which thisServiceCheck
Sourcepub fn description(self, description: &str) -> Self
pub fn description(self, description: &str) -> Self
Sourcepub fn event_handler(self, event_handler: &str) -> Self
pub fn event_handler(self, event_handler: &str) -> Self
Sourcepub fn event_handler_always_exec(self, event_handler_always_exec: bool) -> Self
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.
Sourcepub fn flap_detection_enabled(self, flap_detection_enabled: bool) -> Self
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.
Sourcepub fn freshness_type(self, freshness_type: &str) -> Self
pub fn freshness_type(self, freshness_type: &str) -> Self
Sourcepub fn hosts(self, hosts: &ConfigObjectMap<Host>) -> Self
pub fn hosts(self, hosts: &ConfigObjectMap<Host>) -> Self
Sets the hosts field.
§Arguments
hosts- A reference to aConfigObjectMapofHostobjects associated with thisServiceCheck.
Sourcepub fn hosttemplates(
self,
hosttemplates: &ConfigObjectMap<HostTemplate>,
) -> Self
pub fn hosttemplates( self, hosttemplates: &ConfigObjectMap<HostTemplate>, ) -> Self
Sets the hosttemplates field.
§Arguments
hosttemplates- A reference to aConfigObjectMapofHostTemplateobjects associated with this service
Sourcepub fn invertresults(self, invertresults: bool) -> Self
pub fn invertresults(self, invertresults: bool) -> Self
Sets the invertresults field.
§Arguments
invertresults- Boolean indicating whether to invert the results of theServiceCheck.
Sourcepub fn keywords(self, keywords: &ConfigObjectMap<Hashtag>) -> Self
pub fn keywords(self, keywords: &ConfigObjectMap<Hashtag>) -> Self
Sets the keywords field.
§Arguments
keywords- A reference to aConfigObjectMapofHashtagobjects associated with thisServiceCheck.
Sourcepub fn markdown_filter(self, markdown_filter: bool) -> Self
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.
Sourcepub fn notification_interval(self, notification_interval: u64) -> Self
pub fn notification_interval(self, notification_interval: u64) -> Self
Sets the notification_interval field.
§Arguments
notification_interval- The interval for theServiceChecknotifications, in seconds.
Sourcepub fn notification_options(self, notification_options: &str) -> Self
pub fn notification_options(self, notification_options: &str) -> Self
Sets the notification_options field.
§Arguments
notification_options- The notification options for theServiceCheck.
§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.
Sourcepub fn notification_period(self, notification_period: TimePeriod) -> Self
pub fn notification_period(self, notification_period: TimePeriod) -> Self
Sets the notification_period field.
§Arguments
notification_period- TheTimePeriodfor notifications for theServiceCheck.
Sourcepub fn retry_check_interval(self, retry_check_interval: u64) -> Self
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 theServiceCheck.
Sourcepub fn sensitive_arguments(self, sensitive_arguments: bool) -> Self
pub fn sensitive_arguments(self, sensitive_arguments: bool) -> Self
Sets the sensitive_arguments field.
§Arguments
sensitive_arguments- A boolean indicating whether the arguments to theServiceCheckare sensitive.
Sourcepub fn servicegroup(self, servicegroup: ServiceGroup) -> Self
pub fn servicegroup(self, servicegroup: ServiceGroup) -> Self
Sourcepub fn snmptraprules(self, snmptraprules: ConfigObjectMap<SNMPTrapRule>) -> Self
pub fn snmptraprules(self, snmptraprules: ConfigObjectMap<SNMPTrapRule>) -> Self
Sets the snmptraprules field.
§Arguments
snmptraprules-ConfigObjectMapofSNMPTrapRules for theServiceCheck.
Sourcepub fn stale_state(self, stale_state: ServiceCheckState) -> Self
pub fn stale_state(self, stale_state: ServiceCheckState) -> Self
Sets the stale_state field.
§Arguments
stale_state- The staleServiceCheckStatefor theServiceCheck:
Sourcepub fn stale_text(self, stale_text: &str) -> Self
pub fn stale_text(self, stale_text: &str) -> Self
Sourcepub fn stale_threshold_seconds(self, stale_threshold_seconds: u64) -> Self
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 theServiceCheck.
Sourcepub fn volatile(self, volatile: bool) -> Self
pub fn volatile(self, volatile: bool) -> Self
Sets the volatile field.
§Arguments
volatile- Boolean indicating whether theServiceCheckis volatile.
Sourcepub fn warning_comparison(self, warning_comparison: &str) -> Self
pub fn warning_comparison(self, warning_comparison: &str) -> Self
Sets the warning_comparison field.
§Arguments
warning_comparison- The warning comparison for theServiceCheck.
Sourcepub fn warning_value(self, warning_value: &str) -> Self
pub fn warning_value(self, warning_value: &str) -> Self
Trait Implementations§
Source§impl Builder for ServiceCheckBuilder
impl Builder for ServiceCheckBuilder
Source§fn new() -> Self
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 build(self) -> Result<Self::ConfigObject, OpsviewConfigError>
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.
type ConfigObject = ServiceCheck
Source§impl Clone for ServiceCheckBuilder
impl Clone for ServiceCheckBuilder
Source§fn clone(&self) -> ServiceCheckBuilder
fn clone(&self) -> ServiceCheckBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more