-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathci_app_event_attributes.py
83 lines (71 loc) · 2.56 KB
/
ci_app_event_attributes.py
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# 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 Any, Dict, Union, TYPE_CHECKING
from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
date,
datetime,
none_type,
unset,
UnsetType,
UUID,
)
if TYPE_CHECKING:
from datadog_api_client.v2.model.tags_event_attribute import TagsEventAttribute
from datadog_api_client.v2.model.ci_app_test_level import CIAppTestLevel
class CIAppEventAttributes(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.tags_event_attribute import TagsEventAttribute
from datadog_api_client.v2.model.ci_app_test_level import CIAppTestLevel
return {
"attributes": (
{
str: (
bool,
date,
datetime,
dict,
float,
int,
list,
str,
UUID,
none_type,
)
},
),
"tags": (TagsEventAttribute,),
"test_level": (CIAppTestLevel,),
}
attribute_map = {
"attributes": "attributes",
"tags": "tags",
"test_level": "test_level",
}
def __init__(
self_,
attributes: Union[Dict[str, Any], UnsetType] = unset,
tags: Union[TagsEventAttribute, UnsetType] = unset,
test_level: Union[CIAppTestLevel, UnsetType] = unset,
**kwargs,
):
"""
JSON object containing all event attributes and their associated values.
:param attributes: JSON object of attributes from Test Optimization test events.
:type attributes: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional
:param tags: Array of tags associated with your event.
:type tags: TagsEventAttribute, optional
:param test_level: Test run level.
:type test_level: CIAppTestLevel, optional
"""
if attributes is not unset:
kwargs["attributes"] = attributes
if tags is not unset:
kwargs["tags"] = tags
if test_level is not unset:
kwargs["test_level"] = test_level
super().__init__(kwargs)