Skip to content

Mark usage fields as nullable #1432

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-04-27 20:42:50.984232",
"spec_repo_commit": "a3f3bc16"
"regenerated": "2023-04-28 13:28:23.218453",
"spec_repo_commit": "d013809f"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2023-04-27 20:42:51.000618",
"spec_repo_commit": "a3f3bc16"
"regenerated": "2023-04-28 13:28:23.238037",
"spec_repo_commit": "d013809f"
}
}
}
5 changes: 5 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16978,12 +16978,14 @@ components:
usage types by the Sensitive Data Scanner from the start of the given
hour\u2019s month until the given hour."
format: int64
nullable: true
type: integer
events_scanned_bytes:
description: "The total number of bytes scanned of Events usage across all
usage types by the Sensitive Data Scanner from the start of the given
hour\u2019s month until the given hour."
format: int64
nullable: true
type: integer
hour:
description: The hour for the usage.
Expand All @@ -16994,6 +16996,7 @@ components:
Data Scanner from the start of the given hour\u2019s month until the given
hour."
format: int64
nullable: true
type: integer
org_name:
description: The organization name.
Expand All @@ -17006,12 +17009,14 @@ components:
usage types by the Sensitive Data Scanner from the start of the given
hour\u2019s month until the given hour."
format: int64
nullable: true
type: integer
total_scanned_bytes:
description: "The total number of bytes scanned across all usage types by
the Sensitive Data Scanner from the start of the given hour\u2019s month
until the given hour."
format: int64
nullable: true
type: integer
type: object
UsageSDSResponse:
Expand Down
31 changes: 16 additions & 15 deletions src/datadog_api_client/v1/model/usage_sds_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,14 +19,14 @@ class UsageSDSHour(ModelNormal):
@cached_property
def openapi_types(_):
return {
"apm_scanned_bytes": (int,),
"events_scanned_bytes": (int,),
"apm_scanned_bytes": (int, none_type),
"events_scanned_bytes": (int, none_type),
"hour": (datetime,),
"logs_scanned_bytes": (int,),
"logs_scanned_bytes": (int, none_type),
"org_name": (str,),
"public_id": (str,),
"rum_scanned_bytes": (int,),
"total_scanned_bytes": (int,),
"rum_scanned_bytes": (int, none_type),
"total_scanned_bytes": (int, none_type),
}

attribute_map = {
Expand All @@ -41,30 +42,30 @@ def openapi_types(_):

def __init__(
self_,
apm_scanned_bytes: Union[int, UnsetType] = unset,
events_scanned_bytes: Union[int, UnsetType] = unset,
apm_scanned_bytes: Union[int, none_type, UnsetType] = unset,
events_scanned_bytes: Union[int, none_type, UnsetType] = unset,
hour: Union[datetime, UnsetType] = unset,
logs_scanned_bytes: Union[int, UnsetType] = unset,
logs_scanned_bytes: Union[int, none_type, UnsetType] = unset,
org_name: Union[str, UnsetType] = unset,
public_id: Union[str, UnsetType] = unset,
rum_scanned_bytes: Union[int, UnsetType] = unset,
total_scanned_bytes: Union[int, UnsetType] = unset,
rum_scanned_bytes: Union[int, none_type, UnsetType] = unset,
total_scanned_bytes: Union[int, none_type, UnsetType] = unset,
**kwargs,
):
"""
Sensitive Data Scanner usage for a given organization for a given hour.

:param apm_scanned_bytes: The total number of bytes scanned of APM usage across all usage types by the Sensitive Data Scanner from the start of the given hour’s month until the given hour.
:type apm_scanned_bytes: int, optional
:type apm_scanned_bytes: int, none_type, optional

:param events_scanned_bytes: The total number of bytes scanned of Events usage across all usage types by the Sensitive Data Scanner from the start of the given hour’s month until the given hour.
:type events_scanned_bytes: int, optional
:type events_scanned_bytes: int, none_type, optional

:param hour: The hour for the usage.
:type hour: datetime, optional

:param logs_scanned_bytes: The total number of bytes scanned of logs usage by the Sensitive Data Scanner from the start of the given hour’s month until the given hour.
:type logs_scanned_bytes: int, optional
:type logs_scanned_bytes: int, none_type, optional

:param org_name: The organization name.
:type org_name: str, optional
Expand All @@ -73,10 +74,10 @@ def __init__(
:type public_id: str, optional

:param rum_scanned_bytes: The total number of bytes scanned of RUM usage across all usage types by the Sensitive Data Scanner from the start of the given hour’s month until the given hour.
:type rum_scanned_bytes: int, optional
:type rum_scanned_bytes: int, none_type, optional

:param total_scanned_bytes: The total number of bytes scanned across all usage types by the Sensitive Data Scanner from the start of the given hour’s month until the given hour.
:type total_scanned_bytes: int, optional
:type total_scanned_bytes: int, none_type, optional
"""
if apm_scanned_bytes is not unset:
kwargs["apm_scanned_bytes"] = apm_scanned_bytes
Expand Down