Skip to content

Commit 0c71f30

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 2a54e42 of spec repo (#459)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 9c045d5 commit 0c71f30

File tree

10 files changed

+369
-13
lines changed

10 files changed

+369
-13
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.dev8",
7-
"regenerated": "2021-05-27 15:02:08.337074",
8-
"spec_repo_commit": "5311d4c"
7+
"regenerated": "2021-05-28 09:09:08.991765",
8+
"spec_repo_commit": "2a54e42"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.1.dev8",
12-
"regenerated": "2021-05-27 15:02:36.422686",
13-
"spec_repo_commit": "5311d4c"
12+
"regenerated": "2021-05-28 09:09:36.666979",
13+
"spec_repo_commit": "2a54e42"
1414
}
1515
}
1616
}

docs/v1/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ Class | Method | HTTP request | Description
235235
*SyntheticsApi* | [**get_global_variable**](SyntheticsApi.md#get_global_variable) | **GET** /api/v1/synthetics/variables/{variable_id} | Get a global variable
236236
*SyntheticsApi* | [**get_private_location**](SyntheticsApi.md#get_private_location) | **GET** /api/v1/synthetics/private-locations/{location_id} | Get a private location
237237
*SyntheticsApi* | [**get_test**](SyntheticsApi.md#get_test) | **GET** /api/v1/synthetics/tests/{public_id} | Get a test configuration
238+
*SyntheticsApi* | [**list_global_variables**](SyntheticsApi.md#list_global_variables) | **GET** /api/v1/synthetics/variables | Get all global variables
238239
*SyntheticsApi* | [**list_locations**](SyntheticsApi.md#list_locations) | **GET** /api/v1/synthetics/locations | Get all locations (public and private)
239240
*SyntheticsApi* | [**list_tests**](SyntheticsApi.md#list_tests) | **GET** /api/v1/synthetics/tests | Get the list of all tests
240241
*SyntheticsApi* | [**trigger_ci_tests**](SyntheticsApi.md#trigger_ci_tests) | **POST** /api/v1/synthetics/tests/trigger/ci | Trigger tests from CI/CD pipelines
@@ -691,6 +692,7 @@ Class | Method | HTTP request | Description
691692
- [SyntheticsGlobalVariableParseTestOptionsType](SyntheticsGlobalVariableParseTestOptionsType.md)
692693
- [SyntheticsGlobalVariableParserType](SyntheticsGlobalVariableParserType.md)
693694
- [SyntheticsGlobalVariableValue](SyntheticsGlobalVariableValue.md)
695+
- [SyntheticsListGlobalVariablesResponse](SyntheticsListGlobalVariablesResponse.md)
694696
- [SyntheticsListTestsResponse](SyntheticsListTestsResponse.md)
695697
- [SyntheticsLocation](SyntheticsLocation.md)
696698
- [SyntheticsLocations](SyntheticsLocations.md)

docs/v1/SyntheticsApi.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Method | HTTP request | Description
2121
[**get_global_variable**](SyntheticsApi.md#get_global_variable) | **GET** /api/v1/synthetics/variables/{variable_id} | Get a global variable
2222
[**get_private_location**](SyntheticsApi.md#get_private_location) | **GET** /api/v1/synthetics/private-locations/{location_id} | Get a private location
2323
[**get_test**](SyntheticsApi.md#get_test) | **GET** /api/v1/synthetics/tests/{public_id} | Get a test configuration
24+
[**list_global_variables**](SyntheticsApi.md#list_global_variables) | **GET** /api/v1/synthetics/variables | Get all global variables
2425
[**list_locations**](SyntheticsApi.md#list_locations) | **GET** /api/v1/synthetics/locations | Get all locations (public and private)
2526
[**list_tests**](SyntheticsApi.md#list_tests) | **GET** /api/v1/synthetics/tests | Get the list of all tests
2627
[**trigger_ci_tests**](SyntheticsApi.md#trigger_ci_tests) | **POST** /api/v1/synthetics/tests/trigger/ci | Trigger tests from CI/CD pipelines
@@ -1466,6 +1467,67 @@ Name | Type | Description | Notes
14661467

14671468
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
14681469

1470+
# **list_global_variables**
1471+
> SyntheticsListGlobalVariablesResponse list_global_variables()
1472+
1473+
Get all global variables
1474+
1475+
Get the list of all Synthetics global variables.
1476+
1477+
### Example
1478+
1479+
* Api Key Authentication (apiKeyAuth):
1480+
* Api Key Authentication (appKeyAuth):
1481+
```python
1482+
import os
1483+
from dateutil.parser import parse as dateutil_parser
1484+
from datadog_api_client.v1 import ApiClient, ApiException, Configuration
1485+
from datadog_api_client.v1.api import synthetics_api
1486+
from datadog_api_client.v1.models import *
1487+
from pprint import pprint
1488+
# See configuration.py for a list of all supported configuration parameters.
1489+
configuration = Configuration()
1490+
1491+
# Enter a context with an instance of the API client
1492+
with ApiClient(configuration) as api_client:
1493+
# Create an instance of the API class
1494+
api_instance = synthetics_api.SyntheticsApi(api_client)
1495+
1496+
# example, this endpoint has no required or optional parameters
1497+
try:
1498+
# Get all global variables
1499+
api_response = api_instance.list_global_variables()
1500+
pprint(api_response)
1501+
except ApiException as e:
1502+
print("Exception when calling SyntheticsApi->list_global_variables: %s\n" % e)
1503+
```
1504+
1505+
1506+
### Parameters
1507+
This endpoint does not need any parameter.
1508+
1509+
### Return type
1510+
1511+
[**SyntheticsListGlobalVariablesResponse**](SyntheticsListGlobalVariablesResponse.md)
1512+
1513+
### Authorization
1514+
1515+
[apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth)
1516+
1517+
### HTTP request headers
1518+
1519+
- **Content-Type**: Not defined
1520+
- **Accept**: application/json
1521+
1522+
1523+
### HTTP response details
1524+
| Status code | Description | Response headers |
1525+
|-------------|-------------|------------------|
1526+
**200** | OK | - |
1527+
**403** | Forbidden | - |
1528+
1529+
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
1530+
14691531
# **list_locations**
14701532
> SyntheticsLocations list_locations()
14711533
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SyntheticsListGlobalVariablesResponse
2+
3+
Object containing an array of Synthetic global variables.
4+
5+
## Properties
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**variables** | [**[SyntheticsGlobalVariable]**](SyntheticsGlobalVariable.md) | Array of Synthetic global variables. | [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+

src/datadog_api_client/v1/api/synthetics_api.py

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
SyntheticsGetBrowserTestLatestResultsResponse,
3232
)
3333
from datadog_api_client.v1.model.synthetics_global_variable import SyntheticsGlobalVariable
34+
from datadog_api_client.v1.model.synthetics_list_global_variables_response import SyntheticsListGlobalVariablesResponse
3435
from datadog_api_client.v1.model.synthetics_list_tests_response import SyntheticsListTestsResponse
3536
from datadog_api_client.v1.model.synthetics_locations import SyntheticsLocations
3637
from datadog_api_client.v1.model.synthetics_private_location import SyntheticsPrivateLocation
@@ -767,6 +768,31 @@ def __init__(self, api_client=None):
767768
api_client=api_client,
768769
)
769770

771+
self._list_global_variables_endpoint = _Endpoint(
772+
settings={
773+
"response_type": (SyntheticsListGlobalVariablesResponse,),
774+
"auth": ["apiKeyAuth", "appKeyAuth"],
775+
"endpoint_path": "/api/v1/synthetics/variables",
776+
"operation_id": "list_global_variables",
777+
"http_method": "GET",
778+
"servers": None,
779+
},
780+
params_map={"all": [], "required": [], "nullable": [], "enum": [], "validation": []},
781+
root_map={
782+
"validations": {},
783+
"allowed_values": {},
784+
"openapi_types": {},
785+
"attribute_map": {},
786+
"location_map": {},
787+
"collection_format_map": {},
788+
},
789+
headers_map={
790+
"accept": ["application/json"],
791+
"content_type": [],
792+
},
793+
api_client=api_client,
794+
)
795+
770796
self._list_locations_endpoint = _Endpoint(
771797
settings={
772798
"response_type": (SyntheticsLocations,),
@@ -1764,6 +1790,46 @@ def get_test(self, public_id, **kwargs):
17641790
kwargs["public_id"] = public_id
17651791
return self._get_test_endpoint.call_with_http_info(**kwargs)
17661792

1793+
def list_global_variables(self, **kwargs):
1794+
"""Get all global variables # noqa: E501
1795+
1796+
Get the list of all Synthetics global variables. # noqa: E501
1797+
This method makes a synchronous HTTP request by default. To make an
1798+
asynchronous HTTP request, please pass async_req=True
1799+
1800+
>>> thread = api.list_global_variables(async_req=True)
1801+
>>> result = thread.get()
1802+
1803+
1804+
Keyword Args:
1805+
_return_http_data_only (bool): response data without head status
1806+
code and headers. Default is True.
1807+
_preload_content (bool): if False, the urllib3.HTTPResponse object
1808+
will be returned without reading/decoding response data.
1809+
Default is True.
1810+
_request_timeout (float/tuple): timeout setting for this request. If one
1811+
number provided, it will be total request timeout. It can also
1812+
be a pair (tuple) of (connection, read) timeouts.
1813+
Default is None.
1814+
_check_input_type (bool): specifies if type checking
1815+
should be done one the data sent to the server.
1816+
Default is True.
1817+
_check_return_type (bool): specifies if type checking
1818+
should be done one the data received from the server.
1819+
Default is True.
1820+
_host_index (int/None): specifies the index of the server
1821+
that we want to use.
1822+
Default is read from the configuration.
1823+
async_req (bool): execute request asynchronously
1824+
1825+
Returns:
1826+
SyntheticsListGlobalVariablesResponse
1827+
If the method is called asynchronously, returns the request
1828+
thread.
1829+
"""
1830+
kwargs = self._list_global_variables_endpoint.default_arguments(kwargs)
1831+
return self._list_global_variables_endpoint.call_with_http_info(**kwargs)
1832+
17671833
def list_locations(self, **kwargs):
17681834
"""Get all locations (public and private) # noqa: E501
17691835
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
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+
def lazy_import():
26+
from datadog_api_client.v1.model.synthetics_global_variable import SyntheticsGlobalVariable
27+
28+
globals()["SyntheticsGlobalVariable"] = SyntheticsGlobalVariable
29+
30+
31+
class SyntheticsListGlobalVariablesResponse(ModelNormal):
32+
"""NOTE: This class is auto generated by OpenAPI Generator.
33+
Ref: https://openapi-generator.tech
34+
35+
Do not edit the class manually.
36+
37+
Attributes:
38+
allowed_values (dict): The key is the tuple path to the attribute
39+
and the for var_name this is (var_name,). The value is a dict
40+
with a capitalized key describing the allowed value and an allowed
41+
value. These dicts store the allowed enum values.
42+
attribute_map (dict): The key is attribute name
43+
and the value is json key in definition.
44+
discriminator_value_class_map (dict): A dict to go from the discriminator
45+
variable value to the discriminator class name.
46+
validations (dict): The key is the tuple path to the attribute
47+
and the for var_name this is (var_name,). The value is a dict
48+
that stores validations for max_length, min_length, max_items,
49+
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
50+
inclusive_minimum, and regex.
51+
additional_properties_type (tuple): A tuple of classes accepted
52+
as additional properties values.
53+
"""
54+
55+
allowed_values = {}
56+
57+
validations = {}
58+
59+
additional_properties_type = None
60+
61+
_nullable = False
62+
63+
@cached_property
64+
def openapi_types():
65+
"""
66+
This must be a method because a model may have properties that are
67+
of type self, this must run after the class is loaded
68+
69+
Returns
70+
openapi_types (dict): The key is attribute name
71+
and the value is attribute type.
72+
"""
73+
lazy_import()
74+
return {
75+
"variables": ([SyntheticsGlobalVariable],), # noqa: E501
76+
}
77+
78+
@cached_property
79+
def discriminator():
80+
return None
81+
82+
attribute_map = {
83+
"variables": "variables", # noqa: E501
84+
}
85+
86+
_composed_schemas = {}
87+
88+
required_properties = set(
89+
[
90+
"_data_store",
91+
"_check_type",
92+
"_spec_property_naming",
93+
"_path_to_item",
94+
"_configuration",
95+
"_visited_composed_classes",
96+
]
97+
)
98+
99+
@convert_js_args_to_python_args
100+
def __init__(self, *args, **kwargs): # noqa: E501
101+
"""SyntheticsListGlobalVariablesResponse - a model defined in OpenAPI
102+
103+
Keyword Args:
104+
_check_type (bool): if True, values for parameters in openapi_types
105+
will be type checked and a TypeError will be
106+
raised if the wrong type is input.
107+
Defaults to True
108+
_path_to_item (tuple/list): This is a list of keys or values to
109+
drill down to the model in received_data
110+
when deserializing a response
111+
_spec_property_naming (bool): True if the variable names in the input data
112+
are serialized names, as specified in the OpenAPI document.
113+
False if the variable names in the input data
114+
are pythonic names, e.g. snake case (default)
115+
_configuration (Configuration): the instance to use when
116+
deserializing a file_type parameter.
117+
If passed, type conversion is attempted
118+
If omitted no type conversion is done.
119+
_visited_composed_classes (tuple): This stores a tuple of
120+
classes that we have traveled through so that
121+
if we see that class again we will not use its
122+
discriminator again.
123+
When traveling through a discriminator, the
124+
composed schema that is
125+
is traveled through is added to this set.
126+
For example if Animal has a discriminator
127+
petType and we pass in "Dog", and the class Dog
128+
allOf includes Animal, we move through Animal
129+
once using the discriminator, and pick Dog.
130+
Then in Dog, we will make an instance of the
131+
Animal class but this time we won't travel
132+
through its discriminator because we passed in
133+
_visited_composed_classes = (Animal,)
134+
variables ([SyntheticsGlobalVariable]): Array of Synthetic global variables.. [optional] # noqa: E501
135+
"""
136+
137+
_check_type = kwargs.pop("_check_type", True)
138+
_spec_property_naming = kwargs.pop("_spec_property_naming", False)
139+
_path_to_item = kwargs.pop("_path_to_item", ())
140+
_configuration = kwargs.pop("_configuration", None)
141+
_visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
142+
143+
if args:
144+
raise ApiTypeError(
145+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
146+
% (
147+
args,
148+
self.__class__.__name__,
149+
),
150+
path_to_item=_path_to_item,
151+
valid_classes=(self.__class__,),
152+
)
153+
154+
self._data_store = {}
155+
self._check_type = _check_type
156+
self._spec_property_naming = _spec_property_naming
157+
self._path_to_item = _path_to_item
158+
self._configuration = _configuration
159+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
160+
161+
for var_name, var_value in kwargs.items():
162+
if (
163+
var_name not in self.attribute_map
164+
and self._configuration is not None
165+
and self._configuration.discard_unknown_keys
166+
and self.additional_properties_type is None
167+
):
168+
# discard variable.
169+
continue
170+
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
@@ -443,6 +443,7 @@
443443
)
444444
from datadog_api_client.v1.model.synthetics_global_variable_parser_type import SyntheticsGlobalVariableParserType
445445
from datadog_api_client.v1.model.synthetics_global_variable_value import SyntheticsGlobalVariableValue
446+
from datadog_api_client.v1.model.synthetics_list_global_variables_response import SyntheticsListGlobalVariablesResponse
446447
from datadog_api_client.v1.model.synthetics_list_tests_response import SyntheticsListTestsResponse
447448
from datadog_api_client.v1.model.synthetics_location import SyntheticsLocation
448449
from datadog_api_client.v1.model.synthetics_locations import SyntheticsLocations

0 commit comments

Comments
 (0)