Skip to content

Commit 836b4ab

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Properly mark usage fields as nullable (#1451)
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 4a8809b commit 836b4ab

File tree

7 files changed

+37
-25
lines changed

7 files changed

+37
-25
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-05-04 20:08:39.268868",
8-
"spec_repo_commit": "ff8b9894"
7+
"regenerated": "2023-05-05 15:02:39.419381",
8+
"spec_repo_commit": "380840ff"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2023-05-04 20:08:39.281631",
13-
"spec_repo_commit": "ff8b9894"
12+
"regenerated": "2023-05-05 15:02:39.431715",
13+
"spec_repo_commit": "380840ff"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15256,6 +15256,7 @@ components:
1525615256
analyzed_logs:
1525715257
description: Contains the number of analyzed logs.
1525815258
format: int64
15259+
nullable: true
1525915260
type: integer
1526015261
hour:
1526115262
description: The hour for the usage.
@@ -16542,6 +16543,7 @@ components:
1654216543
indexed_events_count:
1654316544
description: Contains the number of spans indexed.
1654416545
format: int64
16546+
nullable: true
1654516547
type: integer
1654616548
org_name:
1654716549
description: The organization name.
@@ -16571,6 +16573,7 @@ components:
1657116573
description: Contains the total number of bytes ingested for APM spans during
1657216574
a given hour.
1657316575
format: int64
16576+
nullable: true
1657416577
type: integer
1657516578
org_name:
1657616579
description: The organization name.
@@ -16703,11 +16706,13 @@ components:
1670316706
description: Total logs indexed with this retention period during a given
1670416707
hour.
1670516708
format: int64
16709+
nullable: true
1670616710
type: integer
1670716711
live_indexed_events_count:
1670816712
description: Live logs indexed with this retention period during a given
1670916713
hour.
1671016714
format: int64
16715+
nullable: true
1671116716
type: integer
1671216717
org_name:
1671316718
description: The organization name.
@@ -16719,6 +16724,7 @@ components:
1671916724
description: Rehydrated logs indexed with this retention period during a
1672016725
given hour.
1672116726
format: int64
16727+
nullable: true
1672216728
type: integer
1672316729
retention:
1672416730
description: The retention period in days or "custom" for all custom retention
@@ -16822,6 +16828,7 @@ components:
1682216828
indexed_events_count:
1682316829
description: Contains the number of netflow events indexed.
1682416830
format: int64
16831+
nullable: true
1682516832
type: integer
1682616833
org_name:
1682716834
description: The organization name.

src/datadog_api_client/v1/model/usage_analyzed_logs_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 UsageAnalyzedLogsHour(ModelNormal):
1819
@cached_property
1920
def openapi_types(_):
2021
return {
21-
"analyzed_logs": (int,),
22+
"analyzed_logs": (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-
analyzed_logs: Union[int, UnsetType] = unset,
37+
analyzed_logs: 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
The number of analyzed logs for each hour for a given organization.
4445
4546
:param analyzed_logs: Contains the number of analyzed logs.
46-
:type analyzed_logs: int, optional
47+
:type analyzed_logs: int, none_type, optional
4748
4849
:param hour: The hour for the usage.
4950
:type hour: datetime, optional

src/datadog_api_client/v1/model/usage_indexed_spans_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 UsageIndexedSpansHour(ModelNormal):
1920
def openapi_types(_):
2021
return {
2122
"hour": (datetime,),
22-
"indexed_events_count": (int,),
23+
"indexed_events_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-
indexed_events_count: Union[int, UnsetType] = unset,
38+
indexed_events_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 indexed_events_count: Contains the number of spans indexed.
49-
:type indexed_events_count: int, optional
50+
:type indexed_events_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_ingested_spans_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 UsageIngestedSpansHour(ModelNormal):
1920
def openapi_types(_):
2021
return {
2122
"hour": (datetime,),
22-
"ingested_events_bytes": (int,),
23+
"ingested_events_bytes": (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-
ingested_events_bytes: Union[int, UnsetType] = unset,
38+
ingested_events_bytes: 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 ingested_events_bytes: Contains the total number of bytes ingested for APM spans during a given hour.
49-
:type ingested_events_bytes: int, optional
50+
:type ingested_events_bytes: 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: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from datadog_api_client.model_utils import (
99
ModelNormal,
1010
cached_property,
11+
none_type,
1112
unset,
1213
UnsetType,
1314
)
@@ -17,11 +18,11 @@ class UsageLogsByRetentionHour(ModelNormal):
1718
@cached_property
1819
def openapi_types(_):
1920
return {
20-
"indexed_events_count": (int,),
21-
"live_indexed_events_count": (int,),
21+
"indexed_events_count": (int, none_type),
22+
"live_indexed_events_count": (int, none_type),
2223
"org_name": (str,),
2324
"public_id": (str,),
24-
"rehydrated_indexed_events_count": (int,),
25+
"rehydrated_indexed_events_count": (int, none_type),
2526
"retention": (str,),
2627
}
2728

@@ -36,22 +37,22 @@ def openapi_types(_):
3637

3738
def __init__(
3839
self_,
39-
indexed_events_count: Union[int, UnsetType] = unset,
40-
live_indexed_events_count: Union[int, UnsetType] = unset,
40+
indexed_events_count: Union[int, none_type, UnsetType] = unset,
41+
live_indexed_events_count: Union[int, none_type, UnsetType] = unset,
4142
org_name: Union[str, UnsetType] = unset,
4243
public_id: Union[str, UnsetType] = unset,
43-
rehydrated_indexed_events_count: Union[int, UnsetType] = unset,
44+
rehydrated_indexed_events_count: Union[int, none_type, UnsetType] = unset,
4445
retention: Union[str, UnsetType] = unset,
4546
**kwargs,
4647
):
4748
"""
4849
The number of indexed logs for each hour for a given organization broken down by retention period.
4950
5051
:param indexed_events_count: Total logs indexed with this retention period during a given hour.
51-
:type indexed_events_count: int, optional
52+
:type indexed_events_count: int, none_type, optional
5253
5354
:param live_indexed_events_count: Live logs indexed with this retention period during a given hour.
54-
:type live_indexed_events_count: int, optional
55+
:type live_indexed_events_count: int, none_type, optional
5556
5657
:param org_name: The organization name.
5758
:type org_name: str, optional
@@ -60,7 +61,7 @@ def __init__(
6061
:type public_id: str, optional
6162
6263
:param rehydrated_indexed_events_count: Rehydrated logs indexed with this retention period during a given hour.
63-
:type rehydrated_indexed_events_count: int, optional
64+
:type rehydrated_indexed_events_count: int, none_type, optional
6465
6566
:param retention: The retention period in days or "custom" for all custom retention usage.
6667
:type retention: str, optional

src/datadog_api_client/v1/model/usage_network_flows_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 UsageNetworkFlowsHour(ModelNormal):
1920
def openapi_types(_):
2021
return {
2122
"hour": (datetime,),
22-
"indexed_events_count": (int,),
23+
"indexed_events_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-
indexed_events_count: Union[int, UnsetType] = unset,
38+
indexed_events_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 indexed_events_count: Contains the number of netflow events indexed.
49-
:type indexed_events_count: int, optional
50+
:type indexed_events_count: int, none_type, optional
5051
5152
:param org_name: The organization name.
5253
:type org_name: str, optional

0 commit comments

Comments
 (0)