forked from linode/linode_api4-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmonitor_api.py
More file actions
44 lines (33 loc) · 1.01 KB
/
Copy pathmonitor_api.py
File metadata and controls
44 lines (33 loc) · 1.01 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
__all__ = [
"EntityMetrics",
"EntityMetricsData",
"EntityMetricsDataResult",
"EntityMetricsStats",
"EntityMetricOptions",
]
from dataclasses import dataclass, field
from typing import List, Optional
from linode_api4.objects.monitor import AggregateFunction
from linode_api4.objects.serializable import JSONObject
@dataclass
class EntityMetricsStats(JSONObject):
executionTimeMsec: int = 0
seriesFetched: str = ""
@dataclass
class EntityMetricsDataResult(JSONObject):
metric: dict = field(default_factory=dict)
values: list = field(default_factory=list)
@dataclass
class EntityMetricsData(JSONObject):
result: Optional[List[EntityMetricsDataResult]] = None
resultType: str = ""
@dataclass
class EntityMetrics(JSONObject):
data: Optional[EntityMetricsData] = None
isPartial: bool = False
stats: Optional[EntityMetricsStats] = None
status: str = ""
@dataclass
class EntityMetricOptions(JSONObject):
name: str = ""
aggregate_function: AggregateFunction = ""