Skip to content

Commit

Permalink
Regenerate client from commit 8b1782a4 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Jul 27, 2023
1 parent 0fb8e8d commit 09f44d9
Show file tree
Hide file tree
Showing 11 changed files with 305 additions and 81 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-27 13:27:15.201390",
"spec_repo_commit": "8b1782a4"
},
"v2": {
"apigentools_version": "1.6.5",
"regenerated": "2023-07-26 17:14:49.933340",
"spec_repo_commit": "69e8c6e4"
"regenerated": "2023-07-27 13:27:15.216163",
"spec_repo_commit": "8b1782a4"
}
}
}
99 changes: 65 additions & 34 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1475,32 +1475,6 @@ components:
type: string
x-enum-varnames:
- CIPIPELINE_RESOURCE_REQUEST
CIAppEventAttributes:
description: JSON object containing all event attributes and their associated
values.
properties:
attributes:
additionalProperties: {}
description: JSON object of attributes from CI Visibility 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'
type: object
CIAppGitInfo:
description: 'If pipelines are triggered due to actions to a Git repository,
then all payloads must contain this.
Expand Down Expand Up @@ -1661,14 +1635,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 +2180,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 @@ -2421,14 +2427,30 @@ components:
by Datadog.
properties:
attributes:
$ref: '#/components/schemas/CIAppEventAttributes'
$ref: '#/components/schemas/CIAppTestEventAttributes'
id:
description: Unique ID of the event.
example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA
type: string
type:
$ref: '#/components/schemas/CIAppTestEventTypeName'
type: object
CIAppTestEventAttributes:
description: JSON object containing all event attributes and their associated
values.
properties:
attributes:
additionalProperties: {}
description: JSON object of attributes from CI Visibility test events.
example:
customAttribute: 123
duration: 2345
type: object
tags:
$ref: '#/components/schemas/TagsEventAttribute'
test_level:
$ref: '#/components/schemas/CIAppTestLevel'
type: object
CIAppTestEventTypeName:
description: Type of the event.
enum:
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
35 changes: 28 additions & 7 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -498,13 +498,6 @@ ci\_app\_create\_pipeline\_event\_request\_data\_type
:members:
:show-inheritance:

ci\_app\_event\_attributes
--------------------------

.. automodule:: datadog_api_client.v2.model.ci_app_event_attributes
:members:
:show-inheritance:

ci\_app\_git\_info
------------------

Expand Down Expand Up @@ -547,6 +540,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 +673,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 @@ -785,6 +792,13 @@ ci\_app\_test\_event
:members:
:show-inheritance:

ci\_app\_test\_event\_attributes
--------------------------------

.. automodule:: datadog_api_client.v2.model.ci_app_test_event_attributes
:members:
:show-inheritance:

ci\_app\_test\_event\_type\_name
--------------------------------

Expand All @@ -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
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
Expand Up @@ -17,12 +17,14 @@


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 CIAppEventAttributes(ModelNormal):
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 {
Expand All @@ -41,49 +43,39 @@ def openapi_types(_):
)
},
),
"service": (str,),
"ci_level": (CIAppPipelineLevel,),
"tags": (TagsEventAttribute,),
"timestamp": (datetime,),
}

attribute_map = {
"attributes": "attributes",
"service": "service",
"ci_level": "ci_level",
"tags": "tags",
"timestamp": "timestamp",
}

def __init__(
self_,
attributes: Union[Dict[str, Any], UnsetType] = unset,
service: Union[str, UnsetType] = unset,
ci_level: Union[CIAppPipelineLevel, UnsetType] = unset,
tags: Union[TagsEventAttribute, UnsetType] = unset,
timestamp: Union[datetime, 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 pipeline 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 ci_level: Pipeline execution level.
:type ci_level: CIAppPipelineLevel, optional
:param tags: Array of tags associated with your event.
:type tags: TagsEventAttribute, optional
:param timestamp: Timestamp of your event.
:type timestamp: datetime, optional
"""
if attributes is not unset:
kwargs["attributes"] = attributes
if service is not unset:
kwargs["service"] = service
if ci_level is not unset:
kwargs["ci_level"] = ci_level
if tags is not unset:
kwargs["tags"] = tags
if timestamp is not unset:
kwargs["timestamp"] = timestamp
super().__init__(kwargs)
Loading

0 comments on commit 09f44d9

Please sign in to comment.