-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathtopology_query.py
More file actions
49 lines (39 loc) · 1.76 KB
/
topology_query.py
File metadata and controls
49 lines (39 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# 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 (
ModelComposed,
cached_property,
)
class TopologyQuery(ModelComposed):
def __init__(self, **kwargs):
"""
A topology data source query.
:param data_source: Name of the data source
:type data_source: TopologyQueryDataStreamsOrServiceMapDataSource
:param filters: Your environment and primary tag (or * if enabled for your account).
:type filters: [str]
:param query_string: A search string for filtering services, used in `data_streams` queries only. When set, this replaces the `service` field
:type query_string: str, optional
:param service: Name of the service
:type service: str, optional
"""
super().__init__(kwargs)
@cached_property
def _composed_schemas(_):
# we need this here to make our import statements work
# we must store _composed_schemas in here so the code is only run
# when we invoke this method. If we kept this at the class
# level we would get an error because the class level
# code would be run when this module is imported, and these composed
# classes don't exist yet because their module has not finished
# loading
from datadog_api_client.v1.model.topology_query_data_streams_or_service_map import (
TopologyQueryDataStreamsOrServiceMap,
)
return {
"oneOf": [
TopologyQueryDataStreamsOrServiceMap,
],
}