Skip to content
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: 1 addition & 7 deletions scaleway-async/scaleway_async/mailbox/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,16 +498,12 @@ async def update_mailbox(
self,
*,
mailbox_id: str,
display_name: Optional[str] = None,
recovery_email: Optional[str] = None,
subscription_period: Optional[MailboxSubscriptionPeriod] = None,
new_password: Optional[str] = None,
) -> Mailbox:
"""
Update a mailbox name, recovery email, subscription period or password with its ID.
Update a mailbox subscription period or password with its ID.
:param mailbox_id: ID of the mailbox to update.
:param display_name: (Optional) New display name of the mailbox.
:param recovery_email: (Optional) New recovery email for the mailbox.
:param subscription_period: (Optional) New subscription period for the mailbox.
:param new_password: (Optional) New password of the mailbox.
:return: :class:`Mailbox <Mailbox>`
Expand All @@ -528,8 +524,6 @@ async def update_mailbox(
body=marshal_UpdateMailboxRequest(
UpdateMailboxRequest(
mailbox_id=mailbox_id,
display_name=display_name,
recovery_email=recovery_email,
subscription_period=subscription_period,
new_password=new_password,
),
Expand Down
24 changes: 0 additions & 24 deletions scaleway-async/scaleway_async/mailbox/v1alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,12 @@ def unmarshal_Mailbox(data: Any) -> Mailbox:
else:
args["domain_id"] = None

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

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

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

field = data.get("status", None)
if field is not None:
args["status"] = field
Expand Down Expand Up @@ -449,12 +437,6 @@ def marshal_BatchCreateMailboxesRequestMailboxParameters(
if request.password is not None:
output["password"] = request.password

if request.display_name is not None:
output["display_name"] = request.display_name

if request.recovery_email is not None:
output["recovery_email"] = request.recovery_email

return output


Expand Down Expand Up @@ -502,12 +484,6 @@ def marshal_UpdateMailboxRequest(
) -> dict[str, Any]:
output: dict[str, Any] = {}

if request.display_name is not None:
output["display_name"] = request.display_name

if request.recovery_email is not None:
output["recovery_email"] = request.recovery_email

if request.subscription_period is not None:
output["subscription_period"] = request.subscription_period

Expand Down
22 changes: 0 additions & 22 deletions scaleway-async/scaleway_async/mailbox/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ def __str__(self) -> str:
class BatchCreateMailboxesRequestMailboxParameters:
local_part: str
password: str
display_name: Optional[str] = None
recovery_email: Optional[str] = None


@dataclass
Expand All @@ -131,21 +129,11 @@ class Mailbox:
ID of the domain to which the mailbox belongs.
"""

display_name: str
"""
Name of the mailbox.
"""

email: str
"""
Email address of the mailbox as local_part@domain.
"""

recovery_email: str
"""
Recovery email for the mailbox.
"""

status: MailboxStatus
"""
Status of the mailbox.
Expand Down Expand Up @@ -540,16 +528,6 @@ class UpdateMailboxRequest:
ID of the mailbox to update.
"""

display_name: Optional[str] = None
"""
(Optional) New display name of the mailbox.
"""

recovery_email: Optional[str] = None
"""
(Optional) New recovery email for the mailbox.
"""

subscription_period: Optional[MailboxSubscriptionPeriod] = (
MailboxSubscriptionPeriod.UNKNOWN_SUBSCRIPTION_PERIOD
)
Expand Down
8 changes: 1 addition & 7 deletions scaleway/scaleway/mailbox/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,16 +498,12 @@ def update_mailbox(
self,
*,
mailbox_id: str,
display_name: Optional[str] = None,
recovery_email: Optional[str] = None,
subscription_period: Optional[MailboxSubscriptionPeriod] = None,
new_password: Optional[str] = None,
) -> Mailbox:
"""
Update a mailbox name, recovery email, subscription period or password with its ID.
Update a mailbox subscription period or password with its ID.
:param mailbox_id: ID of the mailbox to update.
:param display_name: (Optional) New display name of the mailbox.
:param recovery_email: (Optional) New recovery email for the mailbox.
:param subscription_period: (Optional) New subscription period for the mailbox.
:param new_password: (Optional) New password of the mailbox.
:return: :class:`Mailbox <Mailbox>`
Expand All @@ -528,8 +524,6 @@ def update_mailbox(
body=marshal_UpdateMailboxRequest(
UpdateMailboxRequest(
mailbox_id=mailbox_id,
display_name=display_name,
recovery_email=recovery_email,
subscription_period=subscription_period,
new_password=new_password,
),
Expand Down
24 changes: 0 additions & 24 deletions scaleway/scaleway/mailbox/v1alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,12 @@ def unmarshal_Mailbox(data: Any) -> Mailbox:
else:
args["domain_id"] = None

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

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

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

field = data.get("status", None)
if field is not None:
args["status"] = field
Expand Down Expand Up @@ -449,12 +437,6 @@ def marshal_BatchCreateMailboxesRequestMailboxParameters(
if request.password is not None:
output["password"] = request.password

if request.display_name is not None:
output["display_name"] = request.display_name

if request.recovery_email is not None:
output["recovery_email"] = request.recovery_email

return output


Expand Down Expand Up @@ -502,12 +484,6 @@ def marshal_UpdateMailboxRequest(
) -> dict[str, Any]:
output: dict[str, Any] = {}

if request.display_name is not None:
output["display_name"] = request.display_name

if request.recovery_email is not None:
output["recovery_email"] = request.recovery_email

if request.subscription_period is not None:
output["subscription_period"] = request.subscription_period

Expand Down
22 changes: 0 additions & 22 deletions scaleway/scaleway/mailbox/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ def __str__(self) -> str:
class BatchCreateMailboxesRequestMailboxParameters:
local_part: str
password: str
display_name: Optional[str] = None
recovery_email: Optional[str] = None


@dataclass
Expand All @@ -131,21 +129,11 @@ class Mailbox:
ID of the domain to which the mailbox belongs.
"""

display_name: str
"""
Name of the mailbox.
"""

email: str
"""
Email address of the mailbox as local_part@domain.
"""

recovery_email: str
"""
Recovery email for the mailbox.
"""

status: MailboxStatus
"""
Status of the mailbox.
Expand Down Expand Up @@ -540,16 +528,6 @@ class UpdateMailboxRequest:
ID of the mailbox to update.
"""

display_name: Optional[str] = None
"""
(Optional) New display name of the mailbox.
"""

recovery_email: Optional[str] = None
"""
(Optional) New recovery email for the mailbox.
"""

subscription_period: Optional[MailboxSubscriptionPeriod] = (
MailboxSubscriptionPeriod.UNKNOWN_SUBSCRIPTION_PERIOD
)
Expand Down
Loading