From 7fe5353cbed1a44361d2f72b69a84da642982098 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 28 Jul 2023 14:19:54 +0000 Subject: [PATCH] Regenerate client from commit 6f54a513 of spec repo --- .apigentools-info | 8 +- .generator/schemas/v2/openapi.yaml | 71 +++++++++++----- docs/datadog_api_client.v2.model.rst | 21 +++++ .../v2/model/ci_app_event_attributes.py | 28 +++---- .../v2/model/ci_app_pipeline_event.py | 10 +-- .../model/ci_app_pipeline_event_attributes.py | 81 +++++++++++++++++++ .../v2/model/ci_app_pipeline_level.py | 47 +++++++++++ .../v2/model/ci_app_test_level.py | 44 ++++++++++ ..._app_tests_analytics_aggregate_response.py | 12 +-- src/datadog_api_client/v2/models/__init__.py | 6 ++ 10 files changed, 276 insertions(+), 52 deletions(-) create mode 100644 src/datadog_api_client/v2/model/ci_app_pipeline_event_attributes.py create mode 100644 src/datadog_api_client/v2/model/ci_app_pipeline_level.py create mode 100644 src/datadog_api_client/v2/model/ci_app_test_level.py diff --git a/.apigentools-info b/.apigentools-info index 93c239e131..2b1b92badb 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.5", - "regenerated": "2023-07-26 17:14:49.920957", - "spec_repo_commit": "69e8c6e4" + "regenerated": "2023-07-28 14:18:00.632507", + "spec_repo_commit": "6f54a513" }, "v2": { "apigentools_version": "1.6.5", - "regenerated": "2023-07-26 17:14:49.933340", - "spec_repo_commit": "69e8c6e4" + "regenerated": "2023-07-28 14:18:00.680431", + "spec_repo_commit": "6f54a513" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index fb616754ce..e85a4805d0 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1481,25 +1481,15 @@ components: properties: attributes: additionalProperties: {} - description: JSON object of attributes from CI Visibility events. + description: JSON object of attributes from CI Visibility test events. example: customAttribute: 123 duration: 2345 type: object - service: - description: 'The name of the application or service generating CI Visibility - events. - - It is used to switch from CI Visibility to APM, so make sure you define - the same - - value when you use both products.' - example: web-ui-tests - type: string tags: $ref: '#/components/schemas/TagsEventAttribute' - timestamp: - $ref: '#/components/schemas/TimestampEventAttribute' + test_level: + $ref: '#/components/schemas/CIAppTestLevel' type: object CIAppGitInfo: description: 'If pipelines are triggered due to actions to a Git repository, @@ -1661,7 +1651,7 @@ components: stored by Datadog. properties: attributes: - $ref: '#/components/schemas/CIAppEventAttributes' + $ref: '#/components/schemas/CIAppPipelineEventAttributes' id: description: Unique ID of the event. example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA @@ -1669,6 +1659,22 @@ components: type: $ref: '#/components/schemas/CIAppPipelineEventTypeName' type: object + CIAppPipelineEventAttributes: + description: JSON object containing all event attributes and their associated + values. + properties: + attributes: + additionalProperties: {} + description: JSON object of attributes from CI Visibility pipeline events. + example: + customAttribute: 123 + duration: 2345 + type: object + ci_level: + $ref: '#/components/schemas/CIAppPipelineLevel' + tags: + $ref: '#/components/schemas/TagsEventAttribute' + type: object CIAppPipelineEventJob: description: Details of a CI job. properties: @@ -2190,6 +2196,22 @@ components: meta: $ref: '#/components/schemas/CIAppResponseMetadataWithPagination' type: object + CIAppPipelineLevel: + description: Pipeline execution level. + enum: + - pipeline + - stage + - job + - step + - custom + example: pipeline + type: string + x-enum-varnames: + - PIPELINE + - STAGE + - JOB + - STEP + - CUSTOM CIAppPipelinesAggregateRequest: description: The object sent with the request to retrieve aggregation buckets of pipeline events from your organization. @@ -2463,6 +2485,20 @@ components: meta: $ref: '#/components/schemas/CIAppResponseMetadataWithPagination' type: object + CIAppTestLevel: + description: Test run level. + enum: + - session + - module + - suite + - test + example: test + type: string + x-enum-varnames: + - SESSION + - MODULE + - SUITE + - TEST CIAppTestsAggregateRequest: description: The object sent with the request to retrieve aggregation buckets of test events from your organization. @@ -2500,7 +2536,7 @@ components: links: $ref: '#/components/schemas/CIAppResponseLinks' meta: - $ref: '#/components/schemas/CIAppResponseMetadata' + $ref: '#/components/schemas/CIAppResponseMetadataWithPagination' type: object CIAppTestsBucketResponse: description: Bucket values. @@ -16579,11 +16615,6 @@ components: items: $ref: '#/components/schemas/TimeseriesResponseValues' type: array - TimestampEventAttribute: - description: Timestamp of your event. - example: '2019-01-02T09:42:36.320Z' - format: date-time - type: string Unit: description: Object containing the metric unit family, scale factor, name, and short name. diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index fab022f075..ec64c34852 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -547,6 +547,13 @@ ci\_app\_pipeline\_event :members: :show-inheritance: +ci\_app\_pipeline\_event\_attributes +------------------------------------ + +.. automodule:: datadog_api_client.v2.model.ci_app_pipeline_event_attributes + :members: + :show-inheritance: + ci\_app\_pipeline\_event\_job ----------------------------- @@ -673,6 +680,13 @@ ci\_app\_pipeline\_events\_response :members: :show-inheritance: +ci\_app\_pipeline\_level +------------------------ + +.. automodule:: datadog_api_client.v2.model.ci_app_pipeline_level + :members: + :show-inheritance: + ci\_app\_pipelines\_aggregate\_request -------------------------------------- @@ -806,6 +820,13 @@ ci\_app\_test\_events\_response :members: :show-inheritance: +ci\_app\_test\_level +-------------------- + +.. automodule:: datadog_api_client.v2.model.ci_app_test_level + :members: + :show-inheritance: + ci\_app\_tests\_aggregate\_request ---------------------------------- diff --git a/src/datadog_api_client/v2/model/ci_app_event_attributes.py b/src/datadog_api_client/v2/model/ci_app_event_attributes.py index d78010b9be..e5302265c1 100644 --- a/src/datadog_api_client/v2/model/ci_app_event_attributes.py +++ b/src/datadog_api_client/v2/model/ci_app_event_attributes.py @@ -18,12 +18,14 @@ if TYPE_CHECKING: from datadog_api_client.v2.model.tags_event_attribute import TagsEventAttribute + from datadog_api_client.v2.model.ci_app_test_level import CIAppTestLevel class CIAppEventAttributes(ModelNormal): @cached_property def openapi_types(_): from datadog_api_client.v2.model.tags_event_attribute import TagsEventAttribute + from datadog_api_client.v2.model.ci_app_test_level import CIAppTestLevel return { "attributes": ( @@ -41,49 +43,39 @@ def openapi_types(_): ) }, ), - "service": (str,), "tags": (TagsEventAttribute,), - "timestamp": (datetime,), + "test_level": (CIAppTestLevel,), } attribute_map = { "attributes": "attributes", - "service": "service", "tags": "tags", - "timestamp": "timestamp", + "test_level": "test_level", } def __init__( self_, attributes: Union[Dict[str, Any], UnsetType] = unset, - service: Union[str, UnsetType] = unset, tags: Union[TagsEventAttribute, UnsetType] = unset, - timestamp: Union[datetime, UnsetType] = unset, + test_level: Union[CIAppTestLevel, UnsetType] = unset, **kwargs, ): """ JSON object containing all event attributes and their associated values. - :param attributes: JSON object of attributes from CI Visibility events. + :param attributes: JSON object of attributes from CI Visibility test events. :type attributes: {str: (bool, date, datetime, dict, float, int, list, str, none_type,)}, optional - :param service: The name of the application or service generating CI Visibility events. - It is used to switch from CI Visibility to APM, so make sure you define the same - value when you use both products. - :type service: str, optional - :param tags: Array of tags associated with your event. :type tags: TagsEventAttribute, optional - :param timestamp: Timestamp of your event. - :type timestamp: datetime, optional + :param test_level: Test run level. + :type test_level: CIAppTestLevel, optional """ if attributes is not unset: kwargs["attributes"] = attributes - if service is not unset: - kwargs["service"] = service if tags is not unset: kwargs["tags"] = tags - if timestamp is not unset: - kwargs["timestamp"] = timestamp + if test_level is not unset: + kwargs["test_level"] = test_level super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/ci_app_pipeline_event.py b/src/datadog_api_client/v2/model/ci_app_pipeline_event.py index ed2e648f85..f004b1dceb 100644 --- a/src/datadog_api_client/v2/model/ci_app_pipeline_event.py +++ b/src/datadog_api_client/v2/model/ci_app_pipeline_event.py @@ -14,18 +14,18 @@ if TYPE_CHECKING: - from datadog_api_client.v2.model.ci_app_event_attributes import CIAppEventAttributes + from datadog_api_client.v2.model.ci_app_pipeline_event_attributes import CIAppPipelineEventAttributes from datadog_api_client.v2.model.ci_app_pipeline_event_type_name import CIAppPipelineEventTypeName class CIAppPipelineEvent(ModelNormal): @cached_property def openapi_types(_): - from datadog_api_client.v2.model.ci_app_event_attributes import CIAppEventAttributes + from datadog_api_client.v2.model.ci_app_pipeline_event_attributes import CIAppPipelineEventAttributes from datadog_api_client.v2.model.ci_app_pipeline_event_type_name import CIAppPipelineEventTypeName return { - "attributes": (CIAppEventAttributes,), + "attributes": (CIAppPipelineEventAttributes,), "id": (str,), "type": (CIAppPipelineEventTypeName,), } @@ -38,7 +38,7 @@ def openapi_types(_): def __init__( self_, - attributes: Union[CIAppEventAttributes, UnsetType] = unset, + attributes: Union[CIAppPipelineEventAttributes, UnsetType] = unset, id: Union[str, UnsetType] = unset, type: Union[CIAppPipelineEventTypeName, UnsetType] = unset, **kwargs, @@ -47,7 +47,7 @@ def __init__( Object description of a pipeline event after being processed and stored by Datadog. :param attributes: JSON object containing all event attributes and their associated values. - :type attributes: CIAppEventAttributes, optional + :type attributes: CIAppPipelineEventAttributes, optional :param id: Unique ID of the event. :type id: str, optional diff --git a/src/datadog_api_client/v2/model/ci_app_pipeline_event_attributes.py b/src/datadog_api_client/v2/model/ci_app_pipeline_event_attributes.py new file mode 100644 index 0000000000..593a039c16 --- /dev/null +++ b/src/datadog_api_client/v2/model/ci_app_pipeline_event_attributes.py @@ -0,0 +1,81 @@ +# 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 Any, Dict, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + date, + datetime, + none_type, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.ci_app_pipeline_level import CIAppPipelineLevel + from datadog_api_client.v2.model.tags_event_attribute import TagsEventAttribute + + +class CIAppPipelineEventAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.ci_app_pipeline_level import CIAppPipelineLevel + from datadog_api_client.v2.model.tags_event_attribute import TagsEventAttribute + + return { + "attributes": ( + { + str: ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) + }, + ), + "ci_level": (CIAppPipelineLevel,), + "tags": (TagsEventAttribute,), + } + + attribute_map = { + "attributes": "attributes", + "ci_level": "ci_level", + "tags": "tags", + } + + def __init__( + self_, + attributes: Union[Dict[str, Any], UnsetType] = unset, + ci_level: Union[CIAppPipelineLevel, UnsetType] = unset, + tags: Union[TagsEventAttribute, UnsetType] = unset, + **kwargs, + ): + """ + JSON object containing all event attributes and their associated values. + + :param attributes: JSON object of attributes from CI Visibility pipeline events. + :type attributes: {str: (bool, date, datetime, dict, float, int, list, str, none_type,)}, optional + + :param ci_level: Pipeline execution level. + :type ci_level: CIAppPipelineLevel, optional + + :param tags: Array of tags associated with your event. + :type tags: TagsEventAttribute, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if ci_level is not unset: + kwargs["ci_level"] = ci_level + if tags is not unset: + kwargs["tags"] = tags + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/ci_app_pipeline_level.py b/src/datadog_api_client/v2/model/ci_app_pipeline_level.py new file mode 100644 index 0000000000..913f2ca7f5 --- /dev/null +++ b/src/datadog_api_client/v2/model/ci_app_pipeline_level.py @@ -0,0 +1,47 @@ +# 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 CIAppPipelineLevel(ModelSimple): + """ + Pipeline execution level. + + :param value: Must be one of ["pipeline", "stage", "job", "step", "custom"]. + :type value: str + """ + + allowed_values = { + "pipeline", + "stage", + "job", + "step", + "custom", + } + PIPELINE: ClassVar["CIAppPipelineLevel"] + STAGE: ClassVar["CIAppPipelineLevel"] + JOB: ClassVar["CIAppPipelineLevel"] + STEP: ClassVar["CIAppPipelineLevel"] + CUSTOM: ClassVar["CIAppPipelineLevel"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CIAppPipelineLevel.PIPELINE = CIAppPipelineLevel("pipeline") +CIAppPipelineLevel.STAGE = CIAppPipelineLevel("stage") +CIAppPipelineLevel.JOB = CIAppPipelineLevel("job") +CIAppPipelineLevel.STEP = CIAppPipelineLevel("step") +CIAppPipelineLevel.CUSTOM = CIAppPipelineLevel("custom") diff --git a/src/datadog_api_client/v2/model/ci_app_test_level.py b/src/datadog_api_client/v2/model/ci_app_test_level.py new file mode 100644 index 0000000000..3eb8319410 --- /dev/null +++ b/src/datadog_api_client/v2/model/ci_app_test_level.py @@ -0,0 +1,44 @@ +# 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 CIAppTestLevel(ModelSimple): + """ + Test run level. + + :param value: Must be one of ["session", "module", "suite", "test"]. + :type value: str + """ + + allowed_values = { + "session", + "module", + "suite", + "test", + } + SESSION: ClassVar["CIAppTestLevel"] + MODULE: ClassVar["CIAppTestLevel"] + SUITE: ClassVar["CIAppTestLevel"] + TEST: ClassVar["CIAppTestLevel"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +CIAppTestLevel.SESSION = CIAppTestLevel("session") +CIAppTestLevel.MODULE = CIAppTestLevel("module") +CIAppTestLevel.SUITE = CIAppTestLevel("suite") +CIAppTestLevel.TEST = CIAppTestLevel("test") diff --git a/src/datadog_api_client/v2/model/ci_app_tests_analytics_aggregate_response.py b/src/datadog_api_client/v2/model/ci_app_tests_analytics_aggregate_response.py index c0134e37e2..48a8150f32 100644 --- a/src/datadog_api_client/v2/model/ci_app_tests_analytics_aggregate_response.py +++ b/src/datadog_api_client/v2/model/ci_app_tests_analytics_aggregate_response.py @@ -18,7 +18,7 @@ CIAppTestsAggregationBucketsResponse, ) from datadog_api_client.v2.model.ci_app_response_links import CIAppResponseLinks - from datadog_api_client.v2.model.ci_app_response_metadata import CIAppResponseMetadata + from datadog_api_client.v2.model.ci_app_response_metadata_with_pagination import CIAppResponseMetadataWithPagination class CIAppTestsAnalyticsAggregateResponse(ModelNormal): @@ -28,12 +28,14 @@ def openapi_types(_): CIAppTestsAggregationBucketsResponse, ) from datadog_api_client.v2.model.ci_app_response_links import CIAppResponseLinks - from datadog_api_client.v2.model.ci_app_response_metadata import CIAppResponseMetadata + from datadog_api_client.v2.model.ci_app_response_metadata_with_pagination import ( + CIAppResponseMetadataWithPagination, + ) return { "data": (CIAppTestsAggregationBucketsResponse,), "links": (CIAppResponseLinks,), - "meta": (CIAppResponseMetadata,), + "meta": (CIAppResponseMetadataWithPagination,), } attribute_map = { @@ -46,7 +48,7 @@ def __init__( self_, data: Union[CIAppTestsAggregationBucketsResponse, UnsetType] = unset, links: Union[CIAppResponseLinks, UnsetType] = unset, - meta: Union[CIAppResponseMetadata, UnsetType] = unset, + meta: Union[CIAppResponseMetadataWithPagination, UnsetType] = unset, **kwargs, ): """ @@ -59,7 +61,7 @@ def __init__( :type links: CIAppResponseLinks, optional :param meta: The metadata associated with a request. - :type meta: CIAppResponseMetadata, optional + :type meta: CIAppResponseMetadataWithPagination, optional """ if data is not unset: kwargs["data"] = data diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 3ae84f3aed..708aa54284 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -83,6 +83,7 @@ from datadog_api_client.v2.model.ci_app_group_by_total import CIAppGroupByTotal from datadog_api_client.v2.model.ci_app_host_info import CIAppHostInfo from datadog_api_client.v2.model.ci_app_pipeline_event import CIAppPipelineEvent +from datadog_api_client.v2.model.ci_app_pipeline_event_attributes import CIAppPipelineEventAttributes from datadog_api_client.v2.model.ci_app_pipeline_event_job import CIAppPipelineEventJob from datadog_api_client.v2.model.ci_app_pipeline_event_job_level import CIAppPipelineEventJobLevel from datadog_api_client.v2.model.ci_app_pipeline_event_job_status import CIAppPipelineEventJobStatus @@ -101,6 +102,7 @@ from datadog_api_client.v2.model.ci_app_pipeline_event_type_name import CIAppPipelineEventTypeName from datadog_api_client.v2.model.ci_app_pipeline_events_request import CIAppPipelineEventsRequest from datadog_api_client.v2.model.ci_app_pipeline_events_response import CIAppPipelineEventsResponse +from datadog_api_client.v2.model.ci_app_pipeline_level import CIAppPipelineLevel from datadog_api_client.v2.model.ci_app_pipelines_aggregate_request import CIAppPipelinesAggregateRequest from datadog_api_client.v2.model.ci_app_pipelines_aggregation_buckets_response import ( CIAppPipelinesAggregationBucketsResponse, @@ -124,6 +126,7 @@ from datadog_api_client.v2.model.ci_app_test_event_type_name import CIAppTestEventTypeName from datadog_api_client.v2.model.ci_app_test_events_request import CIAppTestEventsRequest from datadog_api_client.v2.model.ci_app_test_events_response import CIAppTestEventsResponse +from datadog_api_client.v2.model.ci_app_test_level import CIAppTestLevel from datadog_api_client.v2.model.ci_app_tests_aggregate_request import CIAppTestsAggregateRequest from datadog_api_client.v2.model.ci_app_tests_aggregation_buckets_response import CIAppTestsAggregationBucketsResponse from datadog_api_client.v2.model.ci_app_tests_analytics_aggregate_response import CIAppTestsAnalyticsAggregateResponse @@ -1423,6 +1426,7 @@ "CIAppGroupByTotal", "CIAppHostInfo", "CIAppPipelineEvent", + "CIAppPipelineEventAttributes", "CIAppPipelineEventJob", "CIAppPipelineEventJobLevel", "CIAppPipelineEventJobStatus", @@ -1441,6 +1445,7 @@ "CIAppPipelineEventTypeName", "CIAppPipelineEventsRequest", "CIAppPipelineEventsResponse", + "CIAppPipelineLevel", "CIAppPipelinesAggregateRequest", "CIAppPipelinesAggregationBucketsResponse", "CIAppPipelinesAnalyticsAggregateResponse", @@ -1460,6 +1465,7 @@ "CIAppTestEventTypeName", "CIAppTestEventsRequest", "CIAppTestEventsResponse", + "CIAppTestLevel", "CIAppTestsAggregateRequest", "CIAppTestsAggregationBucketsResponse", "CIAppTestsAnalyticsAggregateResponse",