Skip to content

Commit 7846545

Browse files
Regenerate client from commit 70fbb25 of spec repo (#372)
1 parent 0544bb4 commit 7846545

File tree

10 files changed

+253
-4
lines changed

10 files changed

+253
-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-04-09 15:23:48.583852",
8-
"spec_repo_commit": "e13b005"
7+
"regenerated": "2021-04-12 11:09:43.079784",
8+
"spec_repo_commit": "70fbb25"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.1.dev6",
12-
"regenerated": "2021-04-09 15:24:11.624934",
13-
"spec_repo_commit": "e13b005"
12+
"regenerated": "2021-04-12 11:10:10.065349",
13+
"spec_repo_commit": "70fbb25"
1414
}
1515
}
1616
}

docs/v1/Dashboard.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Name | Type | Description | Notes
1515
**is_read_only** | **bool** | Whether this dashboard is read-only. If True, only the author and admins can make changes to it. | [optional] if omitted the server will use the default value of False
1616
**modified_at** | **datetime** | Modification date of the dashboard. | [optional] [readonly]
1717
**notify_list** | **[str], none_type** | List of handles of users to notify when changes are made to this dashboard. | [optional]
18+
**reflow_type** | [**DashboardReflowType**](DashboardReflowType.md) | | [optional]
1819
**template_variable_presets** | [**[DashboardTemplateVariablePreset], none_type**](DashboardTemplateVariablePreset.md) | Array of template variables saved views. | [optional]
1920
**template_variables** | [**[DashboardTemplateVariable], none_type**](DashboardTemplateVariable.md) | List of template variables for this dashboard. | [optional]
2021
**url** | **str** | The URL of the dashboard. | [optional] [readonly]

docs/v1/DashboardReflowType.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# DashboardReflowType
2+
3+
Reflow type for a multi-size layout dashboard. Set this only when layout type is 'ordered'. If set to 'fixed', the dashboard expect all widgets to have a layout, and if it's set to 'auto', widgets should not have layouts.
4+
5+
## Properties
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**value** | **str** | Reflow type for a multi-size layout dashboard. Set this only when layout type is 'ordered'. If set to 'fixed', the dashboard expect all widgets to have a layout, and if it's set to 'auto', widgets should not have layouts. | must be one of ["auto", "fixed", ]
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+

docs/v1/DashboardsApi.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ with ApiClient(configuration) as api_client:
4747
notify_list=[
4848
"notify_list_example",
4949
],
50+
reflow_type=DashboardReflowType("auto"),
5051
template_variable_presets=[
5152
DashboardTemplateVariablePreset(
5253
name="name_example",
@@ -350,6 +351,7 @@ with ApiClient(configuration) as api_client:
350351
notify_list=[
351352
"notify_list_example",
352353
],
354+
reflow_type=DashboardReflowType("auto"),
353355
template_variable_presets=[
354356
DashboardTemplateVariablePreset(
355357
name="name_example",

docs/v1/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ Class | Method | HTTP request | Description
333333
- [DashboardList](DashboardList.md)
334334
- [DashboardListDeleteResponse](DashboardListDeleteResponse.md)
335335
- [DashboardListListResponse](DashboardListListResponse.md)
336+
- [DashboardReflowType](DashboardReflowType.md)
336337
- [DashboardSummary](DashboardSummary.md)
337338
- [DashboardSummaryDefinition](DashboardSummaryDefinition.md)
338339
- [DashboardTemplateVariable](DashboardTemplateVariable.md)

src/datadog_api_client/v1/model/dashboard.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@
2424

2525
def lazy_import():
2626
from datadog_api_client.v1.model.dashboard_layout_type import DashboardLayoutType
27+
from datadog_api_client.v1.model.dashboard_reflow_type import DashboardReflowType
2728
from datadog_api_client.v1.model.dashboard_template_variable import DashboardTemplateVariable
2829
from datadog_api_client.v1.model.dashboard_template_variable_preset import DashboardTemplateVariablePreset
2930
from datadog_api_client.v1.model.widget import Widget
3031

3132
globals()["DashboardLayoutType"] = DashboardLayoutType
33+
globals()["DashboardReflowType"] = DashboardReflowType
3234
globals()["DashboardTemplateVariable"] = DashboardTemplateVariable
3335
globals()["DashboardTemplateVariablePreset"] = DashboardTemplateVariablePreset
3436
globals()["Widget"] = Widget
@@ -94,6 +96,7 @@ def openapi_types():
9496
[str],
9597
none_type,
9698
), # noqa: E501
99+
"reflow_type": (DashboardReflowType,), # noqa: E501
97100
"template_variable_presets": (
98101
[DashboardTemplateVariablePreset],
99102
none_type,
@@ -120,6 +123,7 @@ def discriminator():
120123
"is_read_only": "is_read_only", # noqa: E501
121124
"modified_at": "modified_at", # noqa: E501
122125
"notify_list": "notify_list", # noqa: E501
126+
"reflow_type": "reflow_type", # noqa: E501
123127
"template_variable_presets": "template_variable_presets", # noqa: E501
124128
"template_variables": "template_variables", # noqa: E501
125129
"url": "url", # noqa: E501
@@ -185,6 +189,7 @@ def __init__(self, layout_type, title, widgets, *args, **kwargs): # noqa: E501
185189
is_read_only (bool): Whether this dashboard is read-only. If True, only the author and admins can make changes to it.. [optional] if omitted the server will use the default value of False # noqa: E501
186190
modified_at (datetime): Modification date of the dashboard.. [optional] # noqa: E501
187191
notify_list ([str], none_type): List of handles of users to notify when changes are made to this dashboard.. [optional] # noqa: E501
192+
reflow_type (DashboardReflowType): [optional] # noqa: E501
188193
template_variable_presets ([DashboardTemplateVariablePreset], none_type): Array of template variables saved views.. [optional] # noqa: E501
189194
template_variables ([DashboardTemplateVariable], none_type): List of template variables for this dashboard.. [optional] # noqa: E501
190195
url (str): The URL of the dashboard.. [optional] # noqa: E501
Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
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.v1.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 DashboardReflowType(ModelSimple):
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+
validations (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+
that stores validations for max_length, min_length, max_items,
39+
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
40+
inclusive_minimum, and regex.
41+
additional_properties_type (tuple): A tuple of classes accepted
42+
as additional properties values.
43+
"""
44+
45+
allowed_values = {
46+
("value",): {
47+
"AUTO": "auto",
48+
"FIXED": "fixed",
49+
},
50+
}
51+
52+
validations = {}
53+
54+
additional_properties_type = None
55+
56+
_nullable = False
57+
58+
@cached_property
59+
def openapi_types():
60+
"""
61+
This must be a method because a model may have properties that are
62+
of type self, this must run after the class is loaded
63+
64+
Returns
65+
openapi_types (dict): The key is attribute name
66+
and the value is attribute type.
67+
"""
68+
return {
69+
"value": (str,),
70+
}
71+
72+
@cached_property
73+
def discriminator():
74+
return None
75+
76+
attribute_map = {}
77+
78+
_composed_schemas = None
79+
80+
required_properties = set(
81+
[
82+
"_data_store",
83+
"_check_type",
84+
"_spec_property_naming",
85+
"_path_to_item",
86+
"_configuration",
87+
"_visited_composed_classes",
88+
]
89+
)
90+
91+
@convert_js_args_to_python_args
92+
def __init__(self, *args, **kwargs):
93+
"""DashboardReflowType - a model defined in OpenAPI
94+
95+
Note that value can be passed either in args or in kwargs, but not in both.
96+
97+
Args:
98+
args[0] (str): Reflow type for a multi-size layout dashboard. Set this only when layout type is 'ordered'. If set to 'fixed', the dashboard expect all widgets to have a layout, and if it's set to 'auto', widgets should not have layouts.., must be one of ["auto", "fixed", ] # noqa: E501
99+
100+
Keyword Args:
101+
value (str): Reflow type for a multi-size layout dashboard. Set this only when layout type is 'ordered'. If set to 'fixed', the dashboard expect all widgets to have a layout, and if it's set to 'auto', widgets should not have layouts.., must be one of ["auto", "fixed", ] # noqa: E501
102+
_check_type (bool): if True, values for parameters in openapi_types
103+
will be type checked and a TypeError will be
104+
raised if the wrong type is input.
105+
Defaults to True
106+
_path_to_item (tuple/list): This is a list of keys or values to
107+
drill down to the model in received_data
108+
when deserializing a response
109+
_spec_property_naming (bool): True if the variable names in the input data
110+
are serialized names, as specified in the OpenAPI document.
111+
False if the variable names in the input data
112+
are pythonic names, e.g. snake case (default)
113+
_configuration (Configuration): the instance to use when
114+
deserializing a file_type parameter.
115+
If passed, type conversion is attempted
116+
If omitted no type conversion is done.
117+
_visited_composed_classes (tuple): This stores a tuple of
118+
classes that we have traveled through so that
119+
if we see that class again we will not use its
120+
discriminator again.
121+
When traveling through a discriminator, the
122+
composed schema that is
123+
is traveled through is added to this set.
124+
For example if Animal has a discriminator
125+
petType and we pass in "Dog", and the class Dog
126+
allOf includes Animal, we move through Animal
127+
once using the discriminator, and pick Dog.
128+
Then in Dog, we will make an instance of the
129+
Animal class but this time we won't travel
130+
through its discriminator because we passed in
131+
_visited_composed_classes = (Animal,)
132+
"""
133+
# required up here when default value is not given
134+
_path_to_item = kwargs.pop("_path_to_item", ())
135+
136+
if "value" in kwargs:
137+
value = kwargs.pop("value")
138+
elif args:
139+
args = list(args)
140+
value = args.pop(0)
141+
else:
142+
raise ApiTypeError(
143+
"value is required, but not passed in args or kwargs and doesn't have default",
144+
path_to_item=_path_to_item,
145+
valid_classes=(self.__class__,),
146+
)
147+
148+
_check_type = kwargs.pop("_check_type", True)
149+
_spec_property_naming = kwargs.pop("_spec_property_naming", False)
150+
_configuration = kwargs.pop("_configuration", None)
151+
_visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
152+
153+
if args:
154+
raise ApiTypeError(
155+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
156+
% (
157+
args,
158+
self.__class__.__name__,
159+
),
160+
path_to_item=_path_to_item,
161+
valid_classes=(self.__class__,),
162+
)
163+
164+
self._data_store = {}
165+
self._check_type = _check_type
166+
self._spec_property_naming = _spec_property_naming
167+
self._path_to_item = _path_to_item
168+
self._configuration = _configuration
169+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
170+
self.value = value
171+
if kwargs:
172+
raise ApiTypeError(
173+
"Invalid named arguments=%s passed to %s. Remove those invalid named arguments."
174+
% (
175+
kwargs,
176+
self.__class__.__name__,
177+
),
178+
path_to_item=_path_to_item,
179+
valid_classes=(self.__class__,),
180+
)

src/datadog_api_client/v1/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
from datadog_api_client.v1.model.dashboard_list import DashboardList
6262
from datadog_api_client.v1.model.dashboard_list_delete_response import DashboardListDeleteResponse
6363
from datadog_api_client.v1.model.dashboard_list_list_response import DashboardListListResponse
64+
from datadog_api_client.v1.model.dashboard_reflow_type import DashboardReflowType
6465
from datadog_api_client.v1.model.dashboard_summary import DashboardSummary
6566
from datadog_api_client.v1.model.dashboard_summary_definition import DashboardSummaryDefinition
6667
from datadog_api_client.v1.model.dashboard_template_variable import DashboardTemplateVariable

src/datadog_api_client/v1/openapi.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,8 @@ components:
891891
type: string
892892
nullable: true
893893
type: array
894+
reflow_type:
895+
$ref: '#/components/schemas/DashboardReflowType'
894896
template_variable_presets:
895897
description: Array of template variables saved views.
896898
items:
@@ -1002,6 +1004,21 @@ components:
10021004
$ref: '#/components/schemas/DashboardList'
10031005
type: array
10041006
type: object
1007+
DashboardReflowType:
1008+
description: 'Reflow type for a multi-size layout dashboard. Set this only when
1009+
layout type is ''ordered''.
1010+
1011+
If set to ''fixed'', the dashboard expect all widgets to have a layout, and
1012+
if it''s set to ''auto'',
1013+
1014+
widgets should not have layouts.'
1015+
enum:
1016+
- auto
1017+
- fixed
1018+
type: string
1019+
x-enum-varnames:
1020+
- AUTO
1021+
- FIXED
10051022
DashboardSummary:
10061023
description: Dashboard summary response.
10071024
properties:
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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 sys
7+
import unittest
8+
9+
import datadog_api_client.v1
10+
from datadog_api_client.v1.model.dashboard_reflow_type import DashboardReflowType
11+
12+
13+
class TestDashboardReflowType(unittest.TestCase):
14+
"""DashboardReflowType unit test stubs"""
15+
16+
def setUp(self):
17+
pass
18+
19+
def tearDown(self):
20+
pass
21+
22+
def testDashboardReflowType(self):
23+
"""Test DashboardReflowType"""
24+
# FIXME: construct object with mandatory attributes with example values
25+
# model = DashboardReflowType() # noqa: E501
26+
pass
27+
28+
29+
if __name__ == "__main__":
30+
unittest.main()

0 commit comments

Comments
 (0)