diff --git a/scaleway-async/scaleway_async/tem/v1alpha1/__init__.py b/scaleway-async/scaleway_async/tem/v1alpha1/__init__.py index fa738313..1a720395 100644 --- a/scaleway-async/scaleway_async/tem/v1alpha1/__init__.py +++ b/scaleway-async/scaleway_async/tem/v1alpha1/__init__.py @@ -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 @@ -106,7 +109,10 @@ "ProjectSettingsPeriodicReportFrequency", "WebhookEventStatus", "WebhookEventType", + "DomainRecordsDKIM", "DomainRecordsDMARC", + "DomainRecordsMX", + "DomainRecordsSPF", "EmailTry", "DomainRecords", "DomainReputation", diff --git a/scaleway-async/scaleway_async/tem/v1alpha1/marshalling.py b/scaleway-async/scaleway_async/tem/v1alpha1/marshalling.py index a3d9aeb4..491d43ee 100644 --- a/scaleway-async/scaleway_async/tem/v1alpha1/marshalling.py +++ b/scaleway-async/scaleway_async/tem/v1alpha1/marshalling.py @@ -21,7 +21,10 @@ WebhookEventType, EmailTry, Email, + DomainRecordsDKIM, DomainRecordsDMARC, + DomainRecordsMX, + DomainRecordsSPF, DomainRecords, DomainReputation, DomainStatistics, @@ -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( @@ -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( @@ -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) diff --git a/scaleway-async/scaleway_async/tem/v1alpha1/types.py b/scaleway-async/scaleway_async/tem/v1alpha1/types.py index 5b58cb41..f1cfe51b 100644 --- a/scaleway-async/scaleway_async/tem/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/tem/v1alpha1/types.py @@ -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 @@ -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 @@ -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: diff --git a/scaleway/scaleway/tem/v1alpha1/__init__.py b/scaleway/scaleway/tem/v1alpha1/__init__.py index fa738313..1a720395 100644 --- a/scaleway/scaleway/tem/v1alpha1/__init__.py +++ b/scaleway/scaleway/tem/v1alpha1/__init__.py @@ -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 @@ -106,7 +109,10 @@ "ProjectSettingsPeriodicReportFrequency", "WebhookEventStatus", "WebhookEventType", + "DomainRecordsDKIM", "DomainRecordsDMARC", + "DomainRecordsMX", + "DomainRecordsSPF", "EmailTry", "DomainRecords", "DomainReputation", diff --git a/scaleway/scaleway/tem/v1alpha1/marshalling.py b/scaleway/scaleway/tem/v1alpha1/marshalling.py index a3d9aeb4..491d43ee 100644 --- a/scaleway/scaleway/tem/v1alpha1/marshalling.py +++ b/scaleway/scaleway/tem/v1alpha1/marshalling.py @@ -21,7 +21,10 @@ WebhookEventType, EmailTry, Email, + DomainRecordsDKIM, DomainRecordsDMARC, + DomainRecordsMX, + DomainRecordsSPF, DomainRecords, DomainReputation, DomainStatistics, @@ -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( @@ -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( @@ -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) diff --git a/scaleway/scaleway/tem/v1alpha1/types.py b/scaleway/scaleway/tem/v1alpha1/types.py index 5b58cb41..f1cfe51b 100644 --- a/scaleway/scaleway/tem/v1alpha1/types.py +++ b/scaleway/scaleway/tem/v1alpha1/types.py @@ -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 @@ -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 @@ -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: