Skip to content

Commit e7c2e7d

Browse files
author
BitsAdmin
committed
Merge branch 'redis-Python-2020-12-07-online-727-2024_10_31_10_10_18' into 'integration_2024-10-31_519295056642'
feat: [development task] Redis-727-Python (828542) See merge request iaasng/volcengine-python-sdk!413
2 parents 0adab3a + 5da68c5 commit e7c2e7d

7 files changed

+239
-21
lines changed

volcenginesdkredis/models/create_allow_list_request.py

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class CreateAllowListRequest(object):
3434
"""
3535
swagger_types = {
3636
'allow_list': 'str',
37+
'allow_list_category': 'str',
3738
'allow_list_desc': 'str',
3839
'allow_list_name': 'str',
3940
'allow_list_type': 'str',
@@ -42,26 +43,30 @@ class CreateAllowListRequest(object):
4243

4344
attribute_map = {
4445
'allow_list': 'AllowList',
46+
'allow_list_category': 'AllowListCategory',
4547
'allow_list_desc': 'AllowListDesc',
4648
'allow_list_name': 'AllowListName',
4749
'allow_list_type': 'AllowListType',
4850
'client_token': 'ClientToken'
4951
}
5052

51-
def __init__(self, allow_list=None, allow_list_desc=None, allow_list_name=None, allow_list_type=None, client_token=None, _configuration=None): # noqa: E501
53+
def __init__(self, allow_list=None, allow_list_category=None, allow_list_desc=None, allow_list_name=None, allow_list_type=None, client_token=None, _configuration=None): # noqa: E501
5254
"""CreateAllowListRequest - a model defined in Swagger""" # noqa: E501
5355
if _configuration is None:
5456
_configuration = Configuration()
5557
self._configuration = _configuration
5658

5759
self._allow_list = None
60+
self._allow_list_category = None
5861
self._allow_list_desc = None
5962
self._allow_list_name = None
6063
self._allow_list_type = None
6164
self._client_token = None
6265
self.discriminator = None
6366

6467
self.allow_list = allow_list
68+
if allow_list_category is not None:
69+
self.allow_list_category = allow_list_category
6570
if allow_list_desc is not None:
6671
self.allow_list_desc = allow_list_desc
6772
self.allow_list_name = allow_list_name
@@ -93,6 +98,34 @@ def allow_list(self, allow_list):
9398

9499
self._allow_list = allow_list
95100

101+
@property
102+
def allow_list_category(self):
103+
"""Gets the allow_list_category of this CreateAllowListRequest. # noqa: E501
104+
105+
106+
:return: The allow_list_category of this CreateAllowListRequest. # noqa: E501
107+
:rtype: str
108+
"""
109+
return self._allow_list_category
110+
111+
@allow_list_category.setter
112+
def allow_list_category(self, allow_list_category):
113+
"""Sets the allow_list_category of this CreateAllowListRequest.
114+
115+
116+
:param allow_list_category: The allow_list_category of this CreateAllowListRequest. # noqa: E501
117+
:type: str
118+
"""
119+
allowed_values = ["Ordinary", "Default"] # noqa: E501
120+
if (self._configuration.client_side_validation and
121+
allow_list_category not in allowed_values):
122+
raise ValueError(
123+
"Invalid value for `allow_list_category` ({0}), must be one of {1}" # noqa: E501
124+
.format(allow_list_category, allowed_values)
125+
)
126+
127+
self._allow_list_category = allow_list_category
128+
96129
@property
97130
def allow_list_desc(self):
98131
"""Gets the allow_list_desc of this CreateAllowListRequest. # noqa: E501

volcenginesdkredis/models/create_enterprise_db_instance_request.py

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class CreateEnterpriseDBInstanceRequest(object):
3838
'charge_type': 'str',
3939
'client_token': 'str',
4040
'configure_nodes': 'list[ConfigureNodeForCreateEnterpriseDBInstanceInput]',
41+
'data_layout': 'str',
4142
'deletion_protection': 'str',
4243
'flash_per_shard': 'int',
4344
'instance_name': 'str',
@@ -60,6 +61,7 @@ class CreateEnterpriseDBInstanceRequest(object):
6061
'charge_type': 'ChargeType',
6162
'client_token': 'ClientToken',
6263
'configure_nodes': 'ConfigureNodes',
64+
'data_layout': 'DataLayout',
6365
'deletion_protection': 'DeletionProtection',
6466
'flash_per_shard': 'FlashPerShard',
6567
'instance_name': 'InstanceName',
@@ -76,7 +78,7 @@ class CreateEnterpriseDBInstanceRequest(object):
7678
'vpc_id': 'VpcId'
7779
}
7880

79-
def __init__(self, allow_list_ids=None, auto_renew=None, charge_type=None, client_token=None, configure_nodes=None, deletion_protection=None, flash_per_shard=None, instance_name=None, modules=None, multi_az=None, password=None, project_name=None, purchase_months=None, ram_per_shard=None, region_id=None, shard_number=None, subnet_id=None, tags=None, vpc_id=None, _configuration=None): # noqa: E501
81+
def __init__(self, allow_list_ids=None, auto_renew=None, charge_type=None, client_token=None, configure_nodes=None, data_layout=None, deletion_protection=None, flash_per_shard=None, instance_name=None, modules=None, multi_az=None, password=None, project_name=None, purchase_months=None, ram_per_shard=None, region_id=None, shard_number=None, subnet_id=None, tags=None, vpc_id=None, _configuration=None): # noqa: E501
8082
"""CreateEnterpriseDBInstanceRequest - a model defined in Swagger""" # noqa: E501
8183
if _configuration is None:
8284
_configuration = Configuration()
@@ -87,6 +89,7 @@ def __init__(self, allow_list_ids=None, auto_renew=None, charge_type=None, clien
8789
self._charge_type = None
8890
self._client_token = None
8991
self._configure_nodes = None
92+
self._data_layout = None
9093
self._deletion_protection = None
9194
self._flash_per_shard = None
9295
self._instance_name = None
@@ -105,12 +108,14 @@ def __init__(self, allow_list_ids=None, auto_renew=None, charge_type=None, clien
105108

106109
if allow_list_ids is not None:
107110
self.allow_list_ids = allow_list_ids
108-
self.auto_renew = auto_renew
111+
if auto_renew is not None:
112+
self.auto_renew = auto_renew
109113
self.charge_type = charge_type
110114
if client_token is not None:
111115
self.client_token = client_token
112116
if configure_nodes is not None:
113117
self.configure_nodes = configure_nodes
118+
self.data_layout = data_layout
114119
if deletion_protection is not None:
115120
self.deletion_protection = deletion_protection
116121
self.flash_per_shard = flash_per_shard
@@ -124,7 +129,8 @@ def __init__(self, allow_list_ids=None, auto_renew=None, charge_type=None, clien
124129
self.password = password
125130
if project_name is not None:
126131
self.project_name = project_name
127-
self.purchase_months = purchase_months
132+
if purchase_months is not None:
133+
self.purchase_months = purchase_months
128134
self.ram_per_shard = ram_per_shard
129135
self.region_id = region_id
130136
self.shard_number = shard_number
@@ -172,8 +178,6 @@ def auto_renew(self, auto_renew):
172178
:param auto_renew: The auto_renew of this CreateEnterpriseDBInstanceRequest. # noqa: E501
173179
:type: bool
174180
"""
175-
if self._configuration.client_side_validation and auto_renew is None:
176-
raise ValueError("Invalid value for `auto_renew`, must not be `None`") # noqa: E501
177181

178182
self._auto_renew = auto_renew
179183

@@ -242,6 +246,29 @@ def configure_nodes(self, configure_nodes):
242246

243247
self._configure_nodes = configure_nodes
244248

249+
@property
250+
def data_layout(self):
251+
"""Gets the data_layout of this CreateEnterpriseDBInstanceRequest. # noqa: E501
252+
253+
254+
:return: The data_layout of this CreateEnterpriseDBInstanceRequest. # noqa: E501
255+
:rtype: str
256+
"""
257+
return self._data_layout
258+
259+
@data_layout.setter
260+
def data_layout(self, data_layout):
261+
"""Sets the data_layout of this CreateEnterpriseDBInstanceRequest.
262+
263+
264+
:param data_layout: The data_layout of this CreateEnterpriseDBInstanceRequest. # noqa: E501
265+
:type: str
266+
"""
267+
if self._configuration.client_side_validation and data_layout is None:
268+
raise ValueError("Invalid value for `data_layout`, must not be `None`") # noqa: E501
269+
270+
self._data_layout = data_layout
271+
245272
@property
246273
def deletion_protection(self):
247274
"""Gets the deletion_protection of this CreateEnterpriseDBInstanceRequest. # noqa: E501
@@ -409,8 +436,6 @@ def purchase_months(self, purchase_months):
409436
:param purchase_months: The purchase_months of this CreateEnterpriseDBInstanceRequest. # noqa: E501
410437
:type: int
411438
"""
412-
if self._configuration.client_side_validation and purchase_months is None:
413-
raise ValueError("Invalid value for `purchase_months`, must not be `None`") # noqa: E501
414439

415440
self._purchase_months = purchase_months
416441

volcenginesdkredis/models/describe_allow_list_detail_response.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class DescribeAllowListDetailResponse(object):
3434
"""
3535
swagger_types = {
3636
'allow_list': 'str',
37+
'allow_list_category': 'str',
3738
'allow_list_desc': 'str',
3839
'allow_list_id': 'str',
3940
'allow_list_name': 'str',
@@ -43,20 +44,22 @@ class DescribeAllowListDetailResponse(object):
4344

4445
attribute_map = {
4546
'allow_list': 'AllowList',
47+
'allow_list_category': 'AllowListCategory',
4648
'allow_list_desc': 'AllowListDesc',
4749
'allow_list_id': 'AllowListId',
4850
'allow_list_name': 'AllowListName',
4951
'allow_list_type': 'AllowListType',
5052
'associated_instances': 'AssociatedInstances'
5153
}
5254

53-
def __init__(self, allow_list=None, allow_list_desc=None, allow_list_id=None, allow_list_name=None, allow_list_type=None, associated_instances=None, _configuration=None): # noqa: E501
55+
def __init__(self, allow_list=None, allow_list_category=None, allow_list_desc=None, allow_list_id=None, allow_list_name=None, allow_list_type=None, associated_instances=None, _configuration=None): # noqa: E501
5456
"""DescribeAllowListDetailResponse - a model defined in Swagger""" # noqa: E501
5557
if _configuration is None:
5658
_configuration = Configuration()
5759
self._configuration = _configuration
5860

5961
self._allow_list = None
62+
self._allow_list_category = None
6063
self._allow_list_desc = None
6164
self._allow_list_id = None
6265
self._allow_list_name = None
@@ -66,6 +69,8 @@ def __init__(self, allow_list=None, allow_list_desc=None, allow_list_id=None, al
6669

6770
if allow_list is not None:
6871
self.allow_list = allow_list
72+
if allow_list_category is not None:
73+
self.allow_list_category = allow_list_category
6974
if allow_list_desc is not None:
7075
self.allow_list_desc = allow_list_desc
7176
if allow_list_id is not None:
@@ -98,6 +103,27 @@ def allow_list(self, allow_list):
98103

99104
self._allow_list = allow_list
100105

106+
@property
107+
def allow_list_category(self):
108+
"""Gets the allow_list_category of this DescribeAllowListDetailResponse. # noqa: E501
109+
110+
111+
:return: The allow_list_category of this DescribeAllowListDetailResponse. # noqa: E501
112+
:rtype: str
113+
"""
114+
return self._allow_list_category
115+
116+
@allow_list_category.setter
117+
def allow_list_category(self, allow_list_category):
118+
"""Sets the allow_list_category of this DescribeAllowListDetailResponse.
119+
120+
121+
:param allow_list_category: The allow_list_category of this DescribeAllowListDetailResponse. # noqa: E501
122+
:type: str
123+
"""
124+
125+
self._allow_list_category = allow_list_category
126+
101127
@property
102128
def allow_list_desc(self):
103129
"""Gets the allow_list_desc of this DescribeAllowListDetailResponse. # noqa: E501

volcenginesdkredis/models/describe_allow_lists_request.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,26 +34,31 @@ class DescribeAllowListsRequest(object):
3434
"""
3535
swagger_types = {
3636
'instance_id': 'str',
37+
'query_default': 'bool',
3738
'region_id': 'str'
3839
}
3940

4041
attribute_map = {
4142
'instance_id': 'InstanceId',
43+
'query_default': 'QueryDefault',
4244
'region_id': 'RegionId'
4345
}
4446

45-
def __init__(self, instance_id=None, region_id=None, _configuration=None): # noqa: E501
47+
def __init__(self, instance_id=None, query_default=None, region_id=None, _configuration=None): # noqa: E501
4648
"""DescribeAllowListsRequest - a model defined in Swagger""" # noqa: E501
4749
if _configuration is None:
4850
_configuration = Configuration()
4951
self._configuration = _configuration
5052

5153
self._instance_id = None
54+
self._query_default = None
5255
self._region_id = None
5356
self.discriminator = None
5457

5558
if instance_id is not None:
5659
self.instance_id = instance_id
60+
if query_default is not None:
61+
self.query_default = query_default
5762
self.region_id = region_id
5863

5964
@property
@@ -77,6 +82,27 @@ def instance_id(self, instance_id):
7782

7883
self._instance_id = instance_id
7984

85+
@property
86+
def query_default(self):
87+
"""Gets the query_default of this DescribeAllowListsRequest. # noqa: E501
88+
89+
90+
:return: The query_default of this DescribeAllowListsRequest. # noqa: E501
91+
:rtype: bool
92+
"""
93+
return self._query_default
94+
95+
@query_default.setter
96+
def query_default(self, query_default):
97+
"""Sets the query_default of this DescribeAllowListsRequest.
98+
99+
100+
:param query_default: The query_default of this DescribeAllowListsRequest. # noqa: E501
101+
:type: bool
102+
"""
103+
104+
self._query_default = query_default
105+
80106
@property
81107
def region_id(self):
82108
"""Gets the region_id of this DescribeAllowListsRequest. # noqa: E501

volcenginesdkredis/models/describe_db_instances_request.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,14 @@ def __init__(self, charge_type=None, data_layout=None, engine_version=None, inst
101101
self.instance_id = instance_id
102102
if instance_name is not None:
103103
self.instance_name = instance_name
104-
self.page_number = page_number
105-
self.page_size = page_size
104+
if page_number is not None:
105+
self.page_number = page_number
106+
if page_size is not None:
107+
self.page_size = page_size
106108
if project_name is not None:
107109
self.project_name = project_name
108-
self.region_id = region_id
110+
if region_id is not None:
111+
self.region_id = region_id
109112
if service_type is not None:
110113
self.service_type = service_type
111114
if sharded_cluster is not None:
@@ -242,8 +245,6 @@ def page_number(self, page_number):
242245
:param page_number: The page_number of this DescribeDBInstancesRequest. # noqa: E501
243246
:type: int
244247
"""
245-
if self._configuration.client_side_validation and page_number is None:
246-
raise ValueError("Invalid value for `page_number`, must not be `None`") # noqa: E501
247248

248249
self._page_number = page_number
249250

@@ -265,8 +266,6 @@ def page_size(self, page_size):
265266
:param page_size: The page_size of this DescribeDBInstancesRequest. # noqa: E501
266267
:type: int
267268
"""
268-
if self._configuration.client_side_validation and page_size is None:
269-
raise ValueError("Invalid value for `page_size`, must not be `None`") # noqa: E501
270269

271270
self._page_size = page_size
272271

@@ -309,8 +308,6 @@ def region_id(self, region_id):
309308
:param region_id: The region_id of this DescribeDBInstancesRequest. # noqa: E501
310309
:type: str
311310
"""
312-
if self._configuration.client_side_validation and region_id is None:
313-
raise ValueError("Invalid value for `region_id`, must not be `None`") # noqa: E501
314311

315312
self._region_id = region_id
316313

0 commit comments

Comments
 (0)