Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Teams metadata details to Incident App API documentation #1883

Closed
Closed
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
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.6",
"regenerated": "2024-02-23 18:04:47.981830",
"spec_repo_commit": "76697835"
"regenerated": "2024-02-26 17:23:35.959019",
"spec_repo_commit": "d0c076c9"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-02-23 18:04:48.287269",
"spec_repo_commit": "76697835"
"regenerated": "2024-02-26 17:23:35.977010",
"spec_repo_commit": "d0c076c9"
}
}
}
40 changes: 40 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8255,6 +8255,8 @@ components:
description: 'A number indicating the type of integration this metadata
is for. 1 indicates Slack;

7 indicates Microsoft Teams;

8 indicates Jira.'
example: 1
format: int32
Expand Down Expand Up @@ -8324,6 +8326,7 @@ components:
oneOf:
- $ref: '#/components/schemas/SlackIntegrationMetadata'
- $ref: '#/components/schemas/JiraIntegrationMetadata'
- $ref: '#/components/schemas/MicrosoftTeamsIntegrationMetadata'
IncidentIntegrationMetadataPatchData:
description: Incident integration metadata data for a patch request.
properties:
Expand Down Expand Up @@ -11975,6 +11978,43 @@ components:
- data_source
- query
type: object
MicrosoftTeamsIntegrationMetadata:
description: Incident integration metadata for the Microsoft Teams integration.
properties:
teams:
description: Array of Microsoft Teams teams in this integration metadata.
example: []
items:
$ref: '#/components/schemas/MicrosoftTeamsIntegrationMetadataTeamsItem'
type: array
required:
- teams
type: object
MicrosoftTeamsIntegrationMetadataTeamsItem:
description: Item in the Microsoft Teams integration metadata teams array.
properties:
ms_team_id:
description: Team ID of the Microsoft Teams team
example: 00b9ce32-cbb8-4702-a638-42674f65e5ad
type: string
ms_tenant_id:
description: Microsoft Teams tenant ID
example: a5f17203-44db-482e-9e8a-20492610bf84
type: string
redirect_url:
description: URL redirecting to the Microsoft Teams team
example: https://teams.microsoft.com/l/team/19:tkO54atjviTjUSWZOJLhLrG2X1VRNtvXGCTj7zoEPlA1%40thread.tacv2/conversations?groupId=00b9ce32-cbb8-4702-a638-42674f65e5ad&tenantId=a5f17203-44db-482e-9e8a-20492610bf84
type: string
team_name:
description: Name of the Microsoft Teams team
example: example-team-name
type: string
required:
- team_name
- ms_team_id
- ms_tenant_id
- redirect_url
type: object
MonitorConfigPolicyAttributeCreateRequest:
description: Policy and policy type for a monitor configuration policy.
properties:
Expand Down
14 changes: 14 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5223,6 +5223,20 @@ metrics\_timeseries\_query
:members:
:show-inheritance:

microsoft\_teams\_integration\_metadata
---------------------------------------

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

microsoft\_teams\_integration\_metadata\_teams\_item
----------------------------------------------------

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

monitor\_config\_policy\_attribute\_create\_request
---------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from datadog_api_client.v2.model.incident_integration_metadata_metadata import IncidentIntegrationMetadataMetadata
from datadog_api_client.v2.model.slack_integration_metadata import SlackIntegrationMetadata
from datadog_api_client.v2.model.jira_integration_metadata import JiraIntegrationMetadata
from datadog_api_client.v2.model.microsoft_teams_integration_metadata import MicrosoftTeamsIntegrationMetadata


class IncidentIntegrationMetadataAttributes(ModelNormal):
Expand Down Expand Up @@ -61,7 +62,12 @@ def openapi_types(_):
def __init__(
self_,
integration_type: int,
metadata: Union[IncidentIntegrationMetadataMetadata, SlackIntegrationMetadata, JiraIntegrationMetadata],
metadata: Union[
IncidentIntegrationMetadataMetadata,
SlackIntegrationMetadata,
JiraIntegrationMetadata,
MicrosoftTeamsIntegrationMetadata,
],
created: Union[datetime, UnsetType] = unset,
incident_id: Union[str, UnsetType] = unset,
modified: Union[datetime, UnsetType] = unset,
Expand All @@ -78,6 +84,7 @@ def __init__(
:type incident_id: str, optional

:param integration_type: A number indicating the type of integration this metadata is for. 1 indicates Slack;
7 indicates Microsoft Teams;
8 indicates Jira.
:type integration_type: int

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ def __init__(self, **kwargs):

:param issues: Array of Jira issues in this integration metadata.
:type issues: [JiraIntegrationMetadataIssuesItem]

:param teams: Array of Microsoft Teams teams in this integration metadata.
:type teams: [MicrosoftTeamsIntegrationMetadataTeamsItem]
"""
super().__init__(kwargs)

Expand All @@ -34,10 +37,12 @@ def _composed_schemas(_):
# loading
from datadog_api_client.v2.model.slack_integration_metadata import SlackIntegrationMetadata
from datadog_api_client.v2.model.jira_integration_metadata import JiraIntegrationMetadata
from datadog_api_client.v2.model.microsoft_teams_integration_metadata import MicrosoftTeamsIntegrationMetadata

return {
"oneOf": [
SlackIntegrationMetadata,
JiraIntegrationMetadata,
MicrosoftTeamsIntegrationMetadata,
],
}
Original file line number Diff line number Diff line change
@@ -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 typing import List, TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
)


if TYPE_CHECKING:
from datadog_api_client.v2.model.microsoft_teams_integration_metadata_teams_item import (
MicrosoftTeamsIntegrationMetadataTeamsItem,
)


class MicrosoftTeamsIntegrationMetadata(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.microsoft_teams_integration_metadata_teams_item import (
MicrosoftTeamsIntegrationMetadataTeamsItem,
)

return {
"teams": ([MicrosoftTeamsIntegrationMetadataTeamsItem],),
}

attribute_map = {
"teams": "teams",
}

def __init__(self_, teams: List[MicrosoftTeamsIntegrationMetadataTeamsItem], **kwargs):
"""
Incident integration metadata for the Microsoft Teams integration.

:param teams: Array of Microsoft Teams teams in this integration metadata.
:type teams: [MicrosoftTeamsIntegrationMetadataTeamsItem]
"""
super().__init__(kwargs)

self_.teams = teams
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# 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 MicrosoftTeamsIntegrationMetadataTeamsItem(ModelNormal):
@cached_property
def openapi_types(_):
return {
"ms_team_id": (str,),
"ms_tenant_id": (str,),
"redirect_url": (str,),
"team_name": (str,),
}

attribute_map = {
"ms_team_id": "ms_team_id",
"ms_tenant_id": "ms_tenant_id",
"redirect_url": "redirect_url",
"team_name": "team_name",
}

def __init__(self_, ms_team_id: str, ms_tenant_id: str, redirect_url: str, team_name: str, **kwargs):
"""
Item in the Microsoft Teams integration metadata teams array.

:param ms_team_id: Team ID of the Microsoft Teams team
:type ms_team_id: str

:param ms_tenant_id: Microsoft Teams tenant ID
:type ms_tenant_id: str

:param redirect_url: URL redirecting to the Microsoft Teams team
:type redirect_url: str

:param team_name: Name of the Microsoft Teams team
:type team_name: str
"""
super().__init__(kwargs)

self_.ms_team_id = ms_team_id
self_.ms_tenant_id = ms_tenant_id
self_.redirect_url = redirect_url
self_.team_name = team_name
6 changes: 6 additions & 0 deletions src/datadog_api_client/v2/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,10 @@
from datadog_api_client.v2.model.metrics_data_source import MetricsDataSource
from datadog_api_client.v2.model.metrics_scalar_query import MetricsScalarQuery
from datadog_api_client.v2.model.metrics_timeseries_query import MetricsTimeseriesQuery
from datadog_api_client.v2.model.microsoft_teams_integration_metadata import MicrosoftTeamsIntegrationMetadata
from datadog_api_client.v2.model.microsoft_teams_integration_metadata_teams_item import (
MicrosoftTeamsIntegrationMetadataTeamsItem,
)
from datadog_api_client.v2.model.monitor_config_policy_attribute_create_request import (
MonitorConfigPolicyAttributeCreateRequest,
)
Expand Down Expand Up @@ -2402,6 +2406,8 @@
"MetricsDataSource",
"MetricsScalarQuery",
"MetricsTimeseriesQuery",
"MicrosoftTeamsIntegrationMetadata",
"MicrosoftTeamsIntegrationMetadataTeamsItem",
"MonitorConfigPolicyAttributeCreateRequest",
"MonitorConfigPolicyAttributeEditRequest",
"MonitorConfigPolicyAttributeResponse",
Expand Down
Loading