Skip to content
Merged
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
23 changes: 19 additions & 4 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18654,7 +18654,7 @@ components:
finished_at: 1693491984000000000
git:
commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588
repository_url: https://github.com/organization/example-repository
repository_id: github.com/organization/example-repository
service: shopist
started_at: 1693491974000000000
team: backend
Expand Down Expand Up @@ -18685,7 +18685,7 @@ components:
format: int64
type: integer
git:
$ref: '#/components/schemas/DORAGitInfo'
$ref: '#/components/schemas/DORAGitInfoResponse'
service:
description: Service name.
example: shopist
Expand Down Expand Up @@ -18896,7 +18896,7 @@ components:
finished_at: 1693491984000000000
git:
commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588
repository_url: https://github.com/organization/example-repository
repository_id: github.com/organization/example-repository
service: shopist
started_at: 1693491974000000000
team: backend
Expand All @@ -18911,7 +18911,7 @@ components:
finished_at: 1693492084000000000
git:
commit_sha: 77bdc9350f2cc9b250b69abddab733dd55e1a599
repository_url: https://github.com/organization/api-service
repository_id: github.com/organization/api-service
service: api-service
started_at: 1693492074000000000
team: backend
Expand Down Expand Up @@ -19085,6 +19085,17 @@ components:
- repository_url
- commit_sha
type: object
DORAGitInfoResponse:
description: Git info returned by DORA Metrics events.
properties:
commit_sha:
$ref: '#/components/schemas/GitCommitSHA'
repository_id:
$ref: '#/components/schemas/GitRepositoryID'
required:
- repository_id
- commit_sha
type: object
DORAIncidentObject:
description: A DORA incident event.
example:
Expand Down Expand Up @@ -28632,6 +28643,10 @@ components:
example: 66adc9350f2cc9b250b69abddab733dd55e1a588
pattern: ^[a-fA-F0-9]{40,}$
type: string
GitRepositoryID:
description: Git Repository ID
example: github.com/organization/example-repository
type: string
GitRepositoryURL:
description: Git Repository URL
example: https://github.com/organization/example-repository
Expand Down
7 changes: 7 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8726,6 +8726,13 @@ datadog\_api\_client.v2.model.dora\_git\_info module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.dora\_git\_info\_response module
--------------------------------------------------------------

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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@


if TYPE_CHECKING:
from datadog_api_client.v2.model.dora_git_info import DORAGitInfo
from datadog_api_client.v2.model.dora_git_info_response import DORAGitInfoResponse


class DORADeploymentObjectAttributes(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.dora_git_info import DORAGitInfo
from datadog_api_client.v2.model.dora_git_info_response import DORAGitInfoResponse

return {
"custom_tags": ([str],),
"env": (str,),
"finished_at": (int,),
"git": (DORAGitInfo,),
"git": (DORAGitInfoResponse,),
"service": (str,),
"started_at": (int,),
"team": (str,),
Expand All @@ -52,7 +52,7 @@ def __init__(
started_at: int,
custom_tags: Union[List[str], none_type, UnsetType] = unset,
env: Union[str, UnsetType] = unset,
git: Union[DORAGitInfo, UnsetType] = unset,
git: Union[DORAGitInfoResponse, UnsetType] = unset,
team: Union[str, UnsetType] = unset,
version: Union[str, UnsetType] = unset,
**kwargs,
Expand All @@ -69,8 +69,8 @@ def __init__(
:param finished_at: Unix timestamp when the deployment finished.
:type finished_at: int

:param git: Git info for DORA Metrics events.
:type git: DORAGitInfo, optional
:param git: Git info returned by DORA Metrics events.
:type git: DORAGitInfoResponse, optional

:param service: Service name.
:type service: str
Expand Down
43 changes: 43 additions & 0 deletions src/datadog_api_client/v2/model/dora_git_info_response.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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 (
ModelNormal,
cached_property,
)


class DORAGitInfoResponse(ModelNormal):
validations = {
"commit_sha": {},
}

@cached_property
def openapi_types(_):
return {
"commit_sha": (str,),
"repository_id": (str,),
}

attribute_map = {
"commit_sha": "commit_sha",
"repository_id": "repository_id",
}

def __init__(self_, commit_sha: str, repository_id: str, **kwargs):
"""
Git info returned by DORA Metrics events.

:param commit_sha: Git Commit SHA.
:type commit_sha: str

:param repository_id: Git Repository ID
:type repository_id: str
"""
super().__init__(kwargs)

self_.commit_sha = commit_sha
self_.repository_id = repository_id
2 changes: 2 additions & 0 deletions src/datadog_api_client/v2/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1545,6 +1545,7 @@
from datadog_api_client.v2.model.dora_failure_type import DORAFailureType
from datadog_api_client.v2.model.dora_failures_list_response import DORAFailuresListResponse
from datadog_api_client.v2.model.dora_git_info import DORAGitInfo
from datadog_api_client.v2.model.dora_git_info_response import DORAGitInfoResponse
from datadog_api_client.v2.model.dora_incident_object import DORAIncidentObject
from datadog_api_client.v2.model.dora_incident_object_attributes import DORAIncidentObjectAttributes
from datadog_api_client.v2.model.dora_list_deployments_request import DORAListDeploymentsRequest
Expand Down Expand Up @@ -7559,6 +7560,7 @@
"DORAFailureType",
"DORAFailuresListResponse",
"DORAGitInfo",
"DORAGitInfoResponse",
"DORAIncidentObject",
"DORAIncidentObjectAttributes",
"DORAListDeploymentsRequest",
Expand Down
Loading