Skip to content

Commit

Permalink
Mark additional usage fields as nullable (#1516)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec committed Jun 9, 2023
1 parent 9463b21 commit 7e6d51c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.4",
"regenerated": "2023-06-08 21:02:55.696478",
"spec_repo_commit": "5b401dab"
"regenerated": "2023-06-09 14:55:30.671867",
"spec_repo_commit": "b6c7aa0b"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2023-06-08 21:02:55.714580",
"spec_repo_commit": "5b401dab"
"regenerated": "2023-06-09 14:55:30.684308",
"spec_repo_commit": "b6c7aa0b"
}
}
}
3 changes: 3 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16761,6 +16761,7 @@ components:
iot_device_count:
description: The total number of IoT devices during a given hour.
format: int64
nullable: true
type: integer
org_name:
description: The organization name.
Expand Down Expand Up @@ -16888,6 +16889,7 @@ components:
retention:
description: The retention period in days or "custom" for all custom retention
usage.
nullable: true
type: string
type: object
UsageLogsByRetentionResponse:
Expand Down Expand Up @@ -17012,6 +17014,7 @@ components:
host_count:
description: Contains the number of active NPM hosts.
format: int64
nullable: true
type: integer
hour:
description: The hour for the usage.
Expand Down
7 changes: 4 additions & 3 deletions src/datadog_api_client/v1/model/usage_iot_hour.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
ModelNormal,
cached_property,
datetime,
none_type,
unset,
UnsetType,
)
Expand All @@ -19,7 +20,7 @@ class UsageIoTHour(ModelNormal):
def openapi_types(_):
return {
"hour": (datetime,),
"iot_device_count": (int,),
"iot_device_count": (int, none_type),
"org_name": (str,),
"public_id": (str,),
}
Expand All @@ -34,7 +35,7 @@ def openapi_types(_):
def __init__(
self_,
hour: Union[datetime, UnsetType] = unset,
iot_device_count: Union[int, UnsetType] = unset,
iot_device_count: Union[int, none_type, UnsetType] = unset,
org_name: Union[str, UnsetType] = unset,
public_id: Union[str, UnsetType] = unset,
**kwargs,
Expand All @@ -46,7 +47,7 @@ def __init__(
:type hour: datetime, optional
:param iot_device_count: The total number of IoT devices during a given hour.
:type iot_device_count: int, optional
:type iot_device_count: int, none_type, optional
:param org_name: The organization name.
:type org_name: str, optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def openapi_types(_):
"org_name": (str,),
"public_id": (str,),
"rehydrated_indexed_events_count": (int, none_type),
"retention": (str,),
"retention": (str, none_type),
}

attribute_map = {
Expand All @@ -42,7 +42,7 @@ def __init__(
org_name: Union[str, UnsetType] = unset,
public_id: Union[str, UnsetType] = unset,
rehydrated_indexed_events_count: Union[int, none_type, UnsetType] = unset,
retention: Union[str, UnsetType] = unset,
retention: Union[str, none_type, UnsetType] = unset,
**kwargs,
):
"""
Expand All @@ -64,7 +64,7 @@ def __init__(
:type rehydrated_indexed_events_count: int, none_type, optional
:param retention: The retention period in days or "custom" for all custom retention usage.
:type retention: str, optional
:type retention: str, none_type, optional
"""
if indexed_events_count is not unset:
kwargs["indexed_events_count"] = indexed_events_count
Expand Down
7 changes: 4 additions & 3 deletions src/datadog_api_client/v1/model/usage_network_hosts_hour.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
ModelNormal,
cached_property,
datetime,
none_type,
unset,
UnsetType,
)
Expand All @@ -18,7 +19,7 @@ class UsageNetworkHostsHour(ModelNormal):
@cached_property
def openapi_types(_):
return {
"host_count": (int,),
"host_count": (int, none_type),
"hour": (datetime,),
"org_name": (str,),
"public_id": (str,),
Expand All @@ -33,7 +34,7 @@ def openapi_types(_):

def __init__(
self_,
host_count: Union[int, UnsetType] = unset,
host_count: Union[int, none_type, UnsetType] = unset,
hour: Union[datetime, UnsetType] = unset,
org_name: Union[str, UnsetType] = unset,
public_id: Union[str, UnsetType] = unset,
Expand All @@ -43,7 +44,7 @@ def __init__(
Number of active NPM hosts for each hour for a given organization.
:param host_count: Contains the number of active NPM hosts.
:type host_count: int, optional
:type host_count: int, none_type, optional
:param hour: The hour for the usage.
:type hour: datetime, optional
Expand Down

0 comments on commit 7e6d51c

Please sign in to comment.