Skip to content

Commit d9b5076

Browse files
authored
feat(environmental_impact): add yearly_summary_reports field to impact report availability messages (#1463)
1 parent 1a00296 commit d9b5076

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,12 @@ def unmarshal_ImpactReportAvailability(data: Any) -> ImpactReportAvailability:
221221
else:
222222
args["month_summary_reports"] = None
223223

224+
field = data.get("yearly_summary_reports", None)
225+
if field is not None:
226+
args["yearly_summary_reports"] = field
227+
else:
228+
args["yearly_summary_reports"] = None
229+
224230
return ImpactReportAvailability(**args)
225231

226232

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@ class ImpactReportAvailability:
170170
The list of calendar months for which impact reports are available.
171171
"""
172172

173+
yearly_summary_reports: list[datetime]
174+
"""
175+
The list of calendar years for which impact reports are available.
176+
"""
177+
173178

174179
@dataclass
175180
class UserApiDownloadImpactReportRequest:

scaleway/scaleway/environmental_footprint/v1alpha1/marshalling.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,12 @@ def unmarshal_ImpactReportAvailability(data: Any) -> ImpactReportAvailability:
221221
else:
222222
args["month_summary_reports"] = None
223223

224+
field = data.get("yearly_summary_reports", None)
225+
if field is not None:
226+
args["yearly_summary_reports"] = field
227+
else:
228+
args["yearly_summary_reports"] = None
229+
224230
return ImpactReportAvailability(**args)
225231

226232

scaleway/scaleway/environmental_footprint/v1alpha1/types.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@ class ImpactReportAvailability:
170170
The list of calendar months for which impact reports are available.
171171
"""
172172

173+
yearly_summary_reports: list[datetime]
174+
"""
175+
The list of calendar years for which impact reports are available.
176+
"""
177+
173178

174179
@dataclass
175180
class UserApiDownloadImpactReportRequest:

0 commit comments

Comments
 (0)