Skip to content

Commit 21fb27e

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Regenerate client from commit ca13c42 of spec repo (#209)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 2890fb5 commit 21fb27e

18 files changed

+515
-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.4.1.dev2",
7-
"regenerated": "2020-12-29 08:50:45.613296",
8-
"spec_repo_commit": "2554c85"
7+
"regenerated": "2020-12-29 12:58:47.131418",
8+
"spec_repo_commit": "ca13c42"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.1.dev2",
12-
"regenerated": "2020-12-29 08:50:57.367519",
13-
"spec_repo_commit": "2554c85"
12+
"regenerated": "2020-12-29 12:58:58.467891",
13+
"spec_repo_commit": "ca13c42"
1414
}
1515
}
1616
}

.openapi-generator/FILES

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ datadog_api_client/v2/model/role_update_response_data.py
224224
datadog_api_client/v2/model/roles_response.py
225225
datadog_api_client/v2/model/roles_sort.py
226226
datadog_api_client/v2/model/roles_type.py
227+
datadog_api_client/v2/model/security_monitoring_filter.py
228+
datadog_api_client/v2/model/security_monitoring_filter_action.py
227229
datadog_api_client/v2/model/security_monitoring_list_rules_response.py
228230
datadog_api_client/v2/model/security_monitoring_rule_case.py
229231
datadog_api_client/v2/model/security_monitoring_rule_case_create.py
@@ -492,6 +494,8 @@ docs/RolesResponse.md
492494
docs/RolesSort.md
493495
docs/RolesType.md
494496
docs/SecurityMonitoringApi.md
497+
docs/SecurityMonitoringFilter.md
498+
docs/SecurityMonitoringFilterAction.md
495499
docs/SecurityMonitoringListRulesResponse.md
496500
docs/SecurityMonitoringRuleCase.md
497501
docs/SecurityMonitoringRuleCaseCreate.md
@@ -758,6 +762,8 @@ test/test_roles_response.py
758762
test/test_roles_sort.py
759763
test/test_roles_type.py
760764
test/test_security_monitoring_api.py
765+
test/test_security_monitoring_filter.py
766+
test/test_security_monitoring_filter_action.py
761767
test/test_security_monitoring_list_rules_response.py
762768
test/test_security_monitoring_rule_case.py
763769
test/test_security_monitoring_rule_case_create.py

docs/v2/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,8 @@ Class | Method | HTTP request | Description
392392
- [RolesResponse](RolesResponse.md)
393393
- [RolesSort](RolesSort.md)
394394
- [RolesType](RolesType.md)
395+
- [SecurityMonitoringFilter](SecurityMonitoringFilter.md)
396+
- [SecurityMonitoringFilterAction](SecurityMonitoringFilterAction.md)
395397
- [SecurityMonitoringListRulesResponse](SecurityMonitoringListRulesResponse.md)
396398
- [SecurityMonitoringRuleCase](SecurityMonitoringRuleCase.md)
397399
- [SecurityMonitoringRuleCaseCreate](SecurityMonitoringRuleCaseCreate.md)

docs/v2/SecurityMonitoringApi.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ with datadog_api_client.v2.ApiClient(configuration) as api_client:
6060
api_instance = security_monitoring_api.SecurityMonitoringApi(api_client)
6161
body = SecurityMonitoringRuleCreatePayload(
6262
cases=[],
63+
filters=[
64+
SecurityMonitoringFilter(
65+
action=SecurityMonitoringFilterAction("require"),
66+
query="query_example",
67+
),
68+
],
6369
is_enabled=True,
6470
message="",
6571
name="",
@@ -611,6 +617,12 @@ with datadog_api_client.v2.ApiClient(configuration) as api_client:
611617
status=SecurityMonitoringRuleSeverity("info"),
612618
),
613619
],
620+
filters=[
621+
SecurityMonitoringFilter(
622+
action=SecurityMonitoringFilterAction("require"),
623+
query="query_example",
624+
),
625+
],
614626
is_enabled=True,
615627
message="message_example",
616628
name="name_example",

docs/v2/SecurityMonitoringFilter.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SecurityMonitoringFilter
2+
3+
The rule's suppression filter.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**action** | [**SecurityMonitoringFilterAction**](SecurityMonitoringFilterAction.md) | | [optional]
8+
**query** | **str** | Query for selecting logs to apply the filtering action. | [optional]
9+
10+
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
11+
12+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SecurityMonitoringFilterAction
2+
3+
The type of filtering action.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**value** | **str** | The type of filtering action. | must be one of ["require", "suppress", ]
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/SecurityMonitoringRuleCreatePayload.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
1010
**name** | **str** | The name of the rule. |
1111
**options** | [**SecurityMonitoringRuleOptions**](SecurityMonitoringRuleOptions.md) | |
1212
**queries** | [**[SecurityMonitoringRuleQueryCreate]**](SecurityMonitoringRuleQueryCreate.md) | Queries for selecting logs which are part of the rule. |
13+
**filters** | [**[SecurityMonitoringFilter]**](SecurityMonitoringFilter.md) | Additional queries to filter matched events before they are processed. | [optional]
1314
**tags** | **[str]** | Tags for generated signals. | [optional]
1415

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

docs/v2/SecurityMonitoringRuleResponse.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
77
**cases** | [**[SecurityMonitoringRuleCase]**](SecurityMonitoringRuleCase.md) | Cases for generating signals. | [optional]
88
**created_at** | **int** | When the rule was created, timestamp in milliseconds. | [optional]
99
**creation_author_id** | **int** | User ID of the user who created the rule. | [optional]
10+
**filters** | [**[SecurityMonitoringFilter]**](SecurityMonitoringFilter.md) | Additional queries to filter matched events before they are processed. | [optional]
1011
**id** | **str** | The ID of the rule. | [optional]
1112
**is_default** | **bool** | Whether the rule is included by default. | [optional]
1213
**is_deleted** | **bool** | Whether the rule has been deleted. | [optional]

docs/v2/SecurityMonitoringRuleUpdatePayload.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Update an existing rule.
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**cases** | [**[SecurityMonitoringRuleCase]**](SecurityMonitoringRuleCase.md) | Cases for generating signals. | [optional]
8+
**filters** | [**[SecurityMonitoringFilter]**](SecurityMonitoringFilter.md) | Additional queries to filter matched events before they are processed. | [optional]
89
**is_enabled** | **bool** | Whether the rule is enabled. | [optional]
910
**message** | **str** | Message for generated signals. | [optional]
1011
**name** | **str** | Name of the rule. | [optional]
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
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+
5+
6+
import re # noqa: F401
7+
import sys # noqa: F401
8+
9+
import nulltype # noqa: F401
10+
11+
from datadog_api_client.v2.model_utils import ( # noqa: F401
12+
ApiTypeError,
13+
ModelComposed,
14+
ModelNormal,
15+
ModelSimple,
16+
cached_property,
17+
change_keys_js_to_python,
18+
convert_js_args_to_python_args,
19+
date,
20+
datetime,
21+
file_type,
22+
none_type,
23+
validate_get_composed_info,
24+
)
25+
26+
def lazy_import():
27+
from datadog_api_client.v2.model.security_monitoring_filter_action import SecurityMonitoringFilterAction
28+
globals()['SecurityMonitoringFilterAction'] = SecurityMonitoringFilterAction
29+
30+
31+
class SecurityMonitoringFilter(ModelNormal):
32+
"""NOTE: This class is auto generated by OpenAPI Generator.
33+
Ref: https://openapi-generator.tech
34+
35+
Do not edit the class manually.
36+
37+
Attributes:
38+
allowed_values (dict): The key is the tuple path to the attribute
39+
and the for var_name this is (var_name,). The value is a dict
40+
with a capitalized key describing the allowed value and an allowed
41+
value. These dicts store the allowed enum values.
42+
attribute_map (dict): The key is attribute name
43+
and the value is json key in definition.
44+
discriminator_value_class_map (dict): A dict to go from the discriminator
45+
variable value to the discriminator class name.
46+
validations (dict): The key is the tuple path to the attribute
47+
and the for var_name this is (var_name,). The value is a dict
48+
that stores validations for max_length, min_length, max_items,
49+
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
50+
inclusive_minimum, and regex.
51+
additional_properties_type (tuple): A tuple of classes accepted
52+
as additional properties values.
53+
"""
54+
55+
allowed_values = {
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+
lazy_import()
76+
return {
77+
'action': (SecurityMonitoringFilterAction,), # noqa: E501
78+
'query': (str,), # noqa: E501
79+
}
80+
81+
@cached_property
82+
def discriminator():
83+
return None
84+
85+
86+
attribute_map = {
87+
'action': 'action', # noqa: E501
88+
'query': 'query', # noqa: E501
89+
}
90+
91+
_composed_schemas = {}
92+
93+
required_properties = set([
94+
'_data_store',
95+
'_check_type',
96+
'_spec_property_naming',
97+
'_path_to_item',
98+
'_configuration',
99+
'_visited_composed_classes',
100+
])
101+
102+
@convert_js_args_to_python_args
103+
def __init__(self, *args, **kwargs): # noqa: E501
104+
"""SecurityMonitoringFilter - a model defined in OpenAPI
105+
106+
Keyword Args:
107+
_check_type (bool): if True, values for parameters in openapi_types
108+
will be type checked and a TypeError will be
109+
raised if the wrong type is input.
110+
Defaults to True
111+
_path_to_item (tuple/list): This is a list of keys or values to
112+
drill down to the model in received_data
113+
when deserializing a response
114+
_spec_property_naming (bool): True if the variable names in the input data
115+
are serialized names, as specified in the OpenAPI document.
116+
False if the variable names in the input data
117+
are pythonic names, e.g. snake case (default)
118+
_configuration (Configuration): the instance to use when
119+
deserializing a file_type parameter.
120+
If passed, type conversion is attempted
121+
If omitted no type conversion is done.
122+
_visited_composed_classes (tuple): This stores a tuple of
123+
classes that we have traveled through so that
124+
if we see that class again we will not use its
125+
discriminator again.
126+
When traveling through a discriminator, the
127+
composed schema that is
128+
is traveled through is added to this set.
129+
For example if Animal has a discriminator
130+
petType and we pass in "Dog", and the class Dog
131+
allOf includes Animal, we move through Animal
132+
once using the discriminator, and pick Dog.
133+
Then in Dog, we will make an instance of the
134+
Animal class but this time we won't travel
135+
through its discriminator because we passed in
136+
_visited_composed_classes = (Animal,)
137+
action (SecurityMonitoringFilterAction): [optional] # noqa: E501
138+
query (str): Query for selecting logs to apply the filtering action.. [optional] # noqa: E501
139+
"""
140+
141+
_check_type = kwargs.pop('_check_type', True)
142+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
143+
_path_to_item = kwargs.pop('_path_to_item', ())
144+
_configuration = kwargs.pop('_configuration', None)
145+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
146+
147+
if args:
148+
raise ApiTypeError(
149+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
150+
args,
151+
self.__class__.__name__,
152+
),
153+
path_to_item=_path_to_item,
154+
valid_classes=(self.__class__,),
155+
)
156+
157+
self._data_store = {}
158+
self._check_type = _check_type
159+
self._spec_property_naming = _spec_property_naming
160+
self._path_to_item = _path_to_item
161+
self._configuration = _configuration
162+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
163+
164+
for var_name, var_value in kwargs.items():
165+
if var_name not in self.attribute_map and \
166+
self._configuration is not None and \
167+
self._configuration.discard_unknown_keys and \
168+
self.additional_properties_type is None:
169+
# discard variable.
170+
continue
171+
setattr(self, var_name, var_value)

0 commit comments

Comments
 (0)