@@ -30,7 +30,8 @@ class CreateDns(BaseModel):
3030 subdomain : Optional [Any ] = Field (None , description = "Полное имя поддомена." )
3131 type : Optional [Any ] = Field (..., description = "Тип DNS-записи." )
3232 value : Optional [Any ] = Field (..., description = "Значение DNS-записи." )
33- __properties = ["priority" , "subdomain" , "type" , "value" ]
33+ ttl : Optional [Any ] = Field (None , description = "Время жизни DNS-записи." )
34+ __properties = ["priority" , "subdomain" , "type" , "value" , "ttl" ]
3435
3536 @validator ('type' )
3637 def type_validate_enum (cls , value ):
@@ -86,6 +87,11 @@ def to_dict(self):
8687 if self .value is None and "value" in self .__fields_set__ :
8788 _dict ['value' ] = None
8889
90+ # set to None if ttl (nullable) is None
91+ # and __fields_set__ contains the field
92+ if self .ttl is None and "ttl" in self .__fields_set__ :
93+ _dict ['ttl' ] = None
94+
8995 return _dict
9096
9197 @classmethod
@@ -101,7 +107,8 @@ def from_dict(cls, obj: dict) -> CreateDns:
101107 "priority" : obj .get ("priority" ),
102108 "subdomain" : obj .get ("subdomain" ),
103109 "type" : obj .get ("type" ),
104- "value" : obj .get ("value" )
110+ "value" : obj .get ("value" ),
111+ "ttl" : obj .get ("ttl" )
105112 })
106113 return _obj
107114
0 commit comments