Skip to content

Commit 7e6d51c

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Mark additional usage fields as nullable (#1516)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 9463b21 commit 7e6d51c

File tree

5 files changed

+18
-13
lines changed

5 files changed

+18
-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.6.4",
7-
"regenerated": "2023-06-08 21:02:55.696478",
8-
"spec_repo_commit": "5b401dab"
7+
"regenerated": "2023-06-09 14:55:30.671867",
8+
"spec_repo_commit": "b6c7aa0b"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2023-06-08 21:02:55.714580",
13-
"spec_repo_commit": "5b401dab"
12+
"regenerated": "2023-06-09 14:55:30.684308",
13+
"spec_repo_commit": "b6c7aa0b"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16761,6 +16761,7 @@ components:
1676116761
iot_device_count:
1676216762
description: The total number of IoT devices during a given hour.
1676316763
format: int64
16764+
nullable: true
1676416765
type: integer
1676516766
org_name:
1676616767
description: The organization name.
@@ -16888,6 +16889,7 @@ components:
1688816889
retention:
1688916890
description: The retention period in days or "custom" for all custom retention
1689016891
usage.
16892+
nullable: true
1689116893
type: string
1689216894
type: object
1689316895
UsageLogsByRetentionResponse:
@@ -17012,6 +17014,7 @@ components:
1701217014
host_count:
1701317015
description: Contains the number of active NPM hosts.
1701417016
format: int64
17017+
nullable: true
1701517018
type: integer
1701617019
hour:
1701717020
description: The hour for the usage.

src/datadog_api_client/v1/model/usage_iot_hour.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
ModelNormal,
1010
cached_property,
1111
datetime,
12+
none_type,
1213
unset,
1314
UnsetType,
1415
)
@@ -19,7 +20,7 @@ class UsageIoTHour(ModelNormal):
1920
def openapi_types(_):
2021
return {
2122
"hour": (datetime,),
22-
"iot_device_count": (int,),
23+
"iot_device_count": (int, none_type),
2324
"org_name": (str,),
2425
"public_id": (str,),
2526
}
@@ -34,7 +35,7 @@ def openapi_types(_):
3435
def __init__(
3536
self_,
3637
hour: Union[datetime, UnsetType] = unset,
37-
iot_device_count: Union[int, UnsetType] = unset,
38+
iot_device_count: Union[int, none_type, UnsetType] = unset,
3839
org_name: Union[str, UnsetType] = unset,
3940
public_id: Union[str, UnsetType] = unset,
4041
**kwargs,
@@ -46,7 +47,7 @@ def __init__(
4647
:type hour: datetime, optional
4748
4849
:param iot_device_count: The total number of IoT devices during a given hour.
49-
:type iot_device_count: int, optional
50+
:type iot_device_count: int, none_type, optional
5051
5152
:param org_name: The organization name.
5253
:type org_name: str, optional

src/datadog_api_client/v1/model/usage_logs_by_retention_hour.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def openapi_types(_):
2323
"org_name": (str,),
2424
"public_id": (str,),
2525
"rehydrated_indexed_events_count": (int, none_type),
26-
"retention": (str,),
26+
"retention": (str, none_type),
2727
}
2828

2929
attribute_map = {
@@ -42,7 +42,7 @@ def __init__(
4242
org_name: Union[str, UnsetType] = unset,
4343
public_id: Union[str, UnsetType] = unset,
4444
rehydrated_indexed_events_count: Union[int, none_type, UnsetType] = unset,
45-
retention: Union[str, UnsetType] = unset,
45+
retention: Union[str, none_type, UnsetType] = unset,
4646
**kwargs,
4747
):
4848
"""
@@ -64,7 +64,7 @@ def __init__(
6464
:type rehydrated_indexed_events_count: int, none_type, optional
6565
6666
:param retention: The retention period in days or "custom" for all custom retention usage.
67-
:type retention: str, optional
67+
:type retention: str, none_type, optional
6868
"""
6969
if indexed_events_count is not unset:
7070
kwargs["indexed_events_count"] = indexed_events_count

src/datadog_api_client/v1/model/usage_network_hosts_hour.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
ModelNormal,
1010
cached_property,
1111
datetime,
12+
none_type,
1213
unset,
1314
UnsetType,
1415
)
@@ -18,7 +19,7 @@ class UsageNetworkHostsHour(ModelNormal):
1819
@cached_property
1920
def openapi_types(_):
2021
return {
21-
"host_count": (int,),
22+
"host_count": (int, none_type),
2223
"hour": (datetime,),
2324
"org_name": (str,),
2425
"public_id": (str,),
@@ -33,7 +34,7 @@ def openapi_types(_):
3334

3435
def __init__(
3536
self_,
36-
host_count: Union[int, UnsetType] = unset,
37+
host_count: Union[int, none_type, UnsetType] = unset,
3738
hour: Union[datetime, UnsetType] = unset,
3839
org_name: Union[str, UnsetType] = unset,
3940
public_id: Union[str, UnsetType] = unset,
@@ -43,7 +44,7 @@ def __init__(
4344
Number of active NPM hosts for each hour for a given organization.
4445
4546
:param host_count: Contains the number of active NPM hosts.
46-
:type host_count: int, optional
47+
:type host_count: int, none_type, optional
4748
4849
:param hour: The hour for the usage.
4950
:type hour: datetime, optional

0 commit comments

Comments
 (0)