Skip to content

Commit 85a2e2c

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit d9efdb7 of spec repo (#107)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 34eedde commit 85a2e2c

File tree

9 files changed

+265
-11
lines changed

9 files changed

+265
-11
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-10-05 08:54:47.138698",
8-
"spec_repo_commit": "3e66447"
7+
"regenerated": "2020-10-06 08:32:17.762496",
8+
"spec_repo_commit": "d9efdb7"
99
},
1010
"v2": {
1111
"apigentools_version": "1.2.0",
12-
"regenerated": "2020-10-05 08:54:57.081213",
13-
"spec_repo_commit": "3e66447"
12+
"regenerated": "2020-10-06 08:32:27.968295",
13+
"spec_repo_commit": "d9efdb7"
1414
}
1515
}
1616
}

docs/v1/ApmStatsQueryColumnType.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# ApmStatsQueryColumnType
2+
3+
Column properties.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**name** | **str** | Column name. |
8+
**alias** | **str** | A user-assigned alias for the column. | [optional]
9+
**cell_display_mode** | [**TableWidgetCellDisplayMode**](TableWidgetCellDisplayMode.md) | | [optional]
10+
**order** | [**WidgetSort**](WidgetSort.md) | | [optional]
11+
12+
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
13+
14+

docs/v1/ApmStatsQueryDefinition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
99
**primary_tag** | **str** | The organization&#39;s host group name and value. |
1010
**row_type** | [**ApmStatsQueryRowType**](ApmStatsQueryRowType.md) | |
1111
**service** | **str** | Service name. |
12-
**columns** | **[str]** | Column names used by front end for display. | [optional]
12+
**columns** | [**[ApmStatsQueryColumnType]**](ApmStatsQueryColumnType.md) | Column properties used by the front end for display. | [optional]
1313
**resource** | **str** | Resource name. | [optional]
1414

1515
[[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/v1/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ Class | Method | HTTP request | Description
289289
- [ApiKey](ApiKey.md)
290290
- [ApiKeyListResponse](ApiKeyListResponse.md)
291291
- [ApiKeyResponse](ApiKeyResponse.md)
292+
- [ApmStatsQueryColumnType](ApmStatsQueryColumnType.md)
292293
- [ApmStatsQueryDefinition](ApmStatsQueryDefinition.md)
293294
- [ApmStatsQueryRowType](ApmStatsQueryRowType.md)
294295
- [ApplicationKey](ApplicationKey.md)
Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
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.table_widget_cell_display_mode import TableWidgetCellDisplayMode
30+
from datadog_api_client.v1.model.widget_sort import WidgetSort
31+
globals()['TableWidgetCellDisplayMode'] = TableWidgetCellDisplayMode
32+
globals()['WidgetSort'] = WidgetSort
33+
34+
35+
class ApmStatsQueryColumnType(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+
'name': (str,), # noqa: E501
82+
'alias': (str,), # noqa: E501
83+
'cell_display_mode': (TableWidgetCellDisplayMode,), # noqa: E501
84+
'order': (WidgetSort,), # noqa: E501
85+
}
86+
87+
@cached_property
88+
def discriminator():
89+
return None
90+
91+
92+
attribute_map = {
93+
'name': 'name', # noqa: E501
94+
'alias': 'alias', # noqa: E501
95+
'cell_display_mode': 'cell_display_mode', # noqa: E501
96+
'order': 'order', # noqa: E501
97+
}
98+
99+
_composed_schemas = {}
100+
101+
required_properties = set([
102+
'_data_store',
103+
'_check_type',
104+
'_spec_property_naming',
105+
'_path_to_item',
106+
'_configuration',
107+
'_visited_composed_classes',
108+
])
109+
110+
@convert_js_args_to_python_args
111+
def __init__(self, name, *args, **kwargs): # noqa: E501
112+
"""ApmStatsQueryColumnType - a model defined in OpenAPI
113+
114+
Args:
115+
name (str): Column name.
116+
117+
Keyword Args:
118+
_check_type (bool): if True, values for parameters in openapi_types
119+
will be type checked and a TypeError will be
120+
raised if the wrong type is input.
121+
Defaults to True
122+
_path_to_item (tuple/list): This is a list of keys or values to
123+
drill down to the model in received_data
124+
when deserializing a response
125+
_spec_property_naming (bool): True if the variable names in the input data
126+
are serialized names, as specified in the OpenAPI document.
127+
False if the variable names in the input data
128+
are pythonic names, e.g. snake case (default)
129+
_configuration (Configuration): the instance to use when
130+
deserializing a file_type parameter.
131+
If passed, type conversion is attempted
132+
If omitted no type conversion is done.
133+
_visited_composed_classes (tuple): This stores a tuple of
134+
classes that we have traveled through so that
135+
if we see that class again we will not use its
136+
discriminator again.
137+
When traveling through a discriminator, the
138+
composed schema that is
139+
is traveled through is added to this set.
140+
For example if Animal has a discriminator
141+
petType and we pass in "Dog", and the class Dog
142+
allOf includes Animal, we move through Animal
143+
once using the discriminator, and pick Dog.
144+
Then in Dog, we will make an instance of the
145+
Animal class but this time we won't travel
146+
through its discriminator because we passed in
147+
_visited_composed_classes = (Animal,)
148+
alias (str): A user-assigned alias for the column.. [optional] # noqa: E501
149+
cell_display_mode (TableWidgetCellDisplayMode): [optional] # noqa: E501
150+
order (WidgetSort): [optional] # noqa: E501
151+
"""
152+
153+
_check_type = kwargs.pop('_check_type', True)
154+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
155+
_path_to_item = kwargs.pop('_path_to_item', ())
156+
_configuration = kwargs.pop('_configuration', None)
157+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
158+
159+
if args:
160+
raise ApiTypeError(
161+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
162+
args,
163+
self.__class__.__name__,
164+
),
165+
path_to_item=_path_to_item,
166+
valid_classes=(self.__class__,),
167+
)
168+
169+
self._data_store = {}
170+
self._check_type = _check_type
171+
self._spec_property_naming = _spec_property_naming
172+
self._path_to_item = _path_to_item
173+
self._configuration = _configuration
174+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
175+
176+
self.name = name
177+
for var_name, var_value in kwargs.items():
178+
if var_name not in self.attribute_map and \
179+
self._configuration is not None and \
180+
self._configuration.discard_unknown_keys and \
181+
self.additional_properties_type is None:
182+
# discard variable.
183+
continue
184+
setattr(self, var_name, var_value)

src/datadog_api_client/v1/model/apm_stats_query_definition.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
)
2727

2828
def lazy_import():
29+
from datadog_api_client.v1.model.apm_stats_query_column_type import ApmStatsQueryColumnType
2930
from datadog_api_client.v1.model.apm_stats_query_row_type import ApmStatsQueryRowType
31+
globals()['ApmStatsQueryColumnType'] = ApmStatsQueryColumnType
3032
globals()['ApmStatsQueryRowType'] = ApmStatsQueryRowType
3133

3234

@@ -81,7 +83,7 @@ def openapi_types():
8183
'primary_tag': (str,), # noqa: E501
8284
'row_type': (ApmStatsQueryRowType,), # noqa: E501
8385
'service': (str,), # noqa: E501
84-
'columns': ([str],), # noqa: E501
86+
'columns': ([ApmStatsQueryColumnType],), # noqa: E501
8587
'resource': (str,), # noqa: E501
8688
}
8789

@@ -153,7 +155,7 @@ def __init__(self, env, name, primary_tag, row_type, service, *args, **kwargs):
153155
Animal class but this time we won't travel
154156
through its discriminator because we passed in
155157
_visited_composed_classes = (Animal,)
156-
columns ([str]): Column names used by front end for display.. [optional] # noqa: E501
158+
columns ([ApmStatsQueryColumnType]): Column properties used by the front end for display.. [optional] # noqa: E501
157159
resource (str): Resource name.. [optional] # noqa: E501
158160
"""
159161

src/datadog_api_client/v1/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from datadog_api_client.v1.model.api_key import ApiKey
3131
from datadog_api_client.v1.model.api_key_list_response import ApiKeyListResponse
3232
from datadog_api_client.v1.model.api_key_response import ApiKeyResponse
33+
from datadog_api_client.v1.model.apm_stats_query_column_type import ApmStatsQueryColumnType
3334
from datadog_api_client.v1.model.apm_stats_query_definition import ApmStatsQueryDefinition
3435
from datadog_api_client.v1.model.apm_stats_query_row_type import ApmStatsQueryRowType
3536
from datadog_api_client.v1.model.application_key import ApplicationKey

src/datadog_api_client/v1/openapi.yaml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,15 +367,31 @@ components:
367367
api_key:
368368
$ref: '#/components/schemas/ApiKey'
369369
type: object
370+
ApmStatsQueryColumnType:
371+
description: Column properties.
372+
properties:
373+
alias:
374+
description: A user-assigned alias for the column.
375+
example: Requests
376+
type: string
377+
cell_display_mode:
378+
$ref: '#/components/schemas/TableWidgetCellDisplayMode'
379+
name:
380+
description: Column name.
381+
example: Reqs
382+
type: string
383+
order:
384+
$ref: '#/components/schemas/WidgetSort'
385+
required:
386+
- name
387+
type: object
370388
ApmStatsQueryDefinition:
371389
description: The APM stats query for table and distributions widgets.
372390
properties:
373391
columns:
374-
description: Column names used by front end for display.
392+
description: Column properties used by the front end for display.
375393
items:
376-
description: Column header.
377-
example: MeanLatency
378-
type: string
394+
$ref: '#/components/schemas/ApmStatsQueryColumnType'
379395
type: array
380396
env:
381397
description: Environment name.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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 sys
9+
import unittest
10+
11+
import datadog_api_client.v1
12+
from datadog_api_client.v1.model.table_widget_cell_display_mode import TableWidgetCellDisplayMode
13+
from datadog_api_client.v1.model.widget_sort import WidgetSort
14+
globals()['TableWidgetCellDisplayMode'] = TableWidgetCellDisplayMode
15+
globals()['WidgetSort'] = WidgetSort
16+
from datadog_api_client.v1.model.apm_stats_query_column_type import ApmStatsQueryColumnType
17+
18+
19+
class TestApmStatsQueryColumnType(unittest.TestCase):
20+
"""ApmStatsQueryColumnType unit test stubs"""
21+
22+
def setUp(self):
23+
pass
24+
25+
def tearDown(self):
26+
pass
27+
28+
def testApmStatsQueryColumnType(self):
29+
"""Test ApmStatsQueryColumnType"""
30+
# FIXME: construct object with mandatory attributes with example values
31+
# model = ApmStatsQueryColumnType() # noqa: E501
32+
pass
33+
34+
35+
if __name__ == '__main__':
36+
unittest.main()

0 commit comments

Comments
 (0)