#[non_exhaustive]pub struct EventStreamWidgetDefinition {
pub event_size: Option<WidgetEventSize>,
pub query: String,
pub tags_execution: Option<String>,
pub time: Option<WidgetTime>,
pub title: Option<String>,
pub title_align: Option<WidgetTextAlign>,
pub title_size: Option<String>,
pub type_: EventStreamWidgetDefinitionType,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
The event stream is a widget version of the stream of events on the Event Stream view. Only available on FREE layout dashboards.
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.event_size: Option<WidgetEventSize>
Size to use to display an event.
query: String
Query to filter the event stream with.
The execution method for multi-value filters. Can be either and or or.
time: Option<WidgetTime>
Time setting for the widget.
title: Option<String>
Title of the widget.
title_align: Option<WidgetTextAlign>
How to align the text on the widget.
title_size: Option<String>
Size of the title.
type_: EventStreamWidgetDefinitionType
Type of the event stream widget.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl EventStreamWidgetDefinition
impl EventStreamWidgetDefinition
Sourcepub fn new(
query: String,
type_: EventStreamWidgetDefinitionType,
) -> EventStreamWidgetDefinition
pub fn new( query: String, type_: EventStreamWidgetDefinitionType, ) -> EventStreamWidgetDefinition
Examples found in repository?
examples/v1_dashboards_CreateDashboard_2634813877.rs (lines 21-24)
15async fn main() {
16 let body = Dashboard::new(
17 DashboardLayoutType::FREE,
18 "Example-Dashboard".to_string(),
19 vec![
20 Widget::new(WidgetDefinition::EventStreamWidgetDefinition(Box::new(
21 EventStreamWidgetDefinition::new(
22 "example-query".to_string(),
23 EventStreamWidgetDefinitionType::EVENT_STREAM,
24 )
25 .event_size(WidgetEventSize::SMALL)
26 .tags_execution("and".to_string())
27 .title("".to_string())
28 .title_align(WidgetTextAlign::LEFT)
29 .title_size("16".to_string()),
30 )))
31 .layout(WidgetLayout::new(38, 47, 0, 0)),
32 ],
33 )
34 .description(Some("".to_string()))
35 .notify_list(Some(vec![]))
36 .template_variables(Some(vec![]));
37 let configuration = datadog::Configuration::new();
38 let api = DashboardsAPI::with_config(configuration);
39 let resp = api.create_dashboard(body).await;
40 if let Ok(value) = resp {
41 println!("{:#?}", value);
42 } else {
43 println!("{:#?}", resp.unwrap_err());
44 }
45}
Sourcepub fn event_size(self, value: WidgetEventSize) -> Self
pub fn event_size(self, value: WidgetEventSize) -> Self
Examples found in repository?
examples/v1_dashboards_CreateDashboard_2634813877.rs (line 25)
15async fn main() {
16 let body = Dashboard::new(
17 DashboardLayoutType::FREE,
18 "Example-Dashboard".to_string(),
19 vec![
20 Widget::new(WidgetDefinition::EventStreamWidgetDefinition(Box::new(
21 EventStreamWidgetDefinition::new(
22 "example-query".to_string(),
23 EventStreamWidgetDefinitionType::EVENT_STREAM,
24 )
25 .event_size(WidgetEventSize::SMALL)
26 .tags_execution("and".to_string())
27 .title("".to_string())
28 .title_align(WidgetTextAlign::LEFT)
29 .title_size("16".to_string()),
30 )))
31 .layout(WidgetLayout::new(38, 47, 0, 0)),
32 ],
33 )
34 .description(Some("".to_string()))
35 .notify_list(Some(vec![]))
36 .template_variables(Some(vec![]));
37 let configuration = datadog::Configuration::new();
38 let api = DashboardsAPI::with_config(configuration);
39 let resp = api.create_dashboard(body).await;
40 if let Ok(value) = resp {
41 println!("{:#?}", value);
42 } else {
43 println!("{:#?}", resp.unwrap_err());
44 }
45}
Examples found in repository?
examples/v1_dashboards_CreateDashboard_2634813877.rs (line 26)
15async fn main() {
16 let body = Dashboard::new(
17 DashboardLayoutType::FREE,
18 "Example-Dashboard".to_string(),
19 vec![
20 Widget::new(WidgetDefinition::EventStreamWidgetDefinition(Box::new(
21 EventStreamWidgetDefinition::new(
22 "example-query".to_string(),
23 EventStreamWidgetDefinitionType::EVENT_STREAM,
24 )
25 .event_size(WidgetEventSize::SMALL)
26 .tags_execution("and".to_string())
27 .title("".to_string())
28 .title_align(WidgetTextAlign::LEFT)
29 .title_size("16".to_string()),
30 )))
31 .layout(WidgetLayout::new(38, 47, 0, 0)),
32 ],
33 )
34 .description(Some("".to_string()))
35 .notify_list(Some(vec![]))
36 .template_variables(Some(vec![]));
37 let configuration = datadog::Configuration::new();
38 let api = DashboardsAPI::with_config(configuration);
39 let resp = api.create_dashboard(body).await;
40 if let Ok(value) = resp {
41 println!("{:#?}", value);
42 } else {
43 println!("{:#?}", resp.unwrap_err());
44 }
45}
pub fn time(self, value: WidgetTime) -> Self
Sourcepub fn title(self, value: String) -> Self
pub fn title(self, value: String) -> Self
Examples found in repository?
examples/v1_dashboards_CreateDashboard_2634813877.rs (line 27)
15async fn main() {
16 let body = Dashboard::new(
17 DashboardLayoutType::FREE,
18 "Example-Dashboard".to_string(),
19 vec![
20 Widget::new(WidgetDefinition::EventStreamWidgetDefinition(Box::new(
21 EventStreamWidgetDefinition::new(
22 "example-query".to_string(),
23 EventStreamWidgetDefinitionType::EVENT_STREAM,
24 )
25 .event_size(WidgetEventSize::SMALL)
26 .tags_execution("and".to_string())
27 .title("".to_string())
28 .title_align(WidgetTextAlign::LEFT)
29 .title_size("16".to_string()),
30 )))
31 .layout(WidgetLayout::new(38, 47, 0, 0)),
32 ],
33 )
34 .description(Some("".to_string()))
35 .notify_list(Some(vec![]))
36 .template_variables(Some(vec![]));
37 let configuration = datadog::Configuration::new();
38 let api = DashboardsAPI::with_config(configuration);
39 let resp = api.create_dashboard(body).await;
40 if let Ok(value) = resp {
41 println!("{:#?}", value);
42 } else {
43 println!("{:#?}", resp.unwrap_err());
44 }
45}
Sourcepub fn title_align(self, value: WidgetTextAlign) -> Self
pub fn title_align(self, value: WidgetTextAlign) -> Self
Examples found in repository?
examples/v1_dashboards_CreateDashboard_2634813877.rs (line 28)
15async fn main() {
16 let body = Dashboard::new(
17 DashboardLayoutType::FREE,
18 "Example-Dashboard".to_string(),
19 vec![
20 Widget::new(WidgetDefinition::EventStreamWidgetDefinition(Box::new(
21 EventStreamWidgetDefinition::new(
22 "example-query".to_string(),
23 EventStreamWidgetDefinitionType::EVENT_STREAM,
24 )
25 .event_size(WidgetEventSize::SMALL)
26 .tags_execution("and".to_string())
27 .title("".to_string())
28 .title_align(WidgetTextAlign::LEFT)
29 .title_size("16".to_string()),
30 )))
31 .layout(WidgetLayout::new(38, 47, 0, 0)),
32 ],
33 )
34 .description(Some("".to_string()))
35 .notify_list(Some(vec![]))
36 .template_variables(Some(vec![]));
37 let configuration = datadog::Configuration::new();
38 let api = DashboardsAPI::with_config(configuration);
39 let resp = api.create_dashboard(body).await;
40 if let Ok(value) = resp {
41 println!("{:#?}", value);
42 } else {
43 println!("{:#?}", resp.unwrap_err());
44 }
45}
Sourcepub fn title_size(self, value: String) -> Self
pub fn title_size(self, value: String) -> Self
Examples found in repository?
examples/v1_dashboards_CreateDashboard_2634813877.rs (line 29)
15async fn main() {
16 let body = Dashboard::new(
17 DashboardLayoutType::FREE,
18 "Example-Dashboard".to_string(),
19 vec![
20 Widget::new(WidgetDefinition::EventStreamWidgetDefinition(Box::new(
21 EventStreamWidgetDefinition::new(
22 "example-query".to_string(),
23 EventStreamWidgetDefinitionType::EVENT_STREAM,
24 )
25 .event_size(WidgetEventSize::SMALL)
26 .tags_execution("and".to_string())
27 .title("".to_string())
28 .title_align(WidgetTextAlign::LEFT)
29 .title_size("16".to_string()),
30 )))
31 .layout(WidgetLayout::new(38, 47, 0, 0)),
32 ],
33 )
34 .description(Some("".to_string()))
35 .notify_list(Some(vec![]))
36 .template_variables(Some(vec![]));
37 let configuration = datadog::Configuration::new();
38 let api = DashboardsAPI::with_config(configuration);
39 let resp = api.create_dashboard(body).await;
40 if let Ok(value) = resp {
41 println!("{:#?}", value);
42 } else {
43 println!("{:#?}", resp.unwrap_err());
44 }
45}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for EventStreamWidgetDefinition
impl Clone for EventStreamWidgetDefinition
Source§fn clone(&self) -> EventStreamWidgetDefinition
fn clone(&self) -> EventStreamWidgetDefinition
Returns a duplicate 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 EventStreamWidgetDefinition
impl Debug for EventStreamWidgetDefinition
Source§impl<'de> Deserialize<'de> for EventStreamWidgetDefinition
impl<'de> Deserialize<'de> for EventStreamWidgetDefinition
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 EventStreamWidgetDefinition
Auto Trait Implementations§
impl Freeze for EventStreamWidgetDefinition
impl RefUnwindSafe for EventStreamWidgetDefinition
impl Send for EventStreamWidgetDefinition
impl Sync for EventStreamWidgetDefinition
impl Unpin for EventStreamWidgetDefinition
impl UnwindSafe for EventStreamWidgetDefinition
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