Skip to content

Commit 9f57bf3

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit e5bc0a1 of spec repo (#66)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent fcd1053 commit 9f57bf3

13 files changed

+275
-4
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.2.0",
7-
"regenerated": "2020-09-10 13:26:34.477128",
8-
"spec_repo_commit": "8632cb1"
7+
"regenerated": "2020-09-15 13:57:00.824759",
8+
"spec_repo_commit": "e5bc0a1"
99
},
1010
"v2": {
1111
"apigentools_version": "1.2.0",
12-
"regenerated": "2020-09-10 13:26:44.658588",
13-
"spec_repo_commit": "8632cb1"
12+
"regenerated": "2020-09-15 13:57:10.465270",
13+
"spec_repo_commit": "e5bc0a1"
1414
}
1515
}
1616
}

.openapi-generator/FILES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ datadog_api_client/v2/model/security_monitoring_rule_keep_alive.py
126126
datadog_api_client/v2/model/security_monitoring_rule_max_signal_duration.py
127127
datadog_api_client/v2/model/security_monitoring_rule_options.py
128128
datadog_api_client/v2/model/security_monitoring_rule_query.py
129+
datadog_api_client/v2/model/security_monitoring_rule_query_aggregation.py
129130
datadog_api_client/v2/model/security_monitoring_rule_query_create.py
130131
datadog_api_client/v2/model/security_monitoring_rule_response.py
131132
datadog_api_client/v2/model/security_monitoring_rule_severity.py
@@ -284,6 +285,7 @@ docs/SecurityMonitoringRuleKeepAlive.md
284285
docs/SecurityMonitoringRuleMaxSignalDuration.md
285286
docs/SecurityMonitoringRuleOptions.md
286287
docs/SecurityMonitoringRuleQuery.md
288+
docs/SecurityMonitoringRuleQueryAggregation.md
287289
docs/SecurityMonitoringRuleQueryCreate.md
288290
docs/SecurityMonitoringRuleResponse.md
289291
docs/SecurityMonitoringRuleSeverity.md
@@ -441,6 +443,7 @@ test/test_security_monitoring_rule_keep_alive.py
441443
test/test_security_monitoring_rule_max_signal_duration.py
442444
test/test_security_monitoring_rule_options.py
443445
test/test_security_monitoring_rule_query.py
446+
test/test_security_monitoring_rule_query_aggregation.py
444447
test/test_security_monitoring_rule_query_create.py
445448
test/test_security_monitoring_rule_response.py
446449
test/test_security_monitoring_rule_severity.py

docs/v2/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ this keep alive window..md)
284284
This time is calculated from the first seen timestamp..md)
285285
- [SecurityMonitoringRuleOptions](Options on rules..md)
286286
- [SecurityMonitoringRuleQuery](Query for matching rule..md)
287+
- [SecurityMonitoringRuleQueryAggregation](The aggregation type..md)
287288
- [SecurityMonitoringRuleQueryCreate](Query for matching rule..md)
288289
- [SecurityMonitoringRuleResponse](Detection rule..md)
289290
- [SecurityMonitoringRuleSeverity](Severity of the Security Signal..md)

docs/v2/SecurityMonitoringApi.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,14 @@ with datadog_api_client.v2.ApiClient(configuration) as api_client:
8888
),
8989
queries=[
9090
SecurityMonitoringRuleQueryCreate(
91+
aggregation=SecurityMonitoringRuleQueryAggregation("count"),
9192
distinct_fields=[
9293
"distinct_fields_example",
9394
],
9495
group_by_fields=[
9596
"group_by_fields_example",
9697
],
98+
metric="metric_example",
9799
name="name_example",
98100
query="query_example",
99101
),
@@ -701,12 +703,14 @@ with datadog_api_client.v2.ApiClient(configuration) as api_client:
701703
),
702704
queries=[
703705
SecurityMonitoringRuleQuery(
706+
aggregation=SecurityMonitoringRuleQueryAggregation("count"),
704707
distinct_fields=[
705708
"distinct_fields_example",
706709
],
707710
group_by_fields=[
708711
"group_by_fields_example",
709712
],
713+
metric="metric_example",
710714
name="name_example",
711715
query="query_example",
712716
),

docs/v2/SecurityMonitoringRuleQuery.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ Query for matching rule.
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7+
**aggregation** | [**SecurityMonitoringRuleQueryAggregation**](SecurityMonitoringRuleQueryAggregation.md) | | [optional]
78
**distinct_fields** | **[str]** | Field for which the cardinality is measured. Sent as an array. | [optional]
89
**group_by_fields** | **[str]** | Fields to group by. | [optional]
10+
**metric** | **str** | The target field to aggregate over when using the sum or max aggregations. | [optional]
911
**name** | **str** | Name of the query. | [optional]
1012
**query** | **str** | Query to run on logs. | [optional]
1113

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SecurityMonitoringRuleQueryAggregation
2+
3+
The aggregation type.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**value** | **str** | The aggregation type. | must be one of ["count", "cardinality", "sum", "max", ]
8+
9+
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
10+
11+

docs/v2/SecurityMonitoringRuleQueryCreate.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ Query for matching rule.
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**query** | **str** | Query to run on logs. |
8+
**aggregation** | [**SecurityMonitoringRuleQueryAggregation**](SecurityMonitoringRuleQueryAggregation.md) | | [optional]
89
**distinct_fields** | **[str]** | Field for which the cardinality is measured. Sent as an array. | [optional]
910
**group_by_fields** | **[str]** | Fields to group by. | [optional]
11+
**metric** | **str** | The target field to aggregate over when using the sum or max aggregations. | [optional]
1012
**name** | **str** | Name of the query. | [optional]
1113

1214
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)

src/datadog_api_client/v2/model/security_monitoring_rule_query.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
validate_get_composed_info,
2626
)
2727

28+
def lazy_import():
29+
from datadog_api_client.v2.model.security_monitoring_rule_query_aggregation import SecurityMonitoringRuleQueryAggregation
30+
globals()['SecurityMonitoringRuleQueryAggregation'] = SecurityMonitoringRuleQueryAggregation
31+
2832

2933
class SecurityMonitoringRuleQuery(ModelNormal):
3034
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -70,9 +74,12 @@ def openapi_types():
7074
openapi_types (dict): The key is attribute name
7175
and the value is attribute type.
7276
"""
77+
lazy_import()
7378
return {
79+
'aggregation': (SecurityMonitoringRuleQueryAggregation,), # noqa: E501
7480
'distinct_fields': ([str],), # noqa: E501
7581
'group_by_fields': ([str],), # noqa: E501
82+
'metric': (str,), # noqa: E501
7683
'name': (str,), # noqa: E501
7784
'query': (str,), # noqa: E501
7885
}
@@ -83,8 +90,10 @@ def discriminator():
8390

8491

8592
attribute_map = {
93+
'aggregation': 'aggregation', # noqa: E501
8694
'distinct_fields': 'distinctFields', # noqa: E501
8795
'group_by_fields': 'groupByFields', # noqa: E501
96+
'metric': 'metric', # noqa: E501
8897
'name': 'name', # noqa: E501
8998
'query': 'query', # noqa: E501
9099
}
@@ -135,8 +144,10 @@ def __init__(self, *args, **kwargs): # noqa: E501
135144
Animal class but this time we won't travel
136145
through its discriminator because we passed in
137146
_visited_composed_classes = (Animal,)
147+
aggregation (SecurityMonitoringRuleQueryAggregation): [optional] # noqa: E501
138148
distinct_fields ([str]): Field for which the cardinality is measured. Sent as an array.. [optional] # noqa: E501
139149
group_by_fields ([str]): Fields to group by.. [optional] # noqa: E501
150+
metric (str): The target field to aggregate over when using the sum or max aggregations.. [optional] # noqa: E501
140151
name (str): Name of the query.. [optional] # noqa: E501
141152
query (str): Query to run on logs.. [optional] # noqa: E501
142153
"""
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
# coding: utf-8
2+
3+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
4+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
5+
# Copyright 2019-Present Datadog, Inc.
6+
7+
8+
import re # noqa: F401
9+
import sys # noqa: F401
10+
11+
import nulltype # noqa: F401
12+
13+
from datadog_api_client.v2.model_utils import ( # noqa: F401
14+
ApiTypeError,
15+
ModelComposed,
16+
ModelNormal,
17+
ModelSimple,
18+
cached_property,
19+
change_keys_js_to_python,
20+
convert_js_args_to_python_args,
21+
date,
22+
datetime,
23+
file_type,
24+
none_type,
25+
validate_get_composed_info,
26+
)
27+
28+
29+
class SecurityMonitoringRuleQueryAggregation(ModelSimple):
30+
"""NOTE: This class is auto generated by OpenAPI Generator.
31+
Ref: https://openapi-generator.tech
32+
33+
Do not edit the class manually.
34+
35+
Attributes:
36+
allowed_values (dict): The key is the tuple path to the attribute
37+
and the for var_name this is (var_name,). The value is a dict
38+
with a capitalized key describing the allowed value and an allowed
39+
value. These dicts store the allowed enum values.
40+
validations (dict): The key is the tuple path to the attribute
41+
and the for var_name this is (var_name,). The value is a dict
42+
that stores validations for max_length, min_length, max_items,
43+
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
44+
inclusive_minimum, and regex.
45+
additional_properties_type (tuple): A tuple of classes accepted
46+
as additional properties values.
47+
"""
48+
49+
allowed_values = {
50+
('value',): {
51+
'COUNT': "count",
52+
'CARDINALITY': "cardinality",
53+
'SUM': "sum",
54+
'MAX': "max",
55+
},
56+
}
57+
58+
validations = {
59+
}
60+
61+
additional_properties_type = None
62+
63+
_nullable = False
64+
65+
@cached_property
66+
def openapi_types():
67+
"""
68+
This must be a method because a model may have properties that are
69+
of type self, this must run after the class is loaded
70+
71+
Returns
72+
openapi_types (dict): The key is attribute name
73+
and the value is attribute type.
74+
"""
75+
return {
76+
'value': (str,),
77+
}
78+
79+
@cached_property
80+
def discriminator():
81+
return None
82+
83+
84+
attribute_map = {}
85+
86+
_composed_schemas = None
87+
88+
required_properties = set([
89+
'_data_store',
90+
'_check_type',
91+
'_spec_property_naming',
92+
'_path_to_item',
93+
'_configuration',
94+
'_visited_composed_classes',
95+
])
96+
97+
@convert_js_args_to_python_args
98+
def __init__(self, value, *args, **kwargs):
99+
"""SecurityMonitoringRuleQueryAggregation - a model defined in OpenAPI
100+
101+
Args:
102+
value (str): The aggregation type.., must be one of ["count", "cardinality", "sum", "max", ] # noqa: E501
103+
104+
Keyword Args:
105+
_check_type (bool): if True, values for parameters in openapi_types
106+
will be type checked and a TypeError will be
107+
raised if the wrong type is input.
108+
Defaults to True
109+
_path_to_item (tuple/list): This is a list of keys or values to
110+
drill down to the model in received_data
111+
when deserializing a response
112+
_spec_property_naming (bool): True if the variable names in the input data
113+
are serialized names, as specified in the OpenAPI document.
114+
False if the variable names in the input data
115+
are pythonic names, e.g. snake case (default)
116+
_configuration (Configuration): the instance to use when
117+
deserializing a file_type parameter.
118+
If passed, type conversion is attempted
119+
If omitted no type conversion is done.
120+
_visited_composed_classes (tuple): This stores a tuple of
121+
classes that we have traveled through so that
122+
if we see that class again we will not use its
123+
discriminator again.
124+
When traveling through a discriminator, the
125+
composed schema that is
126+
is traveled through is added to this set.
127+
For example if Animal has a discriminator
128+
petType and we pass in "Dog", and the class Dog
129+
allOf includes Animal, we move through Animal
130+
once using the discriminator, and pick Dog.
131+
Then in Dog, we will make an instance of the
132+
Animal class but this time we won't travel
133+
through its discriminator because we passed in
134+
_visited_composed_classes = (Animal,)
135+
"""
136+
137+
_check_type = kwargs.pop('_check_type', True)
138+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
139+
_path_to_item = kwargs.pop('_path_to_item', ())
140+
_configuration = kwargs.pop('_configuration', None)
141+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
142+
143+
if args:
144+
raise ApiTypeError(
145+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
146+
args,
147+
self.__class__.__name__,
148+
),
149+
path_to_item=_path_to_item,
150+
valid_classes=(self.__class__,),
151+
)
152+
153+
self._data_store = {}
154+
self._check_type = _check_type
155+
self._spec_property_naming = _spec_property_naming
156+
self._path_to_item = _path_to_item
157+
self._configuration = _configuration
158+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
159+
self.value = value
160+
if kwargs:
161+
raise ApiTypeError(
162+
"Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
163+
kwargs,
164+
self.__class__.__name__,
165+
),
166+
path_to_item=_path_to_item,
167+
valid_classes=(self.__class__,),
168+
)

src/datadog_api_client/v2/model/security_monitoring_rule_query_create.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
validate_get_composed_info,
2626
)
2727

28+
def lazy_import():
29+
from datadog_api_client.v2.model.security_monitoring_rule_query_aggregation import SecurityMonitoringRuleQueryAggregation
30+
globals()['SecurityMonitoringRuleQueryAggregation'] = SecurityMonitoringRuleQueryAggregation
31+
2832

2933
class SecurityMonitoringRuleQueryCreate(ModelNormal):
3034
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -70,10 +74,13 @@ def openapi_types():
7074
openapi_types (dict): The key is attribute name
7175
and the value is attribute type.
7276
"""
77+
lazy_import()
7378
return {
7479
'query': (str,), # noqa: E501
80+
'aggregation': (SecurityMonitoringRuleQueryAggregation,), # noqa: E501
7581
'distinct_fields': ([str],), # noqa: E501
7682
'group_by_fields': ([str],), # noqa: E501
83+
'metric': (str,), # noqa: E501
7784
'name': (str,), # noqa: E501
7885
}
7986

@@ -84,8 +91,10 @@ def discriminator():
8491

8592
attribute_map = {
8693
'query': 'query', # noqa: E501
94+
'aggregation': 'aggregation', # noqa: E501
8795
'distinct_fields': 'distinctFields', # noqa: E501
8896
'group_by_fields': 'groupByFields', # noqa: E501
97+
'metric': 'metric', # noqa: E501
8998
'name': 'name', # noqa: E501
9099
}
91100

@@ -138,8 +147,10 @@ def __init__(self, query, *args, **kwargs): # noqa: E501
138147
Animal class but this time we won't travel
139148
through its discriminator because we passed in
140149
_visited_composed_classes = (Animal,)
150+
aggregation (SecurityMonitoringRuleQueryAggregation): [optional] # noqa: E501
141151
distinct_fields ([str]): Field for which the cardinality is measured. Sent as an array.. [optional] # noqa: E501
142152
group_by_fields ([str]): Fields to group by.. [optional] # noqa: E501
153+
metric (str): The target field to aggregate over when using the sum or max aggregations.. [optional] # noqa: E501
143154
name (str): Name of the query.. [optional] # noqa: E501
144155
"""
145156

0 commit comments

Comments
 (0)