opsview::config

Struct SharedNotificationProfile

Source
pub struct SharedNotificationProfile {
Show 30 fields pub name: String, pub all_business_components: Option<bool>, pub all_business_services: Option<bool>, pub all_hostgroups: Option<bool>, pub all_keywords: Option<bool>, pub all_servicegroups: Option<bool>, pub business_component_availability_below: Option<Percentage>, pub business_component_options: Option<String>, pub business_component_renotification_interval: Option<u64>, pub business_components: Option<ConfigRefMap<BSMComponentRef>>, pub business_service_availability_below: Option<Percentage>, pub business_service_options: Option<String>, pub business_service_renotification_interval: Option<u64>, pub business_services: Option<ConfigRefMap<BSMServiceRef>>, pub host_notification_options: Option<String>, pub hostgroups: Option<ConfigRefMap<HostGroupRef>>, pub include_component_notes: Option<bool>, pub include_service_notes: Option<bool>, pub keywords: Option<ConfigRefMap<HashtagRef>>, pub notification_level: Option<u64>, pub notification_level_stop: Option<u64>, pub notification_period: Option<TimePeriodRef>, pub notificationmethods: Option<ConfigObjectMap<NotificationMethod>>, pub renotification_interval_seconds: Option<u64>, pub role: Option<RoleRef>, pub service_notification_options: Option<String>, pub servicegroups: Option<ConfigRefMap<ServiceGroupRef>>, pub id: Option<u64>, pub ref_: Option<String>, pub uncommitted: Option<bool>,
}
Expand description

Represents a shared notification profile in Opsview.

Shared Notification Profiles are very similar to Notification Profiles except that instead of being set up user by user, they are centrally configured and then made available to all Users within a particular Role.

Shared Notification Profiles are not automatically applied to the Roles selected, they are only available for the users who are part of that role to activate and make use of.

This struct defines the structure for a SharedNotificationProfile entity as used in Opsview.

Fields§

§name: String

The name of the SharedNotificationProfile.

§all_business_components: Option<bool>

Optional boolean indicating whether all BSMComponents are included in the SharedNotificationProfile.

Default: Some(false).

§all_business_services: Option<bool>

Optional boolean indicating whether all BSMServices are included in the SharedNotificationProfile.

Default: Some(false).

§all_hostgroups: Option<bool>

Optional boolean indicating whether all HostGroups are included in the SharedNotificationProfile.

Default: Some(false).

§all_keywords: Option<bool>

Optional boolean indicating whether all Hashtags are included in the SharedNotificationProfile.

Default: Some(false).

§all_servicegroups: Option<bool>

Optional boolean indicating whether all ServiceGroups are included in the SharedNotificationProfile.

Default: Some(false).

§business_component_availability_below: Option<Percentage>

Optional Percentage indicating the availability level below which BSMComponents will be included in the SharedNotificationProfile.

Default: Some(Percentage::from(99.999)).

§business_component_options: Option<String>

Optional string indicating the options for BSMComponents in the SharedNotificationProfile.

Default: Some("f,i".to_string()).

§business_component_renotification_interval: Option<u64>

Optional interval in seconds indicating the renotification interval for BSMComponents in the SharedNotificationProfile.

Default: Some(1800).

§business_components: Option<ConfigRefMap<BSMComponentRef>>

ConfigRefMap of BSMComponentRef objects associated with this SharedNotificationProfile.

§business_service_availability_below: Option<Percentage>

Optional Percentage indicating the availability level below which BSMServices will be included in the SharedNotificationProfile.

Default: Some(Percentage::from(99.999)).

§business_service_options: Option<String>

Optional string indicating the options for BSMServices in the SharedNotificationProfile.

Default: Some("o,i".to_string()).

§business_service_renotification_interval: Option<u64>

Optional interval in seconds indicating the renotification interval for BSMServices in the SharedNotificationProfile.

Default: Some(1800).

§business_services: Option<ConfigRefMap<BSMServiceRef>>

ConfigRefMap of BSMServiceRef objects associated with this SharedNotificationProfile.

§host_notification_options: Option<String>

Optional string indicating the host notification options for the SharedNotificationProfile.

Default: Some("d,r,f".to_string()).

§hostgroups: Option<ConfigRefMap<HostGroupRef>>

ConfigRefMap of HostGroupRef objects associated with this SharedNotificationProfile.

§include_component_notes: Option<bool>

Optional boolean indicating whether component notes are included.

Default: Some(false).

§include_service_notes: Option<bool>

Optional boolean indicating whether service notes are included.

Default: Some(false).

§keywords: Option<ConfigRefMap<HashtagRef>>

ConfigRefMap of HashtagRef objects associated with this SharedNotificationProfile.

§notification_level: Option<u64>

Optional integer indicating the notification level for the SharedNotificationProfile.

It seems as this field corresponds to the count at which this profile should start receiving notifications.

Default: Some(1).

§notification_level_stop: Option<u64>

Optional integer indicating the notification level stop for the SharedNotificationProfile.

It seems as this field corresponds to the count after which this profile should stop receiving notifications, with 0 representing no limit.

Default: Some(0).

§notification_period: Option<TimePeriodRef>

Optional TimePeriodRef object indicating the notification period for the SharedNotificationProfile.

§notificationmethods: Option<ConfigObjectMap<NotificationMethod>>

ConfigObjectMap of NotificationMethod objects associated with this SharedNotificationProfile.

§renotification_interval_seconds: Option<u64>

Optional integer indicating the renotification interval for the SharedNotificationProfile.

§role: Option<RoleRef>

Optional RoleRef object indicating the role for the SharedNotificationProfile.

§service_notification_options: Option<String>

Optional string indicating the service notification options for the SharedNotificationProfile.

Default: Some("w".to_string()).

§servicegroups: Option<ConfigRefMap<ServiceGroupRef>>

ConfigRefMap of ServiceGroupRef objects associated with this SharedNotificationProfile.

§id: Option<u64>

The unique identifier of the SharedNotificationProfile.

§ref_: Option<String>

A reference string unique to this SharedNotificationProfile.

§uncommitted: Option<bool>

A boolean indicating whether the SharedNotificationProfile is uncommitted.

Trait Implementations§

Source§

impl Clone for SharedNotificationProfile

Source§

fn clone(&self) -> SharedNotificationProfile

Returns a copy 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 ConfigObject for SharedNotificationProfile

Source§

fn builder() -> Self::Builder

Returns a builder for constructing a SharedNotificationProfile object.

§Returns

A SharedNotificationProfileBuilder object.

Source§

fn config_path() -> Option<String>

Provides the configuration path for a SharedNotificationProfile object within the Opsview system.

§Returns

A string representing the API path where shared notification profiles are configured.

Source§

fn unique_name(&self) -> String

Returns the unique name of the SharedNotificationProfile object.

This name is used to identify the SharedNotificationProfile when building the HashMap for an ConfigObjectMap.

§Returns

A string representing the unique name of the SharedNotificationProfile.

Source§

type Builder = SharedNotificationProfileBuilder

Source§

fn minimal(name: &str) -> Result<Self, OpsviewConfigError>

Source§

impl CreateFromJson for SharedNotificationProfile

Enables the creation of a SharedNotificationProfile instance from a JSON representation. Typically used when parsing JSON data from the Opsview API.

Source§

fn from_json(json: &str) -> Result<Self, Error>

Deserializes a JSON string into an instance of the implementing type. Read more
Source§

impl Debug for SharedNotificationProfile

Source§

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

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

impl Default for SharedNotificationProfile

Source§

fn default() -> Self

Returns a default SharedNotificationProfile instance.

Source§

impl<'de> Deserialize<'de> for SharedNotificationProfile

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<SharedNotificationProfile> for SharedNotificationProfileRef

Source§

fn from(shared_notification_profile: SharedNotificationProfile) -> Self

Creates a new SharedNotificationProfileRef instance from a SharedNotificationProfile object.

§Arguments
  • shared_notification_profile - A SharedNotificationProfile object containing the details of the shared notification profile.
§Returns

A SharedNotificationProfileRef object containing the reference to the shared notification profile.

Source§

impl PartialEq for SharedNotificationProfile

Source§

fn eq(&self, other: &SharedNotificationProfile) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Persistent for SharedNotificationProfile

Source§

fn id(&self) -> Option<u64>

Returns the unique identifier.

Source§

fn ref_(&self) -> Option<String>

Returns the reference string if it’s not empty.

Source§

fn name(&self) -> Option<String>

Returns the name if it’s not empty.

Source§

fn name_regex(&self) -> Option<String>

Source§

fn validated_name(&self, name: &str) -> Result<String, OpsviewConfigError>

Source§

fn set_name(&mut self, new_name: &str) -> Result<String, OpsviewConfigError>

Source§

fn clear_readonly(&mut self)

Source§

fn clone_new_name( original: &Self, new_name: &str, ) -> Result<Self, OpsviewConfigError>

Clones an existing object, but with a new name and with read-only fields cleared.
Source§

async fn exists( &self, client: &OpsviewClient, ) -> Result<bool, OpsviewClientError>

Checks whether the object exists in the Opsview Server. Read more
Source§

async fn fetch( &self, client: &OpsviewClient, params: Option<Params>, ) -> Result<Self, OpsviewClientError>

Retrieves the object from the Opsview Server and returns it. Read more
Source§

async fn remove( &self, client: &OpsviewClient, ) -> Result<Value, OpsviewClientError>

Removes the object from the Opsview Server. Read more
Source§

async fn create( &self, client: &OpsviewClient, ) -> Result<Value, OpsviewClientError>

Creates the object on the Opsview Server if it doesn’t already exist.
Source§

async fn update( &self, client: &OpsviewClient, ) -> Result<Value, OpsviewClientError>

Updates the object on the Opsview Server if it exists, creates it if it doesn’t.
Source§

impl Serialize for SharedNotificationProfile

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for SharedNotificationProfile

Source§

impl StructuralPartialEq for SharedNotificationProfile

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, dst: *mut u8)

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

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> 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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

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

Source§

impl<T> MaybeSendSync for T