Skip to content

Commit affc1a5

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 45ec03c of spec repo
1 parent b709302 commit affc1a5

9 files changed

Lines changed: 436 additions & 3 deletions

.generator/schemas/v1/openapi.yaml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2623,6 +2623,118 @@ components:
26232623
nullable: true
26242624
type: array
26252625
type: object
2626+
EmbeddedAppWidgetDefinition:
2627+
additionalProperties: false
2628+
anyOf:
2629+
- required:
2630+
- app_id
2631+
- required:
2632+
- template_id
2633+
description: The embedded app widget displays an App Builder app on a dashboard.
2634+
properties:
2635+
app_id:
2636+
description: UUID of the App Builder app to embed. Exactly one of `app_id` or `template_id` must be provided.
2637+
example: "7e7745f9-4343-4927-b038-80934a355915"
2638+
type: string
2639+
custom_links:
2640+
description: List of custom links.
2641+
items:
2642+
$ref: '#/components/schemas/WidgetCustomLink'
2643+
type: array
2644+
description:
2645+
description: The description of the widget.
2646+
maxLength: 5000
2647+
type: string
2648+
inputs:
2649+
description: Inputs passed to the embedded app.
2650+
items:
2651+
$ref: '#/components/schemas/EmbeddedAppWidgetInput'
2652+
type: array
2653+
template_id:
2654+
description: ID of the built-in app template to embed. Exactly one of `app_id` or `template_id` must be provided.
2655+
example: ec2_manager
2656+
type: string
2657+
time:
2658+
$ref: '#/components/schemas/WidgetTime'
2659+
title:
2660+
description: Title of the widget.
2661+
type: string
2662+
title_align:
2663+
$ref: '#/components/schemas/WidgetTextAlign'
2664+
title_size:
2665+
description: Size of the title.
2666+
type: string
2667+
type:
2668+
$ref: '#/components/schemas/EmbeddedAppWidgetDefinitionType'
2669+
required:
2670+
- type
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+
- $ref: '#/components/schemas/EmbeddedAppWidgetInputValueStringArray'
2704+
- $ref: '#/components/schemas/EmbeddedAppWidgetInputValueNumberArray'
2705+
- $ref: '#/components/schemas/EmbeddedAppWidgetInputValueBooleanArray'
2706+
- $ref: '#/components/schemas/EmbeddedAppWidgetInputValueObjectArray'
2707+
EmbeddedAppWidgetInputValueBooleanArray:
2708+
description: An array of boolean values passed to the embedded app.
2709+
items:
2710+
description: A boolean value passed to the embedded app.
2711+
type: boolean
2712+
type: array
2713+
x-generate-alias-as-model: true
2714+
EmbeddedAppWidgetInputValueNumberArray:
2715+
description: An array of numeric values passed to the embedded app.
2716+
items:
2717+
description: A numeric value passed to the embedded app.
2718+
type: number
2719+
type: array
2720+
x-generate-alias-as-model: true
2721+
EmbeddedAppWidgetInputValueObject:
2722+
additionalProperties: {}
2723+
description: An arbitrary object value passed to the embedded app.
2724+
type: object
2725+
EmbeddedAppWidgetInputValueObjectArray:
2726+
description: An array of object values passed to the embedded app.
2727+
items:
2728+
$ref: '#/components/schemas/EmbeddedAppWidgetInputValueObject'
2729+
type: array
2730+
x-generate-alias-as-model: true
2731+
EmbeddedAppWidgetInputValueStringArray:
2732+
description: An array of string values passed to the embedded app.
2733+
items:
2734+
description: A string value passed to the embedded app.
2735+
type: string
2736+
type: array
2737+
x-generate-alias-as-model: true
26262738
Event:
26272739
description: Object representing an event.
26282740
properties:
@@ -28167,6 +28279,7 @@ components:
2816728279
- $ref: '#/components/schemas/CheckStatusWidgetDefinition'
2816828280
- $ref: '#/components/schemas/CohortWidgetDefinition'
2816928281
- $ref: '#/components/schemas/DistributionWidgetDefinition'
28282+
- $ref: '#/components/schemas/EmbeddedAppWidgetDefinition'
2817028283
- $ref: '#/components/schemas/EventStreamWidgetDefinition'
2817128284
- $ref: '#/components/schemas/EventTimelineWidgetDefinition'
2817228285
- $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.
88+
89+
:param app_id: UUID of the App Builder app to embed. Exactly one of ``app_id`` or ``template_id`` must be provided.
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. Exactly one of ``app_id`` or ``template_id`` must be provided.
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: 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[EmbeddedAppWidgetInputValueObject],
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

0 commit comments

Comments
 (0)