Skip to content

Commit d243324

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 39d6d27 of spec repo (#214)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 7b33751 commit d243324

19 files changed

+972
-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": "2021-01-05 13:36:27.580592",
8-
"spec_repo_commit": "ef664a9"
7+
"regenerated": "2021-01-08 12:36:38.878845",
8+
"spec_repo_commit": "39d6d27"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.1.dev2",
12-
"regenerated": "2021-01-05 13:36:39.121199",
13-
"spec_repo_commit": "ef664a9"
12+
"regenerated": "2021-01-08 12:36:49.407240",
13+
"spec_repo_commit": "39d6d27"
1414
}
1515
}
1616
}

docs/v1/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,10 @@ Class | Method | HTTP request | Description
559559
- [SyntheticsGetAPITestLatestResultsResponse](SyntheticsGetAPITestLatestResultsResponse.md)
560560
- [SyntheticsGetBrowserTestLatestResultsResponse](SyntheticsGetBrowserTestLatestResultsResponse.md)
561561
- [SyntheticsGlobalVariable](SyntheticsGlobalVariable.md)
562+
- [SyntheticsGlobalVariableParseTestOptions](SyntheticsGlobalVariableParseTestOptions.md)
563+
- [SyntheticsGlobalVariableParseTestOptionsParser](SyntheticsGlobalVariableParseTestOptionsParser.md)
564+
- [SyntheticsGlobalVariableParseTestOptionsType](SyntheticsGlobalVariableParseTestOptionsType.md)
565+
- [SyntheticsGlobalVariableParserType](SyntheticsGlobalVariableParserType.md)
562566
- [SyntheticsGlobalVariableValue](SyntheticsGlobalVariableValue.md)
563567
- [SyntheticsListTestsResponse](SyntheticsListTestsResponse.md)
564568
- [SyntheticsLocation](SyntheticsLocation.md)

docs/v1/SyntheticsApi.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ with datadog_api_client.v1.ApiClient(configuration) as api_client:
7676
description="Example description",
7777
id="id_example",
7878
name="MY_VARIABLE",
79+
parse_test_options=SyntheticsGlobalVariableParseTestOptions(
80+
parser=SyntheticsGlobalVariableParseTestOptionsParser(
81+
type=SyntheticsGlobalVariableParserType("raw"),
82+
value="value_example",
83+
),
84+
type=SyntheticsGlobalVariableParseTestOptionsType("http_body"),
85+
),
86+
parse_test_public_id="abc-def-123",
7987
tags=["team:front","test:workflow-1"],
8088
value=SyntheticsGlobalVariableValue(
8189
secure=True,
@@ -696,6 +704,14 @@ with datadog_api_client.v1.ApiClient(configuration) as api_client:
696704
description="Example description",
697705
id="id_example",
698706
name="MY_VARIABLE",
707+
parse_test_options=SyntheticsGlobalVariableParseTestOptions(
708+
parser=SyntheticsGlobalVariableParseTestOptionsParser(
709+
type=SyntheticsGlobalVariableParserType("raw"),
710+
value="value_example",
711+
),
712+
type=SyntheticsGlobalVariableParseTestOptionsType("http_body"),
713+
),
714+
parse_test_public_id="abc-def-123",
699715
tags=["team:front","test:workflow-1"],
700716
value=SyntheticsGlobalVariableValue(
701717
secure=True,

docs/v1/SyntheticsGlobalVariable.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Name | Type | Description | Notes
99
**tags** | **[str]** | Tags of the global variable. |
1010
**value** | [**SyntheticsGlobalVariableValue**](SyntheticsGlobalVariableValue.md) | |
1111
**id** | **str** | Unique identifier of the global variable. | [optional] [readonly]
12+
**parse_test_options** | [**SyntheticsGlobalVariableParseTestOptions**](SyntheticsGlobalVariableParseTestOptions.md) | | [optional]
13+
**parse_test_public_id** | **str** | A Synthetic test ID to use as a test to generate the variable value. | [optional]
1214

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SyntheticsGlobalVariableParseTestOptions
2+
3+
Parser options to use for retrieving a Synthetics global variable from a Synthetics Test. Used in conjunction with `parse_test_public_id`.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**parser** | [**SyntheticsGlobalVariableParseTestOptionsParser**](SyntheticsGlobalVariableParseTestOptionsParser.md) | |
8+
**type** | [**SyntheticsGlobalVariableParseTestOptionsType**](SyntheticsGlobalVariableParseTestOptionsType.md) | |
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: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SyntheticsGlobalVariableParseTestOptionsParser
2+
3+
Details of the parser to use for the global variable.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**type** | [**SyntheticsGlobalVariableParserType**](SyntheticsGlobalVariableParserType.md) | |
8+
**value** | **str** | Regex or JSON path used for the parser. Not used with type &#x60;raw&#x60;. | [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+
# SyntheticsGlobalVariableParseTestOptionsType
2+
3+
Property of the Synthetics Test Response to use for a Synthetics global variable.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**value** | **str** | Property of the Synthetics Test Response to use for a Synthetics global variable. | must be one of ["http_body", "http_header", ]
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+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SyntheticsGlobalVariableParserType
2+
3+
Type of parser for a Synthetics global variable from a synthetics test.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**value** | **str** | Type of parser for a Synthetics global variable from a synthetics test. | must be one of ["raw", "json_path", "regex", ]
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+

src/datadog_api_client/v1/model/synthetics_global_variable.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
)
2525

2626
def lazy_import():
27+
from datadog_api_client.v1.model.synthetics_global_variable_parse_test_options import SyntheticsGlobalVariableParseTestOptions
2728
from datadog_api_client.v1.model.synthetics_global_variable_value import SyntheticsGlobalVariableValue
29+
globals()['SyntheticsGlobalVariableParseTestOptions'] = SyntheticsGlobalVariableParseTestOptions
2830
globals()['SyntheticsGlobalVariableValue'] = SyntheticsGlobalVariableValue
2931

3032

@@ -79,6 +81,8 @@ def openapi_types():
7981
'tags': ([str],), # noqa: E501
8082
'value': (SyntheticsGlobalVariableValue,), # noqa: E501
8183
'id': (str,), # noqa: E501
84+
'parse_test_options': (SyntheticsGlobalVariableParseTestOptions,), # noqa: E501
85+
'parse_test_public_id': (str,), # noqa: E501
8286
}
8387

8488
@cached_property
@@ -92,6 +96,8 @@ def discriminator():
9296
'tags': 'tags', # noqa: E501
9397
'value': 'value', # noqa: E501
9498
'id': 'id', # noqa: E501
99+
'parse_test_options': 'parse_test_options', # noqa: E501
100+
'parse_test_public_id': 'parse_test_public_id', # noqa: E501
95101
}
96102

97103
_composed_schemas = {}
@@ -147,6 +153,8 @@ def __init__(self, description, name, tags, value, *args, **kwargs): # noqa: E5
147153
through its discriminator because we passed in
148154
_visited_composed_classes = (Animal,)
149155
id (str): Unique identifier of the global variable.. [optional] # noqa: E501
156+
parse_test_options (SyntheticsGlobalVariableParseTestOptions): [optional] # noqa: E501
157+
parse_test_public_id (str): A Synthetic test ID to use as a test to generate the variable value.. [optional] # noqa: E501
150158
"""
151159

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

0 commit comments

Comments
 (0)