Struct datadog_api_client::datadogV1::model::model_event_stream_widget_definition::EventStreamWidgetDefinition
source · #[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: StringQuery 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_: EventStreamWidgetDefinitionTypeType 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)
15 16 17 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
async fn main() {
let body = Dashboard::new(
DashboardLayoutType::FREE,
"Example-Dashboard".to_string(),
vec![
Widget::new(WidgetDefinition::EventStreamWidgetDefinition(Box::new(
EventStreamWidgetDefinition::new(
"example-query".to_string(),
EventStreamWidgetDefinitionType::EVENT_STREAM,
)
.event_size(WidgetEventSize::SMALL)
.tags_execution("and".to_string())
.title("".to_string())
.title_align(WidgetTextAlign::LEFT)
.title_size("16".to_string()),
)))
.layout(WidgetLayout::new(38, 47, 0, 0)),
],
)
.description(Some("".to_string()))
.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 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)
15 16 17 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
async fn main() {
let body = Dashboard::new(
DashboardLayoutType::FREE,
"Example-Dashboard".to_string(),
vec![
Widget::new(WidgetDefinition::EventStreamWidgetDefinition(Box::new(
EventStreamWidgetDefinition::new(
"example-query".to_string(),
EventStreamWidgetDefinitionType::EVENT_STREAM,
)
.event_size(WidgetEventSize::SMALL)
.tags_execution("and".to_string())
.title("".to_string())
.title_align(WidgetTextAlign::LEFT)
.title_size("16".to_string()),
)))
.layout(WidgetLayout::new(38, 47, 0, 0)),
],
)
.description(Some("".to_string()))
.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());
}
}Examples found in repository?
examples/v1_dashboards_CreateDashboard_2634813877.rs (line 26)
15 16 17 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
async fn main() {
let body = Dashboard::new(
DashboardLayoutType::FREE,
"Example-Dashboard".to_string(),
vec![
Widget::new(WidgetDefinition::EventStreamWidgetDefinition(Box::new(
EventStreamWidgetDefinition::new(
"example-query".to_string(),
EventStreamWidgetDefinitionType::EVENT_STREAM,
)
.event_size(WidgetEventSize::SMALL)
.tags_execution("and".to_string())
.title("".to_string())
.title_align(WidgetTextAlign::LEFT)
.title_size("16".to_string()),
)))
.layout(WidgetLayout::new(38, 47, 0, 0)),
],
)
.description(Some("".to_string()))
.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 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)
15 16 17 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
async fn main() {
let body = Dashboard::new(
DashboardLayoutType::FREE,
"Example-Dashboard".to_string(),
vec![
Widget::new(WidgetDefinition::EventStreamWidgetDefinition(Box::new(
EventStreamWidgetDefinition::new(
"example-query".to_string(),
EventStreamWidgetDefinitionType::EVENT_STREAM,
)
.event_size(WidgetEventSize::SMALL)
.tags_execution("and".to_string())
.title("".to_string())
.title_align(WidgetTextAlign::LEFT)
.title_size("16".to_string()),
)))
.layout(WidgetLayout::new(38, 47, 0, 0)),
],
)
.description(Some("".to_string()))
.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 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)
15 16 17 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
async fn main() {
let body = Dashboard::new(
DashboardLayoutType::FREE,
"Example-Dashboard".to_string(),
vec![
Widget::new(WidgetDefinition::EventStreamWidgetDefinition(Box::new(
EventStreamWidgetDefinition::new(
"example-query".to_string(),
EventStreamWidgetDefinitionType::EVENT_STREAM,
)
.event_size(WidgetEventSize::SMALL)
.tags_execution("and".to_string())
.title("".to_string())
.title_align(WidgetTextAlign::LEFT)
.title_size("16".to_string()),
)))
.layout(WidgetLayout::new(38, 47, 0, 0)),
],
)
.description(Some("".to_string()))
.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 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)
15 16 17 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
async fn main() {
let body = Dashboard::new(
DashboardLayoutType::FREE,
"Example-Dashboard".to_string(),
vec![
Widget::new(WidgetDefinition::EventStreamWidgetDefinition(Box::new(
EventStreamWidgetDefinition::new(
"example-query".to_string(),
EventStreamWidgetDefinitionType::EVENT_STREAM,
)
.event_size(WidgetEventSize::SMALL)
.tags_execution("and".to_string())
.title("".to_string())
.title_align(WidgetTextAlign::LEFT)
.title_size("16".to_string()),
)))
.layout(WidgetLayout::new(38, 47, 0, 0)),
],
)
.description(Some("".to_string()))
.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 EventStreamWidgetDefinition
impl Clone for EventStreamWidgetDefinition
source§fn clone(&self) -> EventStreamWidgetDefinition
fn clone(&self) -> EventStreamWidgetDefinition
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 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
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)