Skip to content

Commit 051bac4

Browse files
authored
feat(domain): add status to contact message (#430)
1 parent 07111c0 commit 051bac4

File tree

6 files changed

+110
-0
lines changed

6 files changed

+110
-0
lines changed

scaleway-async/scaleway_async/domain/v2beta1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from .types import ContactExtensionFRMode
55
from .types import ContactExtensionNLLegalForm
66
from .types import ContactLegalForm
7+
from .types import ContactStatus
78
from .types import DNSZoneStatus
89
from .types import DSRecordAlgorithm
910
from .types import DSRecordDigestType
@@ -123,6 +124,7 @@
123124
"ContactExtensionFRMode",
124125
"ContactExtensionNLLegalForm",
125126
"ContactLegalForm",
127+
"ContactStatus",
126128
"DNSZoneStatus",
127129
"DSRecordAlgorithm",
128130
"DSRecordDigestType",

scaleway-async/scaleway_async/domain/v2beta1/marshalling.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,9 @@ def unmarshal_Contact(data: Any) -> Contact:
653653
field = data.get("state", None)
654654
args["state"] = field
655655

656+
field = data.get("status", None)
657+
args["status"] = field
658+
656659
field = data.get("vat_identification_code", None)
657660
args["vat_identification_code"] = field
658661

@@ -1191,6 +1194,9 @@ def unmarshal_Task(data: Any) -> Task:
11911194

11921195
args: Dict[str, Any] = {}
11931196

1197+
field = data.get("contact_identifier", None)
1198+
args["contact_identifier"] = field
1199+
11941200
field = data.get("domain", None)
11951201
args["domain"] = field
11961202

scaleway-async/scaleway_async/domain/v2beta1/types.py

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,15 @@ def __str__(self) -> str:
7878
return str(self.value)
7979

8080

81+
class ContactStatus(str, Enum, metaclass=StrEnumMeta):
82+
STATUS_UNKNOWN = "status_unknown"
83+
ACTIVE = "active"
84+
PENDING = "pending"
85+
86+
def __str__(self) -> str:
87+
return str(self.value)
88+
89+
8190
class DNSZoneStatus(str, Enum, metaclass=StrEnumMeta):
8291
UNKNOWN = "unknown"
8392
ACTIVE = "active"
@@ -466,6 +475,8 @@ class Contact:
466475

467476
extension_nl: Optional[ContactExtensionNL]
468477

478+
status: ContactStatus
479+
469480

470481
@dataclass
471482
class ContactExtensionEU:
@@ -1317,23 +1328,59 @@ class SearchAvailableDomainsResponse:
13171328

13181329
@dataclass
13191330
class Task:
1331+
"""
1332+
Task.
1333+
"""
1334+
13201335
id: str
1336+
"""
1337+
The unique identifier of the task.
1338+
"""
13211339

13221340
project_id: str
1341+
"""
1342+
The project ID associated to the task.
1343+
"""
13231344

13241345
organization_id: str
1346+
"""
1347+
The organization ID associated to the task.
1348+
"""
13251349

13261350
domain: Optional[str]
1351+
"""
1352+
The domain name associated to the task.
1353+
"""
13271354

13281355
type_: TaskType
1356+
"""
1357+
The type of the task.
1358+
"""
13291359

13301360
status: TaskStatus
1361+
"""
1362+
The status of the task.
1363+
"""
13311364

13321365
started_at: Optional[datetime]
1366+
"""
1367+
Start date of the task.
1368+
"""
13331369

13341370
updated_at: Optional[datetime]
1371+
"""
1372+
Last update of the task.
1373+
"""
13351374

13361375
message: Optional[str]
1376+
"""
1377+
Error message associated to the task.
1378+
"""
1379+
1380+
contact_identifier: Optional[str]
1381+
"""
1382+
Human-friendly contact identifier used when the task concerns a contact.
1383+
"""
13371384

13381385

13391386
@dataclass

scaleway/scaleway/domain/v2beta1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from .types import ContactExtensionFRMode
55
from .types import ContactExtensionNLLegalForm
66
from .types import ContactLegalForm
7+
from .types import ContactStatus
78
from .types import DNSZoneStatus
89
from .types import DSRecordAlgorithm
910
from .types import DSRecordDigestType
@@ -123,6 +124,7 @@
123124
"ContactExtensionFRMode",
124125
"ContactExtensionNLLegalForm",
125126
"ContactLegalForm",
127+
"ContactStatus",
126128
"DNSZoneStatus",
127129
"DSRecordAlgorithm",
128130
"DSRecordDigestType",

scaleway/scaleway/domain/v2beta1/marshalling.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,9 @@ def unmarshal_Contact(data: Any) -> Contact:
653653
field = data.get("state", None)
654654
args["state"] = field
655655

656+
field = data.get("status", None)
657+
args["status"] = field
658+
656659
field = data.get("vat_identification_code", None)
657660
args["vat_identification_code"] = field
658661

@@ -1191,6 +1194,9 @@ def unmarshal_Task(data: Any) -> Task:
11911194

11921195
args: Dict[str, Any] = {}
11931196

1197+
field = data.get("contact_identifier", None)
1198+
args["contact_identifier"] = field
1199+
11941200
field = data.get("domain", None)
11951201
args["domain"] = field
11961202

scaleway/scaleway/domain/v2beta1/types.py

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,15 @@ def __str__(self) -> str:
7878
return str(self.value)
7979

8080

81+
class ContactStatus(str, Enum, metaclass=StrEnumMeta):
82+
STATUS_UNKNOWN = "status_unknown"
83+
ACTIVE = "active"
84+
PENDING = "pending"
85+
86+
def __str__(self) -> str:
87+
return str(self.value)
88+
89+
8190
class DNSZoneStatus(str, Enum, metaclass=StrEnumMeta):
8291
UNKNOWN = "unknown"
8392
ACTIVE = "active"
@@ -466,6 +475,8 @@ class Contact:
466475

467476
extension_nl: Optional[ContactExtensionNL]
468477

478+
status: ContactStatus
479+
469480

470481
@dataclass
471482
class ContactExtensionEU:
@@ -1317,23 +1328,59 @@ class SearchAvailableDomainsResponse:
13171328

13181329
@dataclass
13191330
class Task:
1331+
"""
1332+
Task.
1333+
"""
1334+
13201335
id: str
1336+
"""
1337+
The unique identifier of the task.
1338+
"""
13211339

13221340
project_id: str
1341+
"""
1342+
The project ID associated to the task.
1343+
"""
13231344

13241345
organization_id: str
1346+
"""
1347+
The organization ID associated to the task.
1348+
"""
13251349

13261350
domain: Optional[str]
1351+
"""
1352+
The domain name associated to the task.
1353+
"""
13271354

13281355
type_: TaskType
1356+
"""
1357+
The type of the task.
1358+
"""
13291359

13301360
status: TaskStatus
1361+
"""
1362+
The status of the task.
1363+
"""
13311364

13321365
started_at: Optional[datetime]
1366+
"""
1367+
Start date of the task.
1368+
"""
13331369

13341370
updated_at: Optional[datetime]
1371+
"""
1372+
Last update of the task.
1373+
"""
13351374

13361375
message: Optional[str]
1376+
"""
1377+
Error message associated to the task.
1378+
"""
1379+
1380+
contact_identifier: Optional[str]
1381+
"""
1382+
Human-friendly contact identifier used when the task concerns a contact.
1383+
"""
13371384

13381385

13391386
@dataclass

0 commit comments

Comments
 (0)