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
6 changes: 6 additions & 0 deletions scaleway-async/scaleway_async/tem/v1alpha1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
from .types import ProjectSettingsPeriodicReportFrequency
from .types import WebhookEventStatus
from .types import WebhookEventType
from .types import DomainRecordsDKIM
from .types import DomainRecordsDMARC
from .types import DomainRecordsMX
from .types import DomainRecordsSPF
from .types import EmailTry
from .types import DomainRecords
from .types import DomainReputation
Expand Down Expand Up @@ -106,7 +109,10 @@
"ProjectSettingsPeriodicReportFrequency",
"WebhookEventStatus",
"WebhookEventType",
"DomainRecordsDKIM",
"DomainRecordsDMARC",
"DomainRecordsMX",
"DomainRecordsSPF",
"EmailTry",
"DomainRecords",
"DomainReputation",
Expand Down
90 changes: 90 additions & 0 deletions scaleway-async/scaleway_async/tem/v1alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
WebhookEventType,
EmailTry,
Email,
DomainRecordsDKIM,
DomainRecordsDMARC,
DomainRecordsMX,
DomainRecordsSPF,
DomainRecords,
DomainReputation,
DomainStatistics,
Expand Down Expand Up @@ -205,6 +208,29 @@ def unmarshal_Email(data: Any) -> Email:
return Email(**args)


def unmarshal_DomainRecordsDKIM(data: Any) -> DomainRecordsDKIM:
if not isinstance(data, dict):
raise TypeError(
"Unmarshalling the type 'DomainRecordsDKIM' failed as data isn't a dictionary."
)

args: dict[str, Any] = {}

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

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

return DomainRecordsDKIM(**args)


def unmarshal_DomainRecordsDMARC(data: Any) -> DomainRecordsDMARC:
if not isinstance(data, dict):
raise TypeError(
Expand All @@ -228,6 +254,52 @@ def unmarshal_DomainRecordsDMARC(data: Any) -> DomainRecordsDMARC:
return DomainRecordsDMARC(**args)


def unmarshal_DomainRecordsMX(data: Any) -> DomainRecordsMX:
if not isinstance(data, dict):
raise TypeError(
"Unmarshalling the type 'DomainRecordsMX' failed as data isn't a dictionary."
)

args: dict[str, Any] = {}

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

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

return DomainRecordsMX(**args)


def unmarshal_DomainRecordsSPF(data: Any) -> DomainRecordsSPF:
if not isinstance(data, dict):
raise TypeError(
"Unmarshalling the type 'DomainRecordsSPF' failed as data isn't a dictionary."
)

args: dict[str, Any] = {}

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

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

return DomainRecordsSPF(**args)


def unmarshal_DomainRecords(data: Any) -> DomainRecords:
if not isinstance(data, dict):
raise TypeError(
Expand All @@ -242,6 +314,24 @@ def unmarshal_DomainRecords(data: Any) -> DomainRecords:
else:
args["dmarc"] = None

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

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

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

return DomainRecords(**args)


Expand Down
54 changes: 54 additions & 0 deletions scaleway-async/scaleway_async/tem/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,19 @@ def __str__(self) -> str:
return str(self.value)


@dataclass
class DomainRecordsDKIM:
name: str
"""
Name of the DKIM TXT record.
"""

value: str
"""
Value of the DKIM TXT record.
"""


@dataclass
class DomainRecordsDMARC:
name: str
Expand All @@ -218,6 +231,32 @@ class DomainRecordsDMARC:
"""


@dataclass
class DomainRecordsMX:
name: str
"""
Name of the MX record.
"""

value: str
"""
Value of the MX record.
"""


@dataclass
class DomainRecordsSPF:
name: str
"""
Name of the SPF TXT record.
"""

value: str
"""
Value of the SPF TXT record.
"""


@dataclass
class EmailTry:
rank: int
Expand Down Expand Up @@ -248,6 +287,21 @@ class DomainRecords:
DMARC TXT record specification.
"""

dkim: Optional[DomainRecordsDKIM] = None
"""
DKIM TXT record specification.
"""

spf: Optional[DomainRecordsSPF] = None
"""
SPF TXT record specification.
"""

mx: Optional[DomainRecordsMX] = None
"""
MX record specification.
"""


@dataclass
class DomainReputation:
Expand Down
6 changes: 6 additions & 0 deletions scaleway/scaleway/tem/v1alpha1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
from .types import ProjectSettingsPeriodicReportFrequency
from .types import WebhookEventStatus
from .types import WebhookEventType
from .types import DomainRecordsDKIM
from .types import DomainRecordsDMARC
from .types import DomainRecordsMX
from .types import DomainRecordsSPF
from .types import EmailTry
from .types import DomainRecords
from .types import DomainReputation
Expand Down Expand Up @@ -106,7 +109,10 @@
"ProjectSettingsPeriodicReportFrequency",
"WebhookEventStatus",
"WebhookEventType",
"DomainRecordsDKIM",
"DomainRecordsDMARC",
"DomainRecordsMX",
"DomainRecordsSPF",
"EmailTry",
"DomainRecords",
"DomainReputation",
Expand Down
90 changes: 90 additions & 0 deletions scaleway/scaleway/tem/v1alpha1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
WebhookEventType,
EmailTry,
Email,
DomainRecordsDKIM,
DomainRecordsDMARC,
DomainRecordsMX,
DomainRecordsSPF,
DomainRecords,
DomainReputation,
DomainStatistics,
Expand Down Expand Up @@ -205,6 +208,29 @@ def unmarshal_Email(data: Any) -> Email:
return Email(**args)


def unmarshal_DomainRecordsDKIM(data: Any) -> DomainRecordsDKIM:
if not isinstance(data, dict):
raise TypeError(
"Unmarshalling the type 'DomainRecordsDKIM' failed as data isn't a dictionary."
)

args: dict[str, Any] = {}

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

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

return DomainRecordsDKIM(**args)


def unmarshal_DomainRecordsDMARC(data: Any) -> DomainRecordsDMARC:
if not isinstance(data, dict):
raise TypeError(
Expand All @@ -228,6 +254,52 @@ def unmarshal_DomainRecordsDMARC(data: Any) -> DomainRecordsDMARC:
return DomainRecordsDMARC(**args)


def unmarshal_DomainRecordsMX(data: Any) -> DomainRecordsMX:
if not isinstance(data, dict):
raise TypeError(
"Unmarshalling the type 'DomainRecordsMX' failed as data isn't a dictionary."
)

args: dict[str, Any] = {}

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

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

return DomainRecordsMX(**args)


def unmarshal_DomainRecordsSPF(data: Any) -> DomainRecordsSPF:
if not isinstance(data, dict):
raise TypeError(
"Unmarshalling the type 'DomainRecordsSPF' failed as data isn't a dictionary."
)

args: dict[str, Any] = {}

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

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

return DomainRecordsSPF(**args)


def unmarshal_DomainRecords(data: Any) -> DomainRecords:
if not isinstance(data, dict):
raise TypeError(
Expand All @@ -242,6 +314,24 @@ def unmarshal_DomainRecords(data: Any) -> DomainRecords:
else:
args["dmarc"] = None

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

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

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

return DomainRecords(**args)


Expand Down
Loading