Skip to content

Commit

Permalink
Regenerate client from commit c00d43f of spec repo (#1214)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Mar 2, 2022
1 parent 25b71c8 commit 687a066
Show file tree
Hide file tree
Showing 99 changed files with 1,386 additions and 2,714 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.2",
"regenerated": "2022-03-02 11:11:25.390250",
"spec_repo_commit": "0f5bd41"
"regenerated": "2022-03-02 14:07:45.012522",
"spec_repo_commit": "c00d43f"
},
"v2": {
"apigentools_version": "1.6.2",
"regenerated": "2022-03-02 11:11:25.402657",
"spec_repo_commit": "0f5bd41"
"regenerated": "2022-03-02 14:07:45.025604",
"spec_repo_commit": "c00d43f"
}
}
}
77 changes: 31 additions & 46 deletions examples/v1/dashboards/CreateDashboard.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,52 +30,37 @@ public static void main(String[] args) {
.layoutType(DashboardLayoutType.ORDERED)
.title("Example-Create_a_new_dashboard_returns_OK_response with Profile Metrics Query")
.widgets(
new ArrayList<Widget>() {
{
add(
new Widget()
.definition(
new WidgetDefinition(
new TimeseriesWidgetDefinition()
.type(TimeseriesWidgetDefinitionType.TIMESERIES)
.requests(
new ArrayList<TimeseriesWidgetRequest>() {
{
add(
new TimeseriesWidgetRequest()
.profileMetricsQuery(
new LogQueryDefinition()
.compute(
new LogsQueryCompute()
.aggregation("sum")
.facet(
"@prof_core_cpu_cores"))
.search(
new LogQueryDefinitionSearch()
.query("runtime:jvm"))
.groupBy(
new ArrayList<
LogQueryDefinitionGroupBy>() {
{
add(
new LogQueryDefinitionGroupBy()
.facet("service")
.limit(10L)
.sort(
new LogQueryDefinitionGroupBySort()
.aggregation(
"sum")
.order(
WidgetSort
.DESCENDING)
.facet(
"@prof_core_cpu_cores")));
}
})));
}
}))));
}
});
Collections.singletonList(
new Widget()
.definition(
new WidgetDefinition(
new TimeseriesWidgetDefinition()
.type(TimeseriesWidgetDefinitionType.TIMESERIES)
.requests(
Collections.singletonList(
new TimeseriesWidgetRequest()
.profileMetricsQuery(
new LogQueryDefinition()
.compute(
new LogsQueryCompute()
.aggregation("sum")
.facet("@prof_core_cpu_cores"))
.search(
new LogQueryDefinitionSearch()
.query("runtime:jvm"))
.groupBy(
Collections.singletonList(
new LogQueryDefinitionGroupBy()
.facet("service")
.limit(10L)
.sort(
new LogQueryDefinitionGroupBySort()
.aggregation("sum")
.order(
WidgetSort
.DESCENDING)
.facet(
"@prof_core_cpu_cores")))))))))));

try {
Dashboard result = apiInstance.createDashboard(body);
Expand Down
106 changes: 36 additions & 70 deletions examples/v1/dashboards/CreateDashboard_1024858348.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import com.datadog.api.v1.client.model.FormulaAndFunctionEventQueryDefinition;
import com.datadog.api.v1.client.model.FormulaAndFunctionEventQueryDefinitionCompute;
import com.datadog.api.v1.client.model.FormulaAndFunctionEventQueryDefinitionSearch;
import com.datadog.api.v1.client.model.FormulaAndFunctionEventQueryGroupBy;
import com.datadog.api.v1.client.model.FormulaAndFunctionEventsDataSource;
import com.datadog.api.v1.client.model.FormulaAndFunctionQueryDefinition;
import com.datadog.api.v1.client.model.FormulaAndFunctionResponseFormat;
Expand All @@ -33,75 +32,42 @@ public static void main(String[] args) {
new Dashboard()
.title("Example-Create_a_new_dashboard_with_a_formulas_and_functions_treemap_widget")
.widgets(
new ArrayList<Widget>() {
{
add(
new Widget()
.definition(
new WidgetDefinition(
new TreeMapWidgetDefinition()
.title("")
.type(TreeMapWidgetDefinitionType.TREEMAP)
.requests(
new ArrayList<TreeMapWidgetRequest>() {
{
add(
new TreeMapWidgetRequest()
.formulas(
new ArrayList<WidgetFormula>() {
{
add(
new WidgetFormula()
.formula(
"hour_before(query1)"));
add(
new WidgetFormula()
.formula("query1"));
}
})
.queries(
new ArrayList<
FormulaAndFunctionQueryDefinition>() {
{
add(
new FormulaAndFunctionQueryDefinition(
new FormulaAndFunctionEventQueryDefinition()
.dataSource(
FormulaAndFunctionEventsDataSource
.LOGS)
.name("query1")
.search(
new FormulaAndFunctionEventQueryDefinitionSearch()
.query(""))
.indexes(
new ArrayList<
String>() {
{
add("*");
}
})
.compute(
new FormulaAndFunctionEventQueryDefinitionCompute()
.aggregation(
FormulaAndFunctionEventAggregation
.COUNT))
.groupBy(
new ArrayList<
FormulaAndFunctionEventQueryGroupBy>() {
{
;
}
})));
}
})
.responseFormat(
FormulaAndFunctionResponseFormat
.SCALAR));
}
})))
.layout(new WidgetLayout().x(0L).y(0L).width(4L).height(4L)));
}
})
Collections.singletonList(
new Widget()
.definition(
new WidgetDefinition(
new TreeMapWidgetDefinition()
.title("")
.type(TreeMapWidgetDefinitionType.TREEMAP)
.requests(
Collections.singletonList(
new TreeMapWidgetRequest()
.formulas(
Arrays.asList(
new WidgetFormula()
.formula("hour_before(query1)"),
new WidgetFormula().formula("query1")))
.queries(
Collections.singletonList(
new FormulaAndFunctionQueryDefinition(
new FormulaAndFunctionEventQueryDefinition()
.dataSource(
FormulaAndFunctionEventsDataSource
.LOGS)
.name("query1")
.search(
new FormulaAndFunctionEventQueryDefinitionSearch()
.query(""))
.indexes(
Collections.singletonList("*"))
.compute(
new FormulaAndFunctionEventQueryDefinitionCompute()
.aggregation(
FormulaAndFunctionEventAggregation
.COUNT)))))
.responseFormat(
FormulaAndFunctionResponseFormat.SCALAR)))))
.layout(new WidgetLayout().x(0L).y(0L).width(4L).height(4L))))
.layoutType(DashboardLayoutType.ORDERED);

try {
Expand Down
58 changes: 18 additions & 40 deletions examples/v1/dashboards/CreateDashboard_1177423752.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import com.datadog.api.v1.client.api.DashboardsApi;
import com.datadog.api.v1.client.model.Dashboard;
import com.datadog.api.v1.client.model.DashboardLayoutType;
import com.datadog.api.v1.client.model.DashboardTemplateVariable;
import com.datadog.api.v1.client.model.HeatMapWidgetDefinition;
import com.datadog.api.v1.client.model.HeatMapWidgetDefinitionType;
import com.datadog.api.v1.client.model.HeatMapWidgetRequest;
Expand All @@ -29,46 +28,25 @@ public static void main(String[] args) {
.title("Example-Create_a_new_dashboard_with_heatmap_widget")
.description(null)
.widgets(
new ArrayList<Widget>() {
{
add(
new Widget()
.layout(new WidgetLayout().x(0L).y(0L).width(47L).height(15L))
.definition(
new WidgetDefinition(
new HeatMapWidgetDefinition()
.title("")
.titleSize("16")
.titleAlign(WidgetTextAlign.LEFT)
.time(new WidgetTime())
.type(HeatMapWidgetDefinitionType.HEATMAP)
.requests(
new ArrayList<HeatMapWidgetRequest>() {
{
add(
new HeatMapWidgetRequest()
.q("avg:system.cpu.user{*} by {service}")
.style(
new WidgetStyle()
.palette("dog_classic")));
}
}))));
}
})
.templateVariables(
new ArrayList<DashboardTemplateVariable>() {
{
;
}
})
Collections.singletonList(
new Widget()
.layout(new WidgetLayout().x(0L).y(0L).width(47L).height(15L))
.definition(
new WidgetDefinition(
new HeatMapWidgetDefinition()
.title("")
.titleSize("16")
.titleAlign(WidgetTextAlign.LEFT)
.time(new WidgetTime())
.type(HeatMapWidgetDefinitionType.HEATMAP)
.requests(
Collections.singletonList(
new HeatMapWidgetRequest()
.q("avg:system.cpu.user{*} by {service}")
.style(
new WidgetStyle().palette("dog_classic"))))))))
.layoutType(DashboardLayoutType.FREE)
.isReadOnly(false)
.notifyList(
new ArrayList<String>() {
{
;
}
});
.isReadOnly(false);

try {
Dashboard result = apiInstance.createDashboard(body);
Expand Down
Loading

0 comments on commit 687a066

Please sign in to comment.