Skip to content

Commit 6bbb46c

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 8d8238a of spec repo (#428)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 465a265 commit 6bbb46c

File tree

9 files changed

+327
-10
lines changed

9 files changed

+327
-10
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-05-10 15:34:45.998508",
8-
"spec_repo_commit": "8176bfc"
7+
"regenerated": "2021-05-11 08:04:56.875189",
8+
"spec_repo_commit": "8d8238a"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.1.dev6",
12-
"regenerated": "2021-05-10 15:35:15.650080",
13-
"spec_repo_commit": "8176bfc"
12+
"regenerated": "2021-05-11 08:05:25.253365",
13+
"spec_repo_commit": "8d8238a"
1414
}
1515
}
1616
}

docs/v1/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,7 @@ Class | Method | HTTP request | Description
700700
- [UsageAttributionPagination](UsageAttributionPagination.md)
701701
- [UsageAttributionResponse](UsageAttributionResponse.md)
702702
- [UsageAttributionSort](UsageAttributionSort.md)
703+
- [UsageAttributionSupportedMetrics](UsageAttributionSupportedMetrics.md)
703704
- [UsageAttributionTagNames](UsageAttributionTagNames.md)
704705
- [UsageAttributionValues](UsageAttributionValues.md)
705706
- [UsageBillableSummaryBody](UsageBillableSummaryBody.md)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# UsageAttributionSupportedMetrics
2+
3+
Supported fields for usage attribution requests (valid requests contain one or more metrics, or `*` for all).
4+
5+
## Properties
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**value** | **str** | Supported fields for usage attribution requests (valid requests contain one or more metrics, or &#x60;*&#x60; for all). | must be one of ["custom_timeseries_usage", "container_usage", "snmp_percentage", "apm_host_usage", "browser_usage", "npm_host_percentage", "infra_host_usage", "custom_timeseries_percentage", "container_percentage", "lambda_usage", "api_usage", "apm_host_percentage", "infra_host_percentage", "snmp_usage", "browser_percentage", "api_percentage", "lambda_percentage", "npm_host_usage", "lambda_functions_usage", "lambda_functions_percentage", "lambda_invocations_usage", "lambda_invocations_percentage", "fargate_usage", "fargate_percentage", "profiled_host_usage", "profiled_host_percentage", "profiled_container_usage", "profiled_container_percentage", "*", ]
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/UsageMeteringApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ with ApiClient(configuration) as api_client:
653653
# Create an instance of the API class
654654
api_instance = usage_metering_api.UsageMeteringApi(api_client)
655655
start_month = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage beginning in this month. Maximum of 15 months ago.
656-
fields = "fields_example" # str | The specified field to search results for.
656+
fields = UsageAttributionSupportedMetrics("custom_timeseries_usage") # UsageAttributionSupportedMetrics | Comma-separated list of usage types to return, or `*` for all usage types.
657657
end_month = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage ending this month. (optional)
658658
sort_direction = UsageSortDirection("desc") # UsageSortDirection | The direction to sort by: `[desc, asc]`. (optional)
659659
sort_name = UsageAttributionSort("custom_timeseries_usage") # UsageAttributionSort | The field to sort by. (optional)
@@ -682,7 +682,7 @@ with ApiClient(configuration) as api_client:
682682
Name | Type | Description | Notes
683683
------------- | ------------- | ------------- | -------------
684684
**start_month** | **datetime**| Datetime in ISO-8601 format, UTC, precise to month: &#x60;[YYYY-MM]&#x60; for usage beginning in this month. Maximum of 15 months ago. |
685-
**fields** | **str**| The specified field to search results for. |
685+
**fields** | **UsageAttributionSupportedMetrics**| Comma-separated list of usage types to return, or &#x60;*&#x60; for all usage types. |
686686
**end_month** | **datetime**| Datetime in ISO-8601 format, UTC, precise to month: &#x60;[YYYY-MM]&#x60; for usage ending this month. | [optional]
687687
**sort_direction** | **UsageSortDirection**| The direction to sort by: &#x60;[desc, asc]&#x60;. | [optional]
688688
**sort_name** | **UsageAttributionSort**| The field to sort by. | [optional]

src/datadog_api_client/v1/api/usage_metering_api.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from datadog_api_client.v1.model.usage_analyzed_logs_response import UsageAnalyzedLogsResponse
2121
from datadog_api_client.v1.model.usage_attribution_response import UsageAttributionResponse
2222
from datadog_api_client.v1.model.usage_attribution_sort import UsageAttributionSort
23+
from datadog_api_client.v1.model.usage_attribution_supported_metrics import UsageAttributionSupportedMetrics
2324
from datadog_api_client.v1.model.usage_billable_summary_response import UsageBillableSummaryResponse
2425
from datadog_api_client.v1.model.usage_compliance_response import UsageComplianceResponse
2526
from datadog_api_client.v1.model.usage_custom_reports_response import UsageCustomReportsResponse
@@ -457,7 +458,7 @@ def __init__(self, api_client=None):
457458
"allowed_values": {},
458459
"openapi_types": {
459460
"start_month": (datetime,),
460-
"fields": (str,),
461+
"fields": (UsageAttributionSupportedMetrics,),
461462
"end_month": (datetime,),
462463
"sort_direction": (UsageSortDirection,),
463464
"sort_name": (UsageAttributionSort,),
@@ -1860,7 +1861,7 @@ def get_usage_attribution(self, start_month, fields, **kwargs):
18601861
18611862
Args:
18621863
start_month (datetime): Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage beginning in this month. Maximum of 15 months ago.
1863-
fields (str): The specified field to search results for.
1864+
fields (UsageAttributionSupportedMetrics): Comma-separated list of usage types to return, or `*` for all usage types.
18641865
18651866
Keyword Args:
18661867
end_month (datetime): Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage ending this month.. [optional]
Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
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 UsageAttributionSupportedMetrics(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+
"CUSTOM_TIMESERIES_USAGE": "custom_timeseries_usage",
48+
"CONTAINER_USAGE": "container_usage",
49+
"SNMP_PERCENTAGE": "snmp_percentage",
50+
"APM_HOST_USAGE": "apm_host_usage",
51+
"BROWSER_USAGE": "browser_usage",
52+
"NPM_HOST_PERCENTAGE": "npm_host_percentage",
53+
"INFRA_HOST_USAGE": "infra_host_usage",
54+
"CUSTOM_TIMESERIES_PERCENTAGE": "custom_timeseries_percentage",
55+
"CONTAINER_PERCENTAGE": "container_percentage",
56+
"LAMBDA_USAGE": "lambda_usage",
57+
"API_USAGE": "api_usage",
58+
"APM_HOST_PERCENTAGE": "apm_host_percentage",
59+
"INFRA_HOST_PERCENTAGE": "infra_host_percentage",
60+
"SNMP_USAGE": "snmp_usage",
61+
"BROWSER_PERCENTAGE": "browser_percentage",
62+
"API_PERCENTAGE": "api_percentage",
63+
"LAMBDA_PERCENTAGE": "lambda_percentage",
64+
"NPM_HOST_USAGE": "npm_host_usage",
65+
"LAMBDA_FUNCTIONS_USAGE": "lambda_functions_usage",
66+
"LAMBDA_FUNCTIONS_PERCENTAGE": "lambda_functions_percentage",
67+
"LAMBDA_INVOCATIONS_USAGE": "lambda_invocations_usage",
68+
"LAMBDA_INVOCATIONS_PERCENTAGE": "lambda_invocations_percentage",
69+
"FARGATE_USAGE": "fargate_usage",
70+
"FARGATE_PERCENTAGE": "fargate_percentage",
71+
"PROFILED_HOST_USAGE": "profiled_host_usage",
72+
"PROFILED_HOST_PERCENTAGE": "profiled_host_percentage",
73+
"PROFILED_CONTAINER_USAGE": "profiled_container_usage",
74+
"PROFILED_CONTAINER_PERCENTAGE": "profiled_container_percentage",
75+
"ALL": "*",
76+
},
77+
}
78+
79+
validations = {}
80+
81+
additional_properties_type = None
82+
83+
_nullable = False
84+
85+
@cached_property
86+
def openapi_types():
87+
"""
88+
This must be a method because a model may have properties that are
89+
of type self, this must run after the class is loaded
90+
91+
Returns
92+
openapi_types (dict): The key is attribute name
93+
and the value is attribute type.
94+
"""
95+
return {
96+
"value": (str,),
97+
}
98+
99+
@cached_property
100+
def discriminator():
101+
return None
102+
103+
attribute_map = {}
104+
105+
_composed_schemas = None
106+
107+
required_properties = set(
108+
[
109+
"_data_store",
110+
"_check_type",
111+
"_spec_property_naming",
112+
"_path_to_item",
113+
"_configuration",
114+
"_visited_composed_classes",
115+
]
116+
)
117+
118+
@convert_js_args_to_python_args
119+
def __init__(self, *args, **kwargs):
120+
"""UsageAttributionSupportedMetrics - a model defined in OpenAPI
121+
122+
Note that value can be passed either in args or in kwargs, but not in both.
123+
124+
Args:
125+
args[0] (str): Supported fields for usage attribution requests (valid requests contain one or more metrics, or `*` for all).., must be one of ["custom_timeseries_usage", "container_usage", "snmp_percentage", "apm_host_usage", "browser_usage", "npm_host_percentage", "infra_host_usage", "custom_timeseries_percentage", "container_percentage", "lambda_usage", "api_usage", "apm_host_percentage", "infra_host_percentage", "snmp_usage", "browser_percentage", "api_percentage", "lambda_percentage", "npm_host_usage", "lambda_functions_usage", "lambda_functions_percentage", "lambda_invocations_usage", "lambda_invocations_percentage", "fargate_usage", "fargate_percentage", "profiled_host_usage", "profiled_host_percentage", "profiled_container_usage", "profiled_container_percentage", "*", ] # noqa: E501
126+
127+
Keyword Args:
128+
value (str): Supported fields for usage attribution requests (valid requests contain one or more metrics, or `*` for all).., must be one of ["custom_timeseries_usage", "container_usage", "snmp_percentage", "apm_host_usage", "browser_usage", "npm_host_percentage", "infra_host_usage", "custom_timeseries_percentage", "container_percentage", "lambda_usage", "api_usage", "apm_host_percentage", "infra_host_percentage", "snmp_usage", "browser_percentage", "api_percentage", "lambda_percentage", "npm_host_usage", "lambda_functions_usage", "lambda_functions_percentage", "lambda_invocations_usage", "lambda_invocations_percentage", "fargate_usage", "fargate_percentage", "profiled_host_usage", "profiled_host_percentage", "profiled_container_usage", "profiled_container_percentage", "*", ] # noqa: E501
129+
_check_type (bool): if True, values for parameters in openapi_types
130+
will be type checked and a TypeError will be
131+
raised if the wrong type is input.
132+
Defaults to True
133+
_path_to_item (tuple/list): This is a list of keys or values to
134+
drill down to the model in received_data
135+
when deserializing a response
136+
_spec_property_naming (bool): True if the variable names in the input data
137+
are serialized names, as specified in the OpenAPI document.
138+
False if the variable names in the input data
139+
are pythonic names, e.g. snake case (default)
140+
_configuration (Configuration): the instance to use when
141+
deserializing a file_type parameter.
142+
If passed, type conversion is attempted
143+
If omitted no type conversion is done.
144+
_visited_composed_classes (tuple): This stores a tuple of
145+
classes that we have traveled through so that
146+
if we see that class again we will not use its
147+
discriminator again.
148+
When traveling through a discriminator, the
149+
composed schema that is
150+
is traveled through is added to this set.
151+
For example if Animal has a discriminator
152+
petType and we pass in "Dog", and the class Dog
153+
allOf includes Animal, we move through Animal
154+
once using the discriminator, and pick Dog.
155+
Then in Dog, we will make an instance of the
156+
Animal class but this time we won't travel
157+
through its discriminator because we passed in
158+
_visited_composed_classes = (Animal,)
159+
"""
160+
# required up here when default value is not given
161+
_path_to_item = kwargs.pop("_path_to_item", ())
162+
163+
if "value" in kwargs:
164+
value = kwargs.pop("value")
165+
elif args:
166+
args = list(args)
167+
value = args.pop(0)
168+
else:
169+
raise ApiTypeError(
170+
"value is required, but not passed in args or kwargs and doesn't have default",
171+
path_to_item=_path_to_item,
172+
valid_classes=(self.__class__,),
173+
)
174+
175+
_check_type = kwargs.pop("_check_type", True)
176+
_spec_property_naming = kwargs.pop("_spec_property_naming", False)
177+
_configuration = kwargs.pop("_configuration", None)
178+
_visited_composed_classes = kwargs.pop("_visited_composed_classes", ())
179+
180+
if args:
181+
raise ApiTypeError(
182+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments."
183+
% (
184+
args,
185+
self.__class__.__name__,
186+
),
187+
path_to_item=_path_to_item,
188+
valid_classes=(self.__class__,),
189+
)
190+
191+
self._data_store = {}
192+
self._check_type = _check_type
193+
self._spec_property_naming = _spec_property_naming
194+
self._path_to_item = _path_to_item
195+
self._configuration = _configuration
196+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
197+
self.value = value
198+
if kwargs:
199+
raise ApiTypeError(
200+
"Invalid named arguments=%s passed to %s. Remove those invalid named arguments."
201+
% (
202+
kwargs,
203+
self.__class__.__name__,
204+
),
205+
path_to_item=_path_to_item,
206+
valid_classes=(self.__class__,),
207+
)

src/datadog_api_client/v1/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,7 @@
469469
from datadog_api_client.v1.model.usage_attribution_pagination import UsageAttributionPagination
470470
from datadog_api_client.v1.model.usage_attribution_response import UsageAttributionResponse
471471
from datadog_api_client.v1.model.usage_attribution_sort import UsageAttributionSort
472+
from datadog_api_client.v1.model.usage_attribution_supported_metrics import UsageAttributionSupportedMetrics
472473
from datadog_api_client.v1.model.usage_attribution_tag_names import UsageAttributionTagNames
473474
from datadog_api_client.v1.model.usage_attribution_values import UsageAttributionValues
474475
from datadog_api_client.v1.model.usage_billable_summary_body import UsageBillableSummaryBody

src/datadog_api_client/v1/openapi.yaml

Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9465,6 +9465,70 @@ components:
94659465
- LAMBDA_INVOCATIONS_PERCENTAGE
94669466
- LAMBDA_USAGE
94679467
- LAMBDA_PERCENTAGE
9468+
UsageAttributionSupportedMetrics:
9469+
description: Supported fields for usage attribution requests (valid requests
9470+
contain one or more metrics, or `*` for all).
9471+
enum:
9472+
- custom_timeseries_usage
9473+
- container_usage
9474+
- snmp_percentage
9475+
- apm_host_usage
9476+
- browser_usage
9477+
- npm_host_percentage
9478+
- infra_host_usage
9479+
- custom_timeseries_percentage
9480+
- container_percentage
9481+
- lambda_usage
9482+
- api_usage
9483+
- apm_host_percentage
9484+
- infra_host_percentage
9485+
- snmp_usage
9486+
- browser_percentage
9487+
- api_percentage
9488+
- lambda_percentage
9489+
- npm_host_usage
9490+
- lambda_functions_usage
9491+
- lambda_functions_percentage
9492+
- lambda_invocations_usage
9493+
- lambda_invocations_percentage
9494+
- fargate_usage
9495+
- fargate_percentage
9496+
- profiled_host_usage
9497+
- profiled_host_percentage
9498+
- profiled_container_usage
9499+
- profiled_container_percentage
9500+
- '*'
9501+
type: string
9502+
x-enum-varnames:
9503+
- CUSTOM_TIMESERIES_USAGE
9504+
- CONTAINER_USAGE
9505+
- SNMP_PERCENTAGE
9506+
- APM_HOST_USAGE
9507+
- BROWSER_USAGE
9508+
- NPM_HOST_PERCENTAGE
9509+
- INFRA_HOST_USAGE
9510+
- CUSTOM_TIMESERIES_PERCENTAGE
9511+
- CONTAINER_PERCENTAGE
9512+
- LAMBDA_USAGE
9513+
- API_USAGE
9514+
- APM_HOST_PERCENTAGE
9515+
- INFRA_HOST_PERCENTAGE
9516+
- SNMP_USAGE
9517+
- BROWSER_PERCENTAGE
9518+
- API_PERCENTAGE
9519+
- LAMBDA_PERCENTAGE
9520+
- NPM_HOST_USAGE
9521+
- LAMBDA_FUNCTIONS_USAGE
9522+
- LAMBDA_FUNCTIONS_PERCENTAGE
9523+
- LAMBDA_INVOCATIONS_USAGE
9524+
- LAMBDA_INVOCATIONS_PERCENTAGE
9525+
- FARGATE_USAGE
9526+
- FARGATE_PERCENTAGE
9527+
- PROFILED_HOST_USAGE
9528+
- PROFILED_HOST_PERCENTAGE
9529+
- PROFILED_CONTAINER_USAGE
9530+
- PROFILED_CONTAINER_PERCENTAGE
9531+
- ALL
94689532
UsageAttributionTagNames:
94699533
additionalProperties:
94709534
description: A list of tag values.
@@ -18931,12 +18995,13 @@ paths:
1893118995
schema:
1893218996
format: date-time
1893318997
type: string
18934-
- description: The specified field to search results for.
18998+
- description: Comma-separated list of usage types to return, or `*` for all
18999+
usage types.
1893519000
in: query
1893619001
name: fields
1893719002
required: true
1893819003
schema:
18939-
type: string
19004+
$ref: '#/components/schemas/UsageAttributionSupportedMetrics'
1894019005
- description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]`
1894119006
for usage ending this month.'
1894219007
in: query

0 commit comments

Comments
 (0)