Skip to content

Commit 24e0e33

Browse files
committed
Updated: 2025-04-07
1 parent 61b57fe commit 24e0e33

10 files changed

Lines changed: 155 additions & 5 deletions

docs/Balancer.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ Name | Type | Description | Notes
1818
**port** | **object** | Порт балансировщика. |
1919
**proto** | **object** | Протокол. |
2020
**rise** | **object** | Порог количества успешных ответов. |
21+
**maxconn** | **object** | Максимальное количество соединений. |
22+
**connect_timeout** | **object** | Таймаут подключения. |
23+
**client_timeout** | **object** | Таймаут клиента. |
24+
**server_timeout** | **object** | Таймаут сервера. |
25+
**httprequest_timeout** | **object** | Таймаут HTTP запроса. |
2126
**preset_id** | **object** | ID тарифа. |
2227
**is_ssl** | **object** | Это логическое значение, которое показывает, требуется ли перенаправление на SSL. |
2328
**status** | **object** | Статус балансировщика. |

docs/CreateBalancer.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ Name | Type | Description | Notes
1717
**timeout** | **object** | Таймаут ответа балансировщика. |
1818
**fall** | **object** | Порог количества ошибок. |
1919
**rise** | **object** | Порог количества успешных ответов. |
20+
**maxconn** | **object** | Максимальное количество соединений. | [optional]
21+
**connect_timeout** | **object** | Таймаут подключения. | [optional]
22+
**client_timeout** | **object** | Таймаут клиента. | [optional]
23+
**server_timeout** | **object** | Таймаут сервера. | [optional]
24+
**httprequest_timeout** | **object** | Таймаут HTTP запроса. | [optional]
2025
**preset_id** | **object** | ID тарифа. |
2126
**network** | [**Network**](Network.md) | | [optional]
2227
**availability_zone** | [**AvailabilityZone**](AvailabilityZone.md) | | [optional]

docs/UpdateBalancer.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ Name | Type | Description | Notes
1717
**timeout** | **object** | Таймаут ответа балансировщика. | [optional]
1818
**fall** | **object** | Порог количества ошибок. | [optional]
1919
**rise** | **object** | Порог количества успешных ответов. | [optional]
20+
**maxconn** | **object** | Максимальное количество соединений. | [optional]
21+
**connect_timeout** | **object** | Таймаут подключения. | [optional]
22+
**client_timeout** | **object** | Таймаут клиента. | [optional]
23+
**server_timeout** | **object** | Таймаут сервера. | [optional]
24+
**httprequest_timeout** | **object** | Таймаут HTTP запроса. | [optional]
2025

2126
## Example
2227

test/test_balancer.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ def make_instance(self, include_optional):
5252
port = 80,
5353
proto = https,
5454
rise = 2,
55+
maxconn = 10000,
56+
connect_timeout = 5000,
57+
client_timeout = 50000,
58+
server_timeout = 50000,
59+
httprequest_timeout = 10000,
5560
preset_id = 5,
5661
is_ssl = true,
5762
status = started,
@@ -78,6 +83,11 @@ def make_instance(self, include_optional):
7883
port = 80,
7984
proto = https,
8085
rise = 2,
86+
maxconn = 10000,
87+
connect_timeout = 5000,
88+
client_timeout = 50000,
89+
server_timeout = 50000,
90+
httprequest_timeout = 10000,
8191
preset_id = 5,
8292
is_ssl = true,
8393
status = started,

test/test_create_balancer.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ def make_instance(self, include_optional):
5252
timeout = 5,
5353
fall = 3,
5454
rise = 2,
55+
maxconn = 10000,
56+
connect_timeout = 5000,
57+
client_timeout = 50000,
58+
server_timeout = 50000,
59+
httprequest_timeout = 10000,
5560
preset_id = 5,
5661
network = timeweb_cloud_api.models.network.network(
5762
id = network-1234567890,

test/test_create_balancer200_response.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ def make_instance(self, include_optional):
5353
port = 80,
5454
proto = https,
5555
rise = 2,
56+
maxconn = 10000,
57+
connect_timeout = 5000,
58+
client_timeout = 50000,
59+
server_timeout = 50000,
60+
httprequest_timeout = 10000,
5661
preset_id = 5,
5762
is_ssl = true,
5863
status = started,
@@ -80,6 +85,11 @@ def make_instance(self, include_optional):
8085
port = 80,
8186
proto = https,
8287
rise = 2,
88+
maxconn = 10000,
89+
connect_timeout = 5000,
90+
client_timeout = 50000,
91+
server_timeout = 50000,
92+
httprequest_timeout = 10000,
8393
preset_id = 5,
8494
is_ssl = true,
8595
status = started,

test/test_update_balancer.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ def make_instance(self, include_optional):
5151
inter = 10,
5252
timeout = 5,
5353
fall = 3,
54-
rise = 2
54+
rise = 2,
55+
maxconn = 10000,
56+
connect_timeout = 5000,
57+
client_timeout = 50000,
58+
server_timeout = 50000,
59+
httprequest_timeout = 10000
5560
)
5661
else :
5762
return UpdateBalancer(

timeweb_cloud_api/models/balancer.py

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ class Balancer(BaseModel):
4040
port: Optional[Any] = Field(..., description="Порт балансировщика.")
4141
proto: Optional[Any] = Field(..., description="Протокол.")
4242
rise: Optional[Any] = Field(..., description="Порог количества успешных ответов.")
43+
maxconn: Optional[Any] = Field(..., description="Максимальное количество соединений.")
44+
connect_timeout: Optional[Any] = Field(..., description="Таймаут подключения.")
45+
client_timeout: Optional[Any] = Field(..., description="Таймаут клиента.")
46+
server_timeout: Optional[Any] = Field(..., description="Таймаут сервера.")
47+
httprequest_timeout: Optional[Any] = Field(..., description="Таймаут HTTP запроса.")
4348
preset_id: Optional[Any] = Field(..., description="ID тарифа.")
4449
is_ssl: Optional[Any] = Field(..., description="Это логическое значение, которое показывает, требуется ли перенаправление на SSL.")
4550
status: Optional[Any] = Field(..., description="Статус балансировщика.")
@@ -50,7 +55,7 @@ class Balancer(BaseModel):
5055
ips: Optional[Any] = Field(..., description="Список IP-адресов, привязанных к балансировщику")
5156
location: Optional[Any] = Field(..., description="Географическое расположение балансировщика")
5257
availability_zone: AvailabilityZone = Field(...)
53-
__properties = ["id", "algo", "created_at", "fall", "inter", "ip", "local_ip", "is_keepalive", "name", "path", "port", "proto", "rise", "preset_id", "is_ssl", "status", "is_sticky", "timeout", "is_use_proxy", "rules", "ips", "location", "availability_zone"]
58+
__properties = ["id", "algo", "created_at", "fall", "inter", "ip", "local_ip", "is_keepalive", "name", "path", "port", "proto", "rise", "maxconn", "connect_timeout", "client_timeout", "server_timeout", "httprequest_timeout", "preset_id", "is_ssl", "status", "is_sticky", "timeout", "is_use_proxy", "rules", "ips", "location", "availability_zone"]
5459

5560
@validator('algo')
5661
def algo_validate_enum(cls, value):
@@ -181,6 +186,31 @@ def to_dict(self):
181186
if self.rise is None and "rise" in self.__fields_set__:
182187
_dict['rise'] = None
183188

189+
# set to None if maxconn (nullable) is None
190+
# and __fields_set__ contains the field
191+
if self.maxconn is None and "maxconn" in self.__fields_set__:
192+
_dict['maxconn'] = None
193+
194+
# set to None if connect_timeout (nullable) is None
195+
# and __fields_set__ contains the field
196+
if self.connect_timeout is None and "connect_timeout" in self.__fields_set__:
197+
_dict['connect_timeout'] = None
198+
199+
# set to None if client_timeout (nullable) is None
200+
# and __fields_set__ contains the field
201+
if self.client_timeout is None and "client_timeout" in self.__fields_set__:
202+
_dict['client_timeout'] = None
203+
204+
# set to None if server_timeout (nullable) is None
205+
# and __fields_set__ contains the field
206+
if self.server_timeout is None and "server_timeout" in self.__fields_set__:
207+
_dict['server_timeout'] = None
208+
209+
# set to None if httprequest_timeout (nullable) is None
210+
# and __fields_set__ contains the field
211+
if self.httprequest_timeout is None and "httprequest_timeout" in self.__fields_set__:
212+
_dict['httprequest_timeout'] = None
213+
184214
# set to None if preset_id (nullable) is None
185215
# and __fields_set__ contains the field
186216
if self.preset_id is None and "preset_id" in self.__fields_set__:
@@ -251,6 +281,11 @@ def from_dict(cls, obj: dict) -> Balancer:
251281
"port": obj.get("port"),
252282
"proto": obj.get("proto"),
253283
"rise": obj.get("rise"),
284+
"maxconn": obj.get("maxconn"),
285+
"connect_timeout": obj.get("connect_timeout"),
286+
"client_timeout": obj.get("client_timeout"),
287+
"server_timeout": obj.get("server_timeout"),
288+
"httprequest_timeout": obj.get("httprequest_timeout"),
254289
"preset_id": obj.get("preset_id"),
255290
"is_ssl": obj.get("is_ssl"),
256291
"status": obj.get("status"),

timeweb_cloud_api/models/create_balancer.py

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,15 @@ class CreateBalancer(BaseModel):
4141
timeout: Optional[Any] = Field(..., description="Таймаут ответа балансировщика.")
4242
fall: Optional[Any] = Field(..., description="Порог количества ошибок.")
4343
rise: Optional[Any] = Field(..., description="Порог количества успешных ответов.")
44+
maxconn: Optional[Any] = Field(None, description="Максимальное количество соединений.")
45+
connect_timeout: Optional[Any] = Field(None, description="Таймаут подключения.")
46+
client_timeout: Optional[Any] = Field(None, description="Таймаут клиента.")
47+
server_timeout: Optional[Any] = Field(None, description="Таймаут сервера.")
48+
httprequest_timeout: Optional[Any] = Field(None, description="Таймаут HTTP запроса.")
4449
preset_id: Optional[Any] = Field(..., description="ID тарифа.")
4550
network: Optional[Network] = None
4651
availability_zone: Optional[AvailabilityZone] = None
47-
__properties = ["name", "algo", "is_sticky", "is_use_proxy", "is_ssl", "is_keepalive", "proto", "port", "path", "inter", "timeout", "fall", "rise", "preset_id", "network", "availability_zone"]
52+
__properties = ["name", "algo", "is_sticky", "is_use_proxy", "is_ssl", "is_keepalive", "proto", "port", "path", "inter", "timeout", "fall", "rise", "maxconn", "connect_timeout", "client_timeout", "server_timeout", "httprequest_timeout", "preset_id", "network", "availability_zone"]
4853

4954
@validator('algo')
5055
def algo_validate_enum(cls, value):
@@ -158,6 +163,31 @@ def to_dict(self):
158163
if self.rise is None and "rise" in self.__fields_set__:
159164
_dict['rise'] = None
160165

166+
# set to None if maxconn (nullable) is None
167+
# and __fields_set__ contains the field
168+
if self.maxconn is None and "maxconn" in self.__fields_set__:
169+
_dict['maxconn'] = None
170+
171+
# set to None if connect_timeout (nullable) is None
172+
# and __fields_set__ contains the field
173+
if self.connect_timeout is None and "connect_timeout" in self.__fields_set__:
174+
_dict['connect_timeout'] = None
175+
176+
# set to None if client_timeout (nullable) is None
177+
# and __fields_set__ contains the field
178+
if self.client_timeout is None and "client_timeout" in self.__fields_set__:
179+
_dict['client_timeout'] = None
180+
181+
# set to None if server_timeout (nullable) is None
182+
# and __fields_set__ contains the field
183+
if self.server_timeout is None and "server_timeout" in self.__fields_set__:
184+
_dict['server_timeout'] = None
185+
186+
# set to None if httprequest_timeout (nullable) is None
187+
# and __fields_set__ contains the field
188+
if self.httprequest_timeout is None and "httprequest_timeout" in self.__fields_set__:
189+
_dict['httprequest_timeout'] = None
190+
161191
# set to None if preset_id (nullable) is None
162192
# and __fields_set__ contains the field
163193
if self.preset_id is None and "preset_id" in self.__fields_set__:
@@ -188,6 +218,11 @@ def from_dict(cls, obj: dict) -> CreateBalancer:
188218
"timeout": obj.get("timeout"),
189219
"fall": obj.get("fall"),
190220
"rise": obj.get("rise"),
221+
"maxconn": obj.get("maxconn"),
222+
"connect_timeout": obj.get("connect_timeout"),
223+
"client_timeout": obj.get("client_timeout"),
224+
"server_timeout": obj.get("server_timeout"),
225+
"httprequest_timeout": obj.get("httprequest_timeout"),
191226
"preset_id": obj.get("preset_id"),
192227
"network": Network.from_dict(obj.get("network")) if obj.get("network") is not None else None,
193228
"availability_zone": obj.get("availability_zone")

timeweb_cloud_api/models/update_balancer.py

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ class UpdateBalancer(BaseModel):
3939
timeout: Optional[Any] = Field(None, description="Таймаут ответа балансировщика.")
4040
fall: Optional[Any] = Field(None, description="Порог количества ошибок.")
4141
rise: Optional[Any] = Field(None, description="Порог количества успешных ответов.")
42-
__properties = ["name", "algo", "is_sticky", "is_use_proxy", "is_ssl", "is_keepalive", "proto", "port", "path", "inter", "timeout", "fall", "rise"]
42+
maxconn: Optional[Any] = Field(None, description="Максимальное количество соединений.")
43+
connect_timeout: Optional[Any] = Field(None, description="Таймаут подключения.")
44+
client_timeout: Optional[Any] = Field(None, description="Таймаут клиента.")
45+
server_timeout: Optional[Any] = Field(None, description="Таймаут сервера.")
46+
httprequest_timeout: Optional[Any] = Field(None, description="Таймаут HTTP запроса.")
47+
__properties = ["name", "algo", "is_sticky", "is_use_proxy", "is_ssl", "is_keepalive", "proto", "port", "path", "inter", "timeout", "fall", "rise", "maxconn", "connect_timeout", "client_timeout", "server_timeout", "httprequest_timeout"]
4348

4449
@validator('algo')
4550
def algo_validate_enum(cls, value):
@@ -150,6 +155,31 @@ def to_dict(self):
150155
if self.rise is None and "rise" in self.__fields_set__:
151156
_dict['rise'] = None
152157

158+
# set to None if maxconn (nullable) is None
159+
# and __fields_set__ contains the field
160+
if self.maxconn is None and "maxconn" in self.__fields_set__:
161+
_dict['maxconn'] = None
162+
163+
# set to None if connect_timeout (nullable) is None
164+
# and __fields_set__ contains the field
165+
if self.connect_timeout is None and "connect_timeout" in self.__fields_set__:
166+
_dict['connect_timeout'] = None
167+
168+
# set to None if client_timeout (nullable) is None
169+
# and __fields_set__ contains the field
170+
if self.client_timeout is None and "client_timeout" in self.__fields_set__:
171+
_dict['client_timeout'] = None
172+
173+
# set to None if server_timeout (nullable) is None
174+
# and __fields_set__ contains the field
175+
if self.server_timeout is None and "server_timeout" in self.__fields_set__:
176+
_dict['server_timeout'] = None
177+
178+
# set to None if httprequest_timeout (nullable) is None
179+
# and __fields_set__ contains the field
180+
if self.httprequest_timeout is None and "httprequest_timeout" in self.__fields_set__:
181+
_dict['httprequest_timeout'] = None
182+
153183
return _dict
154184

155185
@classmethod
@@ -174,7 +204,12 @@ def from_dict(cls, obj: dict) -> UpdateBalancer:
174204
"inter": obj.get("inter"),
175205
"timeout": obj.get("timeout"),
176206
"fall": obj.get("fall"),
177-
"rise": obj.get("rise")
207+
"rise": obj.get("rise"),
208+
"maxconn": obj.get("maxconn"),
209+
"connect_timeout": obj.get("connect_timeout"),
210+
"client_timeout": obj.get("client_timeout"),
211+
"server_timeout": obj.get("server_timeout"),
212+
"httprequest_timeout": obj.get("httprequest_timeout")
178213
})
179214
return _obj
180215

0 commit comments

Comments
 (0)