Skip to content

Commit da597ef

Browse files
authored
feat(tem): deprecate accept tos on create domain (#896)
1 parent 2fcc599 commit da597ef

File tree

6 files changed

+32
-34
lines changed

6 files changed

+32
-34
lines changed

scaleway-async/scaleway_async/tem/v1alpha1/api.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ async def list_emails(
261261
:param since: (Optional) List emails created after this date.
262262
:param until: (Optional) List emails created before this date.
263263
:param mail_from: (Optional) List emails sent with this sender's email address.
264-
:param mail_to: List emails sent to this recipient's email address.
264+
:param mail_to: Deprecated. List emails sent to this recipient's email address.
265265
:param mail_rcpt: (Optional) List emails sent to this recipient's email address.
266266
:param statuses: (Optional) List emails with any of these statuses.
267267
:param subject: (Optional) List emails with this subject.
@@ -337,7 +337,7 @@ async def list_emails_all(
337337
:param since: (Optional) List emails created after this date.
338338
:param until: (Optional) List emails created before this date.
339339
:param mail_from: (Optional) List emails sent with this sender's email address.
340-
:param mail_to: List emails sent to this recipient's email address.
340+
:param mail_to: Deprecated. List emails sent to this recipient's email address.
341341
:param mail_rcpt: (Optional) List emails sent to this recipient's email address.
342342
:param statuses: (Optional) List emails with any of these statuses.
343343
:param subject: (Optional) List emails with this subject.
@@ -461,27 +461,26 @@ async def create_domain(
461461
self,
462462
*,
463463
domain_name: str,
464-
accept_tos: bool,
465464
autoconfig: bool,
466465
region: Optional[ScwRegion] = None,
467466
project_id: Optional[str] = None,
467+
accept_tos: Optional[bool] = None,
468468
) -> Domain:
469469
"""
470470
Register a domain in a project.
471471
You must specify the `region`, `project_id` and `domain_name` to register a domain in a specific Project.
472472
:param domain_name: Fully qualified domain dame.
473-
:param accept_tos: Accept Scaleway's Terms of Service.
474473
:param autoconfig: Activate auto-configuration of the domain's DNS zone.
475474
:param region: Region to target. If none is passed will use default region from the config.
476475
:param project_id: ID of the project to which the domain belongs.
476+
:param accept_tos: Deprecated. Accept Scaleway's Terms of Service.
477477
:return: :class:`Domain <Domain>`
478478
479479
Usage:
480480
::
481481
482482
result = await api.create_domain(
483483
domain_name="example",
484-
accept_tos=False,
485484
autoconfig=False,
486485
)
487486
"""
@@ -496,10 +495,10 @@ async def create_domain(
496495
body=marshal_CreateDomainRequest(
497496
CreateDomainRequest(
498497
domain_name=domain_name,
499-
accept_tos=accept_tos,
500498
autoconfig=autoconfig,
501499
region=region,
502500
project_id=project_id,
501+
accept_tos=accept_tos,
503502
),
504503
self.client,
505504
),

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -930,15 +930,15 @@ def marshal_CreateDomainRequest(
930930
if request.domain_name is not None:
931931
output["domain_name"] = request.domain_name
932932

933-
if request.accept_tos is not None:
934-
output["accept_tos"] = request.accept_tos
935-
936933
if request.autoconfig is not None:
937934
output["autoconfig"] = request.autoconfig
938935

939936
if request.project_id is not None:
940937
output["project_id"] = request.project_id or defaults.default_project_id
941938

939+
if request.accept_tos is not None:
940+
output["accept_tos"] = request.accept_tos
941+
942942
return output
943943

944944

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ class Email:
388388

389389
rcpt_to: Optional[str]
390390
"""
391-
Email address of the recipient.
391+
Deprecated. Email address of the recipient.
392392
"""
393393

394394
rcpt_type: EmailRcptType
@@ -578,7 +578,7 @@ class Domain:
578578

579579
last_error: Optional[str]
580580
"""
581-
Error message returned if the last check failed.
581+
Deprecated. Error message returned if the last check failed.
582582
"""
583583

584584
statistics: Optional[DomainStatistics]
@@ -818,11 +818,6 @@ class CreateDomainRequest:
818818
Fully qualified domain dame.
819819
"""
820820

821-
accept_tos: bool
822-
"""
823-
Accept Scaleway's Terms of Service.
824-
"""
825-
826821
autoconfig: bool
827822
"""
828823
Activate auto-configuration of the domain's DNS zone.
@@ -838,6 +833,11 @@ class CreateDomainRequest:
838833
ID of the project to which the domain belongs.
839834
"""
840835

836+
accept_tos: Optional[bool]
837+
"""
838+
Deprecated. Accept Scaleway's Terms of Service.
839+
"""
840+
841841

842842
@dataclass
843843
class CreateEmailRequest:
@@ -1250,7 +1250,7 @@ class ListEmailsRequest:
12501250

12511251
mail_to: Optional[str]
12521252
"""
1253-
List emails sent to this recipient's email address.
1253+
Deprecated. List emails sent to this recipient's email address.
12541254
"""
12551255

12561256
mail_rcpt: Optional[str]

scaleway/scaleway/tem/v1alpha1/api.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def list_emails(
261261
:param since: (Optional) List emails created after this date.
262262
:param until: (Optional) List emails created before this date.
263263
:param mail_from: (Optional) List emails sent with this sender's email address.
264-
:param mail_to: List emails sent to this recipient's email address.
264+
:param mail_to: Deprecated. List emails sent to this recipient's email address.
265265
:param mail_rcpt: (Optional) List emails sent to this recipient's email address.
266266
:param statuses: (Optional) List emails with any of these statuses.
267267
:param subject: (Optional) List emails with this subject.
@@ -337,7 +337,7 @@ def list_emails_all(
337337
:param since: (Optional) List emails created after this date.
338338
:param until: (Optional) List emails created before this date.
339339
:param mail_from: (Optional) List emails sent with this sender's email address.
340-
:param mail_to: List emails sent to this recipient's email address.
340+
:param mail_to: Deprecated. List emails sent to this recipient's email address.
341341
:param mail_rcpt: (Optional) List emails sent to this recipient's email address.
342342
:param statuses: (Optional) List emails with any of these statuses.
343343
:param subject: (Optional) List emails with this subject.
@@ -461,27 +461,26 @@ def create_domain(
461461
self,
462462
*,
463463
domain_name: str,
464-
accept_tos: bool,
465464
autoconfig: bool,
466465
region: Optional[ScwRegion] = None,
467466
project_id: Optional[str] = None,
467+
accept_tos: Optional[bool] = None,
468468
) -> Domain:
469469
"""
470470
Register a domain in a project.
471471
You must specify the `region`, `project_id` and `domain_name` to register a domain in a specific Project.
472472
:param domain_name: Fully qualified domain dame.
473-
:param accept_tos: Accept Scaleway's Terms of Service.
474473
:param autoconfig: Activate auto-configuration of the domain's DNS zone.
475474
:param region: Region to target. If none is passed will use default region from the config.
476475
:param project_id: ID of the project to which the domain belongs.
476+
:param accept_tos: Deprecated. Accept Scaleway's Terms of Service.
477477
:return: :class:`Domain <Domain>`
478478
479479
Usage:
480480
::
481481
482482
result = api.create_domain(
483483
domain_name="example",
484-
accept_tos=False,
485484
autoconfig=False,
486485
)
487486
"""
@@ -496,10 +495,10 @@ def create_domain(
496495
body=marshal_CreateDomainRequest(
497496
CreateDomainRequest(
498497
domain_name=domain_name,
499-
accept_tos=accept_tos,
500498
autoconfig=autoconfig,
501499
region=region,
502500
project_id=project_id,
501+
accept_tos=accept_tos,
503502
),
504503
self.client,
505504
),

scaleway/scaleway/tem/v1alpha1/marshalling.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -930,15 +930,15 @@ def marshal_CreateDomainRequest(
930930
if request.domain_name is not None:
931931
output["domain_name"] = request.domain_name
932932

933-
if request.accept_tos is not None:
934-
output["accept_tos"] = request.accept_tos
935-
936933
if request.autoconfig is not None:
937934
output["autoconfig"] = request.autoconfig
938935

939936
if request.project_id is not None:
940937
output["project_id"] = request.project_id or defaults.default_project_id
941938

939+
if request.accept_tos is not None:
940+
output["accept_tos"] = request.accept_tos
941+
942942
return output
943943

944944

scaleway/scaleway/tem/v1alpha1/types.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ class Email:
388388

389389
rcpt_to: Optional[str]
390390
"""
391-
Email address of the recipient.
391+
Deprecated. Email address of the recipient.
392392
"""
393393

394394
rcpt_type: EmailRcptType
@@ -578,7 +578,7 @@ class Domain:
578578

579579
last_error: Optional[str]
580580
"""
581-
Error message returned if the last check failed.
581+
Deprecated. Error message returned if the last check failed.
582582
"""
583583

584584
statistics: Optional[DomainStatistics]
@@ -818,11 +818,6 @@ class CreateDomainRequest:
818818
Fully qualified domain dame.
819819
"""
820820

821-
accept_tos: bool
822-
"""
823-
Accept Scaleway's Terms of Service.
824-
"""
825-
826821
autoconfig: bool
827822
"""
828823
Activate auto-configuration of the domain's DNS zone.
@@ -838,6 +833,11 @@ class CreateDomainRequest:
838833
ID of the project to which the domain belongs.
839834
"""
840835

836+
accept_tos: Optional[bool]
837+
"""
838+
Deprecated. Accept Scaleway's Terms of Service.
839+
"""
840+
841841

842842
@dataclass
843843
class CreateEmailRequest:
@@ -1250,7 +1250,7 @@ class ListEmailsRequest:
12501250

12511251
mail_to: Optional[str]
12521252
"""
1253-
List emails sent to this recipient's email address.
1253+
Deprecated. List emails sent to this recipient's email address.
12541254
"""
12551255

12561256
mail_rcpt: Optional[str]

0 commit comments

Comments
 (0)