Skip to content
Open
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
23 changes: 15 additions & 8 deletions src/datadog_api_client/v2/model/entity_v3_datastore_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,19 @@ def __init__(
:param type: The type of datastore.
:type type: str, optional
"""
if component_of is not unset:
kwargs["component_of"] = component_of
if lifecycle is not unset:
kwargs["lifecycle"] = lifecycle
if tier is not unset:
kwargs["tier"] = tier
if type is not unset:
kwargs["type"] = type
# Optimize by eliminating repeated lookups of unset by storing as a local variable
_unset = unset

# Optimize by grouping assignments into a single dict update, reducing repeated dict lookups
if component_of is not _unset or lifecycle is not _unset or tier is not _unset or type is not _unset:
argmap = {}
if component_of is not _unset:
argmap["component_of"] = component_of
if lifecycle is not _unset:
argmap["lifecycle"] = lifecycle
if tier is not _unset:
argmap["tier"] = tier
if type is not _unset:
argmap["type"] = type
kwargs.update(argmap)
super().__init__(kwargs)