QueryValueWidgetDefinition

Struct QueryValueWidgetDefinition 

Source
#[non_exhaustive]
pub struct QueryValueWidgetDefinition {
Show 13 fields pub autoscale: Option<bool>, pub custom_links: Option<Vec<WidgetCustomLink>>, pub custom_unit: Option<String>, pub precision: Option<i64>, pub requests: Vec<QueryValueWidgetRequest>, pub text_align: Option<WidgetTextAlign>, pub time: Option<WidgetTime>, pub timeseries_background: Option<TimeseriesBackground>, pub title: Option<String>, pub title_align: Option<WidgetTextAlign>, pub title_size: Option<String>, pub type_: QueryValueWidgetDefinitionType, pub additional_properties: BTreeMap<String, Value>, /* private fields */
}
Expand description

Query values display the current value of a given metric, APM, or log query.

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.
§autoscale: Option<bool>

Whether to use auto-scaling or not.

§custom_links: Option<Vec<WidgetCustomLink>>

List of custom links.

§custom_unit: Option<String>

Display a unit of your choice on the widget.

§precision: Option<i64>

Number of decimals to show. If not defined, the widget uses the raw value.

§requests: Vec<QueryValueWidgetRequest>

Widget definition.

§text_align: Option<WidgetTextAlign>

How to align the text on the widget.

§time: Option<WidgetTime>

Time setting for the widget.

§timeseries_background: Option<TimeseriesBackground>

Set a timeseries on the widget background.

§title: Option<String>

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_: QueryValueWidgetDefinitionType

Type of the query value widget.

§additional_properties: BTreeMap<String, Value>

Implementations§

Source§

impl QueryValueWidgetDefinition

Source

pub fn new( requests: Vec<QueryValueWidgetRequest>, type_: QueryValueWidgetDefinitionType, ) -> QueryValueWidgetDefinition

Examples found in repository?
examples/v1_dashboards_CreateDashboard_2349863258.rs (lines 31-51)
22async fn main() {
23    let body =
24        Dashboard::new(
25            DashboardLayoutType::FREE,
26            "Example-Dashboard".to_string(),
27            vec![
28                Widget::new(
29                    WidgetDefinition::QueryValueWidgetDefinition(
30                        Box::new(
31                            QueryValueWidgetDefinition::new(
32                                vec![
33                                    QueryValueWidgetRequest::new()
34                                        .queries(
35                                            vec![
36                                                FormulaAndFunctionQueryDefinition
37                                                ::FormulaAndFunctionMetricQueryDefinition(
38                                                    Box::new(
39                                                        FormulaAndFunctionMetricQueryDefinition::new(
40                                                            FormulaAndFunctionMetricDataSource::METRICS,
41                                                            "query1".to_string(),
42                                                            "avg:system.cpu.user{*}".to_string(),
43                                                        ).aggregator(FormulaAndFunctionMetricAggregation::AVG),
44                                                    ),
45                                                )
46                                            ],
47                                        )
48                                        .response_format(FormulaAndFunctionResponseFormat::SCALAR)
49                                ],
50                                QueryValueWidgetDefinitionType::QUERY_VALUE,
51                            )
52                                .autoscale(true)
53                                .precision(2)
54                                .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
55                                .title("".to_string())
56                                .title_align(WidgetTextAlign::LEFT)
57                                .title_size("16".to_string()),
58                        ),
59                    ),
60                ).layout(WidgetLayout::new(15, 47, 0, 0))
61            ],
62        )
63            .description(Some("".to_string()))
64            .notify_list(Some(vec![]))
65            .template_variables(Some(vec![]));
66    let configuration = datadog::Configuration::new();
67    let api = DashboardsAPI::with_config(configuration);
68    let resp = api.create_dashboard(body).await;
69    if let Ok(value) = resp {
70        println!("{:#?}", value);
71    } else {
72        println!("{:#?}", resp.unwrap_err());
73    }
74}
More examples
Hide additional examples
examples/v1_dashboards_CreateDashboard_2644712913.rs (lines 32-53)
23async fn main() {
24    let body =
25        Dashboard::new(
26            DashboardLayoutType::ORDERED,
27            "Example-Dashboard with QVW Percentile Aggregator".to_string(),
28            vec![
29                Widget::new(
30                    WidgetDefinition::QueryValueWidgetDefinition(
31                        Box::new(
32                            QueryValueWidgetDefinition::new(
33                                vec![
34                                    QueryValueWidgetRequest::new()
35                                        .formulas(vec![WidgetFormula::new("query1".to_string())])
36                                        .queries(
37                                            vec![
38                                                FormulaAndFunctionQueryDefinition
39                                                ::FormulaAndFunctionMetricQueryDefinition(
40                                                    Box::new(
41                                                        FormulaAndFunctionMetricQueryDefinition::new(
42                                                            FormulaAndFunctionMetricDataSource::METRICS,
43                                                            "query1".to_string(),
44                                                            "p90:dist.dd.dogweb.latency{*}".to_string(),
45                                                        ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE),
46                                                    ),
47                                                )
48                                            ],
49                                        )
50                                        .response_format(FormulaAndFunctionResponseFormat::SCALAR)
51                                ],
52                                QueryValueWidgetDefinitionType::QUERY_VALUE,
53                            )
54                                .autoscale(true)
55                                .precision(2)
56                                .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
57                                .title("".to_string())
58                                .title_align(WidgetTextAlign::LEFT)
59                                .title_size("16".to_string()),
60                        ),
61                    ),
62                ).layout(WidgetLayout::new(2, 2, 0, 0))
63            ],
64        );
65    let configuration = datadog::Configuration::new();
66    let api = DashboardsAPI::with_config(configuration);
67    let resp = api.create_dashboard(body).await;
68    if let Ok(value) = resp {
69        println!("{:#?}", value);
70    } else {
71        println!("{:#?}", resp.unwrap_err());
72    }
73}
examples/v1_dashboards_CreateDashboard_765140092.rs (lines 35-56)
26async fn main() {
27    let body =
28        Dashboard::new(
29            DashboardLayoutType::ORDERED,
30            "Example-Dashboard with QVW Timeseries Background".to_string(),
31            vec![
32                Widget::new(
33                    WidgetDefinition::QueryValueWidgetDefinition(
34                        Box::new(
35                            QueryValueWidgetDefinition::new(
36                                vec![
37                                    QueryValueWidgetRequest::new()
38                                        .formulas(vec![WidgetFormula::new("query1".to_string())])
39                                        .queries(
40                                            vec![
41                                                FormulaAndFunctionQueryDefinition
42                                                ::FormulaAndFunctionMetricQueryDefinition(
43                                                    Box::new(
44                                                        FormulaAndFunctionMetricQueryDefinition::new(
45                                                            FormulaAndFunctionMetricDataSource::METRICS,
46                                                            "query1".to_string(),
47                                                            "sum:my.cool.count.metric{*}".to_string(),
48                                                        ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE),
49                                                    ),
50                                                )
51                                            ],
52                                        )
53                                        .response_format(FormulaAndFunctionResponseFormat::SCALAR)
54                                ],
55                                QueryValueWidgetDefinitionType::QUERY_VALUE,
56                            )
57                                .autoscale(true)
58                                .precision(2)
59                                .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
60                                .timeseries_background(
61                                    TimeseriesBackground::new(
62                                        TimeseriesBackgroundType::AREA,
63                                    ).yaxis(WidgetAxis::new().include_zero(true)),
64                                )
65                                .title("".to_string())
66                                .title_align(WidgetTextAlign::LEFT)
67                                .title_size("16".to_string()),
68                        ),
69                    ),
70                ).layout(WidgetLayout::new(2, 2, 0, 0))
71            ],
72        );
73    let configuration = datadog::Configuration::new();
74    let api = DashboardsAPI::with_config(configuration);
75    let resp = api.create_dashboard(body).await;
76    if let Ok(value) = resp {
77        println!("{:#?}", value);
78    } else {
79        println!("{:#?}", resp.unwrap_err());
80    }
81}
Source

pub fn autoscale(self, value: bool) -> Self

Examples found in repository?
examples/v1_dashboards_CreateDashboard_2349863258.rs (line 52)
22async fn main() {
23    let body =
24        Dashboard::new(
25            DashboardLayoutType::FREE,
26            "Example-Dashboard".to_string(),
27            vec![
28                Widget::new(
29                    WidgetDefinition::QueryValueWidgetDefinition(
30                        Box::new(
31                            QueryValueWidgetDefinition::new(
32                                vec![
33                                    QueryValueWidgetRequest::new()
34                                        .queries(
35                                            vec![
36                                                FormulaAndFunctionQueryDefinition
37                                                ::FormulaAndFunctionMetricQueryDefinition(
38                                                    Box::new(
39                                                        FormulaAndFunctionMetricQueryDefinition::new(
40                                                            FormulaAndFunctionMetricDataSource::METRICS,
41                                                            "query1".to_string(),
42                                                            "avg:system.cpu.user{*}".to_string(),
43                                                        ).aggregator(FormulaAndFunctionMetricAggregation::AVG),
44                                                    ),
45                                                )
46                                            ],
47                                        )
48                                        .response_format(FormulaAndFunctionResponseFormat::SCALAR)
49                                ],
50                                QueryValueWidgetDefinitionType::QUERY_VALUE,
51                            )
52                                .autoscale(true)
53                                .precision(2)
54                                .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
55                                .title("".to_string())
56                                .title_align(WidgetTextAlign::LEFT)
57                                .title_size("16".to_string()),
58                        ),
59                    ),
60                ).layout(WidgetLayout::new(15, 47, 0, 0))
61            ],
62        )
63            .description(Some("".to_string()))
64            .notify_list(Some(vec![]))
65            .template_variables(Some(vec![]));
66    let configuration = datadog::Configuration::new();
67    let api = DashboardsAPI::with_config(configuration);
68    let resp = api.create_dashboard(body).await;
69    if let Ok(value) = resp {
70        println!("{:#?}", value);
71    } else {
72        println!("{:#?}", resp.unwrap_err());
73    }
74}
More examples
Hide additional examples
examples/v1_dashboards_CreateDashboard_2644712913.rs (line 54)
23async fn main() {
24    let body =
25        Dashboard::new(
26            DashboardLayoutType::ORDERED,
27            "Example-Dashboard with QVW Percentile Aggregator".to_string(),
28            vec![
29                Widget::new(
30                    WidgetDefinition::QueryValueWidgetDefinition(
31                        Box::new(
32                            QueryValueWidgetDefinition::new(
33                                vec![
34                                    QueryValueWidgetRequest::new()
35                                        .formulas(vec![WidgetFormula::new("query1".to_string())])
36                                        .queries(
37                                            vec![
38                                                FormulaAndFunctionQueryDefinition
39                                                ::FormulaAndFunctionMetricQueryDefinition(
40                                                    Box::new(
41                                                        FormulaAndFunctionMetricQueryDefinition::new(
42                                                            FormulaAndFunctionMetricDataSource::METRICS,
43                                                            "query1".to_string(),
44                                                            "p90:dist.dd.dogweb.latency{*}".to_string(),
45                                                        ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE),
46                                                    ),
47                                                )
48                                            ],
49                                        )
50                                        .response_format(FormulaAndFunctionResponseFormat::SCALAR)
51                                ],
52                                QueryValueWidgetDefinitionType::QUERY_VALUE,
53                            )
54                                .autoscale(true)
55                                .precision(2)
56                                .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
57                                .title("".to_string())
58                                .title_align(WidgetTextAlign::LEFT)
59                                .title_size("16".to_string()),
60                        ),
61                    ),
62                ).layout(WidgetLayout::new(2, 2, 0, 0))
63            ],
64        );
65    let configuration = datadog::Configuration::new();
66    let api = DashboardsAPI::with_config(configuration);
67    let resp = api.create_dashboard(body).await;
68    if let Ok(value) = resp {
69        println!("{:#?}", value);
70    } else {
71        println!("{:#?}", resp.unwrap_err());
72    }
73}
examples/v1_dashboards_CreateDashboard_765140092.rs (line 57)
26async fn main() {
27    let body =
28        Dashboard::new(
29            DashboardLayoutType::ORDERED,
30            "Example-Dashboard with QVW Timeseries Background".to_string(),
31            vec![
32                Widget::new(
33                    WidgetDefinition::QueryValueWidgetDefinition(
34                        Box::new(
35                            QueryValueWidgetDefinition::new(
36                                vec![
37                                    QueryValueWidgetRequest::new()
38                                        .formulas(vec![WidgetFormula::new("query1".to_string())])
39                                        .queries(
40                                            vec![
41                                                FormulaAndFunctionQueryDefinition
42                                                ::FormulaAndFunctionMetricQueryDefinition(
43                                                    Box::new(
44                                                        FormulaAndFunctionMetricQueryDefinition::new(
45                                                            FormulaAndFunctionMetricDataSource::METRICS,
46                                                            "query1".to_string(),
47                                                            "sum:my.cool.count.metric{*}".to_string(),
48                                                        ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE),
49                                                    ),
50                                                )
51                                            ],
52                                        )
53                                        .response_format(FormulaAndFunctionResponseFormat::SCALAR)
54                                ],
55                                QueryValueWidgetDefinitionType::QUERY_VALUE,
56                            )
57                                .autoscale(true)
58                                .precision(2)
59                                .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
60                                .timeseries_background(
61                                    TimeseriesBackground::new(
62                                        TimeseriesBackgroundType::AREA,
63                                    ).yaxis(WidgetAxis::new().include_zero(true)),
64                                )
65                                .title("".to_string())
66                                .title_align(WidgetTextAlign::LEFT)
67                                .title_size("16".to_string()),
68                        ),
69                    ),
70                ).layout(WidgetLayout::new(2, 2, 0, 0))
71            ],
72        );
73    let configuration = datadog::Configuration::new();
74    let api = DashboardsAPI::with_config(configuration);
75    let resp = api.create_dashboard(body).await;
76    if let Ok(value) = resp {
77        println!("{:#?}", value);
78    } else {
79        println!("{:#?}", resp.unwrap_err());
80    }
81}
Source

pub fn custom_unit(self, value: String) -> Self

Source

pub fn precision(self, value: i64) -> Self

Examples found in repository?
examples/v1_dashboards_CreateDashboard_2349863258.rs (line 53)
22async fn main() {
23    let body =
24        Dashboard::new(
25            DashboardLayoutType::FREE,
26            "Example-Dashboard".to_string(),
27            vec![
28                Widget::new(
29                    WidgetDefinition::QueryValueWidgetDefinition(
30                        Box::new(
31                            QueryValueWidgetDefinition::new(
32                                vec![
33                                    QueryValueWidgetRequest::new()
34                                        .queries(
35                                            vec![
36                                                FormulaAndFunctionQueryDefinition
37                                                ::FormulaAndFunctionMetricQueryDefinition(
38                                                    Box::new(
39                                                        FormulaAndFunctionMetricQueryDefinition::new(
40                                                            FormulaAndFunctionMetricDataSource::METRICS,
41                                                            "query1".to_string(),
42                                                            "avg:system.cpu.user{*}".to_string(),
43                                                        ).aggregator(FormulaAndFunctionMetricAggregation::AVG),
44                                                    ),
45                                                )
46                                            ],
47                                        )
48                                        .response_format(FormulaAndFunctionResponseFormat::SCALAR)
49                                ],
50                                QueryValueWidgetDefinitionType::QUERY_VALUE,
51                            )
52                                .autoscale(true)
53                                .precision(2)
54                                .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
55                                .title("".to_string())
56                                .title_align(WidgetTextAlign::LEFT)
57                                .title_size("16".to_string()),
58                        ),
59                    ),
60                ).layout(WidgetLayout::new(15, 47, 0, 0))
61            ],
62        )
63            .description(Some("".to_string()))
64            .notify_list(Some(vec![]))
65            .template_variables(Some(vec![]));
66    let configuration = datadog::Configuration::new();
67    let api = DashboardsAPI::with_config(configuration);
68    let resp = api.create_dashboard(body).await;
69    if let Ok(value) = resp {
70        println!("{:#?}", value);
71    } else {
72        println!("{:#?}", resp.unwrap_err());
73    }
74}
More examples
Hide additional examples
examples/v1_dashboards_CreateDashboard_2644712913.rs (line 55)
23async fn main() {
24    let body =
25        Dashboard::new(
26            DashboardLayoutType::ORDERED,
27            "Example-Dashboard with QVW Percentile Aggregator".to_string(),
28            vec![
29                Widget::new(
30                    WidgetDefinition::QueryValueWidgetDefinition(
31                        Box::new(
32                            QueryValueWidgetDefinition::new(
33                                vec![
34                                    QueryValueWidgetRequest::new()
35                                        .formulas(vec![WidgetFormula::new("query1".to_string())])
36                                        .queries(
37                                            vec![
38                                                FormulaAndFunctionQueryDefinition
39                                                ::FormulaAndFunctionMetricQueryDefinition(
40                                                    Box::new(
41                                                        FormulaAndFunctionMetricQueryDefinition::new(
42                                                            FormulaAndFunctionMetricDataSource::METRICS,
43                                                            "query1".to_string(),
44                                                            "p90:dist.dd.dogweb.latency{*}".to_string(),
45                                                        ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE),
46                                                    ),
47                                                )
48                                            ],
49                                        )
50                                        .response_format(FormulaAndFunctionResponseFormat::SCALAR)
51                                ],
52                                QueryValueWidgetDefinitionType::QUERY_VALUE,
53                            )
54                                .autoscale(true)
55                                .precision(2)
56                                .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
57                                .title("".to_string())
58                                .title_align(WidgetTextAlign::LEFT)
59                                .title_size("16".to_string()),
60                        ),
61                    ),
62                ).layout(WidgetLayout::new(2, 2, 0, 0))
63            ],
64        );
65    let configuration = datadog::Configuration::new();
66    let api = DashboardsAPI::with_config(configuration);
67    let resp = api.create_dashboard(body).await;
68    if let Ok(value) = resp {
69        println!("{:#?}", value);
70    } else {
71        println!("{:#?}", resp.unwrap_err());
72    }
73}
examples/v1_dashboards_CreateDashboard_765140092.rs (line 58)
26async fn main() {
27    let body =
28        Dashboard::new(
29            DashboardLayoutType::ORDERED,
30            "Example-Dashboard with QVW Timeseries Background".to_string(),
31            vec![
32                Widget::new(
33                    WidgetDefinition::QueryValueWidgetDefinition(
34                        Box::new(
35                            QueryValueWidgetDefinition::new(
36                                vec![
37                                    QueryValueWidgetRequest::new()
38                                        .formulas(vec![WidgetFormula::new("query1".to_string())])
39                                        .queries(
40                                            vec![
41                                                FormulaAndFunctionQueryDefinition
42                                                ::FormulaAndFunctionMetricQueryDefinition(
43                                                    Box::new(
44                                                        FormulaAndFunctionMetricQueryDefinition::new(
45                                                            FormulaAndFunctionMetricDataSource::METRICS,
46                                                            "query1".to_string(),
47                                                            "sum:my.cool.count.metric{*}".to_string(),
48                                                        ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE),
49                                                    ),
50                                                )
51                                            ],
52                                        )
53                                        .response_format(FormulaAndFunctionResponseFormat::SCALAR)
54                                ],
55                                QueryValueWidgetDefinitionType::QUERY_VALUE,
56                            )
57                                .autoscale(true)
58                                .precision(2)
59                                .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
60                                .timeseries_background(
61                                    TimeseriesBackground::new(
62                                        TimeseriesBackgroundType::AREA,
63                                    ).yaxis(WidgetAxis::new().include_zero(true)),
64                                )
65                                .title("".to_string())
66                                .title_align(WidgetTextAlign::LEFT)
67                                .title_size("16".to_string()),
68                        ),
69                    ),
70                ).layout(WidgetLayout::new(2, 2, 0, 0))
71            ],
72        );
73    let configuration = datadog::Configuration::new();
74    let api = DashboardsAPI::with_config(configuration);
75    let resp = api.create_dashboard(body).await;
76    if let Ok(value) = resp {
77        println!("{:#?}", value);
78    } else {
79        println!("{:#?}", resp.unwrap_err());
80    }
81}
Source

pub fn text_align(self, value: WidgetTextAlign) -> Self

Source

pub fn time(self, value: WidgetTime) -> Self

Examples found in repository?
examples/v1_dashboards_CreateDashboard_2349863258.rs (line 54)
22async fn main() {
23    let body =
24        Dashboard::new(
25            DashboardLayoutType::FREE,
26            "Example-Dashboard".to_string(),
27            vec![
28                Widget::new(
29                    WidgetDefinition::QueryValueWidgetDefinition(
30                        Box::new(
31                            QueryValueWidgetDefinition::new(
32                                vec![
33                                    QueryValueWidgetRequest::new()
34                                        .queries(
35                                            vec![
36                                                FormulaAndFunctionQueryDefinition
37                                                ::FormulaAndFunctionMetricQueryDefinition(
38                                                    Box::new(
39                                                        FormulaAndFunctionMetricQueryDefinition::new(
40                                                            FormulaAndFunctionMetricDataSource::METRICS,
41                                                            "query1".to_string(),
42                                                            "avg:system.cpu.user{*}".to_string(),
43                                                        ).aggregator(FormulaAndFunctionMetricAggregation::AVG),
44                                                    ),
45                                                )
46                                            ],
47                                        )
48                                        .response_format(FormulaAndFunctionResponseFormat::SCALAR)
49                                ],
50                                QueryValueWidgetDefinitionType::QUERY_VALUE,
51                            )
52                                .autoscale(true)
53                                .precision(2)
54                                .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
55                                .title("".to_string())
56                                .title_align(WidgetTextAlign::LEFT)
57                                .title_size("16".to_string()),
58                        ),
59                    ),
60                ).layout(WidgetLayout::new(15, 47, 0, 0))
61            ],
62        )
63            .description(Some("".to_string()))
64            .notify_list(Some(vec![]))
65            .template_variables(Some(vec![]));
66    let configuration = datadog::Configuration::new();
67    let api = DashboardsAPI::with_config(configuration);
68    let resp = api.create_dashboard(body).await;
69    if let Ok(value) = resp {
70        println!("{:#?}", value);
71    } else {
72        println!("{:#?}", resp.unwrap_err());
73    }
74}
More examples
Hide additional examples
examples/v1_dashboards_CreateDashboard_2644712913.rs (line 56)
23async fn main() {
24    let body =
25        Dashboard::new(
26            DashboardLayoutType::ORDERED,
27            "Example-Dashboard with QVW Percentile Aggregator".to_string(),
28            vec![
29                Widget::new(
30                    WidgetDefinition::QueryValueWidgetDefinition(
31                        Box::new(
32                            QueryValueWidgetDefinition::new(
33                                vec![
34                                    QueryValueWidgetRequest::new()
35                                        .formulas(vec![WidgetFormula::new("query1".to_string())])
36                                        .queries(
37                                            vec![
38                                                FormulaAndFunctionQueryDefinition
39                                                ::FormulaAndFunctionMetricQueryDefinition(
40                                                    Box::new(
41                                                        FormulaAndFunctionMetricQueryDefinition::new(
42                                                            FormulaAndFunctionMetricDataSource::METRICS,
43                                                            "query1".to_string(),
44                                                            "p90:dist.dd.dogweb.latency{*}".to_string(),
45                                                        ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE),
46                                                    ),
47                                                )
48                                            ],
49                                        )
50                                        .response_format(FormulaAndFunctionResponseFormat::SCALAR)
51                                ],
52                                QueryValueWidgetDefinitionType::QUERY_VALUE,
53                            )
54                                .autoscale(true)
55                                .precision(2)
56                                .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
57                                .title("".to_string())
58                                .title_align(WidgetTextAlign::LEFT)
59                                .title_size("16".to_string()),
60                        ),
61                    ),
62                ).layout(WidgetLayout::new(2, 2, 0, 0))
63            ],
64        );
65    let configuration = datadog::Configuration::new();
66    let api = DashboardsAPI::with_config(configuration);
67    let resp = api.create_dashboard(body).await;
68    if let Ok(value) = resp {
69        println!("{:#?}", value);
70    } else {
71        println!("{:#?}", resp.unwrap_err());
72    }
73}
examples/v1_dashboards_CreateDashboard_765140092.rs (line 59)
26async fn main() {
27    let body =
28        Dashboard::new(
29            DashboardLayoutType::ORDERED,
30            "Example-Dashboard with QVW Timeseries Background".to_string(),
31            vec![
32                Widget::new(
33                    WidgetDefinition::QueryValueWidgetDefinition(
34                        Box::new(
35                            QueryValueWidgetDefinition::new(
36                                vec![
37                                    QueryValueWidgetRequest::new()
38                                        .formulas(vec![WidgetFormula::new("query1".to_string())])
39                                        .queries(
40                                            vec![
41                                                FormulaAndFunctionQueryDefinition
42                                                ::FormulaAndFunctionMetricQueryDefinition(
43                                                    Box::new(
44                                                        FormulaAndFunctionMetricQueryDefinition::new(
45                                                            FormulaAndFunctionMetricDataSource::METRICS,
46                                                            "query1".to_string(),
47                                                            "sum:my.cool.count.metric{*}".to_string(),
48                                                        ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE),
49                                                    ),
50                                                )
51                                            ],
52                                        )
53                                        .response_format(FormulaAndFunctionResponseFormat::SCALAR)
54                                ],
55                                QueryValueWidgetDefinitionType::QUERY_VALUE,
56                            )
57                                .autoscale(true)
58                                .precision(2)
59                                .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
60                                .timeseries_background(
61                                    TimeseriesBackground::new(
62                                        TimeseriesBackgroundType::AREA,
63                                    ).yaxis(WidgetAxis::new().include_zero(true)),
64                                )
65                                .title("".to_string())
66                                .title_align(WidgetTextAlign::LEFT)
67                                .title_size("16".to_string()),
68                        ),
69                    ),
70                ).layout(WidgetLayout::new(2, 2, 0, 0))
71            ],
72        );
73    let configuration = datadog::Configuration::new();
74    let api = DashboardsAPI::with_config(configuration);
75    let resp = api.create_dashboard(body).await;
76    if let Ok(value) = resp {
77        println!("{:#?}", value);
78    } else {
79        println!("{:#?}", resp.unwrap_err());
80    }
81}
Source

pub fn timeseries_background(self, value: TimeseriesBackground) -> Self

Examples found in repository?
examples/v1_dashboards_CreateDashboard_765140092.rs (lines 60-64)
26async fn main() {
27    let body =
28        Dashboard::new(
29            DashboardLayoutType::ORDERED,
30            "Example-Dashboard with QVW Timeseries Background".to_string(),
31            vec![
32                Widget::new(
33                    WidgetDefinition::QueryValueWidgetDefinition(
34                        Box::new(
35                            QueryValueWidgetDefinition::new(
36                                vec![
37                                    QueryValueWidgetRequest::new()
38                                        .formulas(vec![WidgetFormula::new("query1".to_string())])
39                                        .queries(
40                                            vec![
41                                                FormulaAndFunctionQueryDefinition
42                                                ::FormulaAndFunctionMetricQueryDefinition(
43                                                    Box::new(
44                                                        FormulaAndFunctionMetricQueryDefinition::new(
45                                                            FormulaAndFunctionMetricDataSource::METRICS,
46                                                            "query1".to_string(),
47                                                            "sum:my.cool.count.metric{*}".to_string(),
48                                                        ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE),
49                                                    ),
50                                                )
51                                            ],
52                                        )
53                                        .response_format(FormulaAndFunctionResponseFormat::SCALAR)
54                                ],
55                                QueryValueWidgetDefinitionType::QUERY_VALUE,
56                            )
57                                .autoscale(true)
58                                .precision(2)
59                                .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
60                                .timeseries_background(
61                                    TimeseriesBackground::new(
62                                        TimeseriesBackgroundType::AREA,
63                                    ).yaxis(WidgetAxis::new().include_zero(true)),
64                                )
65                                .title("".to_string())
66                                .title_align(WidgetTextAlign::LEFT)
67                                .title_size("16".to_string()),
68                        ),
69                    ),
70                ).layout(WidgetLayout::new(2, 2, 0, 0))
71            ],
72        );
73    let configuration = datadog::Configuration::new();
74    let api = DashboardsAPI::with_config(configuration);
75    let resp = api.create_dashboard(body).await;
76    if let Ok(value) = resp {
77        println!("{:#?}", value);
78    } else {
79        println!("{:#?}", resp.unwrap_err());
80    }
81}
Source

pub fn title(self, value: String) -> Self

Examples found in repository?
examples/v1_dashboards_CreateDashboard_2349863258.rs (line 55)
22async fn main() {
23    let body =
24        Dashboard::new(
25            DashboardLayoutType::FREE,
26            "Example-Dashboard".to_string(),
27            vec![
28                Widget::new(
29                    WidgetDefinition::QueryValueWidgetDefinition(
30                        Box::new(
31                            QueryValueWidgetDefinition::new(
32                                vec![
33                                    QueryValueWidgetRequest::new()
34                                        .queries(
35                                            vec![
36                                                FormulaAndFunctionQueryDefinition
37                                                ::FormulaAndFunctionMetricQueryDefinition(
38                                                    Box::new(
39                                                        FormulaAndFunctionMetricQueryDefinition::new(
40                                                            FormulaAndFunctionMetricDataSource::METRICS,
41                                                            "query1".to_string(),
42                                                            "avg:system.cpu.user{*}".to_string(),
43                                                        ).aggregator(FormulaAndFunctionMetricAggregation::AVG),
44                                                    ),
45                                                )
46                                            ],
47                                        )
48                                        .response_format(FormulaAndFunctionResponseFormat::SCALAR)
49                                ],
50                                QueryValueWidgetDefinitionType::QUERY_VALUE,
51                            )
52                                .autoscale(true)
53                                .precision(2)
54                                .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
55                                .title("".to_string())
56                                .title_align(WidgetTextAlign::LEFT)
57                                .title_size("16".to_string()),
58                        ),
59                    ),
60                ).layout(WidgetLayout::new(15, 47, 0, 0))
61            ],
62        )
63            .description(Some("".to_string()))
64            .notify_list(Some(vec![]))
65            .template_variables(Some(vec![]));
66    let configuration = datadog::Configuration::new();
67    let api = DashboardsAPI::with_config(configuration);
68    let resp = api.create_dashboard(body).await;
69    if let Ok(value) = resp {
70        println!("{:#?}", value);
71    } else {
72        println!("{:#?}", resp.unwrap_err());
73    }
74}
More examples
Hide additional examples
examples/v1_dashboards_CreateDashboard_2644712913.rs (line 57)
23async fn main() {
24    let body =
25        Dashboard::new(
26            DashboardLayoutType::ORDERED,
27            "Example-Dashboard with QVW Percentile Aggregator".to_string(),
28            vec![
29                Widget::new(
30                    WidgetDefinition::QueryValueWidgetDefinition(
31                        Box::new(
32                            QueryValueWidgetDefinition::new(
33                                vec![
34                                    QueryValueWidgetRequest::new()
35                                        .formulas(vec![WidgetFormula::new("query1".to_string())])
36                                        .queries(
37                                            vec![
38                                                FormulaAndFunctionQueryDefinition
39                                                ::FormulaAndFunctionMetricQueryDefinition(
40                                                    Box::new(
41                                                        FormulaAndFunctionMetricQueryDefinition::new(
42                                                            FormulaAndFunctionMetricDataSource::METRICS,
43                                                            "query1".to_string(),
44                                                            "p90:dist.dd.dogweb.latency{*}".to_string(),
45                                                        ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE),
46                                                    ),
47                                                )
48                                            ],
49                                        )
50                                        .response_format(FormulaAndFunctionResponseFormat::SCALAR)
51                                ],
52                                QueryValueWidgetDefinitionType::QUERY_VALUE,
53                            )
54                                .autoscale(true)
55                                .precision(2)
56                                .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
57                                .title("".to_string())
58                                .title_align(WidgetTextAlign::LEFT)
59                                .title_size("16".to_string()),
60                        ),
61                    ),
62                ).layout(WidgetLayout::new(2, 2, 0, 0))
63            ],
64        );
65    let configuration = datadog::Configuration::new();
66    let api = DashboardsAPI::with_config(configuration);
67    let resp = api.create_dashboard(body).await;
68    if let Ok(value) = resp {
69        println!("{:#?}", value);
70    } else {
71        println!("{:#?}", resp.unwrap_err());
72    }
73}
examples/v1_dashboards_CreateDashboard_765140092.rs (line 65)
26async fn main() {
27    let body =
28        Dashboard::new(
29            DashboardLayoutType::ORDERED,
30            "Example-Dashboard with QVW Timeseries Background".to_string(),
31            vec![
32                Widget::new(
33                    WidgetDefinition::QueryValueWidgetDefinition(
34                        Box::new(
35                            QueryValueWidgetDefinition::new(
36                                vec![
37                                    QueryValueWidgetRequest::new()
38                                        .formulas(vec![WidgetFormula::new("query1".to_string())])
39                                        .queries(
40                                            vec![
41                                                FormulaAndFunctionQueryDefinition
42                                                ::FormulaAndFunctionMetricQueryDefinition(
43                                                    Box::new(
44                                                        FormulaAndFunctionMetricQueryDefinition::new(
45                                                            FormulaAndFunctionMetricDataSource::METRICS,
46                                                            "query1".to_string(),
47                                                            "sum:my.cool.count.metric{*}".to_string(),
48                                                        ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE),
49                                                    ),
50                                                )
51                                            ],
52                                        )
53                                        .response_format(FormulaAndFunctionResponseFormat::SCALAR)
54                                ],
55                                QueryValueWidgetDefinitionType::QUERY_VALUE,
56                            )
57                                .autoscale(true)
58                                .precision(2)
59                                .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
60                                .timeseries_background(
61                                    TimeseriesBackground::new(
62                                        TimeseriesBackgroundType::AREA,
63                                    ).yaxis(WidgetAxis::new().include_zero(true)),
64                                )
65                                .title("".to_string())
66                                .title_align(WidgetTextAlign::LEFT)
67                                .title_size("16".to_string()),
68                        ),
69                    ),
70                ).layout(WidgetLayout::new(2, 2, 0, 0))
71            ],
72        );
73    let configuration = datadog::Configuration::new();
74    let api = DashboardsAPI::with_config(configuration);
75    let resp = api.create_dashboard(body).await;
76    if let Ok(value) = resp {
77        println!("{:#?}", value);
78    } else {
79        println!("{:#?}", resp.unwrap_err());
80    }
81}
Source

pub fn title_align(self, value: WidgetTextAlign) -> Self

Examples found in repository?
examples/v1_dashboards_CreateDashboard_2349863258.rs (line 56)
22async fn main() {
23    let body =
24        Dashboard::new(
25            DashboardLayoutType::FREE,
26            "Example-Dashboard".to_string(),
27            vec![
28                Widget::new(
29                    WidgetDefinition::QueryValueWidgetDefinition(
30                        Box::new(
31                            QueryValueWidgetDefinition::new(
32                                vec![
33                                    QueryValueWidgetRequest::new()
34                                        .queries(
35                                            vec![
36                                                FormulaAndFunctionQueryDefinition
37                                                ::FormulaAndFunctionMetricQueryDefinition(
38                                                    Box::new(
39                                                        FormulaAndFunctionMetricQueryDefinition::new(
40                                                            FormulaAndFunctionMetricDataSource::METRICS,
41                                                            "query1".to_string(),
42                                                            "avg:system.cpu.user{*}".to_string(),
43                                                        ).aggregator(FormulaAndFunctionMetricAggregation::AVG),
44                                                    ),
45                                                )
46                                            ],
47                                        )
48                                        .response_format(FormulaAndFunctionResponseFormat::SCALAR)
49                                ],
50                                QueryValueWidgetDefinitionType::QUERY_VALUE,
51                            )
52                                .autoscale(true)
53                                .precision(2)
54                                .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
55                                .title("".to_string())
56                                .title_align(WidgetTextAlign::LEFT)
57                                .title_size("16".to_string()),
58                        ),
59                    ),
60                ).layout(WidgetLayout::new(15, 47, 0, 0))
61            ],
62        )
63            .description(Some("".to_string()))
64            .notify_list(Some(vec![]))
65            .template_variables(Some(vec![]));
66    let configuration = datadog::Configuration::new();
67    let api = DashboardsAPI::with_config(configuration);
68    let resp = api.create_dashboard(body).await;
69    if let Ok(value) = resp {
70        println!("{:#?}", value);
71    } else {
72        println!("{:#?}", resp.unwrap_err());
73    }
74}
More examples
Hide additional examples
examples/v1_dashboards_CreateDashboard_2644712913.rs (line 58)
23async fn main() {
24    let body =
25        Dashboard::new(
26            DashboardLayoutType::ORDERED,
27            "Example-Dashboard with QVW Percentile Aggregator".to_string(),
28            vec![
29                Widget::new(
30                    WidgetDefinition::QueryValueWidgetDefinition(
31                        Box::new(
32                            QueryValueWidgetDefinition::new(
33                                vec![
34                                    QueryValueWidgetRequest::new()
35                                        .formulas(vec![WidgetFormula::new("query1".to_string())])
36                                        .queries(
37                                            vec![
38                                                FormulaAndFunctionQueryDefinition
39                                                ::FormulaAndFunctionMetricQueryDefinition(
40                                                    Box::new(
41                                                        FormulaAndFunctionMetricQueryDefinition::new(
42                                                            FormulaAndFunctionMetricDataSource::METRICS,
43                                                            "query1".to_string(),
44                                                            "p90:dist.dd.dogweb.latency{*}".to_string(),
45                                                        ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE),
46                                                    ),
47                                                )
48                                            ],
49                                        )
50                                        .response_format(FormulaAndFunctionResponseFormat::SCALAR)
51                                ],
52                                QueryValueWidgetDefinitionType::QUERY_VALUE,
53                            )
54                                .autoscale(true)
55                                .precision(2)
56                                .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
57                                .title("".to_string())
58                                .title_align(WidgetTextAlign::LEFT)
59                                .title_size("16".to_string()),
60                        ),
61                    ),
62                ).layout(WidgetLayout::new(2, 2, 0, 0))
63            ],
64        );
65    let configuration = datadog::Configuration::new();
66    let api = DashboardsAPI::with_config(configuration);
67    let resp = api.create_dashboard(body).await;
68    if let Ok(value) = resp {
69        println!("{:#?}", value);
70    } else {
71        println!("{:#?}", resp.unwrap_err());
72    }
73}
examples/v1_dashboards_CreateDashboard_765140092.rs (line 66)
26async fn main() {
27    let body =
28        Dashboard::new(
29            DashboardLayoutType::ORDERED,
30            "Example-Dashboard with QVW Timeseries Background".to_string(),
31            vec![
32                Widget::new(
33                    WidgetDefinition::QueryValueWidgetDefinition(
34                        Box::new(
35                            QueryValueWidgetDefinition::new(
36                                vec![
37                                    QueryValueWidgetRequest::new()
38                                        .formulas(vec![WidgetFormula::new("query1".to_string())])
39                                        .queries(
40                                            vec![
41                                                FormulaAndFunctionQueryDefinition
42                                                ::FormulaAndFunctionMetricQueryDefinition(
43                                                    Box::new(
44                                                        FormulaAndFunctionMetricQueryDefinition::new(
45                                                            FormulaAndFunctionMetricDataSource::METRICS,
46                                                            "query1".to_string(),
47                                                            "sum:my.cool.count.metric{*}".to_string(),
48                                                        ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE),
49                                                    ),
50                                                )
51                                            ],
52                                        )
53                                        .response_format(FormulaAndFunctionResponseFormat::SCALAR)
54                                ],
55                                QueryValueWidgetDefinitionType::QUERY_VALUE,
56                            )
57                                .autoscale(true)
58                                .precision(2)
59                                .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
60                                .timeseries_background(
61                                    TimeseriesBackground::new(
62                                        TimeseriesBackgroundType::AREA,
63                                    ).yaxis(WidgetAxis::new().include_zero(true)),
64                                )
65                                .title("".to_string())
66                                .title_align(WidgetTextAlign::LEFT)
67                                .title_size("16".to_string()),
68                        ),
69                    ),
70                ).layout(WidgetLayout::new(2, 2, 0, 0))
71            ],
72        );
73    let configuration = datadog::Configuration::new();
74    let api = DashboardsAPI::with_config(configuration);
75    let resp = api.create_dashboard(body).await;
76    if let Ok(value) = resp {
77        println!("{:#?}", value);
78    } else {
79        println!("{:#?}", resp.unwrap_err());
80    }
81}
Source

pub fn title_size(self, value: String) -> Self

Examples found in repository?
examples/v1_dashboards_CreateDashboard_2349863258.rs (line 57)
22async fn main() {
23    let body =
24        Dashboard::new(
25            DashboardLayoutType::FREE,
26            "Example-Dashboard".to_string(),
27            vec![
28                Widget::new(
29                    WidgetDefinition::QueryValueWidgetDefinition(
30                        Box::new(
31                            QueryValueWidgetDefinition::new(
32                                vec![
33                                    QueryValueWidgetRequest::new()
34                                        .queries(
35                                            vec![
36                                                FormulaAndFunctionQueryDefinition
37                                                ::FormulaAndFunctionMetricQueryDefinition(
38                                                    Box::new(
39                                                        FormulaAndFunctionMetricQueryDefinition::new(
40                                                            FormulaAndFunctionMetricDataSource::METRICS,
41                                                            "query1".to_string(),
42                                                            "avg:system.cpu.user{*}".to_string(),
43                                                        ).aggregator(FormulaAndFunctionMetricAggregation::AVG),
44                                                    ),
45                                                )
46                                            ],
47                                        )
48                                        .response_format(FormulaAndFunctionResponseFormat::SCALAR)
49                                ],
50                                QueryValueWidgetDefinitionType::QUERY_VALUE,
51                            )
52                                .autoscale(true)
53                                .precision(2)
54                                .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
55                                .title("".to_string())
56                                .title_align(WidgetTextAlign::LEFT)
57                                .title_size("16".to_string()),
58                        ),
59                    ),
60                ).layout(WidgetLayout::new(15, 47, 0, 0))
61            ],
62        )
63            .description(Some("".to_string()))
64            .notify_list(Some(vec![]))
65            .template_variables(Some(vec![]));
66    let configuration = datadog::Configuration::new();
67    let api = DashboardsAPI::with_config(configuration);
68    let resp = api.create_dashboard(body).await;
69    if let Ok(value) = resp {
70        println!("{:#?}", value);
71    } else {
72        println!("{:#?}", resp.unwrap_err());
73    }
74}
More examples
Hide additional examples
examples/v1_dashboards_CreateDashboard_2644712913.rs (line 59)
23async fn main() {
24    let body =
25        Dashboard::new(
26            DashboardLayoutType::ORDERED,
27            "Example-Dashboard with QVW Percentile Aggregator".to_string(),
28            vec![
29                Widget::new(
30                    WidgetDefinition::QueryValueWidgetDefinition(
31                        Box::new(
32                            QueryValueWidgetDefinition::new(
33                                vec![
34                                    QueryValueWidgetRequest::new()
35                                        .formulas(vec![WidgetFormula::new("query1".to_string())])
36                                        .queries(
37                                            vec![
38                                                FormulaAndFunctionQueryDefinition
39                                                ::FormulaAndFunctionMetricQueryDefinition(
40                                                    Box::new(
41                                                        FormulaAndFunctionMetricQueryDefinition::new(
42                                                            FormulaAndFunctionMetricDataSource::METRICS,
43                                                            "query1".to_string(),
44                                                            "p90:dist.dd.dogweb.latency{*}".to_string(),
45                                                        ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE),
46                                                    ),
47                                                )
48                                            ],
49                                        )
50                                        .response_format(FormulaAndFunctionResponseFormat::SCALAR)
51                                ],
52                                QueryValueWidgetDefinitionType::QUERY_VALUE,
53                            )
54                                .autoscale(true)
55                                .precision(2)
56                                .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
57                                .title("".to_string())
58                                .title_align(WidgetTextAlign::LEFT)
59                                .title_size("16".to_string()),
60                        ),
61                    ),
62                ).layout(WidgetLayout::new(2, 2, 0, 0))
63            ],
64        );
65    let configuration = datadog::Configuration::new();
66    let api = DashboardsAPI::with_config(configuration);
67    let resp = api.create_dashboard(body).await;
68    if let Ok(value) = resp {
69        println!("{:#?}", value);
70    } else {
71        println!("{:#?}", resp.unwrap_err());
72    }
73}
examples/v1_dashboards_CreateDashboard_765140092.rs (line 67)
26async fn main() {
27    let body =
28        Dashboard::new(
29            DashboardLayoutType::ORDERED,
30            "Example-Dashboard with QVW Timeseries Background".to_string(),
31            vec![
32                Widget::new(
33                    WidgetDefinition::QueryValueWidgetDefinition(
34                        Box::new(
35                            QueryValueWidgetDefinition::new(
36                                vec![
37                                    QueryValueWidgetRequest::new()
38                                        .formulas(vec![WidgetFormula::new("query1".to_string())])
39                                        .queries(
40                                            vec![
41                                                FormulaAndFunctionQueryDefinition
42                                                ::FormulaAndFunctionMetricQueryDefinition(
43                                                    Box::new(
44                                                        FormulaAndFunctionMetricQueryDefinition::new(
45                                                            FormulaAndFunctionMetricDataSource::METRICS,
46                                                            "query1".to_string(),
47                                                            "sum:my.cool.count.metric{*}".to_string(),
48                                                        ).aggregator(FormulaAndFunctionMetricAggregation::PERCENTILE),
49                                                    ),
50                                                )
51                                            ],
52                                        )
53                                        .response_format(FormulaAndFunctionResponseFormat::SCALAR)
54                                ],
55                                QueryValueWidgetDefinitionType::QUERY_VALUE,
56                            )
57                                .autoscale(true)
58                                .precision(2)
59                                .time(WidgetTime::WidgetLegacyLiveSpan(Box::new(WidgetLegacyLiveSpan::new())))
60                                .timeseries_background(
61                                    TimeseriesBackground::new(
62                                        TimeseriesBackgroundType::AREA,
63                                    ).yaxis(WidgetAxis::new().include_zero(true)),
64                                )
65                                .title("".to_string())
66                                .title_align(WidgetTextAlign::LEFT)
67                                .title_size("16".to_string()),
68                        ),
69                    ),
70                ).layout(WidgetLayout::new(2, 2, 0, 0))
71            ],
72        );
73    let configuration = datadog::Configuration::new();
74    let api = DashboardsAPI::with_config(configuration);
75    let resp = api.create_dashboard(body).await;
76    if let Ok(value) = resp {
77        println!("{:#?}", value);
78    } else {
79        println!("{:#?}", resp.unwrap_err());
80    }
81}
Source

pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self

Trait Implementations§

Source§

impl Clone for QueryValueWidgetDefinition

Source§

fn clone(&self) -> QueryValueWidgetDefinition

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for QueryValueWidgetDefinition

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for QueryValueWidgetDefinition

Source§

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 QueryValueWidgetDefinition

Source§

fn eq(&self, other: &QueryValueWidgetDefinition) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for QueryValueWidgetDefinition

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for QueryValueWidgetDefinition

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,