Skip to content

Commit ced132b

Browse files
authored
feat(iam): add support for pretty_name, unit and description in Quotum (#490)
1 parent d2a16a1 commit ced132b

File tree

4 files changed

+54
-0
lines changed

4 files changed

+54
-0
lines changed

scaleway-async/scaleway_async/iam/v1alpha1/marshalling.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,18 @@ def unmarshal_Quotum(data: Any) -> Quotum:
378378
if field is not None:
379379
args["name"] = field
380380

381+
field = data.get("pretty_name", None)
382+
if field is not None:
383+
args["pretty_name"] = field
384+
385+
field = data.get("unit", None)
386+
if field is not None:
387+
args["unit"] = field
388+
389+
field = data.get("description", None)
390+
if field is not None:
391+
args["description"] = field
392+
381393
field = data.get("limit", None)
382394
if field is not None:
383395
args["limit"] = field

scaleway-async/scaleway_async/iam/v1alpha1/types.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,21 @@ class Quotum:
533533
Name of the quota.
534534
"""
535535

536+
pretty_name: str
537+
"""
538+
A human-readable name for the quota.
539+
"""
540+
541+
unit: str
542+
"""
543+
The unit in which the quota is expressed.
544+
"""
545+
546+
description: str
547+
"""
548+
Details about the quota.
549+
"""
550+
536551
limit: Optional[int]
537552

538553
unlimited: Optional[bool]

scaleway/scaleway/iam/v1alpha1/marshalling.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,18 @@ def unmarshal_Quotum(data: Any) -> Quotum:
378378
if field is not None:
379379
args["name"] = field
380380

381+
field = data.get("pretty_name", None)
382+
if field is not None:
383+
args["pretty_name"] = field
384+
385+
field = data.get("unit", None)
386+
if field is not None:
387+
args["unit"] = field
388+
389+
field = data.get("description", None)
390+
if field is not None:
391+
args["description"] = field
392+
381393
field = data.get("limit", None)
382394
if field is not None:
383395
args["limit"] = field

scaleway/scaleway/iam/v1alpha1/types.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,21 @@ class Quotum:
533533
Name of the quota.
534534
"""
535535

536+
pretty_name: str
537+
"""
538+
A human-readable name for the quota.
539+
"""
540+
541+
unit: str
542+
"""
543+
The unit in which the quota is expressed.
544+
"""
545+
546+
description: str
547+
"""
548+
Details about the quota.
549+
"""
550+
536551
limit: Optional[int]
537552

538553
unlimited: Optional[bool]

0 commit comments

Comments
 (0)