Skip to content

Commit

Permalink
Regenerate client from commit 6f54a513 of spec repo (#1565)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec committed Jul 28, 2023
1 parent 4a1df0e commit c76f811
Show file tree
Hide file tree
Showing 10 changed files with 276 additions and 52 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
71 changes: 51 additions & 20 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -1661,14 +1651,30 @@ components:
stored by Datadog.
properties:
attributes:
$ref: '#/components/schemas/CIAppEventAttributes'
$ref: '#/components/schemas/CIAppPipelineEventAttributes'
id:
description: Unique ID of the event.
example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA
type: string
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:
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
21 changes: 21 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----------------------------

Expand Down Expand Up @@ -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
--------------------------------------

Expand Down Expand Up @@ -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
----------------------------------

Expand Down
28 changes: 10 additions & 18 deletions src/datadog_api_client/v2/model/ci_app_event_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": (
Expand All @@ -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)
10 changes: 5 additions & 5 deletions src/datadog_api_client/v2/model/ci_app_pipeline_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,),
}
Expand All @@ -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,
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Loading

0 comments on commit c76f811

Please sign in to comment.