From 4af3e2342cb0ed7a845e599d62b6378c64a7a892 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 20 Mar 2026 15:52:18 +0000 Subject: [PATCH] Regenerate client from commit c238686 of spec repo --- .generator/schemas/v1/openapi.yaml | 76 +++++++++++ docs/datadog_api_client.v1.model.rst | 35 +++++ src/datadog_api_client/v1/model/widget.py | 2 + .../v1/model/widget_definition.py | 5 + .../v1/model/wildcard_widget_definition.py | 125 ++++++++++++++++++ .../model/wildcard_widget_definition_type.py | 35 +++++ .../v1/model/wildcard_widget_request.py | 104 +++++++++++++++ .../v1/model/wildcard_widget_specification.py | 46 +++++++ .../wildcard_widget_specification_type.py | 38 ++++++ src/datadog_api_client/v1/models/__init__.py | 10 ++ 10 files changed, 476 insertions(+) create mode 100644 src/datadog_api_client/v1/model/wildcard_widget_definition.py create mode 100644 src/datadog_api_client/v1/model/wildcard_widget_definition_type.py create mode 100644 src/datadog_api_client/v1/model/wildcard_widget_request.py create mode 100644 src/datadog_api_client/v1/model/wildcard_widget_specification.py create mode 100644 src/datadog_api_client/v1/model/wildcard_widget_specification_type.py diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 6eb50c8c03..dbd72b80dd 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -23742,6 +23742,7 @@ components: - $ref: "#/components/schemas/ToplistWidgetDefinition" - $ref: "#/components/schemas/TopologyMapWidgetDefinition" - $ref: "#/components/schemas/TreeMapWidgetDefinition" + - $ref: "#/components/schemas/WildcardWidgetDefinition" WidgetDisplayType: description: Type of display to use for the request. enum: @@ -24513,6 +24514,81 @@ components: x-enum-varnames: - TIMESERIES - TOPLIST + WildcardWidgetDefinition: + description: >- + Custom visualization widget using Vega or Vega-Lite specifications. Combines standard Datadog data requests with a Vega or Vega-Lite JSON specification for flexible, custom visualizations. + properties: + custom_links: + description: List of custom links. + items: + $ref: "#/components/schemas/WidgetCustomLink" + type: array + requests: + description: List of data requests for the wildcard widget. + example: [{"formulas": ["formula": "query1"], "queries": [{"aggregator": "avg", "data_source": "metrics", "name": "query1", "query": "avg:system.cpu.user{*} by {env}"}], "response_format": "scalar"}] + items: + $ref: "#/components/schemas/WildcardWidgetRequest" + type: array + specification: + $ref: "#/components/schemas/WildcardWidgetSpecification" + time: + $ref: "#/components/schemas/WidgetTime" + title: + description: Title of the widget. + type: string + title_align: + $ref: "#/components/schemas/WidgetTextAlign" + title_size: + description: Size of the title. + type: string + type: + $ref: "#/components/schemas/WildcardWidgetDefinitionType" + required: + - type + - requests + - specification + type: object + WildcardWidgetDefinitionType: + default: wildcard + description: Type of the wildcard widget. + enum: + - wildcard + example: wildcard + type: string + x-enum-varnames: + - WILDCARD + WildcardWidgetRequest: + description: >- + Request object for the wildcard widget. Each variant represents a distinct data-fetching pattern: scalar formulas, timeseries formulas, list streams, and histograms. + oneOf: + - $ref: "#/components/schemas/TreeMapWidgetRequest" + - $ref: "#/components/schemas/TimeseriesWidgetRequest" + - $ref: "#/components/schemas/ListStreamWidgetRequest" + - $ref: "#/components/schemas/DistributionWidgetRequest" + WildcardWidgetSpecification: + description: >- + Vega or Vega-Lite specification for custom visualization rendering. See https://vega.github.io/vega-lite/ for the full grammar reference. + properties: + contents: + description: The Vega or Vega-Lite JSON specification object. + example: {"$schema": "https://vega.github.io/schema/vega-lite/v5.json", "data": {"name": "table1"}, "description": "A simple bar chart", "encoding": {"x": {"field": "env", "sort": "-y", "type": "nominal"}, "y": {"field": "query1", "type": "quantitative"}}, "mark": "bar"} + type: object + type: + $ref: "#/components/schemas/WildcardWidgetSpecificationType" + required: + - type + - contents + type: object + WildcardWidgetSpecificationType: + description: Type of specification used by the wildcard widget. + enum: + - vega + - vega-lite + example: vega-lite + type: string + x-enum-varnames: + - VEGA + - VEGA_LITE securitySchemes: AuthZ: description: This API uses OAuth 2 with the implicit grant flow. diff --git a/docs/datadog_api_client.v1.model.rst b/docs/datadog_api_client.v1.model.rst index 5370f824d8..2a6079eee2 100644 --- a/docs/datadog_api_client.v1.model.rst +++ b/docs/datadog_api_client.v1.model.rst @@ -7088,6 +7088,41 @@ datadog\_api\_client.v1.model.widget\_viz\_type module :members: :show-inheritance: +datadog\_api\_client.v1.model.wildcard\_widget\_definition module +----------------------------------------------------------------- + +.. automodule:: datadog_api_client.v1.model.wildcard_widget_definition + :members: + :show-inheritance: + +datadog\_api\_client.v1.model.wildcard\_widget\_definition\_type module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v1.model.wildcard_widget_definition_type + :members: + :show-inheritance: + +datadog\_api\_client.v1.model.wildcard\_widget\_request module +-------------------------------------------------------------- + +.. automodule:: datadog_api_client.v1.model.wildcard_widget_request + :members: + :show-inheritance: + +datadog\_api\_client.v1.model.wildcard\_widget\_specification module +-------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v1.model.wildcard_widget_specification + :members: + :show-inheritance: + +datadog\_api\_client.v1.model.wildcard\_widget\_specification\_type module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v1.model.wildcard_widget_specification_type + :members: + :show-inheritance: + Module contents --------------- diff --git a/src/datadog_api_client/v1/model/widget.py b/src/datadog_api_client/v1/model/widget.py index 40f07d7985..80b4f9e6f9 100644 --- a/src/datadog_api_client/v1/model/widget.py +++ b/src/datadog_api_client/v1/model/widget.py @@ -51,6 +51,7 @@ from datadog_api_client.v1.model.toplist_widget_definition import ToplistWidgetDefinition from datadog_api_client.v1.model.topology_map_widget_definition import TopologyMapWidgetDefinition from datadog_api_client.v1.model.tree_map_widget_definition import TreeMapWidgetDefinition + from datadog_api_client.v1.model.wildcard_widget_definition import WildcardWidgetDefinition class Widget(ModelNormal): @@ -110,6 +111,7 @@ def __init__( ToplistWidgetDefinition, TopologyMapWidgetDefinition, TreeMapWidgetDefinition, + WildcardWidgetDefinition, ], id: Union[int, UnsetType] = unset, layout: Union[WidgetLayout, UnsetType] = unset, diff --git a/src/datadog_api_client/v1/model/widget_definition.py b/src/datadog_api_client/v1/model/widget_definition.py index 847f5c715e..892e482658 100644 --- a/src/datadog_api_client/v1/model/widget_definition.py +++ b/src/datadog_api_client/v1/model/widget_definition.py @@ -337,6 +337,9 @@ def __init__(self, **kwargs): :param size_by: (deprecated) The attribute formerly used to determine size in the widget. :type size_by: TreeMapSizeBy, optional + + :param specification: Vega or Vega-Lite specification for custom visualization rendering. See https://vega.github.io/vega-lite/ for the full grammar reference. + :type specification: WildcardWidgetSpecification """ super().__init__(kwargs) @@ -384,6 +387,7 @@ def _composed_schemas(_): from datadog_api_client.v1.model.toplist_widget_definition import ToplistWidgetDefinition from datadog_api_client.v1.model.topology_map_widget_definition import TopologyMapWidgetDefinition from datadog_api_client.v1.model.tree_map_widget_definition import TreeMapWidgetDefinition + from datadog_api_client.v1.model.wildcard_widget_definition import WildcardWidgetDefinition return { "oneOf": [ @@ -422,5 +426,6 @@ def _composed_schemas(_): ToplistWidgetDefinition, TopologyMapWidgetDefinition, TreeMapWidgetDefinition, + WildcardWidgetDefinition, ], } diff --git a/src/datadog_api_client/v1/model/wildcard_widget_definition.py b/src/datadog_api_client/v1/model/wildcard_widget_definition.py new file mode 100644 index 0000000000..d88b360e35 --- /dev/null +++ b/src/datadog_api_client/v1/model/wildcard_widget_definition.py @@ -0,0 +1,125 @@ +# 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, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v1.model.widget_custom_link import WidgetCustomLink + from datadog_api_client.v1.model.wildcard_widget_request import WildcardWidgetRequest + from datadog_api_client.v1.model.wildcard_widget_specification import WildcardWidgetSpecification + from datadog_api_client.v1.model.widget_time import WidgetTime + from datadog_api_client.v1.model.widget_text_align import WidgetTextAlign + from datadog_api_client.v1.model.wildcard_widget_definition_type import WildcardWidgetDefinitionType + from datadog_api_client.v1.model.tree_map_widget_request import TreeMapWidgetRequest + from datadog_api_client.v1.model.timeseries_widget_request import TimeseriesWidgetRequest + from datadog_api_client.v1.model.list_stream_widget_request import ListStreamWidgetRequest + from datadog_api_client.v1.model.distribution_widget_request import DistributionWidgetRequest + from datadog_api_client.v1.model.widget_legacy_live_span import WidgetLegacyLiveSpan + from datadog_api_client.v1.model.widget_new_live_span import WidgetNewLiveSpan + from datadog_api_client.v1.model.widget_new_fixed_span import WidgetNewFixedSpan + + +class WildcardWidgetDefinition(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v1.model.widget_custom_link import WidgetCustomLink + from datadog_api_client.v1.model.wildcard_widget_request import WildcardWidgetRequest + from datadog_api_client.v1.model.wildcard_widget_specification import WildcardWidgetSpecification + from datadog_api_client.v1.model.widget_time import WidgetTime + from datadog_api_client.v1.model.widget_text_align import WidgetTextAlign + from datadog_api_client.v1.model.wildcard_widget_definition_type import WildcardWidgetDefinitionType + + return { + "custom_links": ([WidgetCustomLink],), + "requests": ([WildcardWidgetRequest],), + "specification": (WildcardWidgetSpecification,), + "time": (WidgetTime,), + "title": (str,), + "title_align": (WidgetTextAlign,), + "title_size": (str,), + "type": (WildcardWidgetDefinitionType,), + } + + attribute_map = { + "custom_links": "custom_links", + "requests": "requests", + "specification": "specification", + "time": "time", + "title": "title", + "title_align": "title_align", + "title_size": "title_size", + "type": "type", + } + + def __init__( + self_, + requests: List[ + Union[ + WildcardWidgetRequest, + TreeMapWidgetRequest, + TimeseriesWidgetRequest, + ListStreamWidgetRequest, + DistributionWidgetRequest, + ] + ], + specification: WildcardWidgetSpecification, + type: WildcardWidgetDefinitionType, + custom_links: Union[List[WidgetCustomLink], UnsetType] = unset, + time: Union[WidgetTime, WidgetLegacyLiveSpan, WidgetNewLiveSpan, WidgetNewFixedSpan, UnsetType] = unset, + title: Union[str, UnsetType] = unset, + title_align: Union[WidgetTextAlign, UnsetType] = unset, + title_size: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Custom visualization widget using Vega or Vega-Lite specifications. Combines standard Datadog data requests with a Vega or Vega-Lite JSON specification for flexible, custom visualizations. + + :param custom_links: List of custom links. + :type custom_links: [WidgetCustomLink], optional + + :param requests: List of data requests for the wildcard widget. + :type requests: [WildcardWidgetRequest] + + :param specification: Vega or Vega-Lite specification for custom visualization rendering. See https://vega.github.io/vega-lite/ for the full grammar reference. + :type specification: WildcardWidgetSpecification + + :param time: Time setting for the widget. + :type time: WidgetTime, optional + + :param title: Title of the widget. + :type title: str, optional + + :param title_align: How to align the text on the widget. + :type title_align: WidgetTextAlign, optional + + :param title_size: Size of the title. + :type title_size: str, optional + + :param type: Type of the wildcard widget. + :type type: WildcardWidgetDefinitionType + """ + if custom_links is not unset: + kwargs["custom_links"] = custom_links + if time is not unset: + kwargs["time"] = time + if title is not unset: + kwargs["title"] = title + if title_align is not unset: + kwargs["title_align"] = title_align + if title_size is not unset: + kwargs["title_size"] = title_size + super().__init__(kwargs) + + self_.requests = requests + self_.specification = specification + self_.type = type diff --git a/src/datadog_api_client/v1/model/wildcard_widget_definition_type.py b/src/datadog_api_client/v1/model/wildcard_widget_definition_type.py new file mode 100644 index 0000000000..e3de18fb8f --- /dev/null +++ b/src/datadog_api_client/v1/model/wildcard_widget_definition_type.py @@ -0,0 +1,35 @@ +# 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 datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class WildcardWidgetDefinitionType(ModelSimple): + """ + Type of the wildcard widget. + + :param value: If omitted defaults to "wildcard". Must be one of ["wildcard"]. + :type value: str + """ + + allowed_values = { + "wildcard", + } + WILDCARD: ClassVar["WildcardWidgetDefinitionType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +WildcardWidgetDefinitionType.WILDCARD = WildcardWidgetDefinitionType("wildcard") diff --git a/src/datadog_api_client/v1/model/wildcard_widget_request.py b/src/datadog_api_client/v1/model/wildcard_widget_request.py new file mode 100644 index 0000000000..04f6892346 --- /dev/null +++ b/src/datadog_api_client/v1/model/wildcard_widget_request.py @@ -0,0 +1,104 @@ +# 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 datadog_api_client.model_utils import ( + ModelComposed, + cached_property, +) + + +class WildcardWidgetRequest(ModelComposed): + def __init__(self, **kwargs): + """ + Request object for the wildcard widget. Each variant represents a distinct data-fetching pattern: scalar formulas, timeseries formulas, list streams, and histograms. + + :param formulas: List of formulas that operate on queries. + :type formulas: [WidgetFormula], optional + + :param q: The widget metrics query. Deprecated - Use `queries` and `formulas` instead. + :type q: str, optional + + :param queries: List of queries that can be returned directly or used in formulas. + :type queries: [FormulaAndFunctionQueryDefinition], optional + + :param response_format: Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets. + :type response_format: FormulaAndFunctionResponseFormat, optional + + :param apm_query: The log query. + :type apm_query: LogQueryDefinition, optional + + :param audit_query: The log query. + :type audit_query: LogQueryDefinition, optional + + :param display_type: Type of display to use for the request. + :type display_type: WidgetDisplayType, optional + + :param event_query: The log query. + :type event_query: LogQueryDefinition, optional + + :param log_query: The log query. + :type log_query: LogQueryDefinition, optional + + :param metadata: Used to define expression aliases. + :type metadata: [TimeseriesWidgetExpressionAlias], optional + + :param network_query: The log query. + :type network_query: LogQueryDefinition, optional + + :param on_right_yaxis: Whether or not to display a second y-axis on the right. + :type on_right_yaxis: bool, optional + + :param process_query: The process query to use in the widget. + :type process_query: ProcessQueryDefinition, optional + + :param profile_metrics_query: The log query. + :type profile_metrics_query: LogQueryDefinition, optional + + :param rum_query: The log query. + :type rum_query: LogQueryDefinition, optional + + :param security_query: The log query. + :type security_query: LogQueryDefinition, optional + + :param style: Define request widget style for timeseries widgets. + :type style: TimeseriesRequestStyle, optional + + :param columns: Widget columns. + :type columns: [ListStreamColumn] + + :param query: Updated list stream widget. + :type query: ListStreamQuery + + :param apm_stats_query: The APM stats query for table and distributions widgets. + :type apm_stats_query: ApmStatsQueryDefinition, optional + + :param request_type: Request type for distribution of point values for distribution metrics. Query space aggregator must be `histogram:` for points distributions. + :type request_type: WidgetHistogramRequestType, optional + """ + super().__init__(kwargs) + + @cached_property + def _composed_schemas(_): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + from datadog_api_client.v1.model.tree_map_widget_request import TreeMapWidgetRequest + from datadog_api_client.v1.model.timeseries_widget_request import TimeseriesWidgetRequest + from datadog_api_client.v1.model.list_stream_widget_request import ListStreamWidgetRequest + from datadog_api_client.v1.model.distribution_widget_request import DistributionWidgetRequest + + return { + "oneOf": [ + TreeMapWidgetRequest, + TimeseriesWidgetRequest, + ListStreamWidgetRequest, + DistributionWidgetRequest, + ], + } diff --git a/src/datadog_api_client/v1/model/wildcard_widget_specification.py b/src/datadog_api_client/v1/model/wildcard_widget_specification.py new file mode 100644 index 0000000000..17f163f5f0 --- /dev/null +++ b/src/datadog_api_client/v1/model/wildcard_widget_specification.py @@ -0,0 +1,46 @@ +# 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 TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v1.model.wildcard_widget_specification_type import WildcardWidgetSpecificationType + + +class WildcardWidgetSpecification(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v1.model.wildcard_widget_specification_type import WildcardWidgetSpecificationType + + return { + "contents": (dict,), + "type": (WildcardWidgetSpecificationType,), + } + + attribute_map = { + "contents": "contents", + "type": "type", + } + + def __init__(self_, contents: dict, type: WildcardWidgetSpecificationType, **kwargs): + """ + Vega or Vega-Lite specification for custom visualization rendering. See https://vega.github.io/vega-lite/ for the full grammar reference. + + :param contents: The Vega or Vega-Lite JSON specification object. + :type contents: dict + + :param type: Type of specification used by the wildcard widget. + :type type: WildcardWidgetSpecificationType + """ + super().__init__(kwargs) + + self_.contents = contents + self_.type = type diff --git a/src/datadog_api_client/v1/model/wildcard_widget_specification_type.py b/src/datadog_api_client/v1/model/wildcard_widget_specification_type.py new file mode 100644 index 0000000000..23f2091d83 --- /dev/null +++ b/src/datadog_api_client/v1/model/wildcard_widget_specification_type.py @@ -0,0 +1,38 @@ +# 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 datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class WildcardWidgetSpecificationType(ModelSimple): + """ + Type of specification used by the wildcard widget. + + :param value: Must be one of ["vega", "vega-lite"]. + :type value: str + """ + + allowed_values = { + "vega", + "vega-lite", + } + VEGA: ClassVar["WildcardWidgetSpecificationType"] + VEGA_LITE: ClassVar["WildcardWidgetSpecificationType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +WildcardWidgetSpecificationType.VEGA = WildcardWidgetSpecificationType("vega") +WildcardWidgetSpecificationType.VEGA_LITE = WildcardWidgetSpecificationType("vega-lite") diff --git a/src/datadog_api_client/v1/models/__init__.py b/src/datadog_api_client/v1/models/__init__.py index 9cc8c680a3..ec6d5ae3ee 100644 --- a/src/datadog_api_client/v1/models/__init__.py +++ b/src/datadog_api_client/v1/models/__init__.py @@ -1211,6 +1211,11 @@ from datadog_api_client.v1.model.widget_vertical_align import WidgetVerticalAlign from datadog_api_client.v1.model.widget_view_mode import WidgetViewMode from datadog_api_client.v1.model.widget_viz_type import WidgetVizType +from datadog_api_client.v1.model.wildcard_widget_definition import WildcardWidgetDefinition +from datadog_api_client.v1.model.wildcard_widget_definition_type import WildcardWidgetDefinitionType +from datadog_api_client.v1.model.wildcard_widget_request import WildcardWidgetRequest +from datadog_api_client.v1.model.wildcard_widget_specification import WildcardWidgetSpecification +from datadog_api_client.v1.model.wildcard_widget_specification_type import WildcardWidgetSpecificationType __all__ = [ "APIErrorResponse", @@ -2226,4 +2231,9 @@ "WidgetVerticalAlign", "WidgetViewMode", "WidgetVizType", + "WildcardWidgetDefinition", + "WildcardWidgetDefinitionType", + "WildcardWidgetRequest", + "WildcardWidgetSpecification", + "WildcardWidgetSpecificationType", ]