@@ -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