Skip to content
Merged
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
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.6",
"regenerated": "2023-10-05 18:57:52.705512",
"spec_repo_commit": "faa2c8d3"
"regenerated": "2023-10-05 20:05:32.231080",
"spec_repo_commit": "f7a95272"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-10-05 18:57:52.719989",
"spec_repo_commit": "faa2c8d3"
"regenerated": "2023-10-05 20:05:32.245343",
"spec_repo_commit": "f7a95272"
}
}
}
188 changes: 156 additions & 32 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5482,24 +5482,6 @@ components:
type: string
x-enum-varnames:
- GCP_SERVICE_ACCOUNT
GetAllPowerpacksResponse:
description: Response object which includes all powerpack configurations.
properties:
data:
description: List of powerpack definitions.
items:
$ref: '#/components/schemas/PowerpackData'
type: array
included:
description: Array of objects related to the users.
items:
$ref: '#/components/schemas/User'
type: array
links:
$ref: '#/components/schemas/PowerpackResponseLinks'
meta:
$ref: '#/components/schemas/PowerpacksResponseMeta'
type: object
GetFindingResponse:
description: The expected response schema when getting a finding.
properties:
Expand Down Expand Up @@ -7677,6 +7659,24 @@ components:
- data
- meta
type: object
ListPowerpacksResponse:
description: Response object which includes all powerpack configurations.
properties:
data:
description: List of powerpack definitions.
items:
$ref: '#/components/schemas/PowerpackData'
type: array
included:
description: Array of objects related to the users.
items:
$ref: '#/components/schemas/User'
type: array
links:
$ref: '#/components/schemas/PowerpackResponseLinks'
meta:
$ref: '#/components/schemas/PowerpacksResponseMeta'
type: object
ListTeamsInclude:
description: Included related resources optionally requested.
enum:
Expand Down Expand Up @@ -10596,18 +10596,7 @@ components:
example: Powerpack for ABC
type: string
group_widget:
additionalProperties: {}
description: Templated group of dashboard widgets for the powerpack.
example:
layout_type: ordered
tags:
- tag:foo1
type: group
widgets:
- definition:
content: example
type: note
type: object
$ref: '#/components/schemas/PowerpackGroupWidget'
name:
description: Name of the powerpack.
example: Sample Powerpack
Expand Down Expand Up @@ -10649,6 +10638,141 @@ components:
example: powerpack
type: string
type: object
PowerpackGroupWidget:
description: Powerpack group widget definition object.
properties:
definition:
$ref: '#/components/schemas/PowerpackGroupWidgetDefinition'
layout:
$ref: '#/components/schemas/PowerpackGroupWidgetLayout'
required:
- definition
type: object
PowerpackGroupWidgetDefinition:
description: Powerpack group widget object.
properties:
layout_type:
description: Layout type of widgets.
example: ordered
type: string
show_title:
description: Boolean indicating whether powerpack group title should be
visible or not.
example: true
type: boolean
title:
description: Name for the group widget.
example: Sample Powerpack
type: string
type:
description: Type of widget, must be group.
example: group
type: string
widgets:
description: Widgets inside the powerpack.
example:
- definition:
content: example
type: note
layout:
height: 5
width: 10
x: 0
y: 0
items:
$ref: '#/components/schemas/PowerpackInnerWidgets'
type: array
required:
- widgets
- layout_type
- type
type: object
PowerpackGroupWidgetLayout:
description: Powerpack group widget layout.
properties:
height:
description: The height of the widget. Should be a non-negative integer.
example: 0
format: int64
minimum: 0
type: integer
width:
description: The width of the widget. Should be a non-negative integer.
example: 0
format: int64
minimum: 0
type: integer
x:
description: The position of the widget on the x (horizontal) axis. Should
be a non-negative integer.
example: 0
format: int64
minimum: 0
type: integer
y:
description: The position of the widget on the y (vertical) axis. Should
be a non-negative integer.
example: 0
format: int64
minimum: 0
type: integer
required:
- x
- y
- width
- height
type: object
PowerpackInnerWidgetLayout:
description: Powerpack inner widget layout.
properties:
height:
description: The height of the widget. Should be a non-negative integer.
example: 0
format: int64
minimum: 0
type: integer
width:
description: The width of the widget. Should be a non-negative integer.
example: 0
format: int64
minimum: 0
type: integer
x:
description: The position of the widget on the x (horizontal) axis. Should
be a non-negative integer.
example: 0
format: int64
minimum: 0
type: integer
y:
description: The position of the widget on the y (vertical) axis. Should
be a non-negative integer.
example: 0
format: int64
minimum: 0
type: integer
required:
- x
- y
- width
- height
type: object
PowerpackInnerWidgets:
description: Powerpack group widget definition of individual widgets.
properties:
definition:
additionalProperties: {}
description: Information about widget.
example:
definition:
content: example
type: note
type: object
layout:
$ref: '#/components/schemas/PowerpackInnerWidgetLayout'
required:
- definition
type: object
PowerpackRelationships:
description: Powerpack relationship object.
properties:
Expand Down Expand Up @@ -23570,13 +23694,13 @@ paths:
/api/v2/powerpacks:
get:
description: Get a list of all powerpacks.
operationId: GetAllPowerpacks
operationId: ListPowerpacks
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GetAllPowerpacksResponse'
$ref: '#/components/schemas/ListPowerpacksResponse'
description: OK
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
Expand Down
33 changes: 24 additions & 9 deletions examples/v2/powerpack/CreatePowerpack.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
import com.datadog.api.client.v2.model.Powerpack;
import com.datadog.api.client.v2.model.PowerpackAttributes;
import com.datadog.api.client.v2.model.PowerpackData;
import com.datadog.api.client.v2.model.PowerpackGroupWidget;
import com.datadog.api.client.v2.model.PowerpackGroupWidgetDefinition;
import com.datadog.api.client.v2.model.PowerpackGroupWidgetLayout;
import com.datadog.api.client.v2.model.PowerpackInnerWidgets;
import com.datadog.api.client.v2.model.PowerpackResponse;
import com.datadog.api.client.v2.model.PowerpackTemplateVariable;
import java.util.Collections;
Expand All @@ -24,15 +28,26 @@ public static void main(String[] args) {
new PowerpackAttributes()
.description("Sample powerpack")
.groupWidget(
Map.ofEntries(
Map.entry(
"definition",
"{'layout_type': 'ordered', 'show_title': True, 'title':"
+ " 'Sample Powerpack', 'type': 'group', 'widgets':"
+ " [{'definition': {'content': 'test', 'type':"
+ " 'note'}}]}"),
Map.entry(
"layout", "{'height': 3, 'width': 12, 'x': 0, 'y': 0}")))
new PowerpackGroupWidget()
.definition(
new PowerpackGroupWidgetDefinition()
.layoutType("ordered")
.showTitle(true)
.title("Sample Powerpack")
.type("group")
.widgets(
Collections.singletonList(
new PowerpackInnerWidgets()
.definition(
Map.ofEntries(
Map.entry("content", "test"),
Map.entry("type", "note"))))))
.layout(
new PowerpackGroupWidgetLayout()
.height(3L)
.width(12L)
.x(0L)
.y(0L)))
.name("Sample Powerpack")
.tags(Collections.singletonList("tag:sample"))
.templateVariables(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.PowerpackApi;
import com.datadog.api.client.v2.model.GetAllPowerpacksResponse;
import com.datadog.api.client.v2.model.ListPowerpacksResponse;

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

try {
GetAllPowerpacksResponse result = apiInstance.getAllPowerpacks();
ListPowerpacksResponse result = apiInstance.listPowerpacks();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PowerpackApi#getAllPowerpacks");
System.err.println("Exception when calling PowerpackApi#listPowerpacks");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
Expand Down
33 changes: 24 additions & 9 deletions examples/v2/powerpack/UpdatePowerpack.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
import com.datadog.api.client.v2.model.Powerpack;
import com.datadog.api.client.v2.model.PowerpackAttributes;
import com.datadog.api.client.v2.model.PowerpackData;
import com.datadog.api.client.v2.model.PowerpackGroupWidget;
import com.datadog.api.client.v2.model.PowerpackGroupWidgetDefinition;
import com.datadog.api.client.v2.model.PowerpackGroupWidgetLayout;
import com.datadog.api.client.v2.model.PowerpackInnerWidgets;
import com.datadog.api.client.v2.model.PowerpackResponse;
import com.datadog.api.client.v2.model.PowerpackTemplateVariable;
import java.util.Collections;
Expand All @@ -27,15 +31,26 @@ public static void main(String[] args) {
new PowerpackAttributes()
.description("Sample powerpack")
.groupWidget(
Map.ofEntries(
Map.entry(
"definition",
"{'layout_type': 'ordered', 'show_title': True, 'title':"
+ " 'Sample Powerpack', 'type': 'group', 'widgets':"
+ " [{'definition': {'content': 'test', 'type':"
+ " 'note'}}]}"),
Map.entry(
"layout", "{'height': 3, 'width': 12, 'x': 0, 'y': 0}")))
new PowerpackGroupWidget()
.definition(
new PowerpackGroupWidgetDefinition()
.layoutType("ordered")
.showTitle(true)
.title("Sample Powerpack")
.type("group")
.widgets(
Collections.singletonList(
new PowerpackInnerWidgets()
.definition(
Map.ofEntries(
Map.entry("content", "test"),
Map.entry("type", "note"))))))
.layout(
new PowerpackGroupWidgetLayout()
.height(3L)
.width(12L)
.x(0L)
.y(0L)))
.name("Sample Powerpack")
.tags(Collections.singletonList("tag:sample"))
.templateVariables(
Expand Down
Loading