Skip to content

Commit 525bfe6

Browse files
committed
Updated: 2026-02-12
1 parent f8d5305 commit 525bfe6

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

docs/CreateDnsV2.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
77
**type** | **object** | Тип DNS-записи. |
88
**value** | **object** | IPv4 адрес. |
99
**ttl** | **object** | Время жизни DNS-записи в секундах. | [optional]
10+
**app_id** | **object** | Идентификатор приложения в App Platform, к которому будет привязан домен или поддомен. | [optional]
1011

1112
## Example
1213

test/test_create_dns_v2.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ def make_instance(self, include_optional):
4141
return CreateDnsV2(
4242
type = A,
4343
value = 192.168.1.0,
44-
ttl = 600
44+
ttl = 600,
45+
app_id = 1
4546
)
4647
else :
4748
return CreateDnsV2(

timeweb_cloud_api/models/create_dns_v2.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ class CreateDnsV2(BaseModel):
2929
type: Optional[Any] = Field(..., description="Тип DNS-записи.")
3030
value: Optional[Any] = Field(..., description="IPv4 адрес.")
3131
ttl: Optional[Any] = Field(None, description="Время жизни DNS-записи в секундах.")
32-
__properties = ["type", "value", "ttl"]
32+
app_id: Optional[Any] = Field(None, description="Идентификатор приложения в App Platform, к которому будет привязан домен или поддомен.")
33+
__properties = ["type", "value", "ttl", "app_id"]
3334

3435
@validator('type')
3536
def type_validate_enum(cls, value):
@@ -80,6 +81,11 @@ def to_dict(self):
8081
if self.ttl is None and "ttl" in self.__fields_set__:
8182
_dict['ttl'] = None
8283

84+
# set to None if app_id (nullable) is None
85+
# and __fields_set__ contains the field
86+
if self.app_id is None and "app_id" in self.__fields_set__:
87+
_dict['app_id'] = None
88+
8389
return _dict
8490

8591
@classmethod
@@ -94,7 +100,8 @@ def from_dict(cls, obj: dict) -> CreateDnsV2:
94100
_obj = CreateDnsV2.parse_obj({
95101
"type": obj.get("type"),
96102
"value": obj.get("value"),
97-
"ttl": obj.get("ttl")
103+
"ttl": obj.get("ttl"),
104+
"app_id": obj.get("app_id")
98105
})
99106
return _obj
100107

0 commit comments

Comments
 (0)