Skip to content

Commit c8d3c8e

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Powerpack add support for prefix and available values (#2164)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 06852c9 commit c8d3c8e

File tree

3 files changed

+45
-5
lines changed

3 files changed

+45
-5
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-09-16 14:02:51.199796",
8-
"spec_repo_commit": "966987f5"
7+
"regenerated": "2024-09-18 14:45:15.242991",
8+
"spec_repo_commit": "bae57ce1"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-09-16 14:02:51.217373",
13-
"spec_repo_commit": "966987f5"
12+
"regenerated": "2024-09-18 14:45:15.259945",
13+
"spec_repo_commit": "bae57ce1"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16297,6 +16297,18 @@ components:
1629716297
PowerpackTemplateVariable:
1629816298
description: Powerpack template variables.
1629916299
properties:
16300+
available_values:
16301+
description: The list of values that the template variable drop-down is
16302+
limited to.
16303+
example:
16304+
- my-host
16305+
- host1
16306+
- host2
16307+
items:
16308+
description: Template variable value.
16309+
type: string
16310+
nullable: true
16311+
type: array
1630016312
defaults:
1630116313
description: One or many template variable default values within the saved
1630216314
view, which are unioned together using `OR` if more than one is specified.
@@ -16309,6 +16321,12 @@ components:
1630916321
description: The name of the variable.
1631016322
example: datacenter
1631116323
type: string
16324+
prefix:
16325+
description: The tag prefix associated with the variable. Only tags with
16326+
this prefix appear in the variable drop-down.
16327+
example: host
16328+
nullable: true
16329+
type: string
1631216330
required:
1631316331
- name
1631416332
type: object

src/datadog_api_client/v2/model/powerpack_template_variable.py

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from datadog_api_client.model_utils import (
99
ModelNormal,
1010
cached_property,
11+
none_type,
1112
unset,
1213
UnsetType,
1314
)
@@ -17,27 +18,48 @@ class PowerpackTemplateVariable(ModelNormal):
1718
@cached_property
1819
def openapi_types(_):
1920
return {
21+
"available_values": ([str], none_type),
2022
"defaults": ([str],),
2123
"name": (str,),
24+
"prefix": (str, none_type),
2225
}
2326

2427
attribute_map = {
28+
"available_values": "available_values",
2529
"defaults": "defaults",
2630
"name": "name",
31+
"prefix": "prefix",
2732
}
2833

29-
def __init__(self_, name: str, defaults: Union[List[str], UnsetType] = unset, **kwargs):
34+
def __init__(
35+
self_,
36+
name: str,
37+
available_values: Union[List[str], none_type, UnsetType] = unset,
38+
defaults: Union[List[str], UnsetType] = unset,
39+
prefix: Union[str, none_type, UnsetType] = unset,
40+
**kwargs,
41+
):
3042
"""
3143
Powerpack template variables.
3244
45+
:param available_values: The list of values that the template variable drop-down is limited to.
46+
:type available_values: [str], none_type, optional
47+
3348
:param defaults: One or many template variable default values within the saved view, which are unioned together using ``OR`` if more than one is specified.
3449
:type defaults: [str], optional
3550
3651
:param name: The name of the variable.
3752
:type name: str
53+
54+
:param prefix: The tag prefix associated with the variable. Only tags with this prefix appear in the variable drop-down.
55+
:type prefix: str, none_type, optional
3856
"""
57+
if available_values is not unset:
58+
kwargs["available_values"] = available_values
3959
if defaults is not unset:
4060
kwargs["defaults"] = defaults
61+
if prefix is not unset:
62+
kwargs["prefix"] = prefix
4163
super().__init__(kwargs)
4264

4365
self_.name = name

0 commit comments

Comments
 (0)