Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10354,6 +10354,16 @@ components:
type: string
status:
$ref: '#/components/schemas/NotebookStatus'
template_variables:
description: List of template variables for this notebook.
example:
- available_values: []
default: '*'
name: host
prefix: host
items:
$ref: '#/components/schemas/NotebookTemplateVariable'
type: array
time:
$ref: '#/components/schemas/NotebookGlobalTime'
required:
Expand Down Expand Up @@ -10657,6 +10667,39 @@ components:
type: string
x-enum-varnames:
- PUBLISHED
NotebookTemplateVariable:
description: Template variable for a notebook.
properties:
available_values:
description: The list of values that the template variable drop-down is
limited to.
example:
- my-host
- host1
- host2
items:
description: Template variable value.
type: string
nullable: true
type: array
default:
description: The default value for the template variable.
example: '*'
nullable: true
type: string
name:
description: The name of the variable.
example: host
type: string
prefix:
description: The tag prefix associated with the variable. Only tags with
this prefix appear in the variable drop-down.
example: host
nullable: true
type: string
required:
- name
type: object
NotebookTimeseriesCellAttributes:
description: The attributes of a notebook `timeseries` cell.
properties:
Expand Down Expand Up @@ -10760,6 +10803,16 @@ components:
type: string
status:
$ref: '#/components/schemas/NotebookStatus'
template_variables:
description: List of template variables for this notebook.
example:
- available_values: []
default: '*'
name: host
prefix: host
items:
$ref: '#/components/schemas/NotebookTemplateVariable'
type: array
time:
$ref: '#/components/schemas/NotebookGlobalTime'
required:
Expand Down Expand Up @@ -10836,6 +10889,16 @@ components:
type: string
status:
$ref: '#/components/schemas/NotebookStatus'
template_variables:
description: List of template variables for this notebook.
example:
- available_values: []
default: '*'
name: host
prefix: host
items:
$ref: '#/components/schemas/NotebookTemplateVariable'
type: array
time:
$ref: '#/components/schemas/NotebookGlobalTime'
required:
Expand Down
7 changes: 7 additions & 0 deletions docs/datadog_api_client.v1.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2909,6 +2909,13 @@ datadog\_api\_client.v1.model.notebook\_status module
:members:
:show-inheritance:

datadog\_api\_client.v1.model.notebook\_template\_variable module
-----------------------------------------------------------------

.. automodule:: datadog_api_client.v1.model.notebook_template_variable
:members:
:show-inheritance:

datadog\_api\_client.v1.model.notebook\_timeseries\_cell\_attributes module
---------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from datadog_api_client.v1.model.notebook_cell_create_request import NotebookCellCreateRequest
from datadog_api_client.v1.model.notebook_metadata import NotebookMetadata
from datadog_api_client.v1.model.notebook_status import NotebookStatus
from datadog_api_client.v1.model.notebook_template_variable import NotebookTemplateVariable
from datadog_api_client.v1.model.notebook_global_time import NotebookGlobalTime
from datadog_api_client.v1.model.notebook_relative_time import NotebookRelativeTime
from datadog_api_client.v1.model.notebook_absolute_time import NotebookAbsoluteTime
Expand All @@ -35,13 +36,15 @@ def openapi_types(_):
from datadog_api_client.v1.model.notebook_cell_create_request import NotebookCellCreateRequest
from datadog_api_client.v1.model.notebook_metadata import NotebookMetadata
from datadog_api_client.v1.model.notebook_status import NotebookStatus
from datadog_api_client.v1.model.notebook_template_variable import NotebookTemplateVariable
from datadog_api_client.v1.model.notebook_global_time import NotebookGlobalTime

return {
"cells": ([NotebookCellCreateRequest],),
"metadata": (NotebookMetadata,),
"name": (str,),
"status": (NotebookStatus,),
"template_variables": ([NotebookTemplateVariable],),
"time": (NotebookGlobalTime,),
}

Expand All @@ -50,6 +53,7 @@ def openapi_types(_):
"metadata": "metadata",
"name": "name",
"status": "status",
"template_variables": "template_variables",
"time": "time",
}

Expand All @@ -60,6 +64,7 @@ def __init__(
time: Union[NotebookGlobalTime, NotebookRelativeTime, NotebookAbsoluteTime],
metadata: Union[NotebookMetadata, UnsetType] = unset,
status: Union[NotebookStatus, UnsetType] = unset,
template_variables: Union[List[NotebookTemplateVariable], UnsetType] = unset,
**kwargs,
):
"""
Expand All @@ -77,13 +82,18 @@ def __init__(
:param status: Publication status of the notebook. For now, always "published".
:type status: NotebookStatus, optional

:param template_variables: List of template variables for this notebook.
:type template_variables: [NotebookTemplateVariable], optional

:param time: Notebook global timeframe.
:type time: NotebookGlobalTime
"""
if metadata is not unset:
kwargs["metadata"] = metadata
if status is not unset:
kwargs["status"] = status
if template_variables is not unset:
kwargs["template_variables"] = template_variables
super().__init__(kwargs)

self_.cells = cells
Expand Down
65 changes: 65 additions & 0 deletions src/datadog_api_client/v1/model/notebook_template_variable.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import List, Union

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
none_type,
unset,
UnsetType,
)


class NotebookTemplateVariable(ModelNormal):
@cached_property
def openapi_types(_):
return {
"available_values": ([str], none_type),
"default": (str, none_type),
"name": (str,),
"prefix": (str, none_type),
}

attribute_map = {
"available_values": "available_values",
"default": "default",
"name": "name",
"prefix": "prefix",
}

def __init__(
self_,
name: str,
available_values: Union[List[str], none_type, UnsetType] = unset,
default: Union[str, none_type, UnsetType] = unset,
prefix: Union[str, none_type, UnsetType] = unset,
**kwargs,
):
"""
Template variable for a notebook.

:param available_values: The list of values that the template variable drop-down is limited to.
:type available_values: [str], none_type, optional

:param default: The default value for the template variable.
:type default: str, none_type, optional

:param name: The name of the variable.
:type name: str

:param prefix: The tag prefix associated with the variable. Only tags with this prefix appear in the variable drop-down.
:type prefix: str, none_type, optional
"""
if available_values is not unset:
kwargs["available_values"] = available_values
if default is not unset:
kwargs["default"] = default
if prefix is not unset:
kwargs["prefix"] = prefix
super().__init__(kwargs)

self_.name = name
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from datadog_api_client.v1.model.notebook_update_cell import NotebookUpdateCell
from datadog_api_client.v1.model.notebook_metadata import NotebookMetadata
from datadog_api_client.v1.model.notebook_status import NotebookStatus
from datadog_api_client.v1.model.notebook_template_variable import NotebookTemplateVariable
from datadog_api_client.v1.model.notebook_global_time import NotebookGlobalTime
from datadog_api_client.v1.model.notebook_cell_create_request import NotebookCellCreateRequest
from datadog_api_client.v1.model.notebook_cell_update_request import NotebookCellUpdateRequest
Expand All @@ -37,13 +38,15 @@ def openapi_types(_):
from datadog_api_client.v1.model.notebook_update_cell import NotebookUpdateCell
from datadog_api_client.v1.model.notebook_metadata import NotebookMetadata
from datadog_api_client.v1.model.notebook_status import NotebookStatus
from datadog_api_client.v1.model.notebook_template_variable import NotebookTemplateVariable
from datadog_api_client.v1.model.notebook_global_time import NotebookGlobalTime

return {
"cells": ([NotebookUpdateCell],),
"metadata": (NotebookMetadata,),
"name": (str,),
"status": (NotebookStatus,),
"template_variables": ([NotebookTemplateVariable],),
"time": (NotebookGlobalTime,),
}

Expand All @@ -52,6 +55,7 @@ def openapi_types(_):
"metadata": "metadata",
"name": "name",
"status": "status",
"template_variables": "template_variables",
"time": "time",
}

Expand All @@ -62,6 +66,7 @@ def __init__(
time: Union[NotebookGlobalTime, NotebookRelativeTime, NotebookAbsoluteTime],
metadata: Union[NotebookMetadata, UnsetType] = unset,
status: Union[NotebookStatus, UnsetType] = unset,
template_variables: Union[List[NotebookTemplateVariable], UnsetType] = unset,
**kwargs,
):
"""
Expand All @@ -79,13 +84,18 @@ def __init__(
:param status: Publication status of the notebook. For now, always "published".
:type status: NotebookStatus, optional

:param template_variables: List of template variables for this notebook.
:type template_variables: [NotebookTemplateVariable], optional

:param time: Notebook global timeframe.
:type time: NotebookGlobalTime
"""
if metadata is not unset:
kwargs["metadata"] = metadata
if status is not unset:
kwargs["status"] = status
if template_variables is not unset:
kwargs["template_variables"] = template_variables
super().__init__(kwargs)

self_.cells = cells
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from datadog_api_client.v1.model.notebook_cell_response import NotebookCellResponse
from datadog_api_client.v1.model.notebook_metadata import NotebookMetadata
from datadog_api_client.v1.model.notebook_status import NotebookStatus
from datadog_api_client.v1.model.notebook_template_variable import NotebookTemplateVariable
from datadog_api_client.v1.model.notebook_global_time import NotebookGlobalTime
from datadog_api_client.v1.model.notebook_relative_time import NotebookRelativeTime
from datadog_api_client.v1.model.notebook_absolute_time import NotebookAbsoluteTime
Expand All @@ -38,6 +39,7 @@ def openapi_types(_):
from datadog_api_client.v1.model.notebook_cell_response import NotebookCellResponse
from datadog_api_client.v1.model.notebook_metadata import NotebookMetadata
from datadog_api_client.v1.model.notebook_status import NotebookStatus
from datadog_api_client.v1.model.notebook_template_variable import NotebookTemplateVariable
from datadog_api_client.v1.model.notebook_global_time import NotebookGlobalTime

return {
Expand All @@ -48,6 +50,7 @@ def openapi_types(_):
"modified": (datetime,),
"name": (str,),
"status": (NotebookStatus,),
"template_variables": ([NotebookTemplateVariable],),
"time": (NotebookGlobalTime,),
}

Expand All @@ -59,6 +62,7 @@ def openapi_types(_):
"modified": "modified",
"name": "name",
"status": "status",
"template_variables": "template_variables",
"time": "time",
}
read_only_vars = {
Expand All @@ -75,6 +79,7 @@ def __init__(
metadata: Union[NotebookMetadata, UnsetType] = unset,
modified: Union[datetime, UnsetType] = unset,
status: Union[NotebookStatus, UnsetType] = unset,
template_variables: Union[List[NotebookTemplateVariable], UnsetType] = unset,
time: Union[NotebookGlobalTime, NotebookRelativeTime, NotebookAbsoluteTime, UnsetType] = unset,
**kwargs,
):
Expand Down Expand Up @@ -102,6 +107,9 @@ def __init__(
:param status: Publication status of the notebook. For now, always "published".
:type status: NotebookStatus, optional

:param template_variables: List of template variables for this notebook.
:type template_variables: [NotebookTemplateVariable], optional

:param time: Notebook global timeframe.
:type time: NotebookGlobalTime, optional
"""
Expand All @@ -117,6 +125,8 @@ def __init__(
kwargs["modified"] = modified
if status is not unset:
kwargs["status"] = status
if template_variables is not unset:
kwargs["template_variables"] = template_variables
if time is not unset:
kwargs["time"] = time
super().__init__(kwargs)
Expand Down
2 changes: 2 additions & 0 deletions src/datadog_api_client/v1/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@
from datadog_api_client.v1.model.notebook_response_data_attributes import NotebookResponseDataAttributes
from datadog_api_client.v1.model.notebook_split_by import NotebookSplitBy
from datadog_api_client.v1.model.notebook_status import NotebookStatus
from datadog_api_client.v1.model.notebook_template_variable import NotebookTemplateVariable
from datadog_api_client.v1.model.notebook_timeseries_cell_attributes import NotebookTimeseriesCellAttributes
from datadog_api_client.v1.model.notebook_toplist_cell_attributes import NotebookToplistCellAttributes
from datadog_api_client.v1.model.notebook_update_cell import NotebookUpdateCell
Expand Down Expand Up @@ -1566,6 +1567,7 @@
"NotebookResponseDataAttributes",
"NotebookSplitBy",
"NotebookStatus",
"NotebookTemplateVariable",
"NotebookTimeseriesCellAttributes",
"NotebookToplistCellAttributes",
"NotebookUpdateCell",
Expand Down
Loading
Loading