Skip to content

Commit ea9718c

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit ef8cb8b of spec repo
1 parent 6427aeb commit ea9718c

26 files changed

Lines changed: 2264 additions & 0 deletions

‎.generator/schemas/v2/openapi.yaml‎

Lines changed: 601 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
Get a device returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.end_user_device_monitoring_api import EndUserDeviceMonitoringApi
7+
8+
configuration = Configuration()
9+
configuration.unstable_operations["get_eudm_device"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = EndUserDeviceMonitoringApi(api_client)
12+
response = api_instance.get_eudm_device(
13+
device_id="device_id",
14+
)
15+
16+
print(response)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""
2+
Get all devices returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.end_user_device_monitoring_api import EndUserDeviceMonitoringApi
7+
8+
configuration = Configuration()
9+
configuration.unstable_operations["get_eudm_devices"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = EndUserDeviceMonitoringApi(api_client)
12+
response = api_instance.get_eudm_devices()
13+
14+
print(response)

‎src/datadog_api_client/configuration.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,8 @@ def __init__(
601601
"v2.trigger_deployment_gates_evaluation": False,
602602
"v2.update_deployment_gate": False,
603603
"v2.update_deployment_rule": False,
604+
"v2.get_eudm_device": False,
605+
"v2.get_eudm_devices": False,
604606
"v2.clone_form": False,
605607
"v2.create_and_publish_form": False,
606608
"v2.create_form": False,
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import Any, Dict, List, Union
7+
8+
from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint
9+
from datadog_api_client.configuration import Configuration
10+
from datadog_api_client.model_utils import (
11+
UnsetType,
12+
unset,
13+
)
14+
from datadog_api_client.v2.model.device_base_array import DeviceBaseArray
15+
from datadog_api_client.v2.model.device_details import DeviceDetails
16+
17+
18+
class EndUserDeviceMonitoringApi:
19+
"""
20+
Inspect devices reported by the Datadog Agent on end-user laptops, desktops,
21+
and mobile devices, including their health, hardware, and connectivity attributes.
22+
"""
23+
24+
def __init__(self, api_client=None):
25+
if api_client is None:
26+
api_client = ApiClient(Configuration())
27+
self.api_client = api_client
28+
29+
self._get_eudm_device_endpoint = _Endpoint(
30+
settings={
31+
"response_type": (DeviceDetails,),
32+
"auth": ["apiKeyAuth", "appKeyAuth"],
33+
"endpoint_path": "/api/v2/eudm/devices/{device_id}",
34+
"operation_id": "get_eudm_device",
35+
"http_method": "GET",
36+
"version": "v2",
37+
},
38+
params_map={
39+
"device_id": {
40+
"required": True,
41+
"openapi_types": (str,),
42+
"attribute": "device_id",
43+
"location": "path",
44+
},
45+
},
46+
headers_map={
47+
"accept": ["application/json"],
48+
},
49+
api_client=api_client,
50+
)
51+
52+
self._get_eudm_devices_endpoint = _Endpoint(
53+
settings={
54+
"response_type": (DeviceBaseArray,),
55+
"auth": ["apiKeyAuth", "appKeyAuth"],
56+
"endpoint_path": "/api/v2/eudm/devices",
57+
"operation_id": "get_eudm_devices",
58+
"http_method": "GET",
59+
"version": "v2",
60+
},
61+
params_map={
62+
"bssid": {
63+
"openapi_types": ([str],),
64+
"attribute": "bssid",
65+
"location": "query",
66+
"collection_format": "multi",
67+
},
68+
"page_limit": {
69+
"validation": {
70+
"inclusive_minimum": 1,
71+
},
72+
"openapi_types": (int,),
73+
"attribute": "page[limit]",
74+
"location": "query",
75+
},
76+
"page_cursor": {
77+
"openapi_types": (str,),
78+
"attribute": "page[cursor]",
79+
"location": "query",
80+
},
81+
},
82+
headers_map={
83+
"accept": ["application/json"],
84+
},
85+
api_client=api_client,
86+
)
87+
88+
def get_eudm_device(
89+
self,
90+
device_id: str,
91+
) -> DeviceDetails:
92+
"""Get a device.
93+
94+
:param device_id: Unique identifier of the device to fetch. Matches the Datadog host identifier.
95+
:type device_id: str
96+
:rtype: DeviceDetails
97+
"""
98+
kwargs: Dict[str, Any] = {}
99+
kwargs["device_id"] = device_id
100+
101+
return self._get_eudm_device_endpoint.call_with_http_info(**kwargs)
102+
103+
def get_eudm_devices(
104+
self,
105+
*,
106+
bssid: Union[List[str], UnsetType] = unset,
107+
page_limit: Union[int, UnsetType] = unset,
108+
page_cursor: Union[str, UnsetType] = unset,
109+
) -> DeviceBaseArray:
110+
"""Get all devices.
111+
112+
:param bssid: Filter devices to those currently associated with any of the given BSSID values.
113+
Each value must be a MAC-48 address; repeat the parameter to pass several values.
114+
:type bssid: [str], optional
115+
:param page_limit: Maximum number of devices to return in one page. Must be a positive integer.
116+
If not set, the response contains all matching devices.
117+
:type page_limit: int, optional
118+
:param page_cursor: Opaque cursor that selects the next page. Use the ``meta.page.after`` value
119+
of the previous response. Devices are ordered by ID.
120+
:type page_cursor: str, optional
121+
:rtype: DeviceBaseArray
122+
"""
123+
kwargs: Dict[str, Any] = {}
124+
if bssid is not unset:
125+
kwargs["bssid"] = bssid
126+
127+
if page_limit is not unset:
128+
kwargs["page_limit"] = page_limit
129+
130+
if page_cursor is not unset:
131+
kwargs["page_cursor"] = page_cursor
132+
133+
return self._get_eudm_devices_endpoint.call_with_http_info(**kwargs)

‎src/datadog_api_client/v2/apis/__init__.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
from datadog_api_client.v2.api.domain_allowlist_api import DomainAllowlistApi
5757
from datadog_api_client.v2.api.downtimes_api import DowntimesApi
5858
from datadog_api_client.v2.api.elastic_cloud_integration_api import ElasticCloudIntegrationApi
59+
from datadog_api_client.v2.api.end_user_device_monitoring_api import EndUserDeviceMonitoringApi
5960
from datadog_api_client.v2.api.entity_integration_configs_api import EntityIntegrationConfigsApi
6061
from datadog_api_client.v2.api.entity_risk_scores_api import EntityRiskScoresApi
6162
from datadog_api_client.v2.api.error_tracking_api import ErrorTrackingApi
@@ -217,6 +218,7 @@
217218
"DomainAllowlistApi",
218219
"DowntimesApi",
219220
"ElasticCloudIntegrationApi",
221+
"EndUserDeviceMonitoringApi",
220222
"EntityIntegrationConfigsApi",
221223
"EntityRiskScoresApi",
222224
"ErrorTrackingApi",
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import List, Union, TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
if TYPE_CHECKING:
17+
from datadog_api_client.v2.model.device_base_data import DeviceBaseData
18+
from datadog_api_client.v2.model.device_base_array_links import DeviceBaseArrayLinks
19+
from datadog_api_client.v2.model.device_base_array_meta import DeviceBaseArrayMeta
20+
21+
22+
class DeviceBaseArray(ModelNormal):
23+
@cached_property
24+
def openapi_types(_):
25+
from datadog_api_client.v2.model.device_base_data import DeviceBaseData
26+
from datadog_api_client.v2.model.device_base_array_links import DeviceBaseArrayLinks
27+
from datadog_api_client.v2.model.device_base_array_meta import DeviceBaseArrayMeta
28+
29+
return {
30+
"data": ([DeviceBaseData],),
31+
"links": (DeviceBaseArrayLinks,),
32+
"meta": (DeviceBaseArrayMeta,),
33+
}
34+
35+
attribute_map = {
36+
"data": "data",
37+
"links": "links",
38+
"meta": "meta",
39+
}
40+
41+
def __init__(
42+
self_,
43+
data: List[DeviceBaseData],
44+
links: Union[DeviceBaseArrayLinks, UnsetType] = unset,
45+
meta: Union[DeviceBaseArrayMeta, UnsetType] = unset,
46+
**kwargs,
47+
):
48+
"""
49+
Response body for the list devices endpoint.
50+
51+
:param data: List of devices matching the request.
52+
:type data: [DeviceBaseData]
53+
54+
:param links: Links related to the current page of devices.
55+
:type links: DeviceBaseArrayLinks, optional
56+
57+
:param meta: Metadata about the list devices response.
58+
:type meta: DeviceBaseArrayMeta, optional
59+
"""
60+
if links is not unset:
61+
kwargs["links"] = links
62+
if meta is not unset:
63+
kwargs["meta"] = meta
64+
super().__init__(kwargs)
65+
66+
self_.data = data
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import Union
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
class DeviceBaseArrayLinks(ModelNormal):
17+
@cached_property
18+
def openapi_types(_):
19+
return {
20+
"next": (str,),
21+
"self": (str,),
22+
}
23+
24+
attribute_map = {
25+
"next": "next",
26+
"self": "self",
27+
}
28+
29+
def __init__(self_, next: Union[str, UnsetType] = unset, self: Union[str, UnsetType] = unset, **kwargs):
30+
"""
31+
Links related to the current page of devices.
32+
33+
:param next: URL of the next page of devices. Present only when more devices remain.
34+
:type next: str, optional
35+
36+
:param self: URL of the current request.
37+
:type self: str, optional
38+
"""
39+
if next is not unset:
40+
kwargs["next"] = next
41+
if self is not unset:
42+
kwargs["self"] = self
43+
super().__init__(kwargs)
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import Union, TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
if TYPE_CHECKING:
17+
from datadog_api_client.v2.model.device_base_array_meta_page import DeviceBaseArrayMetaPage
18+
19+
20+
class DeviceBaseArrayMeta(ModelNormal):
21+
@cached_property
22+
def openapi_types(_):
23+
from datadog_api_client.v2.model.device_base_array_meta_page import DeviceBaseArrayMetaPage
24+
25+
return {
26+
"page": (DeviceBaseArrayMetaPage,),
27+
}
28+
29+
attribute_map = {
30+
"page": "page",
31+
}
32+
33+
def __init__(self_, page: Union[DeviceBaseArrayMetaPage, UnsetType] = unset, **kwargs):
34+
"""
35+
Metadata about the list devices response.
36+
37+
:param page: Pagination information for the list devices response.
38+
:type page: DeviceBaseArrayMetaPage, optional
39+
"""
40+
if page is not unset:
41+
kwargs["page"] = page
42+
super().__init__(kwargs)
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import Union
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
class DeviceBaseArrayMetaPage(ModelNormal):
17+
@cached_property
18+
def openapi_types(_):
19+
return {
20+
"after": (str,),
21+
}
22+
23+
attribute_map = {
24+
"after": "after",
25+
}
26+
27+
def __init__(self_, after: Union[str, UnsetType] = unset, **kwargs):
28+
"""
29+
Pagination information for the list devices response.
30+
31+
:param after: Cursor to pass as ``page[cursor]`` to get the next page.
32+
Present only when more devices remain.
33+
:type after: str, optional
34+
"""
35+
if after is not unset:
36+
kwargs["after"] = after
37+
super().__init__(kwargs)

0 commit comments

Comments
 (0)