Skip to content

Commit 24c3894

Browse files
Regenerate client from commit e5b275c of spec repo (#336)
1 parent c69c29a commit 24c3894

13 files changed

+256
-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.dev6",
7-
"regenerated": "2021-03-23 21:30:09.044384",
8-
"spec_repo_commit": "b654b25"
7+
"regenerated": "2021-03-24 07:14:34.983889",
8+
"spec_repo_commit": "e5b275c"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.1.dev6",
12-
"regenerated": "2021-03-23 21:30:47.896305",
13-
"spec_repo_commit": "b654b25"
12+
"regenerated": "2021-03-24 07:15:14.126612",
13+
"spec_repo_commit": "e5b275c"
1414
}
1515
}
1616
}

.openapi-generator/FILES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ datadog_api_client/v2/model/security_monitoring_rule_query_create.py
290290
datadog_api_client/v2/model/security_monitoring_rule_response.py
291291
datadog_api_client/v2/model/security_monitoring_rule_severity.py
292292
datadog_api_client/v2/model/security_monitoring_rule_update_payload.py
293+
datadog_api_client/v2/model/security_monitoring_runtime_agent_rule.py
293294
datadog_api_client/v2/model/security_monitoring_signal.py
294295
datadog_api_client/v2/model/security_monitoring_signal_attributes.py
295296
datadog_api_client/v2/model/security_monitoring_signal_list_request.py
@@ -609,6 +610,7 @@ docs/SecurityMonitoringRuleQueryCreate.md
609610
docs/SecurityMonitoringRuleResponse.md
610611
docs/SecurityMonitoringRuleSeverity.md
611612
docs/SecurityMonitoringRuleUpdatePayload.md
613+
docs/SecurityMonitoringRuntimeAgentRule.md
612614
docs/SecurityMonitoringSignal.md
613615
docs/SecurityMonitoringSignalAttributes.md
614616
docs/SecurityMonitoringSignalListRequest.md
@@ -926,6 +928,7 @@ test/test_security_monitoring_rule_query_create.py
926928
test/test_security_monitoring_rule_response.py
927929
test/test_security_monitoring_rule_severity.py
928930
test/test_security_monitoring_rule_update_payload.py
931+
test/test_security_monitoring_runtime_agent_rule.py
929932
test/test_security_monitoring_signal.py
930933
test/test_security_monitoring_signal_attributes.py
931934
test/test_security_monitoring_signal_list_request.py

docs/v2/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,7 @@ Class | Method | HTTP request | Description
461461
- [SecurityMonitoringRuleResponse](SecurityMonitoringRuleResponse.md)
462462
- [SecurityMonitoringRuleSeverity](SecurityMonitoringRuleSeverity.md)
463463
- [SecurityMonitoringRuleUpdatePayload](SecurityMonitoringRuleUpdatePayload.md)
464+
- [SecurityMonitoringRuntimeAgentRule](SecurityMonitoringRuntimeAgentRule.md)
464465
- [SecurityMonitoringSignal](SecurityMonitoringSignal.md)
465466
- [SecurityMonitoringSignalAttributes](SecurityMonitoringSignalAttributes.md)
466467
- [SecurityMonitoringSignalListRequest](SecurityMonitoringSignalListRequest.md)

docs/v2/SecurityMonitoringApi.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,10 @@ with ApiClient(configuration) as api_client:
585585
),
586586
queries=[
587587
SecurityMonitoringRuleQuery(
588+
agent_rule=SecurityMonitoringRuntimeAgentRule(
589+
agent_rule_id="etc_shadow",
590+
expression="expression_example",
591+
),
588592
aggregation=SecurityMonitoringRuleQueryAggregation("count"),
589593
distinct_fields=[
590594
"distinct_fields_example",

docs/v2/SecurityMonitoringRuleQuery.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Query for matching rule.
55
## Properties
66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8+
**agent_rule** | [**SecurityMonitoringRuntimeAgentRule**](SecurityMonitoringRuntimeAgentRule.md) | | [optional]
89
**aggregation** | [**SecurityMonitoringRuleQueryAggregation**](SecurityMonitoringRuleQueryAggregation.md) | | [optional]
910
**distinct_fields** | **[str]** | Field for which the cardinality is measured. Sent as an array. | [optional]
1011
**group_by_fields** | **[str]** | Fields to group by. | [optional]

docs/v2/SecurityMonitoringRuleQueryCreate.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Query for matching rule.
66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**query** | **str** | Query to run on logs. |
9+
**agent_rule** | [**SecurityMonitoringRuntimeAgentRule**](SecurityMonitoringRuntimeAgentRule.md) | | [optional]
910
**aggregation** | [**SecurityMonitoringRuleQueryAggregation**](SecurityMonitoringRuleQueryAggregation.md) | | [optional]
1011
**distinct_fields** | **[str]** | Field for which the cardinality is measured. Sent as an array. | [optional]
1112
**group_by_fields** | **[str]** | Fields to group by. | [optional]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SecurityMonitoringRuntimeAgentRule
2+
3+
The Agent rule.
4+
5+
## Properties
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**agent_rule_id** | **str** | The Agent rule ID. Must be unique within the rule. | [optional]
9+
**expression** | **str** | A Runtime Security expression determines what activity should be collected by the Datadog Agent. These logical expressions can use predefined operators and attributes. Tags cannot be used in Runtime Security expressions. Instead, allow or deny based on tags under the advanced option. | [optional]
10+
11+
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
12+
13+

src/datadog_api_client/v2/model/security_monitoring_rule_query.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ def lazy_import():
2626
from datadog_api_client.v2.model.security_monitoring_rule_query_aggregation import (
2727
SecurityMonitoringRuleQueryAggregation,
2828
)
29+
from datadog_api_client.v2.model.security_monitoring_runtime_agent_rule import SecurityMonitoringRuntimeAgentRule
2930

3031
globals()["SecurityMonitoringRuleQueryAggregation"] = SecurityMonitoringRuleQueryAggregation
32+
globals()["SecurityMonitoringRuntimeAgentRule"] = SecurityMonitoringRuntimeAgentRule
3133

3234

3335
class SecurityMonitoringRuleQuery(ModelNormal):
@@ -74,6 +76,7 @@ def openapi_types():
7476
"""
7577
lazy_import()
7678
return {
79+
"agent_rule": (SecurityMonitoringRuntimeAgentRule,), # noqa: E501
7780
"aggregation": (SecurityMonitoringRuleQueryAggregation,), # noqa: E501
7881
"distinct_fields": ([str],), # noqa: E501
7982
"group_by_fields": ([str],), # noqa: E501
@@ -87,6 +90,7 @@ def discriminator():
8790
return None
8891

8992
attribute_map = {
93+
"agent_rule": "agentRule", # noqa: E501
9094
"aggregation": "aggregation", # noqa: E501
9195
"distinct_fields": "distinctFields", # noqa: E501
9296
"group_by_fields": "groupByFields", # noqa: E501
@@ -143,6 +147,7 @@ def __init__(self, *args, **kwargs): # noqa: E501
143147
Animal class but this time we won't travel
144148
through its discriminator because we passed in
145149
_visited_composed_classes = (Animal,)
150+
agent_rule (SecurityMonitoringRuntimeAgentRule): [optional] # noqa: E501
146151
aggregation (SecurityMonitoringRuleQueryAggregation): [optional] # noqa: E501
147152
distinct_fields ([str]): Field for which the cardinality is measured. Sent as an array.. [optional] # noqa: E501
148153
group_by_fields ([str]): Fields to group by.. [optional] # noqa: E501

src/datadog_api_client/v2/model/security_monitoring_rule_query_create.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ def lazy_import():
2626
from datadog_api_client.v2.model.security_monitoring_rule_query_aggregation import (
2727
SecurityMonitoringRuleQueryAggregation,
2828
)
29+
from datadog_api_client.v2.model.security_monitoring_runtime_agent_rule import SecurityMonitoringRuntimeAgentRule
2930

3031
globals()["SecurityMonitoringRuleQueryAggregation"] = SecurityMonitoringRuleQueryAggregation
32+
globals()["SecurityMonitoringRuntimeAgentRule"] = SecurityMonitoringRuntimeAgentRule
3133

3234

3335
class SecurityMonitoringRuleQueryCreate(ModelNormal):
@@ -75,6 +77,7 @@ def openapi_types():
7577
lazy_import()
7678
return {
7779
"query": (str,), # noqa: E501
80+
"agent_rule": (SecurityMonitoringRuntimeAgentRule,), # noqa: E501
7881
"aggregation": (SecurityMonitoringRuleQueryAggregation,), # noqa: E501
7982
"distinct_fields": ([str],), # noqa: E501
8083
"group_by_fields": ([str],), # noqa: E501
@@ -88,6 +91,7 @@ def discriminator():
8891

8992
attribute_map = {
9093
"query": "query", # noqa: E501
94+
"agent_rule": "agentRule", # noqa: E501
9195
"aggregation": "aggregation", # noqa: E501
9296
"distinct_fields": "distinctFields", # noqa: E501
9397
"group_by_fields": "groupByFields", # noqa: E501
@@ -146,6 +150,7 @@ def __init__(self, query, *args, **kwargs): # noqa: E501
146150
Animal class but this time we won't travel
147151
through its discriminator because we passed in
148152
_visited_composed_classes = (Animal,)
153+
agent_rule (SecurityMonitoringRuntimeAgentRule): [optional] # noqa: E501
149154
aggregation (SecurityMonitoringRuleQueryAggregation): [optional] # noqa: E501
150155
distinct_fields ([str]): Field for which the cardinality is measured. Sent as an array.. [optional] # noqa: E501
151156
group_by_fields ([str]): Fields to group by.. [optional] # noqa: E501
Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
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+
from datadog_api_client.v2.model_utils import ( # noqa: F401
10+
ApiTypeError,
11+
ModelComposed,
12+
ModelNormal,
13+
ModelSimple,
14+
cached_property,
15+
change_keys_js_to_python,
16+
convert_js_args_to_python_args,
17+
date,
18+
datetime,
19+
file_type,
20+
none_type,
21+
validate_get_composed_info,
22+
)
23+
24+
25+
class SecurityMonitoringRuntimeAgentRule(ModelNormal):
26+
"""NOTE: This class is auto generated by OpenAPI Generator.
27+
Ref: https://openapi-generator.tech
28+
29+
Do not edit the class manually.
30+
31+
Attributes:
32+
allowed_values (dict): The key is the tuple path to the attribute
33+
and the for var_name this is (var_name,). The value is a dict
34+
with a capitalized key describing the allowed value and an allowed
35+
value. These dicts store the allowed enum values.
36+
attribute_map (dict): The key is attribute name
37+
and the value is json key in definition.
38+
discriminator_value_class_map (dict): A dict to go from the discriminator
39+
variable value to the discriminator class name.
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+
51+
validations = {}
52+
53+
additional_properties_type = None
54+
55+
_nullable = False
56+
57+
@cached_property
58+
def openapi_types():
59+
"""
60+
This must be a method because a model may have properties that are
61+
of type self, this must run after the class is loaded
62+
63+
Returns
64+
openapi_types (dict): The key is attribute name
65+
and the value is attribute type.
66+
"""
67+
return {
68+
"agent_rule_id": (str,), # noqa: E501
69+
"expression": (str,), # noqa: E501
70+
}
71+
72+
@cached_property
73+
def discriminator():
74+
return None
75+
76+
attribute_map = {
77+
"agent_rule_id": "agentRuleId", # noqa: E501
78+
"expression": "expression", # noqa: E501
79+
}
80+
81+
_composed_schemas = {}
82+
83+
required_properties = set(
84+
[
85+
"_data_store",
86+
"_check_type",
87+
"_spec_property_naming",
88+
"_path_to_item",
89+
"_configuration",
90+
"_visited_composed_classes",
91+
]
92+
)
93+
94+
@convert_js_args_to_python_args
95+
def __init__(self, *args, **kwargs): # noqa: E501
96+
"""SecurityMonitoringRuntimeAgentRule - a model defined in OpenAPI
97+
98+
Keyword Args:
99+
_check_type (bool): if True, values for parameters in openapi_types
100+
will be type checked and a TypeError will be
101+
raised if the wrong type is input.
102+
Defaults to True
103+
_path_to_item (tuple/list): This is a list of keys or values to
104+
drill down to the model in received_data
105+
when deserializing a response
106+
_spec_property_naming (bool): True if the variable names in the input data
107+
are serialized names, as specified in the OpenAPI document.
108+
False if the variable names in the input data
109+
are pythonic names, e.g. snake case (default)
110+
_configuration (Configuration): the instance to use when
111+
deserializing a file_type parameter.
112+
If passed, type conversion is attempted
113+
If omitted no type conversion is done.
114+
_visited_composed_classes (tuple): This stores a tuple of
115+
classes that we have traveled through so that
116+
if we see that class again we will not use its
117+
discriminator again.
118+
When traveling through a discriminator, the
119+
composed schema that is
120+
is traveled through is added to this set.
121+
For example if Animal has a discriminator
122+
petType and we pass in "Dog", and the class Dog
123+
allOf includes Animal, we move through Animal
124+
once using the discriminator, and pick Dog.
125+
Then in Dog, we will make an instance of the
126+
Animal class but this time we won't travel
127+
through its discriminator because we passed in
128+
_visited_composed_classes = (Animal,)
129+
agent_rule_id (str): The Agent rule ID. Must be unique within the rule.. [optional] # noqa: E501
130+
expression (str): A Runtime Security expression determines what activity should be collected by the Datadog Agent. These logical expressions can use predefined operators and attributes. Tags cannot be used in Runtime Security expressions. Instead, allow or deny based on tags under the advanced option.. [optional] # noqa: E501
131+
"""
132+
133+
_check_type = kwargs.pop("_check_type", True)
134+
_spec_property_naming = kwargs.pop("_spec_property_naming", False)
135+
_path_to_item = kwargs.pop("_path_to_item", ())
136+
_configuration = kwargs.pop("_configuration", None)
137+
_visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
138+
139+
if args:
140+
raise ApiTypeError(
141+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
142+
% (
143+
args,
144+
self.__class__.__name__,
145+
),
146+
path_to_item=_path_to_item,
147+
valid_classes=(self.__class__,),
148+
)
149+
150+
self._data_store = {}
151+
self._check_type = _check_type
152+
self._spec_property_naming = _spec_property_naming
153+
self._path_to_item = _path_to_item
154+
self._configuration = _configuration
155+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
156+
157+
for var_name, var_value in kwargs.items():
158+
if (
159+
var_name not in self.attribute_map
160+
and self._configuration is not None
161+
and self._configuration.discard_unknown_keys
162+
and self.additional_properties_type is None
163+
):
164+
# discard variable.
165+
continue
166+
setattr(self, var_name, var_value)

src/datadog_api_client/v2/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@
313313
from datadog_api_client.v2.model.security_monitoring_rule_response import SecurityMonitoringRuleResponse
314314
from datadog_api_client.v2.model.security_monitoring_rule_severity import SecurityMonitoringRuleSeverity
315315
from datadog_api_client.v2.model.security_monitoring_rule_update_payload import SecurityMonitoringRuleUpdatePayload
316+
from datadog_api_client.v2.model.security_monitoring_runtime_agent_rule import SecurityMonitoringRuntimeAgentRule
316317
from datadog_api_client.v2.model.security_monitoring_signal import SecurityMonitoringSignal
317318
from datadog_api_client.v2.model.security_monitoring_signal_attributes import SecurityMonitoringSignalAttributes
318319
from datadog_api_client.v2.model.security_monitoring_signal_list_request import SecurityMonitoringSignalListRequest

src/datadog_api_client/v2/openapi.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4157,6 +4157,8 @@ components:
41574157
SecurityMonitoringRuleQuery:
41584158
description: Query for matching rule.
41594159
properties:
4160+
agentRule:
4161+
$ref: '#/components/schemas/SecurityMonitoringRuntimeAgentRule'
41604162
aggregation:
41614163
$ref: '#/components/schemas/SecurityMonitoringRuleQueryAggregation'
41624164
distinctFields:
@@ -4201,6 +4203,8 @@ components:
42014203
SecurityMonitoringRuleQueryCreate:
42024204
description: Query for matching rule.
42034205
properties:
4206+
agentRule:
4207+
$ref: '#/components/schemas/SecurityMonitoringRuntimeAgentRule'
42044208
aggregation:
42054209
$ref: '#/components/schemas/SecurityMonitoringRuleQueryAggregation'
42064210
distinctFields:
@@ -4339,6 +4343,24 @@ components:
43394343
type: string
43404344
type: array
43414345
type: object
4346+
SecurityMonitoringRuntimeAgentRule:
4347+
description: The Agent rule.
4348+
properties:
4349+
agentRuleId:
4350+
description: The Agent rule ID. Must be unique within the rule.
4351+
example: etc_shadow
4352+
type: string
4353+
expression:
4354+
description: 'A Runtime Security expression determines what activity should
4355+
be collected by the Datadog Agent.
4356+
4357+
These logical expressions can use predefined operators and attributes.
4358+
Tags cannot be used in Runtime
4359+
4360+
Security expressions. Instead, allow or deny based on tags under the advanced
4361+
option.'
4362+
type: string
4363+
type: object
43424364
SecurityMonitoringSignal:
43434365
description: Object description of a security signal.
43444366
properties:

0 commit comments

Comments
 (0)