Skip to content

Commit a4289fa

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

File tree

9 files changed

+191
-4
lines changed

9 files changed

+191
-4
lines changed

.generator/schemas/v1/openapi.yaml

Lines changed: 73 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:
@@ -10612,6 +10622,16 @@ components:
1061210622
type: string
1061310623
status:
1061410624
$ref: '#/components/schemas/NotebookStatus'
10625+
template_variables:
10626+
description: List of template variables for this notebook.
10627+
example:
10628+
- available_values: []
10629+
default: '*'
10630+
name: host
10631+
prefix: host
10632+
items:
10633+
$ref: '#/components/schemas/NotebookTemplateVariable'
10634+
type: array
1061510635
time:
1061610636
$ref: '#/components/schemas/NotebookGlobalTime'
1061710637
required:
@@ -10657,6 +10677,39 @@ components:
1065710677
type: string
1065810678
x-enum-varnames:
1065910679
- PUBLISHED
10680+
NotebookTemplateVariable:
10681+
description: Template variable for a notebook.
10682+
properties:
10683+
available_values:
10684+
description: The list of values that the template variable drop-down is
10685+
limited to.
10686+
example:
10687+
- my-host
10688+
- host1
10689+
- host2
10690+
items:
10691+
description: Template variable value.
10692+
type: string
10693+
nullable: true
10694+
type: array
10695+
default:
10696+
description: The default value for the template variable.
10697+
example: '*'
10698+
nullable: true
10699+
type: string
10700+
name:
10701+
description: The name of the variable.
10702+
example: host
10703+
type: string
10704+
prefix:
10705+
description: The tag prefix associated with the variable. Only tags with
10706+
this prefix appear in the variable drop-down.
10707+
example: host
10708+
nullable: true
10709+
type: string
10710+
required:
10711+
- name
10712+
type: object
1066010713
NotebookTimeseriesCellAttributes:
1066110714
description: The attributes of a notebook `timeseries` cell.
1066210715
properties:
@@ -10760,6 +10813,16 @@ components:
1076010813
type: string
1076110814
status:
1076210815
$ref: '#/components/schemas/NotebookStatus'
10816+
template_variables:
10817+
description: List of template variables for this notebook.
10818+
example:
10819+
- available_values: []
10820+
default: '*'
10821+
name: host
10822+
prefix: host
10823+
items:
10824+
$ref: '#/components/schemas/NotebookTemplateVariable'
10825+
type: array
1076310826
time:
1076410827
$ref: '#/components/schemas/NotebookGlobalTime'
1076510828
required:
@@ -10836,6 +10899,16 @@ components:
1083610899
type: string
1083710900
status:
1083810901
$ref: '#/components/schemas/NotebookStatus'
10902+
template_variables:
10903+
description: List of template variables for this notebook.
10904+
example:
10905+
- available_values: []
10906+
default: '*'
10907+
name: host
10908+
prefix: host
10909+
items:
10910+
$ref: '#/components/schemas/NotebookTemplateVariable'
10911+
type: array
1083910912
time:
1084010913
$ref: '#/components/schemas/NotebookGlobalTime'
1084110914
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

src/datadog_api_client/v1/model/notebook_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 = {
@@ -76,6 +80,7 @@ def __init__(
7680
metadata: Union[NotebookMetadata, UnsetType] = unset,
7781
modified: Union[datetime, UnsetType] = unset,
7882
status: Union[NotebookStatus, UnsetType] = unset,
83+
template_variables: Union[List[NotebookTemplateVariable], UnsetType] = unset,
7984
**kwargs,
8085
):
8186
"""
@@ -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
107115
"""
@@ -115,6 +123,8 @@ def __init__(
115123
kwargs["modified"] = modified
116124
if status is not unset:
117125
kwargs["status"] = status
126+
if template_variables is not unset:
127+
kwargs["template_variables"] = template_variables
118128
super().__init__(kwargs)
119129

120130
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

0 commit comments

Comments
 (0)