Skip to content

Commit 9dfc072

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit d998327 of spec repo
1 parent 9de5984 commit 9dfc072

9 files changed

Lines changed: 337 additions & 3 deletions

.generator/schemas/v1/openapi.yaml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2623,6 +2623,103 @@ components:
26232623
nullable: true
26242624
type: array
26252625
type: object
2626+
EmbeddedAppWidgetDefinition:
2627+
additionalProperties: false
2628+
description: The embedded app widget displays an App Builder app on a dashboard.
2629+
oneOf:
2630+
- required:
2631+
- type
2632+
- app_id
2633+
- required:
2634+
- type
2635+
- template_id
2636+
properties:
2637+
app_id:
2638+
description: UUID of the App Builder app to embed. Exactly one of `app_id` or `template_id` must be provided.
2639+
example: "7e7745f9-4343-4927-b038-80934a355915"
2640+
type: string
2641+
custom_links:
2642+
description: List of custom links.
2643+
items:
2644+
$ref: '#/components/schemas/WidgetCustomLink'
2645+
type: array
2646+
description:
2647+
description: The description of the widget.
2648+
maxLength: 5000
2649+
type: string
2650+
inputs:
2651+
description: Inputs passed to the embedded app.
2652+
items:
2653+
$ref: '#/components/schemas/EmbeddedAppWidgetInput'
2654+
type: array
2655+
template_id:
2656+
description: ID of the built-in app template to embed. Exactly one of `app_id` or `template_id` must be provided.
2657+
example: ec2_manager
2658+
type: string
2659+
time:
2660+
$ref: '#/components/schemas/WidgetTime'
2661+
title:
2662+
description: Title of the widget.
2663+
type: string
2664+
title_align:
2665+
$ref: '#/components/schemas/WidgetTextAlign'
2666+
title_size:
2667+
description: Size of the title.
2668+
type: string
2669+
type:
2670+
$ref: '#/components/schemas/EmbeddedAppWidgetDefinitionType'
2671+
type: object
2672+
EmbeddedAppWidgetDefinitionType:
2673+
default: embedded_app
2674+
description: Type of the embedded app widget.
2675+
enum:
2676+
- embedded_app
2677+
example: embedded_app
2678+
type: string
2679+
x-enum-varnames:
2680+
- EMBEDDED_APP
2681+
EmbeddedAppWidgetInput:
2682+
additionalProperties: false
2683+
description: An input passed to the embedded app.
2684+
properties:
2685+
name:
2686+
description: Name of the app input.
2687+
example: environment
2688+
type: string
2689+
value:
2690+
$ref: '#/components/schemas/EmbeddedAppWidgetInputValue'
2691+
required:
2692+
- name
2693+
- value
2694+
type: object
2695+
EmbeddedAppWidgetInputValue:
2696+
description: Value of the app input. This can be a string, number, boolean, object, or array.
2697+
example: production
2698+
oneOf:
2699+
- type: string
2700+
- type: number
2701+
- type: boolean
2702+
- $ref: '#/components/schemas/EmbeddedAppWidgetInputValueObject'
2703+
- items:
2704+
description: A string value passed to the embedded app.
2705+
type: string
2706+
type: array
2707+
- items:
2708+
description: A numeric value passed to the embedded app.
2709+
type: number
2710+
type: array
2711+
- items:
2712+
description: A boolean value passed to the embedded app.
2713+
type: boolean
2714+
type: array
2715+
- items:
2716+
description: An object value passed to the embedded app.
2717+
type: object
2718+
type: array
2719+
EmbeddedAppWidgetInputValueObject:
2720+
additionalProperties: {}
2721+
description: An arbitrary object value passed to the embedded app.
2722+
type: object
26262723
Event:
26272724
description: Object representing an event.
26282725
properties:
@@ -28167,6 +28264,7 @@ components:
2816728264
- $ref: '#/components/schemas/CheckStatusWidgetDefinition'
2816828265
- $ref: '#/components/schemas/CohortWidgetDefinition'
2816928266
- $ref: '#/components/schemas/DistributionWidgetDefinition'
28267+
- $ref: '#/components/schemas/EmbeddedAppWidgetDefinition'
2817028268
- $ref: '#/components/schemas/EventStreamWidgetDefinition'
2817128269
- $ref: '#/components/schemas/EventTimelineWidgetDefinition'
2817228270
- $ref: '#/components/schemas/FreeTextWidgetDefinition'
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
7+
from datadog_api_client.model_utils import (
8+
ModelComposed,
9+
cached_property,
10+
date,
11+
datetime,
12+
none_type,
13+
UUID,
14+
)
15+
16+
17+
class EmbeddedAppWidgetDefinition(ModelComposed):
18+
def __init__(self, **kwargs):
19+
"""
20+
The embedded app widget displays an App Builder app on a dashboard.
21+
"""
22+
super().__init__(kwargs)
23+
24+
@cached_property
25+
def _composed_schemas(_):
26+
# we need this here to make our import statements work
27+
# we must store _composed_schemas in here so the code is only run
28+
# when we invoke this method. If we kept this at the class
29+
# level we would get an error because the class level
30+
# code would be run when this module is imported, and these composed
31+
# classes don't exist yet because their module has not finished
32+
# loading
33+
return {
34+
"oneOf": [
35+
bool,
36+
date,
37+
datetime,
38+
dict,
39+
float,
40+
int,
41+
list,
42+
str,
43+
UUID,
44+
none_type,
45+
bool,
46+
date,
47+
datetime,
48+
dict,
49+
float,
50+
int,
51+
list,
52+
str,
53+
UUID,
54+
none_type,
55+
],
56+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
7+
from datadog_api_client.model_utils import (
8+
ModelSimple,
9+
cached_property,
10+
)
11+
12+
from typing import ClassVar
13+
14+
15+
class EmbeddedAppWidgetDefinitionType(ModelSimple):
16+
"""
17+
Type of the embedded app widget.
18+
19+
:param value: If omitted defaults to "embedded_app". Must be one of ["embedded_app"].
20+
:type value: str
21+
"""
22+
23+
allowed_values = {
24+
"embedded_app",
25+
}
26+
EMBEDDED_APP: ClassVar["EmbeddedAppWidgetDefinitionType"]
27+
28+
@cached_property
29+
def openapi_types(_):
30+
return {
31+
"value": (str,),
32+
}
33+
34+
35+
EmbeddedAppWidgetDefinitionType.EMBEDDED_APP = EmbeddedAppWidgetDefinitionType("embedded_app")
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import List, Union, TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
)
12+
13+
14+
if TYPE_CHECKING:
15+
from datadog_api_client.v1.model.embedded_app_widget_input_value import EmbeddedAppWidgetInputValue
16+
from datadog_api_client.v1.model.embedded_app_widget_input_value_object import EmbeddedAppWidgetInputValueObject
17+
18+
19+
class EmbeddedAppWidgetInput(ModelNormal):
20+
@cached_property
21+
def additional_properties_type(_):
22+
return None
23+
24+
@cached_property
25+
def openapi_types(_):
26+
from datadog_api_client.v1.model.embedded_app_widget_input_value import EmbeddedAppWidgetInputValue
27+
28+
return {
29+
"name": (str,),
30+
"value": (EmbeddedAppWidgetInputValue,),
31+
}
32+
33+
attribute_map = {
34+
"name": "name",
35+
"value": "value",
36+
}
37+
38+
def __init__(
39+
self_,
40+
name: str,
41+
value: Union[
42+
EmbeddedAppWidgetInputValue,
43+
str,
44+
float,
45+
bool,
46+
EmbeddedAppWidgetInputValueObject,
47+
List[str],
48+
List[float],
49+
List[bool],
50+
List[dict],
51+
],
52+
**kwargs,
53+
):
54+
"""
55+
An input passed to the embedded app.
56+
57+
:param name: Name of the app input.
58+
:type name: str
59+
60+
:param value: Value of the app input. This can be a string, number, boolean, object, or array.
61+
:type value: EmbeddedAppWidgetInputValue
62+
"""
63+
super().__init__(kwargs)
64+
65+
self_.name = name
66+
self_.value = value
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
7+
from datadog_api_client.model_utils import (
8+
ModelComposed,
9+
cached_property,
10+
)
11+
12+
13+
class EmbeddedAppWidgetInputValue(ModelComposed):
14+
def __init__(self, **kwargs):
15+
"""
16+
Value of the app input. This can be a string, number, boolean, object, or array.
17+
"""
18+
super().__init__(kwargs)
19+
20+
@cached_property
21+
def _composed_schemas(_):
22+
# we need this here to make our import statements work
23+
# we must store _composed_schemas in here so the code is only run
24+
# when we invoke this method. If we kept this at the class
25+
# level we would get an error because the class level
26+
# code would be run when this module is imported, and these composed
27+
# classes don't exist yet because their module has not finished
28+
# loading
29+
from datadog_api_client.v1.model.embedded_app_widget_input_value_object import EmbeddedAppWidgetInputValueObject
30+
31+
return {
32+
"oneOf": [
33+
str,
34+
float,
35+
bool,
36+
EmbeddedAppWidgetInputValueObject,
37+
[str],
38+
[float],
39+
[bool],
40+
[dict],
41+
],
42+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
7+
from datadog_api_client.model_utils import (
8+
ModelNormal,
9+
)
10+
11+
12+
class EmbeddedAppWidgetInputValueObject(ModelNormal):
13+
def __init__(self_, **kwargs):
14+
"""
15+
An arbitrary object value passed to the embedded app.
16+
"""
17+
super().__init__(kwargs)

src/datadog_api_client/v1/model/widget.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from datadog_api_client.v1.model.check_status_widget_definition import CheckStatusWidgetDefinition
2424
from datadog_api_client.v1.model.cohort_widget_definition import CohortWidgetDefinition
2525
from datadog_api_client.v1.model.distribution_widget_definition import DistributionWidgetDefinition
26+
from datadog_api_client.v1.model.embedded_app_widget_definition import EmbeddedAppWidgetDefinition
2627
from datadog_api_client.v1.model.event_stream_widget_definition import EventStreamWidgetDefinition
2728
from datadog_api_client.v1.model.event_timeline_widget_definition import EventTimelineWidgetDefinition
2829
from datadog_api_client.v1.model.free_text_widget_definition import FreeTextWidgetDefinition
@@ -90,6 +91,7 @@ def __init__(
9091
CheckStatusWidgetDefinition,
9192
CohortWidgetDefinition,
9293
DistributionWidgetDefinition,
94+
EmbeddedAppWidgetDefinition,
9395
EventStreamWidgetDefinition,
9496
EventTimelineWidgetDefinition,
9597
FreeTextWidgetDefinition,

src/datadog_api_client/v1/model/widget_definition.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,15 @@ def __init__(self, **kwargs):
8787
:param yaxis: Y Axis controls for the distribution widget.
8888
:type yaxis: DistributionWidgetYAxis, optional
8989
90+
:param app_id: UUID of the App Builder app to embed. Exactly one of `app_id` or `template_id` must be provided.
91+
:type app_id: str, optional
92+
93+
:param inputs: Inputs passed to the embedded app.
94+
:type inputs: [EmbeddedAppWidgetInput], optional
95+
96+
:param template_id: ID of the built-in app template to embed. Exactly one of `app_id` or `template_id` must be provided.
97+
:type template_id: str, optional
98+
9099
:param event_size: Size to use to display an event.
91100
:type event_size: WidgetEventSize, optional
92101
@@ -248,9 +257,6 @@ def __init__(self, **kwargs):
248257
:param timeseries_background: Set a timeseries on the widget background.
249258
:type timeseries_background: TimeseriesBackground, optional
250259
251-
:param inputs: Array of workflow inputs to map to dashboard template variables.
252-
:type inputs: [RunWorkflowWidgetInput], optional
253-
254260
:param workflow_id: Workflow id.
255261
:type workflow_id: str
256262
@@ -371,6 +377,7 @@ def _composed_schemas(_):
371377
from datadog_api_client.v1.model.check_status_widget_definition import CheckStatusWidgetDefinition
372378
from datadog_api_client.v1.model.cohort_widget_definition import CohortWidgetDefinition
373379
from datadog_api_client.v1.model.distribution_widget_definition import DistributionWidgetDefinition
380+
from datadog_api_client.v1.model.embedded_app_widget_definition import EmbeddedAppWidgetDefinition
374381
from datadog_api_client.v1.model.event_stream_widget_definition import EventStreamWidgetDefinition
375382
from datadog_api_client.v1.model.event_timeline_widget_definition import EventTimelineWidgetDefinition
376383
from datadog_api_client.v1.model.free_text_widget_definition import FreeTextWidgetDefinition
@@ -417,6 +424,7 @@ def _composed_schemas(_):
417424
CheckStatusWidgetDefinition,
418425
CohortWidgetDefinition,
419426
DistributionWidgetDefinition,
427+
EmbeddedAppWidgetDefinition,
420428
EventStreamWidgetDefinition,
421429
EventTimelineWidgetDefinition,
422430
FreeTextWidgetDefinition,

0 commit comments

Comments
 (0)