pub struct ManagementURL {
pub name: String,
pub url: Option<String>,
pub id: Option<u64>,
}Expand description
Represents a ManagementURL in Opsview.
There is no API endpoint for managing management urls, so this struct is only used as a component of other entities.
This struct defines the structure for a management url entity as used in Opsview.
§Example
use opsview::config::ManagementURL;
use opsview::prelude::*;
let management_url = ManagementURL::builder()
.name("My Management URL")
.url("https://www.example.com")
.build()
.unwrap();
assert_eq!(management_url.name, "My Management URL".to_string());Fields§
§name: StringThe name of the ManagementURL. This is used as a unique identifier per user, but is not
unique across all users.
url: Option<String>URL associated with this ManagementURL.
id: Option<u64>The unique identifier of the ManagementURL.
Trait Implementations§
Source§impl Clone for ManagementURL
impl Clone for ManagementURL
Source§fn clone(&self) -> ManagementURL
fn clone(&self) -> ManagementURL
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ConfigObject for ManagementURL
impl ConfigObject for ManagementURL
Source§fn builder() -> Self::Builder
fn builder() -> Self::Builder
Returns a builder for constructing a ManagementURL object.
Source§fn unique_name(&self) -> String
fn unique_name(&self) -> String
Returns the unique name of the ManagementURL object.
This name is used to identify the ManagementURL when building the HashMap for a
ConfigObjectMap. Since the name is not unique across all users, the last 5 characters
of the URL are appended to the name to ensure uniqueness. If the URL is less than 5
characters, the entire URL is appended to the name, regardless of length.
§Returns
A string representing the unique name of the ManagementURL entity.
type Builder = ManagementURLBuilder
fn minimal(name: &str) -> Result<Self, OpsviewConfigError>
Source§impl CreateFromJson for ManagementURL
Enables the creation of a ManagementURL instance from a JSON representation.
Typically used when parsing JSON data from the Opsview API.
impl CreateFromJson for ManagementURL
Enables the creation of a ManagementURL instance from a JSON representation.
Typically used when parsing JSON data from the Opsview API.
Source§impl Debug for ManagementURL
impl Debug for ManagementURL
Source§impl Default for ManagementURL
impl Default for ManagementURL
Source§fn default() -> ManagementURL
fn default() -> ManagementURL
Source§impl<'de> Deserialize<'de> for ManagementURL
impl<'de> Deserialize<'de> for ManagementURL
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 ManagementURL
impl PartialEq for ManagementURL
Source§impl Serialize for ManagementURL
impl Serialize for ManagementURL
impl Eq for ManagementURL
impl StructuralPartialEq for ManagementURL
Auto Trait Implementations§
impl Freeze for ManagementURL
impl RefUnwindSafe for ManagementURL
impl Send for ManagementURL
impl Sync for ManagementURL
impl Unpin for ManagementURL
impl UnwindSafe for ManagementURL
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.