Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(cockpit): update naming OB-276 #907

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 1 commit into from
Mar 14, 2025
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
12 changes: 6 additions & 6 deletions scaleway-async/scaleway_async/cockpit/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@ async def create_contact_point(
region: Optional[ScwRegion] = None,
project_id: Optional[str] = None,
email: Optional[ContactPointEmail] = None,
receive_resolved_notifications: Optional[bool] = None,
send_resolved_notifications: Optional[bool] = None,
) -> ContactPoint:
"""
Create a contact point.
Expand All @@ -1242,7 +1242,7 @@ async def create_contact_point(
:param project_id: ID of the Project to create the contact point in.
:param email: Email address of the contact point to create.
One-Of ('configuration'): at most one of 'email' could be set.
:param receive_resolved_notifications: Send an email notification when an alert is marked as resolved.
:param send_resolved_notifications: Send an email notification when an alert is marked as resolved.
:return: :class:`ContactPoint <ContactPoint>`

Usage:
Expand All @@ -1262,7 +1262,7 @@ async def create_contact_point(
RegionalApiCreateContactPointRequest(
region=region,
project_id=project_id,
receive_resolved_notifications=receive_resolved_notifications,
send_resolved_notifications=send_resolved_notifications,
email=email,
),
self.client,
Expand Down Expand Up @@ -1353,14 +1353,14 @@ async def update_contact_point(
region: Optional[ScwRegion] = None,
project_id: Optional[str] = None,
email: Optional[ContactPointEmail] = None,
receive_resolved_notifications: Optional[bool] = None,
send_resolved_notifications: Optional[bool] = None,
) -> ContactPoint:
"""
:param region: Region to target. If none is passed will use default region from the config.
:param project_id: ID of the Project containing the contact point to update.
:param email: Email address of the contact point to update.
One-Of ('configuration'): at most one of 'email' could be set.
:param receive_resolved_notifications: Enable or disable notifications when alert is resolved.
:param send_resolved_notifications: Enable or disable notifications when alert is resolved.
:return: :class:`ContactPoint <ContactPoint>`

Usage:
Expand All @@ -1380,7 +1380,7 @@ async def update_contact_point(
RegionalApiUpdateContactPointRequest(
region=region,
project_id=project_id,
receive_resolved_notifications=receive_resolved_notifications,
send_resolved_notifications=send_resolved_notifications,
email=email,
),
self.client,
Expand Down
16 changes: 6 additions & 10 deletions scaleway-async/scaleway_async/cockpit/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ def unmarshal_ContactPoint(data: Any) -> ContactPoint:
if field is not None:
args["region"] = field

field = data.get("receive_resolved_notifications", None)
field = data.get("send_resolved_notifications", None)
if field is not None:
args["receive_resolved_notifications"] = field
args["send_resolved_notifications"] = field

field = data.get("email", None)
if field is not None:
Expand Down Expand Up @@ -792,10 +792,8 @@ def marshal_RegionalApiCreateContactPointRequest(
if request.project_id is not None:
output["project_id"] = request.project_id or defaults.default_project_id

if request.receive_resolved_notifications is not None:
output["receive_resolved_notifications"] = (
request.receive_resolved_notifications
)
if request.send_resolved_notifications is not None:
output["send_resolved_notifications"] = request.send_resolved_notifications

return output

Expand Down Expand Up @@ -934,10 +932,8 @@ def marshal_RegionalApiUpdateContactPointRequest(
if request.project_id is not None:
output["project_id"] = request.project_id or defaults.default_project_id

if request.receive_resolved_notifications is not None:
output["receive_resolved_notifications"] = (
request.receive_resolved_notifications
)
if request.send_resolved_notifications is not None:
output["send_resolved_notifications"] = request.send_resolved_notifications

return output

Expand Down
6 changes: 3 additions & 3 deletions scaleway-async/scaleway_async/cockpit/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class ContactPoint:
Region.
"""

receive_resolved_notifications: bool
send_resolved_notifications: bool
"""
Send an email notification when an alert is marked as resolved.
"""
Expand Down Expand Up @@ -859,7 +859,7 @@ class RegionalApiCreateContactPointRequest:
ID of the Project to create the contact point in.
"""

receive_resolved_notifications: Optional[bool]
send_resolved_notifications: Optional[bool]
"""
Send an email notification when an alert is marked as resolved.
"""
Expand Down Expand Up @@ -1293,7 +1293,7 @@ class RegionalApiUpdateContactPointRequest:
ID of the Project containing the contact point to update.
"""

receive_resolved_notifications: Optional[bool]
send_resolved_notifications: Optional[bool]
"""
Enable or disable notifications when alert is resolved.
"""
Expand Down
12 changes: 6 additions & 6 deletions scaleway/scaleway/cockpit/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@ def create_contact_point(
region: Optional[ScwRegion] = None,
project_id: Optional[str] = None,
email: Optional[ContactPointEmail] = None,
receive_resolved_notifications: Optional[bool] = None,
send_resolved_notifications: Optional[bool] = None,
) -> ContactPoint:
"""
Create a contact point.
Expand All @@ -1242,7 +1242,7 @@ def create_contact_point(
:param project_id: ID of the Project to create the contact point in.
:param email: Email address of the contact point to create.
One-Of ('configuration'): at most one of 'email' could be set.
:param receive_resolved_notifications: Send an email notification when an alert is marked as resolved.
:param send_resolved_notifications: Send an email notification when an alert is marked as resolved.
:return: :class:`ContactPoint <ContactPoint>`

Usage:
Expand All @@ -1262,7 +1262,7 @@ def create_contact_point(
RegionalApiCreateContactPointRequest(
region=region,
project_id=project_id,
receive_resolved_notifications=receive_resolved_notifications,
send_resolved_notifications=send_resolved_notifications,
email=email,
),
self.client,
Expand Down Expand Up @@ -1353,14 +1353,14 @@ def update_contact_point(
region: Optional[ScwRegion] = None,
project_id: Optional[str] = None,
email: Optional[ContactPointEmail] = None,
receive_resolved_notifications: Optional[bool] = None,
send_resolved_notifications: Optional[bool] = None,
) -> ContactPoint:
"""
:param region: Region to target. If none is passed will use default region from the config.
:param project_id: ID of the Project containing the contact point to update.
:param email: Email address of the contact point to update.
One-Of ('configuration'): at most one of 'email' could be set.
:param receive_resolved_notifications: Enable or disable notifications when alert is resolved.
:param send_resolved_notifications: Enable or disable notifications when alert is resolved.
:return: :class:`ContactPoint <ContactPoint>`

Usage:
Expand All @@ -1380,7 +1380,7 @@ def update_contact_point(
RegionalApiUpdateContactPointRequest(
region=region,
project_id=project_id,
receive_resolved_notifications=receive_resolved_notifications,
send_resolved_notifications=send_resolved_notifications,
email=email,
),
self.client,
Expand Down
16 changes: 6 additions & 10 deletions scaleway/scaleway/cockpit/v1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ def unmarshal_ContactPoint(data: Any) -> ContactPoint:
if field is not None:
args["region"] = field

field = data.get("receive_resolved_notifications", None)
field = data.get("send_resolved_notifications", None)
if field is not None:
args["receive_resolved_notifications"] = field
args["send_resolved_notifications"] = field

field = data.get("email", None)
if field is not None:
Expand Down Expand Up @@ -792,10 +792,8 @@ def marshal_RegionalApiCreateContactPointRequest(
if request.project_id is not None:
output["project_id"] = request.project_id or defaults.default_project_id

if request.receive_resolved_notifications is not None:
output["receive_resolved_notifications"] = (
request.receive_resolved_notifications
)
if request.send_resolved_notifications is not None:
output["send_resolved_notifications"] = request.send_resolved_notifications

return output

Expand Down Expand Up @@ -934,10 +932,8 @@ def marshal_RegionalApiUpdateContactPointRequest(
if request.project_id is not None:
output["project_id"] = request.project_id or defaults.default_project_id

if request.receive_resolved_notifications is not None:
output["receive_resolved_notifications"] = (
request.receive_resolved_notifications
)
if request.send_resolved_notifications is not None:
output["send_resolved_notifications"] = request.send_resolved_notifications

return output

Expand Down
6 changes: 3 additions & 3 deletions scaleway/scaleway/cockpit/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class ContactPoint:
Region.
"""

receive_resolved_notifications: bool
send_resolved_notifications: bool
"""
Send an email notification when an alert is marked as resolved.
"""
Expand Down Expand Up @@ -859,7 +859,7 @@ class RegionalApiCreateContactPointRequest:
ID of the Project to create the contact point in.
"""

receive_resolved_notifications: Optional[bool]
send_resolved_notifications: Optional[bool]
"""
Send an email notification when an alert is marked as resolved.
"""
Expand Down Expand Up @@ -1293,7 +1293,7 @@ class RegionalApiUpdateContactPointRequest:
ID of the Project containing the contact point to update.
"""

receive_resolved_notifications: Optional[bool]
send_resolved_notifications: Optional[bool]
"""
Enable or disable notifications when alert is resolved.
"""
Expand Down