Skip to content

Commit 78086f8

Browse files
committed
Updated the authoritative zone model to include an optional purged flag.
Updated the authoritative zone server model to include a synchronization timestamp.
1 parent ac9fd7e commit 78086f8

3 files changed

Lines changed: 25 additions & 0 deletions

File tree

src/dnsmin/enums.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ class ZoneServerStateEnum(str, Enum):
159159
syncing = "syncing"
160160
"""The zone is actively syncing."""
161161

162+
purged = "purged"
163+
"""The zone has been purged."""
164+
162165

163166
class ZoneRecordTypeEnum(str, Enum):
164167
"""Defines the different types of zone records there can be."""

src/dnsmin/models/zones/azone.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,13 @@ class AZone(BaseModel):
172172
)
173173
"""Indicates whether the zone is shared between tenants."""
174174

175+
purged: Optional[bool] = Field(
176+
title='Purged',
177+
description='Indicates whether the zone has been queued for purging (false) or purged (true).',
178+
default=None,
179+
)
180+
"""Indicates whether the zone has been queued for purging (false) or purged (true)."""
181+
175182
created_at: datetime = Field(
176183
title='Created At',
177184
description='The timestamp representing when the authoritative zone was created.',
@@ -347,6 +354,13 @@ class CreateAZone(BaseModel):
347354
)
348355
"""Indicates whether the zone is shared between tenants."""
349356

357+
purged: Optional[bool] = Field(
358+
title='Purged',
359+
description='Indicates whether the zone has been queued for purging (false) or purged (true).',
360+
default=None,
361+
)
362+
"""Indicates whether the zone has been queued for purging (false) or purged (true)."""
363+
350364

351365
class UpdateAZone(CreateAZone):
352366
"""Provides an API input model for updating authoritative zones."""

src/dnsmin/models/zones/azone_server.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ class AZoneServer(BaseModel):
6464
)
6565
"""The timestamp representing when the authoritative zone record was last updated."""
6666

67+
synchronized_at: Optional[datetime] = Field(
68+
title='Synchronized At',
69+
description='The timestamp representing when the zone was last synchronized.',
70+
default=None,
71+
examples=[datetime.now()],
72+
)
73+
"""The timestamp representing when the zone was last synchronized."""
74+
6775

6876
class CreateAZoneServer(BaseModel):
6977
"""Provides an API input model for creating authoritative zone records."""

0 commit comments

Comments
 (0)