Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
427 changes: 254 additions & 173 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

61 changes: 48 additions & 13 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7214,6 +7214,27 @@ datadog\_api\_client.v2.model.domain\_allowlist\_type module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.dora\_deployment\_fetch\_response module
----------------------------------------------------------------------

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

datadog\_api\_client.v2.model.dora\_deployment\_object module
-------------------------------------------------------------

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

datadog\_api\_client.v2.model.dora\_deployment\_object\_attributes module
-------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.dora\_deployment\_request module
--------------------------------------------------------------

Expand Down Expand Up @@ -7256,10 +7277,17 @@ datadog\_api\_client.v2.model.dora\_deployment\_type module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.dora\_event module
------------------------------------------------
datadog\_api\_client.v2.model.dora\_deployments\_list\_response module
----------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.dora_event
.. automodule:: datadog_api_client.v2.model.dora_deployments_list_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.dora\_failure\_fetch\_response module
-------------------------------------------------------------------

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

Expand Down Expand Up @@ -7305,10 +7333,10 @@ datadog\_api\_client.v2.model.dora\_failure\_type module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.dora\_fetch\_response module
----------------------------------------------------------
datadog\_api\_client.v2.model.dora\_failures\_list\_response module
-------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.dora_fetch_response
.. automodule:: datadog_api_client.v2.model.dora_failures_list_response
:members:
:show-inheritance:

Expand All @@ -7319,6 +7347,20 @@ datadog\_api\_client.v2.model.dora\_git\_info module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.dora\_incident\_object module
-----------------------------------------------------------

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

datadog\_api\_client.v2.model.dora\_incident\_object\_attributes module
-----------------------------------------------------------------------

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

datadog\_api\_client.v2.model.dora\_list\_deployments\_request module
---------------------------------------------------------------------

Expand Down Expand Up @@ -7375,13 +7417,6 @@ datadog\_api\_client.v2.model.dora\_list\_failures\_request\_data\_type module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.dora\_list\_response module
---------------------------------------------------------

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

datadog\_api\_client.v2.model.downtime\_create\_request module
--------------------------------------------------------------

Expand Down
30 changes: 16 additions & 14 deletions src/datadog_api_client/v2/api/dora_metrics_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
from datadog_api_client.configuration import Configuration
from datadog_api_client.v2.model.dora_deployment_response import DORADeploymentResponse
from datadog_api_client.v2.model.dora_deployment_request import DORADeploymentRequest
from datadog_api_client.v2.model.dora_list_response import DORAListResponse
from datadog_api_client.v2.model.dora_deployments_list_response import DORADeploymentsListResponse
from datadog_api_client.v2.model.dora_list_deployments_request import DORAListDeploymentsRequest
from datadog_api_client.v2.model.dora_fetch_response import DORAFetchResponse
from datadog_api_client.v2.model.dora_deployment_fetch_response import DORADeploymentFetchResponse
from datadog_api_client.v2.model.dora_failure_response import DORAFailureResponse
from datadog_api_client.v2.model.dora_failure_request import DORAFailureRequest
from datadog_api_client.v2.model.dora_failures_list_response import DORAFailuresListResponse
from datadog_api_client.v2.model.dora_list_failures_request import DORAListFailuresRequest
from datadog_api_client.v2.model.dora_failure_fetch_response import DORAFailureFetchResponse


class DORAMetricsApi:
Expand Down Expand Up @@ -138,7 +140,7 @@ def __init__(self, api_client=None):

self._get_dora_deployment_endpoint = _Endpoint(
settings={
"response_type": (DORAFetchResponse,),
"response_type": (DORADeploymentFetchResponse,),
"auth": ["apiKeyAuth", "appKeyAuth"],
"endpoint_path": "/api/v2/dora/deployments/{deployment_id}",
"operation_id": "get_dora_deployment",
Expand All @@ -161,7 +163,7 @@ def __init__(self, api_client=None):

self._get_dora_failure_endpoint = _Endpoint(
settings={
"response_type": (DORAFetchResponse,),
"response_type": (DORAFailureFetchResponse,),
"auth": ["apiKeyAuth", "appKeyAuth"],
"endpoint_path": "/api/v2/dora/failures/{failure_id}",
"operation_id": "get_dora_failure",
Expand All @@ -184,7 +186,7 @@ def __init__(self, api_client=None):

self._list_dora_deployments_endpoint = _Endpoint(
settings={
"response_type": (DORAListResponse,),
"response_type": (DORADeploymentsListResponse,),
"auth": ["apiKeyAuth", "appKeyAuth"],
"endpoint_path": "/api/v2/dora/deployments",
"operation_id": "list_dora_deployments",
Expand All @@ -204,7 +206,7 @@ def __init__(self, api_client=None):

self._list_dora_failures_endpoint = _Endpoint(
settings={
"response_type": (DORAListResponse,),
"response_type": (DORAFailuresListResponse,),
"auth": ["apiKeyAuth", "appKeyAuth"],
"endpoint_path": "/api/v2/dora/failures",
"operation_id": "list_dora_failures",
Expand Down Expand Up @@ -326,14 +328,14 @@ def delete_dora_failure(
def get_dora_deployment(
self,
deployment_id: str,
) -> DORAFetchResponse:
) -> DORADeploymentFetchResponse:
"""Get a deployment event.

Use this API endpoint to get a deployment event.

:param deployment_id: The ID of the deployment event.
:type deployment_id: str
:rtype: DORAFetchResponse
:rtype: DORADeploymentFetchResponse
"""
kwargs: Dict[str, Any] = {}
kwargs["deployment_id"] = deployment_id
Expand All @@ -343,14 +345,14 @@ def get_dora_deployment(
def get_dora_failure(
self,
failure_id: str,
) -> DORAFetchResponse:
) -> DORAFailureFetchResponse:
"""Get a failure event.

Use this API endpoint to get a failure event.

:param failure_id: The ID of the failure event.
:type failure_id: str
:rtype: DORAFetchResponse
:rtype: DORAFailureFetchResponse
"""
kwargs: Dict[str, Any] = {}
kwargs["failure_id"] = failure_id
Expand All @@ -360,13 +362,13 @@ def get_dora_failure(
def list_dora_deployments(
self,
body: DORAListDeploymentsRequest,
) -> DORAListResponse:
) -> DORADeploymentsListResponse:
"""Get a list of deployment events.

Use this API endpoint to get a list of deployment events.

:type body: DORAListDeploymentsRequest
:rtype: DORAListResponse
:rtype: DORADeploymentsListResponse
"""
kwargs: Dict[str, Any] = {}
kwargs["body"] = body
Expand All @@ -376,13 +378,13 @@ def list_dora_deployments(
def list_dora_failures(
self,
body: DORAListFailuresRequest,
) -> DORAListResponse:
) -> DORAFailuresListResponse:
"""Get a list of failure events.

Use this API endpoint to get a list of failure events.

:type body: DORAListFailuresRequest
:rtype: DORAListResponse
:rtype: DORAFailuresListResponse
"""
kwargs: Dict[str, Any] = {}
kwargs["body"] = body
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 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 Union, TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
unset,
UnsetType,
)


if TYPE_CHECKING:
from datadog_api_client.v2.model.dora_deployment_object import DORADeploymentObject


class DORADeploymentFetchResponse(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.dora_deployment_object import DORADeploymentObject

return {
"data": (DORADeploymentObject,),
}

attribute_map = {
"data": "data",
}

def __init__(self_, data: Union[DORADeploymentObject, UnsetType] = unset, **kwargs):
"""
Response for fetching a single deployment event.

:param data: A DORA deployment event.
:type data: DORADeploymentObject, optional
"""
if data is not unset:
kwargs["data"] = data
super().__init__(kwargs)
64 changes: 64 additions & 0 deletions src/datadog_api_client/v2/model/dora_deployment_object.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# 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 Union, TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
unset,
UnsetType,
)


if TYPE_CHECKING:
from datadog_api_client.v2.model.dora_deployment_object_attributes import DORADeploymentObjectAttributes
from datadog_api_client.v2.model.dora_deployment_type import DORADeploymentType


class DORADeploymentObject(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.dora_deployment_object_attributes import DORADeploymentObjectAttributes
from datadog_api_client.v2.model.dora_deployment_type import DORADeploymentType

return {
"attributes": (DORADeploymentObjectAttributes,),
"id": (str,),
"type": (DORADeploymentType,),
}

attribute_map = {
"attributes": "attributes",
"id": "id",
"type": "type",
}

def __init__(
self_,
attributes: Union[DORADeploymentObjectAttributes, UnsetType] = unset,
id: Union[str, UnsetType] = unset,
type: Union[DORADeploymentType, UnsetType] = unset,
**kwargs,
):
"""
A DORA deployment event.

:param attributes: The attributes of the deployment event.
:type attributes: DORADeploymentObjectAttributes, optional

:param id: The ID of the deployment event.
:type id: str, optional

:param type: JSON:API type for DORA deployment events.
:type type: DORADeploymentType, 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)
Loading