pub struct NetflowCollector {
pub name: String,
pub monitoring_server: Option<MonitoringClusterRef>,
pub port: Option<u64>,
pub sources: Option<ConfigObjectMap<NetflowSource>>,
pub sport: Option<u64>,
pub id: Option<u64>,
pub ref_: Option<String>,
pub uncommitted: Option<bool>,
}Expand description
Represents a NetflowCollector in Opsview.
Netflow collectors are used to collect Netflow data from network devices. This struct defines the structure for a Netflow collector entity as used in Opsview.
§Example
use opsview::config::{NetflowCollector, MonitoringCluster};
use opsview::prelude::*;
let my_monitoring_cluster = MonitoringCluster::minimal("My Monitoring Cluster").unwrap();
let netflow_collector = NetflowCollector::builder()
.name("My Netflow Collector")
.monitoring_server(my_monitoring_cluster)
.build()
.unwrap();
assert_eq!(netflow_collector.name, "My Netflow Collector".to_string());Fields§
§name: StringThe name of the NetflowCollector.
monitoring_server: Option<MonitoringClusterRef>The MonitoringClusterRef associated with this NetflowCollector.
port: Option<u64>The port number used by the NetflowCollector.
Default: Some(9995)
sources: Option<ConfigObjectMap<NetflowSource>>ConfigObjectMap of NetflowSource objects associated with this NetflowCollector.
sport: Option<u64>The port number used by the NetflowCollector for secure connections.
Default: Some(6343)
id: Option<u64>The unique identifier of the NetflowCollector.
ref_: Option<String>A reference string unique to this NetflowCollector.
uncommitted: Option<bool>A boolean indicating whether the collector is uncommitted.
Trait Implementations§
Source§impl Clone for NetflowCollector
impl Clone for NetflowCollector
Source§fn clone(&self) -> NetflowCollector
fn clone(&self) -> NetflowCollector
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ConfigObject for NetflowCollector
impl ConfigObject for NetflowCollector
Source§fn builder() -> Self::Builder
fn builder() -> Self::Builder
Returns a builder for constructing a NetflowCollector object.
§Returns
A super::MonitoringClusterBuilder object.
Source§fn config_path() -> Option<String>
fn config_path() -> Option<String>
Provides the configuration path for a NetflowCollector object within the Opsview system.
§Returns
A string representing the API path where NetflowCollectors are configured.
Source§fn unique_name(&self) -> String
fn unique_name(&self) -> String
Returns the unique name of the NetflowCollector object.
This name is used to identify the NetflowCollector when building the HashMap for an
ConfigObjectMap.
type Builder = NetflowCollectorBuilder
fn minimal(name: &str) -> Result<Self, OpsviewConfigError>
Source§impl CreateFromJson for NetflowCollector
Enables the creation of a NetflowCollector instance from a JSON representation.
Typically used when parsing JSON data from the Opsview API.
impl CreateFromJson for NetflowCollector
Enables the creation of a NetflowCollector instance from a JSON representation.
Typically used when parsing JSON data from the Opsview API.
Source§impl Debug for NetflowCollector
impl Debug for NetflowCollector
Source§impl Default for NetflowCollector
impl Default for NetflowCollector
Source§fn default() -> Self
fn default() -> Self
Creates a new instance of NetflowCollector with default values.
Initializes a new NetflowCollector object with all fields in their default state.
Source§impl<'de> Deserialize<'de> for NetflowCollector
impl<'de> Deserialize<'de> for NetflowCollector
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 PartialEq for NetflowCollector
impl PartialEq for NetflowCollector
Source§impl Persistent for NetflowCollector
impl Persistent for NetflowCollector
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>
Source§impl Serialize for NetflowCollector
impl Serialize for NetflowCollector
impl Eq for NetflowCollector
impl StructuralPartialEq for NetflowCollector
Auto Trait Implementations§
impl Freeze for NetflowCollector
impl RefUnwindSafe for NetflowCollector
impl Send for NetflowCollector
impl Sync for NetflowCollector
impl Unpin for NetflowCollector
impl UnwindSafe for NetflowCollector
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.