Skip to content

Properly mark usage fields as nullable #1451

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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-05-04 20:08:39.268868",
"spec_repo_commit": "ff8b9894"
"regenerated": "2023-05-05 15:02:39.419381",
"spec_repo_commit": "380840ff"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2023-05-04 20:08:39.281631",
"spec_repo_commit": "ff8b9894"
"regenerated": "2023-05-05 15:02:39.431715",
"spec_repo_commit": "380840ff"
}
}
}
7 changes: 7 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15256,6 +15256,7 @@ components:
analyzed_logs:
description: Contains the number of analyzed logs.
format: int64
nullable: true
type: integer
hour:
description: The hour for the usage.
Expand Down Expand Up @@ -16542,6 +16543,7 @@ components:
indexed_events_count:
description: Contains the number of spans indexed.
format: int64
nullable: true
type: integer
org_name:
description: The organization name.
Expand Down Expand Up @@ -16571,6 +16573,7 @@ components:
description: Contains the total number of bytes ingested for APM spans during
a given hour.
format: int64
nullable: true
type: integer
org_name:
description: The organization name.
Expand Down Expand Up @@ -16703,11 +16706,13 @@ components:
description: Total logs indexed with this retention period during a given
hour.
format: int64
nullable: true
type: integer
live_indexed_events_count:
description: Live logs indexed with this retention period during a given
hour.
format: int64
nullable: true
type: integer
org_name:
description: The organization name.
Expand All @@ -16719,6 +16724,7 @@ components:
description: Rehydrated logs indexed with this retention period during a
given hour.
format: int64
nullable: true
type: integer
retention:
description: The retention period in days or "custom" for all custom retention
Expand Down Expand Up @@ -16822,6 +16828,7 @@ components:
indexed_events_count:
description: Contains the number of netflow events indexed.
format: int64
nullable: true
type: integer
org_name:
description: The organization name.
Expand Down
7 changes: 4 additions & 3 deletions src/datadog_api_client/v1/model/usage_analyzed_logs_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 UsageAnalyzedLogsHour(ModelNormal):
@cached_property
def openapi_types(_):
return {
"analyzed_logs": (int,),
"analyzed_logs": (int, none_type),
"hour": (datetime,),
"org_name": (str,),
"public_id": (str,),
Expand All @@ -33,7 +34,7 @@ def openapi_types(_):

def __init__(
self_,
analyzed_logs: Union[int, UnsetType] = unset,
analyzed_logs: 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__(
The number of analyzed logs for each hour for a given organization.

:param analyzed_logs: Contains the number of analyzed logs.
:type analyzed_logs: int, optional
:type analyzed_logs: int, none_type, optional

:param hour: The hour for the usage.
:type hour: datetime, optional
Expand Down
7 changes: 4 additions & 3 deletions src/datadog_api_client/v1/model/usage_indexed_spans_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 UsageIndexedSpansHour(ModelNormal):
def openapi_types(_):
return {
"hour": (datetime,),
"indexed_events_count": (int,),
"indexed_events_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,
indexed_events_count: Union[int, UnsetType] = unset,
indexed_events_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 indexed_events_count: Contains the number of spans indexed.
:type indexed_events_count: int, optional
:type indexed_events_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 @@ -9,6 +9,7 @@
ModelNormal,
cached_property,
datetime,
none_type,
unset,
UnsetType,
)
Expand All @@ -19,7 +20,7 @@ class UsageIngestedSpansHour(ModelNormal):
def openapi_types(_):
return {
"hour": (datetime,),
"ingested_events_bytes": (int,),
"ingested_events_bytes": (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,
ingested_events_bytes: Union[int, UnsetType] = unset,
ingested_events_bytes: 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 ingested_events_bytes: Contains the total number of bytes ingested for APM spans during a given hour.
:type ingested_events_bytes: int, optional
:type ingested_events_bytes: int, none_type, optional

:param org_name: The organization name.
:type org_name: str, optional
Expand Down
19 changes: 10 additions & 9 deletions src/datadog_api_client/v1/model/usage_logs_by_retention_hour.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
none_type,
unset,
UnsetType,
)
Expand All @@ -17,11 +18,11 @@ class UsageLogsByRetentionHour(ModelNormal):
@cached_property
def openapi_types(_):
return {
"indexed_events_count": (int,),
"live_indexed_events_count": (int,),
"indexed_events_count": (int, none_type),
"live_indexed_events_count": (int, none_type),
"org_name": (str,),
"public_id": (str,),
"rehydrated_indexed_events_count": (int,),
"rehydrated_indexed_events_count": (int, none_type),
"retention": (str,),
}

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

def __init__(
self_,
indexed_events_count: Union[int, UnsetType] = unset,
live_indexed_events_count: Union[int, UnsetType] = unset,
indexed_events_count: Union[int, none_type, UnsetType] = unset,
live_indexed_events_count: Union[int, none_type, UnsetType] = unset,
org_name: Union[str, UnsetType] = unset,
public_id: Union[str, UnsetType] = unset,
rehydrated_indexed_events_count: Union[int, UnsetType] = unset,
rehydrated_indexed_events_count: Union[int, none_type, UnsetType] = unset,
retention: Union[str, UnsetType] = unset,
**kwargs,
):
"""
The number of indexed logs for each hour for a given organization broken down by retention period.

:param indexed_events_count: Total logs indexed with this retention period during a given hour.
:type indexed_events_count: int, optional
:type indexed_events_count: int, none_type, optional

:param live_indexed_events_count: Live logs indexed with this retention period during a given hour.
:type live_indexed_events_count: int, optional
:type live_indexed_events_count: int, none_type, optional

:param org_name: The organization name.
:type org_name: str, optional
Expand All @@ -60,7 +61,7 @@ def __init__(
:type public_id: str, optional

:param rehydrated_indexed_events_count: Rehydrated logs indexed with this retention period during a given hour.
:type rehydrated_indexed_events_count: int, optional
: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
Expand Down
7 changes: 4 additions & 3 deletions src/datadog_api_client/v1/model/usage_network_flows_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 UsageNetworkFlowsHour(ModelNormal):
def openapi_types(_):
return {
"hour": (datetime,),
"indexed_events_count": (int,),
"indexed_events_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,
indexed_events_count: Union[int, UnsetType] = unset,
indexed_events_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 indexed_events_count: Contains the number of netflow events indexed.
:type indexed_events_count: int, optional
:type indexed_events_count: int, none_type, optional

:param org_name: The organization name.
:type org_name: str, optional
Expand Down