Skip to content

Commit 01f2873

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 81a95d1 of spec repo (#150)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 4bc15d8 commit 01f2873

File tree

11 files changed

+306
-19
lines changed

11 files changed

+306
-19
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.3.0",
7-
"regenerated": "2020-11-12 15:41:53.706039",
8-
"spec_repo_commit": "9d03fff"
7+
"regenerated": "2020-11-16 10:16:59.959518",
8+
"spec_repo_commit": "81a95d1"
99
},
1010
"v2": {
1111
"apigentools_version": "1.3.0",
12-
"regenerated": "2020-11-12 15:42:04.788475",
13-
"spec_repo_commit": "9d03fff"
12+
"regenerated": "2020-11-16 10:17:11.730032",
13+
"spec_repo_commit": "81a95d1"
1414
}
1515
}
1616
}

docs/v1/LogsIndex.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ Object describing a Datadog Log index.
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**filter** | [**LogsFilter**](LogsFilter.md) | |
8-
**daily_limit** | **int** | The number of log events you can send in this index per day before you are rate-limited. | [optional] [readonly]
8+
**daily_limit** | **int** | The number of log events you can send in this index per day before you are rate-limited. | [optional]
99
**exclusion_filters** | [**[LogsExclusion]**](LogsExclusion.md) | An array of exclusion objects. The logs are tested against the query of each filter, following the order of the array. Only the first matching active exclusion matters, others (if any) are ignored. | [optional]
1010
**is_rate_limited** | **bool** | A boolean stating if the index is rate limited, meaning more logs than the daily limit have been sent. Rate limit is reset every-day at 2pm UTC. | [optional] [readonly]
1111
**name** | **str** | The name of the index. | [optional] [readonly]
12-
**num_retention_days** | **int** | The number of days before logs are deleted from this index. | [optional] [readonly]
12+
**num_retention_days** | **int** | The number of days before logs are deleted from this index. Available values depend on retention plans specified in your organization&#39;s contract/subscriptions. | [optional]
1313

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

docs/v1/LogsIndexUpdateRequest.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# LogsIndexUpdateRequest
2+
3+
Object for updating a Datadog Log index.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**filter** | [**LogsFilter**](LogsFilter.md) | |
8+
**daily_limit** | **int** | The number of log events you can send in this index per day before you are rate-limited. | [optional]
9+
**disable_daily_limit** | **bool** | If true, sets the &#x60;daily_limit&#x60; value to null and the index is not limited on a daily basis (any specified &#x60;daily_limit&#x60; value in the request is ignored). If false or omitted, the index&#39;s current &#x60;daily_limit&#x60; is maintained. | [optional]
10+
**exclusion_filters** | [**[LogsExclusion]**](LogsExclusion.md) | An array of exclusion objects. The logs are tested against the query of each filter, following the order of the array. Only the first matching active exclusion matters, others (if any) are ignored. | [optional]
11+
**num_retention_days** | **int** | The number of days before logs are deleted from this index. Available values depend on retention plans specified in your organization&#39;s contract/subscriptions. **Note:** Changing the retention for an index adjusts the length of retention for all logs already in this index. It may also affect billing. | [optional]
12+
13+
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
14+
15+

docs/v1/LogsIndexesApi.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,9 @@ with datadog_api_client.v1.ApiClient(configuration) as api_client:
299299
# Create an instance of the API class
300300
api_instance = logs_indexes_api.LogsIndexesApi(api_client)
301301
name = "name_example" # str | Name of the log index.
302-
body = LogsIndex(
302+
body = LogsIndexUpdateRequest(
303303
daily_limit=1,
304+
disable_daily_limit=True,
304305
exclusion_filters=[
305306
LogsExclusion(
306307
filter=LogsExclusionFilter(
@@ -314,10 +315,8 @@ with datadog_api_client.v1.ApiClient(configuration) as api_client:
314315
filter=LogsFilter(
315316
query="source:python",
316317
),
317-
is_rate_limited=True,
318-
name="name_example",
319318
num_retention_days=1,
320-
) # LogsIndex | Object containing the new `LogsIndex`. (optional)
319+
) # LogsIndexUpdateRequest | Object containing the new `LogsIndexUpdateRequest`. (optional)
321320

322321
# example passing only required values which don't have defaults set
323322
try:
@@ -342,7 +341,7 @@ with datadog_api_client.v1.ApiClient(configuration) as api_client:
342341
Name | Type | Description | Notes
343342
------------- | ------------- | ------------- | -------------
344343
**name** | **str**| Name of the log index. |
345-
**body** | [**LogsIndex**](LogsIndex.md)| Object containing the new &#x60;LogsIndex&#x60;. | [optional]
344+
**body** | [**LogsIndexUpdateRequest**](LogsIndexUpdateRequest.md)| Object containing the new &#x60;LogsIndexUpdateRequest&#x60;. | [optional]
346345

347346
### Return type
348347

docs/v1/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@ Class | Method | HTTP request | Description
406406
- [LogsGrokParserType](LogsGrokParserType.md)
407407
- [LogsIndex](LogsIndex.md)
408408
- [LogsIndexListResponse](LogsIndexListResponse.md)
409+
- [LogsIndexUpdateRequest](LogsIndexUpdateRequest.md)
409410
- [LogsIndexesOrder](LogsIndexesOrder.md)
410411
- [LogsListRequest](LogsListRequest.md)
411412
- [LogsListRequestTime](LogsListRequestTime.md)

src/datadog_api_client/v1/api/logs_indexes_api.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from datadog_api_client.v1.model.logs_api_error_response import LogsAPIErrorResponse
2323
from datadog_api_client.v1.model.logs_index import LogsIndex
2424
from datadog_api_client.v1.model.logs_index_list_response import LogsIndexListResponse
25+
from datadog_api_client.v1.model.logs_index_update_request import LogsIndexUpdateRequest
2526
from datadog_api_client.v1.model.logs_indexes_order import LogsIndexesOrder
2627

2728

@@ -391,7 +392,7 @@ def __update_logs_index(
391392
name (str): Name of the log index.
392393
393394
Keyword Args:
394-
body (LogsIndex): Object containing the new &#x60;LogsIndex&#x60;.. [optional]
395+
body (LogsIndexUpdateRequest): Object containing the new &#x60;LogsIndexUpdateRequest&#x60;.. [optional]
395396
_return_http_data_only (bool): response data without head status
396397
code and headers. Default is True.
397398
_preload_content (bool): if False, the urllib3.HTTPResponse object
@@ -476,7 +477,7 @@ def __update_logs_index(
476477
'name':
477478
(str,),
478479
'body':
479-
(LogsIndex,),
480+
(LogsIndexUpdateRequest,),
480481
},
481482
'attribute_map': {
482483
'name': 'name',

src/datadog_api_client/v1/model/logs_index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def __init__(self, filter, *args, **kwargs): # noqa: E501
153153
exclusion_filters ([LogsExclusion]): An array of exclusion objects. The logs are tested against the query of each filter, following the order of the array. Only the first matching active exclusion matters, others (if any) are ignored.. [optional] # noqa: E501
154154
is_rate_limited (bool): A boolean stating if the index is rate limited, meaning more logs than the daily limit have been sent. Rate limit is reset every-day at 2pm UTC.. [optional] # noqa: E501
155155
name (str): The name of the index.. [optional] # noqa: E501
156-
num_retention_days (int): The number of days before logs are deleted from this index.. [optional] # noqa: E501
156+
num_retention_days (int): The number of days before logs are deleted from this index. Available values depend on retention plans specified in your organization&#39;s contract/subscriptions.. [optional] # noqa: E501
157157
"""
158158

159159
_check_type = kwargs.pop('_check_type', True)
Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
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.v1.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+
def lazy_import():
29+
from datadog_api_client.v1.model.logs_exclusion import LogsExclusion
30+
from datadog_api_client.v1.model.logs_filter import LogsFilter
31+
globals()['LogsExclusion'] = LogsExclusion
32+
globals()['LogsFilter'] = LogsFilter
33+
34+
35+
class LogsIndexUpdateRequest(ModelNormal):
36+
"""NOTE: This class is auto generated by OpenAPI Generator.
37+
Ref: https://openapi-generator.tech
38+
39+
Do not edit the class manually.
40+
41+
Attributes:
42+
allowed_values (dict): The key is the tuple path to the attribute
43+
and the for var_name this is (var_name,). The value is a dict
44+
with a capitalized key describing the allowed value and an allowed
45+
value. These dicts store the allowed enum values.
46+
attribute_map (dict): The key is attribute name
47+
and the value is json key in definition.
48+
discriminator_value_class_map (dict): A dict to go from the discriminator
49+
variable value to the discriminator class name.
50+
validations (dict): The key is the tuple path to the attribute
51+
and the for var_name this is (var_name,). The value is a dict
52+
that stores validations for max_length, min_length, max_items,
53+
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
54+
inclusive_minimum, and regex.
55+
additional_properties_type (tuple): A tuple of classes accepted
56+
as additional properties values.
57+
"""
58+
59+
allowed_values = {
60+
}
61+
62+
validations = {
63+
}
64+
65+
additional_properties_type = None
66+
67+
_nullable = False
68+
69+
@cached_property
70+
def openapi_types():
71+
"""
72+
This must be a method because a model may have properties that are
73+
of type self, this must run after the class is loaded
74+
75+
Returns
76+
openapi_types (dict): The key is attribute name
77+
and the value is attribute type.
78+
"""
79+
lazy_import()
80+
return {
81+
'filter': (LogsFilter,), # noqa: E501
82+
'daily_limit': (int,), # noqa: E501
83+
'disable_daily_limit': (bool,), # noqa: E501
84+
'exclusion_filters': ([LogsExclusion],), # noqa: E501
85+
'num_retention_days': (int,), # noqa: E501
86+
}
87+
88+
@cached_property
89+
def discriminator():
90+
return None
91+
92+
93+
attribute_map = {
94+
'filter': 'filter', # noqa: E501
95+
'daily_limit': 'daily_limit', # noqa: E501
96+
'disable_daily_limit': 'disable_daily_limit', # noqa: E501
97+
'exclusion_filters': 'exclusion_filters', # noqa: E501
98+
'num_retention_days': 'num_retention_days', # noqa: E501
99+
}
100+
101+
_composed_schemas = {}
102+
103+
required_properties = set([
104+
'_data_store',
105+
'_check_type',
106+
'_spec_property_naming',
107+
'_path_to_item',
108+
'_configuration',
109+
'_visited_composed_classes',
110+
])
111+
112+
@convert_js_args_to_python_args
113+
def __init__(self, filter, *args, **kwargs): # noqa: E501
114+
"""LogsIndexUpdateRequest - a model defined in OpenAPI
115+
116+
Args:
117+
filter (LogsFilter):
118+
119+
Keyword Args:
120+
_check_type (bool): if True, values for parameters in openapi_types
121+
will be type checked and a TypeError will be
122+
raised if the wrong type is input.
123+
Defaults to True
124+
_path_to_item (tuple/list): This is a list of keys or values to
125+
drill down to the model in received_data
126+
when deserializing a response
127+
_spec_property_naming (bool): True if the variable names in the input data
128+
are serialized names, as specified in the OpenAPI document.
129+
False if the variable names in the input data
130+
are pythonic names, e.g. snake case (default)
131+
_configuration (Configuration): the instance to use when
132+
deserializing a file_type parameter.
133+
If passed, type conversion is attempted
134+
If omitted no type conversion is done.
135+
_visited_composed_classes (tuple): This stores a tuple of
136+
classes that we have traveled through so that
137+
if we see that class again we will not use its
138+
discriminator again.
139+
When traveling through a discriminator, the
140+
composed schema that is
141+
is traveled through is added to this set.
142+
For example if Animal has a discriminator
143+
petType and we pass in "Dog", and the class Dog
144+
allOf includes Animal, we move through Animal
145+
once using the discriminator, and pick Dog.
146+
Then in Dog, we will make an instance of the
147+
Animal class but this time we won't travel
148+
through its discriminator because we passed in
149+
_visited_composed_classes = (Animal,)
150+
daily_limit (int): The number of log events you can send in this index per day before you are rate-limited.. [optional] # noqa: E501
151+
disable_daily_limit (bool): If true, sets the &#x60;daily_limit&#x60; value to null and the index is not limited on a daily basis (any specified &#x60;daily_limit&#x60; value in the request is ignored). If false or omitted, the index&#39;s current &#x60;daily_limit&#x60; is maintained.. [optional] # noqa: E501
152+
exclusion_filters ([LogsExclusion]): An array of exclusion objects. The logs are tested against the query of each filter, following the order of the array. Only the first matching active exclusion matters, others (if any) are ignored.. [optional] # noqa: E501
153+
num_retention_days (int): The number of days before logs are deleted from this index. Available values depend on retention plans specified in your organization&#39;s contract/subscriptions. **Note:** Changing the retention for an index adjusts the length of retention for all logs already in this index. It may also affect billing.. [optional] # noqa: E501
154+
"""
155+
156+
_check_type = kwargs.pop('_check_type', True)
157+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
158+
_path_to_item = kwargs.pop('_path_to_item', ())
159+
_configuration = kwargs.pop('_configuration', None)
160+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
161+
162+
if args:
163+
raise ApiTypeError(
164+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
165+
args,
166+
self.__class__.__name__,
167+
),
168+
path_to_item=_path_to_item,
169+
valid_classes=(self.__class__,),
170+
)
171+
172+
self._data_store = {}
173+
self._check_type = _check_type
174+
self._spec_property_naming = _spec_property_naming
175+
self._path_to_item = _path_to_item
176+
self._configuration = _configuration
177+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
178+
179+
self.filter = filter
180+
for var_name, var_value in kwargs.items():
181+
if var_name not in self.attribute_map and \
182+
self._configuration is not None and \
183+
self._configuration.discard_unknown_keys and \
184+
self.additional_properties_type is None:
185+
# discard variable.
186+
continue
187+
setattr(self, var_name, var_value)

src/datadog_api_client/v1/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@
145145
from datadog_api_client.v1.model.logs_grok_parser_type import LogsGrokParserType
146146
from datadog_api_client.v1.model.logs_index import LogsIndex
147147
from datadog_api_client.v1.model.logs_index_list_response import LogsIndexListResponse
148+
from datadog_api_client.v1.model.logs_index_update_request import LogsIndexUpdateRequest
148149
from datadog_api_client.v1.model.logs_indexes_order import LogsIndexesOrder
149150
from datadog_api_client.v1.model.logs_list_request import LogsListRequest
150151
from datadog_api_client.v1.model.logs_list_request_time import LogsListRequestTime

0 commit comments

Comments
 (0)