Struct datadog_api_client::datadogV1::model::model_host_map_widget_definition_style::HostMapWidgetDefinitionStyle
source · #[non_exhaustive]pub struct HostMapWidgetDefinitionStyle {
pub fill_max: Option<String>,
pub fill_min: Option<String>,
pub palette: Option<String>,
pub palette_flip: Option<bool>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}Expand description
The style to apply to the widget.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.fill_max: Option<String>Max value to use to color the map.
fill_min: Option<String>Min value to use to color the map.
palette: Option<String>Color palette to apply to the widget.
palette_flip: Option<bool>Whether to flip the palette tones.
additional_properties: BTreeMap<String, Value>Implementations§
source§impl HostMapWidgetDefinitionStyle
impl HostMapWidgetDefinitionStyle
sourcepub fn new() -> HostMapWidgetDefinitionStyle
pub fn new() -> HostMapWidgetDefinitionStyle
Examples found in repository?
examples/v1_dashboards_CreateDashboard_1200099236.rs (line 34)
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
async fn main() {
let body = Dashboard::new(
DashboardLayoutType::FREE,
"Example-Dashboard".to_string(),
vec![
Widget::new(WidgetDefinition::HostMapWidgetDefinition(Box::new(
HostMapWidgetDefinition::new(
HostMapWidgetDefinitionRequests::new().fill(
HostMapRequest::new().q("avg:system.cpu.user{*} by {host}".to_string()),
),
HostMapWidgetDefinitionType::HOSTMAP,
)
.no_group_hosts(true)
.no_metric_hosts(true)
.node_type(WidgetNodeType::HOST)
.style(
HostMapWidgetDefinitionStyle::new()
.palette("green_to_orange".to_string())
.palette_flip(false),
)
.title("".to_string())
.title_align(WidgetTextAlign::LEFT)
.title_size("16".to_string()),
)))
.layout(WidgetLayout::new(22, 47, 0, 0)),
],
)
.description(None)
.is_read_only(false)
.notify_list(Some(vec![]))
.template_variables(Some(vec![]));
let configuration = datadog::Configuration::new();
let api = DashboardsAPI::with_config(configuration);
let resp = api.create_dashboard(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}pub fn fill_max(self, value: String) -> Self
pub fn fill_min(self, value: String) -> Self
sourcepub fn palette(self, value: String) -> Self
pub fn palette(self, value: String) -> Self
Examples found in repository?
examples/v1_dashboards_CreateDashboard_1200099236.rs (line 35)
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
async fn main() {
let body = Dashboard::new(
DashboardLayoutType::FREE,
"Example-Dashboard".to_string(),
vec![
Widget::new(WidgetDefinition::HostMapWidgetDefinition(Box::new(
HostMapWidgetDefinition::new(
HostMapWidgetDefinitionRequests::new().fill(
HostMapRequest::new().q("avg:system.cpu.user{*} by {host}".to_string()),
),
HostMapWidgetDefinitionType::HOSTMAP,
)
.no_group_hosts(true)
.no_metric_hosts(true)
.node_type(WidgetNodeType::HOST)
.style(
HostMapWidgetDefinitionStyle::new()
.palette("green_to_orange".to_string())
.palette_flip(false),
)
.title("".to_string())
.title_align(WidgetTextAlign::LEFT)
.title_size("16".to_string()),
)))
.layout(WidgetLayout::new(22, 47, 0, 0)),
],
)
.description(None)
.is_read_only(false)
.notify_list(Some(vec![]))
.template_variables(Some(vec![]));
let configuration = datadog::Configuration::new();
let api = DashboardsAPI::with_config(configuration);
let resp = api.create_dashboard(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}sourcepub fn palette_flip(self, value: bool) -> Self
pub fn palette_flip(self, value: bool) -> Self
Examples found in repository?
examples/v1_dashboards_CreateDashboard_1200099236.rs (line 36)
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
async fn main() {
let body = Dashboard::new(
DashboardLayoutType::FREE,
"Example-Dashboard".to_string(),
vec![
Widget::new(WidgetDefinition::HostMapWidgetDefinition(Box::new(
HostMapWidgetDefinition::new(
HostMapWidgetDefinitionRequests::new().fill(
HostMapRequest::new().q("avg:system.cpu.user{*} by {host}".to_string()),
),
HostMapWidgetDefinitionType::HOSTMAP,
)
.no_group_hosts(true)
.no_metric_hosts(true)
.node_type(WidgetNodeType::HOST)
.style(
HostMapWidgetDefinitionStyle::new()
.palette("green_to_orange".to_string())
.palette_flip(false),
)
.title("".to_string())
.title_align(WidgetTextAlign::LEFT)
.title_size("16".to_string()),
)))
.layout(WidgetLayout::new(22, 47, 0, 0)),
],
)
.description(None)
.is_read_only(false)
.notify_list(Some(vec![]))
.template_variables(Some(vec![]));
let configuration = datadog::Configuration::new();
let api = DashboardsAPI::with_config(configuration);
let resp = api.create_dashboard(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
source§impl Clone for HostMapWidgetDefinitionStyle
impl Clone for HostMapWidgetDefinitionStyle
source§fn clone(&self) -> HostMapWidgetDefinitionStyle
fn clone(&self) -> HostMapWidgetDefinitionStyle
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for HostMapWidgetDefinitionStyle
impl Debug for HostMapWidgetDefinitionStyle
source§impl<'de> Deserialize<'de> for HostMapWidgetDefinitionStyle
impl<'de> Deserialize<'de> for HostMapWidgetDefinitionStyle
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for HostMapWidgetDefinitionStyle
impl PartialEq for HostMapWidgetDefinitionStyle
source§fn eq(&self, other: &HostMapWidgetDefinitionStyle) -> bool
fn eq(&self, other: &HostMapWidgetDefinitionStyle) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for HostMapWidgetDefinitionStyle
Auto Trait Implementations§
impl Freeze for HostMapWidgetDefinitionStyle
impl RefUnwindSafe for HostMapWidgetDefinitionStyle
impl Send for HostMapWidgetDefinitionStyle
impl Sync for HostMapWidgetDefinitionStyle
impl Unpin for HostMapWidgetDefinitionStyle
impl UnwindSafe for HostMapWidgetDefinitionStyle
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)