#[non_exhaustive]pub struct ServiceMapWidgetDefinition {
pub custom_links: Option<Vec<WidgetCustomLink>>,
pub filters: Vec<String>,
pub service: String,
pub title: Option<String>,
pub title_align: Option<WidgetTextAlign>,
pub title_size: Option<String>,
pub type_: ServiceMapWidgetDefinitionType,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
This widget displays a map of a service to all of the services that call it, and all of the services that it calls.
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.custom_links: Option<Vec<WidgetCustomLink>>
List of custom links.
filters: Vec<String>
Your environment and primary tag (or * if enabled for your account).
service: String
The ID of the service you want to map.
title: Option<String>
The title of your widget.
title_align: Option<WidgetTextAlign>
How to align the text on the widget.
title_size: Option<String>
Size of the title.
type_: ServiceMapWidgetDefinitionType
Type of the service map widget.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl ServiceMapWidgetDefinition
impl ServiceMapWidgetDefinition
Sourcepub fn new(
filters: Vec<String>,
service: String,
type_: ServiceMapWidgetDefinitionType,
) -> ServiceMapWidgetDefinition
pub fn new( filters: Vec<String>, service: String, type_: ServiceMapWidgetDefinitionType, ) -> ServiceMapWidgetDefinition
Examples found in repository?
examples/v1_dashboards_CreateDashboard_2034634967.rs (lines 20-24)
14async fn main() {
15 let body = Dashboard::new(
16 DashboardLayoutType::FREE,
17 "Example-Dashboard".to_string(),
18 vec![
19 Widget::new(WidgetDefinition::ServiceMapWidgetDefinition(Box::new(
20 ServiceMapWidgetDefinition::new(
21 vec!["env:none".to_string(), "environment:*".to_string()],
22 "".to_string(),
23 ServiceMapWidgetDefinitionType::SERVICEMAP,
24 )
25 .title("".to_string())
26 .title_align(WidgetTextAlign::LEFT)
27 .title_size("16".to_string()),
28 )))
29 .layout(WidgetLayout::new(15, 47, 0, 0)),
30 ],
31 )
32 .description(Some("".to_string()))
33 .notify_list(Some(vec![]))
34 .template_variables(Some(vec![]));
35 let configuration = datadog::Configuration::new();
36 let api = DashboardsAPI::with_config(configuration);
37 let resp = api.create_dashboard(body).await;
38 if let Ok(value) = resp {
39 println!("{:#?}", value);
40 } else {
41 println!("{:#?}", resp.unwrap_err());
42 }
43}
pub fn custom_links(self, value: Vec<WidgetCustomLink>) -> Self
Sourcepub fn title(self, value: String) -> Self
pub fn title(self, value: String) -> Self
Examples found in repository?
examples/v1_dashboards_CreateDashboard_2034634967.rs (line 25)
14async fn main() {
15 let body = Dashboard::new(
16 DashboardLayoutType::FREE,
17 "Example-Dashboard".to_string(),
18 vec![
19 Widget::new(WidgetDefinition::ServiceMapWidgetDefinition(Box::new(
20 ServiceMapWidgetDefinition::new(
21 vec!["env:none".to_string(), "environment:*".to_string()],
22 "".to_string(),
23 ServiceMapWidgetDefinitionType::SERVICEMAP,
24 )
25 .title("".to_string())
26 .title_align(WidgetTextAlign::LEFT)
27 .title_size("16".to_string()),
28 )))
29 .layout(WidgetLayout::new(15, 47, 0, 0)),
30 ],
31 )
32 .description(Some("".to_string()))
33 .notify_list(Some(vec![]))
34 .template_variables(Some(vec![]));
35 let configuration = datadog::Configuration::new();
36 let api = DashboardsAPI::with_config(configuration);
37 let resp = api.create_dashboard(body).await;
38 if let Ok(value) = resp {
39 println!("{:#?}", value);
40 } else {
41 println!("{:#?}", resp.unwrap_err());
42 }
43}
Sourcepub fn title_align(self, value: WidgetTextAlign) -> Self
pub fn title_align(self, value: WidgetTextAlign) -> Self
Examples found in repository?
examples/v1_dashboards_CreateDashboard_2034634967.rs (line 26)
14async fn main() {
15 let body = Dashboard::new(
16 DashboardLayoutType::FREE,
17 "Example-Dashboard".to_string(),
18 vec![
19 Widget::new(WidgetDefinition::ServiceMapWidgetDefinition(Box::new(
20 ServiceMapWidgetDefinition::new(
21 vec!["env:none".to_string(), "environment:*".to_string()],
22 "".to_string(),
23 ServiceMapWidgetDefinitionType::SERVICEMAP,
24 )
25 .title("".to_string())
26 .title_align(WidgetTextAlign::LEFT)
27 .title_size("16".to_string()),
28 )))
29 .layout(WidgetLayout::new(15, 47, 0, 0)),
30 ],
31 )
32 .description(Some("".to_string()))
33 .notify_list(Some(vec![]))
34 .template_variables(Some(vec![]));
35 let configuration = datadog::Configuration::new();
36 let api = DashboardsAPI::with_config(configuration);
37 let resp = api.create_dashboard(body).await;
38 if let Ok(value) = resp {
39 println!("{:#?}", value);
40 } else {
41 println!("{:#?}", resp.unwrap_err());
42 }
43}
Sourcepub fn title_size(self, value: String) -> Self
pub fn title_size(self, value: String) -> Self
Examples found in repository?
examples/v1_dashboards_CreateDashboard_2034634967.rs (line 27)
14async fn main() {
15 let body = Dashboard::new(
16 DashboardLayoutType::FREE,
17 "Example-Dashboard".to_string(),
18 vec![
19 Widget::new(WidgetDefinition::ServiceMapWidgetDefinition(Box::new(
20 ServiceMapWidgetDefinition::new(
21 vec!["env:none".to_string(), "environment:*".to_string()],
22 "".to_string(),
23 ServiceMapWidgetDefinitionType::SERVICEMAP,
24 )
25 .title("".to_string())
26 .title_align(WidgetTextAlign::LEFT)
27 .title_size("16".to_string()),
28 )))
29 .layout(WidgetLayout::new(15, 47, 0, 0)),
30 ],
31 )
32 .description(Some("".to_string()))
33 .notify_list(Some(vec![]))
34 .template_variables(Some(vec![]));
35 let configuration = datadog::Configuration::new();
36 let api = DashboardsAPI::with_config(configuration);
37 let resp = api.create_dashboard(body).await;
38 if let Ok(value) = resp {
39 println!("{:#?}", value);
40 } else {
41 println!("{:#?}", resp.unwrap_err());
42 }
43}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for ServiceMapWidgetDefinition
impl Clone for ServiceMapWidgetDefinition
Source§fn clone(&self) -> ServiceMapWidgetDefinition
fn clone(&self) -> ServiceMapWidgetDefinition
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 ServiceMapWidgetDefinition
impl Debug for ServiceMapWidgetDefinition
Source§impl<'de> Deserialize<'de> for ServiceMapWidgetDefinition
impl<'de> Deserialize<'de> for ServiceMapWidgetDefinition
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
impl StructuralPartialEq for ServiceMapWidgetDefinition
Auto Trait Implementations§
impl Freeze for ServiceMapWidgetDefinition
impl RefUnwindSafe for ServiceMapWidgetDefinition
impl Send for ServiceMapWidgetDefinition
impl Sync for ServiceMapWidgetDefinition
impl Unpin for ServiceMapWidgetDefinition
impl UnwindSafe for ServiceMapWidgetDefinition
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