Skip to content

Commit b906ab9

Browse files
committed
feat: update redis api
1 parent e3e65a9 commit b906ab9

File tree

6 files changed

+628
-0
lines changed

6 files changed

+628
-0
lines changed

volcenginesdkredis/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from volcenginesdkredis.models.associate_allow_list_response import AssociateAllowListResponse
2626
from volcenginesdkredis.models.associated_instance_for_describe_allow_list_detail_output import AssociatedInstanceForDescribeAllowListDetailOutput
2727
from volcenginesdkredis.models.backup_for_describe_backups_output import BackupForDescribeBackupsOutput
28+
from volcenginesdkredis.models.backup_point_download_url_for_describe_backup_point_download_urls_output import BackupPointDownloadUrlForDescribeBackupPointDownloadUrlsOutput
2829
from volcenginesdkredis.models.capacity_for_describe_db_instance_detail_output import CapacityForDescribeDBInstanceDetailOutput
2930
from volcenginesdkredis.models.capacity_for_describe_db_instances_output import CapacityForDescribeDBInstancesOutput
3031
from volcenginesdkredis.models.create_allow_list_request import CreateAllowListRequest
@@ -51,6 +52,8 @@
5152
from volcenginesdkredis.models.describe_allow_lists_response import DescribeAllowListsResponse
5253
from volcenginesdkredis.models.describe_backup_plan_request import DescribeBackupPlanRequest
5354
from volcenginesdkredis.models.describe_backup_plan_response import DescribeBackupPlanResponse
55+
from volcenginesdkredis.models.describe_backup_point_download_urls_request import DescribeBackupPointDownloadUrlsRequest
56+
from volcenginesdkredis.models.describe_backup_point_download_urls_response import DescribeBackupPointDownloadUrlsResponse
5457
from volcenginesdkredis.models.describe_backups_request import DescribeBackupsRequest
5558
from volcenginesdkredis.models.describe_backups_response import DescribeBackupsResponse
5659
from volcenginesdkredis.models.describe_db_instance_detail_request import DescribeDBInstanceDetailRequest

volcenginesdkredis/api/redis_api.py

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,6 +1294,103 @@ def describe_backup_plan_with_http_info(self, body, **kwargs): # noqa: E501
12941294
_request_timeout=params.get('_request_timeout'),
12951295
collection_formats=collection_formats)
12961296

1297+
def describe_backup_point_download_urls(self, body, **kwargs): # noqa: E501
1298+
"""describe_backup_point_download_urls # noqa: E501
1299+
1300+
This method makes a synchronous HTTP request by default. To make an
1301+
asynchronous HTTP request, please pass async_req=True
1302+
>>> thread = api.describe_backup_point_download_urls(body, async_req=True)
1303+
>>> result = thread.get()
1304+
1305+
:param async_req bool
1306+
:param DescribeBackupPointDownloadUrlsRequest body: (required)
1307+
:return: DescribeBackupPointDownloadUrlsResponse
1308+
If the method is called asynchronously,
1309+
returns the request thread.
1310+
"""
1311+
kwargs['_return_http_data_only'] = True
1312+
if kwargs.get('async_req'):
1313+
return self.describe_backup_point_download_urls_with_http_info(body, **kwargs) # noqa: E501
1314+
else:
1315+
(data) = self.describe_backup_point_download_urls_with_http_info(body, **kwargs) # noqa: E501
1316+
return data
1317+
1318+
def describe_backup_point_download_urls_with_http_info(self, body, **kwargs): # noqa: E501
1319+
"""describe_backup_point_download_urls # noqa: E501
1320+
1321+
This method makes a synchronous HTTP request by default. To make an
1322+
asynchronous HTTP request, please pass async_req=True
1323+
>>> thread = api.describe_backup_point_download_urls_with_http_info(body, async_req=True)
1324+
>>> result = thread.get()
1325+
1326+
:param async_req bool
1327+
:param DescribeBackupPointDownloadUrlsRequest body: (required)
1328+
:return: DescribeBackupPointDownloadUrlsResponse
1329+
If the method is called asynchronously,
1330+
returns the request thread.
1331+
"""
1332+
1333+
all_params = ['body'] # noqa: E501
1334+
all_params.append('async_req')
1335+
all_params.append('_return_http_data_only')
1336+
all_params.append('_preload_content')
1337+
all_params.append('_request_timeout')
1338+
1339+
params = locals()
1340+
for key, val in six.iteritems(params['kwargs']):
1341+
if key not in all_params:
1342+
raise TypeError(
1343+
"Got an unexpected keyword argument '%s'"
1344+
" to method describe_backup_point_download_urls" % key
1345+
)
1346+
params[key] = val
1347+
del params['kwargs']
1348+
# verify the required parameter 'body' is set
1349+
if self.api_client.client_side_validation and ('body' not in params or
1350+
params['body'] is None): # noqa: E501
1351+
raise ValueError("Missing the required parameter `body` when calling `describe_backup_point_download_urls`") # noqa: E501
1352+
1353+
collection_formats = {}
1354+
1355+
path_params = {}
1356+
1357+
query_params = []
1358+
1359+
header_params = {}
1360+
1361+
form_params = []
1362+
local_var_files = {}
1363+
1364+
body_params = None
1365+
if 'body' in params:
1366+
body_params = params['body']
1367+
# HTTP header `Accept`
1368+
header_params['Accept'] = self.api_client.select_header_accept(
1369+
['application/json']) # noqa: E501
1370+
1371+
# HTTP header `Content-Type`
1372+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
1373+
['application/json']) # noqa: E501
1374+
1375+
# Authentication setting
1376+
auth_settings = ['volcengineSign'] # noqa: E501
1377+
1378+
return self.api_client.call_api(
1379+
'/DescribeBackupPointDownloadUrls/2020-12-07/redis/post/', 'POST',
1380+
path_params,
1381+
query_params,
1382+
header_params,
1383+
body=body_params,
1384+
post_params=form_params,
1385+
files=local_var_files,
1386+
response_type='DescribeBackupPointDownloadUrlsResponse', # noqa: E501
1387+
auth_settings=auth_settings,
1388+
async_req=params.get('async_req'),
1389+
_return_http_data_only=params.get('_return_http_data_only'),
1390+
_preload_content=params.get('_preload_content', True),
1391+
_request_timeout=params.get('_request_timeout'),
1392+
collection_formats=collection_formats)
1393+
12971394
def describe_backups(self, body, **kwargs): # noqa: E501
12981395
"""describe_backups # noqa: E501
12991396

volcenginesdkredis/models/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from volcenginesdkredis.models.associate_allow_list_response import AssociateAllowListResponse
2222
from volcenginesdkredis.models.associated_instance_for_describe_allow_list_detail_output import AssociatedInstanceForDescribeAllowListDetailOutput
2323
from volcenginesdkredis.models.backup_for_describe_backups_output import BackupForDescribeBackupsOutput
24+
from volcenginesdkredis.models.backup_point_download_url_for_describe_backup_point_download_urls_output import BackupPointDownloadUrlForDescribeBackupPointDownloadUrlsOutput
2425
from volcenginesdkredis.models.capacity_for_describe_db_instance_detail_output import CapacityForDescribeDBInstanceDetailOutput
2526
from volcenginesdkredis.models.capacity_for_describe_db_instances_output import CapacityForDescribeDBInstancesOutput
2627
from volcenginesdkredis.models.create_allow_list_request import CreateAllowListRequest
@@ -47,6 +48,8 @@
4748
from volcenginesdkredis.models.describe_allow_lists_response import DescribeAllowListsResponse
4849
from volcenginesdkredis.models.describe_backup_plan_request import DescribeBackupPlanRequest
4950
from volcenginesdkredis.models.describe_backup_plan_response import DescribeBackupPlanResponse
51+
from volcenginesdkredis.models.describe_backup_point_download_urls_request import DescribeBackupPointDownloadUrlsRequest
52+
from volcenginesdkredis.models.describe_backup_point_download_urls_response import DescribeBackupPointDownloadUrlsResponse
5053
from volcenginesdkredis.models.describe_backups_request import DescribeBackupsRequest
5154
from volcenginesdkredis.models.describe_backups_response import DescribeBackupsResponse
5255
from volcenginesdkredis.models.describe_db_instance_detail_request import DescribeDBInstanceDetailRequest
Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
# coding: utf-8
2+
3+
"""
4+
redis
5+
6+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
7+
8+
OpenAPI spec version: common-version
9+
10+
Generated by: https://github.com/swagger-api/swagger-codegen.git
11+
"""
12+
13+
14+
import pprint
15+
import re # noqa: F401
16+
17+
import six
18+
19+
from volcenginesdkcore.configuration import Configuration
20+
21+
22+
class BackupPointDownloadUrlForDescribeBackupPointDownloadUrlsOutput(object):
23+
"""NOTE: This class is auto generated by the swagger code generator program.
24+
25+
Do not edit the class manually.
26+
"""
27+
28+
"""
29+
Attributes:
30+
swagger_types (dict): The key is attribute name
31+
and the value is attribute type.
32+
attribute_map (dict): The key is attribute name
33+
and the value is json key in definition.
34+
"""
35+
swagger_types = {
36+
'private_download_url': 'str',
37+
'public_download_url': 'str',
38+
'rdb_file_size': 'int',
39+
'shard_id': 'str'
40+
}
41+
42+
attribute_map = {
43+
'private_download_url': 'PrivateDownloadUrl',
44+
'public_download_url': 'PublicDownloadUrl',
45+
'rdb_file_size': 'RdbFileSize',
46+
'shard_id': 'ShardId'
47+
}
48+
49+
def __init__(self, private_download_url=None, public_download_url=None, rdb_file_size=None, shard_id=None, _configuration=None): # noqa: E501
50+
"""BackupPointDownloadUrlForDescribeBackupPointDownloadUrlsOutput - a model defined in Swagger""" # noqa: E501
51+
if _configuration is None:
52+
_configuration = Configuration()
53+
self._configuration = _configuration
54+
55+
self._private_download_url = None
56+
self._public_download_url = None
57+
self._rdb_file_size = None
58+
self._shard_id = None
59+
self.discriminator = None
60+
61+
if private_download_url is not None:
62+
self.private_download_url = private_download_url
63+
if public_download_url is not None:
64+
self.public_download_url = public_download_url
65+
if rdb_file_size is not None:
66+
self.rdb_file_size = rdb_file_size
67+
if shard_id is not None:
68+
self.shard_id = shard_id
69+
70+
@property
71+
def private_download_url(self):
72+
"""Gets the private_download_url of this BackupPointDownloadUrlForDescribeBackupPointDownloadUrlsOutput. # noqa: E501
73+
74+
75+
:return: The private_download_url of this BackupPointDownloadUrlForDescribeBackupPointDownloadUrlsOutput. # noqa: E501
76+
:rtype: str
77+
"""
78+
return self._private_download_url
79+
80+
@private_download_url.setter
81+
def private_download_url(self, private_download_url):
82+
"""Sets the private_download_url of this BackupPointDownloadUrlForDescribeBackupPointDownloadUrlsOutput.
83+
84+
85+
:param private_download_url: The private_download_url of this BackupPointDownloadUrlForDescribeBackupPointDownloadUrlsOutput. # noqa: E501
86+
:type: str
87+
"""
88+
89+
self._private_download_url = private_download_url
90+
91+
@property
92+
def public_download_url(self):
93+
"""Gets the public_download_url of this BackupPointDownloadUrlForDescribeBackupPointDownloadUrlsOutput. # noqa: E501
94+
95+
96+
:return: The public_download_url of this BackupPointDownloadUrlForDescribeBackupPointDownloadUrlsOutput. # noqa: E501
97+
:rtype: str
98+
"""
99+
return self._public_download_url
100+
101+
@public_download_url.setter
102+
def public_download_url(self, public_download_url):
103+
"""Sets the public_download_url of this BackupPointDownloadUrlForDescribeBackupPointDownloadUrlsOutput.
104+
105+
106+
:param public_download_url: The public_download_url of this BackupPointDownloadUrlForDescribeBackupPointDownloadUrlsOutput. # noqa: E501
107+
:type: str
108+
"""
109+
110+
self._public_download_url = public_download_url
111+
112+
@property
113+
def rdb_file_size(self):
114+
"""Gets the rdb_file_size of this BackupPointDownloadUrlForDescribeBackupPointDownloadUrlsOutput. # noqa: E501
115+
116+
117+
:return: The rdb_file_size of this BackupPointDownloadUrlForDescribeBackupPointDownloadUrlsOutput. # noqa: E501
118+
:rtype: int
119+
"""
120+
return self._rdb_file_size
121+
122+
@rdb_file_size.setter
123+
def rdb_file_size(self, rdb_file_size):
124+
"""Sets the rdb_file_size of this BackupPointDownloadUrlForDescribeBackupPointDownloadUrlsOutput.
125+
126+
127+
:param rdb_file_size: The rdb_file_size of this BackupPointDownloadUrlForDescribeBackupPointDownloadUrlsOutput. # noqa: E501
128+
:type: int
129+
"""
130+
131+
self._rdb_file_size = rdb_file_size
132+
133+
@property
134+
def shard_id(self):
135+
"""Gets the shard_id of this BackupPointDownloadUrlForDescribeBackupPointDownloadUrlsOutput. # noqa: E501
136+
137+
138+
:return: The shard_id of this BackupPointDownloadUrlForDescribeBackupPointDownloadUrlsOutput. # noqa: E501
139+
:rtype: str
140+
"""
141+
return self._shard_id
142+
143+
@shard_id.setter
144+
def shard_id(self, shard_id):
145+
"""Sets the shard_id of this BackupPointDownloadUrlForDescribeBackupPointDownloadUrlsOutput.
146+
147+
148+
:param shard_id: The shard_id of this BackupPointDownloadUrlForDescribeBackupPointDownloadUrlsOutput. # noqa: E501
149+
:type: str
150+
"""
151+
152+
self._shard_id = shard_id
153+
154+
def to_dict(self):
155+
"""Returns the model properties as a dict"""
156+
result = {}
157+
158+
for attr, _ in six.iteritems(self.swagger_types):
159+
value = getattr(self, attr)
160+
if isinstance(value, list):
161+
result[attr] = list(map(
162+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
163+
value
164+
))
165+
elif hasattr(value, "to_dict"):
166+
result[attr] = value.to_dict()
167+
elif isinstance(value, dict):
168+
result[attr] = dict(map(
169+
lambda item: (item[0], item[1].to_dict())
170+
if hasattr(item[1], "to_dict") else item,
171+
value.items()
172+
))
173+
else:
174+
result[attr] = value
175+
if issubclass(BackupPointDownloadUrlForDescribeBackupPointDownloadUrlsOutput, dict):
176+
for key, value in self.items():
177+
result[key] = value
178+
179+
return result
180+
181+
def to_str(self):
182+
"""Returns the string representation of the model"""
183+
return pprint.pformat(self.to_dict())
184+
185+
def __repr__(self):
186+
"""For `print` and `pprint`"""
187+
return self.to_str()
188+
189+
def __eq__(self, other):
190+
"""Returns true if both objects are equal"""
191+
if not isinstance(other, BackupPointDownloadUrlForDescribeBackupPointDownloadUrlsOutput):
192+
return False
193+
194+
return self.to_dict() == other.to_dict()
195+
196+
def __ne__(self, other):
197+
"""Returns true if both objects are not equal"""
198+
if not isinstance(other, BackupPointDownloadUrlForDescribeBackupPointDownloadUrlsOutput):
199+
return True
200+
201+
return self.to_dict() != other.to_dict()

0 commit comments

Comments
 (0)