Skip to content

Commit 4663905

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 96c58f8 of spec repo (#3986)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 838f504 commit 4663905

7 files changed

Lines changed: 318 additions & 3 deletions

File tree

‎.generator/schemas/v1/openapi.yaml‎

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2623,6 +2623,71 @@ 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. Exactly one of `app_id` or `template_id` must be provided; they cannot be provided together.
2629+
properties:
2630+
app_id:
2631+
description: UUID of the App Builder app to embed.
2632+
example: "7e7745f9-4343-4927-b038-80934a355915"
2633+
type: string
2634+
custom_links:
2635+
description: List of custom links.
2636+
items:
2637+
$ref: "#/components/schemas/WidgetCustomLink"
2638+
type: array
2639+
description:
2640+
description: The description of the widget.
2641+
maxLength: 5000
2642+
type: string
2643+
inputs:
2644+
description: Inputs passed to the embedded app.
2645+
items:
2646+
$ref: "#/components/schemas/EmbeddedAppWidgetInput"
2647+
type: array
2648+
template_id:
2649+
description: ID of the built-in app template to embed.
2650+
example: ec2_manager
2651+
type: string
2652+
time:
2653+
$ref: "#/components/schemas/WidgetTime"
2654+
title:
2655+
description: Title of the widget.
2656+
type: string
2657+
title_align:
2658+
$ref: "#/components/schemas/WidgetTextAlign"
2659+
title_size:
2660+
description: Size of the title.
2661+
type: string
2662+
type:
2663+
$ref: "#/components/schemas/EmbeddedAppWidgetDefinitionType"
2664+
required:
2665+
- type
2666+
type: object
2667+
EmbeddedAppWidgetDefinitionType:
2668+
default: embedded_app
2669+
description: Type of the embedded app widget.
2670+
enum:
2671+
- embedded_app
2672+
example: embedded_app
2673+
type: string
2674+
x-enum-varnames:
2675+
- EMBEDDED_APP
2676+
EmbeddedAppWidgetInput:
2677+
additionalProperties: false
2678+
description: An input passed to the embedded app.
2679+
properties:
2680+
name:
2681+
description: Name of the app input.
2682+
example: environment
2683+
type: string
2684+
value:
2685+
description: Value of the app input. The API accepts a string, number, boolean, object, or a non-empty homogeneous array of those types.
2686+
example: production
2687+
required:
2688+
- name
2689+
- value
2690+
type: object
26262691
Event:
26272692
description: Object representing an event.
26282693
properties:
@@ -28167,6 +28232,7 @@ components:
2816728232
- $ref: "#/components/schemas/CheckStatusWidgetDefinition"
2816828233
- $ref: "#/components/schemas/CohortWidgetDefinition"
2816928234
- $ref: "#/components/schemas/DistributionWidgetDefinition"
28235+
- $ref: "#/components/schemas/EmbeddedAppWidgetDefinition"
2817028236
- $ref: "#/components/schemas/EventStreamWidgetDefinition"
2817128237
- $ref: "#/components/schemas/EventTimelineWidgetDefinition"
2817228238
- $ref: "#/components/schemas/FreeTextWidgetDefinition"
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
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+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
if TYPE_CHECKING:
17+
from datadog_api_client.v1.model.widget_custom_link import WidgetCustomLink
18+
from datadog_api_client.v1.model.embedded_app_widget_input import EmbeddedAppWidgetInput
19+
from datadog_api_client.v1.model.widget_time import WidgetTime
20+
from datadog_api_client.v1.model.widget_text_align import WidgetTextAlign
21+
from datadog_api_client.v1.model.embedded_app_widget_definition_type import EmbeddedAppWidgetDefinitionType
22+
from datadog_api_client.v1.model.widget_legacy_live_span import WidgetLegacyLiveSpan
23+
from datadog_api_client.v1.model.widget_new_live_span import WidgetNewLiveSpan
24+
from datadog_api_client.v1.model.widget_new_fixed_span import WidgetNewFixedSpan
25+
26+
27+
class EmbeddedAppWidgetDefinition(ModelNormal):
28+
validations = {
29+
"description": {
30+
"max_length": 5000,
31+
},
32+
}
33+
34+
@cached_property
35+
def additional_properties_type(_):
36+
return None
37+
38+
@cached_property
39+
def openapi_types(_):
40+
from datadog_api_client.v1.model.widget_custom_link import WidgetCustomLink
41+
from datadog_api_client.v1.model.embedded_app_widget_input import EmbeddedAppWidgetInput
42+
from datadog_api_client.v1.model.widget_time import WidgetTime
43+
from datadog_api_client.v1.model.widget_text_align import WidgetTextAlign
44+
from datadog_api_client.v1.model.embedded_app_widget_definition_type import EmbeddedAppWidgetDefinitionType
45+
46+
return {
47+
"app_id": (str,),
48+
"custom_links": ([WidgetCustomLink],),
49+
"description": (str,),
50+
"inputs": ([EmbeddedAppWidgetInput],),
51+
"template_id": (str,),
52+
"time": (WidgetTime,),
53+
"title": (str,),
54+
"title_align": (WidgetTextAlign,),
55+
"title_size": (str,),
56+
"type": (EmbeddedAppWidgetDefinitionType,),
57+
}
58+
59+
attribute_map = {
60+
"app_id": "app_id",
61+
"custom_links": "custom_links",
62+
"description": "description",
63+
"inputs": "inputs",
64+
"template_id": "template_id",
65+
"time": "time",
66+
"title": "title",
67+
"title_align": "title_align",
68+
"title_size": "title_size",
69+
"type": "type",
70+
}
71+
72+
def __init__(
73+
self_,
74+
type: EmbeddedAppWidgetDefinitionType,
75+
app_id: Union[str, UnsetType] = unset,
76+
custom_links: Union[List[WidgetCustomLink], UnsetType] = unset,
77+
description: Union[str, UnsetType] = unset,
78+
inputs: Union[List[EmbeddedAppWidgetInput], UnsetType] = unset,
79+
template_id: Union[str, UnsetType] = unset,
80+
time: Union[WidgetTime, WidgetLegacyLiveSpan, WidgetNewLiveSpan, WidgetNewFixedSpan, UnsetType] = unset,
81+
title: Union[str, UnsetType] = unset,
82+
title_align: Union[WidgetTextAlign, UnsetType] = unset,
83+
title_size: Union[str, UnsetType] = unset,
84+
**kwargs,
85+
):
86+
"""
87+
The embedded app widget displays an App Builder app on a dashboard. Exactly one of ``app_id`` or ``template_id`` must be provided; they cannot be provided together.
88+
89+
:param app_id: UUID of the App Builder app to embed.
90+
:type app_id: str, optional
91+
92+
:param custom_links: List of custom links.
93+
:type custom_links: [WidgetCustomLink], optional
94+
95+
:param description: The description of the widget.
96+
:type description: str, optional
97+
98+
:param inputs: Inputs passed to the embedded app.
99+
:type inputs: [EmbeddedAppWidgetInput], optional
100+
101+
:param template_id: ID of the built-in app template to embed.
102+
:type template_id: str, optional
103+
104+
:param time: Time setting for the widget.
105+
:type time: WidgetTime, optional
106+
107+
:param title: Title of the widget.
108+
:type title: str, optional
109+
110+
:param title_align: How to align the text on the widget.
111+
:type title_align: WidgetTextAlign, optional
112+
113+
:param title_size: Size of the title.
114+
:type title_size: str, optional
115+
116+
:param type: Type of the embedded app widget.
117+
:type type: EmbeddedAppWidgetDefinitionType
118+
"""
119+
if app_id is not unset:
120+
kwargs["app_id"] = app_id
121+
if custom_links is not unset:
122+
kwargs["custom_links"] = custom_links
123+
if description is not unset:
124+
kwargs["description"] = description
125+
if inputs is not unset:
126+
kwargs["inputs"] = inputs
127+
if template_id is not unset:
128+
kwargs["template_id"] = template_id
129+
if time is not unset:
130+
kwargs["time"] = time
131+
if title is not unset:
132+
kwargs["title"] = title
133+
if title_align is not unset:
134+
kwargs["title_align"] = title_align
135+
if title_size is not unset:
136+
kwargs["title_size"] = title_size
137+
super().__init__(kwargs)
138+
139+
self_.type = type
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: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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 Any
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
date,
12+
datetime,
13+
none_type,
14+
UUID,
15+
)
16+
17+
18+
class EmbeddedAppWidgetInput(ModelNormal):
19+
@cached_property
20+
def additional_properties_type(_):
21+
return None
22+
23+
@cached_property
24+
def openapi_types(_):
25+
return {
26+
"name": (str,),
27+
"value": (
28+
bool,
29+
date,
30+
datetime,
31+
dict,
32+
float,
33+
int,
34+
list,
35+
str,
36+
UUID,
37+
none_type,
38+
),
39+
}
40+
41+
attribute_map = {
42+
"name": "name",
43+
"value": "value",
44+
}
45+
46+
def __init__(self_, name: str, value: Any, **kwargs):
47+
"""
48+
An input passed to the embedded app.
49+
50+
:param name: Name of the app input.
51+
:type name: str
52+
53+
:param value: Value of the app input. The API accepts a string, number, boolean, object, or a non-empty homogeneous array of those types.
54+
:type value: bool, date, datetime, dict, float, int, list, str, UUID, none_type
55+
"""
56+
super().__init__(kwargs)
57+
58+
self_.name = name
59+
self_.value = value

‎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.
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.
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,

‎src/datadog_api_client/v1/models/__init__.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@
126126
from datadog_api_client.v1.model.downtime import Downtime
127127
from datadog_api_client.v1.model.downtime_child import DowntimeChild
128128
from datadog_api_client.v1.model.downtime_recurrence import DowntimeRecurrence
129+
from datadog_api_client.v1.model.embedded_app_widget_definition import EmbeddedAppWidgetDefinition
130+
from datadog_api_client.v1.model.embedded_app_widget_definition_type import EmbeddedAppWidgetDefinitionType
131+
from datadog_api_client.v1.model.embedded_app_widget_input import EmbeddedAppWidgetInput
129132
from datadog_api_client.v1.model.event import Event
130133
from datadog_api_client.v1.model.event_alert_type import EventAlertType
131134
from datadog_api_client.v1.model.event_create_request import EventCreateRequest
@@ -1594,6 +1597,9 @@
15941597
"Downtime",
15951598
"DowntimeChild",
15961599
"DowntimeRecurrence",
1600+
"EmbeddedAppWidgetDefinition",
1601+
"EmbeddedAppWidgetDefinitionType",
1602+
"EmbeddedAppWidgetInput",
15971603
"Event",
15981604
"EventAlertType",
15991605
"EventCreateRequest",

0 commit comments

Comments
 (0)