Skip to content

Commit c13c7a4

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 95807f2 of spec repo (#319)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 4e425cb commit c13c7a4

13 files changed

+330
-43
lines changed

.apigentools-info

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
"info_version": "2",
44
"spec_versions": {
55
"v1": {
6-
"apigentools_version": "1.4.1.dev8",
7-
"regenerated": "2021-03-08 20:18:53.690166",
8-
"spec_repo_commit": "9a30209"
6+
"apigentools_version": "1.4.1.dev6",
7+
"regenerated": "2021-03-12 10:38:27.522185",
8+
"spec_repo_commit": "95807f2"
99
},
1010
"v2": {
11-
"apigentools_version": "1.4.1.dev8",
12-
"regenerated": "2021-03-08 20:19:27.232217",
13-
"spec_repo_commit": "9a30209"
11+
"apigentools_version": "1.4.1.dev6",
12+
"regenerated": "2021-03-12 10:39:09.334271",
13+
"spec_repo_commit": "95807f2"
1414
}
1515
}
1616
}

docs/README.md

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,9 @@ This repository contains a Python API client for the [Datadog API](https://docs.
44
The code is generated using [openapi-generator](https://github.com/OpenAPITools/openapi-generator)
55
and [apigentools](https://github.com/DataDog/apigentools).
66

7-
Datadog API Collection
8-
9-
- API version: 1.0
10-
11-
Collection of all Datadog Public endpoints.
12-
13-
For more information, please visit [https://www.datadoghq.com/support/](https://www.datadoghq.com/support/)
14-
15-
*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)*
16-
177
## Requirements
188

19-
Building and using the API client library requires:
20-
21-
1. Python 3.6+
9+
Building and using the API client library requires [Python 3.6+](https://www.python.org/downloads/).
2210

2311
## Installation
2412

@@ -95,7 +83,9 @@ where `<OperationName>` is the name of the method used to interact with that end
9583

9684
## Documentation for API Endpoints and Models
9785

98-
Documentation for API endpoints and models can be found under the [`docs`](/docs) directory.
86+
Documentation for API endpoints and models can be found under the docs subdirectories, in [v1](/docs/v1#documentation-for-api-endpoints) and [v2](/docs/v2#documentation-for-api-endpoints).
87+
88+
It's also available on [readthedocs](https://datadog-api-client.readthedocs.io/).
9989

10090
## Documentation for Authorization
10191

docs/v1/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,7 @@ Class | Method | HTTP request | Description
531531
- [SLOCorrectionUpdateRequest](SLOCorrectionUpdateRequest.md)
532532
- [SLOCorrectionUpdateRequestAttributes](SLOCorrectionUpdateRequestAttributes.md)
533533
- [SLODeleteResponse](SLODeleteResponse.md)
534+
- [SLOErrorBudgetRemainingData](SLOErrorBudgetRemainingData.md)
534535
- [SLOErrorTimeframe](SLOErrorTimeframe.md)
535536
- [SLOHistoryMetrics](SLOHistoryMetrics.md)
536537
- [SLOHistoryMetricsSeries](SLOHistoryMetricsSeries.md)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SLOErrorBudgetRemainingData
2+
3+
A mapping of threshold `timeframe` to the remaining error budget.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**any string name** | **float** | any string name can be used but the value must be the correct type | [optional]
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+

docs/v1/SLOHistoryMetrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SLOHistoryMetrics
22

3-
A `metric` based SLO history response.
3+
A `metric` based SLO history response. This is not included in responses for `monitor` based SLOs.
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------

docs/v1/SLOHistoryResponseData.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ An array of service level objective objects.
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**from_ts** | **int** | The &#x60;from&#x60; timestamp in epoch seconds. | [optional]
8-
**groups** | [**SLOHistorySLIData**](SLOHistorySLIData.md) | | [optional]
8+
**group_by** | **[str]** | For &#x60;metric&#x60; based SLOs where the query includes a group-by clause, this represents the list of grouping parameters. This is not included in responses for &#x60;monitor&#x60; based SLOs. | [optional]
9+
**groups** | [**[SLOHistorySLIData]**](SLOHistorySLIData.md) | For grouped SLOs, this represents SLI data for specific groups. This is not included in the responses for &#x60;metric&#x60; based SLOs. | [optional]
10+
**monitors** | [**[SLOHistorySLIData]**](SLOHistorySLIData.md) | For multi-monitor SLOs, this represents SLI data for specific monitors. This is not included in the responses for &#x60;metric&#x60; based SLOs. | [optional]
911
**overall** | [**SLOHistorySLIData**](SLOHistorySLIData.md) | | [optional]
1012
**series** | [**SLOHistoryMetrics**](SLOHistoryMetrics.md) | | [optional]
1113
**thresholds** | [**{str: (SLOThreshold,)}**](SLOThreshold.md) | mapping of string timeframe to the SLO threshold. | [optional]

docs/v1/SLOHistorySLIData.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
# SLOHistorySLIData
22

3-
An object that holds an SLI value and its associated data. It can represent an SLO's overall SLI value or the SLI value for a specific monitor (in multi-monitor SLOs) or group (in grouped SLOs). The uptime history is included for monitor SLOs.
3+
An object that holds an SLI value and its associated data. It can represent an SLO's overall SLI value. This can also represent the SLI value for a specific monitor in multi-monitor SLOs, or a group in grouped SLOs.
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7+
**error_budget_remaining** | [**SLOErrorBudgetRemainingData**](SLOErrorBudgetRemainingData.md) | | [optional]
8+
**errors** | [**[SLOHistoryResponseError]**](SLOHistoryResponseError.md) | A list of errors while querying the history data for the service level objective. | [optional]
9+
**group** | **str** | For groups in a grouped SLO, this is the group name. | [optional]
710
**history** | **[[float]]** | For &#x60;monitor&#x60; based SLOs, this includes the aggregated history uptime time series. | [optional]
8-
**name** | **str** | For groups in a grouped SLO this is the group name. For monitors in a multi-monitor SLO this is the monitor name. | [optional]
11+
**monitor_modified** | **int** | For &#x60;monitor&#x60; based SLOs, this is the last modified timestamp in epoch seconds of the monitor. | [optional]
12+
**monitor_type** | **str** | For &#x60;monitor&#x60; based SLOs, this describes the type of monitor. | [optional]
13+
**name** | **str** | For groups in a grouped SLO, this is the group name. For monitors in a multi-monitor SLO, this is the monitor name. | [optional]
914
**precision** | **{str: (float,)}** | A mapping of threshold &#x60;timeframe&#x60; to number of accurate decimals, regardless of the from &amp;&amp; to timestamp. | [optional]
10-
**preview** | **bool** | For &#x60;monitor&#x60; based SLOs when &#x60;true&#x60; this indicates that a replay is in progress to give an accurate uptime calculation. | [optional]
15+
**preview** | **bool** | For &#x60;monitor&#x60; based SLOs, when &#x60;true&#x60; this indicates that a replay is in progress to give an accurate uptime calculation. | [optional]
1116
**sli_value** | **float** | The current SLI value of the SLO over the history window. | [optional]
1217
**span_precision** | **float** | The amount of decimal places the SLI value is accurate to for the given from &#x60;&amp;&amp;&#x60; to timestamp. | [optional]
13-
**uptime** | **float** | Deprecated. Use &#x60;sli_value&#x60; instead. | [optional]
18+
**uptime** | **float** | Use &#x60;sli_value&#x60; instead. | [optional]
1419

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

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

src/datadog_api_client/v1/model/slo_history_response_data.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ def openapi_types():
8181
lazy_import()
8282
return {
8383
"from_ts": (int,), # noqa: E501
84-
"groups": (SLOHistorySLIData,), # noqa: E501
84+
"group_by": ([str],), # noqa: E501
85+
"groups": ([SLOHistorySLIData],), # noqa: E501
86+
"monitors": ([SLOHistorySLIData],), # noqa: E501
8587
"overall": (SLOHistorySLIData,), # noqa: E501
8688
"series": (SLOHistoryMetrics,), # noqa: E501
8789
"thresholds": ({str: (SLOThreshold,)},), # noqa: E501
@@ -96,7 +98,9 @@ def discriminator():
9698

9799
attribute_map = {
98100
"from_ts": "from_ts", # noqa: E501
101+
"group_by": "group_by", # noqa: E501
99102
"groups": "groups", # noqa: E501
103+
"monitors": "monitors", # noqa: E501
100104
"overall": "overall", # noqa: E501
101105
"series": "series", # noqa: E501
102106
"thresholds": "thresholds", # noqa: E501
@@ -154,7 +158,9 @@ def __init__(self, *args, **kwargs): # noqa: E501
154158
through its discriminator because we passed in
155159
_visited_composed_classes = (Animal,)
156160
from_ts (int): The `from` timestamp in epoch seconds.. [optional] # noqa: E501
157-
groups (SLOHistorySLIData): [optional] # noqa: E501
161+
group_by ([str]): For `metric` based SLOs where the query includes a group-by clause, this represents the list of grouping parameters. This is not included in responses for `monitor` based SLOs.. [optional] # noqa: E501
162+
groups ([SLOHistorySLIData]): For grouped SLOs, this represents SLI data for specific groups. This is not included in the responses for `metric` based SLOs.. [optional] # noqa: E501
163+
monitors ([SLOHistorySLIData]): For multi-monitor SLOs, this represents SLI data for specific monitors. This is not included in the responses for `metric` based SLOs.. [optional] # noqa: E501
158164
overall (SLOHistorySLIData): [optional] # noqa: E501
159165
series (SLOHistoryMetrics): [optional] # noqa: E501
160166
thresholds ({str: (SLOThreshold,)}): mapping of string timeframe to the SLO threshold.. [optional] # noqa: E501

0 commit comments

Comments
 (0)