pub struct Role {Show 22 fields
pub name: String,
pub access_hostgroups: Option<ConfigRefMap<HostGroupRef>>,
pub access_keywords: Option<ConfigRefMap<HashtagRef>>,
pub access_servicegroups: Option<ConfigRefMap<ServiceGroupRef>>,
pub accesses: Option<HashSet<Access>>,
pub all_bsm_components: Option<bool>,
pub all_bsm_edit: Option<bool>,
pub all_bsm_view: Option<bool>,
pub all_hostgroups: Option<bool>,
pub all_keywords: Option<bool>,
pub all_monitoringservers: Option<bool>,
pub all_remotely_managed_clusters: Option<bool>,
pub all_servicegroups: Option<bool>,
pub contacts: Option<ConfigRefMap<ContactRef>>,
pub description: Option<String>,
pub hostgroups: Option<ConfigRefMap<HostGroupRef>>,
pub monitoringservers: Option<ConfigObjectMap<MonitoringServer>>,
pub remotely_managed_clusters: Option<ConfigRefMap<MonitoringClusterRef>>,
pub tenancy: Option<TenancyRef>,
pub id: Option<u64>,
pub ref_: Option<String>,
pub uncommitted: Option<bool>,
}Expand description
Represents a Role in Opsview.
Roles are used to define a set of permissions for users within the Opsview system.
This struct defines the structure for a role entity as used in Opsview.
Fields§
§name: StringThe name of the Role.
access_hostgroups: Option<ConfigRefMap<HostGroupRef>>ConfigRefMap of HostGroupRef objects that the Role has access to.
access_keywords: Option<ConfigRefMap<HashtagRef>>ConfigRefMap of HashtagRef objects that the Role has access to.
access_servicegroups: Option<ConfigRefMap<ServiceGroupRef>>ConfigRefMap of ServiceGroupRef objects that the Role has access to.
accesses: Option<HashSet<Access>>§all_bsm_components: Option<bool>A boolean indicating whether the Role has access to all super::BSMComponents.
Default: Some(false).
all_bsm_edit: Option<bool>A boolean indicating whether the Role has access to all BSM edit operations.
Some(false).
all_bsm_view: Option<bool>A boolean indicating whether the Role has access to all BSM view operations.
Some(false).
all_hostgroups: Option<bool>A boolean indicating whether the Role has access to all HostGroups.
Some(false).
all_keywords: Option<bool>A boolean indicating whether the Role has access to all Hashtags.
Some(false).
all_monitoringservers: Option<bool>A boolean indicating whether the Role has access to all monitoring servers.
Some(false).
all_remotely_managed_clusters: Option<bool>A boolean indicating whether the Role has access to all remotely managed clusters.
Some(false).
all_servicegroups: Option<bool>A boolean indicating whether the Role has access to all ServiceGroups.
Some(false).
contacts: Option<ConfigRefMap<ContactRef>>ConfigRefMap of ContactRef objects associated with this role.
description: Option<String>A description of the Role.
hostgroups: Option<ConfigRefMap<HostGroupRef>>ConfigRefMap of HostGroupRef objects associated with this role.
monitoringservers: Option<ConfigObjectMap<MonitoringServer>>ConfigObjectMap of MonitoringServer objects associated with this role.
remotely_managed_clusters: Option<ConfigRefMap<MonitoringClusterRef>>ConfigRefMap of remotely managed MonitoringClusterRef objects associated with this role.
tenancy: Option<TenancyRef>The TenancyRef of the Role.
id: Option<u64>The unique identifier of the Role.
ref_: Option<String>A reference string unique to this Role.
uncommitted: Option<bool>A boolean indicating whether the Role is uncommitted.
Trait Implementations§
Source§impl ConfigObject for Role
impl ConfigObject for Role
Source§fn config_path() -> Option<String>
fn config_path() -> Option<String>
Source§fn unique_name(&self) -> String
fn unique_name(&self) -> String
Returns the unique name of the Role object.
This name is used to identify the Role when building the HashMap for an
ConfigObjectMap.
§Returns
A string representing the unique name of the Role.
type Builder = RoleBuilder
fn minimal(name: &str) -> Result<Self, OpsviewConfigError>
Source§impl CreateFromJson for Role
Enables the creation of a Role instance from a JSON representation.
Typically used when parsing JSON data from the Opsview API.
impl CreateFromJson for Role
Enables the creation of a Role instance from a JSON representation.
Typically used when parsing JSON data from the Opsview API.
Source§impl<'de> Deserialize<'de> for Role
impl<'de> Deserialize<'de> for Role
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Persistent for Role
impl Persistent for Role
fn name_regex(&self) -> Option<String>
fn validated_name(&self, name: &str) -> Result<String, OpsviewConfigError>
fn set_name(&mut self, new_name: &str) -> Result<String, OpsviewConfigError>
fn clear_readonly(&mut self)
Source§fn clone_new_name(
original: &Self,
new_name: &str,
) -> Result<Self, OpsviewConfigError>
fn clone_new_name( original: &Self, new_name: &str, ) -> Result<Self, OpsviewConfigError>
Source§async fn exists(
&self,
client: &OpsviewClient,
) -> Result<bool, OpsviewClientError>
async fn exists( &self, client: &OpsviewClient, ) -> Result<bool, OpsviewClientError>
Source§async fn fetch(
&self,
client: &OpsviewClient,
params: Option<Params>,
) -> Result<Self, OpsviewClientError>
async fn fetch( &self, client: &OpsviewClient, params: Option<Params>, ) -> Result<Self, OpsviewClientError>
Source§async fn remove(
&self,
client: &OpsviewClient,
) -> Result<Value, OpsviewClientError>
async fn remove( &self, client: &OpsviewClient, ) -> Result<Value, OpsviewClientError>
Source§async fn create(
&self,
client: &OpsviewClient,
) -> Result<Value, OpsviewClientError>
async fn create( &self, client: &OpsviewClient, ) -> Result<Value, OpsviewClientError>
Source§async fn update(
&self,
client: &OpsviewClient,
) -> Result<Value, OpsviewClientError>
async fn update( &self, client: &OpsviewClient, ) -> Result<Value, OpsviewClientError>
impl Eq for Role
impl StructuralPartialEq for Role
Auto Trait Implementations§
impl Freeze for Role
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnwindSafe for Role
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.