diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index c680cd9d1d..d5dff5c717 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -135317,6 +135317,10 @@ components: properties: attributes: $ref: "#/components/schemas/TimeseriesResponseAttributes" + id: + description: The identifier of the timeseries response resource. + example: "0" + type: string type: $ref: "#/components/schemas/TimeseriesFormulaResponseType" type: object @@ -136175,24 +136179,29 @@ components: properties: family: description: Unit family, allows for conversion between units of the same family, for scaling. - example: time + example: percentage type: string + id: + description: The identifier of the unit. + example: 17 + format: int64 + type: integer name: - description: Unit name - example: minute + description: Unit name. + example: percent type: string plural: description: Plural form of the unit name. - example: minutes + example: percent type: string scale_factor: description: Factor for scaling between units of the same family. - example: 60.0 + example: 1.0 format: double type: number short_name: description: Abbreviation of the unit. - example: min + example: "%" type: string type: object UnitCostCreateRequest: diff --git a/src/datadog_api_client/v2/model/timeseries_response.py b/src/datadog_api_client/v2/model/timeseries_response.py index 30e8afedb9..e1c754945a 100644 --- a/src/datadog_api_client/v2/model/timeseries_response.py +++ b/src/datadog_api_client/v2/model/timeseries_response.py @@ -26,17 +26,20 @@ def openapi_types(_): return { "attributes": (TimeseriesResponseAttributes,), + "id": (str,), "type": (TimeseriesFormulaResponseType,), } attribute_map = { "attributes": "attributes", + "id": "id", "type": "type", } def __init__( self_, attributes: Union[TimeseriesResponseAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, type: Union[TimeseriesFormulaResponseType, UnsetType] = unset, **kwargs, ): @@ -46,11 +49,16 @@ def __init__( :param attributes: The object describing a timeseries response. :type attributes: TimeseriesResponseAttributes, optional + :param id: The identifier of the timeseries response resource. + :type id: str, optional + :param type: The type of the resource. The value should always be timeseries_response. :type type: TimeseriesFormulaResponseType, optional """ if attributes is not unset: kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id if type is not unset: kwargs["type"] = type super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/unit.py b/src/datadog_api_client/v2/model/unit.py index 9fda132b61..f9e083301b 100644 --- a/src/datadog_api_client/v2/model/unit.py +++ b/src/datadog_api_client/v2/model/unit.py @@ -20,6 +20,7 @@ class Unit(ModelNormal): def openapi_types(_): return { "family": (str,), + "id": (int,), "name": (str,), "plural": (str,), "scale_factor": (float,), @@ -28,6 +29,7 @@ def openapi_types(_): attribute_map = { "family": "family", + "id": "id", "name": "name", "plural": "plural", "scale_factor": "scale_factor", @@ -37,6 +39,7 @@ def openapi_types(_): def __init__( self_, family: Union[str, UnsetType] = unset, + id: Union[int, UnsetType] = unset, name: Union[str, UnsetType] = unset, plural: Union[str, UnsetType] = unset, scale_factor: Union[float, UnsetType] = unset, @@ -49,7 +52,10 @@ def __init__( :param family: Unit family, allows for conversion between units of the same family, for scaling. :type family: str, optional - :param name: Unit name + :param id: The identifier of the unit. + :type id: int, optional + + :param name: Unit name. :type name: str, optional :param plural: Plural form of the unit name. @@ -63,6 +69,8 @@ def __init__( """ if family is not unset: kwargs["family"] = family + if id is not unset: + kwargs["id"] = id if name is not unset: kwargs["name"] = name if plural is not unset: diff --git a/tests/v2/features/metrics.feature b/tests/v2/features/metrics.feature index f4078974f8..59973467f4 100644 --- a/tests/v2/features/metrics.feature +++ b/tests/v2/features/metrics.feature @@ -980,6 +980,7 @@ Feature: Metrics And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "interval": 5000, "queries": [{"data_source": "metrics", "query": "avg:datadog.estimated_usage.metrics.custom{*}", "name": "a"}], "to": {{ timestamp('now') }}000}, "type": "timeseries_request"}} When the request is sent Then the response status is 200 OK + And the response "data.id" is equal to "0" And the response "data.type" is equal to "timeseries_response" @skip-validation @team:ddoghq/timeseries-query