Skip to content

Commit

Permalink
Regenerate client from commit 9ca8c274 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Sep 8, 2022
1 parent df4373d commit 9838ab9
Show file tree
Hide file tree
Showing 12 changed files with 1,089 additions and 8 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.4",
"regenerated": "2022-09-07 19:30:25.824806",
"spec_repo_commit": "33b7a42c"
"regenerated": "2022-09-08 19:49:20.353150",
"spec_repo_commit": "9ca8c274"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2022-09-07 19:30:25.837194",
"spec_repo_commit": "33b7a42c"
"regenerated": "2022-09-08 19:49:20.365685",
"spec_repo_commit": "9ca8c274"
}
}
}
86 changes: 86 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13378,6 +13378,91 @@ components:
style:
$ref: '#/components/schemas/WidgetRequestStyle'
type: object
TopologyMapWidgetDefinition:
description: This widget displays a topology of nodes and edges for different
data sources. It replaces the service map widget.
properties:
custom_links:
description: List of custom links.
items:
$ref: '#/components/schemas/WidgetCustomLink'
type: array
requests:
description: One or more Topology requests.
items:
$ref: '#/components/schemas/TopologyRequest'
minItems: 1
type: array
title:
description: Title of your widget.
type: string
title_align:
$ref: '#/components/schemas/WidgetTextAlign'
title_size:
description: Size of the title.
type: string
type:
$ref: '#/components/schemas/TopologyMapWidgetDefinitionType'
required:
- type
- requests
type: object
TopologyMapWidgetDefinitionType:
default: topology_map
description: Type of the topology map widget.
enum:
- topology_map
example: topology_map
type: string
x-enum-varnames:
- TOPOLOGY_MAP
TopologyQuery:
description: Query to service-based topology data sources like the service map
or data streams.
properties:
data_source:
$ref: '#/components/schemas/TopologyQueryDataSource'
filters:
description: Your environment and primary tag (or * if enabled for your
account).
example:
- env:prod
- az:us-east
items:
description: Environment or primary tag, generally in a key:value format
type: string
minItems: 1
type: array
service:
description: Name of the service
example: myService
type: string
type: object
TopologyQueryDataSource:
description: Name of the data source
enum:
- data_streams
- service_map
type: string
x-enum-varnames:
- DATA_STREAMS
- SERVICE_MAP
TopologyRequest:
description: Request that will return nodes and edges to be used by topology
map.
properties:
query:
$ref: '#/components/schemas/TopologyQuery'
request_type:
$ref: '#/components/schemas/TopologyRequestType'
type: object
TopologyRequestType:
description: Widget request type.
enum:
- topology
type: string
x-enum-varnames:
- TOPOLOGY
TreeMapColorBy:
default: user
deprecated: true
Expand Down Expand Up @@ -16914,6 +16999,7 @@ components:
- $ref: '#/components/schemas/TreeMapWidgetDefinition'
- $ref: '#/components/schemas/ListStreamWidgetDefinition'
- $ref: '#/components/schemas/FunnelWidgetDefinition'
- $ref: '#/components/schemas/TopologyMapWidgetDefinition'
type: object
WidgetDisplayType:
description: Type of display to use for the request.
Expand Down
67 changes: 67 additions & 0 deletions examples/v1/dashboards/CreateDashboard_2652180930.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// Create a new dashboard with topology_map widget

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.DashboardsApi;
import com.datadog.api.client.v1.model.Dashboard;
import com.datadog.api.client.v1.model.DashboardLayoutType;
import com.datadog.api.client.v1.model.TopologyMapWidgetDefinition;
import com.datadog.api.client.v1.model.TopologyMapWidgetDefinitionType;
import com.datadog.api.client.v1.model.TopologyQuery;
import com.datadog.api.client.v1.model.TopologyQueryDataSource;
import com.datadog.api.client.v1.model.TopologyRequest;
import com.datadog.api.client.v1.model.TopologyRequestType;
import com.datadog.api.client.v1.model.Widget;
import com.datadog.api.client.v1.model.WidgetDefinition;
import com.datadog.api.client.v1.model.WidgetLayout;
import com.datadog.api.client.v1.model.WidgetTextAlign;
import java.util.Arrays;
import java.util.Collections;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
DashboardsApi apiInstance = new DashboardsApi(defaultClient);

Dashboard body =
new Dashboard()
.title("Example-Create_a_new_dashboard_with_topology_map_widget")
.description("")
.widgets(
Collections.singletonList(
new Widget()
.layout(new WidgetLayout().x(0L).y(0L).width(47L).height(15L))
.definition(
new WidgetDefinition(
new TopologyMapWidgetDefinition()
.title("")
.titleSize("16")
.titleAlign(WidgetTextAlign.LEFT)
.type(TopologyMapWidgetDefinitionType.TOPOLOGY_MAP)
.requests(
Collections.singletonList(
new TopologyRequest()
.requestType(TopologyRequestType.TOPOLOGY)
.query(
new TopologyQuery()
.dataSource(
TopologyQueryDataSource.SERVICE_MAP)
.service("")
.filters(
Arrays.asList(
"env:none", "environment:*")))))))))
.layoutType(DashboardLayoutType.FREE)
.isReadOnly(false);

try {
Dashboard result = apiInstance.createDashboard(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DashboardsApi#createDashboard");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Loading

0 comments on commit 9838ab9

Please sign in to comment.