Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 109 additions & 1 deletion .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13325,6 +13325,88 @@ components:
type: string
x-enum-varnames:
- SCATTERPLOT
ScatterplotDataProjectionDimension:
description: A single dimension mapping for a scatterplot data projection.
properties:
alias:
description: Display alias for the dimension.
type: string
column:
description: The column name from the data source.
example: duration
type: string
dimension:
$ref: "#/components/schemas/ScatterplotDimension"
number_format:
$ref: "#/components/schemas/WidgetNumberFormat"
required:
- column
- dimension
type: object
ScatterplotDataProjectionProjection:
description: The projection configuration for a scatterplot data projection request.
properties:
dimensions:
description: Dimension mappings for the scatterplot axes.
items:
$ref: "#/components/schemas/ScatterplotDataProjectionDimension"
type: array
type:
$ref: "#/components/schemas/ScatterplotDataProjectionProjectionType"
required:
- type
- dimensions
type: object
ScatterplotDataProjectionProjectionType:
description: The type of the scatterplot data projection.
enum:
- scatterplot
example: scatterplot
type: string
x-enum-varnames:
- SCATTERPLOT
ScatterplotDataProjectionQuery:
description: The query for a scatterplot data projection request.
properties:
data_source:
$ref: "#/components/schemas/FormulaAndFunctionEventsDataSource"
indexes:
description: Indexes to search.
items:
type: string
type: array
query_string:
description: The search query string.
example: "@service:web-store"
type: string
storage:
$ref: "#/components/schemas/ScatterplotDataProjectionQueryStorage"
required:
- query_string
- data_source
type: object
ScatterplotDataProjectionQueryStorage:
description: Storage tier to query.
enum:
- live
- hot
- habanero
- online_archives
- driveline
- flex_tier
- case_insensitive
- cloud_prem
example: hot
type: string
x-enum-varnames:
- LIVE
- HOT
- HABANERO
- ONLINE_ARCHIVES
- DRIVELINE
- FLEX_TIER
- CASE_INSENSITIVE
- CLOUD_PREM
ScatterplotDimension:
description: Dimension of the Scatterplot.
enum:
Expand All @@ -13340,21 +13422,47 @@ components:
- RADIUS
- COLOR
ScatterplotTableRequest:
description: Scatterplot request containing formulas and functions.
description: |-
Scatterplot table request. Supports two modes:
- **Formulas and functions** (default): `request_type` is absent or `"table"`. Uses `queries` and `formulas`.
- **Data projection**: `request_type` is `"data_projection"`. Uses `query`, `projection`, and optionally `limit`.
properties:
formulas:
description: List of Scatterplot formulas that operate on queries.
items:
$ref: "#/components/schemas/ScatterplotWidgetFormula"
type: array
limit:
description: Maximum number of rows to return. Used when `request_type` is `"data_projection"`.
format: int64
type: integer
projection:
$ref: "#/components/schemas/ScatterplotDataProjectionProjection"
description: Projection configuration for data projection mode. Used when `request_type` is `"data_projection"`.
queries:
description: List of queries that can be returned directly or used in formulas.
items:
$ref: "#/components/schemas/FormulaAndFunctionQueryDefinition"
type: array
query:
$ref: "#/components/schemas/ScatterplotDataProjectionQuery"
description: Query for data projection mode. Used when `request_type` is `"data_projection"`.
request_type:
$ref: "#/components/schemas/ScatterplotTableRequestType"
description: The type of the scatterplot table request. Use `"data_projection"` for unaggregated raw data.
response_format:
$ref: "#/components/schemas/FormulaAndFunctionResponseFormat"
type: object
ScatterplotTableRequestType:
description: The type of the scatterplot table request.
enum:
- table
- data_projection
example: data_projection
type: string
x-enum-varnames:
- TABLE
- DATA_PROJECTION
ScatterplotWidgetAggregator:
description: Aggregator used for the request.
enum:
Expand Down
61 changes: 60 additions & 1 deletion examples/v1_dashboards_CreateDashboard_2342457693.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use datadog_api_client::datadog;
use datadog_api_client::datadogV1::api_dashboards::DashboardsAPI;
use datadog_api_client::datadogV1::model::Dashboard;
use datadog_api_client::datadogV1::model::DashboardLayoutType;
use datadog_api_client::datadogV1::model::FormulaAndFunctionEventsDataSource;
use datadog_api_client::datadogV1::model::FormulaAndFunctionMetricAggregation;
use datadog_api_client::datadogV1::model::FormulaAndFunctionMetricDataSource;
use datadog_api_client::datadogV1::model::FormulaAndFunctionMetricQueryDefinition;
Expand All @@ -11,8 +12,13 @@ use datadog_api_client::datadogV1::model::FormulaAndFunctionResponseFormat;
use datadog_api_client::datadogV1::model::ScatterPlotWidgetDefinition;
use datadog_api_client::datadogV1::model::ScatterPlotWidgetDefinitionRequests;
use datadog_api_client::datadogV1::model::ScatterPlotWidgetDefinitionType;
use datadog_api_client::datadogV1::model::ScatterplotDataProjectionDimension;
use datadog_api_client::datadogV1::model::ScatterplotDataProjectionProjection;
use datadog_api_client::datadogV1::model::ScatterplotDataProjectionProjectionType;
use datadog_api_client::datadogV1::model::ScatterplotDataProjectionQuery;
use datadog_api_client::datadogV1::model::ScatterplotDimension;
use datadog_api_client::datadogV1::model::ScatterplotTableRequest;
use datadog_api_client::datadogV1::model::ScatterplotTableRequestType;
use datadog_api_client::datadogV1::model::ScatterplotWidgetFormula;
use datadog_api_client::datadogV1::model::Widget;
use datadog_api_client::datadogV1::model::WidgetAxis;
Expand Down Expand Up @@ -97,7 +103,60 @@ async fn main() {
),
),
),
).layout(WidgetLayout::new(15, 47, 0, 0))
).layout(WidgetLayout::new(15, 47, 0, 0)),
Widget::new(
WidgetDefinition::ScatterPlotWidgetDefinition(
Box::new(
ScatterPlotWidgetDefinition::new(
ScatterPlotWidgetDefinitionRequests
::new().table(
ScatterplotTableRequest::new()
.limit(200)
.projection(
ScatterplotDataProjectionProjection::new(
vec![
ScatterplotDataProjectionDimension::new(
"duration".to_string(),
ScatterplotDimension::X,
),
ScatterplotDataProjectionDimension::new(
"@resource_name".to_string(),
ScatterplotDimension::Y,
)
],
ScatterplotDataProjectionProjectionType::SCATTERPLOT,
),
)
.query(
ScatterplotDataProjectionQuery::new(
FormulaAndFunctionEventsDataSource::SPANS,
"@service:web-store".to_string(),
),
)
.request_type(ScatterplotTableRequestType::DATA_PROJECTION),
),
ScatterPlotWidgetDefinitionType::SCATTERPLOT,
)
.title("Data Projection Scatterplot".to_string())
.title_align(WidgetTextAlign::LEFT)
.title_size("16".to_string())
.xaxis(
WidgetAxis::new()
.include_zero(true)
.max("auto".to_string())
.min("auto".to_string())
.scale("linear".to_string()),
)
.yaxis(
WidgetAxis::new()
.include_zero(true)
.max("auto".to_string())
.min("auto".to_string())
.scale("linear".to_string()),
),
),
),
).layout(WidgetLayout::new(15, 47, 48, 0))
],
)
.description(Some("".to_string()))
Expand Down
12 changes: 12 additions & 0 deletions src/datadogV1/model/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,18 @@ pub mod model_scatterplot_widget_formula;
pub use self::model_scatterplot_widget_formula::ScatterplotWidgetFormula;
pub mod model_scatterplot_dimension;
pub use self::model_scatterplot_dimension::ScatterplotDimension;
pub mod model_scatterplot_data_projection_projection;
pub use self::model_scatterplot_data_projection_projection::ScatterplotDataProjectionProjection;
pub mod model_scatterplot_data_projection_dimension;
pub use self::model_scatterplot_data_projection_dimension::ScatterplotDataProjectionDimension;
pub mod model_scatterplot_data_projection_projection_type;
pub use self::model_scatterplot_data_projection_projection_type::ScatterplotDataProjectionProjectionType;
pub mod model_scatterplot_data_projection_query;
pub use self::model_scatterplot_data_projection_query::ScatterplotDataProjectionQuery;
pub mod model_scatterplot_data_projection_query_storage;
pub use self::model_scatterplot_data_projection_query_storage::ScatterplotDataProjectionQueryStorage;
pub mod model_scatterplot_table_request_type;
pub use self::model_scatterplot_table_request_type::ScatterplotTableRequestType;
pub mod model_scatter_plot_request;
pub use self::model_scatter_plot_request::ScatterPlotRequest;
pub mod model_scatterplot_widget_aggregator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ use std::fmt::{self, Formatter};
#[skip_serializing_none]
#[derive(Clone, Debug, PartialEq, Serialize)]
pub struct ScatterPlotWidgetDefinitionRequests {
/// Scatterplot request containing formulas and functions.
/// Scatterplot table request. Supports two modes:
/// - **Formulas and functions** (default): `request_type` is absent or `"table"`. Uses `queries` and `formulas`.
/// - **Data projection**: `request_type` is `"data_projection"`. Uses `query`, `projection`, and optionally `limit`.
#[serde(rename = "table")]
pub table: Option<crate::datadogV1::model::ScatterplotTableRequest>,
/// Updated scatter plot.
Expand Down
Loading
Loading