Skip to content

Commit 1322963

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit aaac81a of spec repo
1 parent 088a162 commit 1322963

8 files changed

Lines changed: 171 additions & 4 deletions

File tree

.generator/schemas/v1/openapi.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10354,6 +10354,16 @@ components:
1035410354
type: string
1035510355
status:
1035610356
$ref: '#/components/schemas/NotebookStatus'
10357+
template_variables:
10358+
description: List of template variables for this notebook.
10359+
example:
10360+
- available_values: []
10361+
default: '*'
10362+
name: host
10363+
prefix: host
10364+
items:
10365+
$ref: '#/components/schemas/NotebookTemplateVariable'
10366+
type: array
1035710367
time:
1035810368
$ref: '#/components/schemas/NotebookGlobalTime'
1035910369
required:
@@ -10657,6 +10667,39 @@ components:
1065710667
type: string
1065810668
x-enum-varnames:
1065910669
- PUBLISHED
10670+
NotebookTemplateVariable:
10671+
description: Template variable for a notebook.
10672+
properties:
10673+
available_values:
10674+
description: The list of values that the template variable drop-down is
10675+
limited to.
10676+
example:
10677+
- my-host
10678+
- host1
10679+
- host2
10680+
items:
10681+
description: Template variable value.
10682+
type: string
10683+
nullable: true
10684+
type: array
10685+
default:
10686+
description: The default value for the template variable.
10687+
example: '*'
10688+
nullable: true
10689+
type: string
10690+
name:
10691+
description: The name of the variable.
10692+
example: host
10693+
type: string
10694+
prefix:
10695+
description: The tag prefix associated with the variable. Only tags with
10696+
this prefix appear in the variable drop-down.
10697+
example: host
10698+
nullable: true
10699+
type: string
10700+
required:
10701+
- name
10702+
type: object
1066010703
NotebookTimeseriesCellAttributes:
1066110704
description: The attributes of a notebook `timeseries` cell.
1066210705
properties:
@@ -10760,6 +10803,16 @@ components:
1076010803
type: string
1076110804
status:
1076210805
$ref: '#/components/schemas/NotebookStatus'
10806+
template_variables:
10807+
description: List of template variables for this notebook.
10808+
example:
10809+
- available_values: []
10810+
default: '*'
10811+
name: host
10812+
prefix: host
10813+
items:
10814+
$ref: '#/components/schemas/NotebookTemplateVariable'
10815+
type: array
1076310816
time:
1076410817
$ref: '#/components/schemas/NotebookGlobalTime'
1076510818
required:
@@ -10836,6 +10889,16 @@ components:
1083610889
type: string
1083710890
status:
1083810891
$ref: '#/components/schemas/NotebookStatus'
10892+
template_variables:
10893+
description: List of template variables for this notebook.
10894+
example:
10895+
- available_values: []
10896+
default: '*'
10897+
name: host
10898+
prefix: host
10899+
items:
10900+
$ref: '#/components/schemas/NotebookTemplateVariable'
10901+
type: array
1083910902
time:
1084010903
$ref: '#/components/schemas/NotebookGlobalTime'
1084110904
required:

docs/datadog_api_client.v1.model.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2909,6 +2909,13 @@ datadog\_api\_client.v1.model.notebook\_status module
29092909
:members:
29102910
:show-inheritance:
29112911

2912+
datadog\_api\_client.v1.model.notebook\_template\_variable module
2913+
-----------------------------------------------------------------
2914+
2915+
.. automodule:: datadog_api_client.v1.model.notebook_template_variable
2916+
:members:
2917+
:show-inheritance:
2918+
29122919
datadog\_api\_client.v1.model.notebook\_timeseries\_cell\_attributes module
29132920
---------------------------------------------------------------------------
29142921

src/datadog_api_client/v1/model/notebook_create_data_attributes.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from datadog_api_client.v1.model.notebook_cell_create_request import NotebookCellCreateRequest
1818
from datadog_api_client.v1.model.notebook_metadata import NotebookMetadata
1919
from datadog_api_client.v1.model.notebook_status import NotebookStatus
20+
from datadog_api_client.v1.model.notebook_template_variable import NotebookTemplateVariable
2021
from datadog_api_client.v1.model.notebook_global_time import NotebookGlobalTime
2122
from datadog_api_client.v1.model.notebook_relative_time import NotebookRelativeTime
2223
from datadog_api_client.v1.model.notebook_absolute_time import NotebookAbsoluteTime
@@ -35,13 +36,15 @@ def openapi_types(_):
3536
from datadog_api_client.v1.model.notebook_cell_create_request import NotebookCellCreateRequest
3637
from datadog_api_client.v1.model.notebook_metadata import NotebookMetadata
3738
from datadog_api_client.v1.model.notebook_status import NotebookStatus
39+
from datadog_api_client.v1.model.notebook_template_variable import NotebookTemplateVariable
3840
from datadog_api_client.v1.model.notebook_global_time import NotebookGlobalTime
3941

4042
return {
4143
"cells": ([NotebookCellCreateRequest],),
4244
"metadata": (NotebookMetadata,),
4345
"name": (str,),
4446
"status": (NotebookStatus,),
47+
"template_variables": ([NotebookTemplateVariable],),
4548
"time": (NotebookGlobalTime,),
4649
}
4750

@@ -50,6 +53,7 @@ def openapi_types(_):
5053
"metadata": "metadata",
5154
"name": "name",
5255
"status": "status",
56+
"template_variables": "template_variables",
5357
"time": "time",
5458
}
5559

@@ -60,6 +64,7 @@ def __init__(
6064
time: Union[NotebookGlobalTime, NotebookRelativeTime, NotebookAbsoluteTime],
6165
metadata: Union[NotebookMetadata, UnsetType] = unset,
6266
status: Union[NotebookStatus, UnsetType] = unset,
67+
template_variables: Union[List[NotebookTemplateVariable], UnsetType] = unset,
6368
**kwargs,
6469
):
6570
"""
@@ -77,13 +82,18 @@ def __init__(
7782
:param status: Publication status of the notebook. For now, always "published".
7883
:type status: NotebookStatus, optional
7984
85+
:param template_variables: List of template variables for this notebook.
86+
:type template_variables: [NotebookTemplateVariable], optional
87+
8088
:param time: Notebook global timeframe.
8189
:type time: NotebookGlobalTime
8290
"""
8391
if metadata is not unset:
8492
kwargs["metadata"] = metadata
8593
if status is not unset:
8694
kwargs["status"] = status
95+
if template_variables is not unset:
96+
kwargs["template_variables"] = template_variables
8797
super().__init__(kwargs)
8898

8999
self_.cells = cells
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
none_type,
12+
unset,
13+
UnsetType,
14+
)
15+
16+
17+
class NotebookTemplateVariable(ModelNormal):
18+
@cached_property
19+
def openapi_types(_):
20+
return {
21+
"available_values": ([str], none_type),
22+
"default": (str, none_type),
23+
"name": (str,),
24+
"prefix": (str, none_type),
25+
}
26+
27+
attribute_map = {
28+
"available_values": "available_values",
29+
"default": "default",
30+
"name": "name",
31+
"prefix": "prefix",
32+
}
33+
34+
def __init__(
35+
self_,
36+
name: str,
37+
available_values: Union[List[str], none_type, UnsetType] = unset,
38+
default: Union[str, none_type, UnsetType] = unset,
39+
prefix: Union[str, none_type, UnsetType] = unset,
40+
**kwargs,
41+
):
42+
"""
43+
Template variable for a notebook.
44+
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+
48+
:param default: The default value for the template variable.
49+
:type default: str, none_type, optional
50+
51+
:param name: The name of the variable.
52+
: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
56+
"""
57+
if available_values is not unset:
58+
kwargs["available_values"] = available_values
59+
if default is not unset:
60+
kwargs["default"] = default
61+
if prefix is not unset:
62+
kwargs["prefix"] = prefix
63+
super().__init__(kwargs)
64+
65+
self_.name = name

src/datadog_api_client/v1/model/notebook_update_data_attributes.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from datadog_api_client.v1.model.notebook_update_cell import NotebookUpdateCell
1818
from datadog_api_client.v1.model.notebook_metadata import NotebookMetadata
1919
from datadog_api_client.v1.model.notebook_status import NotebookStatus
20+
from datadog_api_client.v1.model.notebook_template_variable import NotebookTemplateVariable
2021
from datadog_api_client.v1.model.notebook_global_time import NotebookGlobalTime
2122
from datadog_api_client.v1.model.notebook_cell_create_request import NotebookCellCreateRequest
2223
from datadog_api_client.v1.model.notebook_cell_update_request import NotebookCellUpdateRequest
@@ -37,13 +38,15 @@ def openapi_types(_):
3738
from datadog_api_client.v1.model.notebook_update_cell import NotebookUpdateCell
3839
from datadog_api_client.v1.model.notebook_metadata import NotebookMetadata
3940
from datadog_api_client.v1.model.notebook_status import NotebookStatus
41+
from datadog_api_client.v1.model.notebook_template_variable import NotebookTemplateVariable
4042
from datadog_api_client.v1.model.notebook_global_time import NotebookGlobalTime
4143

4244
return {
4345
"cells": ([NotebookUpdateCell],),
4446
"metadata": (NotebookMetadata,),
4547
"name": (str,),
4648
"status": (NotebookStatus,),
49+
"template_variables": ([NotebookTemplateVariable],),
4750
"time": (NotebookGlobalTime,),
4851
}
4952

@@ -52,6 +55,7 @@ def openapi_types(_):
5255
"metadata": "metadata",
5356
"name": "name",
5457
"status": "status",
58+
"template_variables": "template_variables",
5559
"time": "time",
5660
}
5761

@@ -62,6 +66,7 @@ def __init__(
6266
time: Union[NotebookGlobalTime, NotebookRelativeTime, NotebookAbsoluteTime],
6367
metadata: Union[NotebookMetadata, UnsetType] = unset,
6468
status: Union[NotebookStatus, UnsetType] = unset,
69+
template_variables: Union[List[NotebookTemplateVariable], UnsetType] = unset,
6570
**kwargs,
6671
):
6772
"""
@@ -79,13 +84,18 @@ def __init__(
7984
:param status: Publication status of the notebook. For now, always "published".
8085
:type status: NotebookStatus, optional
8186
87+
:param template_variables: List of template variables for this notebook.
88+
:type template_variables: [NotebookTemplateVariable], optional
89+
8290
:param time: Notebook global timeframe.
8391
:type time: NotebookGlobalTime
8492
"""
8593
if metadata is not unset:
8694
kwargs["metadata"] = metadata
8795
if status is not unset:
8896
kwargs["status"] = status
97+
if template_variables is not unset:
98+
kwargs["template_variables"] = template_variables
8999
super().__init__(kwargs)
90100

91101
self_.cells = cells

src/datadog_api_client/v1/model/notebooks_response_data_attributes.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from datadog_api_client.v1.model.notebook_cell_response import NotebookCellResponse
2020
from datadog_api_client.v1.model.notebook_metadata import NotebookMetadata
2121
from datadog_api_client.v1.model.notebook_status import NotebookStatus
22+
from datadog_api_client.v1.model.notebook_template_variable import NotebookTemplateVariable
2223
from datadog_api_client.v1.model.notebook_global_time import NotebookGlobalTime
2324
from datadog_api_client.v1.model.notebook_relative_time import NotebookRelativeTime
2425
from datadog_api_client.v1.model.notebook_absolute_time import NotebookAbsoluteTime
@@ -38,6 +39,7 @@ def openapi_types(_):
3839
from datadog_api_client.v1.model.notebook_cell_response import NotebookCellResponse
3940
from datadog_api_client.v1.model.notebook_metadata import NotebookMetadata
4041
from datadog_api_client.v1.model.notebook_status import NotebookStatus
42+
from datadog_api_client.v1.model.notebook_template_variable import NotebookTemplateVariable
4143
from datadog_api_client.v1.model.notebook_global_time import NotebookGlobalTime
4244

4345
return {
@@ -48,6 +50,7 @@ def openapi_types(_):
4850
"modified": (datetime,),
4951
"name": (str,),
5052
"status": (NotebookStatus,),
53+
"template_variables": ([NotebookTemplateVariable],),
5154
"time": (NotebookGlobalTime,),
5255
}
5356

@@ -59,6 +62,7 @@ def openapi_types(_):
5962
"modified": "modified",
6063
"name": "name",
6164
"status": "status",
65+
"template_variables": "template_variables",
6266
"time": "time",
6367
}
6468
read_only_vars = {
@@ -75,6 +79,7 @@ def __init__(
7579
metadata: Union[NotebookMetadata, UnsetType] = unset,
7680
modified: Union[datetime, UnsetType] = unset,
7781
status: Union[NotebookStatus, UnsetType] = unset,
82+
template_variables: Union[List[NotebookTemplateVariable], UnsetType] = unset,
7883
time: Union[NotebookGlobalTime, NotebookRelativeTime, NotebookAbsoluteTime, UnsetType] = unset,
7984
**kwargs,
8085
):
@@ -102,6 +107,9 @@ def __init__(
102107
:param status: Publication status of the notebook. For now, always "published".
103108
:type status: NotebookStatus, optional
104109
110+
:param template_variables: List of template variables for this notebook.
111+
:type template_variables: [NotebookTemplateVariable], optional
112+
105113
:param time: Notebook global timeframe.
106114
:type time: NotebookGlobalTime, optional
107115
"""
@@ -117,6 +125,8 @@ def __init__(
117125
kwargs["modified"] = modified
118126
if status is not unset:
119127
kwargs["status"] = status
128+
if template_variables is not unset:
129+
kwargs["template_variables"] = template_variables
120130
if time is not unset:
121131
kwargs["time"] = time
122132
super().__init__(kwargs)

src/datadog_api_client/v1/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,7 @@
485485
from datadog_api_client.v1.model.notebook_response_data_attributes import NotebookResponseDataAttributes
486486
from datadog_api_client.v1.model.notebook_split_by import NotebookSplitBy
487487
from datadog_api_client.v1.model.notebook_status import NotebookStatus
488+
from datadog_api_client.v1.model.notebook_template_variable import NotebookTemplateVariable
488489
from datadog_api_client.v1.model.notebook_timeseries_cell_attributes import NotebookTimeseriesCellAttributes
489490
from datadog_api_client.v1.model.notebook_toplist_cell_attributes import NotebookToplistCellAttributes
490491
from datadog_api_client.v1.model.notebook_update_cell import NotebookUpdateCell
@@ -1566,6 +1567,7 @@
15661567
"NotebookResponseDataAttributes",
15671568
"NotebookSplitBy",
15681569
"NotebookStatus",
1570+
"NotebookTemplateVariable",
15691571
"NotebookTimeseriesCellAttributes",
15701572
"NotebookToplistCellAttributes",
15711573
"NotebookUpdateCell",

0 commit comments

Comments
 (0)